pub enum Input {
PointerMove {
x: f32,
y: f32,
},
Button {
x: f32,
y: f32,
button: PointerButton,
down: bool,
mods: Mods,
},
PointerLeave,
Wheel {
dx: f32,
dy: f32,
unit: WheelUnit,
mods: Mods,
},
Key {
key: String,
down: bool,
repeat: bool,
mods: Mods,
},
Text(String),
Paste(String),
ImePreedit(String),
ImeCommit(String),
Touch {
id: u64,
phase: TouchPhase,
x: f32,
y: f32,
force: Option<f32>,
},
Focus(bool),
}Expand description
One input for the session. Positions are logical pixels from the session’s top-left corner.
Variants§
PointerMove
Button
PointerLeave
The pointer left the session’s area.
Wheel
A wheel turn, as a browser reports it: positive dy scrolls the page
down (moves the content up).
Key
A key, named as egui or a browser’s KeyboardEvent.key names it:
"A", "Enter", "Escape", "ArrowUp", "F2", "Delete".
Ctrl/Cmd + C and X copy and cut (the copied text arrives as
Event::Clipboard); paste with Input::Paste.
Text(String)
Typed text (what a key press types, or an input method’s result).
Paste(String)
Paste this text where the session’s keyboard focus is.
ImePreedit(String)
An input method’s composition in progress (empty: dismissed).
ImeCommit(String)
An input method’s final text.
Touch
Focus(bool)
The host window gained or lost keyboard focus.
Trait Implementations§
impl StructuralPartialEq for Input
Auto Trait Implementations§
impl Forget for Input
impl Freeze for Input
impl Move for Input
impl RefUnwindSafe for Input
impl Send for Inputwhere
RawVecInner: Send,
impl Sync for Inputwhere
RawVecInner: Sync,
impl Unpin for Input
impl UnsafeUnpin for Input
impl UnwindSafe for Inputwhere
RawVecInner: UnwindSafe,
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