Gesture: taps, long presses, drags and flings from pointer phases
What a finger or a mouse did, decided from raw Down/Move/Up/Cancel phases over the app's own point type: a short press within the slop is a tap at the press position, a press held past the long-press time (the host's timer) a long press, movement past the slop a drag with its deltas, a fast release a fling with a velocity (the last 100 ms of movement before it: a finger held still before letting go flings nothing). With it the scroll physics of a list (clamped offset, a decaying fling that stops at the edges) and the topmost hit region under a point. Tested: tests/Gesture.
This commit is contained in:
parent
985519b970
commit
f360a746c2
5 changed files with 348 additions and 9 deletions
|
|
@ -3,10 +3,10 @@
|
|||
|
||||
/*
|
||||
ImsdMessages — the core of imsd-messages: the parts that need neither the
|
||||
bus nor a window (numbers, time, the message model, word wrap, the store and
|
||||
the sync logic), so each of them is unit-testable on a dev box with no phone,
|
||||
no imsd and no GPU. The bus layer is ImsdMessages.Bus, the window is the
|
||||
executable.
|
||||
bus nor a window (numbers, time, the message model, word wrap, gestures,
|
||||
the store and the sync logic), so each of them is unit-testable on a dev box
|
||||
with no phone, no imsd and no GPU. The bus layer is ImsdMessages.Bus, the
|
||||
window is the executable.
|
||||
*/
|
||||
export module ImsdMessages;
|
||||
export import :Number;
|
||||
|
|
@ -15,3 +15,4 @@ export import :Model;
|
|||
export import :Wrap;
|
||||
export import :Store;
|
||||
export import :Sync;
|
||||
export import :Gesture;
|
||||
|
|
|
|||
Loading…
Reference in a new issue