]> ncurses.scripts.mit.edu Git - ncurses.git/blob - man/curs_scroll.3x
ncurses 4.2
[ncurses.git] / man / curs_scroll.3x
1 .TH curs_scroll 3X ""
2 .SH NAME
3 \fBscroll\fR, \fBsrcl\fR, \fBwscrl\fR - scroll a \fBcurses\fR window
4 .SH SYNOPSIS
5 \fB#include <curses.h>\fR
6
7 \fBint scroll(WINDOW *win);\fR
8 .br
9 \fBint scrl(int n);\fR
10 .br
11 \fBint wscrl(WINDOW *win, int n);\fR
12 .br
13 .SH DESCRIPTION
14 The \fBscroll\fR routine scrolls the window up one line.  This involves moving
15 the lines in the window data structure.  As an optimization, if the scrolling
16 region of the window is the entire screen, the physical screen may be scrolled
17 at the same time.
18
19 For positive \fIn\fR, the \fBscrl\fR and \fBwscrl\fR routines scroll the
20 window up \fIn\fR lines (line \fIi\fR+\fIn\fR becomes \fIi\fR); otherwise
21 scroll the window down \fIn\fR lines.  This involves moving the lines in the
22 window character image structure.  The current cursor position is not changed.
23
24 For these functions to work, scrolling must be enabled via \fBscrollok\fR.
25 .SH RETURN VALUE
26 These routines return \fBERR\fR upon failure, and \fBOK\fR (SVr4 only specifies
27 "an integer value other than \fBERR\fR") upon successful completion.
28 .SH NOTES
29 Note that \fBscrl\fR and \fBscroll\fR may be macros.
30
31 The SVr4 documentation says that the optimization of physically scrolling 
32 immediately if the scroll region is the entire screen "is" performed, not
33 "may be" performed.  This implementation deliberately does not guarantee
34 that this will occur, in order to leave open the possibility of smarter
35 optimization of multiple scroll actions on the next update. 
36
37 Neither the SVr4 documentation specifies whether the current attribute or
38 current color-pair of blanks generated by the scroll function is zeroed.
39 Under this implementation it is.
40 .SH PORTABILITY
41 The XSI Curses standard, Issue 4 describes these functions.
42 .SH SEE ALSO
43 \fBcurses\fR(3X), \fBcurs_outopts\fR(3X)
44 .\"#
45 .\"# The following sets edit modes for GNU EMACS
46 .\"# Local Variables:
47 .\"# mode:nroff
48 .\"# fill-column:79
49 .\"# End: