pub enum NavigationEvent {
    KeyPress {
        key: String,
        modifier_state: NavigationModifierType,
    },
    KeyRelease {
        key: String,
        modifier_state: NavigationModifierType,
    },
    MouseMove {
        x: f64,
        y: f64,
        modifier_state: NavigationModifierType,
    },
    MouseButtonPress {
        button: i32,
        x: f64,
        y: f64,
        modifier_state: NavigationModifierType,
    },
    MouseButtonRelease {
        button: i32,
        x: f64,
        y: f64,
        modifier_state: NavigationModifierType,
    },
    Command {
        command: NavigationCommand,
        modifier_state: NavigationModifierType,
    },
    MouseScroll {
        x: f64,
        y: f64,
        delta_x: f64,
        delta_y: f64,
        modifier_state: NavigationModifierType,
    },
    TouchDown {
        identifier: u32,
        x: f64,
        y: f64,
        pressure: f64,
        modifier_state: NavigationModifierType,
    },
    TouchMotion {
        identifier: u32,
        x: f64,
        y: f64,
        pressure: f64,
        modifier_state: NavigationModifierType,
    },
    TouchUp {
        identifier: u32,
        x: f64,
        y: f64,
        modifier_state: NavigationModifierType,
    },
    TouchFrame {
        modifier_state: NavigationModifierType,
    },
    TouchCancel {
        modifier_state: NavigationModifierType,
    },
}

Variants§

§

KeyPress

Fields

§modifier_state: NavigationModifierType
§

KeyRelease

Fields

§modifier_state: NavigationModifierType
§

MouseMove

Fields

§modifier_state: NavigationModifierType
§

MouseButtonPress

Fields

§button: i32
§modifier_state: NavigationModifierType
§

MouseButtonRelease

Fields

§button: i32
§modifier_state: NavigationModifierType
§

Command

Fields

§modifier_state: NavigationModifierType
§

MouseScroll

Fields

§delta_x: f64
§delta_y: f64
§modifier_state: NavigationModifierType
§

TouchDown

Fields

§identifier: u32
§pressure: f64
§modifier_state: NavigationModifierType
§

TouchMotion

Fields

§identifier: u32
§pressure: f64
§modifier_state: NavigationModifierType
§

TouchUp

Fields

§identifier: u32
§modifier_state: NavigationModifierType
§

TouchFrame

Fields

§modifier_state: NavigationModifierType
§

TouchCancel

Fields

§modifier_state: NavigationModifierType

Implementations§

source§

impl NavigationEvent

source

pub fn new_key_press(key: &str) -> NavigationEvent

source

pub fn new_key_release(key: &str) -> NavigationEvent

source

pub fn new_mouse_move(x: f64, y: f64) -> NavigationEvent

source

pub fn new_mouse_button_press(button: i32, x: f64, y: f64) -> NavigationEvent

source

pub fn new_mouse_button_release(button: i32, x: f64, y: f64) -> NavigationEvent

source

pub fn new_mouse_scroll( x: f64, y: f64, delta_x: f64, delta_y: f64 ) -> NavigationEvent

source

pub fn new_command(command: NavigationCommand) -> NavigationEvent

source

pub fn new_touch_down( identifier: u32, x: f64, y: f64, pressure: f64 ) -> NavigationEvent

source

pub fn new_touch_motion( identifier: u32, x: f64, y: f64, pressure: f64 ) -> NavigationEvent

source

pub fn new_touch_up(identifier: u32, x: f64, y: f64) -> NavigationEvent

source

pub fn new_touch_frame() -> NavigationEvent

source

pub fn new_touch_cancel() -> NavigationEvent

source

pub fn key_press_builder(key: &str) -> KeyEventBuilder<'_>

source

pub fn key_release_builder(key: &str) -> KeyEventBuilder<'_>

source

pub fn mouse_move_builder(x: f64, y: f64) -> MouseEventBuilder<'static>

source

pub fn mouse_button_press_builder( button: i32, x: f64, y: f64 ) -> MouseEventBuilder<'static>

source

pub fn mouse_button_release_builder( button: i32, x: f64, y: f64 ) -> MouseEventBuilder<'static>

source

pub fn mouse_scroll_builder( x: f64, y: f64, delta_x: f64, delta_y: f64 ) -> MouseEventBuilder<'static>

source

pub fn command_builder( command: NavigationCommand ) -> CommandEventBuilder<'static>

source

pub fn touch_down_builder( identifier: u32, x: f64, y: f64, pressure: f64 ) -> TouchEventBuilder<'static>

source

pub fn touch_motion_builder( identifier: u32, x: f64, y: f64, pressure: f64 ) -> TouchEventBuilder<'static>

source

pub fn touch_up_builder( identifier: u32, x: f64, y: f64 ) -> TouchEventBuilder<'static>

source

pub fn touch_frame_builder() -> TouchMetaEventBuilder<'static>

source

pub fn touch_cancel_builder() -> TouchMetaEventBuilder<'static>

source

pub fn type_(event: &EventRef) -> NavigationEventType

source

pub fn parse(event: &EventRef) -> Result<Self, BoolError>

source

pub fn structure(&self) -> Structure

source

pub fn build(&self) -> Event

Trait Implementations§

source§

impl Clone for NavigationEvent

source§

fn clone(&self) -> NavigationEvent

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for NavigationEvent

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'de> Deserialize<'de> for NavigationEvent

source§

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 NavigationEvent

source§

fn eq(&self, other: &NavigationEvent) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl Serialize for NavigationEvent

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl StructuralPartialEq for NavigationEvent

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> 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> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

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

§

type Error = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

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

§

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<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,