Updates the terminal's display and the curscr to reflect changes made to a window.
Curses Library (libcurses.a)
#include <curses.h>
refresh( )
wrefresh( Window)
WINDOW *Window;
The refresh or wrefresh subroutines update the terminal and the curscr to reflect changes made to a window. The refresh subroutine updates the stdscr. The wrefresh subroutine refreshes a user-defined window.
Other subroutines manipulate windows but do not update the terminal's physical display to reflect their changes. Use the refresh or wrefresh subroutines to update a terminal's display after internal window representations change. Both subroutines check for possible scroll errors at display time.
The refresh and wrefresh subroutines call two other subroutines to perform the refresh operation. First, the wnoutrefresh (doupdate, refresh, wnoutrefresh, or wrefresh Subroutines) subroutine copies the designated window structure to the terminal. Then, the doupdate (doupdate, refresh, wnoutrefresh, or wrefresh Subroutines) subroutine updates the terminal's display and the cursor.
Window | Specifies the window to refresh. |
refresh();
WINDOW *my_window; wrefresh(my_window);
wrefresh(curscr);
This subroutine is useful if the terminal becomes garbled for any reason.
The doupdate (doupdate, refresh, wnoutrefresh, or wrefresh Subroutines) subroutine, leaveok (leaveok Subroutine) subroutine, wnoutrefresh (leaveok Subroutine) subroutine.
Curses Overview for Programming, List of Curses Subroutines, Manipulating Characters with Curses in AIX 5L Version 5.2 General Programming Concepts: Writing and Debugging Programs.