autocommit 2022-04-10 01:35:15 CEST
This commit is contained in:
parent
21e2216ce5
commit
befd5e99b2
22 changed files with 280 additions and 114 deletions
|
|
@ -1,5 +1,9 @@
|
|||
use {
|
||||
crate::{fixed::Fixed, video::drm::ConnectorType},
|
||||
crate::{
|
||||
fixed::Fixed,
|
||||
ifs::wl_seat::wl_pointer::{CONTINUOUS, FINGER, HORIZONTAL_SCROLL, VERTICAL_SCROLL, WHEEL},
|
||||
video::drm::ConnectorType,
|
||||
},
|
||||
std::{
|
||||
fmt::{Debug, Display, Formatter},
|
||||
rc::Rc,
|
||||
|
|
@ -101,8 +105,15 @@ pub enum KeyState {
|
|||
|
||||
#[derive(Debug, Copy, Clone, Eq, PartialEq)]
|
||||
pub enum ScrollAxis {
|
||||
Horizontal,
|
||||
Vertical,
|
||||
Horizontal = HORIZONTAL_SCROLL as _,
|
||||
Vertical = VERTICAL_SCROLL as _,
|
||||
}
|
||||
|
||||
#[derive(Debug, Copy, Clone, Eq, PartialEq)]
|
||||
pub enum AxisSource {
|
||||
Wheel = WHEEL as _,
|
||||
Finger = FINGER as _,
|
||||
Continuous = CONTINUOUS as _,
|
||||
}
|
||||
|
||||
#[derive(Debug)]
|
||||
|
|
@ -112,5 +123,10 @@ pub enum InputEvent {
|
|||
#[allow(dead_code)]
|
||||
Motion(Fixed, Fixed),
|
||||
Button(u32, KeyState),
|
||||
Scroll(i32, ScrollAxis),
|
||||
|
||||
Axis(Fixed, ScrollAxis),
|
||||
AxisSource(AxisSource),
|
||||
AxisStop(ScrollAxis),
|
||||
AxisDiscrete(i32, ScrollAxis),
|
||||
Frame,
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue