#[repr(C)]pub struct SDL_MouseButtonEvent {
pub type_: SDL_EventType,
pub reserved: Uint32,
pub timestamp: Uint64,
pub windowID: SDL_WindowID,
pub which: SDL_MouseID,
pub button: Uint8,
pub down: bool,
pub clicks: Uint8,
pub padding: Uint8,
pub x: f32,
pub y: f32,
}Expand description
Mouse button event structure (event.button.*)
Available Since: This struct is available since SDL 3.2.0.
Fields§
§type_: SDL_EventType< SDL_EVENT_MOUSE_BUTTON_DOWN or SDL_EVENT_MOUSE_BUTTON_UP
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
< The mouse button index
down: bool< true if the button is pressed
clicks: Uint8< 1 for single-click, 2 for double-click, etc.
padding: Uint8§x: f32< X coordinate, relative to window
y: f32< Y coordinate, relative to window
Trait Implementations§
Source§impl Clone for SDL_MouseButtonEvent
impl Clone for SDL_MouseButtonEvent
Source§fn clone(&self) -> SDL_MouseButtonEvent
fn clone(&self) -> SDL_MouseButtonEvent
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_MouseButtonEvent
impl Debug for SDL_MouseButtonEvent
Source§impl Default for SDL_MouseButtonEvent
impl Default for SDL_MouseButtonEvent
impl Copy for SDL_MouseButtonEvent
Auto Trait Implementations§
impl Freeze for SDL_MouseButtonEvent
impl RefUnwindSafe for SDL_MouseButtonEvent
impl Send for SDL_MouseButtonEvent
impl Sync for SDL_MouseButtonEvent
impl Unpin for SDL_MouseButtonEvent
impl UnsafeUnpin for SDL_MouseButtonEvent
impl UnwindSafe for SDL_MouseButtonEvent
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