Enum UserEvent
pub enum UserEvent {
Show 13 variants
Hover {
x: f64,
y: f64,
},
Click {
x: f64,
y: f64,
},
Wheel {
dx: f32,
dy: f32,
},
Key(Key),
NativeScenarioInput(Packet),
RenderReady(WindowId),
External(String),
HostCommand(ControlInvocation),
HostSearch(String),
Wake(WakeEvent),
DevSessionStop,
DevSessionReload,
AccessKit {
window_id: WindowId,
event: WindowEvent,
},
}Expand description
Synthetic input for EventLoopProxy: each variant becomes the real
WindowEvent(s) and routes through the same handler, so injected and
real-hardware events take the identical code path.
Variants§
Hover
Click
CursorMoved → Pressed → Released, dispatched as one unit.
Wheel
Key(Key)
Keyboard press and release routed through the ordinary window handler.
NativeScenarioInput(Packet)
Opt-in workload input with an absolute schedule and stable input identity.
RenderReady(WindowId)
External(String)
Delivered to crate::widget::Widget::on_external_event rather than
translated to a WindowEvent (e.g. installer progress).
HostCommand(ControlInvocation)
A host command chosen in the operating system’s own chrome (a menu item), entering the same door as the palette.
HostSearch(String)
Text typed into the host’s title-bar search field; search continues in the palette.
Wake(WakeEvent)
Synchronize and redraw after typed state was changed by a worker.
Created automatically by crate::LocalStateWriter.
DevSessionStop
tilo-app dev is replacing this process. Flush the document and write
the route and caret, then leave the event loop so the next process can
read them.
DevSessionReload
tilo-app dev rebuilt the app. Swap the contents of the windows this
process already has. Do not open or close any of them.
AccessKit
No WindowEvent analogue, so accesskit events get their own variant.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for UserEvent
impl RefUnwindSafe for UserEvent
impl Send for UserEvent
impl Sync for UserEvent
impl Unpin for UserEvent
impl UnsafeUnpin for UserEvent
impl UnwindSafe for UserEvent
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
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.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.§impl<T> DowncastSync for T
impl<T> DowncastSync for T
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more