/* * Generate the down click part of a click event * * This might be useful in concert with {Mouse.click_up} if you want * to inject some behaviour between the down and up click events. * * You can optionally specify a point to click; the mouse cursor will * instantly jump to the given point; otherwise the click event happens * at the current cursor position. * * @overload click_down() * @return [CGPoint] * @overload click_down(point) * @param point [CGPoint] * @return [CGPoint] */ static VALUE rb_mouse_click_down(const int argc, VALUE* const argv, UNUSED const VALUE self) { switch (argc) { case 0: mouse_click_down(); break; case 1: default: mouse_click_down2(rb_mouse_unwrap_point(argv[0])); } return CURRENT_POSITION; }
void mouse_click2(CGPoint point) { mouse_click_down2(point); mouse_click_up2(point); }
void mouse_click_down() { mouse_click_down2(mouse_current_position()); }