]> ncurses.scripts.mit.edu Git - ncurses.git/blob - doc/html/man/curs_scroll.3x.html
ncurses 6.1 - patch 20190317
[ncurses.git] / doc / html / man / curs_scroll.3x.html
1 <!-- 
2   ****************************************************************************
3   * Copyright (c) 1998-2010,2018 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.16 2018/07/28 22:59:02 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 https://invisible-island.net/scripts/readme.html#others_scripts">
36 <TITLE>curs_scroll 3x</TITLE>
37 <link rel="author" 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 involves mov-
62        ing the lines in the window data structure.  As an optimization, if the
63        scrolling  region  of  the  window  is  the entire screen, the <EM>physical</EM>
64        <EM>screen</EM> may be scrolled at the same time.
65
66        For positive <EM>n</EM>, the <STRONG>scrl</STRONG> and <STRONG>wscrl</STRONG> routines  scroll  the  window  up  <EM>n</EM>
67        lines  (line  <EM>i</EM>+<EM>n</EM> becomes <EM>i</EM>); otherwise scroll the window down <EM>n</EM> lines.
68        This involves moving the lines in the window character image structure.
69        The current cursor position is not changed.
70
71        For these functions to work, scrolling must be enabled via <STRONG>scrollok</STRONG>.
72
73
74 </PRE><H2><a name="h2-RETURN-VALUE">RETURN VALUE</a></H2><PRE>
75        These routines return <STRONG>ERR</STRONG> upon failure, and <STRONG>OK</STRONG> (SVr4 only specifies "an
76        integer value other than <STRONG>ERR</STRONG>") upon successful completion.
77
78        X/Open defines no error conditions.
79
80        This implementation returns an error if the window pointer is null,  or
81        if scrolling is not enabled in the window, e.g., with <STRONG>scrollok</STRONG>.
82
83
84 </PRE><H2><a name="h2-NOTES">NOTES</a></H2><PRE>
85        Note that <STRONG>scrl</STRONG> and <STRONG>scroll</STRONG> may be macros.
86
87        The  SVr4  documentation  says  that  the  optimization  of  physically
88        scrolling immediately if the scroll region is the  entire  screen  "is"
89        performed,  not  "may  be" performed.  This implementation deliberately
90        does not guarantee that this will occur, to leave open the  possibility
91        of smarter optimization of multiple scroll actions on the next update.
92
93        Neither  the SVr4 nor the XSI documentation specify whether the current
94        attribute or current color-pair of blanks generated by the scroll func-
95        tion is zeroed.  Under this implementation it is.
96
97
98 </PRE><H2><a name="h2-PORTABILITY">PORTABILITY</a></H2><PRE>
99        The XSI Curses standard, Issue 4 describes these functions.
100
101
102 </PRE><H2><a name="h2-SEE-ALSO">SEE ALSO</a></H2><PRE>
103        <STRONG><A HREF="ncurses.3x.html">curses(3x)</A></STRONG>, <STRONG><A HREF="curs_outopts.3x.html">curs_outopts(3x)</A></STRONG>
104
105
106
107                                                                <STRONG><A HREF="curs_scroll.3x.html">curs_scroll(3x)</A></STRONG>
108 </PRE>
109 <div class="nav">
110 <ul>
111 <li><a href="#h2-NAME">NAME</a></li>
112 <li><a href="#h2-SYNOPSIS">SYNOPSIS</a></li>
113 <li><a href="#h2-DESCRIPTION">DESCRIPTION</a></li>
114 <li><a href="#h2-RETURN-VALUE">RETURN VALUE</a></li>
115 <li><a href="#h2-NOTES">NOTES</a></li>
116 <li><a href="#h2-PORTABILITY">PORTABILITY</a></li>
117 <li><a href="#h2-SEE-ALSO">SEE ALSO</a></li>
118 </ul>
119 </div>
120 </BODY>
121 </HTML>