1curs_scroll(3X)                                                curs_scroll(3X)
2
3
4

NAME

6       scroll, scrl, wscrl - scroll a curses window
7

SYNOPSIS

9       #include <curses.h>
10
11       int scroll(WINDOW *win);
12
13       int scrl(int n);
14       int wscrl(WINDOW *win, int n);
15

DESCRIPTION

17       The  scroll routine scrolls the window up one line.  This involves mov‐
18       ing the lines in the window data structure.  As an optimization, if the
19       scrolling  region  of  the  window  is  the entire screen, the physical
20       screen may be scrolled at the same time.
21
22       For positive n, the scrl and wscrl routines  scroll  the  window  up  n
23       lines  (line  i+n becomes i); otherwise scroll the window down n lines.
24       This involves moving the lines in the window character image structure.
25       The current cursor position is not changed.
26
27       For  these  functions  to  work,  scrolling  must be enabled via scrol‐
28       lok(3X).
29

RETURN VALUE

31       These routines return ERR upon failure, and OK (SVr4 only specifies "an
32       integer value other than ERR") upon successful completion.
33
34       X/Open defines no error conditions.
35
36       This  implementation returns an error if the window pointer is null, or
37       if scrolling is not enabled in the window, e.g., with scrollok(3X).
38

NOTES

40       Note that scrl and scroll may be macros.
41
42       The  SVr4  documentation  says  that  the  optimization  of  physically
43       scrolling  immediately  if  the scroll region is the entire screen “is”
44       performed, not “may be” performed.   This  implementation  deliberately
45       does  not guarantee that this will occur, to leave open the possibility
46       of smarter optimization of multiple scroll actions on the next update.
47
48       Neither the SVr4 nor the XSI documentation specify whether the  current
49       attribute or current color-pair of blanks generated by the scroll func‐
50       tion is zeroed.  Under this implementation it is.
51

PORTABILITY

53       The XSI Curses standard, Issue 4 describes these functions.
54

SEE ALSO

56       curses(3X), curs_outopts(3X)
57
58
59
60                                                               curs_scroll(3X)
Impressum