KetraTerm
API · DevelopmentAll versions

TerminalTextRangeCopy

class TerminalTextRangeCopy(val maxRows: Int = 64, val maxCells: Int = 4096)

Worker-confined, reusable text-only copy of a bounded absolute row range.

Only primitive copying occurs inside the reader callback. Arrays are borrowed until the next read; only rows times columns cells are active. Every active code/flag entry is overwritten, so spare capacity needs no clearing. Cluster references are meaningful only for cells with the CLUSTER flag and a nonzero reference.

Bounds and cancellation have the same meaning as TerminalRenderRangeCopy. Failed or empty reads leave rows zero; partially copied arrays must not be consumed.

Constructors

Link copied to clipboard
constructor(maxRows: Int = 64, maxCells: Int = 4096)

Properties

Link copied to clipboard

Source buffer for the completed batch.

Link copied to clipboard

Primitive cluster payload, valid only through references in active cluster cells.

Link copied to clipboard

Packed cluster offset (high 32 bits) and length (low 32 bits).

Link copied to clipboard

Unicode scalars, with zero for empty, cluster, and trailing cells.

Link copied to clipboard

Column stride of the active cell arrays; usable when rows is nonzero.

Link copied to clipboard

Source content generation for the completed batch.

Link copied to clipboard

First row of the requested/retained intersection.

Link copied to clipboard

Public render cell flags, including wide cells and wrap padding.

Link copied to clipboard

Source history identity/layout generation for the completed batch.

Link copied to clipboard

Inclusive last copied row, or less than firstAbsoluteRow for an empty read.

Link copied to clipboard

Source generations for active rows.

Link copied to clipboard

Source identities for active rows.

Link copied to clipboard

Whether each active physical row continues into the next.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
var rows: Int

Number of usable rows; zero until a read completes successfully.

Functions

Link copied to clipboard
fun read(reader: TerminalRenderFrameReader, startAbsoluteRow: Long, endAbsoluteRow: Long, checkCancelled: () -> Unit = {}): Boolean

Copies one retained intersection, at most maxRows rows and maxCells cells, except that a single row wider than the cell budget is allowed. Returns whether a complete nonempty batch was copied. checkCancelled must not suspend or block.