ComponentRuntime

Privileged platform implementation of profile-backed standard components.

The API module retains only this platform-neutral contract while a runtime adapter resolves profile assets, synchronized bindings, and retained implementation nodes during one dynamically scoped screen evaluation. Every method runs synchronously on the evaluation owner thread and must not retain a callback-lifetime scope. Returned immutable elements and modifier chains own any retained snapshots or bindings; the caller owns those returned descriptions and the retained tree later owns their lifecycle resources. Validation, resolution, and arithmetic failures propagate unchanged without emitting a partial description.

Functions

Link copied to clipboard
abstract fun button(label: UiText, width: Int, enabled: Boolean, modifier: Modifier, key: ElementKey<*>?): Element

Creates one profile-backed pointer button element.

Link copied to clipboard
abstract fun checkbox(label: UiText, state: CheckboxState, width: Int, enabled: Boolean, modifier: Modifier, key: ElementKey<*>?): Element

Creates one profile-backed Checkbox with caller-owned selected state.

Link copied to clipboard
abstract fun containerBackground(modifier: Modifier, rows: Int): Modifier

Appends the active profile's generic-container background and sizing behavior.

Link copied to clipboard
abstract fun cycleButton(state: CycleButtonState<*>, labels: List<UiText>, width: Int, enabled: Boolean, modifier: Modifier, key: ElementKey<*>?): Element

Creates one profile-backed finite-option CycleButton.

Link copied to clipboard
abstract fun image(source: ImageSource, sourceRegion: IntRect?, size: IntSize?, modifier: Modifier, key: ElementKey<*>?): Element

Creates one nearest-sampled image after resolving source through the active resource manager when necessary.

Link copied to clipboard
abstract fun imageBackground(modifier: Modifier, source: ImageSource, scale: ImageScale): Modifier

Appends one nearest-sampled image background resolved from source.

abstract fun imageBackground(modifier: Modifier, source: ImageSource, border: Insets, centerMode: NineSliceCenterMode): Modifier

Appends one nine-slice image background resolved from source.

Link copied to clipboard
abstract fun loadingIndicator(size: IntSize, modifier: Modifier, key: ElementKey<*>?): Element

Creates one profile-backed discrete loading animation.

Link copied to clipboard
abstract fun menuBackground(modifier: Modifier): Modifier

Appends the active profile's menu background behavior.

Link copied to clipboard
abstract fun playerHead(source: PlayerSkinSource, size: Int, showHat: Boolean, loading: Element?, failure: Element?, modifier: Modifier, key: ElementKey<*>?): Element

Creates one player-head element and defers any asynchronous lookup represented by source to node attachment.

Link copied to clipboard
abstract fun progressBar(progress: Double, size: IntSize, modifier: Modifier, key: ElementKey<*>?): Element

Creates one profile-backed determinate progress bar.

Link copied to clipboard

Captures an owner-thread evaluator for content constructed after this callback-lifetime runtime closes.

Link copied to clipboard
abstract fun scrollArea(state: ScrollState, content: Element, scrollRate: Int, modifier: Modifier, key: ElementKey<*>?): Element

Creates one profile-backed scroll viewport around exactly one content root.

Link copied to clipboard
abstract fun scrollbar(state: ScrollState, modifier: Modifier, key: ElementKey<*>?): Element

Creates one independently placed profile-backed vertical scrollbar.

Link copied to clipboard
abstract fun slider(label: UiText, state: SliderState, width: Int, enabled: Boolean, modifier: Modifier, key: ElementKey<*>?): Element

Creates one profile-backed horizontal Slider.

Link copied to clipboard
abstract fun slot(binding: SlotBinding?, highlightable: Boolean, item: Element?, modifier: Modifier, key: ElementKey<*>?): Element

Creates one ordinary or synchronized profile-backed slot element.

Link copied to clipboard
abstract fun tab(label: UiText, selected: Boolean, width: Int, enabled: Boolean, indicator: TabSelectionIndicator, customIndicator: Element?, modifier: Modifier, key: ElementKey<*>?): Element

Creates one profile-backed tab element with an optional selected custom indicator root.

Link copied to clipboard
abstract fun text(text: UiText, style: TextStyle, modifier: Modifier, key: ElementKey<*>?): Element

Creates one profile-backed text element.

open fun text(text: UiText, layout: TextLayout, style: TextStyle, modifier: Modifier, key: ElementKey<*>?): Element

Creates one profile-backed text element with an explicit line layout.

Link copied to clipboard
open fun textArea(state: TextAreaState, viewport: TextAreaViewport, enabled: Boolean, style: TextStyle, wrap: TextWrap, lineSpacing: Int, modifier: Modifier, key: ElementKey<*>?): Element

Creates one profile-backed multiline editor observing caller-owned text and scroll state.

open fun textArea(state: TextAreaState, viewport: TextAreaViewport, appearance: TextInputAppearance, enabled: Boolean, style: TextStyle, wrap: TextWrap, lineSpacing: Int, modifier: Modifier, key: ElementKey<*>?): Element
open fun textArea(state: TextAreaState, viewport: TextAreaViewport, appearance: TextInputAppearance, enabled: Boolean, style: TextStyle, font: ResourceId, wrap: TextWrap, lineSpacing: Int, modifier: Modifier, key: ElementKey<*>?): Element

Creates an editor with an independently resolved frame and editing-decoration appearance. Caller state and font ownership follow the existing editor overload; appearance changes do not reset editing. Default appearance delegates to the legacy overload for compatible third-party runtimes.

open fun textArea(state: TextAreaState, viewport: TextAreaViewport, enabled: Boolean, style: TextStyle, font: ResourceId, wrap: TextWrap, lineSpacing: Int, modifier: Modifier, key: ElementKey<*>?): Element

Creates one multiline editor using an explicitly selected resource-pack font.

Link copied to clipboard
abstract fun textField(state: TextFieldState, size: IntSize, enabled: Boolean, style: TextStyle, modifier: Modifier, key: ElementKey<*>?): Element

Creates one profile-backed text-field element observing state.

open fun textField(state: TextFieldState, size: IntSize, appearance: TextInputAppearance, enabled: Boolean, style: TextStyle, modifier: Modifier, key: ElementKey<*>?): Element
open fun textField(state: TextFieldState, size: IntSize, appearance: TextInputAppearance, enabled: Boolean, style: TextStyle, font: ResourceId, modifier: Modifier, key: ElementKey<*>?): Element

Creates an editor with an independently resolved frame and editing-decoration appearance. Caller state and font ownership follow the existing editor overload; appearance changes do not reset editing. Default appearance delegates to the legacy overload for compatible third-party runtimes.

open fun textField(state: TextFieldState, size: IntSize, enabled: Boolean, style: TextStyle, font: ResourceId, modifier: Modifier, key: ElementKey<*>?): Element

Creates one profile-backed text field with an explicitly selected resource-pack font. The default implementation rejects this capability so existing runtime implementations remain source and binary compatible.

Link copied to clipboard
abstract fun tooltip(modifier: Modifier, text: UiText, delayMillis: Long): Modifier

Adds one profile-backed delayed tooltip behavior.

open fun tooltip(modifier: Modifier, content: Element, decorated: Boolean, delayMillis: Long): Modifier

Adds common retained tooltip behavior, optionally applying the standard surface and inset. The supplied immutable content is evaluated before this boundary and must not be invoked from paint.

open fun tooltip(modifier: Modifier, text: UiText, decorated: Boolean, delayMillis: Long): Modifier

Adds a text tooltip with an explicit standard-decoration policy.