Crate curses_utils

Source

Macros§

pancurses_err
Log an error and panic if pancurses call does not return ERR
pancurses_ok
Log an error and panic if pancurses call returns ERR
pancurses_warn_err
Log a warning if pancurses call does not return ERR
pancurses_warn_ok
Log a warning but don’t panic

Structs§

Curses
Wraps an EasyCurses window
INIT_COLORS_DEFAULT
Eight default color values, 10% lum (black), 50% lum (hues), 90% lum (white)

Constants§

ATTRIBUTE_MASK

Functions§

chtype_attrs
Get the attributes of a chtype (equivalent to A_ATTRIBUTES & ch in ncurses)
chtype_character
Get the 8-bit character data from the first byte of a chtype.
chtype_color_pair
Get the color pair number from the second byte of a chtype
color_complement
color_from_primitive
color_pair
color_pair_attr
Constructs the color pair attribute chtype.
color_pair_colors
Returns the (fg, bg) color for the given color pair index.
color_pair_id
Constructs the color pair number that easycurses assigned to this color combination, equal to 1 + (8 * fg + bg), giving a number in the range 1-64
image_ascii_load
Load an ASCII text file
image_ascii_load_bytes
Load a ASCII text image from raw bytes.
image_chtype
Load an image of ASCII characters as pancurses::chtypes
image_chtype_text
Load an image of UTF8 characters as pancurses::chtypes.
image_color_bg_load_bmp24
Load an image of pure chroma background pixels with the color pair foreground set to the complement of the background
image_color_bg_load_bmp24_bytes
Load an image of pure chroma background pixels with the color pair foreground set to the complement of the background
image_color_halftone_load_bmp24
Load an image of pure chroma pixels
image_color_halftone_load_bmp24_bytes
Load an image of pure chroma pixels
image_color_load_bmp24
Load an image of pure chroma pixels
image_color_load_bmp24_bytes
Load an image of pure chroma pixels from memory
image_color_load_png
Load an image of pure chroma pixels with alpha channel values of 0 as transparency
image_color_load_png_bytes
Load an image of pure chroma pixels with alpha channel values of 0 as transparency
image_color_pair_load_bmp24
Load foreground and background pair of 24bit BMP image color data.
image_color_pair_load_bmp24_bytes
Load foreground and background pair of 24bit BMP image color data.
image_text_loadDeprecated
Deprecated: this doesn’t really work for non-ASCII unicode, use image_ascii_load functions instead.
image_text_load_strDeprecated
Deprecated: this doesn’t really work for non-ASCII unicode, use image_ascii_load functions instead.
rgba_to_color
Maps pure primary or secondary color (e.g. [255, 255, 0, 255]) with a > 0 to easycurses Color
rgba_to_color_halftone
⚠ Note: the curses window must be created before calling the method, as ACS_CKBOARD() returns 0x0 before initialization.
rgba_to_color_pair
Sets the background to the given rgba color and the foreground to its complement.