mirror of
https://github.com/ghostty-org/ghostty.git
synced 2026-04-15 03:52:39 +00:00
Add three sized structs that let callers fetch all image, placement, or rendering metadata in a single call instead of many individual queries. This is an optimization for environments with high per-call overhead such as FFI or Cgo. GhosttyKittyGraphicsImageInfo is returned via image_get() with the new GHOSTTY_KITTY_IMAGE_DATA_INFO data kind. It bundles id, number, width, height, format, compression, data pointer, and data length. GhosttyKittyGraphicsPlacementInfo is returned via placement_get() with the new GHOSTTY_KITTY_GRAPHICS_PLACEMENT_DATA_INFO data kind. It bundles image id, placement id, virtual flag, offsets, source rect, columns, rows, and z-index. GhosttyKittyGraphicsPlacementRenderInfo is returned by the new ghostty_kitty_graphics_placement_render_info() function, which combines pixel size, grid size, viewport position, and resolved source rectangle. This one requires image and terminal handles so it does not fit the existing _get() pattern and is a dedicated function. All three use the sized-struct ABI pattern with GHOSTTY_INIT_SIZED for forward compatibility.