xref: /minix3/lib/libcurses/curses_touch.3 (revision 51ffecc181005cb45a40108612ee28d1daaeeb86)
1*51ffecc1SBen Gras.\"	$NetBSD: curses_touch.3,v 1.8 2010/02/24 13:02:13 drochner Exp $
2*51ffecc1SBen Gras.\"
3*51ffecc1SBen Gras.\" Copyright (c) 2002
4*51ffecc1SBen Gras.\"	Brett Lymn (blymn@NetBSD.org, brett_lymn@yahoo.com.au)
5*51ffecc1SBen Gras.\"
6*51ffecc1SBen Gras.\" This code is donated to the NetBSD Foundation by the Author.
7*51ffecc1SBen Gras.\"
8*51ffecc1SBen Gras.\" Redistribution and use in source and binary forms, with or without
9*51ffecc1SBen Gras.\" modification, are permitted provided that the following conditions
10*51ffecc1SBen Gras.\" are met:
11*51ffecc1SBen Gras.\" 1. Redistributions of source code must retain the above copyright
12*51ffecc1SBen Gras.\"    notice, this list of conditions and the following disclaimer.
13*51ffecc1SBen Gras.\" 2. Redistributions in binary form must reproduce the above copyright
14*51ffecc1SBen Gras.\"    notice, this list of conditions and the following disclaimer in the
15*51ffecc1SBen Gras.\"    documentation and/or other materials provided with the distribution.
16*51ffecc1SBen Gras.\" 3. The name of the Author may not be used to endorse or promote
17*51ffecc1SBen Gras.\"    products derived from this software without specific prior written
18*51ffecc1SBen Gras.\"    permission.
19*51ffecc1SBen Gras.\"
20*51ffecc1SBen Gras.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND
21*51ffecc1SBen Gras.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22*51ffecc1SBen Gras.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
23*51ffecc1SBen Gras.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR BE LIABLE
24*51ffecc1SBen Gras.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
25*51ffecc1SBen Gras.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
26*51ffecc1SBen Gras.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
27*51ffecc1SBen Gras.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
28*51ffecc1SBen Gras.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
29*51ffecc1SBen Gras.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
30*51ffecc1SBen Gras.\" SUCH DAMAGE.
31*51ffecc1SBen Gras.\"
32*51ffecc1SBen Gras.\"
33*51ffecc1SBen Gras.Dd February 23, 2010
34*51ffecc1SBen Gras.Dt CURSES_TOUCH 3
35*51ffecc1SBen Gras.Os
36*51ffecc1SBen Gras.Sh NAME
37*51ffecc1SBen Gras.Nm curses_touch ,
38*51ffecc1SBen Gras.Nm touchline ,
39*51ffecc1SBen Gras.Nm touchoverlap ,
40*51ffecc1SBen Gras.Nm touchwin ,
41*51ffecc1SBen Gras.Nm untouchwin ,
42*51ffecc1SBen Gras.Nm wtouchln ,
43*51ffecc1SBen Gras.Nm is_linetouched ,
44*51ffecc1SBen Gras.Nm is_wintouched ,
45*51ffecc1SBen Gras.Nm redrawwin ,
46*51ffecc1SBen Gras.Nm wredrawln ,
47*51ffecc1SBen Gras.Nm wsyncup ,
48*51ffecc1SBen Gras.Nm wsyncdown
49*51ffecc1SBen Gras.Nd curses window modification routines
50*51ffecc1SBen Gras.Sh LIBRARY
51*51ffecc1SBen Gras.Lb libcurses
52*51ffecc1SBen Gras.Sh SYNOPSIS
53*51ffecc1SBen Gras.In curses.h
54*51ffecc1SBen Gras.Ft int
55*51ffecc1SBen Gras.Fn touchline "WINDOW *win" "int start" "int count"
56*51ffecc1SBen Gras.Ft int
57*51ffecc1SBen Gras.Fn touchoverlap "WINDOW *win1" "WINDOW *win2"
58*51ffecc1SBen Gras.Ft int
59*51ffecc1SBen Gras.Fn touchwin "WINDOW *win"
60*51ffecc1SBen Gras.Ft int
61*51ffecc1SBen Gras.Fn untouchwin "WINDOW *win"
62*51ffecc1SBen Gras.Ft int
63*51ffecc1SBen Gras.Fn wtouchln "WINDOW *win" "int line" "int n" "boolf changed"
64*51ffecc1SBen Gras.Ft bool
65*51ffecc1SBen Gras.Fn is_linetouched "WINDOW *win" "int line"
66*51ffecc1SBen Gras.Ft bool
67*51ffecc1SBen Gras.Fn is_wintouched "WINDOW *win"
68*51ffecc1SBen Gras.Ft int
69*51ffecc1SBen Gras.Fn redrawwin "WINDOW *win"
70*51ffecc1SBen Gras.Ft int
71*51ffecc1SBen Gras.Fn wredrawln "WINDOW *win" "int line" "int n"
72*51ffecc1SBen Gras.Ft void
73*51ffecc1SBen Gras.Fn wsyncup "WINDOW *win"
74*51ffecc1SBen Gras.Ft void
75*51ffecc1SBen Gras.Fn wsyncdown "WINDOW *win"
76*51ffecc1SBen Gras.Sh DESCRIPTION
77*51ffecc1SBen GrasThese functions mark lines and windows as modified and check the modification
78*51ffecc1SBen Grasstatus of lines and windows.
79*51ffecc1SBen Gras.Pp
80*51ffecc1SBen GrasThe
81*51ffecc1SBen Gras.Fn touchline
82*51ffecc1SBen Grasfunction marks
83*51ffecc1SBen Gras.Fa count
84*51ffecc1SBen Graslines starting from
85*51ffecc1SBen Gras.Fa start
86*51ffecc1SBen Grasin window
87*51ffecc1SBen Gras.Fa win
88*51ffecc1SBen Grasas having been modified.
89*51ffecc1SBen GrasThese characters will be synced to the terminal on the next call to
90*51ffecc1SBen Gras.Fn wrefresh .
91*51ffecc1SBen Gras.Pp
92*51ffecc1SBen GrasThe
93*51ffecc1SBen Gras.Fn touchoverlap
94*51ffecc1SBen Grasfunction marks the portion of
95*51ffecc1SBen Gras.Fa win2
96*51ffecc1SBen Grasthat overlaps
97*51ffecc1SBen Gras.Fa win1
98*51ffecc1SBen Grasas being modified.
99*51ffecc1SBen Gras.Pp
100*51ffecc1SBen GrasThe
101*51ffecc1SBen Gras.Fn touchwin
102*51ffecc1SBen Grasfunction marks the entire window
103*51ffecc1SBen Gras.Fa win
104*51ffecc1SBen Grasas having been modified.
105*51ffecc1SBen GrasConversely,
106*51ffecc1SBen Grasthe
107*51ffecc1SBen Gras.Fn untouchwin
108*51ffecc1SBen Grasfunction marks the window
109*51ffecc1SBen Gras.Fa win
110*51ffecc1SBen Grasas being unmodified, so that any changes made to that window will
111*51ffecc1SBen Grasnot be synced to the terminal during a
112*51ffecc1SBen Gras.Fn wrefresh .
113*51ffecc1SBen Gras.Pp
114*51ffecc1SBen GrasThe
115*51ffecc1SBen Gras.Fn wtouchln
116*51ffecc1SBen Grasfunction performs one of two operations on
117*51ffecc1SBen Gras.Fa n
118*51ffecc1SBen Graslines starting at
119*51ffecc1SBen Gras.Fa line
120*51ffecc1SBen Grasin the given window.
121*51ffecc1SBen GrasIf
122*51ffecc1SBen Gras.Fa changed
123*51ffecc1SBen Grasis 1 then the given line range is marked as being modified, if
124*51ffecc1SBen Gras.Fa changed
125*51ffecc1SBen Grasis 0 then the given line range is set to being unmodified.
126*51ffecc1SBen Gras.Pp
127*51ffecc1SBen GrasThe
128*51ffecc1SBen Gras.Fn is_linetouched
129*51ffecc1SBen Grasfunction returns
130*51ffecc1SBen Gras.Dv TRUE
131*51ffecc1SBen Grasif
132*51ffecc1SBen Gras.Fa line
133*51ffecc1SBen Grasin window
134*51ffecc1SBen Gras.Fa win
135*51ffecc1SBen Grashas been modified since the last refresh was done, otherwise
136*51ffecc1SBen Gras.Dv FALSE
137*51ffecc1SBen Grasis returned.
138*51ffecc1SBen Gras.Pp
139*51ffecc1SBen Gras.Fn is_wintouched
140*51ffecc1SBen Grasreturns
141*51ffecc1SBen Gras.Dv TRUE
142*51ffecc1SBen Grasif the window
143*51ffecc1SBen Gras.Fa win
144*51ffecc1SBen Grashas been modified since the last refresh, otherwise
145*51ffecc1SBen Gras.Dv FALSE
146*51ffecc1SBen Grasis returned.
147*51ffecc1SBen Gras.Pp
148*51ffecc1SBen GrasThe
149*51ffecc1SBen Gras.Fn redrawwin
150*51ffecc1SBen Grasfunction marks the entire window
151*51ffecc1SBen Gras.Fa win
152*51ffecc1SBen Grasas having been corrupted.
153*51ffecc1SBen GrasIs is equivalent to the
154*51ffecc1SBen Gras.Fn touchwin
155*51ffecc1SBen Grasfunction.
156*51ffecc1SBen Gras.Pp
157*51ffecc1SBen GrasThe
158*51ffecc1SBen Gras.Fn wredrawln
159*51ffecc1SBen Grasfunction marks
160*51ffecc1SBen Gras.Fa n
161*51ffecc1SBen Graslines starting at
162*51ffecc1SBen Gras.Fa line
163*51ffecc1SBen Grasin the given window as corrupted.
164*51ffecc1SBen GrasIt is equivalent to
165*51ffecc1SBen Gras.Fn wtouchln win line n 1 .
166*51ffecc1SBen Gras.Pp
167*51ffecc1SBen GrasThe
168*51ffecc1SBen Gras.Fn wsyncup
169*51ffecc1SBen Grasfunction touches all ancestors of
170*51ffecc1SBen Gras.Fa win .
171*51ffecc1SBen Gras.Pp
172*51ffecc1SBen GrasThe
173*51ffecc1SBen Gras.Fn wsyncdown
174*51ffecc1SBen Grasfunction touches
175*51ffecc1SBen Gras.Fa win
176*51ffecc1SBen Grasif any of its ancestors is touched.
177*51ffecc1SBen Gras.Sh RETURN VALUES
178*51ffecc1SBen GrasFunctions returning pointers will return
179*51ffecc1SBen Gras.Dv NULL
180*51ffecc1SBen Grasif an error is detected.
181*51ffecc1SBen GrasThe functions that return an int will return one of the following
182*51ffecc1SBen Grasvalues:
183*51ffecc1SBen Gras.Pp
184*51ffecc1SBen Gras.Bl -tag -width ERR -compact
185*51ffecc1SBen Gras.It Er OK
186*51ffecc1SBen GrasThe function completed successfully.
187*51ffecc1SBen Gras.It Er ERR
188*51ffecc1SBen GrasAn error occurred in the function.
189*51ffecc1SBen Gras.El
190*51ffecc1SBen Gras.Sh SEE ALSO
191*51ffecc1SBen Gras.Xr curses_refresh 3
192*51ffecc1SBen Gras.Sh STANDARDS
193*51ffecc1SBen GrasThe
194*51ffecc1SBen Gras.Nx
195*51ffecc1SBen GrasCurses library complies with the X/Open Curses specification, part of the
196*51ffecc1SBen GrasSingle Unix Specification.
197*51ffecc1SBen Gras.Sh HISTORY
198*51ffecc1SBen GrasThe Curses package appeared in
199*51ffecc1SBen Gras.Bx 4.0 .
200