mirror-ghostty/include/ghostty/vt
Mitchell Hashimoto 945920a186
vt: expose terminal default colors via C API
Add set/get support for foreground, background, cursor, and palette
default colors through ghostty_terminal_set and ghostty_terminal_get.

Four new set options (COLOR_FOREGROUND, COLOR_BACKGROUND, COLOR_CURSOR,
COLOR_PALETTE) write directly to the terminal color defaults. Passing
NULL clears the value for RGB colors or resets the palette to the
built-in default. All set operations mark the palette dirty flag for
the renderer.

Eight new get data types retrieve either the effective color (override
or default, via DynamicRGB.get) or the default color only (ignoring
any OSC overrides). Effective getters for RGB colors return the new
NO_VALUE result code when no color is configured. The palette getters
return the current or original palette respectively.

Adds the GHOSTTY_NO_VALUE result code for cases where a queried value
is simply not configured, distinct from GHOSTTY_INVALID_VALUE which
indicates a caller error.
2026-03-26 09:51:30 -07:00
..
key vt: expose focus encoding in C and Zig APIs 2026-03-16 14:38:19 -07:00
mouse vt: expose focus encoding in C and Zig APIs 2026-03-16 14:38:19 -07:00
allocator.h vt: add ghostty_alloc for buffer allocation 2026-03-23 16:12:29 -07:00
build_info.h vt: expose optimize mode in build info API 2026-03-21 07:31:55 -07:00
color.h lib-vt: Wasm SGR helpers and example (#9362) 2025-10-26 13:19:55 -07:00
device.h vt: expose device_attributes effect in the C API 2026-03-24 11:32:52 -07:00
focus.h docs: extract focus encoding example into standalone project 2026-03-17 16:48:48 -07:00
formatter.h libghostty: add ghostty_free for cross-runtime memory safety 2026-03-23 20:52:02 +01:00
grid_ref.h example: add grid reference traversal example 2026-03-19 19:55:02 -07:00
key.h example: rename some examples 2026-03-17 17:39:26 -07:00
modes.h docs: extract inline code examples into standalone projects 2026-03-17 17:03:58 -07:00
mouse.h example: rename some examples 2026-03-17 17:39:26 -07:00
osc.h vt: add sized struct pattern and types.h 2026-03-14 14:42:50 -07:00
paste.h docs: extract inline code examples into standalone projects 2026-03-17 17:03:58 -07:00
point.h terminal: convert Point to lib.Enum/lib.TaggedUnion with C header 2026-03-19 14:01:11 -07:00
render.h libghostty: add resolved bg_color and fg_color to cells API 2026-03-21 20:30:01 -07:00
screen.h vt: add color_palette and color_rgb cell data types 2026-03-20 21:18:56 -07:00
sgr.h docs: extract inline code examples into standalone projects 2026-03-17 17:03:58 -07:00
size_report.h docs: extract inline code examples into standalone projects 2026-03-17 17:03:58 -07:00
style.h vt: add style and grapheme accessors 2026-03-19 19:48:16 -07:00
terminal.h vt: expose terminal default colors via C API 2026-03-26 09:51:30 -07:00
types.h vt: expose terminal default colors via C API 2026-03-26 09:51:30 -07:00
wasm.h lib-vt: Wasm SGR helpers and example (#9362) 2025-10-26 13:19:55 -07:00