pub enum SyntheticEvent {
MouseMove {
x: f32,
y: f32,
},
MouseDown,
MouseUp,
RightDown,
RightUp,
FileDrop(PathBuf),
Key(KeyInput),
Text(String),
Wheel {
dy: f32,
},
Tab,
ShiftTab,
}Expand description
A scripted input event for render_app.
Variants§
MouseMove
Move the pointer to logical coordinates.
MouseDown
Press the primary button.
MouseUp
Release the primary button.
RightDown
Press the secondary (right) button.
RightUp
Release the secondary (right) button.
FileDrop(PathBuf)
Drop an OS file at the current pointer position.
Key(KeyInput)
Press a key.
Text(String)
Commit text (M5).
Wheel
Scroll (winit convention: positive dy moves content down).
Tab
Focus next.
ShiftTab
Focus previous.
Trait Implementations§
Source§impl Clone for SyntheticEvent
impl Clone for SyntheticEvent
Source§fn clone(&self) -> SyntheticEvent
fn clone(&self) -> SyntheticEvent
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 SyntheticEvent
impl Debug for SyntheticEvent
Source§impl From<&SyntheticEvent> for InputEvent
impl From<&SyntheticEvent> for InputEvent
Source§fn from(ev: &SyntheticEvent) -> Self
fn from(ev: &SyntheticEvent) -> Self
Converts to this type from the input type.
Source§impl PartialEq for SyntheticEvent
impl PartialEq for SyntheticEvent
Source§fn eq(&self, other: &SyntheticEvent) -> bool
fn eq(&self, other: &SyntheticEvent) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for SyntheticEvent
Auto Trait Implementations§
impl Freeze for SyntheticEvent
impl RefUnwindSafe for SyntheticEvent
impl Send for SyntheticEvent
impl Sync for SyntheticEvent
impl Unpin for SyntheticEvent
impl UnsafeUnpin for SyntheticEvent
impl UnwindSafe for SyntheticEvent
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.