IHex1bAppTerminalWorkloadAdapter
Namespace: Hex1b
Assembly: Hex1b.dll
App-side interface: Adds the higher-level APIs that Hex1bApp needs. Extends the terminal-side interface so the same adapter serves both.
public interface IHex1bAppTerminalWorkloadAdapter : IHex1bTerminalWorkloadAdapter, IAsyncDisposableProperties
Capabilities
Terminal capabilities (mouse, sixel, colors, etc.).
Returns: TerminalCapabilities
TerminalCapabilities Capabilities { get; }Height
Current terminal height.
Returns: Int32
int Height { get; }InputEvents
Channel of input events from the terminal.
Returns: ChannelReader<Hex1bEvent>
ChannelReader<Hex1bEvent> InputEvents { get; }OutputQueueDepth
Gets the number of output items waiting to be consumed by the terminal. Can be used to detect back pressure and adjust input processing accordingly.
Returns: Int32
int OutputQueueDepth { get; }Width
Current terminal width.
Returns: Int32
int Width { get; }Methods
Clear()
Clear the screen.
void Clear()EnterTuiMode()
Enter TUI mode (alternate screen, hide cursor, enable mouse if supported, etc.).
void EnterTuiMode()ExitTuiMode()
Exit TUI mode (show cursor, disable mouse, exit alternate screen, etc.).
void ExitTuiMode()Flush()
Flush any buffered output.
void Flush()SetCursorPosition(int, int)
Set the cursor position.
Parameters:
void SetCursorPosition(int left, int top)Write(ReadOnlyMemory<byte>)
Write raw bytes to the terminal without forcing a copy.
Parameters:
data(ReadOnlyMemory<Byte>):
void Write(ReadOnlyMemory<byte> data)Write(ReadOnlySpan<byte>)
Write raw bytes to the terminal.
Parameters:
data(ReadOnlySpan<Byte>):
void Write(ReadOnlySpan<byte> data)Write(string)
Write ANSI-encoded output to the terminal.
Parameters:
text(String):
void Write(string text)Remarks
This interface represents the "app side" of the workload adapter. It provides the convenient APIs that Hex1bApp and its components use: Write(), InputEvents, Width/Height, etc.
The inheritance from ensures that any implementation can also be consumed by the future Hex1bTerminal.