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:

GHOSTTY_API GhosttyResult ghostty_render_state_colors_get(GhosttyRenderState state, GhosttyRenderStateColors *out_colors)
GhosttyResult
Definition types.h:74
#define GHOSTTY_INIT_SIZED(type)
Definition types.h:219

Definition at line 253 of file render.h.

Field Documentation

◆ background

GhosttyColorRgb background

The default/current background color for the render state.

Definition at line 258 of file render.h.

◆ cursor

The cursor color when explicitly set by terminal state.

Definition at line 264 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 271 of file render.h.

◆ foreground

GhosttyColorRgb foreground

The default/current foreground color for the render state.

Definition at line 261 of file render.h.

◆ palette

GhosttyColorRgb palette[256]

The active 256-color palette for this render state.

Definition at line 274 of file render.h.

◆ size

size_t size

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

Definition at line 255 of file render.h.


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