Skip to main content

Module handle

Module handle 

Source
Expand description

ROLE handle: the app’s only door into on-screen state (design §6.1).

Handle is Clone + Send + Sync: a back-office task thread can dispatch a visual command (“open the error modal”) without touching the UI thread, and read the last published snapshot lock-free. This module and the hosts are the only places channels and Arc exist (SWC Law 2-3, ban F5). There is no subscribe: observers poll Handle::revision; the in-thread event channel is App::intent.

Structs§

FrameTime
Wall-clock facts of this frame; both values come from the host clock the runtime was given, never read inside the crate.
Handle
The app’s door into on-screen state (design §6.1).
HookOps
The sink a hook writes its declared effects into.
InitCx
Startup door: commands only.
IntentCx
Intent hook door: the published snapshot (read-only) plus commands.
OverlayCx
One open overlay’s body hook context (design §6.3); same reach as PanelCx, plus the overlay identity and the body rect the kernel’s frame leaves.
PanelCx
One dock leaf’s content hook context (design §6.3).
VisualView
Read-only per-window truth of this frame, built at the start of the compose phase (design §5.2, read path a).
Waker
Wakes the host loop after a dispatch so a command never waits for the next input event. Native: EventLoopProxy::send_event; web: a RAF request; headless: a no-op.
Widgets
Widget registration face a hook draws against: the window’s coordinator (library L1 register_* fns take it), the per-widget typed state store and the layer the hook’s widgets register into.

Enums§

HandleError
Why a dispatch failed.
HookOp
Effects a content hook may declare; nothing else crosses (design §6.3).

Traits§

App
The application: view-model declarations, content hooks and the intent sink. One value drives any number of windows.