Interface IVTParserHandler
Interface for handling events emitted by the VTParser. Implementations receive parsed VT/ANSI escape sequence events and translate them into terminal state mutations.
Namespace: Scylla.TextMode
Assembly: ScyllaTextMode.dll
Syntax
public interface IVTParserHandler
Methods
CSIDispatch(ReadOnlySpan<int>, ReadOnlySpan<byte>, byte)
A CSI (Control Sequence Introducer) sequence has been parsed. CSI sequences are the primary mechanism for cursor movement, erasing, SGR, etc.
Declaration
void CSIDispatch(ReadOnlySpan<int> parameters, ReadOnlySpan<byte> intermediates, byte finalByte)
Parameters
| Type | Name | Description |
|---|---|---|
| ReadOnlySpan<int> | parameters | Parsed numeric parameters (semicolon-separated in the escape sequence). |
| ReadOnlySpan<byte> | intermediates | Intermediate bytes (between CSI and final byte). |
| byte | finalByte | The final byte that identifies the specific command. |
DCSHook(ReadOnlySpan<int>, ReadOnlySpan<byte>, byte)
A DCS (Device Control String) sequence is starting.
Declaration
void DCSHook(ReadOnlySpan<int> parameters, ReadOnlySpan<byte> intermediates, byte finalByte)
Parameters
| Type | Name | Description |
|---|---|---|
| ReadOnlySpan<int> | parameters | Parsed numeric parameters. |
| ReadOnlySpan<byte> | intermediates | Intermediate bytes. |
| byte | finalByte | The final byte. |
DCSPut(byte)
Data within a DCS passthrough sequence.
Declaration
void DCSPut(byte data)
Parameters
| Type | Name | Description |
|---|---|---|
| byte | data | The passthrough byte. |
DCSUnhook()
A DCS sequence has ended.
Declaration
void DCSUnhook()
ESCDispatch(ReadOnlySpan<byte>, byte)
An ESC (Escape) sequence has been parsed. Used for simpler sequences like DECSC, DECRC, and character set selection.
Declaration
void ESCDispatch(ReadOnlySpan<byte> intermediates, byte finalByte)
Parameters
| Type | Name | Description |
|---|---|---|
| ReadOnlySpan<byte> | intermediates | Intermediate bytes. |
| byte | finalByte | The final byte. |
Execute(byte)
A C0 or C1 control character should be executed. Common controls: BEL (0x07), BS (0x08), HT (0x09), LF (0x0A), CR (0x0D).
Declaration
void Execute(byte control)
Parameters
| Type | Name | Description |
|---|---|---|
| byte | control | The control byte. |
OSCDispatch(ReadOnlySpan<byte>)
An OSC (Operating System Command) sequence has been parsed. Used for window title, hyperlinks, clipboard, etc.
Declaration
void OSCDispatch(ReadOnlySpan<byte> data)
Parameters
| Type | Name | Description |
|---|---|---|
| ReadOnlySpan<byte> | data | The raw OSC data bytes. |
Print(int)
A printable character should be displayed at the current cursor position.
Declaration
void Print(int codepoint)
Parameters
| Type | Name | Description |
|---|---|---|
| int | codepoint | Unicode codepoint to print. |