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
12 int touchline(WINDOW *win, int start, int count);
13
14 int touchwin(WINDOW *win);
15 int wtouchln(WINDOW *win, int y, int n, int changed);
16
17 int untouchwin(WINDOW *win);
18
19 bool is_linetouched(WINDOW *win, int line);
20 bool is_wintouched(WINDOW *win);
21
23 The touchwin and touchline routines throw away all optimization infor‐
24 mation about which parts of the window have been touched, by pretending
25 that the entire window has been drawn on. This is sometimes necessary
26 when using overlapping windows, since a change to one window affects
27 the other window, but the records of which lines have been changed in
28 the other window do not reflect the change. The routine touchline only
29 pretends that count lines have been changed, beginning with line start.
30
31 The untouchwin routine marks all lines in the window as unchanged since
32 the last call to wrefresh.
33
34 The wtouchln routine makes n lines in the window, starting at line y,
35 look as if they have (changed=1) or have not (changed=0) been changed
36 since the last call to wrefresh.
37
38 The is_linetouched and is_wintouched routines return TRUE if the speci‐
39 fied line/window was modified since the last call to wrefresh; other‐
40 wise they return FALSE. In addition, is_linetouched returns ERR if
41 line is not valid for the given window.
42
44 All routines return the integer ERR upon failure and an integer value
45 other than ERR upon successful completion, unless otherwise noted in
46 the preceding routine descriptions.
47
48 X/Open does not define any error conditions. In this implementation
49
50 is_linetouched
51 returns an error if the window pointer is null, or if the line
52 number is outside the window.
53
54 The constant ERR is distinct from TRUE and FALSE, which are the
55 normal return values of this function. Because the function
56 returns a bool, returning ERR (which is neither TRUE nor FALSE)
57 may not be supported by the compiler.
58
59 To provide error-checking and also match the X/Open function
60 prototype, the ERR is provided by a macro named is_linetouched.
61 The actual function returns FALSE when it detects an error.
62
63 wtouchln
64 returns an error if the window pointer is null, or if the line
65 number is outside the window.
66
68 These functions were introduced by SVr4. The Solaris curses header
69 file, for instance, defines both an actual function and macro for each.
70 The macros give the same result as the actual functions. SVr4 curses
71 does not check the window parameter win to ensure that it is not NULL;
72 otherwise this implementation behaves the same as SVr4.
73
74 The XSI Curses standard, Issue 4 describes these functions, but defines
75 no error conditions.
76
78 All of these routines except wtouchln may be macros.
79
81 curses(3X), curs_refresh(3X), curs_variables(3X).
82
83
84
85 curs_touch(3X)