1 .\"***************************************************************************
2 .\" Copyright (c) 1998-2006,2010 Free Software Foundation, Inc. *
4 .\" Permission is hereby granted, free of charge, to any person obtaining a *
5 .\" copy of this software and associated documentation files (the *
6 .\" "Software"), to deal in the Software without restriction, including *
7 .\" without limitation the rights to use, copy, modify, merge, publish, *
8 .\" distribute, distribute with modifications, sublicense, and/or sell *
9 .\" copies of the Software, and to permit persons to whom the Software is *
10 .\" furnished to do so, subject to the following conditions: *
12 .\" The above copyright notice and this permission notice shall be included *
13 .\" in all copies or substantial portions of the Software. *
15 .\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
16 .\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
17 .\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
18 .\" IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
19 .\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
20 .\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
21 .\" THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
23 .\" Except as contained in this notice, the name(s) of the above copyright *
24 .\" holders shall not be used in advertising or otherwise to promote the *
25 .\" sale, use or other dealings in this Software without prior written *
27 .\"***************************************************************************
29 .\" $Id: curs_scroll.3x,v 1.15 2010/12/04 18:40:45 tom Exp $
36 \fBwscrl\fR \- scroll a \fBcurses\fR window
40 \fB#include <curses.h>\fR
42 \fBint scroll(WINDOW *win);\fR
44 \fBint scrl(int n);\fR
46 \fBint wscrl(WINDOW *win, int n);\fR
49 The \fBscroll\fR routine scrolls the window up one line.
51 the lines in the window data structure.
52 As an optimization, if the scrolling
53 region of the window is the entire screen, the physical screen may be scrolled
56 For positive \fIn\fR, the \fBscrl\fR and \fBwscrl\fR routines scroll the
57 window up \fIn\fR lines (line \fIi\fR+\fIn\fR becomes \fIi\fR); otherwise
58 scroll the window down \fIn\fR lines.
59 This involves moving the lines in the
60 window character image structure.
61 The current cursor position is not changed.
63 For these functions to work, scrolling must be enabled via \fBscrollok\fR.
65 These routines return \fBERR\fR upon failure, and \fBOK\fR (SVr4 only specifies
66 "an integer value other than \fBERR\fR") upon successful completion.
68 X/Open defines no error conditions.
70 This implementation returns an error
71 if the window pointer is null, or
72 if scrolling is not enabled in the window, e.g., with \fBscrollok\fP.
74 Note that \fBscrl\fR and \fBscroll\fR may be macros.
76 The SVr4 documentation says that the optimization of physically scrolling
77 immediately if the scroll region is the entire screen "is" performed, not
79 This implementation deliberately does not guarantee
80 that this will occur, to leave open the possibility of smarter
81 optimization of multiple scroll actions on the next update.
83 Neither the SVr4 nor the XSI documentation specify whether the current
85 current color-pair of blanks generated by the scroll function is zeroed.
86 Under this implementation it is.
88 The XSI Curses standard, Issue 4 describes these functions.
90 \fBcurses\fR(3X), \fBcurs_outopts\fR(3X)