[ Previous | Next | Table of 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.

Implementation Specifics

This subroutine is part of Base Operating System (BOS) Runtime.

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


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