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 and reevaluated before a later frame when caller-owned observed state changes. 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.
Properties
Functions
Runs an authenticated remote action on the session owner thread. The adapter must validate connection ownership, endpoint generation, and event data first. State mutations are allowed; failures poison the session and preserve cleanup failure ordering.
Dispatches one keyboard event synchronously to the focused component in the most recently committed frame. When focused handlers ignore a Tab press, the retained tree traverses visible accepting owners in cyclic paint order, with Shift reversing direction. Pending geometry uses the same pre-input synchronization as dispatchPointer.
Dispatches one pointer event synchronously through the most recently committed attached tree on the owner thread.
Dispatches one committed-character or preedit event synchronously to the focused component in the most recently committed frame. Pending geometry uses the same pre-input synchronization as dispatchPointer.
Produces one immutable frame synchronously on the owner thread.
Produces one immutable frame after delivering an explicit monotonic timestamp to time-aware nodes.
Commits the shared declaration cutoff and calls project without measuring or painting. The callback is owner-thread confined, read-only, and cannot reenter session operations. Its failure poisons and cleans the session exactly like a frame failure. This operation does not enable geometry-based pointer or keyboard dispatch.
Cancels pointer capture and clears hover and focused input after window blur or an explicit platform input reset.
Starts owner-thread monitoring at an operation boundary with existing nodes as the baseline. A second active monitor, reentrant access, or an unavailable tree is rejected without changing the screen. The caller closes the monitor; terminal tree cleanup also releases it automatically.