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

#include <ghostty/vt/render.h>

Data Fields

size_t size
GhosttyColorRgb background
GhosttyColorRgb foreground
GhosttyColorRgb cursor
bool cursor_has_value
GhosttyColorRgb palette [256]

Detailed Description

Render-state color information.

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

Example:

GhosttyResult ghostty_render_state_colors_get(GhosttyRenderState state, GhosttyRenderStateColors *out_colors)
GhosttyResult
Definition types.h:13
#define GHOSTTY_INIT_SIZED(type)
Definition types.h:42

Definition at line 268 of file render.h.

Field Documentation

◆ background

GhosttyColorRgb background

The default/current background color for the render state.

Definition at line 273 of file render.h.

◆ cursor

The cursor color when explicitly set by terminal state.

Definition at line 279 of file render.h.

◆ cursor_has_value

bool cursor_has_value

True when cursor contains a valid explicit cursor color value. If this is false, the cursor color should be ignored; it will contain undefined data.

Definition at line 286 of file render.h.

◆ foreground

GhosttyColorRgb foreground

The default/current foreground color for the render state.

Definition at line 276 of file render.h.

◆ palette

GhosttyColorRgb palette[256]

The active 256-color palette for this render state.

Definition at line 289 of file render.h.

◆ size

size_t size

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

Definition at line 270 of file render.h.


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