]> ncurses.scripts.mit.edu Git - ncurses.git/blob - doc/html/man/curs_scroll.3x.html
0cf24bebb6c43f3a3d672b64e33756882e3e413e
[ncurses.git] / doc / html / man / curs_scroll.3x.html
1 <!--
2   ****************************************************************************
3   * Copyright 2018-2019,2020 Thomas E. Dickey                                *
4   * Copyright 1998-2006,2010 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_scroll.3x,v 1.19 2020/10/24 09:45:48 tom Exp @
31 -->
32 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN">
33 <HTML>
34 <HEAD>
35 <meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
36 <meta name="generator" content="Manpage converted by man2html - see https://invisible-island.net/scripts/readme.html#others_scripts">
37 <TITLE>curs_scroll 3x</TITLE>
38 <link rel="author" href="mailto:bug-ncurses@gnu.org">
39 <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
40 </HEAD>
41 <BODY>
42 <H1 class="no-header">curs_scroll 3x</H1>
43 <PRE>
44 <STRONG><A HREF="curs_scroll.3x.html">curs_scroll(3x)</A></STRONG>                                                <STRONG><A HREF="curs_scroll.3x.html">curs_scroll(3x)</A></STRONG>
45
46
47
48
49 </PRE><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><H2><a name="h2-SYNOPSIS">SYNOPSIS</a></H2><PRE>
54        <STRONG>#include</STRONG> <STRONG>&lt;curses.h&gt;</STRONG>
55
56        <STRONG>int</STRONG> <STRONG>scroll(WINDOW</STRONG> <STRONG>*</STRONG><EM>win</EM><STRONG>);</STRONG>
57
58        <STRONG>int</STRONG> <STRONG>scrl(int</STRONG> <EM>n</EM><STRONG>);</STRONG>
59        <STRONG>int</STRONG> <STRONG>wscrl(WINDOW</STRONG> <STRONG>*</STRONG><EM>win</EM><STRONG>,</STRONG> <STRONG>int</STRONG> <EM>n</EM><STRONG>);</STRONG>
60
61
62 </PRE><H2><a name="h2-DESCRIPTION">DESCRIPTION</a></H2><PRE>
63        The  <STRONG>scroll</STRONG> routine scrolls the window up one line.  This involves mov-
64        ing the lines in the window data structure.  As an optimization, if the
65        scrolling  region  of  the  window  is  the entire screen, the <EM>physical</EM>
66        <EM>screen</EM> may be scrolled at the same time.
67
68        For positive <EM>n</EM>, the <STRONG>scrl</STRONG> and <STRONG>wscrl</STRONG> routines  scroll  the  window  up  <EM>n</EM>
69        lines  (line  <EM>i</EM>+<EM>n</EM> becomes <EM>i</EM>); otherwise scroll the window down <EM>n</EM> lines.
70        This involves moving the lines in the window character image structure.
71        The current cursor position is not changed.
72
73        For these functions to work, scrolling must be enabled via <STRONG>scrollok</STRONG>.
74
75
76 </PRE><H2><a name="h2-RETURN-VALUE">RETURN VALUE</a></H2><PRE>
77        These routines return <STRONG>ERR</STRONG> upon failure, and <STRONG>OK</STRONG> (SVr4 only specifies "an
78        integer value other than <STRONG>ERR</STRONG>") upon successful completion.
79
80        X/Open defines no error conditions.
81
82        This implementation returns an error if the window pointer is null,  or
83        if scrolling is not enabled in the window, e.g., with <STRONG>scrollok</STRONG>.
84
85
86 </PRE><H2><a name="h2-NOTES">NOTES</a></H2><PRE>
87        Note that <STRONG>scrl</STRONG> and <STRONG>scroll</STRONG> may be macros.
88
89        The  SVr4  documentation  says  that  the  optimization  of  physically
90        scrolling immediately if the scroll region is the  entire  screen  "is"
91        performed,  not  "may  be" performed.  This implementation deliberately
92        does not guarantee that this will occur, to leave open the  possibility
93        of smarter optimization of multiple scroll actions on the next update.
94
95        Neither  the SVr4 nor the XSI documentation specify whether the current
96        attribute or current color-pair of blanks generated by the scroll func-
97        tion is zeroed.  Under this implementation it is.
98
99
100 </PRE><H2><a name="h2-PORTABILITY">PORTABILITY</a></H2><PRE>
101        The XSI Curses standard, Issue 4 describes these functions.
102
103
104 </PRE><H2><a name="h2-SEE-ALSO">SEE ALSO</a></H2><PRE>
105        <STRONG><A HREF="ncurses.3x.html">curses(3x)</A></STRONG>, <STRONG><A HREF="curs_outopts.3x.html">curs_outopts(3x)</A></STRONG>
106
107
108
109                                                                <STRONG><A HREF="curs_scroll.3x.html">curs_scroll(3x)</A></STRONG>
110 </PRE>
111 <div class="nav">
112 <ul>
113 <li><a href="#h2-NAME">NAME</a></li>
114 <li><a href="#h2-SYNOPSIS">SYNOPSIS</a></li>
115 <li><a href="#h2-DESCRIPTION">DESCRIPTION</a></li>
116 <li><a href="#h2-RETURN-VALUE">RETURN VALUE</a></li>
117 <li><a href="#h2-NOTES">NOTES</a></li>
118 <li><a href="#h2-PORTABILITY">PORTABILITY</a></li>
119 <li><a href="#h2-SEE-ALSO">SEE ALSO</a></li>
120 </ul>
121 </div>
122 </BODY>
123 </HTML>