RuntimeUiController

class RuntimeUiController(presentation: UiPresentation, inputPolicy: UiInputPolicy = UiInputPolicy.BlockAll, apply: (RuntimeUiControl) -> Unit, close: (UiCloseReason) -> Unit) : UiSession(source)

Execution-owner-confined control state shared by native and remote sessions. Drivers acknowledge completion with applied or rejected; returning from the driver is not an acknowledgement. transaction defers controls until the outer event/lifecycle boundary returns. Driver and cleanup captures are released before terminal cleanup calls user code.

Constructors

Link copied to clipboard
constructor(presentation: UiPresentation, inputPolicy: UiInputPolicy = UiInputPolicy.BlockAll, apply: (RuntimeUiControl) -> Unit, close: (UiCloseReason) -> Unit)

Properties

Link copied to clipboard
open override val inputPolicy: UiInputPolicy
Link copied to clipboard
Link copied to clipboard
open override val presentation: UiPresentation?
Link copied to clipboard
open override val status: UiSessionStatus

Functions

Link copied to clipboard
fun applied(sequence: Long)

Acknowledges the most recent request after native wrapper/input changes complete. Older responses, duplicates, and replies after close cannot change any applied state.

Link copied to clipboard
open override fun close()
Link copied to clipboard
fun rejected(sequence: Long, reason: UiRejection)

Rejects the current request, retaining the last applied configuration.

Link copied to clipboard
open override fun setInputPolicy(policy: UiInputPolicy): UiOperationResult
Link copied to clipboard
Link copied to clipboard
fun start()

Begins the initial request after the driver and its native ownership have been installed.

Link copied to clipboard
open override fun switch(presentation: UiPresentation): UiOperationResult
Link copied to clipboard

Ends this handle for a platform lifecycle reason; repeated termination keeps the first reason.

Link copied to clipboard
fun <T> transaction(operation: () -> T): T

Runs an event or host operation, coalescing requests and prioritizing close at its outer boundary.