GhosttyTerminalData enum
Terminal data types.
These values specify what type of data to extract from a terminal
using ghostty_terminal_get.
@ingroup terminal
Values
- GHOSTTY_TERMINAL_DATA_INVALID → const GhosttyTerminalData
-
Invalid data type. Never results in any data extraction.
const GhosttyTerminalData(0) - GHOSTTY_TERMINAL_DATA_COLS → const GhosttyTerminalData
-
Terminal width in cells.
Output type: uint16_t *
const GhosttyTerminalData(1) - GHOSTTY_TERMINAL_DATA_ROWS → const GhosttyTerminalData
-
Terminal height in cells.
Output type: uint16_t *
const GhosttyTerminalData(2) - GHOSTTY_TERMINAL_DATA_CURSOR_X → const GhosttyTerminalData
-
Cursor column position (0-indexed).
Output type: uint16_t *
const GhosttyTerminalData(3) - GHOSTTY_TERMINAL_DATA_CURSOR_Y → const GhosttyTerminalData
-
Cursor row position within the active area (0-indexed).
Output type: uint16_t *
const GhosttyTerminalData(4) - GHOSTTY_TERMINAL_DATA_CURSOR_PENDING_WRAP → const GhosttyTerminalData
-
Whether the cursor has a pending wrap (next print will soft-wrap).
Output type: bool *
const GhosttyTerminalData(5) - GHOSTTY_TERMINAL_DATA_ACTIVE_SCREEN → const GhosttyTerminalData
-
The currently active screen.
Output type: GhosttyTerminalScreen *
const GhosttyTerminalData(6) - GHOSTTY_TERMINAL_DATA_CURSOR_VISIBLE → const GhosttyTerminalData
-
Whether the cursor is visible (DEC mode 25).
Output type: bool *
const GhosttyTerminalData(7) - GHOSTTY_TERMINAL_DATA_KITTY_KEYBOARD_FLAGS → const GhosttyTerminalData
-
Current Kitty keyboard protocol flags.
Output type: GhosttyKittyKeyFlags * (uint8_t *)
const GhosttyTerminalData(8) - GHOSTTY_TERMINAL_DATA_SCROLLBAR → const GhosttyTerminalData
-
Scrollbar state for the terminal viewport.
This may be expensive to calculate depending on where the viewport is (arbitrary pins are expensive). The caller should take care to only call this as needed and not too frequently.
Output type: GhosttyTerminalScrollbar *
const GhosttyTerminalData(9) - GHOSTTY_TERMINAL_DATA_CURSOR_STYLE → const GhosttyTerminalData
-
The current SGR style of the cursor.
This is the style that will be applied to newly printed characters.
Output type: GhosttyStyle *
const GhosttyTerminalData(10) - GHOSTTY_TERMINAL_DATA_MOUSE_TRACKING → const GhosttyTerminalData
-
Whether any mouse tracking mode is active.
Returns true if any of the mouse tracking modes (X10, normal, button, or any-event) are enabled.
Output type: bool *
const GhosttyTerminalData(11) - GHOSTTY_TERMINAL_DATA_TITLE → const GhosttyTerminalData
-
The terminal title as set by escape sequences (e.g. OSC 0/2).
Returns a borrowed string. The pointer is valid until the next call to ghostty_terminal_vt_write() or ghostty_terminal_reset(). An empty string (len=0) is returned when no title has been set.
Output type: GhosttyString *
const GhosttyTerminalData(12) - GHOSTTY_TERMINAL_DATA_PWD → const GhosttyTerminalData
-
The terminal's current working directory as set by escape sequences (e.g. OSC 7).
Returns a borrowed string. The pointer is valid until the next call to ghostty_terminal_vt_write() or ghostty_terminal_reset(). An empty string (len=0) is returned when no pwd has been set.
Output type: GhosttyString *
const GhosttyTerminalData(13) - GHOSTTY_TERMINAL_DATA_TOTAL_ROWS → const GhosttyTerminalData
-
The total number of rows in the active screen including scrollback.
Output type: size_t *
const GhosttyTerminalData(14) - GHOSTTY_TERMINAL_DATA_SCROLLBACK_ROWS → const GhosttyTerminalData
-
The number of scrollback rows (total rows minus viewport rows).
Output type: size_t *
const GhosttyTerminalData(15) - GHOSTTY_TERMINAL_DATA_WIDTH_PX → const GhosttyTerminalData
-
The total width of the terminal in pixels.
This is cols * cell_width_px as set by ghostty_terminal_resize().
Output type: uint32_t *
const GhosttyTerminalData(16) - GHOSTTY_TERMINAL_DATA_HEIGHT_PX → const GhosttyTerminalData
-
The total height of the terminal in pixels.
This is rows * cell_height_px as set by ghostty_terminal_resize().
Output type: uint32_t *
const GhosttyTerminalData(17) - GHOSTTY_TERMINAL_DATA_COLOR_FOREGROUND → const GhosttyTerminalData
-
The effective foreground color (override or default).
Returns GHOSTTY_NO_VALUE if no foreground color is set.
Output type: GhosttyColorRgb *
const GhosttyTerminalData(18) - GHOSTTY_TERMINAL_DATA_COLOR_BACKGROUND → const GhosttyTerminalData
-
The effective background color (override or default).
Returns GHOSTTY_NO_VALUE if no background color is set.
Output type: GhosttyColorRgb *
const GhosttyTerminalData(19) - GHOSTTY_TERMINAL_DATA_COLOR_CURSOR → const GhosttyTerminalData
-
The effective cursor color (override or default).
Returns GHOSTTY_NO_VALUE if no cursor color is set.
Output type: GhosttyColorRgb *
const GhosttyTerminalData(20) - GHOSTTY_TERMINAL_DATA_COLOR_PALETTE → const GhosttyTerminalData
-
The current 256-color palette.
Output type:
GhosttyColorRgb[256]*const GhosttyTerminalData(21) - GHOSTTY_TERMINAL_DATA_COLOR_FOREGROUND_DEFAULT → const GhosttyTerminalData
-
The default foreground color (ignoring any OSC override).
Returns GHOSTTY_NO_VALUE if no default foreground color is set.
Output type: GhosttyColorRgb *
const GhosttyTerminalData(22) - GHOSTTY_TERMINAL_DATA_COLOR_BACKGROUND_DEFAULT → const GhosttyTerminalData
-
The default background color (ignoring any OSC override).
Returns GHOSTTY_NO_VALUE if no default background color is set.
Output type: GhosttyColorRgb *
const GhosttyTerminalData(23) - GHOSTTY_TERMINAL_DATA_COLOR_CURSOR_DEFAULT → const GhosttyTerminalData
-
The default cursor color (ignoring any OSC override).
Returns GHOSTTY_NO_VALUE if no default cursor color is set.
Output type: GhosttyColorRgb *
const GhosttyTerminalData(24) - GHOSTTY_TERMINAL_DATA_COLOR_PALETTE_DEFAULT → const GhosttyTerminalData
-
The default 256-color palette (ignoring any OSC overrides).
Output type:
GhosttyColorRgb[256]*const GhosttyTerminalData(25)
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- index → int
-
A numeric identifier for the enumerated value.
no setterinherited
- name → String
-
Available on Enum, provided by the EnumName extension
The name of the enum value.no setter - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- value → int
-
final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
fromValue(
int value) → GhosttyTerminalData
Constants
-
values
→ const List<
GhosttyTerminalData> - A constant List of the values in this enum, in order of their declaration.