Class: XCB::ColormapNotifyEvent

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

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.new(r_window, r_colormap, r_new, r_state) ⇒ Object



2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
# File 'ext/xproto.c', line 2810

static VALUE
r_XCB_ColormapNotifyEvent_new(VALUE r_klass, VALUE r_window, VALUE r_colormap, VALUE r_new, VALUE r_state)
{
  xcb_colormap_notify_event_t *self = malloc(sizeof(xcb_colormap_notify_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_COLORMAP_NOTIFY;
  self->sequence = 0;
  self->window = FIX2INT(r_window);
  self->colormap = FIX2INT(r_colormap);
  self->_new = RTEST(r_new);
  self->state = FIX2INT(r_state);
  return r_self;
}

Instance Method Details

#colormapObject



1888
1889
1890
1891
1892
1893
1894
# File 'ext/xproto.c', line 1888

static VALUE
r_XCB_ColormapNotifyEvent_get_colormap(VALUE r_self)
{
  xcb_colormap_notify_event_t *event;
  Data_Get_Struct(r_self, xcb_colormap_notify_event_t, event);
  return INT2FIX(event->colormap);
}

#stateObject



1902
1903
1904
1905
1906
1907
1908
# File 'ext/xproto.c', line 1902

static VALUE
r_XCB_ColormapNotifyEvent_get_state(VALUE r_self)
{
  xcb_colormap_notify_event_t *event;
  Data_Get_Struct(r_self, xcb_colormap_notify_event_t, event);
  return INT2FIX(event->state);
}

#visit(r_visitor) ⇒ Object



2825
2826
2827
2828
2829
# File 'ext/xproto.c', line 2825

static VALUE
r_XCB_ColormapNotifyEvent_visit(VALUE r_self, VALUE r_visitor)
{
  return rb_funcall(r_visitor, rb_intern("visit_colormap_notify"), 1, r_self);
}

#windowObject



1881
1882
1883
1884
1885
1886
1887
# File 'ext/xproto.c', line 1881

static VALUE
r_XCB_ColormapNotifyEvent_get_window(VALUE r_self)
{
  xcb_colormap_notify_event_t *event;
  Data_Get_Struct(r_self, xcb_colormap_notify_event_t, event);
  return INT2FIX(event->window);
}