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

General Programming Concepts: Writing and Debugging Programs


List of Additional Curses Subroutines

For information on the X/Open UNIX95 Specification curses subroutines available on AIX 4.2 (and later), see the X/Open CAE Specification.

Curses subroutines can be split into the following categories:

Manipulating Windows


scr_dump Writes the current contents of the virtual screen to the specified file.
scr_init Uses the contents of a specified file to initialize the curses data structures.
scr_restore Sets the virtual screen to the contents of the specified file.

Manipulating Characters


echochar, wechochar, or pechochar Functionally equivalent to a call to the addch (or waddch) subroutine followed by a call to the refresh (or wrefresh) subroutine.
flushinp Flushes any type-ahead characters typed by the user but not yet read by the program.
insertln or winsertln
Inserts a blank line in a window.
keyname Returns a pointer to a character string containing a symbolic name for the Key parameter.
meta Determines whether 8-bit character return for the wgetch subroutine is allowed.
nodelay Causes a call to the wgetch subroutine to be a nonblocking call. If no input is ready, the wgetch subroutine returns ERR.
scroll Scrolls a window up one line.
unctrl Returns the printable representation of a character. Control characters are punctuated with a ^ (caret).
vwprintw Performs the same operation as the wprintw subroutine but takes a variable list of arguments.
vwscanw Performs the same operation as the wscanw subroutine but takes a variable list of arguments.

Manipulating Terminals


def_prog_mode Identifies the current terminal mode as the in-curses mode.
def_shell_mode Saves the current terminal mode as the not-in-curses mode.
del_curterm Frees the space pointed to by the oterm variable.
notimeout Prevents the wgetch subroutine from setting a timer when interpreting an input escape sequence.
pechochar Equivalent to a call to the waddch subroutine followed by a call to the prefresh subroutine.
reset_prog_mode Restores the terminal into the in-curses program mode.
reset_shell_mode Restores the terminal to shell mode (out-of-curses mode). The endwin subroutine does this automatically.
restartterm Sets up a TERMINAL structure for use by curses. This subroutine is similar to the setupterm subroutine. Call the restartterm subroutine after restoring memory to a previous state. For example, call this subroutine after a call to the scr_restore subroutine.

Manipulating Color


color_content Returns the composition of a color.
init_color Changes a color to the desired composition.
init_pair Initializes a color pair to the specified foreground and background colors.
pair_content Returns the foreground and background colors for a specified color-pair number.

Miscellaneous Utilities


baudrate Queries the current terminal and returns its output speed.
erasechar Returns the erase character chosen by the user.
killchar Returns the line-kill character chosen by the user.


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