Trait ITouchEvent

Source
pub trait ITouchEvent: IUiEvent {
    // Provided methods
    fn alt_key(&self) -> bool { ... }
    fn ctrl_key(&self) -> bool { ... }
    fn meta_key(&self) -> bool { ... }
    fn shift_key(&self) -> bool { ... }
    fn touches(&self) -> Vec<Touch> { ... }
    fn target_touches(&self) -> Vec<Touch> { ... }
    fn changed_touches(&self) -> Vec<Touch> { ... }
}
Expand description

The ITouchEvent interface represents events that occur due to the user interacting with a touch device (such as a phone).

(JavaScript docs)

Provided Methods§

Source

fn alt_key(&self) -> bool

Returns whether the Alt key was down when this event was fired.

(JavaScript docs)

Source

fn ctrl_key(&self) -> bool

Indicates whether the Ctrl key was down when this event fired.

(JavaScript docs)

Source

fn meta_key(&self) -> bool

Indicates whether the Meta key was down when this event fired.

(JavaScript docs)

Source

fn shift_key(&self) -> bool

Indicates whether the Shift key was down when this event was fired.

(JavaScript docs)

Source

fn touches(&self) -> Vec<Touch>

A list of Touches for every point of contact currently touching the surface.

(JavaScript docs)

Source

fn target_touches(&self) -> Vec<Touch>

A list of Touches for every point of contact that is touching the surface and started on the element that is the target of the current event.

(JavaScript docs)

Source

fn changed_touches(&self) -> Vec<Touch>

A list of Touches, one for each touch touch point that just became active with the current event.

(JavaScript docs)

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§