curs_kernel, curs_set, def_prog_mode, def_shell_mode, napms, reset_prog_mode, reset_shell_mode, ripoffline, savetty - Low-level Curses routines
int (*init)(WINDOW *, int)
Curses Library (libcurses)
Interfaces documented on this reference page conform to industry standards as follows:
def_prog_mode, def_shell_mode, reset_prog_mode, reset_shell_mode, resetty, savetty: XPG4, XPG4-UNIX
curs_set, napms, ripoffline: XPG4-UNIX
Refer to the
reference page for more information
about industry standards and associated tags.
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. Applications do not usually call these routines because the endwin and, after an endwin, doupdate routines automatically restore these states.
The resetty and savetty routines save and restore the state of the terminal 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)). Applications 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.
routine causes the program to sleep for
The header file
includes the header file
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
completion; otherwise, they return
Functions: curses(3), curs_initscr(3), curs_outopts(3), curs_refresh(3), curs_scr_dump(3), curs_slk(3)