Class: XCB::KeymapNotifyEvent
- Inherits:
-
GenericEvent
- Object
- GenericEvent
- XCB::KeymapNotifyEvent
- Defined in:
- ext/xproto.c
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.new(r_keys) ⇒ Object
2396 2397 2398 2399 2400 2401 2402 2403 2404 2405 2406 2407 2408 2409 2410 |
# File 'ext/xproto.c', line 2396
static VALUE
r_XCB_KeymapNotifyEvent_new(VALUE r_klass, VALUE r_keys)
{
xcb_keymap_notify_event_t *self = malloc(sizeof(xcb_keymap_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_KEYMAP_NOTIFY;
Check_Type(r_keys, T_ARRAY);
int __keys_len = 31;
int i;
for (i = 0; i < __keys_len; i += 1)
self->keys[i] = FIX2INT(rb_ary_entry(r_keys, i));
return r_self;
}
|
Instance Method Details
#keys ⇒ Object
1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 |
# File 'ext/xproto.c', line 1238
static VALUE
r_XCB_KeymapNotifyEvent_get_keys(VALUE r_self)
{
xcb_keymap_notify_event_t *event;
Data_Get_Struct(r_self, xcb_keymap_notify_event_t, event);
int __keys_len = 31;
uint8_t *__keys = event->keys;
VALUE r_keys = rb_ary_new2(__keys_len);
int i;
for (i = 0; i < __keys_len; i += 1)
rb_ary_store(r_keys, i, INT2FIX(__keys[i]));
return r_keys;
}
|
#visit(r_visitor) ⇒ Object
2411 2412 2413 2414 2415 |
# File 'ext/xproto.c', line 2411
static VALUE
r_XCB_KeymapNotifyEvent_visit(VALUE r_self, VALUE r_visitor)
{
return rb_funcall(r_visitor, rb_intern("visit_keymap_notify"), 1, r_self);
}
|