1
0
Fork 0
forked from wry/wry

autocommit 2022-04-10 01:35:15 CEST

This commit is contained in:
Julian Orth 2022-04-10 01:35:15 +02:00
parent 21e2216ce5
commit befd5e99b2
22 changed files with 280 additions and 114 deletions

View file

@ -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,
}