scrl, scroll, wscrl Subroutine

Purpose

Scrolls a Curses window.

Library

Curses Library (libcurses.a)

Syntax

#include <curses.h>
int scrl
(int n);

int scroll
(WINDOW *win);
int wscrl
(WINDOW  *win,
int n);

Description

The scroll subroutine scrolls win one line in the direction of the first line

The scrl and wscrl subroutines scroll the current or specified window. If n is positive, the window scrolls n lines toward the first line. Otherwise, the window scrolls -n lines toward the last line.

Theses subroutines do not change the cursor position. If scrolling is disabled for the current or specified window, these subroutines have no effect. The interaction of these subroutines with the setsccreg subroutine is currently unspecified.

Parameters

Item Description
*win Specifies the window to scroll.
n  

Return Values

Upon successful completion, these subroutines return OK. Otherwise, they return ERR.

Examples

To scroll the user-defined window my_window up one line, enter:

WINDOW *my_window;
scroll(my_window);