euv_ui/component/touch/hook/enum.rs
1use super::*;
2
3/// A single-finger directional gesture resolved from a completed touch
4/// sequence.
5///
6/// A value is only produced once a touch has started and ended; the
7/// recognition thresholds live on [`EuvGestureConfig`].
8#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
9pub enum EuvGesture {
10 /// The finger travelled past `swipe_threshold` mostly leftwards.
11 Left,
12 /// The finger travelled past `swipe_threshold` mostly rightwards.
13 Right,
14 /// The finger travelled past `swipe_threshold` mostly upwards.
15 Up,
16 /// The finger travelled past `swipe_threshold` mostly downwards.
17 Down,
18 /// The finger stayed within `tap_slop` of the origin and the touch was
19 /// shorter than `long_press_millis`.
20 Tap,
21 /// The finger stayed within `tap_slop` of the origin but the touch lasted
22 /// at least `long_press_millis`.
23 LongPress,
24}