TerminalLine

interface TerminalLine

A read-only, EPHEMERAL view of a single physical terminal line.

  • DANGER - TEMPORAL COUPLING: The UI Renderer MUST NOT store or hold references to this object outside the immediate execution scope of the current render frame. The backing memory may mutate at any time if background output arrives.

Properties

Link copied to clipboard
abstract val width: Int

Number of columns in this line.

Functions

Link copied to clipboard
abstract fun getCodepoint(col: Int): Int

Returns the base (first) codepoint for the cell at col.

Link copied to clipboard
abstract fun getPackedAttr(col: Int): Long

Returns the primary packed attribute word for the cell at col.

Link copied to clipboard
abstract fun getPackedExtendedAttr(col: Int): Long

Returns the extended packed attribute word for the cell at col.

Link copied to clipboard
open fun isCluster(col: Int): Boolean

Returns true if the cell at col holds a multi-codepoint grapheme cluster requiring a call to readCluster for full rendering.

Link copied to clipboard
open fun readCluster(col: Int, dest: IntArray): Int

Copies all codepoints of the grapheme cluster at col into dest and returns the number of codepoints written.