[ Bottom of Page | Previous Page | Next Page | Contents | Index | Library Home | Legal | Search ]

Technical Reference: Base Operating System and Extensions, Volume 2

touchwin Subroutine

Purpose

Forces every character in a window's buffer to be refreshed at the next call to the wrefresh subroutine.

Library

Curses Library (libcurses.a)

Syntax


#include <curses.h>

touchwin( Window)
WINDOW *Window;

Description

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.

Parameters

Window Specifies the window to be touched.

Example

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.

Related Information

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.2 General Programming Concepts: Writing and Debugging Programs.

[ Top of Page | Previous Page | Next Page | Contents | Index | Library Home | Legal | Search ]