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 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 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 subroutine, wrefresh subroutine.
Curses Overview for Programming, List of Curses Subroutines, Windows in the Curses Environment in AIX Version 4.3 General Programming Concepts: Writing and Debugging Programs.