summaryrefslogtreecommitdiffstats
path: root/lib/libncurses/curs_scroll.3
blob: a779a909e6db47a7daf5b16f4940a5383cd95fe5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
.TH curs_scroll 3 ""
.SH NAME
\fBscroll\fR, \fBscrl\fR, \fBwscrl\fR - scroll a \fBncurses\fR window
.SH SYNOPSIS
\fB#include <ncurses.h>\fR

\fBint scroll(WINDOW *win);\fR
.br
\fBint scrl(int n);\fR
.br
\fBint wscrl(WINDOW *win, int n);\fR
.br
.SH DESCRIPTION
The \fBscroll\fR routine scrolls the window up one line.  This involves moving
the lines in the window data structure.  As an optimization, if the scrolling
region of the window is the entire screen, the physical screen is scrolled at
the same time.

With the \fBscrl\fR and \fBwscrl\fR routines, for positive \fIn\fR scroll the
window up \fIn\fR lines (line \fIi\fR+\fIn\fR becomes \fIi\fR); otherwise
scroll the window down \fIn\fR lines.  This involves moving the lines in the
window character image structure.  The current cursor position is not changed.

For these functions to work, scrolling must be enabled via \fBscrollok\fR.
.SH RETURN VALUE
All routines return the integer \fBERR\fR upon failure and an integer value
other than \fBERR\fR upon successful completion.
.SH NOTES
Note that \fBscrl\fR and \fBscroll\fR may be macros.
.SH SEE ALSO
\fBncurses\fR(3), \fBcurs_outopts\fR(3)
.\"#
.\"# The following sets edit modes for GNU EMACS
.\"# Local Variables:
.\"# mode:nroff
.\"# fill-column:79
.\"# End:
OpenPOWER on IntegriCloud