Crate pancurses [] [src]

Structs

MEVENT
Window

Enums

Input

Constants

ALL_MOUSE_EVENTS
A_ATTRIBUTES
A_BLINK
A_BOLD
A_CHARTEXT
A_COLOR
A_DIM
A_ITALIC
A_LEFTLINE
A_NORMAL
A_OVERLINE
A_REVERSE
A_RIGHTLINE
A_STANDOUT
A_STRIKEOUT
A_UNDERLINE
COLOR_BLACK
COLOR_BLUE
COLOR_CYAN
COLOR_GREEN
COLOR_MAGENTA
COLOR_RED
COLOR_WHITE
COLOR_YELLOW
ERR
KEY_EVENT
KEY_F15
KEY_OFFSET
KEY_RESIZE
OK
SPECIAL_KEY_CODES

Traits

ToChtype

Functions

COLOR_PAIR
baudrate

Return the output speed of the terminal. On Windows it simply returns INT_MAX

beep

Sounds the audible bell on the terminal, if possible; if not, it calls flash().

can_change_color

Indicates if the terminal has the capability to change the definition of its colors.

cbreak

Set cbreak mode.

color_content

This routine gives programmers a way to find the intensity of the red, green, and blue (RGB) components in a color. It takes the color number as an argument and returns three values that tell you the amounts of red, green, and blue components in the given color. The argument must be a legal color value, i.e., 0 through COLORS-1, inclusive. The values that are returned are in the range 0 (no component) through 1000 (maximum amount of component), inclusive.

curs_set

Alters the appearance of the cursor.

def_prog_mode

Save the current terminal modes as the "program" (in curses) state for use by the reset_prog_mode() and reset_shell_mode() functions. This is done automatically by initscr().

def_shell_mode

Save the current terminal modes as the "shell" (not in curses) state for use by the reset_prog_mode() and reset_shell_mode() functions. This is done automatically by initscr().

endwin

Should be called before exiting or escaping from curses mode temporarily.

flash

Flashes the screen, if possible; if not, it calls beep().

flushinp

Throws away any type-ahead that has been typed by the user and has not yet been read by the program.

getmouse
half_delay

Similar to cbreak(), but allows for a time limit to be specified, in tenths of a second.

has_colors

Indicates if the terminal supports, and can maniplulate color.

init_color

Changes the definition of a color. It takes four arguments: the number of the color to be changed followed by three RGB values (for the amounts of red, green, and blue components). The first argument must be a legal color value; default colors are not allowed here. Each of the last three arguments must be a value in the range 0 through 1000. When init_color is used, all occurrences of that color on the screen immediately change to the new definition.

init_pair

Changes the definition of a color-pair.

initscr

Initialize the curses system, this must be the first function that is called.

mousemask

Nearly equivalent to mouse_set(), but instead of OK/ERR, it returns the value of the mask after setting it.

napms

Suspends the program for the specified number of milliseconds.

newwin

Creates a new window with the given number of lines, nlines and columns, ncols.

nl

Enables the translation of a carriage return into a newline on input.

nocbreak

Set nocbreak mode.

noecho

Disables echoing typed characters.

reset_prog_mode

Restore the terminal to "program" (in curses) state. This is done automatically by endwin() and doupdate() after an endwin(), so this would normally not be called before.

reset_shell_mode

Restore the terminal to "shell" (not in curses) state. This is done automatically by endwin() and doupdate() after an endwin(), so this would normally not be called before.

resize_term

Attempts to resize the screen to the given size.

set_blink

Toggles whether the A_BLINK attribute sets an actual blink mode (TRUE), or sets the background color to hig intensity (FALSE).

set_title

Sets the title of the window in which the curses program is running. This function may not do anything on some platforms. (Only supported on Windows)

start_color

Initializes eight basic colors (black, red, green, yellow, blue, magenta, cyan, and white), and two global variables; COLORS and COLOR_PAIRS (respectively defining the maximum number of colors and color-pairs the terminal is capable of displaying).

use_default_colors

Allows the use of -1 as a foreground or background color with init_pair().

Type Definitions

chtype
mmask_t