pub enum HostInput {
Mouse {
tab: u16,
action: MouseAction,
x: i32,
y: i32,
button: i32,
clicks: i32,
modifiers: InputModifiers,
},
Wheel {
tab: u16,
x: i32,
y: i32,
delta_x: i32,
delta_y: i32,
modifiers: InputModifiers,
},
TabNew {
url: Option<String>,
request: Option<u64>,
},
TabClose {
tab: u16,
},
TabResize {
tab: u16,
width: u32,
height: u32,
scale_milli: u32,
},
File {
id: u64,
paths: Vec<String>,
},
Dialog {
tab: u16,
accept: bool,
prompt: Option<String>,
},
RecordStart {
tab: u16,
path: String,
},
RecordStop,
}Expand description
One pointer gesture as the host delivers it, in whole page pixels.
CEF’s mouse calls take view coordinates as integers, so the fraction is rounded here rather than in the host, and the line is one shape the service and the host are both tested against.
Variants§
Mouse
Fields
action: MouseAction0 left, 1 right, 2 middle - AppKit’s own numbering.
modifiers: InputModifiersWheel
Fields
modifiers: InputModifiersTabNew
Open a new tab at url, or blank. A trusted server command: unlike
a page’s popup it accepts any address the server names. request is
echoed on the tab’s birth so a caller can tell its tab from a popup
that was queued beside it.
TabClose
Close one tab.
TabResize
Lay one tab out apart from the profile’s request: a take records at its own size without resizing every other tab.
File
The files a person chose for a page’s file dialog: server-local paths already written for CEF, or none when the dialog was dismissed.
Dialog
Answer a page’s JavaScript dialog: accept is the button, and prompt
the text a prompt asks for. The host owns the CEF callback, so an
answer can only arrive this way (#2732).
RecordStart
Begin a recording of tab’s viewport into path, a server-local file
the service has already laid the page out for.
RecordStop
Finish the running recording; the host answers with its outcome.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for HostInput
impl<'de> Deserialize<'de> for HostInput
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>,
impl Eq for HostInput
impl StructuralPartialEq for HostInput
Auto Trait Implementations§
impl Freeze for HostInput
impl RefUnwindSafe for HostInput
impl Send for HostInput
impl Sync for HostInput
impl Unpin for HostInput
impl UnsafeUnpin for HostInput
impl UnwindSafe for HostInput
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> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.