mirror-ghostty/include/ghostty/vt
Mitchell Hashimoto 2c1dad790b
libghostty: add _get_multi to all _get APIs
Replace the ImageInfo and PlacementInfo sized structs and their
associated .info enum variants with a new _get_multi pattern that
batches multiple enum+pointer pairs into a single call. This avoids
struct ABI concerns (field order, padding, alignment, GHOSTTY_INIT_SIZED)
while preserving the single-call-crossing performance benefit for FFI
and Cgo callers.

Each _get_multi function takes an array of enum keys, an array of
output pointers, and an optional out_written parameter that reports
how many values were successfully written before any error. This
applies uniformly to all _get APIs: terminal_get, cell_get, row_get,
render_state_get, render_state_row_get, render_state_row_cells_get,
kitty_graphics_image_get, and kitty_graphics_placement_get.

The C example is updated to use compound-literal _get_multi calls,
and tests cover both success and error paths for every new function.
2026-04-11 12:51:36 -07:00
..
key libghostty: add GHOSTTY_ENUM_TYPED and GHOSTTY_ENUM_MAX_VALUE to all C enums 2026-04-08 10:43:15 -07:00
mouse libghostty: add GHOSTTY_ENUM_TYPED and GHOSTTY_ENUM_MAX_VALUE to all C enums 2026-04-08 10:43:15 -07:00
allocator.h lib: rename GHOSTTY_EXPORT to GHOSTTY_API 2026-03-30 10:26:32 -07:00
build_info.h libghostty: add GHOSTTY_ENUM_TYPED and GHOSTTY_ENUM_MAX_VALUE to all C enums 2026-04-08 10:43:15 -07:00
color.h lib: rename GHOSTTY_EXPORT to GHOSTTY_API 2026-03-30 10:26:32 -07:00
device.h libghostty: add GHOSTTY_ENUM_TYPED and GHOSTTY_ENUM_MAX_VALUE to all C enums 2026-04-08 10:43:15 -07:00
focus.h libghostty: add GHOSTTY_ENUM_TYPED and GHOSTTY_ENUM_MAX_VALUE to all C enums 2026-04-08 10:43:15 -07:00
formatter.h libghostty: add GHOSTTY_ENUM_TYPED and GHOSTTY_ENUM_MAX_VALUE to all C enums 2026-04-08 10:43:15 -07:00
grid_ref.h libghostty: add hyperlink URI accessor to grid_ref API 2026-04-04 20:28:13 -07:00
key.h example: rename some examples 2026-03-17 17:39:26 -07:00
kitty_graphics.h libghostty: add _get_multi to all _get APIs 2026-04-11 12:51:36 -07:00
modes.h libghostty: add GHOSTTY_ENUM_TYPED and GHOSTTY_ENUM_MAX_VALUE to all C enums 2026-04-08 10:43:15 -07:00
mouse.h example: rename some examples 2026-03-17 17:39:26 -07:00
osc.h libghostty: add GHOSTTY_ENUM_TYPED and GHOSTTY_ENUM_MAX_VALUE to all C enums 2026-04-08 10:43:15 -07:00
paste.h lib: rename GHOSTTY_EXPORT to GHOSTTY_API 2026-03-30 10:26:32 -07:00
point.h libghostty: add GHOSTTY_ENUM_TYPED and GHOSTTY_ENUM_MAX_VALUE to all C enums 2026-04-08 10:43:15 -07:00
render.h libghostty: add _get_multi to all _get APIs 2026-04-11 12:51:36 -07:00
screen.h libghostty: add _get_multi to all _get APIs 2026-04-11 12:51:36 -07:00
selection.h libghostty: add GhosttySelection type and selection support to formatter 2026-04-04 20:38:05 -07:00
sgr.h libghostty: add GHOSTTY_ENUM_TYPED and GHOSTTY_ENUM_MAX_VALUE to all C enums 2026-04-08 10:43:15 -07:00
size_report.h libghostty: add GHOSTTY_ENUM_TYPED and GHOSTTY_ENUM_MAX_VALUE to all C enums 2026-04-08 10:43:15 -07:00
style.h libghostty: add GHOSTTY_ENUM_TYPED and GHOSTTY_ENUM_MAX_VALUE to all C enums 2026-04-08 10:43:15 -07:00
sys.h libghostty: add log callback configuration 2026-04-10 10:52:45 -07:00
terminal.h libghostty: add _get_multi to all _get APIs 2026-04-11 12:51:36 -07:00
types.h libghostty: add GHOSTTY_ENUM_TYPED and GHOSTTY_ENUM_MAX_VALUE to all C enums 2026-04-08 10:43:15 -07:00
wasm.h lib: rename GHOSTTY_EXPORT to GHOSTTY_API 2026-03-30 10:26:32 -07:00