Skip to main content

Module runtime

Module runtime 

Source
Expand description

Core: one window’s runtime, the state machine a runner drives frame by frame.

A core owns everything that survives across frames and belongs to one window: the per-frame tree and its builder state, interaction state (hover, press, drag), focus, the scroll and edit stores, animations, the glyph atlas and the finished DisplayList. What a window must not duplicate — the font database, the resource registry, the audio store — lives in the Session a core is constructed against; Core::new makes a private one, so a single-window app never sees it. The frame lifecycle, with an example, is on Core.

Builder state lives in the core itself rather than in a borrowing wrapper so that flat C bindings can drive a frame through one opaque pointer; the Rust Ui is a thin safe facade over it.

Modules§

cause
Why a frame was drawn: two readings a view can take of the frame it is building, for an app that keeps a ledger of its frames and wants to know why one ran with nothing on screen moving.
devtools
The devtools panel, drawn by the core into any app’s frame.
follow
A held drag following its scroller.
inspect
The frame as a list a tool can read back: every node the last finished frame laid out, with what it is, where layout put it, and the handful of declarations that explain the rest. What a devtools tree view and node inspector are built from.

Structs§

Core
One window’s runtime: the state a runner drives frame by frame.
Owed
What a frame left owed, by kind: Core::owed. any() is what Core::animating answers; beyond_cycles() is the same with a keyframe cycle — which never ends — left out.

Enums§

Content
What a node opened through Core::open_from holds: a box (left open for its children), a fragment (likewise), a cells grid or a stroke (leaves, closed by the door).

Traits§

Extension
A frontend that draws into the shared tree each frame — the trait the runner uses to host Lua (or any other) extensions without knowing what they are. Origins are assigned by the runner.