[ Bottom of Page | Previous Page | Next Page | Contents | Index | Library Home | Legal | Search ]

Technical Reference: Base Operating System and Extensions, Volume 2

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

*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);

Related Information

The scrollok (scrollok Subroutine) subroutine.

Curses Overview for Programming, List of Curses Subroutines, Manipulating Characters with Curses in AIX 5L Version 5.2 General Programming Concepts: Writing and Debugging Programs.

[ Top of Page | Previous Page | Next Page | Contents | Index | Library Home | Legal | Search ]