Skip to main content

Module gesture

Module gesture 

Source
Expand description

The gesture algebra: composing raw browser gestures into one Intent value.

Raw input handling (pointer down/move/up streams, key events, paste) stays in the browser. This crate owns the meaning: a small algebra that folds a recognized raw gesture plus the thing under the pointer into a single checked Intent value. The browser feeds pointer events into a GestureRecognizer, which yields a RawGesture; intent_from_gesture turns that into an Intent (carrying the operator and tick), or returns a diagnostic when the gesture has no meaning in context.

Structs§

GestureRecognizer
Folds a pointer-event stream into RawGestures. The browser pushes each pointer event; a complete gesture is returned on the release event.
Hit
A hit-test result: what was under the pointer, the runtime value it stands for, and any role-specific detail (for example a port’s node/port/dir).
PointerEvent
One pointer event in a raw input stream.

Enums§

HitRole
What sits under the pointer at the moment of a gesture.
PointerPhase
The phase of a pointer event.
RawGesture
A recognized raw gesture: the largest unit the browser composes before meaning is assigned.

Functions§

intent_from_gesture
Turn a recognized raw gesture into an Intent value in pane, attributed to operator at tick. Returns a diagnostic when the gesture is meaningless in context; nothing mutates on failure.