ncurses 5.3
[ncurses.git] / doc / html / man / curs_clear.3x.html
1 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
2 <!-- 
3   ****************************************************************************
4   * Copyright (c) 1998 Free Software Foundation, Inc.                        *
5   *                                                                          *
6   * Permission is hereby granted, free of charge, to any person obtaining a  *
7   * copy of this software and associated documentation files (the            *
8   * "Software"), to deal in the Software without restriction, including      *
9   * without limitation the rights to use, copy, modify, merge, publish,      *
10   * distribute, distribute with modifications, sublicense, and/or sell       *
11   * copies of the Software, and to permit persons to whom the Software is    *
12   * furnished to do so, subject to the following conditions:                 *
13   *                                                                          *
14   * The above copyright notice and this permission notice shall be included  *
15   * in all copies or substantial portions of the Software.                   *
16   *                                                                          *
17   * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS  *
18   * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF               *
19   * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.   *
20   * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,   *
21   * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR    *
22   * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR    *
23   * THE USE OR OTHER DEALINGS IN THE SOFTWARE.                               *
24   *                                                                          *
25   * Except as contained in this notice, the name(s) of the above copyright   *
26   * holders shall not be used in advertising or otherwise to promote the     *
27   * sale, use or other dealings in this Software without prior written       *
28   * authorization.                                                           *
29   ****************************************************************************
30   * @Id: curs_clear.3x,v 1.7 1998/03/11 21:12:53 juergen Exp @
31 -->
32 <HTML>
33 <HEAD>
34 <TITLE>curs_clear 3x</TITLE>
35 <link rev=made href="mailto:bug-ncurses@gnu.org">
36 <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
37 </HEAD>
38 <BODY>
39 <H1>curs_clear 3x</H1>
40 <HR>
41 <PRE>
42 <!-- Manpage converted by man2html 3.0.1 -->
43
44 </PRE>
45 <H2>NAME</H2><PRE>
46        <STRONG>erase</STRONG>,  <STRONG>werase</STRONG>,  <STRONG>clear</STRONG>,  <STRONG>wclear</STRONG>, <STRONG>clrtobot</STRONG>, <STRONG>wclrtobot</STRONG>, <STRONG>clr-</STRONG>
47        <STRONG>toeol</STRONG>, <STRONG>wclrtoeol</STRONG> - clear all or part of a <STRONG>curses</STRONG> window
48
49
50 </PRE>
51 <H2>SYNOPSIS</H2><PRE>
52        <STRONG>#</STRONG> <STRONG>include</STRONG> <STRONG>&lt;curses.h&gt;</STRONG>
53
54        <STRONG>int</STRONG> <STRONG>erase(void);</STRONG>
55        <STRONG>int</STRONG> <STRONG>werase(WINDOW</STRONG> <STRONG>*win);</STRONG>
56        <STRONG>int</STRONG> <STRONG>clear(void);</STRONG>
57        <STRONG>int</STRONG> <STRONG>wclear(WINDOW</STRONG> <STRONG>*win);</STRONG>
58        <STRONG>int</STRONG> <STRONG>clrtobot(void);</STRONG>
59        <STRONG>int</STRONG> <STRONG>wclrtobot(WINDOW</STRONG> <STRONG>*win);</STRONG>
60        <STRONG>int</STRONG> <STRONG>clrtoeol(void);</STRONG>
61        <STRONG>int</STRONG> <STRONG>wclrtoeol(WINDOW</STRONG> <STRONG>*win);</STRONG>
62
63
64 </PRE>
65 <H2>DESCRIPTION</H2><PRE>
66        The <STRONG>erase</STRONG> and <STRONG>werase</STRONG> routines copy blanks to  every  posi-
67        tion in the window, clearing the screen.
68
69        The  <STRONG>clear</STRONG>  and <STRONG>wclear</STRONG> routines are like <STRONG>erase</STRONG> and <STRONG>werase</STRONG>,
70        but they also call <STRONG>clearok</STRONG>, so that the screen is  cleared
71        completely  on  the  next call to <STRONG>wrefresh</STRONG> for that window
72        and repainted from scratch.
73
74        The <STRONG>clrtobot</STRONG> and <STRONG>wclrtobot</STRONG> routines erase from the  cursor
75        to the end of screen.  That is, they erase all lines below
76        the cursor in the window.  Also, the current line  to  the
77        right of the cursor, inclusive, is erased.
78
79        The <STRONG>clrtoeol</STRONG> and <STRONG>wclrtoeol</STRONG> routines erase the current line
80        to the right of the cursor, inclusive, to the end  of  the
81        current line.
82
83        Blanks created by erasure have the current background ren-
84        dition (as set by <STRONG>wbkgdset</STRONG>) merged into them.
85
86
87 </PRE>
88 <H2>RETURN VALUE</H2><PRE>
89        All routines return the integer  <STRONG>OK</STRONG>.   The  SVr4.0  manual
90        says  "or  a  non-negative integer if <STRONG>immedok</STRONG> is set", but
91        this appears to be an error.
92
93
94 </PRE>
95 <H2>NOTES</H2><PRE>
96        Note that <STRONG>erase</STRONG>, <STRONG>werase</STRONG>, <STRONG>clear</STRONG>, <STRONG>wclear</STRONG>, <STRONG>clrtobot</STRONG>, and <STRONG>clr-</STRONG>
97        <STRONG>toeol</STRONG> may be macros.
98
99
100 </PRE>
101 <H2>PORTABILITY</H2><PRE>
102        These  functions are described in the XSI Curses standard,
103        Issue 4.  The standard specifies that they return  <STRONG>ERR</STRONG>  on
104        failure, but specifies no error conditions.
105
106        Some  historic  curses  implementations had, as an undocu-
107        mented feature,  the  ability  to  do  the  equivalent  of
108        <STRONG>clearok(...,</STRONG>    <STRONG>1)</STRONG>    by    saying   <STRONG>touchwin(stdscr)</STRONG>   or
109        <STRONG>clear(stdscr)</STRONG>.  This will not work under ncurses.
110
111
112 </PRE>
113 <H2>SEE ALSO</H2><PRE>
114        <STRONG><A HREF="ncurses.3x.html">curses(3x)</A></STRONG>, <STRONG><A HREF="curs_outopts.3x.html">curs_outopts(3x)</A></STRONG>, <STRONG><A HREF="curs_refresh.3x.html">curs_refresh(3x)</A></STRONG>
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165 </PRE>
166 <HR>
167 <ADDRESS>
168 Man(1) output converted with
169 <a href="http://www.oac.uci.edu/indiv/ehood/man2html.html">man2html</a>
170 </ADDRESS>
171 </BODY>
172 </HTML>