#[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: c_float,
pub y: c_float,
pub xrel: c_float,
pub yrel: c_float,
}Expand description
Mouse motion event structure (event.motion.*)
§Availability
This struct is available since SDL 3.2.0.
Fields§
§type: SDL_EventType§reserved: Uint32§timestamp: Uint64In nanoseconds, populated using SDL_GetTicksNS()
windowID: SDL_WindowIDThe window with mouse focus, if any
which: SDL_MouseIDThe mouse instance id in relative mode, SDL_TOUCH_MOUSEID for touch events, or 0
state: SDL_MouseButtonFlagsThe current button state
x: c_floatX coordinate, relative to window
y: c_floatY coordinate, relative to window
xrel: c_floatThe relative motion in the X direction
yrel: c_floatThe 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
Source§fn default() -> SDL_MouseMotionEvent
fn default() -> SDL_MouseMotionEvent
Returns the “default value” for a type. Read more
Source§impl PartialEq for SDL_MouseMotionEvent
impl PartialEq for SDL_MouseMotionEvent
impl Copy for SDL_MouseMotionEvent
impl StructuralPartialEq 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 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