#[repr(C)]pub struct SDL_MouseMotionEvent {
pub type_: SDL_EventType,
pub reserved: Uint32,
pub timestamp: Uint64,
pub windowID: SDL_WindowID,
pub which: SDL_MouseID,
pub state: SDL_MouseButtonFlags,
pub x: f32,
pub y: f32,
pub xrel: f32,
pub yrel: f32,
}Expand description
Mouse motion event structure (event.motion.*)
Available Since: This struct is available since SDL 3.2.0.
Fields§
§type_: SDL_EventType< SDL_EVENT_MOUSE_MOTION
reserved: Uint32§timestamp: Uint64< In nanoseconds, populated using SDL_GetTicksNS()
windowID: SDL_WindowID< The window with mouse focus, if any
which: SDL_MouseID< The mouse instance id in relative mode, SDL_TOUCH_MOUSEID for touch events, or 0
state: SDL_MouseButtonFlags< The current button state
x: f32< X coordinate, relative to window
y: f32< Y coordinate, relative to window
xrel: f32< The relative motion in the X direction
yrel: f32< The relative motion in the Y direction
Trait Implementations§
Source§impl Clone for SDL_MouseMotionEvent
impl Clone for SDL_MouseMotionEvent
Source§fn clone(&self) -> SDL_MouseMotionEvent
fn clone(&self) -> SDL_MouseMotionEvent
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for SDL_MouseMotionEvent
impl Debug for SDL_MouseMotionEvent
Source§impl Default for SDL_MouseMotionEvent
impl Default for SDL_MouseMotionEvent
impl Copy for SDL_MouseMotionEvent
Auto Trait Implementations§
impl Freeze for SDL_MouseMotionEvent
impl RefUnwindSafe for SDL_MouseMotionEvent
impl Send for SDL_MouseMotionEvent
impl Sync for SDL_MouseMotionEvent
impl Unpin for SDL_MouseMotionEvent
impl UnsafeUnpin for SDL_MouseMotionEvent
impl UnwindSafe for SDL_MouseMotionEvent
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