pub enum CursorOp {
MoveTo {
x: f64,
y: f64,
},
ClickAt {
x: f64,
y: f64,
},
HoverAt {
x: f64,
y: f64,
},
Drag {
x1: f64,
y1: f64,
x2: f64,
y2: f64,
},
Click {
x: f64,
y: f64,
opts: ClickOpts,
},
Wheel {
x: f64,
y: f64,
dx: f64,
dy: f64,
},
}Expand description
Coordinate-addressed input operations: vs move-to, vs click-at,
vs hover-at, vs drag. Native event dispatch on backends that
support it (macOS today; Linux + Windows fall through to
ENGINE_UNSUPPORTED until M7 wires GDK / CDP input).
Variants§
MoveTo
Move the pointer to (x, y) without clicking.
ClickAt
Click at (x, y). Includes a humanized lead-in from the last
known cursor position when the mode is Human.
HoverAt
Hover (mouseover) at (x, y).
Drag
Press at (x1, y1), drag along a humanized path to (x2, y2),
release.
Click
Click at (x, y) with another button, a click count above one
or modifier keys held: native events throughout, so the page
sees trusted mousedown/mouseup/click (auxclick,
contextmenu, dblclick) with detail, button and the
modifier flags set.
Wheel
Move to (x, y), then turn the wheel by (dx, dy) CSS px
(positive dy scrolls down, positive dx right), as a native
wheel event: the page sees a trusted wheel and scrolls the
element under the pointer.