jay_config/input/scrollmethod.rs
1//! Constants determining the scroll method of a device.
2//!
3//! See the libinput documentation for details.
4
5use serde::{Deserialize, Serialize};
6
7/// The scroll method of a device.
8#[derive(Serialize, Deserialize, Copy, Clone, Debug, Hash, Eq, PartialEq)]
9pub struct ScrollMethod(pub u32);
10
11/// Never send scroll events instead of pointer motion events.
12pub const SCROLL_METHOD_NO_SCROLL: ScrollMethod = ScrollMethod(0);
13
14/// Send scroll events when two fingers are logically down on the device.
15pub const SCROLL_METHOD_TWO_FINGERS: ScrollMethod = ScrollMethod(1 << 0);
16
17/// Send scroll events when a finger moves along the bottom or right edge of a device.
18pub const SCROLL_METHOD_EDGE: ScrollMethod = ScrollMethod(1 << 1);
19
20/// Send scroll events when a button is down and the device moves along a scroll-capable axis.
21pub const SCROLL_METHOD_ON_BUTTON_DOWN: ScrollMethod = ScrollMethod(1 << 2);