TerminalRenderFrame
Short-lived primitive view of the terminal's render state for one viewport.
A frame exposes stable public render encodings, not core internal storage. Consumers should copy rows into caller-owned primitive arrays during the enclosing TerminalRenderFrameReader.readRenderFrame callback.
Properties
Currently active terminal screen buffer.
Generation for retained cell content and terminal-owned row mapping, including off-screen history. Cell, cluster, stored attribute, wrap, resize, scroll, reset, and buffer changes advance this value; cursor and caller-requested viewport changes do not need to. Compare for equality, since generations can wrap.
Current render cursor overlay state.
Number of history lines discarded due to ring buffer capacity wrapping.
Monotonic generation that changes on any visually relevant mutation.
Image-resource, placement or image-geometry invalidation token, local to this source. Compare for inequality and include source, viewport, active buffer and structure in cache keys. Providers implementing copyImages must advance this token and frameGeneration when their image presentation changes; text-row generations need not change. The default describes a provider without images.
Generation of retained-history identity and layout in activeBuffer.
Number of retained off-screen history lines available in this frame.
Exclusive absolute row boundary of retained output in the active buffer, independent of the requested viewport. Rows before this boundary include admitted history, written text and explicitly authored blank lines; an untouched live tail is excluded. Cursor movement alone does not advance it. Changes advance contentGeneration and frameGeneration, including an explicit line feed that authors a previously untouched blank row.
Currently active resolved color palette. The default is shared and immutable.
Clamped scrollback offset used by this frame, in lines from the live bottom viewport. Zero means the frame is pinned to the newest output.
Generation that changes when terminal-owned row mapping or shape changes.
Functions
Copies the current cursor overlay state into sink.
Delivers visible image placements synchronously in back-to-front stacking order. Placement metadata must be copied during this frame's callback; immutable TerminalRenderImage resources may be retained. The default supplies no images.
Copies one visible row into caller-owned primitive arrays in logical terminal-column order.
Copies only text and cell geometry for one visible row, in logical column order.
Returns the generation for visible row.
Reports whether visible row soft-wraps into the next row.