GhosttyTerminalOption enum

Terminal option identifiers.

These values are used with ghostty_terminal_set() to configure terminal callbacks and associated state.

@ingroup terminal

Inheritance
Available extensions

Values

GHOSTTY_TERMINAL_OPT_USERDATA → const GhosttyTerminalOption

Opaque userdata pointer passed to all callbacks.

Input type: void*

const GhosttyTerminalOption(0)
GHOSTTY_TERMINAL_OPT_WRITE_PTY → const GhosttyTerminalOption

Callback invoked when the terminal needs to write data back to the pty (e.g. in response to a DECRQM query or device status report). Set to NULL to ignore such sequences.

Input type: GhosttyTerminalWritePtyFn

const GhosttyTerminalOption(1)
GHOSTTY_TERMINAL_OPT_BELL → const GhosttyTerminalOption

Callback invoked when the terminal receives a BEL character (0x07). Set to NULL to ignore bell events.

Input type: GhosttyTerminalBellFn

const GhosttyTerminalOption(2)
GHOSTTY_TERMINAL_OPT_ENQUIRY → const GhosttyTerminalOption

Callback invoked when the terminal receives an ENQ character (0x05). Set to NULL to send no response.

Input type: GhosttyTerminalEnquiryFn

const GhosttyTerminalOption(3)
GHOSTTY_TERMINAL_OPT_XTVERSION → const GhosttyTerminalOption

Callback invoked when the terminal receives an XTVERSION query (CSI > q). Set to NULL to report the default "libghostty" string.

Input type: GhosttyTerminalXtversionFn

const GhosttyTerminalOption(4)
GHOSTTY_TERMINAL_OPT_TITLE_CHANGED → const GhosttyTerminalOption

Callback invoked when the terminal title changes via escape sequences (e.g. OSC 0 or OSC 2). Set to NULL to ignore title change events.

Input type: GhosttyTerminalTitleChangedFn

const GhosttyTerminalOption(5)
GHOSTTY_TERMINAL_OPT_SIZE → const GhosttyTerminalOption

Callback invoked in response to XTWINOPS size queries (CSI 14/16/18 t). Set to NULL to silently ignore size queries.

Input type: GhosttyTerminalSizeFn

const GhosttyTerminalOption(6)
GHOSTTY_TERMINAL_OPT_COLOR_SCHEME → const GhosttyTerminalOption

Callback invoked in response to a color scheme device status report query (CSI ? 996 n). Return true and fill the out pointer to report the current scheme, or return false to silently ignore. Set to NULL to ignore color scheme queries.

Input type: GhosttyTerminalColorSchemeFn

const GhosttyTerminalOption(7)
GHOSTTY_TERMINAL_OPT_DEVICE_ATTRIBUTES → const GhosttyTerminalOption

Callback invoked in response to a device attributes query (CSI c, CSI > c, or CSI = c). Return true and fill the out pointer with response data, or return false to silently ignore. Set to NULL to ignore device attributes queries.

Input type: GhosttyTerminalDeviceAttributesFn

const GhosttyTerminalOption(8)
GHOSTTY_TERMINAL_OPT_TITLE → const GhosttyTerminalOption

Set the terminal title manually.

The string data is copied into the terminal. A NULL value pointer clears the title (equivalent to setting an empty string).

Input type: GhosttyString*

const GhosttyTerminalOption(9)
GHOSTTY_TERMINAL_OPT_PWD → const GhosttyTerminalOption

Set the terminal working directory manually.

The string data is copied into the terminal. A NULL value pointer clears the pwd (equivalent to setting an empty string).

Input type: GhosttyString*

const GhosttyTerminalOption(10)
GHOSTTY_TERMINAL_OPT_COLOR_FOREGROUND → const GhosttyTerminalOption

Set the default foreground color.

A NULL value pointer clears the default (unset).

Input type: GhosttyColorRgb*

const GhosttyTerminalOption(11)
GHOSTTY_TERMINAL_OPT_COLOR_BACKGROUND → const GhosttyTerminalOption

Set the default background color.

A NULL value pointer clears the default (unset).

Input type: GhosttyColorRgb*

const GhosttyTerminalOption(12)
GHOSTTY_TERMINAL_OPT_COLOR_CURSOR → const GhosttyTerminalOption

Set the default cursor color.

A NULL value pointer clears the default (unset).

Input type: GhosttyColorRgb*

const GhosttyTerminalOption(13)
GHOSTTY_TERMINAL_OPT_COLOR_PALETTE → const GhosttyTerminalOption

Set the default 256-color palette.

The value must point to an array of exactly 256 GhosttyColorRgb values. A NULL value pointer resets to the built-in default palette.

Input type: GhosttyColorRgb[256]*

const GhosttyTerminalOption(14)

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) GhosttyTerminalOption

Constants

values → const List<GhosttyTerminalOption>
A constant List of the values in this enum, in order of their declaration.