Forces every character in a window's buffer to be refreshed at the next call to the wrefresh subroutine.
#include <curses.h>
touchwin( Window)
WINDOW *Window;
The touchwin (touchwin Subroutine) subroutine forces every character in the specified window to be refreshed during the next call to the refresh or wrefresh subroutine. To force a specific range of lines to be refreshed, use the touchline (is_linetouched, is_wintouched, touchline, touchwin, untouchwin, or wtouchin Subroutine) subroutine.
The combined usage of the touchwin and wrefresh subroutines is helpful when dealing with subwindows or overlapping windows. When dealing with overlapping windows, it may become necessary to bring the back window to the front. A call to the wrefresh subroutine does not change the terminal because none of the characters in the window were changed. Calling the touchwin subroutine on the back window before the wrefresh subroutine redisplays the window on the terminal and, effectively, brings it to the front.
Window | Specifies the window to be touched. |
To refresh a user-defined parent window, parent_window, that has been edited through its subwindows, use:
WINDOW *parent_window; touchwin(parent_window); wrefresh(parent_window);
This forces curses to disregard any optimization information it may have for my_window. curses assumes all lines and columns have changed for my_window.
This subroutine is part of Base Operating System (BOS) Runtime.
The touchline (is_linetouched, is_wintouched, touchline, touchwin, untouchwin, or wtouchin Subroutine) subroutine, wrefresh (refresh or wrefresh Subroutine) subroutine.
Curses Overview for Programming, List of Curses Subroutines, Windows in the Curses Environment in AIX 5L Version 5.1 General Programming Concepts: Writing and Debugging Programs.