]> ncurses.scripts.mit.edu Git - ncurses.git/blob - doc/html/man/curs_scroll.3x.html
ncurses 6.0 - patch 20150719
[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>
49 <H2><a name="h2-NAME">NAME</a></H2><PRE>
50        <STRONG>scroll</STRONG>, <STRONG>scrl</STRONG>, <STRONG>wscrl</STRONG> - scroll a <STRONG>curses</STRONG> window
51
52
53 </PRE>
54 <H2><a name="h2-SYNOPSIS">SYNOPSIS</a></H2><PRE>
55        <STRONG>#include</STRONG> <STRONG>&lt;curses.h&gt;</STRONG>
56
57        <STRONG>int</STRONG> <STRONG>scroll(WINDOW</STRONG> <STRONG>*win);</STRONG>
58        <STRONG>int</STRONG> <STRONG>scrl(int</STRONG> <STRONG>n);</STRONG>
59        <STRONG>int</STRONG> <STRONG>wscrl(WINDOW</STRONG> <STRONG>*win,</STRONG> <STRONG>int</STRONG> <STRONG>n);</STRONG>
60
61
62 </PRE>
63 <H2><a name="h2-DESCRIPTION">DESCRIPTION</a></H2><PRE>
64        The  <STRONG>scroll</STRONG>  routine scrolls the window up one line.  This
65        involves moving the lines in the  window  data  structure.
66        As  an optimization, if the scrolling region of the window
67        is the entire screen, the physical screen may be  scrolled
68        at the same time.
69
70        For  positive  <EM>n</EM>,  the  <STRONG>scrl</STRONG> and <STRONG>wscrl</STRONG> routines scroll the
71        window up <EM>n</EM> lines (line <EM>i</EM>+<EM>n</EM> becomes <EM>i</EM>);  otherwise  scroll
72        the  window  down <EM>n</EM> lines.  This involves moving the lines
73        in the window character image structure.  The current cur-
74        sor position is not changed.
75
76        For these functions to work, scrolling must be enabled via
77        <STRONG>scrollok</STRONG>.
78
79
80 </PRE>
81 <H2><a name="h2-RETURN-VALUE">RETURN VALUE</a></H2><PRE>
82        These routines return <STRONG>ERR</STRONG> upon failure, and <STRONG>OK</STRONG> (SVr4  only
83        specifies "an integer value other than <STRONG>ERR</STRONG>") upon success-
84        ful completion.
85
86        X/Open defines no error conditions.
87
88        This implementation returns an error if the window pointer
89        is  null,  or  if  scrolling is not enabled in the window,
90        e.g., with <STRONG>scrollok</STRONG>.
91
92
93 </PRE>
94 <H2><a name="h2-NOTES">NOTES</a></H2><PRE>
95        Note that <STRONG>scrl</STRONG> and <STRONG>scroll</STRONG> may be macros.
96
97        The SVr4 documentation says that the optimization of phys-
98        ically  scrolling  immediately if the scroll region is the
99        entire screen "is"  performed,  not  "may  be"  performed.
100        This  implementation  deliberately does not guarantee that
101        this will occur, to leave open the possibility of  smarter
102        optimization  of  multiple  scroll actions on the next up-
103        date.
104
105        Neither the SVr4 nor the XSI documentation specify whether
106        the current attribute or current color-pair of blanks gen-
107        erated by the scroll function is zeroed.  Under  this  im-
108        plementation it is.
109
110
111 </PRE>
112 <H2><a name="h2-PORTABILITY">PORTABILITY</a></H2><PRE>
113        The  XSI  Curses  standard,  Issue 4 describes these func-
114        tions.
115
116
117 </PRE>
118 <H2><a name="h2-SEE-ALSO">SEE ALSO</a></H2><PRE>
119        <STRONG><A HREF="ncurses.3x.html">curses(3x)</A></STRONG>, <STRONG><A HREF="curs_outopts.3x.html">curs_outopts(3x)</A></STRONG>
120
121
122
123                                                         <STRONG><A HREF="curs_scroll.3x.html">curs_scroll(3x)</A></STRONG>
124 </PRE>
125 <div class="nav">
126 <ul>
127 <li><a href="#h2-NAME">NAME</a></li>
128 <li><a href="#h2-SYNOPSIS">SYNOPSIS</a></li>
129 <li><a href="#h2-DESCRIPTION">DESCRIPTION</a></li>
130 <li><a href="#h2-RETURN-VALUE">RETURN VALUE</a></li>
131 <li><a href="#h2-NOTES">NOTES</a></li>
132 <li><a href="#h2-PORTABILITY">PORTABILITY</a></li>
133 <li><a href="#h2-SEE-ALSO">SEE ALSO</a></li>
134 </ul>
135 </div>
136 </BODY>
137 </HTML>