Struct rich_sdl2_rust::event::mouse::MouseButtonEvent
source · pub struct MouseButtonEvent {
pub timestamp: u32,
pub window_id: u32,
pub mouse_id: u32,
pub button: Option<MouseButton>,
pub is_pressed: bool,
pub clicks: u8,
pub pos: Point,
}
Expand description
An event that th mouse button was pressed/released.
Fields§
§timestamp: u32
When this event occurred.
window_id: u32
The id of the window focused.
mouse_id: u32
The id of the moved.
The button state of the mouse.
is_pressed: bool
Whether the mouse button is pressed.
clicks: u8
The click count of the button.
pos: Point
The mouse position.
Trait Implementations§
source§impl Clone for MouseButtonEvent
impl Clone for MouseButtonEvent
source§fn clone(&self) -> MouseButtonEvent
fn clone(&self) -> MouseButtonEvent
Returns a copy 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 MouseButtonEvent
impl Debug for MouseButtonEvent
source§impl From<SDL_MouseButtonEvent> for MouseButtonEvent
impl From<SDL_MouseButtonEvent> for MouseButtonEvent
source§impl PartialEq for MouseButtonEvent
impl PartialEq for MouseButtonEvent
source§fn eq(&self, other: &MouseButtonEvent) -> bool
fn eq(&self, other: &MouseButtonEvent) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl Eq for MouseButtonEvent
impl StructuralPartialEq for MouseButtonEvent
Auto Trait Implementations§
impl RefUnwindSafe for MouseButtonEvent
impl Send for MouseButtonEvent
impl Sync for MouseButtonEvent
impl Unpin for MouseButtonEvent
impl UnwindSafe for 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