MinecraftUiHost

Owner-thread bridge for one Minecraft screen definition host.

Lifecycle, frame, input, and close calls are synchronous and must run on the construction thread. The host retains its independent core runtime session, transferred metadata, reusable component evaluator until terminal release, one resource-image resolver shared by initial and deferred evaluation until terminal release, and any version services transferred by an adapter until terminal release, but does not directly retain the definition object. The core session exclusively retains application content and its capture graph until terminal release before node cleanup; the component evaluator retains only profile and presentation services. Content evaluates during the first attach and reevaluates before a later frame after observed state changes. The host exposes no coroutine, local-state, source-binding, resource, rendering, or version-specific contract. Core lifecycle, first-frame input gating, failure identity, suppression order, and cleanup behavior are delegated unchanged. Every factory call creates distinct retained ownership with referential identity.

Properties

Link copied to clipboard
abstract val pausesGame: Boolean

Whether the transferred screen pauses the game while active.

Link copied to clipboard

Detached identity of the current editable focus interval, or null without committed editable focus.

Link copied to clipboard
abstract val title: UiText

Exact unresolved title transferred from the one-shot definition.

Functions

Link copied to clipboard
abstract fun attach()

Attaches this host on its owner thread.

Link copied to clipboard
abstract override fun close()

Closes this host on its owner thread.

Link copied to clipboard
abstract fun detach()

Detaches this host on its owner thread while retaining the core tree for reattachment.

Link copied to clipboard

Dispatches one keyboard event 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. Dirty retained geometry synchronizes as described by dispatchPointer.

Link copied to clipboard

Dispatches one pointer event through the most recently committed frame.

Link copied to clipboard

Dispatches one committed-character or input-method preedit event to the focused component in the most recently committed frame. Dirty retained geometry synchronizes as described by dispatchPointer.

Link copied to clipboard
abstract fun frame(viewport: IntSize): RuntimeUiFrame

Produces one immutable frame for the supplied viewport.

abstract fun frame(viewport: IntSize, time: FrameTime): RuntimeUiFrame

Produces one immutable frame with an explicit host-clock timestamp for animated nodes.

Link copied to clipboard
abstract fun resetInputState()

Cancels captured pointer input and clears hover and focus when the native window loses input ownership.

Link copied to clipboard