ncurses 5.4
[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 <STRONG><A HREF="curs_clear.3x.html">curs_clear(3x)</A></STRONG>                                     <STRONG><A HREF="curs_clear.3x.html">curs_clear(3x)</A></STRONG>
44
45
46
47
48 </PRE>
49 <H2>NAME</H2><PRE>
50        <STRONG>erase</STRONG>,  <STRONG>werase</STRONG>,  <STRONG>clear</STRONG>,  <STRONG>wclear</STRONG>, <STRONG>clrtobot</STRONG>, <STRONG>wclrtobot</STRONG>, <STRONG>clr-</STRONG>
51        <STRONG>toeol</STRONG>, <STRONG>wclrtoeol</STRONG> - clear all or part of a <STRONG>curses</STRONG> window
52
53
54 </PRE>
55 <H2>SYNOPSIS</H2><PRE>
56        <STRONG>#</STRONG> <STRONG>include</STRONG> <STRONG>&lt;curses.h&gt;</STRONG>
57
58        <STRONG>int</STRONG> <STRONG>erase(void);</STRONG>
59        <STRONG>int</STRONG> <STRONG>werase(WINDOW</STRONG> <STRONG>*win);</STRONG>
60        <STRONG>int</STRONG> <STRONG>clear(void);</STRONG>
61        <STRONG>int</STRONG> <STRONG>wclear(WINDOW</STRONG> <STRONG>*win);</STRONG>
62        <STRONG>int</STRONG> <STRONG>clrtobot(void);</STRONG>
63        <STRONG>int</STRONG> <STRONG>wclrtobot(WINDOW</STRONG> <STRONG>*win);</STRONG>
64        <STRONG>int</STRONG> <STRONG>clrtoeol(void);</STRONG>
65        <STRONG>int</STRONG> <STRONG>wclrtoeol(WINDOW</STRONG> <STRONG>*win);</STRONG>
66
67
68 </PRE>
69 <H2>DESCRIPTION</H2><PRE>
70        The <STRONG>erase</STRONG> and <STRONG>werase</STRONG> routines copy blanks to  every  posi-
71        tion in the window, clearing the screen.
72
73        The  <STRONG>clear</STRONG>  and <STRONG>wclear</STRONG> routines are like <STRONG>erase</STRONG> and <STRONG>werase</STRONG>,
74        but they also call <STRONG>clearok</STRONG>, so that the screen is  cleared
75        completely  on  the  next call to <STRONG>wrefresh</STRONG> for that window
76        and repainted from scratch.
77
78        The <STRONG>clrtobot</STRONG> and <STRONG>wclrtobot</STRONG> routines erase from the  cursor
79        to the end of screen.  That is, they erase all lines below
80        the cursor in the window.  Also, the current line  to  the
81        right of the cursor, inclusive, is erased.
82
83        The <STRONG>clrtoeol</STRONG> and <STRONG>wclrtoeol</STRONG> routines erase the current line
84        to the right of the cursor, inclusive, to the end  of  the
85        current line.
86
87        Blanks created by erasure have the current background ren-
88        dition (as set by <STRONG>wbkgdset</STRONG>) merged into them.
89
90
91 </PRE>
92 <H2>RETURN VALUE</H2><PRE>
93        All routines return the integer  <STRONG>OK</STRONG>.   The  SVr4.0  manual
94        says  "or  a  non-negative integer if <STRONG>immedok</STRONG> is set", but
95        this appears to be an error.
96
97
98 </PRE>
99 <H2>NOTES</H2><PRE>
100        Note that <STRONG>erase</STRONG>, <STRONG>werase</STRONG>, <STRONG>clear</STRONG>, <STRONG>wclear</STRONG>, <STRONG>clrtobot</STRONG>, and <STRONG>clr-</STRONG>
101        <STRONG>toeol</STRONG> may be macros.
102
103
104 </PRE>
105 <H2>PORTABILITY</H2><PRE>
106        These  functions are described in the XSI Curses standard,
107        Issue 4.  The standard specifies that they return  <STRONG>ERR</STRONG>  on
108        failure, but specifies no error conditions.
109
110        Some  historic  curses  implementations had, as an undocu-
111        mented feature,  the  ability  to  do  the  equivalent  of
112        <STRONG>clearok(...,</STRONG>  <STRONG>1)</STRONG>  by saying <STRONG>touchwin(stdscr)</STRONG> or <STRONG>clear(std-</STRONG>
113        <STRONG>scr)</STRONG>.  This will not work under ncurses.
114
115
116 </PRE>
117 <H2>SEE ALSO</H2><PRE>
118        <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>
119
120
121
122                                                    <STRONG><A HREF="curs_clear.3x.html">curs_clear(3x)</A></STRONG>
123 </PRE>
124 <HR>
125 <ADDRESS>
126 Man(1) output converted with
127 <a href="http://www.oac.uci.edu/indiv/ehood/man2html.html">man2html</a>
128 </ADDRESS>
129 </BODY>
130 </HTML>