1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
|
.\"***************************************************************************
.\" Copyright 2018,2020 Thomas E. Dickey *
.\" Copyright 1998-2015,2017 Free Software Foundation, Inc. *
.\" *
.\" Permission is hereby granted, free of charge, to any person obtaining a *
.\" copy of this software and associated documentation files (the *
.\" "Software"), to deal in the Software without restriction, including *
.\" without limitation the rights to use, copy, modify, merge, publish, *
.\" distribute, distribute with modifications, sublicense, and/or sell *
.\" copies of the Software, and to permit persons to whom the Software is *
.\" furnished to do so, subject to the following conditions: *
.\" *
.\" The above copyright notice and this permission notice shall be included *
.\" in all copies or substantial portions of the Software. *
.\" *
.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
.\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
.\" IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
.\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
.\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
.\" THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
.\" *
.\" Except as contained in this notice, the name(s) of the above copyright *
.\" holders shall not be used in advertising or otherwise to promote the *
.\" sale, use or other dealings in this Software without prior written *
.\" authorization. *
.\"***************************************************************************
.\"
.\" $Id: curs_touch.3x,v 1.22 2020/02/02 23:34:34 tom Exp $
.TH curs_touch 3X ""
.na
.hy 0
.SH NAME
\fBtouchwin\fR,
\fBtouchline\fR,
\fBuntouchwin\fR,
\fBwtouchln\fR,
\fBis_linetouched\fR,
\fBis_wintouched\fR \- \fBcurses\fR refresh control routines
.ad
.hy
.SH SYNOPSIS
\fB#include <curses.h>\fR
.br
\fBint touchwin(WINDOW *win);\fR
.br
\fBint touchline(WINDOW *win, int start, int count);\fR
.br
\fBint untouchwin(WINDOW *win);\fR
.br
\fBint wtouchln(WINDOW *win, int y, int n, int changed);\fR
.br
\fBbool is_linetouched(WINDOW *win, int line);\fR
.br
\fBbool is_wintouched(WINDOW *win);\fR
.br
.SH DESCRIPTION
The \fBtouchwin\fR and \fBtouchline\fR routines throw away all
optimization information about which parts of the window have been
touched, by pretending that the entire window has been drawn on.
This
is sometimes necessary when using overlapping windows, since a change
to one window affects the other window, but the records of which lines
have been changed in the other window do not reflect the change.
The
routine \fBtouchline\fR only pretends that \fIcount\fR lines have been
changed, beginning with line \fIstart\fR.
.PP
The \fBuntouchwin\fR routine marks all lines in the window as unchanged since
the last call to \fBwrefresh\fR.
.PP
The \fBwtouchln\fR routine makes \fIn\fR lines in the window, starting
at line \fIy\fR, look as if they have (\fIchanged\fR\fB=1\fR) or have
not (\fIchanged\fR\fB=0\fR) been changed since the last call to
\fBwrefresh\fR.
.PP
The \fBis_linetouched\fR and \fBis_wintouched\fR routines return
\fBTRUE\fR if the specified line/window was modified since the last
call to \fBwrefresh\fR; otherwise they return \fBFALSE\fR. In
addition, \fBis_linetouched\fR returns \fBERR\fR if \fIline\fR is not
valid for the given window.
.SH RETURN VALUE
All routines return the integer \fBERR\fR upon failure and an integer value
other than \fBERR\fR upon successful completion, unless otherwise noted in the
preceding routine descriptions.
.PP
X/Open does not define any error conditions.
In this implementation
.RS 3
.TP 5
\fBis_linetouched\fP
returns an error
if the window pointer is null, or
if the line number is outside the window.
.IP
The constant \fBERR\fP is distinct from \fBTRUE\fP and \fBFALSE\fP,
which are the normal return values of this function.
Because the function returns a \fBbool\fP,
returning \fBERR\fP (which is neither \fBTRUE\fP nor \fBFALSE\fP)
may not be supported by the compiler.
.IP
To provide error-checking and also match the X/Open function prototype,
the \fBERR\fP is provided by a macro named \fBis_linetouched\fP.
The actual function returns \fBFALSE\fP when it detects an error.
.TP 5
\fBwtouchln\fP
returns an error
if the window pointer is null, or
if the line number is outside the window.
.RE
.SH PORTABILITY
.PP
These functions were introduced by SVr4.
The Solaris curses header file,
for instance, defines both an actual function and macro for each.
The macros give the same result as the actual functions.
SVr4 curses does not check the window parameter \fIwin\fP to ensure
that it is not \fBNULL\fP;
otherwise this implementation behaves the same as SVr4.
.PP
The XSI Curses standard, Issue 4 describes these functions,
but defines no error conditions.
.SH NOTES
All of these routines except \fBwtouchln\fR may be macros.
.SH SEE ALSO
\fBcurses\fR(3X),
\fBcurs_refresh\fR(3X),
\fBcurs_variables\fR(3X).
|