2 * Copyright (C) 2004 ruby-ecore team (see AUTHORS)
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2.1 of the License, or (at your option) any later version.
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the Free Software
16 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
23 #include <Ecore_Input.h>
26 #include "../ecore/rb_ecore.h"
27 #include "../ecore/rb_event_handler.h"
28 #include "rb_ecore_x.h"
29 #include "rb_window.h"
30 #include "rb_cursor.h"
33 static VALUE default_root;
36 static void at_exit ()
43 static VALUE m_default_root_window_get (VALUE self)
49 static VALUE c_ev_key_down_init (VALUE self, VALUE event)
51 VALUE c = CLASS_OF (self);
52 Ecore_Event_Key *e = (void *) event;
54 rb_define_attr (c, "keyname", 1, 0);
55 rb_define_attr (c, "key", 1, 0);
56 rb_define_attr (c, "string", 1, 0);
57 rb_define_attr (c, "compose", 1, 0);
58 rb_define_attr (c, "modifiers", 1, 0);
59 rb_define_attr (c, "window", 1, 0);
60 rb_define_attr (c, "root_window", 1, 0);
61 rb_define_attr (c, "event_window", 1, 0);
62 rb_define_attr (c, "timestamp", 1, 0);
64 rb_iv_set (self, "@keyname",
65 e->keyname ? rb_str_new2 (e->keyname) : Qnil);
66 rb_iv_set (self, "@key",
67 e->key ? rb_str_new2 (e->key) : Qnil);
68 rb_iv_set (self, "@string",
69 e->string ? rb_str_new2 (e->string) : Qnil);
70 rb_iv_set (self, "@compose",
71 e->compose ? rb_str_new2 (e->compose) : Qnil);
72 rb_iv_set (self, "@modifiers", INT2FIX (e->modifiers));
73 rb_iv_set (self, "@window", TO_ECORE_X_WINDOW (Qnil, e->window));
74 rb_iv_set (self, "@root_window",
75 TO_ECORE_X_WINDOW (Qnil, e->root_window));
76 rb_iv_set (self, "@event_window",
77 TO_ECORE_X_WINDOW (Qnil, e->event_window));
78 rb_iv_set (self, "@timestamp", UINT2NUM (e->timestamp));
83 static VALUE c_ev_mouse_button_down_init (VALUE self, VALUE event)
85 VALUE c = CLASS_OF (self);
86 Ecore_Event_Mouse_Button *e = (void *) event;
88 rb_define_attr (c, "buttons", 1, 0);
89 rb_define_attr (c, "modifiers", 1, 0);
90 rb_define_attr (c, "x", 1, 0);
91 rb_define_attr (c, "y", 1, 0);
92 rb_define_attr (c, "root", 1, 0);
93 rb_define_attr (c, "window", 1, 0);
94 rb_define_attr (c, "root_window", 1, 0);
95 rb_define_attr (c, "event_window", 1, 0);
96 rb_define_attr (c, "timestamp", 1, 0);
97 rb_define_attr (c, "double_click", 1, 0);
98 rb_define_attr (c, "triple_click", 1, 0);
100 rb_iv_set (self, "@buttons", INT2FIX (e->buttons));
101 rb_iv_set (self, "@modifiers", INT2FIX (e->modifiers));
102 rb_iv_set (self, "@x", INT2FIX (e->x));
103 rb_iv_set (self, "@y", INT2FIX (e->x));
104 rb_iv_set (self, "@root", rb_ary_new3 (2, INT2FIX (e->root.x),
105 INT2FIX (e->root.y)));
106 rb_iv_set (self, "@window", TO_ECORE_X_WINDOW (Qnil, e->window));
107 rb_iv_set (self, "@root_window",
108 TO_ECORE_X_WINDOW (Qnil, e->root_window));
109 rb_iv_set (self, "@event_window",
110 TO_ECORE_X_WINDOW (Qnil, e->event_window));
111 rb_iv_set (self, "@timestamp", UINT2NUM (e->timestamp));
112 rb_iv_set (self, "@double_click",
113 e->double_click ? Qtrue : Qfalse);
114 rb_iv_set (self, "@triple_click",
115 e->triple_click ? Qtrue : Qfalse);
120 static VALUE c_ev_mouse_move_init (VALUE self, VALUE event)
122 VALUE c = CLASS_OF (self);
123 Ecore_Event_Mouse_Move *e = (void *) event;
125 rb_define_attr (c, "modifiers", 1, 0);
126 rb_define_attr (c, "x", 1, 0);
127 rb_define_attr (c, "y", 1, 0);
128 rb_define_attr (c, "root", 1, 0);
129 rb_define_attr (c, "window", 1, 0);
130 rb_define_attr (c, "root_window", 1, 0);
131 rb_define_attr (c, "event_window", 1, 0);
132 rb_define_attr (c, "timestamp", 1, 0);
134 rb_iv_set (self, "@modifiers", INT2FIX (e->modifiers));
135 rb_iv_set (self, "@x", INT2FIX (e->x));
136 rb_iv_set (self, "@y", INT2FIX (e->y));
137 rb_iv_set (self, "@root", rb_ary_new3 (2, INT2FIX (e->root.x),
138 INT2FIX (e->root.y)));
139 rb_iv_set (self, "@window", TO_ECORE_X_WINDOW (Qnil, e->window));
140 rb_iv_set (self, "@root_window",
141 TO_ECORE_X_WINDOW (Qnil, e->root_window));
142 rb_iv_set (self, "@event_window",
143 TO_ECORE_X_WINDOW (Qnil, e->event_window));
144 rb_iv_set (self, "@timestamp", UINT2NUM (e->timestamp));
149 static VALUE c_ev_mouse_in_init (VALUE self, VALUE event)
151 VALUE c = CLASS_OF (self);
152 Ecore_X_Event_Mouse_In *e = (void *) event;
154 rb_define_attr (c, "modifiers", 1, 0);
155 rb_define_attr (c, "x", 1, 0);
156 rb_define_attr (c, "y", 1, 0);
157 rb_define_attr (c, "root", 1, 0);
158 rb_define_attr (c, "window", 1, 0);
159 rb_define_attr (c, "event_window", 1, 0);
160 rb_define_attr (c, "mode", 1, 0);
161 rb_define_attr (c, "detail", 1, 0);
162 rb_define_attr (c, "time", 1, 0);
164 rb_iv_set (self, "@modifiers", INT2FIX (e->modifiers));
165 rb_iv_set (self, "@x", INT2FIX (e->x));
166 rb_iv_set (self, "@y", INT2FIX (e->y));
167 rb_iv_set (self, "@root", rb_ary_new3 (2, INT2FIX (e->root.x),
168 INT2FIX (e->root.y)));
169 rb_iv_set (self, "@window", TO_ECORE_X_WINDOW (Qnil, e->win));
170 rb_iv_set (self, "@event_window",
171 TO_ECORE_X_WINDOW (Qnil, e->event_win));
172 rb_iv_set (self, "@mode", INT2FIX (e->mode));
173 rb_iv_set (self, "@detail", INT2FIX (e->detail));
174 rb_iv_set (self, "@time", UINT2NUM (e->time));
179 static VALUE c_ev_win_focus_change_init (VALUE self, VALUE event)
181 VALUE c = CLASS_OF (self);
182 Ecore_X_Event_Window_Focus_In *e = (void *) event;
184 rb_define_attr (c, "window", 1, 0);
185 rb_define_attr (c, "mode", 1, 0);
186 rb_define_attr (c, "detail", 1, 0);
187 rb_define_attr (c, "time", 1, 0);
189 rb_iv_set (self, "@window", TO_ECORE_X_WINDOW (Qnil, e->win));
190 rb_iv_set (self, "@mode", INT2FIX (e->mode));
191 rb_iv_set (self, "@detail", INT2FIX (e->detail));
192 rb_iv_set (self, "@time", UINT2NUM (e->time));
197 static VALUE c_ev_win_delete_request_init (VALUE self, VALUE event)
199 VALUE c = CLASS_OF (self);
200 Ecore_X_Event_Window_Delete_Request *e = (void *) event;
202 rb_define_attr (c, "window", 1, 0);
203 rb_define_attr (c, "time", 1, 0);
205 rb_iv_set (self, "@window", TO_ECORE_X_WINDOW (Qnil, e->win));
206 rb_iv_set (self, "@time", UINT2NUM (e->time));
211 static VALUE c_ev_win_configure_request_init (VALUE self, VALUE event)
213 VALUE c = CLASS_OF (self);
214 Ecore_X_Event_Window_Configure_Request *e = (void *) event;
216 rb_define_attr (c, "window", 1, 0);
217 rb_define_attr (c, "window_above", 1, 0);
218 rb_define_attr (c, "x", 1, 0);
219 rb_define_attr (c, "y", 1, 0);
220 rb_define_attr (c, "w", 1, 0);
221 rb_define_attr (c, "h", 1, 0);
222 rb_define_attr (c, "border", 1, 0);
223 rb_define_attr (c, "detail", 1, 0);
224 rb_define_attr (c, "value_mask", 1, 0);
225 rb_define_attr (c, "time", 1, 0);
227 rb_iv_set (self, "@window", TO_ECORE_X_WINDOW (Qnil, e->win));
228 rb_iv_set (self, "@window_above", TO_ECORE_X_WINDOW (Qnil,
230 rb_iv_set (self, "@x", INT2FIX (e->x));
231 rb_iv_set (self, "@y", INT2FIX (e->y));
232 rb_iv_set (self, "@w", INT2FIX (e->w));
233 rb_iv_set (self, "@h", INT2FIX (e->h));
234 rb_iv_set (self, "@border", INT2FIX (e->border));
235 rb_iv_set (self, "@detail", INT2FIX (e->detail));
236 rb_iv_set (self, "@value_mask", INT2FIX (e->value_mask));
237 rb_iv_set (self, "@time", UINT2NUM (e->time));
242 static VALUE c_ev_win_configure_init (VALUE self, VALUE event)
244 VALUE c = CLASS_OF (self);
245 Ecore_X_Event_Window_Configure *e = (void *) event;
247 rb_define_attr (c, "window", 1, 0);
248 rb_define_attr (c, "window_above", 1, 0);
249 rb_define_attr (c, "x", 1, 0);
250 rb_define_attr (c, "y", 1, 0);
251 rb_define_attr (c, "w", 1, 0);
252 rb_define_attr (c, "h", 1, 0);
253 rb_define_attr (c, "border", 1, 0);
254 rb_define_attr (c, "override", 1, 0);
255 rb_define_attr (c, "from_wm", 1, 0);
256 rb_define_attr (c, "time", 1, 0);
258 rb_iv_set (self, "@window", TO_ECORE_X_WINDOW (Qnil, e->win));
259 rb_iv_set (self, "@window_above", TO_ECORE_X_WINDOW (Qnil,
261 rb_iv_set (self, "@x", INT2FIX (e->x));
262 rb_iv_set (self, "@y", INT2FIX (e->y));
263 rb_iv_set (self, "@w", INT2FIX (e->w));
264 rb_iv_set (self, "@h", INT2FIX (e->h));
265 rb_iv_set (self, "@border", INT2FIX (e->border));
266 rb_iv_set (self, "@override", e->override ? Qtrue : Qfalse);
267 rb_iv_set (self, "@from_wm", e->from_wm ? Qtrue : Qfalse);
268 rb_iv_set (self, "@time", UINT2NUM (e->time));
273 static VALUE c_ev_win_resize_request_init (VALUE self, VALUE event)
275 VALUE c = CLASS_OF (self);
276 Ecore_X_Event_Window_Resize_Request *e = (void *) event;
278 rb_define_attr (c, "window", 1, 0);
279 rb_define_attr (c, "w", 1, 0);
280 rb_define_attr (c, "h", 1, 0);
281 rb_define_attr (c, "time", 1, 0);
283 rb_iv_set (self, "@window", TO_ECORE_X_WINDOW (Qnil, e->win));
284 rb_iv_set (self, "@w", INT2FIX (e->w));
285 rb_iv_set (self, "@h", INT2FIX (e->h));
286 rb_iv_set (self, "@time", UINT2NUM (e->time));
291 static VALUE c_ev_win_damage_init (VALUE self, VALUE event)
293 VALUE c = CLASS_OF (self);
294 Ecore_X_Event_Window_Damage *e = (void *) event;
296 rb_define_attr (c, "window", 1, 0);
297 rb_define_attr (c, "x", 1, 0);
298 rb_define_attr (c, "y", 1, 0);
299 rb_define_attr (c, "w", 1, 0);
300 rb_define_attr (c, "h", 1, 0);
301 rb_define_attr (c, "time", 1, 0);
303 rb_iv_set (self, "@window", TO_ECORE_X_WINDOW (Qnil, e->win));
304 rb_iv_set (self, "@x", INT2FIX (e->x));
305 rb_iv_set (self, "@y", INT2FIX (e->y));
306 rb_iv_set (self, "@w", INT2FIX (e->w));
307 rb_iv_set (self, "@h", INT2FIX (e->h));
308 rb_iv_set (self, "@time", UINT2NUM (e->time));
313 static VALUE c_ev_win_visibility_change_init (VALUE self, VALUE event)
315 VALUE c = CLASS_OF (self);
316 Ecore_X_Event_Window_Visibility_Change *e = (void *) event;
318 rb_define_attr (c, "window", 1, 0);
319 rb_define_attr (c, "fully_obscured", 1, 0);
320 rb_define_attr (c, "time", 1, 0);
322 rb_iv_set (self, "@window", TO_ECORE_X_WINDOW (Qnil, e->win));
323 rb_iv_set (self, "@fully_obscured", e->fully_obscured ? Qtrue : Qfalse);
324 rb_iv_set (self, "@time", UINT2NUM (e->time));
329 static VALUE c_ev_win_create_init (VALUE self, VALUE event)
331 VALUE c = CLASS_OF (self);
332 Ecore_X_Event_Window_Create *e = (void *) event;
334 rb_define_attr (c, "window", 1, 0);
335 rb_define_attr (c, "override", 1, 0);
336 rb_define_attr (c, "time", 1, 0);
338 rb_iv_set (self, "@window", TO_ECORE_X_WINDOW (Qnil, e->win));
339 rb_iv_set (self, "@override", e->override ? Qtrue : Qfalse);
340 rb_iv_set (self, "@time", UINT2NUM (e->time));
345 static VALUE c_ev_win_show_request_init (VALUE self, VALUE event)
347 VALUE c = CLASS_OF (self);
348 Ecore_X_Event_Window_Show_Request *e = (void *) event;
350 rb_define_attr (c, "window", 1, 0);
351 rb_define_attr (c, "parent", 1, 0);
352 rb_define_attr (c, "time", 1, 0);
354 rb_iv_set (self, "@window", TO_ECORE_X_WINDOW (Qnil, e->win));
355 rb_iv_set (self, "@parent", TO_ECORE_X_WINDOW (Qnil, e->parent));
356 rb_iv_set (self, "@time", UINT2NUM (e->time));
361 void Init_ecore_x (void)
366 rb_require ("ecore");
368 /* we need to call ecore_x_init () here, to make sure the
369 * event ids are set properly
372 ecore_x_init (getenv ("DISPLAY"));
375 mX = rb_define_module_under (mEcore, "X");
378 rb_define_module_function (mX, "default_root_window",
379 m_default_root_window_get, 0);
386 /* now create the default root window object */
387 w = DefaultRootWindow (ecore_x_display_get ());
388 default_root = TO_ECORE_X_WINDOW (Qnil, w);
389 rb_global_variable (&default_root);
392 /* event mask values */
393 c = rb_define_class_under (mX, "EventMask", rb_cObject);
394 rb_define_private_method (rb_singleton_class (c), "new", NULL, 0);
395 DEF_CONST (c, ECORE_X_EVENT_MASK_, KEY_DOWN);
396 DEF_CONST (c, ECORE_X_EVENT_MASK_, KEY_UP);
397 DEF_CONST (c, ECORE_X_EVENT_MASK_, MOUSE_DOWN);
398 DEF_CONST (c, ECORE_X_EVENT_MASK_, MOUSE_UP);
399 DEF_CONST (c, ECORE_X_EVENT_MASK_, MOUSE_IN);
400 DEF_CONST (c, ECORE_X_EVENT_MASK_, MOUSE_OUT);
401 DEF_CONST (c, ECORE_X_EVENT_MASK_, MOUSE_MOVE);
402 DEF_CONST (c, ECORE_X_EVENT_MASK_, WINDOW_DAMAGE);
403 DEF_CONST (c, ECORE_X_EVENT_MASK_, WINDOW_VISIBILITY);
404 DEF_CONST (c, ECORE_X_EVENT_MASK_, WINDOW_CONFIGURE);
405 DEF_CONST (c, ECORE_X_EVENT_MASK_, WINDOW_RESIZE_MANAGE);
406 DEF_CONST (c, ECORE_X_EVENT_MASK_, WINDOW_MANAGE);
407 DEF_CONST (c, ECORE_X_EVENT_MASK_, WINDOW_CHILD_CONFIGURE);
408 DEF_CONST (c, ECORE_X_EVENT_MASK_, WINDOW_FOCUS_CHANGE);
409 DEF_CONST (c, ECORE_X_EVENT_MASK_, WINDOW_PROPERTY);
410 DEF_CONST (c, ECORE_X_EVENT_MASK_, WINDOW_COLORMAP);
411 DEF_CONST (c, ECORE_X_EVENT_MASK_, WINDOW_GRAB);
412 DEF_CONST (c, ECORE_X_EVENT_MASK_, MOUSE_WHEEL);
413 DEF_CONST (c, ECORE_X_EVENT_MASK_, WINDOW_FOCUS_IN);
414 DEF_CONST (c, ECORE_X_EVENT_MASK_, WINDOW_FOCUS_OUT);
417 c = rb_define_class_under (mX, "WmProtocol", rb_cObject);
418 rb_define_private_method (rb_singleton_class (c), "new", NULL, 0);
419 DEF_CONST (c, ECORE_X_WM_PROTOCOL_, DELETE_REQUEST);
420 DEF_CONST (c, ECORE_X_WM_PROTOCOL_, TAKE_FOCUS);
423 c = rb_define_class_under (mX, "EventMode", rb_cObject);
424 rb_define_private_method (rb_singleton_class (c), "new", NULL, 0);
425 DEF_CONST (c, ECORE_X_EVENT_MODE_, NORMAL);
426 DEF_CONST (c, ECORE_X_EVENT_MODE_, WHILE_GRABBED);
427 DEF_CONST (c, ECORE_X_EVENT_MODE_, GRAB);
428 DEF_CONST (c, ECORE_X_EVENT_MODE_, UNGRAB);
431 c = rb_define_class_under (mX, "EventDetail", rb_cObject);
432 rb_define_private_method (rb_singleton_class (c), "new", NULL, 0);
433 DEF_CONST (c, ECORE_X_EVENT_DETAIL_, ANCESTOR);
434 DEF_CONST (c, ECORE_X_EVENT_DETAIL_, VIRTUAL);
435 DEF_CONST (c, ECORE_X_EVENT_DETAIL_, INFERIOR);
436 DEF_CONST (c, ECORE_X_EVENT_DETAIL_, NON_LINEAR);
437 DEF_CONST (c, ECORE_X_EVENT_DETAIL_, NON_LINEAR_VIRTUAL);
438 DEF_CONST (c, ECORE_X_EVENT_DETAIL_, POINTER);
439 DEF_CONST (c, ECORE_X_EVENT_DETAIL_, POINTER_ROOT);
440 DEF_CONST (c, ECORE_X_EVENT_DETAIL_, DETAIL_NONE);
443 c = rb_define_class_under (mX, "Modifier", rb_cObject);
444 rb_define_private_method (rb_singleton_class (c), "new", NULL, 0);
445 DEF_CONST (c, ECORE_EVENT_MODIFIER_, SHIFT);
446 DEF_CONST (c, ECORE_EVENT_MODIFIER_, CTRL);
447 DEF_CONST (c, ECORE_EVENT_MODIFIER_, ALT);
448 DEF_CONST (c, ECORE_EVENT_MODIFIER_, WIN);
451 ADD_EVENT (mX, ECORE_EVENT_KEY_DOWN, "KeyDownEvent", c);
452 rb_define_private_method (c, "initialize",
453 c_ev_key_down_init, 1);
455 ADD_EVENT (mX, ECORE_EVENT_KEY_UP, "KeyUpEvent", c);
456 rb_define_private_method (c, "initialize",
457 c_ev_key_down_init, 1);
459 ADD_EVENT (mX, ECORE_EVENT_MOUSE_BUTTON_DOWN,
460 "MouseButtonDownEvent", c);
461 rb_define_private_method (c, "initialize",
462 c_ev_mouse_button_down_init, 1);
464 ADD_EVENT (mX, ECORE_EVENT_MOUSE_BUTTON_UP,
465 "MouseButtonUpEvent", c);
466 rb_define_private_method (c, "initialize",
467 c_ev_mouse_button_down_init, 1);
469 ADD_EVENT (mX, ECORE_EVENT_MOUSE_MOVE, "MouseMoveEvent", c);
470 rb_define_private_method (c, "initialize",
471 c_ev_mouse_move_init, 1);
473 ADD_EVENT (mX, ECORE_EVENT_MOUSE_IN, "MouseInEvent", c);
474 rb_define_private_method (c, "initialize",
475 c_ev_mouse_in_init, 1);
477 ADD_EVENT (mX, ECORE_EVENT_MOUSE_OUT, "MouseOutEvent", c);
478 rb_define_private_method (c, "initialize",
479 c_ev_mouse_in_init, 1);
481 ADD_EVENT (mX, ECORE_X_EVENT_WINDOW_FOCUS_IN,
482 "WindowFocusInEvent", c);
483 rb_define_private_method (c, "initialize",
484 c_ev_win_focus_change_init, 1);
486 ADD_EVENT (mX, ECORE_X_EVENT_WINDOW_FOCUS_OUT,
487 "WindowFocusOutEvent", c);
488 rb_define_private_method (c, "initialize",
489 c_ev_win_focus_change_init, 1);
491 ADD_EVENT (mX, ECORE_X_EVENT_WINDOW_DELETE_REQUEST,
492 "WindowDeleteRequestEvent", c);
493 rb_define_private_method (c, "initialize",
494 c_ev_win_delete_request_init, 1);
496 ADD_EVENT (mX, ECORE_X_EVENT_WINDOW_CONFIGURE_REQUEST,
497 "WindowConfigureRequestEvent", c);
498 rb_define_private_method (c, "initialize",
499 c_ev_win_configure_request_init, 1);
501 ADD_EVENT (mX, ECORE_X_EVENT_WINDOW_CONFIGURE,
502 "WindowConfigureEvent", c);
503 rb_define_private_method (c, "initialize",
504 c_ev_win_configure_init, 1);
506 ADD_EVENT (mX, ECORE_X_EVENT_WINDOW_RESIZE_REQUEST,
507 "WindowResizeRequestEvent", c);
508 rb_define_private_method (c, "initialize",
509 c_ev_win_resize_request_init, 1);
511 ADD_EVENT (mX, ECORE_X_EVENT_WINDOW_DAMAGE, "WindowDamageEvent", c);
512 rb_define_private_method (c, "initialize",
513 c_ev_win_damage_init, 1);
515 ADD_EVENT (mX, ECORE_X_EVENT_WINDOW_VISIBILITY_CHANGE,
516 "WindowVisibilityChangeEvent", c);
517 rb_define_private_method (c, "initialize",
518 c_ev_win_visibility_change_init, 1);
520 ADD_EVENT (mX, ECORE_X_EVENT_WINDOW_CREATE, "WindowCreateEvent", c);
521 rb_define_private_method (c, "initialize",
522 c_ev_win_create_init, 1);
524 ADD_EVENT (mX, ECORE_X_EVENT_WINDOW_DESTROY, "WindowDestroyEvent", c);
525 rb_define_private_method (c, "initialize",
526 c_ev_win_delete_request_init, 1);
528 ADD_EVENT (mX, ECORE_X_EVENT_WINDOW_SHOW, "WindowShowEvent", c);
529 rb_define_private_method (c, "initialize",
530 c_ev_win_delete_request_init, 1);
532 ADD_EVENT (mX, ECORE_X_EVENT_WINDOW_HIDE, "WindowHideEvent", c);
533 rb_define_private_method (c, "initialize",
534 c_ev_win_delete_request_init, 1);
536 ADD_EVENT (mX, ECORE_X_EVENT_WINDOW_SHOW_REQUEST,
537 "WindowShowRequestEvent", c);
538 rb_define_private_method (c, "initialize",
539 c_ev_win_show_request_init, 1);