/* * Drag the mouse cursor to the given co-ordinates * * @param (see #move_to) * @return [CGPoint] */ static VALUE rb_mouse_drag_to(const int argc, VALUE* const argv, UNUSED const VALUE self) { switch (argc) { case 0: rb_raise(rb_eArgError, "drag_to requires at least a one arg"); case 1: mouse_drag_to(rb_mouse_unwrap_point(argv[0])); break; case 2: default: mouse_drag_to2(rb_mouse_unwrap_point(argv[0]), NUM2DBL(argv[1])); } return CURRENT_POSITION; }
void mouse_drag_to(CGPoint point) { mouse_drag_to2(point, DEFAULT_DURATION); }