pub struct PointerMotion {
pub time_ms: u32,
pub dx: f64,
pub dy: f64,
pub device: Option<String>,
}Expand description
A pointer moving.
Fields§
§time_ms: u32libinput’s timestamp, in milliseconds.
dx: f64Horizontal movement, in libinput’s accelerated units.
dy: f64Vertical movement, likewise.
device: Option<String>The device this came from, if libinput named it.
Owned rather than borrowed. The reference hands out the const char*
libinput owns and tells the caller it is valid for the duration of the
callback – which is true, and is a rule a consumer only has to forget
once. It is there so a consumer can treat a built-in trackpad
differently from an external mouse, and that decision is made per
event, not per byte.
Trait Implementations§
Source§impl Clone for PointerMotion
impl Clone for PointerMotion
Source§impl Debug for PointerMotion
impl Debug for PointerMotion
Source§impl PartialEq for PointerMotion
impl PartialEq for PointerMotion
impl StructuralPartialEq for PointerMotion
Auto Trait Implementations§
impl Freeze for PointerMotion
impl RefUnwindSafe for PointerMotion
impl Send for PointerMotion
impl Sync for PointerMotion
impl Unpin for PointerMotion
impl UnsafeUnpin for PointerMotion
impl UnwindSafe for PointerMotion
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more