#[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: f32,
pub y: f32,
pub direction: SDL_MouseWheelDirection,
pub mouse_x: f32,
pub mouse_y: f32,
pub integer_x: Sint32,
pub integer_y: Sint32,
}Expand description
Mouse wheel event structure (event.wheel.*)
Available Since: This struct is available since SDL 3.2.0.
Fields§
§type_: SDL_EventType< SDL_EVENT_MOUSE_WHEEL
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 or 0
x: f32< The amount scrolled horizontally, positive to the right and negative to the left
y: f32< The amount scrolled vertically, positive away from the user and negative toward the user
direction: SDL_MouseWheelDirection< Set 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: f32< X coordinate, relative to window
mouse_y: f32< Y coordinate, relative to window
integer_x: Sint32< The amount scrolled horizontally, accumulated to whole scroll “ticks” (added in 3.2.12)
integer_y: Sint32< The 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
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more