/*
- * $Id: rb_ecore_x.c 83 2004-08-21 19:55:35Z tilman $
+ * $Id: rb_ecore_x.c 84 2004-08-21 20:16:25Z tilman $
*
* Copyright (C) 2004 ruby-ecore team (see AUTHORS)
*
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)
{
VALUE c = CLASS_OF (self);
rb_define_private_method (c, "initialize",
c_ev_win_visibility_change_init, 1);
+ ADD_EVENT (mX, ECORE_X_EVENT_, WINDOW_CREATE, "WindowCreate", c);
+ rb_define_private_method (c, "initialize",
+ c_ev_win_create_init, 1);
+
+ ADD_EVENT (mX, ECORE_X_EVENT_, WINDOW_DESTROY, "WindowDestroy", c);
+ rb_define_private_method (c, "initialize",
+ c_ev_win_delete_request_init, 1);
+
ADD_EVENT (mX, ECORE_X_EVENT_, WINDOW_SHOW, "WindowShow", c);
rb_define_private_method (c, "initialize",
c_ev_win_delete_request_init, 1);