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