+static VALUE c_ev_key_down_init (VALUE self, VALUE event)
+{
+ VALUE c = CLASS_OF (self);
+ Ecore_X_Event_Key_Down *e = (void *) event;
+
+ rb_define_attr (c, "keyname", 1, 0);
+ rb_define_attr (c, "keysymbol", 1, 0);
+ rb_define_attr (c, "key_compose", 1, 0);
+ rb_define_attr (c, "modifiers", 1, 0);
+ rb_define_attr (c, "window", 1, 0);
+ rb_define_attr (c, "event_window", 1, 0);
+ rb_define_attr (c, "time", 1, 0);
+
+ rb_iv_set (self, "@keyname",
+ e->keyname ? rb_str_new2 (e->keyname) : Qnil);
+ rb_iv_set (self, "@keysymbol",
+ e->keysymbol ? rb_str_new2 (e->keysymbol) : Qnil);
+ rb_iv_set (self, "@key_compose",
+ e->key_compose ? rb_str_new2 (e->key_compose) : Qnil);
+ rb_iv_set (self, "@modifiers", INT2FIX (e->modifiers));
+ rb_iv_set (self, "@window", TO_ECORE_X_WINDOW (Qnil, e->win));
+ rb_iv_set (self, "@event_window",
+ TO_ECORE_X_WINDOW (Qnil, e->event_win));
+ rb_iv_set (self, "@time", UINT2NUM (e->time));
+
+ return self;
+}
+
+static VALUE c_ev_mouse_button_down_init (VALUE self, VALUE event)
+{
+ VALUE c = CLASS_OF (self);
+ Ecore_X_Event_Mouse_Button_Down *e = (void *) event;
+
+ rb_define_attr (c, "button", 1, 0);
+ rb_define_attr (c, "modifiers", 1, 0);
+ rb_define_attr (c, "x", 1, 0);
+ rb_define_attr (c, "y", 1, 0);
+ rb_define_attr (c, "root", 1, 0);
+ rb_define_attr (c, "window", 1, 0);
+ rb_define_attr (c, "event_window", 1, 0);
+ rb_define_attr (c, "time", 1, 0);
+ rb_define_attr (c, "double_click", 1, 0);
+ rb_define_attr (c, "triple_click", 1, 0);
+
+ rb_iv_set (self, "@button", INT2FIX (e->button));
+ rb_iv_set (self, "@modifiers", INT2FIX (e->modifiers));
+ rb_iv_set (self, "@x", INT2FIX (e->x));
+ rb_iv_set (self, "@y", INT2FIX (e->x));
+ rb_iv_set (self, "@root", rb_ary_new3 (2, INT2FIX (e->root.x),
+ INT2FIX (e->root.y)));
+ rb_iv_set (self, "@window", TO_ECORE_X_WINDOW (Qnil, e->win));
+ rb_iv_set (self, "@event_window",
+ TO_ECORE_X_WINDOW (Qnil, e->event_win));
+ rb_iv_set (self, "@time", UINT2NUM (e->time));
+ rb_iv_set (self, "@double_click",
+ e->double_click ? Qtrue : Qfalse);
+ rb_iv_set (self, "@triple_click",
+ e->triple_click ? Qtrue : Qfalse);
+
+ return self;
+}
+
+static VALUE c_ev_mouse_button_up_init (VALUE self, VALUE event)
+{
+ VALUE c = CLASS_OF (self);
+ Ecore_X_Event_Mouse_Button_Up *e = (void *) event;
+
+ rb_define_attr (c, "button", 1, 0);
+ rb_define_attr (c, "modifiers", 1, 0);
+ rb_define_attr (c, "x", 1, 0);
+ rb_define_attr (c, "y", 1, 0);
+ rb_define_attr (c, "root", 1, 0);
+ rb_define_attr (c, "window", 1, 0);
+ rb_define_attr (c, "event_window", 1, 0);
+ rb_define_attr (c, "time", 1, 0);
+
+ rb_iv_set (self, "@button", INT2FIX (e->button));
+ rb_iv_set (self, "@modifiers", INT2FIX (e->modifiers));
+ rb_iv_set (self, "@x", INT2FIX (e->x));
+ rb_iv_set (self, "@y", INT2FIX (e->x));
+ rb_iv_set (self, "@root", rb_ary_new3 (2, INT2FIX (e->root.x),
+ INT2FIX (e->root.y)));
+ rb_iv_set (self, "@window", TO_ECORE_X_WINDOW (Qnil, e->win));
+ rb_iv_set (self, "@event_window",
+ TO_ECORE_X_WINDOW (Qnil, e->event_win));
+ rb_iv_set (self, "@time", UINT2NUM (e->time));
+
+ return self;
+}
+
+static VALUE c_ev_mouse_move_init (VALUE self, VALUE event)
+{
+ VALUE c = CLASS_OF (self);
+ Ecore_X_Event_Mouse_Move *e = (void *) event;
+
+ rb_define_attr (c, "modifiers", 1, 0);
+ rb_define_attr (c, "x", 1, 0);
+ rb_define_attr (c, "y", 1, 0);
+ rb_define_attr (c, "root", 1, 0);
+ rb_define_attr (c, "window", 1, 0);
+ rb_define_attr (c, "event_window", 1, 0);
+ rb_define_attr (c, "time", 1, 0);
+
+ rb_iv_set (self, "@modifiers", INT2FIX (e->modifiers));
+ rb_iv_set (self, "@x", INT2FIX (e->x));
+ rb_iv_set (self, "@y", INT2FIX (e->y));
+ rb_iv_set (self, "@root", rb_ary_new3 (2, INT2FIX (e->root.x),
+ INT2FIX (e->root.y)));
+ rb_iv_set (self, "@window", TO_ECORE_X_WINDOW (Qnil, e->win));
+ rb_iv_set (self, "@event_window",
+ TO_ECORE_X_WINDOW (Qnil, e->event_win));
+ rb_iv_set (self, "@time", UINT2NUM (e->time));
+
+ return self;
+}
+
+static VALUE c_ev_mouse_in_init (VALUE self, VALUE event)
+{
+ VALUE c = CLASS_OF (self);
+ Ecore_X_Event_Mouse_In *e = (void *) event;
+
+ rb_define_attr (c, "modifiers", 1, 0);
+ rb_define_attr (c, "x", 1, 0);
+ rb_define_attr (c, "y", 1, 0);
+ rb_define_attr (c, "root", 1, 0);
+ rb_define_attr (c, "window", 1, 0);
+ rb_define_attr (c, "event_window", 1, 0);
+ rb_define_attr (c, "mode", 1, 0);
+ rb_define_attr (c, "detail", 1, 0);
+ rb_define_attr (c, "time", 1, 0);
+
+ rb_iv_set (self, "@modifiers", INT2FIX (e->modifiers));
+ rb_iv_set (self, "@x", INT2FIX (e->x));
+ rb_iv_set (self, "@y", INT2FIX (e->y));
+ rb_iv_set (self, "@root", rb_ary_new3 (2, INT2FIX (e->root.x),
+ INT2FIX (e->root.y)));
+ rb_iv_set (self, "@window", TO_ECORE_X_WINDOW (Qnil, e->win));
+ rb_iv_set (self, "@event_window",
+ TO_ECORE_X_WINDOW (Qnil, e->event_win));
+ rb_iv_set (self, "@mode", INT2FIX (e->mode));
+ rb_iv_set (self, "@detail", INT2FIX (e->detail));
+ rb_iv_set (self, "@time", UINT2NUM (e->time));
+
+ return self;
+}
+
+static VALUE c_ev_win_focus_change_init (VALUE self, VALUE event)
+{
+ VALUE c = CLASS_OF (self);
+ Ecore_X_Event_Window_Focus_In *e = (void *) event;
+
+ rb_define_attr (c, "window", 1, 0);
+ rb_define_attr (c, "mode", 1, 0);
+ rb_define_attr (c, "detail", 1, 0);
+ rb_define_attr (c, "time", 1, 0);
+
+ rb_iv_set (self, "@window", TO_ECORE_X_WINDOW (Qnil, e->win));
+ rb_iv_set (self, "@mode", INT2FIX (e->mode));
+ rb_iv_set (self, "@detail", INT2FIX (e->detail));
+ rb_iv_set (self, "@time", UINT2NUM (e->time));
+
+ return self;
+}
+
+static VALUE c_ev_win_delete_request_init (VALUE self, VALUE event)
+{
+ VALUE c = CLASS_OF (self);
+ Ecore_X_Event_Window_Delete_Request *e = (void *) event;
+
+ rb_define_attr (c, "window", 1, 0);
+ rb_define_attr (c, "time", 1, 0);
+
+ rb_iv_set (self, "@window", TO_ECORE_X_WINDOW (Qnil, e->win));
+ rb_iv_set (self, "@time", UINT2NUM (e->time));
+
+ return self;
+}
+
+static VALUE c_ev_win_configure_request_init (VALUE self, VALUE event)
+{
+ VALUE c = CLASS_OF (self);
+ Ecore_X_Event_Window_Configure_Request *e = (void *) event;
+
+ rb_define_attr (c, "window", 1, 0);
+ rb_define_attr (c, "window_above", 1, 0);
+ rb_define_attr (c, "x", 1, 0);
+ rb_define_attr (c, "y", 1, 0);
+ rb_define_attr (c, "w", 1, 0);
+ rb_define_attr (c, "h", 1, 0);
+ rb_define_attr (c, "border", 1, 0);
+ rb_define_attr (c, "detail", 1, 0);
+ rb_define_attr (c, "value_mask", 1, 0);
+ rb_define_attr (c, "time", 1, 0);
+
+ rb_iv_set (self, "@window", TO_ECORE_X_WINDOW (Qnil, e->win));
+ rb_iv_set (self, "@window_above", TO_ECORE_X_WINDOW (Qnil,
+ e->abovewin));
+ rb_iv_set (self, "@x", INT2FIX (e->x));
+ rb_iv_set (self, "@y", INT2FIX (e->y));
+ rb_iv_set (self, "@w", INT2FIX (e->w));
+ rb_iv_set (self, "@h", INT2FIX (e->h));
+ rb_iv_set (self, "@border", INT2FIX (e->border));
+ rb_iv_set (self, "@detail", INT2FIX (e->detail));
+ rb_iv_set (self, "@value_mask", INT2FIX (e->value_mask));
+ rb_iv_set (self, "@time", UINT2NUM (e->time));
+
+ return self;
+}
+
+static VALUE c_ev_win_configure_init (VALUE self, VALUE event)
+{
+ VALUE c = CLASS_OF (self);
+ Ecore_X_Event_Window_Configure *e = (void *) event;
+
+ rb_define_attr (c, "window", 1, 0);
+ rb_define_attr (c, "window_above", 1, 0);
+ rb_define_attr (c, "x", 1, 0);
+ rb_define_attr (c, "y", 1, 0);
+ rb_define_attr (c, "w", 1, 0);
+ rb_define_attr (c, "h", 1, 0);
+ rb_define_attr (c, "border", 1, 0);
+ rb_define_attr (c, "override", 1, 0);
+ rb_define_attr (c, "from_wm", 1, 0);
+ rb_define_attr (c, "time", 1, 0);
+
+ rb_iv_set (self, "@window", TO_ECORE_X_WINDOW (Qnil, e->win));
+ rb_iv_set (self, "@window_above", TO_ECORE_X_WINDOW (Qnil,
+ e->abovewin));
+ rb_iv_set (self, "@x", INT2FIX (e->x));
+ rb_iv_set (self, "@y", INT2FIX (e->y));
+ rb_iv_set (self, "@w", INT2FIX (e->w));
+ rb_iv_set (self, "@h", INT2FIX (e->h));
+ rb_iv_set (self, "@border", INT2FIX (e->border));
+ rb_iv_set (self, "@override", e->override ? Qtrue : Qfalse);
+ rb_iv_set (self, "@from_wm", e->from_wm ? Qtrue : Qfalse);
+ rb_iv_set (self, "@time", UINT2NUM (e->time));
+
+ return self;
+}
+
+static VALUE c_ev_win_resize_request_init (VALUE self, VALUE event)
+{
+ VALUE c = CLASS_OF (self);
+ Ecore_X_Event_Window_Resize_Request *e = (void *) event;
+
+ rb_define_attr (c, "window", 1, 0);
+ rb_define_attr (c, "w", 1, 0);
+ rb_define_attr (c, "h", 1, 0);
+ rb_define_attr (c, "time", 1, 0);
+
+ rb_iv_set (self, "@window", TO_ECORE_X_WINDOW (Qnil, e->win));
+ rb_iv_set (self, "@w", INT2FIX (e->w));
+ rb_iv_set (self, "@h", INT2FIX (e->h));
+ rb_iv_set (self, "@time", UINT2NUM (e->time));
+
+ return self;
+}
+
+static VALUE c_ev_win_damage_init (VALUE self, VALUE event)
+{
+ VALUE c = CLASS_OF (self);
+ Ecore_X_Event_Window_Damage *e = (void *) event;
+
+ rb_define_attr (c, "window", 1, 0);
+ rb_define_attr (c, "x", 1, 0);
+ rb_define_attr (c, "y", 1, 0);
+ rb_define_attr (c, "w", 1, 0);
+ rb_define_attr (c, "h", 1, 0);
+ rb_define_attr (c, "time", 1, 0);
+
+ rb_iv_set (self, "@window", TO_ECORE_X_WINDOW (Qnil, e->win));
+ rb_iv_set (self, "@x", INT2FIX (e->x));
+ rb_iv_set (self, "@y", INT2FIX (e->y));
+ rb_iv_set (self, "@w", INT2FIX (e->w));
+ rb_iv_set (self, "@h", INT2FIX (e->h));
+ rb_iv_set (self, "@time", UINT2NUM (e->time));
+
+ return self;
+}
+
+static VALUE c_ev_win_visibility_change_init (VALUE self, VALUE event)
+{
+ VALUE c = CLASS_OF (self);
+ Ecore_X_Event_Window_Visibility_Change *e = (void *) event;
+
+ rb_define_attr (c, "window", 1, 0);
+ rb_define_attr (c, "fully_obscured", 1, 0);
+ rb_define_attr (c, "time", 1, 0);
+
+ rb_iv_set (self, "@window", TO_ECORE_X_WINDOW (Qnil, e->win));
+ rb_iv_set (self, "@fully_obscured", e->fully_obscured ? Qtrue : Qfalse);
+ rb_iv_set (self, "@time", UINT2NUM (e->time));
+
+ return self;
+}
+
+static VALUE c_ev_win_create_init (VALUE self, VALUE event)
+{
+ VALUE c = CLASS_OF (self);
+ Ecore_X_Event_Window_Create *e = (void *) event;
+
+ rb_define_attr (c, "window", 1, 0);
+ rb_define_attr (c, "override", 1, 0);
+ rb_define_attr (c, "time", 1, 0);
+
+ rb_iv_set (self, "@window", TO_ECORE_X_WINDOW (Qnil, e->win));
+ rb_iv_set (self, "@override", e->override ? Qtrue : Qfalse);
+ rb_iv_set (self, "@time", UINT2NUM (e->time));
+
+ return self;
+}
+
+static VALUE c_ev_win_show_request_init (VALUE self, VALUE event)