pub enum OverlayEventKind {
Pointer(PointerEvent),
Scroll {
position: Point,
delta: ScrollDelta,
},
Scale {
focal: Point,
phase: ScalePhase,
scale_delta: f64,
velocity: f64,
},
OutsideDown,
}Expand description
The input an OverlayEvent delivers.
§Window space, not local space
Every position here is absolute logical window space, deliberately: the
broadcast reaches the owner by travelling the main tree, so the translation
chain it passes through on the way (ChildPod::event_child subtracting each
container’s origin) describes the owner’s position, not the floated pod’s.
Translating the payload would therefore corrupt it. The owner instead
subtracts its own registered
window_rect origin before
forwarding into the pod, which is the only offset that means anything — which
is also why InputEvent::translated returns an overlay event unchanged.
Variants§
Pointer(PointerEvent)
A pointer event inside the surface’s rect, positioned in window space.
Scroll
A scroll inside the surface’s rect, positioned in window space.
Fields
delta: ScrollDeltaHow much to scroll.
Scale
A scale gesture inside the surface’s rect, focal point in window
space — the overlay mirror of InputEvent::Scale, routed here on
exactly the same hit-test terms as Scroll.
Fields
phase: ScalePhaseThe gesture phase.
OutsideDown
A primary press landed outside every registered surface — the
light-dismiss notification, delivered only to entries registered
OutsideTap::Notify. It carries no
position: where the press landed is the main tree’s business, and an
owner that wants it can register consume: false and watch the press
arrive there normally.