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, one-shot evaluator until evaluation or terminal release, and any version services transferred by an adapter until terminal release, but does not directly retain the definition object. The evaluator temporarily retains the complete profile and every caller object, including a definition reference, captured by application content. Content evaluates during the first attach, while later synchronous changes use retained node invalidation before another frame. 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. 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.