lustre_touch_events

Types

Touch type corresponding to: https://developer.mozilla.org/en-US/docs/Web/API/Touch

pub type Touch {
  Touch(
    identifier: Int,
    screen_x: Float,
    screen_y: Float,
    client_x: Float,
    client_y: Float,
    page_x: Float,
    page_y: Float,
  )
}

Constructors

  • Touch(
      identifier: Int,
      screen_x: Float,
      screen_y: Float,
      client_x: Float,
      client_y: Float,
      page_x: Float,
      page_y: Float,
    )

Touch event containing the touch lists.

pub type TouchEvent {
  TouchEvent(
    changed_touches: List(Touch),
    target_touches: List(Touch),
    touches: List(Touch),
  )
}

Constructors

  • TouchEvent(
      changed_touches: List(Touch),
      target_touches: List(Touch),
      touches: List(Touch),
    )

Functions

pub fn on_touch_cancel(msg: fn(TouchEvent) -> a) -> Attribute(a)

touchcancel event: https://developer.mozilla.org/en-US/docs/Web/API/Element/touchcancel_event

pub fn on_touch_end(msg: fn(TouchEvent) -> a) -> Attribute(a)

touchend event: https://developer.mozilla.org/en-US/docs/Web/API/Element/touchend_event

pub fn on_touch_move(msg: fn(TouchEvent) -> a) -> Attribute(a)

touchmove event: https://developer.mozilla.org/en-US/docs/Web/API/Element/touchmove_event

pub fn on_touch_start(msg: fn(TouchEvent) -> a) -> Attribute(a)

touchstart event: https://developer.mozilla.org/en-US/docs/Web/API/Element/touchstart_event

Search Document