butterbidi/input/commands/perform_actions

Types

pub type KeyDownAction {
  KeyDownAction(value: String)
}

Constructors

  • KeyDownAction(value: String)
pub type KeySourceAction {
  KeyDown(KeyDownAction)
  KeyUp(KeyUpAction)
}

Constructors

pub type KeySourceActions {
  KeySourceActions(id: String, actions: List(KeySourceAction))
}

Constructors

pub type KeyUpAction {
  KeyUpAction(value: String)
}

Constructors

  • KeyUpAction(value: String)
pub type Origin {
  Viewport
  Pointer
  Element(element_origin.ElementOrigin)
}

Constructors

pub type PerformActionsParameters {
  PerformActionsParameters(
    context: browsing_context.BrowsingContext,
    actions: List(SourceActions),
  )
}

Constructors

pub type PointerDownAction {
  PointerDownAction(button: Int)
}

Constructors

  • PointerDownAction(button: Int)
pub type PointerMoveAction {
  PointerMoveAction(
    x: Int,
    y: Int,
    duration: option.Option(Int),
    origin: option.Option(Origin),
  )
}

Constructors

pub type PointerParameters {
  PointerParameters(pointer_type: option.Option(PointerType))
}

Constructors

pub type PointerSourceAction {
  PointerDown(PointerDownAction)
  PointerUp(PointerUpAction)
  PointerMove(PointerMoveAction)
}

Constructors

pub type PointerSourceActions {
  PointerSourceActions(
    id: String,
    parameters: option.Option(PointerParameters),
    actions: List(PointerSourceAction),
  )
}

Constructors

pub type PointerType {
  Mouse
  Pen
  Touch
}

Constructors

  • Mouse
  • Pen
  • Touch
pub type PointerUpAction {
  PointerUpAction(button: Int)
}

Constructors

  • PointerUpAction(button: Int)
pub type SourceActions {
  KeySource(KeySourceActions)
  PointerSource(PointerSourceActions)
}

Constructors

Values

pub fn element_origin(
  shared_reference: remote_reference.SharedReference,
) -> option.Option(Origin)
pub fn key_action(
  actions: List(KeySourceAction),
  action: KeySourceAction,
) -> List(KeySourceAction)
pub fn key_actions(
  key_actions: List(KeySourceAction),
  actions: List(KeySourceAction),
) -> List(KeySourceAction)
pub fn key_down_action(key: String) -> KeySourceAction
pub fn key_up_action(key: String) -> KeySourceAction
pub fn perform_actions_parameters_to_json(
  perform_actions_parameters: PerformActionsParameters,
) -> json.Json
pub fn pointer_action(
  actions: List(PointerSourceAction),
  action: PointerSourceAction,
) -> List(PointerSourceAction)
pub fn pointer_down_action(button: Int) -> PointerSourceAction
pub fn pointer_move_action(
  x: Int,
  y: Int,
  duration: option.Option(Int),
  origin: option.Option(Origin),
) -> PointerSourceAction
pub fn pointer_origin() -> Origin
pub fn pointer_up_action(button: Int) -> PointerSourceAction
pub fn viewport_origin() -> Origin
pub fn with_actions(
  perform_actions_parameters: PerformActionsParameters,
  actions: List(SourceActions),
) -> PerformActionsParameters
pub fn with_key_actions(
  id: String,
  actions: List(KeySourceAction),
) -> SourceActions
pub fn with_pointer_actions(
  id: String,
  actions: List(PointerSourceAction),
) -> SourceActions
Search Document