コード例 #1
0
ファイル: mouse.c プロジェクト: AXElements/mouse
/*
 * Generate a regular click event (both up and down 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()
 *   @return [CGPoint]
 * @overload click()
 *   @param point [CGPoint]
 *   @return [CGPoint]
 */
static
VALUE
rb_mouse_click(const int argc, VALUE* const argv, UNUSED const VALUE self)
{
    switch (argc) {
    case 0:
        mouse_click();
        break;
    case 1:
    default:
        mouse_click2(rb_mouse_unwrap_point(argv[0]));
    }

    return CURRENT_POSITION;
}
コード例 #2
0
ファイル: mouser.c プロジェクト: tbartelmess/mouse
void
mouse_click()
{
  mouse_click2(mouse_current_position());
}