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.
18 lines
614 B
C++
18 lines
614 B
C++
// SPDX-License-Identifier: GPL-3.0-only
|
|
// SPDX-FileCopyrightText: Copyright (C) 2026 Catcrafts®
|
|
|
|
/*
|
|
ImsdMessages — the core of imsd-messages: the parts that need neither the
|
|
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;
|
|
export import :Time;
|
|
export import :Model;
|
|
export import :Wrap;
|
|
export import :Store;
|
|
export import :Sync;
|
|
export import :Gesture;
|