Class: XCB::ButtonPressEvent
- Inherits:
-
GenericEvent
- Object
- GenericEvent
- XCB::ButtonPressEvent
- Defined in:
- ext/xproto.c
Class Method Summary collapse
Instance Method Summary collapse
- #child ⇒ Object
- #detail ⇒ Object
- #event ⇒ Object
- #event_x ⇒ Object
- #event_y ⇒ Object
- #root ⇒ Object
- #root_x ⇒ Object
- #root_y ⇒ Object
- #same_screen ⇒ Object
- #state ⇒ Object
- #time ⇒ Object
- #visit(r_visitor) ⇒ Object
Class Method Details
.new(r_detail, r_time, r_root, r_event, r_child, r_root_x, r_root_y, r_event_x, r_event_y, r_state, r_same_screen) ⇒ Object
2295 2296 2297 2298 2299 2300 2301 2302 2303 2304 2305 2306 2307 2308 2309 2310 2311 2312 2313 2314 2315 2316 |
# File 'ext/xproto.c', line 2295
static VALUE
r_XCB_ButtonPressEvent_new(VALUE r_klass, VALUE r_detail, VALUE r_time, VALUE r_root, VALUE r_event, VALUE r_child, VALUE r_root_x, VALUE r_root_y, VALUE r_event_x, VALUE r_event_y, VALUE r_state, VALUE r_same_screen)
{
xcb_button_press_event_t *self = malloc(sizeof(xcb_button_press_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_BUTTON_PRESS;
self->sequence = 0;
self->detail = FIX2INT(r_detail);
self->time = FIX2INT(r_time);
self->root = FIX2INT(r_root);
self->event = FIX2INT(r_event);
self->child = FIX2INT(r_child);
self->root_x = FIX2INT(r_root_x);
self->root_y = FIX2INT(r_root_y);
self->event_x = FIX2INT(r_event_x);
self->event_y = FIX2INT(r_event_y);
self->state = FIX2INT(r_state);
self->same_screen = RTEST(r_same_screen);
return r_self;
}
|
Instance Method Details
#child ⇒ Object
1007 1008 1009 1010 1011 1012 1013 |
# File 'ext/xproto.c', line 1007
static VALUE
r_XCB_ButtonPressEvent_get_child(VALUE r_self)
{
xcb_button_press_event_t *event;
Data_Get_Struct(r_self, xcb_button_press_event_t, event);
return INT2FIX(event->child);
}
|
#detail ⇒ Object
979 980 981 982 983 984 985 |
# File 'ext/xproto.c', line 979
static VALUE
r_XCB_ButtonPressEvent_get_detail(VALUE r_self)
{
xcb_button_press_event_t *event;
Data_Get_Struct(r_self, xcb_button_press_event_t, event);
return INT2FIX(event->detail);
}
|
#event ⇒ Object
1000 1001 1002 1003 1004 1005 1006 |
# File 'ext/xproto.c', line 1000
static VALUE
r_XCB_ButtonPressEvent_get_event(VALUE r_self)
{
xcb_button_press_event_t *event;
Data_Get_Struct(r_self, xcb_button_press_event_t, event);
return INT2FIX(event->event);
}
|
#event_x ⇒ Object
1028 1029 1030 1031 1032 1033 1034 |
# File 'ext/xproto.c', line 1028
static VALUE
r_XCB_ButtonPressEvent_get_event_x(VALUE r_self)
{
xcb_button_press_event_t *event;
Data_Get_Struct(r_self, xcb_button_press_event_t, event);
return INT2FIX(event->event_x);
}
|
#event_y ⇒ Object
1035 1036 1037 1038 1039 1040 1041 |
# File 'ext/xproto.c', line 1035
static VALUE
r_XCB_ButtonPressEvent_get_event_y(VALUE r_self)
{
xcb_button_press_event_t *event;
Data_Get_Struct(r_self, xcb_button_press_event_t, event);
return INT2FIX(event->event_y);
}
|
#root ⇒ Object
993 994 995 996 997 998 999 |
# File 'ext/xproto.c', line 993
static VALUE
r_XCB_ButtonPressEvent_get_root(VALUE r_self)
{
xcb_button_press_event_t *event;
Data_Get_Struct(r_self, xcb_button_press_event_t, event);
return INT2FIX(event->root);
}
|
#root_x ⇒ Object
1014 1015 1016 1017 1018 1019 1020 |
# File 'ext/xproto.c', line 1014
static VALUE
r_XCB_ButtonPressEvent_get_root_x(VALUE r_self)
{
xcb_button_press_event_t *event;
Data_Get_Struct(r_self, xcb_button_press_event_t, event);
return INT2FIX(event->root_x);
}
|
#root_y ⇒ Object
1021 1022 1023 1024 1025 1026 1027 |
# File 'ext/xproto.c', line 1021
static VALUE
r_XCB_ButtonPressEvent_get_root_y(VALUE r_self)
{
xcb_button_press_event_t *event;
Data_Get_Struct(r_self, xcb_button_press_event_t, event);
return INT2FIX(event->root_y);
}
|
#same_screen ⇒ Object
1049 1050 1051 1052 1053 1054 1055 |
# File 'ext/xproto.c', line 1049
static VALUE
r_XCB_ButtonPressEvent_get_same_screen(VALUE r_self)
{
xcb_button_press_event_t *event;
Data_Get_Struct(r_self, xcb_button_press_event_t, event);
return event->same_screen ? Qtrue : Qfalse;
}
|
#state ⇒ Object
1042 1043 1044 1045 1046 1047 1048 |
# File 'ext/xproto.c', line 1042
static VALUE
r_XCB_ButtonPressEvent_get_state(VALUE r_self)
{
xcb_button_press_event_t *event;
Data_Get_Struct(r_self, xcb_button_press_event_t, event);
return INT2FIX(event->state);
}
|
#time ⇒ Object
986 987 988 989 990 991 992 |
# File 'ext/xproto.c', line 986
static VALUE
r_XCB_ButtonPressEvent_get_time(VALUE r_self)
{
xcb_button_press_event_t *event;
Data_Get_Struct(r_self, xcb_button_press_event_t, event);
return INT2FIX(event->time);
}
|
#visit(r_visitor) ⇒ Object
2317 2318 2319 2320 2321 |
# File 'ext/xproto.c', line 2317
static VALUE
r_XCB_ButtonPressEvent_visit(VALUE r_self, VALUE r_visitor)
{
return rb_funcall(r_visitor, rb_intern("visit_button_press"), 1, r_self);
}
|