Method: XCB::Connection#grab_pointer

Defined in:
ext/xproto.c

#grab_pointer(r_owner_events, r_grab_window, r_event_mask, r_pointer_mode, r_keyboard_mode, r_confine_to, r_cursor, r_time) ⇒ Object



4996
4997
4998
4999
5000
5001
5002
5003
5004
5005
5006
5007
5008
5009
5010
5011
5012
5013
5014
# File 'ext/xproto.c', line 4996

static VALUE
r_XCB_Connection_grab_pointer(VALUE r_self, VALUE r_owner_events, VALUE r_grab_window, VALUE r_event_mask, VALUE r_pointer_mode, VALUE r_keyboard_mode, VALUE r_confine_to, VALUE r_cursor, VALUE r_time)
{
  xcb_connection_t *connection;
  Data_Get_Struct(r_self, xcb_connection_t, connection);
  uint8_t __owner_events = RTEST(r_owner_events);
  uint32_t __grab_window = FIX2INT(r_grab_window);
  uint16_t __event_mask = FIX2INT(r_event_mask);
  uint8_t __pointer_mode = FIX2INT(r_pointer_mode);
  uint8_t __keyboard_mode = FIX2INT(r_keyboard_mode);
  uint32_t __confine_to = FIX2INT(r_confine_to);
  uint32_t __cursor = FIX2INT(r_cursor);
  uint32_t __time = FIX2INT(r_time);
  xcb_grab_pointer_cookie_t cookie = xcb_grab_pointer(connection, __owner_events, __grab_window, __event_mask, __pointer_mode, __keyboard_mode, __confine_to, __cursor, __time);
  xcb_grab_pointer_reply_t *reply = xcb_grab_pointer_reply(connection, cookie, NULL);
  if (reply == NULL)
    return Qnil;
  return Data_Wrap_Struct(r_XCB_GrabPointerReply, NULL, NULL, reply);
}