Expand description
Pointer (mouse) component — validation and dispatch of pointer steps.
This is a COMPONENT, not a tool: it knows how to validate and execute
ONE pointer step (click/double_click/right_click/move/down/up/scroll/
drag) against either desktop coordinates or an accessibility-tree
element, and nothing else. The pipeline tools (computer_control)
compose it with the keyboard (super::keyboard) and wait engines;
any future tool that needs pixel-precise mouse input can reuse it
without carrying the pipelines along.
Targeting comes in two forms, validated to be mutually exclusive: raw
coordinates (x/y, position-dependent) or the element form
(app/pid/surface + selector), whose point resolves from the
element’s CURRENT bounds at dispatch time — never stale.
Constants§
- DEFAULT_
DRAG_ MS - Default duration of a
dragmovement, in milliseconds. - MIN_
DRAG_ MS - Minimum duration of a
dragmovement — below this the interpolation degenerates to a jump, which drops intermediate hover/enter events.
Functions§
- action_
name - Wire-facing name of a pointer action.
- anchor
- Map the wire anchor to xa11y’s
Anchor. - parse_
button - Parse a button name (
left/right/middle). - run_
step - Execute ONE validated pointer step. The element form resolves the point from the element’s CURRENT bounds at dispatch time (never stale); the coordinate form passes through. Returns the step’s report fragment.
- validate
- Pointer-step validation: one target form (coordinates XOR element, or
neither for
up), action-specific fields, drag endpoint pairing.