Class: XCB::MapNotifyEvent

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

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.new(r_event, r_window, r_override_redirect) ⇒ Object



2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
# File 'ext/xproto.c', line 2560

static VALUE
r_XCB_MapNotifyEvent_new(VALUE r_klass, VALUE r_event, VALUE r_window, VALUE r_override_redirect)
{
	xcb_map_notify_event_t *self = malloc(sizeof(xcb_map_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_MAP_NOTIFY;
	self->sequence = 0;
	self->event = FIX2INT(r_event);
	self->window = FIX2INT(r_window);
	self->override_redirect = RTEST(r_override_redirect);
	return r_self;
}

Instance Method Details

#eventObject



1475
1476
1477
1478
1479
1480
1481
# File 'ext/xproto.c', line 1475

static VALUE
r_XCB_MapNotifyEvent_get_event(VALUE r_self)
{
	xcb_map_notify_event_t *event;
	Data_Get_Struct(r_self, xcb_map_notify_event_t, event);
	return INT2FIX(event->event);
}

#override_redirectObject



1489
1490
1491
1492
1493
1494
1495
# File 'ext/xproto.c', line 1489

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

#visit(r_visitor) ⇒ Object



2574
2575
2576
2577
2578
# File 'ext/xproto.c', line 2574

static VALUE
r_XCB_MapNotifyEvent_visit(VALUE r_self, VALUE r_visitor)
{
	return rb_funcall(r_visitor, rb_intern("visit_map_notify"), 1, r_self);
}

#windowObject



1482
1483
1484
1485
1486
1487
1488
# File 'ext/xproto.c', line 1482

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