Class: XCB::ExposeEvent

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

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.new(r_window, r_x, r_y, r_width, r_height, r_count) ⇒ Object



2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
# File 'ext/xproto.c', line 2416

static VALUE
r_XCB_ExposeEvent_new(VALUE r_klass, VALUE r_window, VALUE r_x, VALUE r_y, VALUE r_width, VALUE r_height, VALUE r_count)
{
	xcb_expose_event_t *self = malloc(sizeof(xcb_expose_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_EXPOSE;
	self->sequence = 0;
	self->window = FIX2INT(r_window);
	self->x = FIX2INT(r_x);
	self->y = FIX2INT(r_y);
	self->width = FIX2INT(r_width);
	self->height = FIX2INT(r_height);
	self->count = FIX2INT(r_count);
	return r_self;
}

Instance Method Details

#countObject



1286
1287
1288
1289
1290
1291
1292
# File 'ext/xproto.c', line 1286

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

#heightObject



1279
1280
1281
1282
1283
1284
1285
# File 'ext/xproto.c', line 1279

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

#visit(r_visitor) ⇒ Object



2433
2434
2435
2436
2437
# File 'ext/xproto.c', line 2433

static VALUE
r_XCB_ExposeEvent_visit(VALUE r_self, VALUE r_visitor)
{
	return rb_funcall(r_visitor, rb_intern("visit_expose"), 1, r_self);
}

#widthObject



1272
1273
1274
1275
1276
1277
1278
# File 'ext/xproto.c', line 1272

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

#windowObject



1251
1252
1253
1254
1255
1256
1257
# File 'ext/xproto.c', line 1251

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

#xObject



1258
1259
1260
1261
1262
1263
1264
# File 'ext/xproto.c', line 1258

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

#yObject



1265
1266
1267
1268
1269
1270
1271
# File 'ext/xproto.c', line 1265

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