/* * Generate the down click part of a secondary/right click event * * This might be useful in concert with {Mouse.secondary_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 secondary_click_down() * @return [CGPoint] * @overload secondary_click_down(point) * @param point [CGPoint] * @return [CGPoint] */ static VALUE rb_mouse_secondary_click_down(const int argc, VALUE* const argv, UNUSED const VALUE self) { switch (argc) { case 0: mouse_secondary_click_down(); break; case 1: default: mouse_secondary_click_down2(rb_mouse_unwrap_point(argv[0])); } return CURRENT_POSITION; }
void mouse_secondary_click2(CGPoint point) { mouse_secondary_click_down2(point); mouse_secondary_click_up2(point); }
void mouse_secondary_click_down() { mouse_secondary_click_down2(mouse_current_position()); }