Skip to main content

BrowserInputHandler

Struct BrowserInputHandler 

Source
pub struct BrowserInputHandler { /* private fields */ }
Expand description

Turns the events of the element of a top-level into raw input events and delivers them to the top-level.

Implementations§

Source§

impl BrowserInputHandler

Source

pub fn text_input_method(&self) -> &Rc<BrowserTextInputMethod>

The text input method of the top-level.

Source

pub fn input_pane(&self) -> &Rc<BrowserInputPane>

The input pane of the top-level.

Source

pub fn timestamp(&self) -> u64

The milliseconds since the handler was created: the time stamp of the raw input events.

Source

pub fn on_pointer_move( &self, pointer_type: &str, pointer_id: i64, offset_x: f64, offset_y: f64, pressure: f64, tilt_x: f64, tilt_y: f64, twist: f64, modifier: i32, event_age: f64, args_obj: JsObject, ) -> bool

Source

pub fn on_pointer_down( &self, pointer_type: &str, pointer_id: i64, buttons: i32, offset_x: f64, offset_y: f64, pressure: f64, tilt_x: f64, tilt_y: f64, twist: f64, modifier: i32, event_age: f64, ) -> bool

Source

pub fn on_pointer_up( &self, pointer_type: &str, pointer_id: i64, buttons: i32, offset_x: f64, offset_y: f64, pressure: f64, tilt_x: f64, tilt_y: f64, twist: f64, modifier: i32, event_age: f64, ) -> bool

Source

pub fn on_pointer_cancel( &self, pointer_type: &str, pointer_id: i64, offset_x: f64, offset_y: f64, pressure: f64, tilt_x: f64, tilt_y: f64, twist: f64, modifier: i32, event_age: f64, ) -> bool

Source

pub fn on_wheel( &self, offset_x: f64, offset_y: f64, delta_x: f64, delta_y: f64, delta_mode: i32, modifier: i32, ) -> bool

The wheel turned; delta_mode is the unit of the deltas (WheelEvent.deltaMode).

Source

pub fn on_drag_event( &self, type_: &str, offset_x: f64, offset_y: f64, modifiers: i32, data_transfer: &JsObject, items: JsObject, ) -> bool

A drag operation of the page entered, moved over, left or dropped on the element of the top-level. data_transfer is the data transfer of the event and items its items as readable data items.

Source

pub fn on_key_down( &self, code: Option<&str>, key: Option<&str>, modifier: i32, ) -> bool

A key went down. code and key are the values of the event of the page; a missing one (some virtual keyboards and autofill send key events without them) is an unknown key.

Source

pub fn on_key_up( &self, code: Option<&str>, key: Option<&str>, modifier: i32, ) -> bool

A key went up; see on_key_down.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> ClassDefaults for T
where T: ?Sized,

Source§

fn static_constructor()

The static constructor of a type: work done once per thread, after the properties of the type are registered and before its first instance exists (class handlers, affects_render, metadata overrides). Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<S, T> Upcast<T> for S
where T: UpcastFrom<S> + ?Sized, S: ?Sized,

Source§

fn upcast(&self) -> &T
where Self: ErasableGeneric, T: Sized + ErasableGeneric<Repr = Self::Repr>,

Perform a zero-cost type-safe upcast to a wider ref type within the Wasm bindgen generics type system. Read more
Source§

fn upcast_into(self) -> T
where Self: Sized + ErasableGeneric, T: Sized + ErasableGeneric<Repr = Self::Repr>,

Perform a zero-cost type-safe upcast to a wider type within the Wasm bindgen generics type system. Read more