GhosttySysOption enum

System option identifiers for ghostty_sys_set().

Inheritance
Available extensions

Values

GHOSTTY_SYS_OPT_USERDATA → const GhosttySysOption

Set the userdata pointer passed to all sys callbacks.

Input type: void* (or NULL)

const GhosttySysOption(0)
GHOSTTY_SYS_OPT_DECODE_PNG → const GhosttySysOption

Set the PNG decode function.

When set, the terminal can accept PNG images via the Kitty Graphics Protocol. When cleared (NULL value), PNG decoding is unsupported and PNG image data will be rejected.

Input type: GhosttySysDecodePngFn (function pointer, or NULL)

const GhosttySysOption(1)
GHOSTTY_SYS_OPT_LOG → const GhosttySysOption

Set the log callback.

When set, internal library log messages are delivered to this callback. When cleared (NULL value), log messages are silently discarded.

Use ghostty_sys_log_stderr as a convenience callback that writes formatted messages to stderr.

Which log levels are emitted depends on the build mode of the library and is not configurable at runtime. Debug builds emit all levels (debug and above). Release builds emit info and above; debug-level messages are compiled out entirely and will never reach the callback.

Input type: GhosttySysLogFn (function pointer, or NULL)

const GhosttySysOption(2)
GHOSTTY_SYS_OPT_RANDOM_SECURE → const GhosttySysOption

Override the secure random source.

By default the library draws secure random bytes from the platform (getrandom or arc4random_buf on POSIX, CNG on Windows). Targets without one, such as wasm32-freestanding, have no default and operations that need entropy fail with GHOSTTY_IO_ERROR until this is set. When set, it is used instead of the platform source on every target. When cleared (NULL value), the platform default is restored.

Input type: GhosttySysRandomSecureFn (function pointer, or NULL)

const GhosttySysOption(3)
GHOSTTY_SYS_OPT_MAX_VALUE → const GhosttySysOption
const GhosttySysOption(2147483647)

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

Constants

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