Crate pancurses

source ·

Re-exports

pub use colorpair::ColorPair;

Modules

Structs

Enums

Constants

Traits

Functions

Maximum number of colors the terminal is capable of displaying.
Maximum number of color-pairs the terminal is capable of displaying.
Return the output speed of the terminal. On Windows it simply returns INT_MAX
Sounds the audible bell on the terminal, if possible; if not, it calls flash().
Indicates if the terminal has the capability to change the definition of its colors.
Set cbreak mode.
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.
Alters the appearance of the cursor.
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().
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().
Inserts an ‘milliseconds’ millisecond pause in output. This routine should not be used extensively because padding characters are used rather than a CPU pause. If no padding character is specified, this uses napms to perform the delay.
Frees storage associated with the SCREEN data structure.
Compares the virtual screen to the physical screen and performs an update of the physical screen.
Enabled echoing typed characters.
Should be called before exiting or escaping from curses mode temporarily.
Flashes the screen, if possible; if not, it calls beep().
Throws away any type-ahead that has been typed by the user and has not yet been read by the program.
Returns the current mouse status in an MEVENT struct.
Similar to cbreak(), but allows for a time limit to be specified, in tenths of a second.
Indicates if the terminal supports, and can maniplulate 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.
Changes the definition of a color-pair.
Initialize the curses system, this must be the first function that is called.
Returns a character string corresponding to the key code.
Sets the timeout for a mouse click.
Set the mouse events to be reported.
Suspends the program for the specified number of milliseconds.
A program that outputs to more than one terminal should use the newterm routine for each terminal instead of initscr.
Creates a new window with the given number of lines, nlines and columns, ncols.
Enables the translation of a carriage return into a newline on input.
Set nocbreak mode.
Disables echoing typed characters.
Disables the translation of a carriage return into a newline on input.
Disable raw mode.
Enable raw 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.
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.
Attempts to resize the screen to the given size.
Toggles whether the A_BLINK attribute sets an actual blink mode (TRUE), or sets the background color to high intensity (FALSE).
Switches between different terminals.
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)
Initializes eight basic colors (black, red, green, yellow, blue, magenta, cyan, and white), and two global variables accessed through COLORS() and COLOR_PAIRS() (respectively defining the maximum number of colors and color-pairs the terminal is capable of displaying).
Allows the use of -1 as a foreground or background color with init_pair().

Type Definitions