[ Previous | Next | Contents | Glossary | Home | Search ]
AIX Version 4.3 General Programming Concepts: Writing and Debugging Programs

List of Curses Subroutines

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

Starting and Stopping Curses

Manipulating Windows

Controlling the Cursor

Manipulating Characters

Manipulating Terminals

Manipulating Color

Setting Video Attributes and Curses Options

Manipulating Soft Labels

Miscellaneous Utilities

Starting and Stopping Curses

endwin Terminates the curses subroutine libraries and their data structures.
initscr Initializes the curses subroutine library and its data structures.

Manipulating Windows

box Draws a box in or around a window.
copywin Provides more precise control over the overlay and overwrite subroutine.
delwin Removes a window data structure.
getbegyx Places the beginning coordinates of the window in integer variables y and x.
getmaxyx Places the size of the window in integer variables y and x.
getsyx Returns the current coordinates of the virtual screen cursor.
isendwin Returns TRUE if the endwin subroutine has been called without any subsequent calls to the wrefresh subroutine.
mvwin Moves a window or subwindow to a new location.
newpad Creates a new pad data structure.
newwin Creates a new window data structure.
overlay or overwrite Copies one window on top of another.
prefresh or pnoutrefresh Updates the terminal and curscr to reflect changes made to a pad.
refresh, or wrefresh Updates the terminal and curscr to reflect changes made to a window.
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.
setsyx Sets the virtual screen cursor to the specified coordinate.
subpad Creates and returns a pointer to a subpad within a pad.
subwin Creates a subwindow of an existing window.
touchline Forces a range of lines to be refreshed at the next call to the wrefresh subroutine.
touchwin Forces every character in a window's character array to be refreshed at the next call of the wrefresh subroutine. The touchwin subroutine does not save optimization information. This subroutine is useful with overlapping windows.
wnoutrefresh or doupdate Updates the designated windows and outputs them all at once to the terminal. These subroutines are useful for faster response when there are multiple updates.

Controlling the Cursor

getyx Returns the coordinates of the cursor in the specified window.
leaveok Controls cursor placement after a call to the wrefresh subroutine.
move or wmove Moves the logical cursor.
mvcur Moves the physical cursor.

Manipulating Characters

addch, mvaddch, mvwaddch, or waddch Adds a character to a window.
addstr, waddstr, mvaddstr, or wmvaddstr Adds a string of characters to a window.
clear, or wclear Clears the screen and sets a clear flag for the next refresh.
clearok Determines whether curses clears a window on the next call to the refresh or wrefresh subroutine.
clrtobot or wclrtobot Erases the lines below and to the right of the logical cursor.
clrtoeol or wclrtoeol Erases the current line to the right of the logical cursor.
delch, mvdelch, mvwdelch, or wdelch Deletes the character at the logical cursor location.
deleteln or wdeleteln Deletes the current line.
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.
erase or werase Copies blank spaces to every position in a window.
flushinp Flushes any type-ahead characters typed by the user but not yet read by the program.
getch, wgetch, mvgetch, or mvwgetch Gets a character from standard input.
getstr, wgetstr, mvgetstr, or mvwgetstr Gets a string from standard input.
inch, winch, mvinch, or mvwinch Returns the character at the current cursor location.
insch, winsch, mvinsch, or mvwinsch Inserts a character in a window.
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.
printw, wprintw, mvprintw, or mvwprintw Performs a formatted print on a window.
scanw, wscanw, mvscanw, or mvwscanw Calls the scanf subroutine on a window and uses the resulting line as input for that scan.
scroll Scrolls a window up one line.
scrollok Enables a window to scroll when the cursor is moved off the right edge of the last line of a window.
setscrreg or wsetscrreg Sets a software scrolling region within a window.
unctrl Returns the printable representation of a character. Control characters are punctuated with a ^ (caret).
ungetch Places a character back in the input queue.
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

cbreak or nocbreak Puts the terminal into or takes it out of CBREAK mode.
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.
delay_output Sets the output delay in milliseconds.
echo or noecho Controls echoing of typed characters to the screen.
garbagedlines Indicates to curses that a screen line is garbaged and should be thrown away before having anything written over the top of it.
halfdelay Returns ERR if no input was typed after blocking for a specified amount of time.
has_ic Determines whether a terminal has the insert-character capability.
has_il Determines whether a terminal has the insert-line capability.
longname Returns the verbose name of the terminal.
newterm Sets up a new terminal.
nl or nonl Determines whether curses translates a new line into a carriage return and line feed on output, and translates a return into a new line on input.
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.
putp Provides a shortcut to the tputs subroutine.
raw or noraw Places the terminal into or out of RAW mode.
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.
resetty Restores the state of the tty modes.
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.
ripoffline Removes a line from the default screen.
setupterm Sets up the TERMINAL structure for use by curses.
tgetent Looks up the termcap entry for a terminal.
tgetflag Returns the boolean entry for a termcap identifier.
tgetnum Returns the numeric entry for a termcap identifier.
tgetstr Returns the string entry for a termcap identifier.
tgoto Instantiates the parameters into the given capability. This subroutine is provided for compatibility with applications that use the termcap file.
tigetflag Returns the value of the specified boolean capability.
tigetnum Returns the value of the specified numeric capability.
tigetstr Returns the value of the string capability.
tparm Instantiates a string with parameters.
tputs Applies padding information to the given string and outputs it.

Manipulating Color

can_change_color Checks to see if the terminal supports colors and changing of the color definition.
color_content Returns the composition of a color.
has_colors Checks that the terminal supports colors.
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.

Setting Video Attributes and Curses Options

attroff or wattroff Turns off attributes.
attron or wattron Turns on attributes.
attrset or wattrset Sets the current attributes of a window.
beep Sounds the audible alarm on the terminal.
curs_set Sets the cursor state.
flash Causes the terminal's display to flash.
idlok Allows curses to use the hardware insert/delete line feature.
intrflush Allows an interrupt to flush all output in the tty driver queue.
keypad Enables function keys to be interpreted by the wgetch subroutine.
standout, wstandout, standend, or wstandend
Puts a window into and out of the terminal's best highlight mode.
typeahead Sets the file descriptor for a type-ahead check.
vidputs or vidattr Outputs a string that puts the terminal in a video-attribute mode.

Manipulating Soft Labels

slk_clear Clears soft labels from the screen.
slk_init Initializes soft function key labels.
slk_label Returns the current label.
slk_noutrefresh Refreshs soft labels. This subroutine is functionally equivalent to the wnoutrefresh subroutine.
slk_refresh Refreshs soft labels. This subroutine is functionally equivalent to the refresh subroutine.
slk_restore Restores the soft labels to the screen after a call to the slk_clear subroutine.
slk_set Sets a soft label.
slk_touch Updates soft labels on the next call to the slk_noutrefresh subroutine.

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.
filter Sets the size of the terminal screen to 1-line.

[ Previous | Next | Contents | Glossary | Home | Search ]