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. |
||
|---|---|---|
| .. | ||
| c-vt | ||
| c-vt-build-info | ||
| c-vt-cmake | ||
| c-vt-cmake-cross | ||
| c-vt-cmake-static | ||
| c-vt-colors | ||
| c-vt-effects | ||
| c-vt-encode-focus | ||
| c-vt-encode-key | ||
| c-vt-encode-mouse | ||
| c-vt-formatter | ||
| c-vt-grid-traverse | ||
| c-vt-kitty-graphics | ||
| c-vt-modes | ||
| c-vt-paste | ||
| c-vt-render | ||
| c-vt-sgr | ||
| c-vt-size-report | ||
| c-vt-static | ||
| c-vt-stream | ||
| cpp-vt-stream | ||
| swift-vt-xcframework | ||
| wasm-key-encode | ||
| wasm-sgr | ||
| wasm-vt | ||
| zig-formatter | ||
| zig-vt | ||
| zig-vt-stream | ||
| .gitignore | ||
| AGENTS.md | ||
| README.md | ||
README.md
Examples
Standalone projects demonstrating the Ghostty library APIs.
The directories starting with c- use the C API and the directories
starting with zig- use the Zig API.
Every example can be built and run using zig build and zig build run
from within the respective example directory.
Even the C API examples use the Zig build system (not the language) to
build the project.
Running an Example
cd example/<dir>
zig build run