| 68 | } |
| 69 | |
| 70 | MaaCtrlId ControllerAgent::post_swipe(int x1, int y1, int x2, int y2, int duration, int contact, int pressure) |
| 71 | { |
| 72 | SwipeParam p { .begin = { x1, y1 }, |
| 73 | .end = { { x2, y2 } }, |
| 74 | .duration = { static_cast<uint>(duration) }, |
| 75 | .contact = contact, |
| 76 | .pressure = pressure }; |
| 77 | auto id = post({ .type = Action::Type::swipe, .param = std::move(p) }); |
| 78 | return focus_id(id); |
| 79 | } |
| 80 | |
| 81 | MaaCtrlId ControllerAgent::post_click_key(int keycode) |
| 82 | { |