]> ncurses.scripts.mit.edu Git - ncurses.git/blob - man/curs_touch.3x
ncurses 4.1
[ncurses.git] / man / curs_touch.3x
1 .TH curs_touch 3X ""
2 .SH NAME
3 \fBtouchwin\fR, \fBtouchline\fR, \fBuntouchwin\fR,
4 \fBwtouchln\fR, \fBis_linetouched\fR, \fBis_wintouched\fR -
5 \fBcurses\fR refresh control routines
6 .SH SYNOPSIS
7 \fB#include <curses.h>\fR
8 .br
9 \fBint touchwin(WINDOW *win);\fR
10 .br
11 \fBint touchline(WINDOW *win, int start, int count);\fR
12 .br
13 \fBint untouchwin(WINDOW *win);\fR
14 .br
15 \fBint wtouchln(WINDOW *win, int y, int n, int changed);\fR
16 .br
17 \fBint is_linetouched(WINDOW *win, int line);\fR
18 .br
19 \fBint is_wintouched(WINDOW *win);\fR
20 .br
21 .SH DESCRIPTION
22 The \fBtouchwin\fR and \fBtouchline\fR routines throw away all
23 optimization information about which parts of the window have been
24 touched, by pretending that the entire window has been drawn on.  This
25 is sometimes necessary when using overlapping windows, since a change
26 to one window affects the other window, but the records of which lines
27 have been changed in the other window do not reflect the change.  The
28 routine \fBtouchline\fR only pretends that \fIcount\fR lines have been
29 changed, beginning with line \fIstart\fR.
30
31 The \fBuntouchwin\fR routine marks all lines in the window as unchanged since
32 the last call to \fBwrefresh\fR.
33
34 The \fBwtouchln\fR routine makes \fIn\fR lines in the window, starting
35 at line \fIy\fR, look as if they have (\fIchanged\fR\fB=1\fR) or have
36 not (\fIchanged\fR\fB=0\fR) been changed since the last call to
37 \fBwrefresh\fR.
38
39 The \fBis_linetouched\fR and \fBis_wintouched\fR routines return
40 \fBTRUE\fR if the specified line/window was modified since the last
41 call to \fBwrefresh\fR; otherwise they return \fBFALSE\fR.  In
42 addition, \fBis_linetouched\fR returns \fBERR\fR if \fIline\fR is not
43 valid for the given window.
44 .SH RETURN VALUE
45 All routines return the integer \fBERR\fR upon failure and an integer value
46 other than \fBERR\fR upon successful completion, unless otherwise noted in the
47 preceding routine descriptions.
48 .SH PORTABILITY
49 The XSI Curses standard, Issue 4 describes these functions.
50
51 Some historic curses implementations had, as an undocumented feature, the
52 ability to do the equivalent of \fBclearok(..., 1)\fR by saying
53 \fBtouchwin(stdscr)\fR or \fBclear(stdscr)\fR.  This will not work under
54 ncurses.
55 .SH NOTES
56 Note that all routines except \fBwtouchln\fR may be macros.
57 .SH SEE ALSO
58 \fBcurses\fR(3X), \fBcurs_refresh\fR(3X).
59 .\"#
60 .\"# The following sets edit modes for GNU EMACS
61 .\"# Local Variables:
62 .\"# mode:nroff
63 .\"# fill-column:79
64 .\"# End: