pub struct Actions { /* private fields */ }
Expand description
A list of action sequences to be performed via Client::perform_actions()
An ActionSequence
is a sequence of actions of a specific type.
Multiple sequences can be represented as a table, where each row contains a sequence and each column is 1 “tick” of time. The duration of any given tick will be equal to the longest duration of any individual action in that column.
See the following example diagram:
Tick -> 1 2 3
|===================================================================
| KeyActions | Down | Up | Pause |
|-------------------------------------------------------------------
| PointerActions | Down | Pause (2 seconds) | Up |
|-------------------------------------------------------------------
| (other sequence) | Pause | Pause | Pause |
|===================================================================
At tick 1, both a KeyAction::Down
and a PointerAction::Down
are triggered
simultaneously.
At tick 2, only a KeyAction::Up
is triggered. Meanwhile the pointer sequence
has a PointerAction::Pause
for 2 seconds. Note that tick 3 does not start
until all of the actions from tick 2 have completed, including any pauses.
At tick 3, only a PointerAction::Up
is triggered.
The bottom sequence is just to show that other sequences can be added. This could
be any of NullActions
, KeyActions
or PointerActions
. There is no theoretical
limit to the number of sequences that can be specified.