#[repr(C)]pub struct RawMotionEventData {
pub dx: f64,
pub dy: f64,
pub device_id: u64,
}Expand description
#[repr(C)] because CallbackInfo::get_raw_mouse_motion hands this
across the C API. Without it the layout is undefined at the boundary and
the generated bindings read garbage fields.
Fields§
§dx: f64Horizontal motion in the device’s own units. NOT logical pixels: a mouse reports counts, whose size depends on its DPI, which is exactly why a sensitivity setting exists.
dy: f64Vertical motion, same units.
device_id: u64Which device moved, or 0 when the platform does not say.
Trait Implementations§
Source§impl Clone for RawMotionEventData
impl Clone for RawMotionEventData
Source§fn clone(&self) -> RawMotionEventData
fn clone(&self) -> RawMotionEventData
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for RawMotionEventData
Source§impl Debug for RawMotionEventData
impl Debug for RawMotionEventData
Source§impl PartialEq for RawMotionEventData
impl PartialEq for RawMotionEventData
impl StructuralPartialEq for RawMotionEventData
Auto Trait Implementations§
impl Freeze for RawMotionEventData
impl RefUnwindSafe for RawMotionEventData
impl Send for RawMotionEventData
impl Sync for RawMotionEventData
impl Unpin for RawMotionEventData
impl UnsafeUnpin for RawMotionEventData
impl UnwindSafe for RawMotionEventData
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