Class: XCB::GraphicsExposureEvent

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

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.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;
}

Instance Method Details

#countObject



1335
1336
1337
1338
1339
1340
1341
# File 'ext/xproto.c', line 1335

static VALUE
r_XCB_GraphicsExposureEvent_get_count(VALUE r_self)
{
	xcb_graphics_exposure_event_t *event;
	Data_Get_Struct(r_self, xcb_graphics_exposure_event_t, event);
	return INT2FIX(event->count);
}

#drawableObject



1293
1294
1295
1296
1297
1298
1299
# File 'ext/xproto.c', line 1293

static VALUE
r_XCB_GraphicsExposureEvent_get_drawable(VALUE r_self)
{
	xcb_graphics_exposure_event_t *event;
	Data_Get_Struct(r_self, xcb_graphics_exposure_event_t, event);
	return INT2FIX(event->drawable);
}

#heightObject



1321
1322
1323
1324
1325
1326
1327
# File 'ext/xproto.c', line 1321

static VALUE
r_XCB_GraphicsExposureEvent_get_height(VALUE r_self)
{
	xcb_graphics_exposure_event_t *event;
	Data_Get_Struct(r_self, xcb_graphics_exposure_event_t, event);
	return INT2FIX(event->height);
}

#major_opcodeObject



1342
1343
1344
1345
1346
1347
1348
# File 'ext/xproto.c', line 1342

static VALUE
r_XCB_GraphicsExposureEvent_get_major_opcode(VALUE r_self)
{
	xcb_graphics_exposure_event_t *event;
	Data_Get_Struct(r_self, xcb_graphics_exposure_event_t, event);
	return INT2FIX(event->major_opcode);
}

#minor_opcodeObject



1328
1329
1330
1331
1332
1333
1334
# File 'ext/xproto.c', line 1328

static VALUE
r_XCB_GraphicsExposureEvent_get_minor_opcode(VALUE r_self)
{
	xcb_graphics_exposure_event_t *event;
	Data_Get_Struct(r_self, xcb_graphics_exposure_event_t, event);
	return INT2FIX(event->minor_opcode);
}

#visit(r_visitor) ⇒ Object



2457
2458
2459
2460
2461
# File 'ext/xproto.c', line 2457

static VALUE
r_XCB_GraphicsExposureEvent_visit(VALUE r_self, VALUE r_visitor)
{
	return rb_funcall(r_visitor, rb_intern("visit_graphics_exposure"), 1, r_self);
}

#widthObject



1314
1315
1316
1317
1318
1319
1320
# File 'ext/xproto.c', line 1314

static VALUE
r_XCB_GraphicsExposureEvent_get_width(VALUE r_self)
{
	xcb_graphics_exposure_event_t *event;
	Data_Get_Struct(r_self, xcb_graphics_exposure_event_t, event);
	return INT2FIX(event->width);
}

#xObject



1300
1301
1302
1303
1304
1305
1306
# File 'ext/xproto.c', line 1300

static VALUE
r_XCB_GraphicsExposureEvent_get_x(VALUE r_self)
{
	xcb_graphics_exposure_event_t *event;
	Data_Get_Struct(r_self, xcb_graphics_exposure_event_t, event);
	return INT2FIX(event->x);
}

#yObject



1307
1308
1309
1310
1311
1312
1313
# File 'ext/xproto.c', line 1307

static VALUE
r_XCB_GraphicsExposureEvent_get_y(VALUE r_self)
{
	xcb_graphics_exposure_event_t *event;
	Data_Get_Struct(r_self, xcb_graphics_exposure_event_t, event);
	return INT2FIX(event->y);
}