KetraTerm
API · DevelopmentAll versions

TerminalLine

interface TerminalLine

Read-only borrowed view of one physical terminal line.

Read only while the owning terminal is serialized against mutation and do not retain the view after releasing that serialization. Mutations may replace or reuse its backing storage. Renderer-owned copies use the public render frame contract.

Properties

Link copied to clipboard
abstract val width: Int

Number of columns in this line.

Functions

Link copied to clipboard
open fun getClusterLength(col: Int): Int

Returns the number of codepoints in the cluster at col, or 0 for a scalar, blank, or wide spacer cell. This is the capacity required by readCluster, not a UTF-16 length or a display width.

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

Returns the base (first) codepoint 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.