pub struct DispatchMouseEventParams {
pub event_type: MouseEventType,
pub x: f64,
pub y: f64,
pub button: Option<MouseButton>,
pub click_count: Option<i32>,
pub modifiers: Option<i32>,
pub timestamp: Option<f64>,
}Expand description
Parameters for Input.dispatchMouseEvent.
Fields§
§event_type: MouseEventTypeType of the mouse event.
x: f64X coordinate of the event relative to the main frame’s viewport.
y: f64Y coordinate of the event relative to the main frame’s viewport.
Mouse button.
click_count: Option<i32>Number of times the mouse button was clicked.
modifiers: Option<i32>Bit field representing pressed modifier keys.
timestamp: Option<f64>Time at which the event occurred.
Implementations§
Source§impl DispatchMouseEventParams
impl DispatchMouseEventParams
Sourcepub fn mouse_move(x: f64, y: f64) -> Self
pub fn mouse_move(x: f64, y: f64) -> Self
Create a mouse move event.
Sourcepub fn mouse_down(x: f64, y: f64, button: MouseButton) -> Self
pub fn mouse_down(x: f64, y: f64, button: MouseButton) -> Self
Create a mouse down event.
Sourcepub fn mouse_up(x: f64, y: f64, button: MouseButton) -> Self
pub fn mouse_up(x: f64, y: f64, button: MouseButton) -> Self
Create a mouse up event.
Sourcepub fn mouse_wheel(
x: f64,
y: f64,
delta_x: f64,
delta_y: f64,
) -> DispatchMouseWheelParams
pub fn mouse_wheel( x: f64, y: f64, delta_x: f64, delta_y: f64, ) -> DispatchMouseWheelParams
Create a mouse wheel event.
Trait Implementations§
Source§impl Clone for DispatchMouseEventParams
impl Clone for DispatchMouseEventParams
Source§fn clone(&self) -> DispatchMouseEventParams
fn clone(&self) -> DispatchMouseEventParams
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 DispatchMouseEventParams
impl Debug for DispatchMouseEventParams
Auto Trait Implementations§
impl Freeze for DispatchMouseEventParams
impl RefUnwindSafe for DispatchMouseEventParams
impl Send for DispatchMouseEventParams
impl Sync for DispatchMouseEventParams
impl Unpin for DispatchMouseEventParams
impl UnwindSafe for DispatchMouseEventParams
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