pub enum TestEvent {
Show 17 variants
MouseMove {
x: f32,
y: f32,
},
MouseDown {
x: f32,
y: f32,
button: u8,
},
MouseUp {
x: f32,
y: f32,
button: u8,
},
KeyDown {
key_code: String,
modifiers: u8,
},
KeyUp {
key_code: String,
modifiers: u8,
},
TextInput {
text: String,
},
Scroll {
x: f32,
y: f32,
dx: f32,
dy: f32,
},
Resize {
width: u32,
height: u32,
},
Screenshot {
path: String,
},
CaptureScreenshot,
GetText,
GetTree,
Pump,
Wake,
Quit,
TapText {
text: String,
},
Wait {
ms: u64,
},
}Expand description
Events injected into the winit event loop via EventLoopProxy.
Input-simulation variants (MouseMove, MouseDown, etc.) travel through
the same Event::UserEvent → handler path as real WindowEvents, so
test code exercises identical code paths as real user interaction.
Query / control variants (Screenshot, GetText, etc.) also go through
the proxy so the main loop can respond via a dedicated response channel.
Variants§
MouseMove
MouseDown
MouseUp
KeyDown
KeyUp
TextInput
Scroll
Resize
Screenshot
CaptureScreenshot
GetText
GetTree
Pump
Wake
Quit
TapText
Internal: TapText resolves a text label to coordinates; the server injects this so the main loop can do the lookup with access to the IR.
Wait
Internal: Wait is handled server-side (sleep) then responds.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for TestEvent
impl RefUnwindSafe for TestEvent
impl Send for TestEvent
impl Sync for TestEvent
impl Unpin for TestEvent
impl UnsafeUnpin for TestEvent
impl UnwindSafe for TestEvent
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