Re-exports§
pub use crate::colorpair::ColorPair;
Modules§
Structs§
Enums§
Constants§
- ALL_
MOUSE_ EVENTS - A_
ALTCHARSET - A_
ATTRIBUTES - A_BLINK
- A_BOLD
- A_
CHARTEXT - A_COLOR
- A_DIM
- A_INVIS
- A_
ITALIC - A_
LEFTLINE - A_
NORMAL - A_
OVERLINE - A_
REVERSE - A_
RIGHTLINE - A_
STANDOUT - A_
STRIKEOUT - A_
UNDERLINE - BUTTO
N1_ CLICKED - BUTTO
N1_ DOUBLE_ CLICKED - BUTTO
N1_ PRESSED - BUTTO
N1_ RELEASED - BUTTO
N1_ TRIPLE_ CLICKED - BUTTO
N2_ CLICKED - BUTTO
N2_ DOUBLE_ CLICKED - BUTTO
N2_ PRESSED - BUTTO
N2_ RELEASED - BUTTO
N2_ TRIPLE_ CLICKED - BUTTO
N3_ CLICKED - BUTTO
N3_ DOUBLE_ CLICKED - BUTTO
N3_ PRESSED - BUTTO
N3_ RELEASED - BUTTO
N3_ TRIPLE_ CLICKED - BUTTO
N4_ CLICKED - BUTTO
N4_ DOUBLE_ CLICKED - BUTTO
N4_ PRESSED - BUTTO
N4_ RELEASED - BUTTO
N4_ TRIPLE_ CLICKED - BUTTO
N5_ CLICKED - BUTTO
N5_ DOUBLE_ CLICKED - BUTTO
N5_ PRESSED - BUTTO
N5_ RELEASED - BUTTO
N5_ TRIPLE_ CLICKED - BUTTON_
ALT - BUTTON_
CTRL - BUTTON_
SHIFT - 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
- REPORT_
MOUSE_ POSITION - SPECIAL_
KEY_ CODES
Traits§
Functions§
- ACS_
BBSS - ACS_
BLOCK - ACS_
BOARD - ACS_
BSBS - ACS_
BSSB - ACS_
BSSS - ACS_
BTEE - ACS_
BULLET - ACS_
CKBOARD - ACS_
DARROW - ACS_
DEGREE - ACS_
DIAMOND - ACS_
GEQUAL - ACS_
HLINE - ACS_
LANTERN - ACS_
LARROW - ACS_
LEQUAL - ACS_
LLCORNER - ACS_
LRCORNER - ACS_
LTEE - ACS_
NEQUAL - ACS_PI
- ACS_
PLMINUS - ACS_
PLUS - ACS_
RARROW - ACS_
RTEE - ACS_S1
- ACS_S3
- ACS_S7
- ACS_S9
- ACS_
SBBS - ACS_
SBSB - ACS_
SBSS - ACS_
SSBB - ACS_
SSBS - ACS_
SSSB - ACS_
SSSS - ACS_
STERLING - ACS_
TTEE - ACS_
UARROW - ACS_
ULCORNER - ACS_
URCORNER - ACS_
VLINE - COLORS
- Maximum number of colors the terminal is capable of displaying.
- COLOR_
PAIR - COLOR_
PAIRS - Maximum number of color-pairs the terminal is capable of displaying.
- 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()andreset_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()andreset_shell_mode()functions. This is done automatically by initscr(). - delay_
output - 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.
- delscreen
- Frees storage associated with the SCREEN data structure.
- doupdate
- Compares the virtual screen to the physical screen and performs an update of the physical screen.
- echo
- Enabled echoing typed characters.
- 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
- Returns the current mouse status in an MEVENT struct.
- 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_coloris 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.
- keyname
- Returns a character string corresponding to the key
code. - mouseinterval
- Sets the timeout for a mouse click.
- mousemask
- Set the mouse events to be reported.
- napms
- Suspends the program for the specified number of milliseconds.
- newterm
- A program that outputs to more than one terminal should use the newterm routine for each terminal instead of initscr.
- 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.
- nonl
- Disables the translation of a carriage return into a newline on input.
- noraw
- Disable raw mode.
- raw
- Enable raw mode.
- 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_BLINKattribute sets an actual blink mode (TRUE), or sets the background color to high intensity (FALSE). - set_
term - Switches between different terminals.
- 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 accessed through
COLORS()andCOLOR_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().