1 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
3 ****************************************************************************
4 * Copyright (c) 1998 Free Software Foundation, Inc. *
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: *
14 * The above copyright notice and this permission notice shall be included *
15 * in all copies or substantial portions of the Software. *
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. *
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 *
29 ****************************************************************************
30 * @Id: curs_clear.3x,v 1.7 1998/03/11 21:12:53 juergen Exp @
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">
39 <H1>curs_clear 3x</H1>
42 <!-- Manpage converted by man2html 3.0.1 -->
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
51 <H2>SYNOPSIS</H2><PRE>
52 <STRONG>#</STRONG> <STRONG>include</STRONG> <STRONG><curses.h></STRONG>
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>
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.
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.
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.
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
83 Blanks created by erasure have the current background ren-
84 dition (as set by <STRONG>wbkgdset</STRONG>) merged into them.
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.
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.
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.
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.
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>
168 Man(1) output converted with
169 <a href="http://www.oac.uci.edu/indiv/ehood/man2html.html">man2html</a>