Table of Contents

Interface ITerminalBackend

Namespace
MiniTui
Assembly
MiniTui.dll

Where frames go: a real terminal, the legacy console API, or an in-memory grid for tests. Terminal owns the double buffer and diffing, and passes the backend only the changed cells.

public interface ITerminalBackend : IDisposable
Inherited Members

Methods

Draw(IReadOnlyList<CellUpdate>, (int X, int Y)?, bool)

Draw changed cells. Continuation cells are never included: a wide cell covers the cell to its right.

void Draw(IReadOnlyList<CellUpdate> updates, (int X, int Y)? cursor, bool fullRedraw)

Parameters

updates IReadOnlyList<CellUpdate>

The changed cells.

cursor (int X, int Y)?

Where to show the cursor, or null to hide it.

fullRedraw bool

Clear the screen first; updates then contains every cell.

Enter()

Put the terminal into TUI mode (alternate screen, hidden cursor, ...). Idempotent.

void Enter()

GetSize()

The current terminal size in cells.

(int Width, int Height) GetSize()

Returns

(int Width, int Height)

Leave()

Restore the terminal to how it was before Enter(). Idempotent and never throws.

void Leave()