TerminalReader

interface TerminalReader

Zero-allocation read contract for the terminal buffer.

Exposes viewport-relative state plus random-access helpers for the currently active screen buffer. Out-of-bounds probes never throw; they return stable sentinel values so renderers can remain branch-light.

Inheritors

Properties

Link copied to clipboard
abstract val cursorCol: Int

Active cursor column in zero-based viewport coordinates.

Link copied to clipboard
abstract val cursorRow: Int

Active cursor row in zero-based viewport coordinates.

Link copied to clipboard
abstract val height: Int

Current viewport height in rows.

Link copied to clipboard
abstract val historySize: Int

Number of retained off-screen history lines in the active buffer.

Link copied to clipboard
abstract val iconTitle: String

Active xterm icon title.

Link copied to clipboard
abstract val width: Int

Current viewport width in cells.

Link copied to clipboard
abstract val windowTitle: String

Active xterm window title.

Functions

Link copied to clipboard
abstract fun getCodepointAt(col: Int, row: Int): Int

Returns the display/base codepoint at [col, row].

Link copied to clipboard
abstract fun getLine(row: Int): TerminalLine

Returns the visible line at row, or a shared void line when row is out of bounds.

Link copied to clipboard
abstract fun getPackedAttrAt(col: Int, row: Int): Long

Returns the primary packed cell attribute word at [col, row].

Link copied to clipboard
abstract fun getPackedExtendedAttrAt(col: Int, row: Int): Long

Returns the extended packed cell attribute word at [col, row].