libghostty
Loading...
Searching...
No Matches
GhosttyKittyGraphicsPlacementRenderInfo Struct Reference

#include <ghostty/vt/kitty_graphics.h>

Data Fields

size_t size
uint32_t pixel_width
uint32_t pixel_height
uint32_t grid_cols
uint32_t grid_rows
int32_t viewport_col
int32_t viewport_row
bool viewport_visible
uint32_t source_x
uint32_t source_y
uint32_t source_width
uint32_t source_height

Detailed Description

Combined rendering geometry for a placement in a single sized struct.

Combines the results of ghostty_kitty_graphics_placement_pixel_size(), ghostty_kitty_graphics_placement_grid_size(), ghostty_kitty_graphics_placement_viewport_pos(), and ghostty_kitty_graphics_placement_source_rect() into one call. This is an optimization over calling those four functions individually, particularly useful in environments with high per-call overhead such as FFI or Cgo.

This struct uses the sized-struct ABI pattern. Initialize with GHOSTTY_INIT_SIZED(GhosttyKittyGraphicsPlacementRenderInfo) before calling ghostty_kitty_graphics_placement_render_info().

Definition at line 366 of file kitty_graphics.h.

Field Documentation

◆ grid_cols

uint32_t grid_cols

Number of grid columns the placement occupies.

Definition at line 374 of file kitty_graphics.h.

◆ grid_rows

uint32_t grid_rows

Number of grid rows the placement occupies.

Definition at line 376 of file kitty_graphics.h.

◆ pixel_height

uint32_t pixel_height

Rendered height in pixels.

Definition at line 372 of file kitty_graphics.h.

◆ pixel_width

uint32_t pixel_width

Rendered width in pixels.

Definition at line 370 of file kitty_graphics.h.

◆ size

size_t size

Size of this struct in bytes. Must be set to sizeof(GhosttyKittyGraphicsPlacementRenderInfo).

Definition at line 368 of file kitty_graphics.h.

◆ source_height

uint32_t source_height

Resolved source rectangle height in pixels.

Definition at line 390 of file kitty_graphics.h.

◆ source_width

uint32_t source_width

Resolved source rectangle width in pixels.

Definition at line 388 of file kitty_graphics.h.

◆ source_x

uint32_t source_x

Resolved source rectangle x origin in pixels.

Definition at line 384 of file kitty_graphics.h.

◆ source_y

uint32_t source_y

Resolved source rectangle y origin in pixels.

Definition at line 386 of file kitty_graphics.h.

◆ viewport_col

int32_t viewport_col

Viewport-relative column (may be negative for partially visible placements).

Definition at line 378 of file kitty_graphics.h.

◆ viewport_row

int32_t viewport_row

Viewport-relative row (may be negative for partially visible placements).

Definition at line 380 of file kitty_graphics.h.

◆ viewport_visible

bool viewport_visible

False when the placement is fully off-screen or virtual.

Definition at line 382 of file kitty_graphics.h.


The documentation for this struct was generated from the following file: