RealmUI Runtime
State Flow
- Host sends
CmdUiDocumentCreate,CmdUiThemeDefine,CmdUiApplyOps. - Core updates
UiState(documents,themes,images, focus, and caches). - UI pass executes layout/paint and generates draw data.
eguiplatform output becomes:- internal window/cursor/IME commands;
- host events (
UiOpenUrl, clipboard, screenshot request, viewport sync).
Input
- Pointer/keyboard come from the input subsystem.
- Routing passes through
target layerand resolves realm/document focus. - For
RealmPlane/WidgetRealmViewport, position is transformed to local coordinates.
Output
- Widget events:
EngineEvent::Ui(UiEvent). - UI system events:
EngineEvent::System(SystemEvent::Ui*). - Diagnostic failures:
SystemEvent::Erroris also emitted.
Async Resources
CmdUiImageCreateFromBufferstarts async decode.- Progress events:
UiImageProcessingStartedUiImageProcessingProgressUiImageProcessingFinishedUiImageReady
CmdUiImageDisposecancels pending decode and discards results.
Focus
- Focus is mapped by
windowId + realmId + documentId + nodeId. - Commands:
CmdUiFocusSetCmdUiFocusGet
Input Trace
CmdUiEventTraceSetcontrols:- level (
off/errors/basic/full); - sampling (
0..100).
- level (
- Trace includes realm/target/layer hops for routing diagnostics.
Documentation Vulfram Core