autocommit 2022-03-30 22:27:19 CEST
This commit is contained in:
parent
a8136ed88c
commit
ab4ac883ee
19 changed files with 434 additions and 76 deletions
|
|
@ -8,7 +8,7 @@ use crate::libinput::sys::{
|
|||
libinput_event_pointer, libinput_event_pointer_get_button,
|
||||
libinput_event_pointer_get_button_state, libinput_event_pointer_get_dx,
|
||||
libinput_event_pointer_get_dy, libinput_event_pointer_get_scroll_value_v120,
|
||||
libinput_event_pointer_get_time_usec,
|
||||
libinput_event_pointer_get_time_usec, libinput_event_pointer_has_axis,
|
||||
};
|
||||
use std::marker::PhantomData;
|
||||
|
||||
|
|
@ -108,6 +108,10 @@ impl<'a> LibInputEventPointer<'a> {
|
|||
unsafe { libinput_event_pointer_get_scroll_value_v120(self.event, axis.raw() as _) }
|
||||
}
|
||||
|
||||
pub fn has_axis(&self, axis: PointerAxis) -> bool {
|
||||
unsafe { libinput_event_pointer_has_axis(self.event, axis.raw() as _) != 0 }
|
||||
}
|
||||
|
||||
#[allow(dead_code)]
|
||||
pub fn time_usec(&self) -> u64 {
|
||||
unsafe { libinput_event_pointer_get_time_usec(self.event) }
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue