Expand description
§uzor-framework — the app engine
Role: kernel (+ engines, handle, host shells by module — see module table)
Owns: on-screen state only — windows, layout / dock trees, overlay stacks, focus scopes, pointer
capture, hover / press, keymap bindings, cadence, animation. Nothing else.
Exports: Handle<S>, App / Spec, AppCommand<S>, Intent<S>, VisualSnapshot<S>, InputEnvelope /
InputEvent, WindowCommand, Runtime, hosts behind features `native` / `web`, headless host.
Imports: uzor (widgets, input, docking, tokens), uzor-render-hub (hosts only),
uzor-window-desktop (feature native), uzor-window-web (feature web).
Forbidden: winit / web-sys / render backends inside kernel, engine, types, handle, runtime;
HTTP, MCP, scripting, plugins, persistence, file I/O, business data anywhere;
locks / threads / RefCell outside handle and hosts; pub fields on kernel / engine structs;
a second door into on-screen state (the old layout façade / framework::* paths).
Module roles: types | engine/* | kernel | handle | runtime (shell) | host/* (shell).
Gate: CICD/uzor/scripts/gate-next.sh --crates uzor-framework (release profile; never
--workspace --all-targets). Bans F1-F10 live in CICD/uzor/scripts/forbidden-deps.toml.§Status
Briefs F1-F6: the types role (the input bus, the command vocabulary,
intents, the visual snapshot, window commands, frame requests, the layout
blob, the Spec vocabulary trait, engine ops / effects) and seven
engines in the crate-internal engine module (windows, cadence +
deadline wheel, animation, input, keymap, overlays, layout with expand
and drag-out). F7: the kernel
(phase pipeline, conduction per design §3.8, routing per §4.3), the
App contract with the hook contexts, Handle, Runtime and the
headless host in host. F8: widgets convenience functions over the
hook contexts, flex and profiler. F9: native host behind feature
native (host::native). F10: web host behind feature web
(host::web: listeners, RAF, executor, canvas2d paint). F11: the demo
(examples/demo, one DemoApp, native and web entries) and the §9.4
goldens. M1: view! retargets onto widgets / flex.
§Data flow
Hosts push InputEnvelopes in; the app sends AppCommands in; the
kernel publishes a VisualSnapshot, typed Intents, host-bound
WindowCommands and FrameRequests out. Everything in this crate is
generic over one app-supplied Spec (panel / overlay / action types).
Re-exports§
pub use handle::App;pub use handle::FrameTime;pub use handle::Handle;pub use handle::HandleError;pub use handle::HookOp;pub use handle::HookOps;pub use handle::InitCx;pub use handle::IntentCx;pub use handle::OverlayCx;pub use handle::PanelCx;pub use handle::VisualView;pub use handle::Waker;pub use handle::Widgets;pub use host::HeadlessHost;pub use types::anim::AnimKey;pub use types::anim::AnimPolicy;pub use types::anim::ExpandKind;pub use types::bus::ClipboardResult;pub use types::bus::DropInput;pub use types::bus::DroppedFile;pub use types::bus::HostCaps;pub use types::bus::HostEvent;pub use types::bus::ImeInput;pub use types::bus::InputEnvelope;pub use types::bus::InputEvent;pub use types::bus::KeyInput;pub use types::bus::KeyState;pub use types::bus::PointerInput;pub use types::bus::RenderInfo;pub use types::bus::TimerWake;pub use types::bus::TouchInput;pub use types::bus::WheelDelta;pub use types::bus::WheelInput;pub use types::bus::WindowInput;pub use types::command::AppCommand;pub use types::command::Binding;pub use types::command::CadenceCmd;pub use types::command::ChromeKind;pub use types::command::ChromeModel;pub use types::command::ChromeTab;pub use types::command::ClipboardCmd;pub use types::command::DockTarget;pub use types::command::Domain;pub use types::command::DragOutChrome;pub use types::command::DragOutPolicy;pub use types::command::FocusCmd;pub use types::command::KeymapCmd;pub use types::command::KeymapScope;pub use types::command::LayoutCmd;pub use types::command::LayoutHit;pub use types::command::LayoutPolicy;pub use types::command::OverlayCmd;pub use types::command::OverlayPolicy;pub use types::command::OverlaySize;pub use types::command::SplitDir;pub use types::command::ThemeCmd;pub use types::command::WindowCmd;pub use types::controls::ControlButton;pub use types::controls::ControlsPlacement;pub use types::controls::FloatingControls;pub use types::controls::WindowControlsStyle;pub use types::controls::HOST_HAS_WINDOW_CONTROLS;pub use types::scroll::sticky_top;pub use types::scroll::Overscroll;pub use types::scroll::ScrollAlign;pub use types::scroll::ScrollKey;pub use types::scroll::ScrollStyle;pub use types::scroll::ScrollView;pub use types::error::FrameworkError;pub use types::frame::FrameRequest;pub use types::frame::RegionPlan;pub use types::frame::RegionSpec;pub use types::frame::TimerOwner;pub use types::frame::Wake;pub use types::frame::WindowSurface;pub use types::ids::OrderedSeconds;pub use types::ids::OverlaySlot;pub use types::ids::RegionId;pub use types::ids::Revision;pub use types::ids::ScopeId;pub use types::ids::Seconds;pub use types::ids::Ticket;pub use types::ids::TimerToken;pub use types::ids::TrayItemId;pub use types::ids::WindowId;pub use types::intent::CloseCause;pub use types::intent::DockIntent;pub use types::intent::DropIntent;pub use types::intent::Intent;pub use types::intent::OverlayIntent;pub use types::intent::TextIntent;pub use types::intent::UnhandledInput;pub use types::intent::WindowIntent;pub use types::layout_blob::LayoutBlob;pub use types::layout_blob::LayoutCodecError;pub use types::layout_blob::WindowGeometrySnapshot;pub use types::overlay_model::ContextMenuEntry;pub use types::overlay_model::ContextMenuModel;pub use types::overlay_model::DropdownModel;pub use types::overlay_model::ModalModel;pub use types::overlay_model::OverlayModel;pub use types::overlay_model::TooltipModel;pub use types::snapshot::CadenceView;pub use types::snapshot::ChromeView;pub use types::snapshot::DockView;pub use types::snapshot::EdgeSlotView;pub use types::snapshot::FloatingView;pub use types::snapshot::InputView;pub use types::snapshot::LeafView;pub use types::snapshot::OverlayView;pub use types::snapshot::PanelRef;pub use types::snapshot::SeparatorView;pub use types::snapshot::VisualSnapshot;pub use types::snapshot::WindowView;pub use types::spec::PanelHome;pub use types::spec::Spec;pub use types::window::Attention;pub use types::window::CaptionButtons;pub use types::window::ClosePolicy;pub use types::window::CursorMode;pub use types::window::FullscreenMode;pub use types::window::ImePurpose;pub use types::window::Point;pub use types::window::RenderCmd;pub use types::window::SizePx;pub use types::window::ThemeHint;pub use types::window::WindowCommand;pub use types::window::WindowGeometry;pub use types::window::WindowSpec;
Modules§
- flex
- 1-D flex solve for the
view!macro (moved fromthe old framework module::layout). - handle
- ROLE handle: the app’s only door into on-screen state (design §6.1).
- host
- ROLE host/* (shell): the loops that drive the runtime (design §9).
Hosts own the OS event loop, the paint surface and the clock; they see
the
Runtimeonly (ban F10). The headless host is the deterministic test host: it compiles without features, runs every §9.2 script, and paints into a recording context. - platform
- Platform facts the event loop cannot see, pushed by the thin native wrapper
(Swift / Kotlin, through
uzor-window-mobile) from any thread: the safe area where winit does not report it (AndroidWindowInsets) and the soft keyboard height (iOSkeyboardWillChangeFrame, AndroidWindowInsets.ime), both in logical px. The native host picks them up on its next loop turn and echoesWindowInput::Insetsto every window. - profiler
- Generic named-stage frame profiler + the shared EMA helper.
- types
- ROLE types: pure data definitions shared by every other module.
- widgets
- Widget convenience functions over [
PanelCx] and [OverlayCx].
Macros§
- view
- JSX-style view tree. Lowers to imperative
uzor_framework::widgets::lm::*calls.
Structs§
- Runtime
- The tick loop around the kernel.
Sis the app’s vocabulary,Athe app itself. - Runtime
Config - Runtime construction parameters (design §2.5
RuntimeConfig). - Selectables
view!JSX-like DSL — re-exported fromuzor-framework-macros(brief M1). The compose-phase sink a hook reports its selectable plain text into (theWidgetsface): the DOM’s “every text node is selectable” made explicit — a widget reported here gets press-drag / double / triple-click selection and Ctrl+C copy from the input engine.- Tick
Output - Everything a tick hands to the host (design §2.5
TickOutput).
Enums§
- Splitter
Policy - What a splitter drag does when it would violate a panel’s minimum size —
the library’s own policy type, applied by the LayoutEngine to each
window’s
DockState. How a separator drag reacts when it would push a neighbour below its minimum size. Set perDockStatewithset_splitter_policy.
Constants§
- MAX_
SETTLE - Settle passes a tick runs at most after the main pass (design §2.5
MAX_SETTLE): effects that feed back into commands or intents get zero-input passes of phases 1, 3-4 and 7 until the tick is quiet.