Skip to main content

Module touch_points

Module touch_points 

Source
Expand description

§Active touch points — per-finger positions for widgets

The multi-touch pipeline aggregates fingers into pinch/rotate gestures (crate::touch_state) and emulates a primary-finger mouse (crate::touch_emulation). Widgets that act as virtual gamepads — several on-screen buttons held by different fingers at once — need the raw per-finger positions instead. App’s touch entry points publish the active set here after every touch event; widgets poll active during paint/update and hit-test the points against their own controls.

Positions are in the same app-local coordinate space widgets see mouse events in (Y-up, keyboard-lift applied).

Structs§

TouchPoint
One active finger: platform touch id + current position.

Functions§

active
Widget side: the currently-active fingers. Empty when no touch is down (or the platform has no touchscreen).
publish
App side: replace the published set (called after every touch start/move/end/cancel).