KetraTerm
API · DevelopmentAll versions

TerminalGraphics

Caller-serialized image admission and placement on the active terminal screen. Images live outside text cells and appear through the render-frame image API. Mutation, response draining and frame reads require the buffer's usual external serialization; session hosts use their session boundary.

Inheritors

Properties

Link copied to clipboard

Invalidation token for incomplete transfers, changed by reset, screen switch and destructive clearing. Compare for inequality, not ordering. This is separate from the render frame's graphics generation.

Functions

Link copied to clipboard

Commits an externally decoded upload or query under the same admission, placement and reply rules as applyGraphicsCommand. The decoder owns payload validation; core still validates controls, image bounds and placement before replacing any retained image. PNG dimensions come from image.

Link copied to clipboard
abstract fun applyGraphicsCommand(command: TerminalGraphicsCommand, data: ByteArray, length: Int, result: TerminalGraphicsResult, allowReplies: Boolean)

Applies a complete command using the Base64-decoded prefix data[0 until length]. command and data are borrowed for this call. Raw RGB/RGBA pixels are copied into immutable storage before returning; upload-only and query operations do not place an image. Placement uses the current cursor and known cell-pixel geometry.