redraw/dom/event/touch

To provide quality support for touch-based user interfaces, touch events offer the ability to interpret finger (or stylus) activity on touch screens or trackpads.

The touch events interfaces are relatively low-level APIs that can be used to support application-specific multi-touch interactions such as a two-finger gesture. A multi-touch interaction starts when a finger (or stylus) first touches the contact surface. Other fingers may subsequently touch the surface and optionally move across the touch surface. The interaction ends when the fingers are removed from the surface. During this interaction, an application receives touch events during the start, move, and end phases.

Touch events are similar to mouse events except they support simultaneous touches and at different locations on the touch surface. The TouchEvent interface encapsulates all of the touchpoints that are currently active. The Touch interface, which represents a single touchpoint, includes information such as the position of the touch point relative to the browser viewport.

Documentation

Types

pub type TouchEvent

Values

pub fn alt_key(event: TouchEvent) -> Bool
pub const as_event: fn(TouchEvent) -> event.Event

TouchEvent inherits Event.

pub const as_ui_event: fn(TouchEvent) -> ui.UIEvent

TouchEvent inherits UIEvent.

pub fn ctrl_key(event: TouchEvent) -> Bool
pub fn get_modifier_state(event: TouchEvent, key: String) -> Bool
pub fn meta_key(event: TouchEvent) -> Bool
pub fn shift_key(event: TouchEvent) -> Bool
Search Document