pub enum BrowserInputEvent {
Mouse {
action: MouseAction,
x: f64,
y: f64,
button: i32,
clicks: i32,
modifiers: InputModifiers,
},
Wheel {
x: f64,
y: f64,
delta_x: f64,
delta_y: f64,
modifiers: InputModifiers,
},
Key {
down: bool,
key: String,
code: String,
windows_vk: i32,
modifiers: InputModifiers,
},
Text {
text: String,
},
}Expand description
One input event a controlling viewer sends, in CSS pixels for the page’s viewport.
The wire carries the person’s gesture, not the browser’s protocol. A
press and a wheel reach CEF’s own mouse calls and a key or text reach
CDP’s Input.*; a client speaks about a click, and the protocol’s method
names stay on the server.
Variants§
Mouse
Wheel
A wheel’s deltas in the page’s own sign: positive scrolls down and right. The server turns the sign back for CEF.
Key
A key with no text of its own: an arrow, Enter, Escape, a modifier.
Fields
§
modifiers: InputModifiersText
The person’s own text, inserted as text rather than replayed keycodes.
Trait Implementations§
Source§impl Clone for BrowserInputEvent
impl Clone for BrowserInputEvent
Source§impl Debug for BrowserInputEvent
impl Debug for BrowserInputEvent
Source§impl<'de> Deserialize<'de> for BrowserInputEvent
impl<'de> Deserialize<'de> for BrowserInputEvent
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 BrowserInputEvent
impl PartialEq for BrowserInputEvent
Source§impl Serialize for BrowserInputEvent
impl Serialize for BrowserInputEvent
impl StructuralPartialEq for BrowserInputEvent
Auto Trait Implementations§
impl Freeze for BrowserInputEvent
impl RefUnwindSafe for BrowserInputEvent
impl Send for BrowserInputEvent
impl Sync for BrowserInputEvent
impl Unpin for BrowserInputEvent
impl UnsafeUnpin for BrowserInputEvent
impl UnwindSafe for BrowserInputEvent
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