]> ncurses.scripts.mit.edu Git - ncurses.git/blob - man/curs_clear.3x
ncurses 5.2
[ncurses.git] / man / curs_clear.3x
1 .\"***************************************************************************
2 .\" Copyright (c) 1998 Free Software Foundation, Inc.                        *
3 .\"                                                                          *
4 .\" Permission is hereby granted, free of charge, to any person obtaining a  *
5 .\" copy of this software and associated documentation files (the            *
6 .\" "Software"), to deal in the Software without restriction, including      *
7 .\" without limitation the rights to use, copy, modify, merge, publish,      *
8 .\" distribute, distribute with modifications, sublicense, and/or sell       *
9 .\" copies of the Software, and to permit persons to whom the Software is    *
10 .\" furnished to do so, subject to the following conditions:                 *
11 .\"                                                                          *
12 .\" The above copyright notice and this permission notice shall be included  *
13 .\" in all copies or substantial portions of the Software.                   *
14 .\"                                                                          *
15 .\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS  *
16 .\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF               *
17 .\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.   *
18 .\" IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,   *
19 .\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR    *
20 .\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR    *
21 .\" THE USE OR OTHER DEALINGS IN THE SOFTWARE.                               *
22 .\"                                                                          *
23 .\" Except as contained in this notice, the name(s) of the above copyright   *
24 .\" holders shall not be used in advertising or otherwise to promote the     *
25 .\" sale, use or other dealings in this Software without prior written       *
26 .\" authorization.                                                           *
27 .\"***************************************************************************
28 .\"
29 .\" $Id: curs_clear.3x,v 1.7 1998/03/11 21:12:53 juergen Exp $
30 .TH curs_clear 3X ""
31 .SH NAME
32 \fBerase\fR, \fBwerase\fR, \fBclear\fR,
33 \fBwclear\fR, \fBclrtobot\fR, \fBwclrtobot\fR, \fBclrtoeol\fR,
34 \fBwclrtoeol\fR - clear all or part of a \fBcurses\fR window
35 .SH SYNOPSIS
36 \fB# include <curses.h>\fR
37
38 \fBint erase(void);\fR
39 .br
40 \fBint werase(WINDOW *win);\fR
41 .br
42 \fBint clear(void);\fR
43 .br
44 \fBint wclear(WINDOW *win);\fR
45 .br
46 \fBint clrtobot(void);\fR
47 .br
48 \fBint wclrtobot(WINDOW *win);\fR
49 .br
50 \fBint clrtoeol(void);\fR
51 .br
52 \fBint wclrtoeol(WINDOW *win);\fR
53 .br
54 .SH DESCRIPTION
55 The \fBerase\fR and \fBwerase\fR routines copy blanks to every
56 position in the window, clearing the screen.
57
58 The \fBclear\fR and \fBwclear\fR routines are like \fBerase\fR and
59 \fBwerase\fR, but they also call \fBclearok\fR, so that the screen is
60 cleared completely on the next call to \fBwrefresh\fR for that window
61 and repainted from scratch.
62
63 The \fBclrtobot\fR and \fBwclrtobot\fR routines erase from the cursor to the
64 end of screen.  That is, they erase all lines below the cursor in the window.
65 Also, the current line to the right of the cursor, inclusive, is erased.
66
67 The \fBclrtoeol\fR and \fBwclrtoeol\fR routines erase the current line
68 to the right of the cursor, inclusive, to the end of the current line.
69
70 Blanks created by erasure have the current background rendition (as set
71 by \fBwbkgdset\fR) merged into them.
72 .SH RETURN VALUE
73 All routines return the integer \fBOK\fR.  The SVr4.0 manual says "or a
74 non-negative integer if \fBimmedok\fR is set", but this appears to be an error.
75 .SH NOTES
76 Note that \fBerase\fR, \fBwerase\fR, \fBclear\fR, \fBwclear\fR,
77 \fBclrtobot\fR, and \fBclrtoeol\fR may be macros.
78 .SH PORTABILITY
79 These functions are described in the XSI Curses standard, Issue 4.  The
80 standard specifies that they return \fBERR\fR on failure, but specifies no
81 error conditions.
82
83 Some historic curses implementations had, as an undocumented feature, the
84 ability to do the equivalent of \fBclearok(..., 1)\fR by saying
85 \fBtouchwin(stdscr)\fR or \fBclear(stdscr)\fR.  This will not work under
86 ncurses.
87 .SH SEE ALSO
88 \fBcurses\fR(3X), \fBcurs_outopts\fR(3X), \fBcurs_refresh\fR(3X)
89 .\"#
90 .\"# The following sets edit modes for GNU EMACS
91 .\"# Local Variables:
92 .\"# mode:nroff
93 .\"# fill-column:79
94 .\"# End: