Class: XCB::CreateNotifyEvent

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

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.new(r_parent, r_window, r_x, r_y, r_width, r_height, r_border_width, r_override_redirect) ⇒ Object



2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
# File 'ext/xproto.c', line 2499

static VALUE
r_XCB_CreateNotifyEvent_new(VALUE r_klass, VALUE r_parent, VALUE r_window, VALUE r_x, VALUE r_y, VALUE r_width, VALUE r_height, VALUE r_border_width, VALUE r_override_redirect)
{
	xcb_create_notify_event_t *self = malloc(sizeof(xcb_create_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_CREATE_NOTIFY;
	self->sequence = 0;
	self->parent = FIX2INT(r_parent);
	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->border_width = FIX2INT(r_border_width);
	self->override_redirect = RTEST(r_override_redirect);
	return r_self;
}

Instance Method Details

#border_widthObject



1426
1427
1428
1429
1430
1431
1432
# File 'ext/xproto.c', line 1426

static VALUE
r_XCB_CreateNotifyEvent_get_border_width(VALUE r_self)
{
	xcb_create_notify_event_t *event;
	Data_Get_Struct(r_self, xcb_create_notify_event_t, event);
	return INT2FIX(event->border_width);
}

#heightObject



1419
1420
1421
1422
1423
1424
1425
# File 'ext/xproto.c', line 1419

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

#override_redirectObject



1433
1434
1435
1436
1437
1438
1439
# File 'ext/xproto.c', line 1433

static VALUE
r_XCB_CreateNotifyEvent_get_override_redirect(VALUE r_self)
{
	xcb_create_notify_event_t *event;
	Data_Get_Struct(r_self, xcb_create_notify_event_t, event);
	return event->override_redirect ? Qtrue : Qfalse;
}

#parentObject



1384
1385
1386
1387
1388
1389
1390
# File 'ext/xproto.c', line 1384

static VALUE
r_XCB_CreateNotifyEvent_get_parent(VALUE r_self)
{
	xcb_create_notify_event_t *event;
	Data_Get_Struct(r_self, xcb_create_notify_event_t, event);
	return INT2FIX(event->parent);
}

#visit(r_visitor) ⇒ Object



2518
2519
2520
2521
2522
# File 'ext/xproto.c', line 2518

static VALUE
r_XCB_CreateNotifyEvent_visit(VALUE r_self, VALUE r_visitor)
{
	return rb_funcall(r_visitor, rb_intern("visit_create_notify"), 1, r_self);
}

#widthObject



1412
1413
1414
1415
1416
1417
1418
# File 'ext/xproto.c', line 1412

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

#windowObject



1391
1392
1393
1394
1395
1396
1397
# File 'ext/xproto.c', line 1391

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

#xObject



1398
1399
1400
1401
1402
1403
1404
# File 'ext/xproto.c', line 1398

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

#yObject



1405
1406
1407
1408
1409
1410
1411
# File 'ext/xproto.c', line 1405

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