3461
3462
3463
3464
3465
3466
3467
3468
3469
3470
3471
3472
3473
3474
3475
3476
3477
3478
|
# File 'ext/xproto.c', line 3461
static VALUE
r_XCB_GetMotionEventsReply_get_events(VALUE r_self)
{
xcb_get_motion_events_reply_t *reply;
Data_Get_Struct(r_self, xcb_get_motion_events_reply_t, reply);
xcb_timecoord_iterator_t iterator = xcb_get_motion_events_events_iterator(reply);
VALUE r_events = rb_ary_new();
while (iterator.rem != 0) {
xcb_timecoord_t *data = malloc(sizeof(xcb_timecoord_t));
if (data == NULL)
rb_raise(rb_eNoMemError, "NoMemoryError");
VALUE r_data = Data_Wrap_Struct(r_XCB_TIMECOORD, NULL, NULL, data);
*data = *iterator.data;
rb_ary_push(r_events, r_data);
xcb_timecoord_next(&iterator);
}
return r_events;
}
|