blob: f65d2f9d202d9670c4eb0544a7f1c5bd12a09d65 [file] [log] [blame]
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05301.\"***************************************************************************
Steve Kondikae271bc2015-11-15 02:50:53 +01002.\" Copyright (c) 1998-2020,2015 Free Software Foundation, Inc. *
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05303.\" *
4.\" Permission is hereby granted, free of charge, to any person obtaining a *
5.\" copy of this software and associated documentation files (the *
6.\" "Software"), to deal in the Software without restriction, including *
7.\" without limitation the rights to use, copy, modify, merge, publish, *
8.\" distribute, distribute with modifications, sublicense, and/or sell *
9.\" copies of the Software, and to permit persons to whom the Software is *
10.\" furnished to do so, subject to the following conditions: *
11.\" *
12.\" The above copyright notice and this permission notice shall be included *
13.\" in all copies or substantial portions of the Software. *
14.\" *
15.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
16.\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
17.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
18.\" IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
19.\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
20.\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
21.\" THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
22.\" *
23.\" Except as contained in this notice, the name(s) of the above copyright *
24.\" holders shall not be used in advertising or otherwise to promote the *
25.\" sale, use or other dealings in this Software without prior written *
26.\" authorization. *
27.\"***************************************************************************
28.\"
Steve Kondikae271bc2015-11-15 02:50:53 +010029.\" $Id: curs_touch.3x,v 1.15 2015/04/11 10:23:49 tom Exp $
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053030.TH curs_touch 3X ""
31.na
32.hy 0
33.SH NAME
34\fBtouchwin\fR,
35\fBtouchline\fR,
36\fBuntouchwin\fR,
37\fBwtouchln\fR,
38\fBis_linetouched\fR,
Steve Kondikae271bc2015-11-15 02:50:53 +010039\fBis_wintouched\fR \- \fBcurses\fR refresh control routines
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053040.ad
41.hy
42.SH SYNOPSIS
43\fB#include <curses.h>\fR
44.br
45\fBint touchwin(WINDOW *win);\fR
46.br
47\fBint touchline(WINDOW *win, int start, int count);\fR
48.br
49\fBint untouchwin(WINDOW *win);\fR
50.br
51\fBint wtouchln(WINDOW *win, int y, int n, int changed);\fR
52.br
53\fBbool is_linetouched(WINDOW *win, int line);\fR
54.br
55\fBbool is_wintouched(WINDOW *win);\fR
56.br
57.SH DESCRIPTION
58The \fBtouchwin\fR and \fBtouchline\fR routines throw away all
59optimization information about which parts of the window have been
60touched, by pretending that the entire window has been drawn on. This
61is sometimes necessary when using overlapping windows, since a change
62to one window affects the other window, but the records of which lines
63have been changed in the other window do not reflect the change. The
64routine \fBtouchline\fR only pretends that \fIcount\fR lines have been
65changed, beginning with line \fIstart\fR.
66.PP
67The \fBuntouchwin\fR routine marks all lines in the window as unchanged since
68the last call to \fBwrefresh\fR.
69.PP
70The \fBwtouchln\fR routine makes \fIn\fR lines in the window, starting
71at line \fIy\fR, look as if they have (\fIchanged\fR\fB=1\fR) or have
72not (\fIchanged\fR\fB=0\fR) been changed since the last call to
73\fBwrefresh\fR.
74.PP
75The \fBis_linetouched\fR and \fBis_wintouched\fR routines return
76\fBTRUE\fR if the specified line/window was modified since the last
77call to \fBwrefresh\fR; otherwise they return \fBFALSE\fR. In
78addition, \fBis_linetouched\fR returns \fBERR\fR if \fIline\fR is not
79valid for the given window.
80.SH RETURN VALUE
81All routines return the integer \fBERR\fR upon failure and an integer value
82other than \fBERR\fR upon successful completion, unless otherwise noted in the
83preceding routine descriptions.
84.PP
85X/Open does not define any error conditions.
86In this implementation
87.RS
88.TP 5
89\fBis_linetouched\fP
90returns an error
91if the window pointer is null, or
92if the line number is outside the window.
Steve Kondikae271bc2015-11-15 02:50:53 +010093Note that ERR is distinct from \fBTRUE\fP and \fBFALSE\fP, which are the normal return values of this function.
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053094.TP 5
95\fBwtouchln\fP
96returns an error
97if the window pointer is null, or
98if the line number is outside the window.
99.RE
100.SH PORTABILITY
101The XSI Curses standard, Issue 4 describes these functions.
102.PP
103Some historic curses implementations had, as an undocumented feature, the
104ability to do the equivalent of \fBclearok(..., 1)\fR by saying
105\fBtouchwin(stdscr)\fR or \fBclear(stdscr)\fR. This will not work under
106ncurses.
107.SH NOTES
108Note that all routines except \fBwtouchln\fR may be macros.
109.SH SEE ALSO
Steve Kondikae271bc2015-11-15 02:50:53 +0100110\fBcurses\fR(3X),
111\fBcurs_refresh\fR(3X),
112\fBcurs_variables\fR(3X).