1curs_touch(3X) curs_touch(3X)
2
3
4
6 touchwin, touchline, untouchwin, wtouchln, is_linetouched,
7 is_wintouched - curses refresh control routines
8
10 #include <curses.h>
11 int touchwin(WINDOW *win);
12 int touchline(WINDOW *win, int start, int count);
13 int untouchwin(WINDOW *win);
14 int wtouchln(WINDOW *win, int y, int n, int changed);
15 bool is_linetouched(WINDOW *win, int line);
16 bool is_wintouched(WINDOW *win);
17
19 The touchwin and touchline routines throw away all optimization infor‐
20 mation about which parts of the window have been touched, by pretending
21 that the entire window has been drawn on. This is sometimes necessary
22 when using overlapping windows, since a change to one window affects
23 the other window, but the records of which lines have been changed in
24 the other window do not reflect the change. The routine touchline only
25 pretends that count lines have been changed, beginning with line start.
26
27 The untouchwin routine marks all lines in the window as unchanged since
28 the last call to wrefresh.
29
30 The wtouchln routine makes n lines in the window, starting at line y,
31 look as if they have (changed=1) or have not (changed=0) been changed
32 since the last call to wrefresh.
33
34 The is_linetouched and is_wintouched routines return TRUE if the speci‐
35 fied line/window was modified since the last call to wrefresh; other‐
36 wise they return FALSE. In addition, is_linetouched returns ERR if
37 line is not valid for the given window.
38
40 All routines return the integer ERR upon failure and an integer value
41 other than ERR upon successful completion, unless otherwise noted in
42 the preceding routine descriptions.
43
44 X/Open does not define any error conditions. In this implementation
45
46 is_linetouched
47 returns an error if the window pointer is null, or if the
48 line number is outside the window. Note that ERR is dis‐
49 tinct from TRUE and FALSE, which are the normal return val‐
50 ues of this function.
51
52 wtouchln
53 returns an error if the window pointer is null, or if the
54 line number is outside the window.
55
57 The XSI Curses standard, Issue 4 describes these functions.
58
59 Some historic curses implementations had, as an undocumented feature,
60 the ability to do the equivalent of clearok(..., 1) by saying touch‐
61 win(stdscr) or clear(stdscr). This will not work under ncurses.
62
64 Note that all routines except wtouchln may be macros.
65
67 curses(3X), curs_refresh(3X).
68
69
70
71 curs_touch(3X)