#[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: c_float,
pub y: c_float,
}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, SDL_TOUCH_MOUSEID for touch events, or 0
The mouse button index
down: booltrue if the button is pressed
clicks: Uint81 for single-click, 2 for double-click, etc.
padding: Uint8👎Deprecated: padding fields are exempt from semver; init with
§..Default::default()x: c_floatX coordinate, relative to window
y: c_floatY 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
Source§fn default() -> SDL_MouseButtonEvent
fn default() -> SDL_MouseButtonEvent
Returns the “default value” for a type. Read more
Source§impl PartialEq for SDL_MouseButtonEvent
impl PartialEq for SDL_MouseButtonEvent
impl Copy for SDL_MouseButtonEvent
impl StructuralPartialEq 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 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