pub enum SessionInput {
PointerMoved {
x: f32,
y: f32,
modifiers: SessionModifiers,
},
PointerButton {
x: f32,
y: f32,
button: SessionPointerButton,
state: SessionButtonState,
modifiers: SessionModifiers,
},
Key {
key: SessionKey,
state: SessionButtonState,
modifiers: SessionModifiers,
repeat: bool,
},
KeyboardText(String),
Text(String),
Ime(SessionIme),
Focus(bool),
FocusMove(SessionFocusDirection),
Cancel,
}Expand description
Input delivered by a host to one retained session. For a printable key,
send Key first and then its produced KeyboardText. Key owns keyboard
events and non-text defaults; KeyboardText owns that key’s character edit
and can be suppressed by a canceled keydown. Text is independent input,
including paste and accessibility, and is never canceled by an earlier key.
An IME commit uses Ime::Commit. Send control keys such as Enter only as
Key; independent Text may contain newlines.
Variants§
PointerMoved
PointerButton
Key
KeyboardText(String)
Text(String)
Ime(SessionIme)
Focus(bool)
FocusMove(SessionFocusDirection)
Cancel
Trait Implementations§
Source§impl Clone for SessionInput
impl Clone for SessionInput
Source§impl Debug for SessionInput
impl Debug for SessionInput
Source§impl<'de> Deserialize<'de> for SessionInput
impl<'de> Deserialize<'de> for SessionInput
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for SessionInput
impl PartialEq for SessionInput
Source§impl Serialize for SessionInput
impl Serialize for SessionInput
impl StructuralPartialEq for SessionInput
Auto Trait Implementations§
impl Forget for SessionInput
impl Freeze for SessionInput
impl Move for SessionInput
impl RefUnwindSafe for SessionInput
impl Send for SessionInput
impl Sync for SessionInput
impl Unpin for SessionInput
impl UnsafeUnpin for SessionInput
impl UnwindSafe for SessionInput
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