Console terminal state
include/console/term.h View source View on GitHubStructs
Section titled “Structs”term_geometry
Section titled “term_geometry”term_sev
Section titled “term_sev” enum term_sev (7 variants) source
Functions
Section titled “Functions”Ask terminal about size
term_probe
Section titled “term_probe”bool term_probe(void) source term_available
Section titled “term_available”bool term_available(void) source term_size
Section titled “term_size”struct term_geometry term_size(void) source falls back to FALLBACK
term_geometry_set
Section titled “term_geometry_set”void term_geometry_set(uint16_t rows, uint16_t cols) source Pin the geometry
term_set_plain
Section titled “term_set_plain”void term_set_plain(bool plain) source Plain mode strips escapes, swapping box drawing for ASCII
term_plain
Section titled “term_plain”bool term_plain(void) source term_set_unicode
Section titled “term_set_unicode”void term_set_unicode(bool unicode) source term_unicode
Section titled “term_unicode”bool term_unicode(void) source term_style
Section titled “term_style”Severities instead of raw ANSI so plain mode just removes color here
term_style_reset
Section titled “term_style_reset”const char * term_style_reset(void) source term_enter_panic
Section titled “term_enter_panic”void term_enter_panic(void) source Mark console broken, drops scroll region, and locks don’t get taken
term_in_panic
Section titled “term_in_panic”bool term_in_panic(void) source Macros
Section titled “Macros”TERM_PROBE_TIMEOUT_MS
Section titled “TERM_PROBE_TIMEOUT_MS”#define TERM_PROBE_TIMEOUT_MS 250 source TERM_FALLBACK_ROWS
Section titled “TERM_FALLBACK_ROWS”#define TERM_FALLBACK_ROWS 25 source TERM_FALLBACK_COLS
Section titled “TERM_FALLBACK_COLS”#define TERM_FALLBACK_COLS 80 source