]> ncurses.scripts.mit.edu Git - ncurses.git/blob - man/curs_clear.3x
1a9efb7ce153b825af30fef805d1312ae9c7188e
[ncurses.git] / man / curs_clear.3x
1 .TH curs_clear 3X ""
2 .SH NAME
3 \fBerase\fR, \fBwerase\fR, \fBclear\fR,
4 \fBwclear\fR, \fBclrtobot\fR, \fBwclrtobot\fR, \fBclrtoeol\fR,
5 \fBwclrtoeol\fR - clear all or part of a \fBcurses\fR window
6 .SH SYNOPSIS
7 \fB# include <curses.h>\fR
8
9 \fBint erase(void);\fR
10 .br
11 \fBint werase(WINDOW *win);\fR
12 .br
13 \fBint clear(void);\fR
14 .br
15 \fBint wclear(WINDOW *win);\fR
16 .br
17 \fBint clrtobot(void);\fR
18 .br
19 \fBint wclrtobot(WINDOW *win);\fR
20 .br
21 \fBint clrtoeol(void);\fR
22 .br
23 \fBint wclrtoeol(WINDOW *win);\fR
24 .br
25 .SH DESCRIPTION
26 The \fBerase\fR and \fBwerase\fR routines copy blanks to every
27 position in the window, clearing the screen.
28
29 The \fBclear\fR and \fBwclear\fR routines are like \fBerase\fR and
30 \fBwerase\fR, but they also call \fBclearok\fR, so that the screen is
31 cleared completely on the next call to \fBwrefresh\fR for that window
32 and repainted from scratch.
33
34 The \fBclrtobot\fR and \fBwclrtobot\fR routines erase from the cursor to the
35 end of screen.  That is, they erase all lines below the cursor in the window.
36 Also, the current line to the right of the cursor, inclusive, is erased.
37
38 The \fBclrtoeol\fR and \fBwclrtoeol\fR routines erase the current line
39 to the right of the cursor, inclusive, to the end of the current line.
40
41 Blanks created by erasure have the current background rendition (as set
42 by \fBwbkgdset\fR) merged into them.
43 .SH RETURN VALUE
44 All routines return the integer \fBOK\fR.  The SVr4.0 manual says "or a
45 non-negative integer if \fBimmedok\fR is set", but this appears to be an error.
46 .SH NOTES
47 Note that \fBerase\fR, \fBwerase\fR, \fBclear\fR, \fBwclear\fR,
48 \fBclrtobot\fR, and \fBclrtoeol\fR may be macros.
49 .SH PORTABILITY
50 These functions are described in the XSI Curses standard, Issue 4.  The
51 standard specifies that they return \fBERR\fR on failure, but specifies no
52 error conditions.
53
54 Some historic curses implementations had, as an undocumented feature, the
55 ability to do the equivalent of \fBclearok(..., 1)\fR by saying
56 \fBtouchwin(stdscr)\fR or \fBclear(stdscr)\fR.  This will not work under
57 ncurses.
58 .SH SEE ALSO
59 \fBcurses\fR(3X), \fBcurs_outopts\fR(3X), \fBcurs_refresh\fR(3X)
60 .\"#
61 .\"# The following sets edit modes for GNU EMACS
62 .\"# Local Variables:
63 .\"# mode:nroff
64 .\"# fill-column:79
65 .\"# End: