Class: XCB::SelectionRequestEvent

Inherits:
GenericEvent show all
Defined in:
ext/xproto.c

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.new(r_time, r_owner, r_requestor, r_selection, r_target, r_property) ⇒ Object



2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
# File 'ext/xproto.c', line 2767

static VALUE
r_XCB_SelectionRequestEvent_new(VALUE r_klass, VALUE r_time, VALUE r_owner, VALUE r_requestor, VALUE r_selection, VALUE r_target, VALUE r_property)
{
  xcb_selection_request_event_t *self = malloc(sizeof(xcb_selection_request_event_t));
  if (self == NULL)
    rb_raise(rb_eNoMemError, "NoMemoryError");
  VALUE r_self = Data_Wrap_Struct(r_klass, NULL, NULL, self);
  self->response_type = XCB_SELECTION_REQUEST;
  self->sequence = 0;
  self->time = FIX2INT(r_time);
  self->owner = FIX2INT(r_owner);
  self->requestor = FIX2INT(r_requestor);
  self->selection = FIX2INT(r_selection);
  self->target = FIX2INT(r_target);
  self->property = FIX2INT(r_property);
  return r_self;
}

Instance Method Details

#ownerObject



1811
1812
1813
1814
1815
1816
1817
# File 'ext/xproto.c', line 1811

static VALUE
r_XCB_SelectionRequestEvent_get_owner(VALUE r_self)
{
  xcb_selection_request_event_t *event;
  Data_Get_Struct(r_self, xcb_selection_request_event_t, event);
  return INT2FIX(event->owner);
}

#propertyObject



1839
1840
1841
1842
1843
1844
1845
# File 'ext/xproto.c', line 1839

static VALUE
r_XCB_SelectionRequestEvent_get_property(VALUE r_self)
{
  xcb_selection_request_event_t *event;
  Data_Get_Struct(r_self, xcb_selection_request_event_t, event);
  return INT2FIX(event->property);
}

#requestorObject



1818
1819
1820
1821
1822
1823
1824
# File 'ext/xproto.c', line 1818

static VALUE
r_XCB_SelectionRequestEvent_get_requestor(VALUE r_self)
{
  xcb_selection_request_event_t *event;
  Data_Get_Struct(r_self, xcb_selection_request_event_t, event);
  return INT2FIX(event->requestor);
}

#selectionObject



1825
1826
1827
1828
1829
1830
1831
# File 'ext/xproto.c', line 1825

static VALUE
r_XCB_SelectionRequestEvent_get_selection(VALUE r_self)
{
  xcb_selection_request_event_t *event;
  Data_Get_Struct(r_self, xcb_selection_request_event_t, event);
  return INT2FIX(event->selection);
}

#targetObject



1832
1833
1834
1835
1836
1837
1838
# File 'ext/xproto.c', line 1832

static VALUE
r_XCB_SelectionRequestEvent_get_target(VALUE r_self)
{
  xcb_selection_request_event_t *event;
  Data_Get_Struct(r_self, xcb_selection_request_event_t, event);
  return INT2FIX(event->target);
}

#timeObject



1804
1805
1806
1807
1808
1809
1810
# File 'ext/xproto.c', line 1804

static VALUE
r_XCB_SelectionRequestEvent_get_time(VALUE r_self)
{
  xcb_selection_request_event_t *event;
  Data_Get_Struct(r_self, xcb_selection_request_event_t, event);
  return INT2FIX(event->time);
}

#visit(r_visitor) ⇒ Object



2784
2785
2786
2787
2788
# File 'ext/xproto.c', line 2784

static VALUE
r_XCB_SelectionRequestEvent_visit(VALUE r_self, VALUE r_visitor)
{
  return rb_funcall(r_visitor, rb_intern("visit_selection_request"), 1, r_self);
}