Manual Page Result
0
Command: curs_kernel | Section: 3 | Source: Digital UNIX | File: curs_kernel.3.gz
curs_kernel(3) Library Functions Manual curs_kernel(3)
NAME
curs_kernel, curs_set, def_prog_mode, def_shell_mode, napms, re-
set_prog_mode, reset_shell_mode, ripoffline, savetty - Low-level Curses
routines
LIBRARY
Curses Library (libcurses.a, libcurses.so)
SYNOPSIS
#include <curses.h>
int curs_set(int visibility); int def_prog_mode(void); int
def_shell_mode(void); int napms(int ms); int reset_prog_mode(void); int
reset_shell_mode(void); int resetty(void); int ripoffline(int line, int
(*init)(WINDOW *, int)); int savetty(void);
STANDARDS
Interfaces documented on this reference page conform to industry stan-
dards as follows:
def_prog_mode, def_shell_mode, reset_prog_mode, reset_shell_mode, re-
setty, savetty: XPG4, XPG4-UNIX
curs_set, napms, ripoffline: XPG4-UNIX
Refer to the standards(5) reference page for more information about in-
dustry standards and associated tags.
DESCRIPTION
These routines give low-level access to various Curses functionality.
They are typically used inside library routines.
The def_prog_mode and def_shell_mode routines save the current terminal
modes as the ``program'' (in Curses) or ``shell'' (not in Curses) state
for use by the reset_prog_mode and reset_shell_mode routines. The
initscr routine saves these states automatically.
The reset_prog_mode and reset_shell_mode routines restore the terminal
to ``program'' (in Curses) or ``shell'' (out of Curses) state. Appli-
cations do not usually call these routines because the endwin and, af-
ter an endwin, doupdate routines automatically restore these states.
The resetty and savetty routines save and restore the state of the ter-
minal modes. The savetty routine saves the current state in a buffer.
The resetty routine restores the state to what it was at the last call
to savetty.
The ripoffline routine provides access to the same facility used by
slk_init to reduce the size of the screen (see curs_slk(3)). Applica-
tions must call ripoffline before calling initscr or newterm. If line
is positive, ripoffline removes a line from the top of stdscr; if line
is negative, the routine removes a line from the bottom of stdscr.
When this operation is done inside initscr, the application calls the
program-supplied init routine with two arguments: a window pointer to
the one-line window that has been allocated and an integer with the
number of columns in the window. Inside this initialization routine,
the integer variables LINES and COLS (defined in curses.h) are not
guaranteed to be accurate; therefore, the application must not call
wrefresh or doupdate. However, the application can call wnoutrefresh
during the initialization routine.
The application can call ripoffline up to five times before calling
initscr or newterm.
The curs_set routine sets the cursor visibility state to 0, 1, or 2,
which correspond to invisible, normal, or very visible, respectively.
If the terminal supports the requested visibility, the routine returns
the previous cursor state; otherwise, the routine returns ERR.
The napms routine causes the program to sleep for ms milliseconds.
NOTES
The header file curses.h automatically includes the header file
stdio.h.
RETURN VALUES
The curs_set routine returns the previous cursor state, or ERR if the
terminal does not support the requested visibility.
The napms and ripoffline routines always return OK.
The other routines return OK upon successful completion; otherwise,
they return ERR.
RELATED INFORMATION
Functions: curses(3), curs_initscr(3), curs_outopts(3), curs_re-
fresh(3), curs_scr_dump(3), curs_slk(3)
Others: standards(5) delim off
curs_kernel(3)