libghostty-vt 0.0.0
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 is a sized struct. Initialize it with GHOSTTY_INIT_SIZED() before querying GHOSTTY_RENDER_STATE_DATA_COLORS. See Sized Structs.

Example:

GhosttyResult
Definition types.h:143
#define GHOSTTY_INIT_SIZED(type)
Definition types.h:558
GHOSTTY_API GhosttyResult ghostty_render_state_get(GhosttyRenderState state, GhosttyRenderStateData data, void *out)
@ GHOSTTY_RENDER_STATE_DATA_COLORS
Definition render.h:181
Examples
c-vt-render/src/main.c.

Definition at line 584 of file render.h.

Field Documentation

◆ background

GhosttyColorRgb background

The default/current background color for the render state.

Examples
c-vt-render/src/main.c.

Definition at line 589 of file render.h.

◆ cursor

The cursor color when explicitly set by terminal state.

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

◆ foreground

GhosttyColorRgb foreground

The default/current foreground color for the render state.

Examples
c-vt-render/src/main.c.

Definition at line 592 of file render.h.

◆ palette

GhosttyColorRgb palette[256]

The active 256-color palette for this render state.

Examples
c-vt-render/src/main.c.

Definition at line 605 of file render.h.

◆ size

size_t size

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

Definition at line 586 of file render.h.


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