#[repr(C)]pub struct SDL_MouseWheelEvent {
pub type: SDL_EventType,
pub reserved: Uint32,
pub timestamp: Uint64,
pub windowID: SDL_WindowID,
pub which: SDL_MouseID,
pub x: c_float,
pub y: c_float,
pub direction: SDL_MouseWheelDirection,
pub mouse_x: c_float,
pub mouse_y: c_float,
pub integer_x: Sint32,
pub integer_y: Sint32,
}Expand description
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 or 0
x: c_floatThe amount scrolled horizontally, positive to the right and negative to the left
y: c_floatThe amount scrolled vertically, positive away from the user and negative toward the user
direction: SDL_MouseWheelDirectionSet to one of the SDL_MOUSEWHEEL_* defines. When FLIPPED the values in X and Y will be opposite. Multiply by -1 to change them back
mouse_x: c_floatX coordinate, relative to window
mouse_y: c_floatY coordinate, relative to window
integer_x: Sint32The amount scrolled horizontally, accumulated to whole scroll “ticks” (added in 3.2.12)
integer_y: Sint32The amount scrolled vertically, accumulated to whole scroll “ticks” (added in 3.2.12)
Trait Implementations§
Source§impl Clone for SDL_MouseWheelEvent
impl Clone for SDL_MouseWheelEvent
Source§fn clone(&self) -> SDL_MouseWheelEvent
fn clone(&self) -> SDL_MouseWheelEvent
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_MouseWheelEvent
impl Debug for SDL_MouseWheelEvent
Source§impl Default for SDL_MouseWheelEvent
impl Default for SDL_MouseWheelEvent
Source§fn default() -> SDL_MouseWheelEvent
fn default() -> SDL_MouseWheelEvent
Returns the “default value” for a type. Read more
Source§impl PartialEq for SDL_MouseWheelEvent
impl PartialEq for SDL_MouseWheelEvent
impl Copy for SDL_MouseWheelEvent
impl StructuralPartialEq for SDL_MouseWheelEvent
Auto Trait Implementations§
impl Freeze for SDL_MouseWheelEvent
impl RefUnwindSafe for SDL_MouseWheelEvent
impl Send for SDL_MouseWheelEvent
impl Sync for SDL_MouseWheelEvent
impl Unpin for SDL_MouseWheelEvent
impl UnwindSafe for SDL_MouseWheelEvent
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