Class: XCB::PropertyNotifyEvent

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

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.new(r_window, r_atom, r_time, r_state) ⇒ Object



2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
# File 'ext/xproto.c', line 2728

static VALUE
r_XCB_PropertyNotifyEvent_new(VALUE r_klass, VALUE r_window, VALUE r_atom, VALUE r_time, VALUE r_state)
{
  xcb_property_notify_event_t *self = malloc(sizeof(xcb_property_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_PROPERTY_NOTIFY;
  self->sequence = 0;
  self->window = FIX2INT(r_window);
  self->atom = FIX2INT(r_atom);
  self->time = FIX2INT(r_time);
  self->state = FIX2INT(r_state);
  return r_self;
}

Instance Method Details

#atomObject



1762
1763
1764
1765
1766
1767
1768
# File 'ext/xproto.c', line 1762

static VALUE
r_XCB_PropertyNotifyEvent_get_atom(VALUE r_self)
{
  xcb_property_notify_event_t *event;
  Data_Get_Struct(r_self, xcb_property_notify_event_t, event);
  return INT2FIX(event->atom);
}

#stateObject



1776
1777
1778
1779
1780
1781
1782
# File 'ext/xproto.c', line 1776

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

#timeObject



1769
1770
1771
1772
1773
1774
1775
# File 'ext/xproto.c', line 1769

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

#visit(r_visitor) ⇒ Object



2743
2744
2745
2746
2747
# File 'ext/xproto.c', line 2743

static VALUE
r_XCB_PropertyNotifyEvent_visit(VALUE r_self, VALUE r_visitor)
{
  return rb_funcall(r_visitor, rb_intern("visit_property_notify"), 1, r_self);
}

#windowObject



1755
1756
1757
1758
1759
1760
1761
# File 'ext/xproto.c', line 1755

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