RuntimeUiSession

Narrow owner-thread bridge for a retained runtime UI session.

The construction thread owns this session, and lifecycle and frame operations are synchronous on that thread. Operations reject reentrancy except that recursive close from its own cleanup is an idempotent no-op. The first successful frame gates pointer dispatch. This synchronous bridge does not expose local-state declarations, source bindings, or task launch. Its content is evaluated during the first attach, while later synchronous changes are driven by retained node invalidation before another frame. The bridge retains the content lambda while created, attached, or detached and releases it before cleanup callbacks after failure or close.

Content, reconciliation, pipeline, input, and cleanup failures preserve the exact primary Throwable and suppression order defined by the core session. A failed session has already performed cleanup; closing it records the closed terminal state without repeating cleanup.

Functions

Link copied to clipboard
abstract fun attach()

Attaches this session on its owner thread.

Link copied to clipboard
abstract override fun close()

Closes this session synchronously on its owner thread.

Link copied to clipboard
abstract fun detach()

Detaches this attached session on its owner thread while retaining its tree and content ownership.

Link copied to clipboard

Dispatches one keyboard event synchronously to the focused component in the most recently committed frame.

Link copied to clipboard

Dispatches one pointer event synchronously through the most recently committed attached tree on the owner thread.

Link copied to clipboard

Dispatches one committed-character or preedit event synchronously to the focused component in the most recently committed frame.

Link copied to clipboard
abstract fun frame(constraints: Constraints): RuntimeUiFrame

Produces one immutable frame synchronously on the owner thread.

abstract fun frame(constraints: Constraints, time: FrameTime): RuntimeUiFrame

Produces one immutable frame after delivering an explicit monotonic timestamp to time-aware nodes.