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 querying GHOSTTY_RENDER_STATE_DATA_COLORS.

Example:

GHOSTTY_API GhosttyResult ghostty_render_state_get(GhosttyRenderState state, GhosttyRenderStateData data, void *out)
@ GHOSTTY_RENDER_STATE_DATA_COLORS
Definition render.h:655
GhosttyResult
Definition types.h:88
#define GHOSTTY_INIT_SIZED(type)
Definition types.h:359

Definition at line 1068 of file render.h.

Field Documentation

◆ background

GhosttyColorRgb background

The default/current background color for the render state.

Definition at line 1073 of file render.h.

◆ cursor

The cursor color when explicitly set by terminal state.

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

◆ foreground

GhosttyColorRgb foreground

The default/current foreground color for the render state.

Definition at line 1076 of file render.h.

◆ palette

GhosttyColorRgb palette[256]

The active 256-color palette for this render state.

Definition at line 1089 of file render.h.

◆ size

size_t size

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

Definition at line 1070 of file render.h.


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