Deleted Added
full compact
curs_clear.3x (166124) curs_clear.3x (176187)
1.\"***************************************************************************
1.\"***************************************************************************
2.\" Copyright (c) 1998,2005 Free Software Foundation, Inc. *
2.\" Copyright (c) 1998-2005,2007 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.\"
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.10 2005/10/01 19:34:43 tom Exp $
29.\" $Id: curs_clear.3x,v 1.11 2007/12/29 15:58:38 tom Exp $
30.TH curs_clear 3X ""
31.na
32.hy 0
33.SH NAME
34\fBerase\fR,
35\fBwerase\fR,
36\fBclear\fR,
37\fBwclear\fR,
38\fBclrtobot\fR,
39\fBwclrtobot\fR,
40\fBclrtoeol\fR,
41\fBwclrtoeol\fR - clear all or part of a \fBcurses\fR window
42.ad
43.hy
44.SH SYNOPSIS
45\fB# include <curses.h>\fR
46.sp
47\fBint erase(void);\fR
48.br
49\fBint werase(WINDOW *win);\fR
50.br
51\fBint clear(void);\fR
52.br
53\fBint wclear(WINDOW *win);\fR
54.br
55\fBint clrtobot(void);\fR
56.br
57\fBint wclrtobot(WINDOW *win);\fR
58.br
59\fBint clrtoeol(void);\fR
60.br
61\fBint wclrtoeol(WINDOW *win);\fR
62.br
63.SH DESCRIPTION
64The \fBerase\fR and \fBwerase\fR routines copy blanks to every
65position in the window, clearing the screen.
66.PP
67The \fBclear\fR and \fBwclear\fR routines are like \fBerase\fR and
68\fBwerase\fR, but they also call \fBclearok\fR, so that the screen is
69cleared completely on the next call to \fBwrefresh\fR for that window
70and repainted from scratch.
71.PP
72The \fBclrtobot\fR and \fBwclrtobot\fR routines erase from the cursor to the
73end of screen. That is, they erase all lines below the cursor in the window.
74Also, the current line to the right of the cursor, inclusive, is erased.
75.PP
76The \fBclrtoeol\fR and \fBwclrtoeol\fR routines erase the current line
77to the right of the cursor, inclusive, to the end of the current line.
78.PP
79Blanks created by erasure have the current background rendition (as set
80by \fBwbkgdset\fR) merged into them.
81.SH RETURN VALUE
82All routines return the integer \fBOK\fR on success and \fBERR\fP on failure.
83The SVr4.0 manual says "or a
84non-negative integer if \fBimmedok\fR is set", but this appears to be an error.
85.PP
86X/Open defines no error conditions.
87In this implementation,
88functions using a window pointer parameter return an error if it is null.
89.SH NOTES
90Note that \fBerase\fR, \fBwerase\fR, \fBclear\fR, \fBwclear\fR,
91\fBclrtobot\fR, and \fBclrtoeol\fR may be macros.
92.SH PORTABILITY
93These functions are described in the XSI Curses standard, Issue 4. The
94standard specifies that they return \fBERR\fR on failure, but specifies no
95error conditions.
96.PP
97Some historic curses implementations had, as an undocumented feature, the
98ability to do the equivalent of \fBclearok(..., 1)\fR by saying
99\fBtouchwin(stdscr)\fR or \fBclear(stdscr)\fR. This will not work under
100ncurses.
101.PP
102This implementation, and others such as Solaris,
103sets the current position to 0,0 after erasing
104via \fBwerase()\fP and \fBwclear()\fP.
105That fact is not documented in other implementations,
106and may not be true of implementations
107which were not derived from SVr4 source.
30.TH curs_clear 3X ""
31.na
32.hy 0
33.SH NAME
34\fBerase\fR,
35\fBwerase\fR,
36\fBclear\fR,
37\fBwclear\fR,
38\fBclrtobot\fR,
39\fBwclrtobot\fR,
40\fBclrtoeol\fR,
41\fBwclrtoeol\fR - clear all or part of a \fBcurses\fR window
42.ad
43.hy
44.SH SYNOPSIS
45\fB# include <curses.h>\fR
46.sp
47\fBint erase(void);\fR
48.br
49\fBint werase(WINDOW *win);\fR
50.br
51\fBint clear(void);\fR
52.br
53\fBint wclear(WINDOW *win);\fR
54.br
55\fBint clrtobot(void);\fR
56.br
57\fBint wclrtobot(WINDOW *win);\fR
58.br
59\fBint clrtoeol(void);\fR
60.br
61\fBint wclrtoeol(WINDOW *win);\fR
62.br
63.SH DESCRIPTION
64The \fBerase\fR and \fBwerase\fR routines copy blanks to every
65position in the window, clearing the screen.
66.PP
67The \fBclear\fR and \fBwclear\fR routines are like \fBerase\fR and
68\fBwerase\fR, but they also call \fBclearok\fR, so that the screen is
69cleared completely on the next call to \fBwrefresh\fR for that window
70and repainted from scratch.
71.PP
72The \fBclrtobot\fR and \fBwclrtobot\fR routines erase from the cursor to the
73end of screen. That is, they erase all lines below the cursor in the window.
74Also, the current line to the right of the cursor, inclusive, is erased.
75.PP
76The \fBclrtoeol\fR and \fBwclrtoeol\fR routines erase the current line
77to the right of the cursor, inclusive, to the end of the current line.
78.PP
79Blanks created by erasure have the current background rendition (as set
80by \fBwbkgdset\fR) merged into them.
81.SH RETURN VALUE
82All routines return the integer \fBOK\fR on success and \fBERR\fP on failure.
83The SVr4.0 manual says "or a
84non-negative integer if \fBimmedok\fR is set", but this appears to be an error.
85.PP
86X/Open defines no error conditions.
87In this implementation,
88functions using a window pointer parameter return an error if it is null.
89.SH NOTES
90Note that \fBerase\fR, \fBwerase\fR, \fBclear\fR, \fBwclear\fR,
91\fBclrtobot\fR, and \fBclrtoeol\fR may be macros.
92.SH PORTABILITY
93These functions are described in the XSI Curses standard, Issue 4. The
94standard specifies that they return \fBERR\fR on failure, but specifies no
95error conditions.
96.PP
97Some historic curses implementations had, as an undocumented feature, the
98ability to do the equivalent of \fBclearok(..., 1)\fR by saying
99\fBtouchwin(stdscr)\fR or \fBclear(stdscr)\fR. This will not work under
100ncurses.
101.PP
102This implementation, and others such as Solaris,
103sets the current position to 0,0 after erasing
104via \fBwerase()\fP and \fBwclear()\fP.
105That fact is not documented in other implementations,
106and may not be true of implementations
107which were not derived from SVr4 source.
108.PP
109Not obvious from the description,
110most implementations clear the screen after \fBwclear\fP
111even for a subwindow or derived window.
112If you do not want to clear the screen during the next \fBwrefresh\fP,
113use \fBwerase\fP instead.
108.SH SEE ALSO
109\fBcurses\fR(3X), \fBcurs_outopts\fR(3X), \fBcurs_refresh\fR(3X)
110.\"#
111.\"# The following sets edit modes for GNU EMACS
112.\"# Local Variables:
113.\"# mode:nroff
114.\"# fill-column:79
115.\"# End:
114.SH SEE ALSO
115\fBcurses\fR(3X), \fBcurs_outopts\fR(3X), \fBcurs_refresh\fR(3X)
116.\"#
117.\"# The following sets edit modes for GNU EMACS
118.\"# Local Variables:
119.\"# mode:nroff
120.\"# fill-column:79
121.\"# End: