]> ncurses.scripts.mit.edu Git - ncurses.git/blob - doc/html/man/curs_scroll.3x.html
ncurses 6.0 - patch 20170318
[ncurses.git] / doc / html / man / curs_scroll.3x.html
1 <!-- 
2   ****************************************************************************
3   * Copyright (c) 1998-2006,2010 Free Software Foundation, Inc.              *
4   *                                                                          *
5   * Permission is hereby granted, free of charge, to any person obtaining a  *
6   * copy of this software and associated documentation files (the            *
7   * "Software"), to deal in the Software without restriction, including      *
8   * without limitation the rights to use, copy, modify, merge, publish,      *
9   * distribute, distribute with modifications, sublicense, and/or sell       *
10   * copies of the Software, and to permit persons to whom the Software is    *
11   * furnished to do so, subject to the following conditions:                 *
12   *                                                                          *
13   * The above copyright notice and this permission notice shall be included  *
14   * in all copies or substantial portions of the Software.                   *
15   *                                                                          *
16   * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS  *
17   * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF               *
18   * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.   *
19   * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,   *
20   * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR    *
21   * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR    *
22   * THE USE OR OTHER DEALINGS IN THE SOFTWARE.                               *
23   *                                                                          *
24   * Except as contained in this notice, the name(s) of the above copyright   *
25   * holders shall not be used in advertising or otherwise to promote the     *
26   * sale, use or other dealings in this Software without prior written       *
27   * authorization.                                                           *
28   ****************************************************************************
29   * @Id: curs_scroll.3x,v 1.15 2010/12/04 18:40:45 tom Exp @
30 -->
31 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN">
32 <HTML>
33 <HEAD>
34 <meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
35 <meta name="generator" content="Manpage converted by man2html - see http://invisible-island.net/scripts/readme.html#others_scripts">
36 <TITLE>curs_scroll 3x</TITLE>
37 <link rev=made href="mailto:bug-ncurses@gnu.org">
38 <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
39 </HEAD>
40 <BODY>
41 <H1 class="no-header">curs_scroll 3x</H1>
42 <PRE>
43 <STRONG><A HREF="curs_scroll.3x.html">curs_scroll(3x)</A></STRONG>                                         <STRONG><A HREF="curs_scroll.3x.html">curs_scroll(3x)</A></STRONG>
44
45
46
47
48 </PRE><H2><a name="h2-NAME">NAME</a></H2><PRE>
49        <STRONG>scroll</STRONG>, <STRONG>scrl</STRONG>, <STRONG>wscrl</STRONG> - scroll a <STRONG>curses</STRONG> window
50
51
52 </PRE><H2><a name="h2-SYNOPSIS">SYNOPSIS</a></H2><PRE>
53        <STRONG>#include</STRONG> <STRONG>&lt;curses.h&gt;</STRONG>
54
55        <STRONG>int</STRONG> <STRONG>scroll(WINDOW</STRONG> <STRONG>*win);</STRONG>
56        <STRONG>int</STRONG> <STRONG>scrl(int</STRONG> <STRONG>n);</STRONG>
57        <STRONG>int</STRONG> <STRONG>wscrl(WINDOW</STRONG> <STRONG>*win,</STRONG> <STRONG>int</STRONG> <STRONG>n);</STRONG>
58
59
60 </PRE><H2><a name="h2-DESCRIPTION">DESCRIPTION</a></H2><PRE>
61        The  <STRONG>scroll</STRONG>  routine scrolls the window up one line.  This
62        involves moving the lines in the  window  data  structure.
63        As  an optimization, if the scrolling region of the window
64        is the entire screen, the physical screen may be  scrolled
65        at the same time.
66
67        For  positive  <EM>n</EM>,  the  <STRONG>scrl</STRONG> and <STRONG>wscrl</STRONG> routines scroll the
68        window up <EM>n</EM> lines (line <EM>i</EM>+<EM>n</EM> becomes <EM>i</EM>);  otherwise  scroll
69        the  window  down <EM>n</EM> lines.  This involves moving the lines
70        in the window character image structure.  The current cur-
71        sor position is not changed.
72
73        For these functions to work, scrolling must be enabled via
74        <STRONG>scrollok</STRONG>.
75
76
77 </PRE><H2><a name="h2-RETURN-VALUE">RETURN VALUE</a></H2><PRE>
78        These routines return <STRONG>ERR</STRONG> upon failure, and <STRONG>OK</STRONG> (SVr4  only
79        specifies "an integer value other than <STRONG>ERR</STRONG>") upon success-
80        ful completion.
81
82        X/Open defines no error conditions.
83
84        This implementation returns an error if the window pointer
85        is  null,  or  if  scrolling is not enabled in the window,
86        e.g., with <STRONG>scrollok</STRONG>.
87
88
89 </PRE><H2><a name="h2-NOTES">NOTES</a></H2><PRE>
90        Note that <STRONG>scrl</STRONG> and <STRONG>scroll</STRONG> may be macros.
91
92        The SVr4 documentation says that the optimization of phys-
93        ically  scrolling  immediately if the scroll region is the
94        entire screen "is"  performed,  not  "may  be"  performed.
95        This  implementation  deliberately does not guarantee that
96        this will occur, to leave open the possibility of  smarter
97        optimization  of  multiple  scroll actions on the next up-
98        date.
99
100        Neither the SVr4 nor the XSI documentation specify whether
101        the current attribute or current color-pair of blanks gen-
102        erated by the scroll function is zeroed.  Under  this  im-
103        plementation it is.
104
105
106 </PRE><H2><a name="h2-PORTABILITY">PORTABILITY</a></H2><PRE>
107        The  XSI  Curses  standard,  Issue 4 describes these func-
108        tions.
109
110
111 </PRE><H2><a name="h2-SEE-ALSO">SEE ALSO</a></H2><PRE>
112        <STRONG><A HREF="ncurses.3x.html">curses(3x)</A></STRONG>, <STRONG><A HREF="curs_outopts.3x.html">curs_outopts(3x)</A></STRONG>
113
114
115
116                                                         <STRONG><A HREF="curs_scroll.3x.html">curs_scroll(3x)</A></STRONG>
117 </PRE>
118 <div class="nav">
119 <ul>
120 <li><a href="#h2-NAME">NAME</a></li>
121 <li><a href="#h2-SYNOPSIS">SYNOPSIS</a></li>
122 <li><a href="#h2-DESCRIPTION">DESCRIPTION</a></li>
123 <li><a href="#h2-RETURN-VALUE">RETURN VALUE</a></li>
124 <li><a href="#h2-NOTES">NOTES</a></li>
125 <li><a href="#h2-PORTABILITY">PORTABILITY</a></li>
126 <li><a href="#h2-SEE-ALSO">SEE ALSO</a></li>
127 </ul>
128 </div>
129 </BODY>
130 </HTML>