Exemple #1
0
/*
 * Generate the up click part of a secondary/right click event
 *
 * This might be useful in concert with {Mouse.secondary_click_down} 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_up()
 *   @return [CGPoint]
 * @overload secondary_click_up(point)
 *   @param point [CGPoint]
 *   @return [CGPoint]
 */
static
VALUE
rb_mouse_secondary_click_up(const int argc,
                            VALUE* const argv,
                            UNUSED const VALUE self)
{
    switch (argc) {
    case 0:
        mouse_secondary_click_up();
        break;
    case 1:
    default:
        mouse_secondary_click_up2(rb_mouse_unwrap_point(argv[0]));
    }

    return CURRENT_POSITION;
}
Exemple #2
0
void
mouse_secondary_click()
{
  mouse_secondary_click_down();
  mouse_secondary_click_up();
}