Skip to main content

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;
6use serde::Serialize;
7
8/// The scroll method of a device.
9#[derive(Serialize, Deserialize, Copy, Clone, Debug, Hash, Eq, PartialEq)]
10pub struct ScrollMethod(pub u32);
11
12/// Never send scroll events instead of pointer motion events.
13pub const SCROLL_METHOD_NO_SCROLL: ScrollMethod = ScrollMethod(0);
14
15/// Send scroll events when two fingers are logically down on the device.
16pub const SCROLL_METHOD_TWO_FINGERS: ScrollMethod = ScrollMethod(1 << 0);
17
18/// Send scroll events when a finger moves along the bottom or right edge of a device.
19pub const SCROLL_METHOD_EDGE: ScrollMethod = ScrollMethod(1 << 1);
20
21/// Send scroll events when a button is down and the device moves along a scroll-capable axis.
22pub const SCROLL_METHOD_ON_BUTTON_DOWN: ScrollMethod = ScrollMethod(1 << 2);