Method: XCB::GraphicsExposureEvent.new

Defined in:
ext/xproto.c

.new(r_drawable, r_x, r_y, r_width, r_height, r_minor_opcode, r_count, r_major_opcode) ⇒ Object



2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
# File 'ext/xproto.c', line 2438

static VALUE
r_XCB_GraphicsExposureEvent_new(VALUE r_klass, VALUE r_drawable, VALUE r_x, VALUE r_y, VALUE r_width, VALUE r_height, VALUE r_minor_opcode, VALUE r_count, VALUE r_major_opcode)
{
  xcb_graphics_exposure_event_t *self = malloc(sizeof(xcb_graphics_exposure_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_GRAPHICS_EXPOSURE;
  self->sequence = 0;
  self->drawable = FIX2INT(r_drawable);
  self->x = FIX2INT(r_x);
  self->y = FIX2INT(r_y);
  self->width = FIX2INT(r_width);
  self->height = FIX2INT(r_height);
  self->minor_opcode = FIX2INT(r_minor_opcode);
  self->count = FIX2INT(r_count);
  self->major_opcode = FIX2INT(r_major_opcode);
  return r_self;
}