Function input_synthesis::swipe_command

source ยท
pub async fn swipe_command(
    x0: u32,
    y0: u32,
    x1: u32,
    y1: u32,
    width: u32,
    height: u32,
    move_event_count: usize,
    duration: Duration,
) -> Result<(), Error>
Expand description

Simulates swipe from coordinates (x0, y0) to (x1, y1) for a touchscreen with horizontal resolution width and vertical resolution height, with move_event_count touch-move events in between. Positions for move events are linearly interpolated.

Finger positions should be specified in absolute coordinations, with x values normally in the range (0, width), and y values normally in the range (0, height).

duration is the total time from the touch-down event to the touch-up event, inclusive of all move events in between.