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

#include <ghostty/vt/terminal.h>

Data Fields

bool truncated
GhosttyString content
GhosttyOscTerminator terminator

Detailed Description

An OSC sequence whose number libghostty-vt does not implement.

OSC sequences start with ESC ], followed by a number that identifies the command, usually a ;, and then the command's data. The sequence ends with either BEL or ESC followed by a backslash. For example, a program might write:

ESC ] 7400;status=busy BEL

For that sequence, content is 7400;status=busy and terminator is GHOSTTY_OSC_TERMINATOR_BEL. See Handling sequences we don't implement for a complete example.

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

Definition at line 637 of file terminal.h.

Field Documentation

◆ content

GhosttyString content

Everything between ESC ] and the terminator, including the number at the start. The bytes are not null-terminated and are only valid until the callback returns. Copy them if you need them later.

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

Definition at line 651 of file terminal.h.

◆ terminator

How the program ended the sequence. If you send a reply, end it the same way.

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

Definition at line 657 of file terminal.h.

◆ truncated

bool truncated

True if the sequence was longer than GHOSTTY_TERMINAL_OPT_UNKNOWN_MAX_BYTES, or memory ran out while reading it. In that case content holds only the beginning of the sequence.

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

Definition at line 644 of file terminal.h.


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