KetraTerm
API · DevelopmentAll versions

TerminalColorRequest

class TerminalColorRequest(capacity: Int)

Reusable, ordered OSC 21 operations with borrowed original key bytes.

A producer fills this batch before synchronous delivery. Consumers must not retain or mutate it or its source bytes. Queries observe preceding operations and contribute to one reply in request order. Numeric targets are indexed colors in 0..255; named targets and operations use the constants below.

Storage is allocated once. capacity bounds the number of nonempty fields; it does not impose a wire payload limit, which belongs to the parser.

Constructors

Link copied to clipboard
constructor(capacity: Int)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
var count: Int

Number of initialized operations.

Functions

Link copied to clipboard
fun add(target: Int, operation: Int, color: Int, keyStart: Int, keyEnd: Int)

Appends one operation. color is packed ARGB for SET, otherwise ignored. keyStart inclusive and keyEnd exclusive select the original nonempty key.

Link copied to clipboard
fun clear(payload: ByteArray)

Starts a new batch borrowing payload until its synchronous consumption finishes.

Link copied to clipboard
fun color(index: Int): Int

Packed ARGB argument at index.

Link copied to clipboard
fun keyByte(index: Int, offset: Int): Int

Unsigned original key byte. Unknown keys must be encoded before inclusion in replies.

Link copied to clipboard
fun keyLength(index: Int): Int

Length of the original key in bytes.

Link copied to clipboard
fun operation(index: Int): Int

Operation at index.

Link copied to clipboard
fun target(index: Int): Int

Semantic target at index.