2 <BODY BGCOLOR="#99ccbb" TEXT="#000000" LINK="#4060b0" VLINK="#000080" ALINK="#ff4040">
4 <STRONG>scroll</STRONG>, <STRONG>srcl</STRONG>, <STRONG>wscrl</STRONG> - scroll a <STRONG>curses</STRONG> window
9 <STRONG>#include</STRONG> <STRONG><curses.h></STRONG>
11 <STRONG>int</STRONG> <STRONG>scroll(WINDOW</STRONG> <STRONG>*win);</STRONG>
12 <STRONG>int</STRONG> <STRONG>scrl(int</STRONG> <STRONG>n);</STRONG>
13 <STRONG>int</STRONG> <STRONG>wscrl(WINDOW</STRONG> <STRONG>*win,</STRONG> <STRONG>int</STRONG> <STRONG>n);</STRONG>
17 <H2>DESCRIPTION</H2><PRE>
18 The <STRONG>scroll</STRONG> routine scrolls the window up one line. This
19 involves moving the lines in the window data structure.
20 As an optimization, if the scrolling region of the window
21 is the entire screen, the physical screen may be scrolled
24 For positive <EM>n</EM>, the <STRONG>scrl</STRONG> and <STRONG>wscrl</STRONG> routines scroll the
25 window up <EM>n</EM> lines (line <EM>i</EM>+<EM>n</EM> becomes <EM>i</EM>); otherwise scroll
26 the window down <EM>n</EM> lines. This involves moving the lines
27 in the window character image structure. The current cur-
28 sor position is not changed.
30 For these functions to work, scrolling must be enabled via
31 <STRONG>scrollok</STRONG>.
35 <H2>RETURN VALUE</H2><PRE>
36 These routines return <STRONG>ERR</STRONG> upon failure, and <STRONG>OK</STRONG> (SVr4 only
37 specifies "an integer value other than <STRONG>ERR</STRONG>") upon success-
43 Note that <STRONG>scrl</STRONG> and <STRONG>scroll</STRONG> may be macros.
45 The SVr4 documentation says that the optimization of phys-
46 ically scrolling immediately if the scroll region is the
47 entire screen "is" performed, not "may be" performed.
48 This implementation deliberately does not guarantee that
49 this will occur, in order to leave open the possibility of
50 smarter optimization of multiple scroll actions on the
53 Neither the SVr4 documentation specifies whether the cur-
54 rent attribute or current color-pair of blanks generated
55 by the scroll function is zeroed. Under this implementa-
60 <H2>PORTABILITY</H2><PRE>
61 The XSI Curses standard, Issue 4 describes these func-
66 <H2>SEE ALSO</H2><PRE>
67 <STRONG><A HREF="ncurses.3x.html">curses(3X)</A></STRONG>, <STRONG><A HREF="curs_outopts.3x.html">curs_outopts(3X)</A></STRONG>