#[repr(C)]pub struct RenderStateColors {
pub size: usize,
pub background: ColorRgb,
pub foreground: ColorRgb,
pub cursor: ColorRgb,
pub cursor_has_value: bool,
pub palette: [ColorRgb; 256],
}Expand 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: GhosttyRenderStateColors colors = GHOSTTY_INIT_SIZED(GhosttyRenderStateColors); GhosttyResult result = ghostty_render_state_colors_get(state, &colors);
Fields§
§size: usizeSize of this struct in bytes. Must be set to sizeof(GhosttyRenderStateColors).
background: ColorRgbThe default/current background color for the render state.
foreground: ColorRgbThe default/current foreground color for the render state.
cursor: ColorRgbThe cursor color when explicitly set by terminal state.
cursor_has_value: boolTrue when cursor contains a valid explicit cursor color value. If this is false, the cursor color should be ignored; it will contain undefined data.
palette: [ColorRgb; 256]The active 256-color palette for this render state.
Trait Implementations§
Source§impl Clone for RenderStateColors
impl Clone for RenderStateColors
Source§fn clone(&self) -> RenderStateColors
fn clone(&self) -> RenderStateColors
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more