Remove tui_wrefresh

This removes tui_wrefresh, moving the code into refresh_window.  We
remove tui_norefresh_window as well, because now the command window's
refresh_window has to do what tui_wrefresh previously did.
This commit is contained in:
Tom Tromey 2024-06-29 10:07:20 -06:00
parent d3acf3d759
commit a35cc8ff85
6 changed files with 5 additions and 29 deletions

View File

@ -95,7 +95,7 @@ class tui_py_window : public tui_win_info
{
wnoutrefresh (handle.get ());
touchwin (m_inner_window.get ());
tui_wrefresh (m_inner_window.get ());
wnoutrefresh (m_inner_window.get ());
}
else
tui_win_info::refresh_window ();
@ -275,7 +275,7 @@ tui_py_window::output (const char *text, bool full_window)
if (full_window)
check_and_display_highlight_if_needed ();
else
tui_wrefresh (m_inner_window.get ());
wnoutrefresh (m_inner_window.get ());
}
}

View File

@ -57,7 +57,5 @@ tui_cmd_window::resize (int height_, int width_, int origin_x, int origin_y)
void
tui_refresh_cmd_win (void)
{
WINDOW *w = tui_cmd_win ()->handle.get ();
tui_wrefresh (w);
tui_cmd_win ()->refresh_window ();
}

View File

@ -26,8 +26,7 @@
/* The TUI command window. */
struct tui_cmd_window
: public tui_noscroll_window, tui_nobox_window, tui_norefresh_window,
tui_always_visible_window
: public tui_noscroll_window, tui_nobox_window, tui_always_visible_window
{
tui_cmd_window () = default;

View File

@ -253,15 +253,6 @@ struct tui_nobox_window : public virtual tui_win_info
}
};
/* A TUI window that is not refreshed. */
struct tui_norefresh_window : public virtual tui_win_info
{
virtual void refresh_window () final override
{
}
};
/* A TUI window that is always visible. */
struct tui_always_visible_window : public virtual tui_win_info

View File

@ -52,19 +52,11 @@ tui_batch_rendering::~tui_batch_rendering ()
/* See tui-data.h. */
void
tui_wrefresh (WINDOW *win)
{
wnoutrefresh (win);
}
/* See tui-data.h. */
void
tui_win_info::refresh_window ()
{
if (handle != NULL)
tui_wrefresh (handle.get ());
wnoutrefresh (handle.get ());
}
/* Draw a border around the window. */

View File

@ -50,8 +50,4 @@ class tui_batch_rendering
bool m_saved_suppress;
};
/* Call wrefresh on the given window. However, if output is being
suppressed via tui_suppress_output, do not call wrefresh. */
extern void tui_wrefresh (WINDOW *win);
#endif /* TUI_TUI_WINGENERAL_H */