Class: XCB::KeyPressEvent
- Inherits:
-
GenericEvent
- Object
- GenericEvent
- XCB::KeyPressEvent
- 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
2268 2269 2270 2271 2272 2273 2274 2275 2276 2277 2278 2279 2280 2281 2282 2283 2284 2285 2286 2287 2288 2289 |
# File 'ext/xproto.c', line 2268 static VALUE r_XCB_KeyPressEvent_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_key_press_event_t *self = malloc(sizeof(xcb_key_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_KEY_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
930 931 932 933 934 935 936 |
# File 'ext/xproto.c', line 930 static VALUE r_XCB_KeyPressEvent_get_child(VALUE r_self) { xcb_key_press_event_t *event; Data_Get_Struct(r_self, xcb_key_press_event_t, event); return INT2FIX(event->child); } |
#detail ⇒ Object
902 903 904 905 906 907 908 |
# File 'ext/xproto.c', line 902 static VALUE r_XCB_KeyPressEvent_get_detail(VALUE r_self) { xcb_key_press_event_t *event; Data_Get_Struct(r_self, xcb_key_press_event_t, event); return INT2FIX(event->detail); } |
#event ⇒ Object
923 924 925 926 927 928 929 |
# File 'ext/xproto.c', line 923 static VALUE r_XCB_KeyPressEvent_get_event(VALUE r_self) { xcb_key_press_event_t *event; Data_Get_Struct(r_self, xcb_key_press_event_t, event); return INT2FIX(event->event); } |
#event_x ⇒ Object
951 952 953 954 955 956 957 |
# File 'ext/xproto.c', line 951 static VALUE r_XCB_KeyPressEvent_get_event_x(VALUE r_self) { xcb_key_press_event_t *event; Data_Get_Struct(r_self, xcb_key_press_event_t, event); return INT2FIX(event->event_x); } |
#event_y ⇒ Object
958 959 960 961 962 963 964 |
# File 'ext/xproto.c', line 958 static VALUE r_XCB_KeyPressEvent_get_event_y(VALUE r_self) { xcb_key_press_event_t *event; Data_Get_Struct(r_self, xcb_key_press_event_t, event); return INT2FIX(event->event_y); } |
#root ⇒ Object
916 917 918 919 920 921 922 |
# File 'ext/xproto.c', line 916 static VALUE r_XCB_KeyPressEvent_get_root(VALUE r_self) { xcb_key_press_event_t *event; Data_Get_Struct(r_self, xcb_key_press_event_t, event); return INT2FIX(event->root); } |
#root_x ⇒ Object
937 938 939 940 941 942 943 |
# File 'ext/xproto.c', line 937 static VALUE r_XCB_KeyPressEvent_get_root_x(VALUE r_self) { xcb_key_press_event_t *event; Data_Get_Struct(r_self, xcb_key_press_event_t, event); return INT2FIX(event->root_x); } |
#root_y ⇒ Object
944 945 946 947 948 949 950 |
# File 'ext/xproto.c', line 944 static VALUE r_XCB_KeyPressEvent_get_root_y(VALUE r_self) { xcb_key_press_event_t *event; Data_Get_Struct(r_self, xcb_key_press_event_t, event); return INT2FIX(event->root_y); } |
#same_screen ⇒ Object
972 973 974 975 976 977 978 |
# File 'ext/xproto.c', line 972 static VALUE r_XCB_KeyPressEvent_get_same_screen(VALUE r_self) { xcb_key_press_event_t *event; Data_Get_Struct(r_self, xcb_key_press_event_t, event); return event->same_screen ? Qtrue : Qfalse; } |
#state ⇒ Object
965 966 967 968 969 970 971 |
# File 'ext/xproto.c', line 965 static VALUE r_XCB_KeyPressEvent_get_state(VALUE r_self) { xcb_key_press_event_t *event; Data_Get_Struct(r_self, xcb_key_press_event_t, event); return INT2FIX(event->state); } |
#time ⇒ Object
909 910 911 912 913 914 915 |
# File 'ext/xproto.c', line 909 static VALUE r_XCB_KeyPressEvent_get_time(VALUE r_self) { xcb_key_press_event_t *event; Data_Get_Struct(r_self, xcb_key_press_event_t, event); return INT2FIX(event->time); } |
#visit(r_visitor) ⇒ Object
2290 2291 2292 2293 2294 |
# File 'ext/xproto.c', line 2290 static VALUE r_XCB_KeyPressEvent_visit(VALUE r_self, VALUE r_visitor) { return rb_funcall(r_visitor, rb_intern("visit_key_press"), 1, r_self); } |