![]() |
libghostty-vt 0.0.0
|
#include <ghostty/vt/terminal.h>
Data Fields | |
| size_t | size |
| size_t | consumed |
| uint32_t | reached |
| GhosttyTerminalStringKind | kind |
| GhosttyTerminalStringIntroducer | introducer |
| GhosttyTerminalStringEnd | end |
| uint8_t | byte |
Where ghostty_terminal_vt_write_until() stopped, and why.
This is a sized struct. Initialize it with GHOSTTY_INIT_SIZED() before the first call. See Sized Structs. Each call resets every field except size before it writes the result, so you can reuse one struct across calls.
Fields that don't apply to a stop are zero. Zero is also a valid value for kind, introducer and end, so always check reached first to see which fields apply.
Definition at line 374 of file terminal.h.
| uint8_t byte |
The byte that started or ended the string, such as ], 0x90, ESC or BEL. Valid when reached has a START or END flag.
Definition at line 428 of file terminal.h.
| size_t consumed |
Number of input bytes consumed, including the byte that reached the boundary. This is 0 when the stream was already at ground and you asked for GHOSTTY_TERMINAL_BOUNDARY_GROUND.
Definition at line 383 of file terminal.h.
How the string ended. Valid when reached has an END flag.
Definition at line 422 of file terminal.h.
| GhosttyTerminalStringIntroducer introducer |
How the string started. Valid when reached has a START flag.
Definition at line 419 of file terminal.h.
The kind of string. Valid when reached has a START or END flag.
When one byte both ends a string and starts another, this is the kind of the string that ended. The START flag in reached names the kind that started, since APC_START, DCS_START and OSC_START each belong to one kind.
Definition at line 416 of file terminal.h.
| uint32_t reached |
The GhosttyTerminalBoundary flags that the stopping byte reached. Only flags you asked for are set, and this is 0 when no boundary was reached.
This is usually one flag. It holds two when a single byte does two things:
A START flag and an END flag of the same kind are never set together.
Definition at line 406 of file terminal.h.
| size_t size |
Size of this struct in bytes. Set by GHOSTTY_INIT_SIZED().
Definition at line 376 of file terminal.h.