![]() |
libghostty-vt 0.0.0
|
Respond to what programs ask of the terminal, such as the bell, title changes, and queries. More...
Respond to what programs ask of the terminal, such as the bell, title changes, and queries.
An effect is a callback the terminal calls when a program asks for something the terminal can't do by itself, such as ringing the bell or changing the window title.
You need these as soon as a real program runs in the terminal. Until you register one, the terminal ignores that request, and a program that asks a question gets no answer. If you only feed bytes in to read the result back, you can skip this page.
Full program: c-vt-effects/src/main.c
See the Effects guide for how to register them, the rules for callbacks, the list of effects, and examples.
Enumerations | |
| enum | GhosttyColorScheme |
Data Structures | |
| struct | GhosttyDeviceAttributesPrimary |
| struct | GhosttyDeviceAttributesSecondary |
| struct | GhosttyDeviceAttributesTertiary |
| struct | GhosttyDeviceAttributes |
| struct | GhosttyTerminalUnknownStringSequence |
| struct | GhosttyTerminalUnknownOscSequence |
| union | GhosttyTerminalUnknownSequenceValue |
| struct | GhosttyTerminalUnknownSequence |
| struct | GhosttyClipboardContent |
| struct | GhosttyClipboardWriteReply |
| struct | GhosttyClipboardWrite |
| struct | GhosttyClipboardReadReply |
| struct | GhosttyClipboardRead |
| struct | GhosttyTerminalDesktopNotification |
| struct | GhosttyTerminalProgressReport |
| struct | GhosttyTerminalProgramStatus |
| struct | GhosttyTerminalSemanticPrompt |
| struct | GhosttyTerminalResizeWindowGrid |
| union | GhosttyTerminalResizeWindowValue |
| struct | GhosttyTerminalResizeWindow |
Unknown Sequences | |
| enum | GhosttyTerminalUnknownSequenceTag { GHOSTTY_TERMINAL_UNKNOWN_SEQUENCE_APC = 0 , GHOSTTY_TERMINAL_UNKNOWN_SEQUENCE_OSC = 1 , GHOSTTY_TERMINAL_UNKNOWN_SEQUENCE_MAX_VALUE = GHOSTTY_ENUM_MAX_VALUE } |
| typedef void(* | GhosttyTerminalUnknownSequenceFn) (GhosttyTerminal terminal, void *userdata, const GhosttyTerminalUnknownSequence *sequence) |
Progress Reports | |
| enum | GhosttyTerminalProgressState { GHOSTTY_TERMINAL_PROGRESS_STATE_REMOVE = 0 , GHOSTTY_TERMINAL_PROGRESS_STATE_SET = 1 , GHOSTTY_TERMINAL_PROGRESS_STATE_ERROR = 2 , GHOSTTY_TERMINAL_PROGRESS_STATE_INDETERMINATE = 3 , GHOSTTY_TERMINAL_PROGRESS_STATE_PAUSE = 4 , GHOSTTY_TERMINAL_PROGRESS_STATE_MAX_VALUE = GHOSTTY_ENUM_MAX_VALUE } |
| typedef void(* | GhosttyTerminalProgressReportFn) (GhosttyTerminal terminal, void *userdata, const GhosttyTerminalProgressReport *report) |
Program Status | |
| enum | GhosttyProgramStatusState { GHOSTTY_PROGRAM_STATUS_STATE_IDLE = 0 , GHOSTTY_PROGRAM_STATUS_STATE_WORKING = 1 , GHOSTTY_PROGRAM_STATUS_STATE_DONE = 2 , GHOSTTY_PROGRAM_STATUS_STATE_BLOCKED = 3 , GHOSTTY_PROGRAM_STATUS_STATE_ERROR = 4 , GHOSTTY_PROGRAM_STATUS_STATE_CLEAR = 5 , GHOSTTY_PROGRAM_STATUS_STATE_MAX_VALUE = GHOSTTY_ENUM_MAX_VALUE } |
| enum | GhosttyProgramStatusKind { GHOSTTY_PROGRAM_STATUS_KIND_NONE = 0 , GHOSTTY_PROGRAM_STATUS_KIND_PERMISSION = 1 , GHOSTTY_PROGRAM_STATUS_KIND_QUESTION = 2 , GHOSTTY_PROGRAM_STATUS_KIND_AUTH = 3 , GHOSTTY_PROGRAM_STATUS_KIND_MAX_VALUE = GHOSTTY_ENUM_MAX_VALUE } |
| typedef void(* | GhosttyTerminalProgramStatusFn) (GhosttyTerminal terminal, void *userdata, const GhosttyTerminalProgramStatus *report) |
Semantic Prompts | |
| enum | GhosttySemanticPromptKind { GHOSTTY_SEMANTIC_PROMPT_INVALID = 0 , GHOSTTY_SEMANTIC_PROMPT_PROMPT_START = 1 , GHOSTTY_SEMANTIC_PROMPT_INPUT_START = 2 , GHOSTTY_SEMANTIC_PROMPT_OUTPUT_START = 3 , GHOSTTY_SEMANTIC_PROMPT_COMMAND_END = 4 , GHOSTTY_SEMANTIC_PROMPT_MAX_VALUE = GHOSTTY_ENUM_MAX_VALUE } |
| enum | GhosttySemanticPromptPromptKind { GHOSTTY_SEMANTIC_PROMPT_PROMPT_PRIMARY = 0 , GHOSTTY_SEMANTIC_PROMPT_PROMPT_RIGHT = 1 , GHOSTTY_SEMANTIC_PROMPT_PROMPT_CONTINUATION = 2 , GHOSTTY_SEMANTIC_PROMPT_PROMPT_SECONDARY = 3 , GHOSTTY_SEMANTIC_PROMPT_PROMPT_MAX_VALUE = GHOSTTY_ENUM_MAX_VALUE } |
| typedef void(* | GhosttyTerminalSemanticPromptFn) (GhosttyTerminal terminal, void *userdata, const GhosttyTerminalSemanticPrompt *event) |
Reset and Resize | |
| enum | GhosttyTerminalResizeWindowTag { GHOSTTY_TERMINAL_RESIZE_WINDOW_GRID = 0 , GHOSTTY_TERMINAL_RESIZE_WINDOW_MAX_VALUE = GHOSTTY_ENUM_MAX_VALUE } |
| typedef void(* | GhosttyTerminalResetFn) (GhosttyTerminal terminal, void *userdata) |
| typedef void(* | GhosttyTerminalResizeWindowFn) (GhosttyTerminal terminal, void *userdata, const GhosttyTerminalResizeWindow *request) |
Bell | |
| typedef void(* | GhosttyTerminalBellFn) (GhosttyTerminal terminal, void *userdata) |
Desktop Notifications | |
| typedef void(* | GhosttyTerminalDesktopNotificationFn) (GhosttyTerminal terminal, void *userdata, const GhosttyTerminalDesktopNotification *notification) |
Queries | |
| typedef bool(* | GhosttyTerminalColorSchemeFn) (GhosttyTerminal terminal, void *userdata, GhosttyColorScheme *out_scheme) |
| typedef bool(* | GhosttyTerminalDeviceAttributesFn) (GhosttyTerminal terminal, void *userdata, GhosttyDeviceAttributes *out_attrs) |
| typedef GhosttyString(* | GhosttyTerminalEnquiryFn) (GhosttyTerminal terminal, void *userdata) |
| typedef bool(* | GhosttyTerminalSizeFn) (GhosttyTerminal terminal, void *userdata, GhosttySizeReportSize *out_size) |
Terminal State | |
| typedef void(* | GhosttyTerminalTitleChangedFn) (GhosttyTerminal terminal, void *userdata) |
| typedef void(* | GhosttyTerminalRenderHoldFn) (GhosttyTerminal terminal, void *userdata, bool held) |
| typedef void(* | GhosttyTerminalPwdChangedFn) (GhosttyTerminal terminal, void *userdata) |
Replies | |
| typedef void(* | GhosttyTerminalWritePtyFn) (GhosttyTerminal terminal, void *userdata, const uint8_t *data, size_t len) |
| typedef GhosttyString(* | GhosttyTerminalXtversionFn) (GhosttyTerminal terminal, void *userdata) |
| typedef void(* GhosttyClipboardReadReplyFn) (const GhosttyClipboardRead *read, const GhosttyClipboardReadReply *reply) |
Function type used to answer a clipboard read request. Obtained from GhosttyClipboardRead::reply; see that struct for the contract.
| read | The request being answered |
| reply | The reply, borrowed only for the duration of this call |
Definition at line 1026 of file terminal.h.
| typedef void(* GhosttyClipboardWriteReplyFn) (const GhosttyClipboardWrite *write, const GhosttyClipboardWriteReply *reply) |
Function type used to answer a clipboard write request. Obtained from GhosttyClipboardWrite::reply; see that struct for the contract.
| write | The request being answered |
| reply | The reply, borrowed only for the duration of this call |
Definition at line 844 of file terminal.h.
| typedef void(* GhosttyTerminalBellFn) (GhosttyTerminal terminal, void *userdata) |
Callback function type for bell.
Called when the terminal receives a BEL character (0x07).
| terminal | The terminal handle |
| userdata | The userdata pointer set via GHOSTTY_TERMINAL_OPT_USERDATA |
Definition at line 575 of file terminal.h.
| typedef void(* GhosttyTerminalClipboardReadFn) (GhosttyTerminal terminal, void *userdata, const GhosttyClipboardRead *read) |
Callback function type for clipboard_read.
Called synchronously when the running program requests clipboard contents via OSC 52 with a "?" payload or a Kitty clipboard (OSC 5522) read. Answering lets the program read the clipboard of the person using your terminal, so you are expected to mediate consent. Because the read is synchronous, an embedder that needs to ask them must block (for example by running a modal prompt) until it has an answer; the VT stream waits until the callback returns.
Answer by calling read->reply(read, &reply) before returning. See GhosttyClipboardRead for the full contract.
OSC 5522 requests carry the program's MIME list, name, and password grant state; a reply that sets remember records a session grant so later requests with the same password arrive with granted set. Kitty itself serves a request for only the targets listing (list with no mimes) without prompting, and embedders are expected to do the same; the terminal never consults grants for such requests (granted is false and one-time passwords are not consumed).
Installing this callback also enables Kitty paste events (mode 5522): ghostty_terminal_paste() sends the program an event instead of the text, and the program's follow-up read arrives here with granted set since the user already pasted. See ghostty_terminal_paste().
| terminal | The terminal handle |
| userdata | The userdata pointer set via GHOSTTY_TERMINAL_OPT_USERDATA |
| read | Borrowed clipboard read request |
Definition at line 1133 of file terminal.h.
| typedef void(* GhosttyTerminalClipboardWriteFn) (GhosttyTerminal terminal, void *userdata, const GhosttyClipboardWrite *write) |
Callback function type for clipboard_write.
You may ask for permission to write or perform the write async, but the callback itself is synchronous and the reply function must be called during the lifetime of this function. While this callback is active the VT stream is paused.
Answer by calling write->reply(write, &reply) before returning. See GhosttyClipboardWrite for the full contract.
The request may carry an optional program name requesting the write and the state of prior permission granted. If can_remember is set the response may set the remember flag and future requests from this same program will be "granted" and you can skip permission requests.
Clipboard read requests (OSC 52 "?" and OSC 5522 reads) are delivered to GhosttyTerminalClipboardReadFn instead.
| terminal | The terminal handle |
| userdata | The userdata pointer set via GHOSTTY_TERMINAL_OPT_USERDATA |
| write | Borrowed atomic clipboard write request |
Definition at line 935 of file terminal.h.
| typedef bool(* GhosttyTerminalColorSchemeFn) (GhosttyTerminal terminal, void *userdata, GhosttyColorScheme *out_scheme) |
Callback function type for color scheme queries (CSI ? 996 n).
Called when the terminal receives a color scheme device status report query. Return true and fill *out_scheme with the current color scheme, or return false to silently ignore the query.
The library sets *out_scheme to GHOSTTY_COLOR_SCHEME_LIGHT (zero) before the call, so returning true without writing it reports light. If the callback writes a value that isn't a GhosttyColorScheme, the library ignores the query, the same as if the callback returned false.
| terminal | The terminal handle | |
| userdata | The userdata pointer set via GHOSTTY_TERMINAL_OPT_USERDATA | |
| [out] | out_scheme | Pointer to store the current color scheme |
Definition at line 1761 of file terminal.h.
| typedef void(* GhosttyTerminalDesktopNotificationFn) (GhosttyTerminal terminal, void *userdata, const GhosttyTerminalDesktopNotification *notification) |
Callback function type for desktop notifications.
Called synchronously when the terminal receives OSC 9 or OSC 777.
| terminal | The terminal handle |
| userdata | The userdata pointer set via GHOSTTY_TERMINAL_OPT_USERDATA |
| notification | Borrowed desktop notification request |
Definition at line 1176 of file terminal.h.
| typedef bool(* GhosttyTerminalDeviceAttributesFn) (GhosttyTerminal terminal, void *userdata, GhosttyDeviceAttributes *out_attrs) |
Callback function type for device attributes queries (DA1/DA2/DA3).
Called when the terminal receives a device attributes query (CSI c, CSI > c, or CSI = c). Return true and fill *out_attrs with the response data, or return false to silently ignore the query.
The terminal uses whichever sub-struct (primary, secondary, tertiary) matches the request type, but all three should be filled for simplicity.
The library zeroes *out_attrs before the call, so you only need to set the fields you want to report. Every field you leave alone is reported as zero. This callback reports a VT220 with color and clipboard support, and leaves the tertiary unit ID at zero:
GhosttyDeviceAttributes is frozen. If a later version of libghostty-vt needs more fields, it adds a new callback typedef and a new option key, and keeps calling this callback with GhosttyDeviceAttributes forever. A callback written against this header keeps working with every later version of the library.
| terminal | The terminal handle | |
| userdata | The userdata pointer set via GHOSTTY_TERMINAL_OPT_USERDATA | |
| [out] | out_attrs | Pointer to store the device attributes response |
Definition at line 1806 of file terminal.h.
| typedef GhosttyString(* GhosttyTerminalEnquiryFn) (GhosttyTerminal terminal, void *userdata) |
Callback function type for enquiry (ENQ, 0x05).
Called when the terminal receives an ENQ character. Return the response bytes as a GhosttyString. The memory must remain valid until the callback returns. Return a zero-length string to send no response.
| terminal | The terminal handle |
| userdata | The userdata pointer set via GHOSTTY_TERMINAL_OPT_USERDATA |
Definition at line 1824 of file terminal.h.
| typedef void(* GhosttyTerminalProgramStatusFn) (GhosttyTerminal terminal, void *userdata, const GhosttyTerminalProgramStatus *report) |
Callback function type for program status reports (OSC 7501).
Called synchronously each time the running program sends a valid report. See GhosttyTerminalProgramStatus for what a report contains.
The terminal doesn't store reports, so your application keeps them. To follow the specification, keep one record per id. A report with an empty id is about the root record, the program itself. The records follow these rules:
A full reset (RIS, ESC c) removes every record. When that happens, the terminal calls this with a GHOSTTY_PROGRAM_STATUS_STATE_CLEAR report and an empty id, and then calls the GHOSTTY_TERMINAL_OPT_RESET callback.
title and message are already decoded and contain no control characters, but they are still untrusted text from the program. Don't treat them as markup. If you show them outside the terminal, such as in a tab or a notification, remove invisible formatting characters like text direction overrides, and say which terminal the text came from so a program can't pretend to be one running elsewhere.
Example, where Records, records_clear, and records_put stand in for your application's own storage:
| terminal | The terminal handle |
| userdata | The userdata pointer set via GHOSTTY_TERMINAL_OPT_USERDATA |
| report | The report. It and its strings are only valid during the call. |
Definition at line 1469 of file terminal.h.
| typedef void(* GhosttyTerminalProgressReportFn) (GhosttyTerminal terminal, void *userdata, const GhosttyTerminalProgressReport *report) |
Callback function type for progress reports.
Called synchronously when the terminal receives OSC 9;4.
| terminal | The terminal handle |
| userdata | The userdata pointer set via GHOSTTY_TERMINAL_OPT_USERDATA |
| report | Borrowed progress report |
Definition at line 1239 of file terminal.h.
| typedef void(* GhosttyTerminalPwdChangedFn) (GhosttyTerminal terminal, void *userdata) |
Callback function type for pwd_changed.
Called when the terminal pwd (current working directory) changes via escape sequences: OSC 7 (file:// URI), OSC 9 (ConEmu CurrentDir), or OSC 1337 CurrentDir (iTerm2). Use ghostty_terminal_get() with GHOSTTY_TERMINAL_DATA_PWD inside the callback to read the new value.
The terminal stores whatever bytes the shell emitted, without parsing. That means for OSC 7 the value is the raw URI (typically file://...); for OSC 9/OSC 1337 it is typically a bare path. You are responsible for decoding any URI scheme or host if it cares about them.
The callback also fires when the shell clears the pwd (e.g. an empty OSC 7). In that case GHOSTTY_TERMINAL_DATA_PWD returns a zero-length string.
| terminal | The terminal handle |
| userdata | The userdata pointer set via GHOSTTY_TERMINAL_OPT_USERDATA |
Definition at line 1946 of file terminal.h.
| typedef void(* GhosttyTerminalRenderHoldFn) (GhosttyTerminal terminal, void *userdata, bool held) |
Callback function type for render_hold.
Called when the running program asks the terminal to stop updating the screen, and again when it lets the screen update again. We call the time in between a "render hold". See Render holds for what to do about one.
held is true when the program sets mode 2026 (GHOSTTY_MODE_SYNC_OUTPUT), which is the only way to start a hold today.
held is false when the hold ends, which happens when:
The two calls always come in pairs. Setting the mode while a hold is already active does nothing, and neither does resetting it when there is no hold. Changing the mode yourself with GHOSTTY_TERMINAL_OPT_MODE never invokes the callback.
| terminal | The terminal handle |
| userdata | The userdata pointer set via GHOSTTY_TERMINAL_OPT_USERDATA |
| held | True when a hold begins, false when it ends |
Definition at line 1920 of file terminal.h.
| typedef void(* GhosttyTerminalResetFn) (GhosttyTerminal terminal, void *userdata) |
Callback function type for reset.
Called when the running program performs a full reset (RIS, ESC c). A full reset clears the screen and scrollback, returns modes to their defaults, and clears the title and working directory. Use this callback to reset any state your application keeps about what's running in the terminal, such as the current command.
The terminal has already reset itself when this is called. The GHOSTTY_TERMINAL_OPT_TITLE_CHANGED and GHOSTTY_TERMINAL_OPT_PWD_CHANGED callbacks are not called for the cleared title and working directory, so update anything you show for them here. A full reset also removes any progress report and program status records. If you set GHOSTTY_TERMINAL_OPT_PROGRESS_REPORT or GHOSTTY_TERMINAL_OPT_PROGRAM_STATUS, those callbacks are called before this one.
A soft reset (DECSTR, CSI ! p) keeps the screen, title and working directory, and doesn't call this.
| terminal | The terminal handle |
| userdata | The userdata pointer set via GHOSTTY_TERMINAL_OPT_USERDATA |
Definition at line 1657 of file terminal.h.
| typedef void(* GhosttyTerminalResizeWindowFn) (GhosttyTerminal terminal, void *userdata, const GhosttyTerminalResizeWindow *request) |
Callback function type for window resize requests.
Called synchronously when the running program asks to resize the window, such as with CSI 8 ; rows ; columns t. Check request->tag first, because more kinds of requests may be reported in later versions. The terminal is not resized by this: you decide whether to allow the request, and if so resizes its window and the terminal. Letting any program resize the window is a nuisance at best, so consider making this opt-in for users.
| terminal | The terminal handle |
| userdata | The userdata pointer set via GHOSTTY_TERMINAL_OPT_USERDATA |
| request | Borrowed resize request |
Definition at line 1731 of file terminal.h.
| typedef void(* GhosttyTerminalSemanticPromptFn) (GhosttyTerminal terminal, void *userdata, const GhosttyTerminalSemanticPrompt *event) |
Callback function type for semantic_prompt.
Called when the shell reports a step of a command. Each command goes through four steps, in this order: the prompt starts, input starts, output starts, and the command ends. Then the next prompt starts.
Shells differ in what they report. Many don't send the command line or the exit code, and some skip steps, so handle each event on its own instead of expecting a strict order. A shell may also start the same prompt more than once, for example when it redraws the prompt after a resize, so treat a repeated GHOSTTY_SEMANTIC_PROMPT_PROMPT_START as harmless.
The terminal has already updated its screen when this is called. A sequence the terminal rejects as malformed is never reported.
| terminal | The terminal handle |
| userdata | The userdata pointer set via GHOSTTY_TERMINAL_OPT_USERDATA |
| event | The event. It and its strings are only valid during the call. |
Definition at line 1620 of file terminal.h.
| typedef bool(* GhosttyTerminalSizeFn) (GhosttyTerminal terminal, void *userdata, GhosttySizeReportSize *out_size) |
Callback function type for terminal size reports.
Called in response to XTWINOPS size queries (CSI 14/16/18/19 t) and when VT input enables in-band size reports (mode 2048). Return true and fill *out_size with the current terminal geometry, or return false to suppress the report.
The library zeroes *out_size before the call, so any field you don't write reads as zero. A typical callback copies the geometry from your own window state, passed in through GHOSTTY_TERMINAL_OPT_USERDATA:
GhosttySizeReportSize is frozen. If a later version of libghostty-vt needs more fields, it adds a new callback typedef and a new option key, and keeps calling this callback with GhosttySizeReportSize forever. A callback written against this header keeps working with every later version of the library.
| terminal | The terminal handle | |
| userdata | The userdata pointer set via GHOSTTY_TERMINAL_OPT_USERDATA | |
| [out] | out_size | Pointer to store the terminal size information |
Definition at line 1866 of file terminal.h.
| typedef void(* GhosttyTerminalTitleChangedFn) (GhosttyTerminal terminal, void *userdata) |
Callback function type for title_changed.
Called when the terminal title changes via escape sequences (e.g. OSC 0 or OSC 2). Use ghostty_terminal_get() with GHOSTTY_TERMINAL_DATA_TITLE inside the callback to read the new value.
| terminal | The terminal handle |
| userdata | The userdata pointer set via GHOSTTY_TERMINAL_OPT_USERDATA |
Definition at line 1888 of file terminal.h.
| typedef void(* GhosttyTerminalUnknownSequenceFn) (GhosttyTerminal terminal, void *userdata, const GhosttyTerminalUnknownSequence *sequence) |
Callback function type for unsupported terminal sequences.
Called once for each complete sequence that libghostty-vt does not implement. Check sequence->tag first, because more kinds of sequences may be reported in later versions.
These are not reported:
The callback runs during ghostty_terminal_vt_write(). It may write a reply to the pty, and that reply stays in order with the terminal's own replies. It must not call ghostty_terminal_vt_write() on the same terminal.
Nothing is reported until GHOSTTY_TERMINAL_OPT_UNKNOWN_MAX_BYTES is also set to a nonzero value. Installing the callback by itself keeps no data and allocates no memory.
| terminal | The terminal handle |
| userdata | The userdata pointer set via GHOSTTY_TERMINAL_OPT_USERDATA |
| sequence | Borrowed unsupported sequence |
Definition at line 722 of file terminal.h.
| typedef void(* GhosttyTerminalWritePtyFn) (GhosttyTerminal terminal, void *userdata, const uint8_t *data, size_t len) |
Callback function type for write_pty.
Called when the terminal needs to write data back to the pty, for example in response to a device status report, mode query, or VT-driven mode 2048 enable. The data is only valid for the duration of the call; you must copy it if it needs to persist.
| terminal | The terminal handle |
| userdata | The userdata pointer set via GHOSTTY_TERMINAL_OPT_USERDATA |
| data | Pointer to the response bytes |
| len | Length of the response in bytes |
Definition at line 1970 of file terminal.h.
| typedef GhosttyString(* GhosttyTerminalXtversionFn) (GhosttyTerminal terminal, void *userdata) |
Callback function type for XTVERSION.
Called when the terminal receives an XTVERSION query (CSI > q). Return the version string (e.g. "myterm 1.0") as a GhosttyString. The memory must remain valid until the callback returns. Return a zero-length string to report the default "libghostty" version.
| terminal | The terminal handle |
| userdata | The userdata pointer set via GHOSTTY_TERMINAL_OPT_USERDATA |
Definition at line 1989 of file terminal.h.
Clipboard destination for a clipboard write.
Protocol-specific destination identifiers are normalized to these values before the clipboard write callback is invoked.
Definition at line 741 of file terminal.h.
Result of a clipboard read reply.
Definition at line 945 of file terminal.h.
Result of a clipboard write reply.
Definition at line 778 of file terminal.h.
| enum GhosttyColorScheme |
What a blocked program needs from the user, in a program status report (OSC 7501).
Definition at line 1289 of file terminal.h.
What a program says it is doing, in a program status report (OSC 7501).
See GhosttyTerminalProgramStatus for an overview of the protocol.
Definition at line 1257 of file terminal.h.
The step of a command that a shell integration event reports.
More kinds may be added in later versions, so ignore any kind you don't handle.
Definition at line 1488 of file terminal.h.
Which prompt a GHOSTTY_SEMANTIC_PROMPT_PROMPT_START event starts.
Most shells only draw a primary prompt. Some also draw a prompt on the right side of the line, or a prompt at the start of each extra line when a command spans several lines.
Definition at line 1517 of file terminal.h.
State of a terminal progress report.
Definition at line 1192 of file terminal.h.
The kind of window resize request passed to a GhosttyTerminalResizeWindowFn callback.
New kinds may be added in later versions. Callbacks should ignore any tag they don't handle.
| Enumerator | |
|---|---|
| GHOSTTY_TERMINAL_RESIZE_WINDOW_GRID | Resize the window's text area to a size in rows and columns (CSI 8 ; rows ; columns t). The value is in value.grid. |
Definition at line 1669 of file terminal.h.
The kind of unsupported sequence passed to a GhosttyTerminalUnknownSequenceFn callback.
New kinds may be added in later versions. Callbacks should ignore any tag they don't handle.
| Enumerator | |
|---|---|
| GHOSTTY_TERMINAL_UNKNOWN_SEQUENCE_APC | Application Program Command (APC). |
| GHOSTTY_TERMINAL_UNKNOWN_SEQUENCE_OSC | Operating System Command (OSC). The value is in value.osc. |
Definition at line 593 of file terminal.h.