pub struct WindowMouseButtonEvent {
pub window_id: WindowId,
pub device_id: DeviceId,
pub button: MouseButton,
pub state: ElementState,
pub position: Vec2,
pub prev_position: Vec2,
pub buttons: MouseButtonState,
pub modifiers: ModifiersState,
}Expand description
A window received mouse input.
Fields§
§window_id: WindowIdThe ID of the window.
device_id: DeviceIdThe device that generated the input.
The mouse button that was pressed.
state: ElementStateThe new state of the mouse button.
position: Vec2The current position of the mouse cursor inside the window.
prev_position: Vec2The position of the mouse cursor before the last movement.
The pressed state of all mouse buttons.
modifiers: ModifiersStateThe state of the keyboard modifiers at the time of the event.
Trait Implementations§
Source§impl Clone for WindowMouseButtonEvent
impl Clone for WindowMouseButtonEvent
Source§fn clone(&self) -> WindowMouseButtonEvent
fn clone(&self) -> WindowMouseButtonEvent
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 WindowMouseButtonEvent
impl Debug for WindowMouseButtonEvent
Source§impl From<WindowMouseButtonEvent> for WindowEvent
impl From<WindowMouseButtonEvent> for WindowEvent
Source§fn from(other: WindowMouseButtonEvent) -> Self
fn from(other: WindowMouseButtonEvent) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for WindowMouseButtonEvent
impl RefUnwindSafe for WindowMouseButtonEvent
impl Send for WindowMouseButtonEvent
impl Sync for WindowMouseButtonEvent
impl Unpin for WindowMouseButtonEvent
impl UnwindSafe for WindowMouseButtonEvent
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