libghostty-vt 0.0.0
Loading...
Searching...
No Matches
GhosttyRenderStateCursor Struct Reference

#include <ghostty/vt/render.h>

Data Fields

size_t size
bool viewport_has_value
uint16_t viewport_x
uint16_t viewport_y
bool wide_tail
bool visible
bool blinking
bool password_input
GhosttyCursorStyle visual_style

Detailed Description

Render-state cursor information.

This is a sized struct. Initialize it with GHOSTTY_INIT_SIZED() before querying GHOSTTY_RENDER_STATE_DATA_CURSOR. See Sized Structs.

When viewport_has_value is false, viewport_x, viewport_y, and wide_tail contain undefined data and must not be read.

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

Definition at line 540 of file render.h.

Field Documentation

◆ blinking

bool blinking

Whether the cursor should blink based on terminal modes.

Definition at line 560 of file render.h.

◆ password_input

bool password_input

Whether the cursor is at a password input field.

Definition at line 563 of file render.h.

◆ size

size_t size

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

Definition at line 542 of file render.h.

◆ viewport_has_value

bool viewport_has_value

Whether the cursor is visible within the viewport.

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

Definition at line 545 of file render.h.

◆ viewport_x

uint16_t viewport_x

Cursor viewport x position in cells.

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

Definition at line 548 of file render.h.

◆ viewport_y

uint16_t viewport_y

Cursor viewport y position in cells.

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

Definition at line 551 of file render.h.

◆ visible

bool visible

Whether the cursor is visible based on terminal modes.

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

Definition at line 557 of file render.h.

◆ visual_style

GhosttyCursorStyle visual_style

The visual style of the cursor.

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

Definition at line 566 of file render.h.

◆ wide_tail

bool wide_tail

Whether the cursor is on the tail of a wide character.

Definition at line 554 of file render.h.


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