Added Ecore::Evas::EcoreEvas#has_alpha? and #has_alpha=.
[ruby-ecore.git] / src / ecore / rb_ecore.c
index 5cefa3a07377268fdceaf01c5637443b531c9366..9aea96f09f6da11a9ef10eaf9a69c73df33b7ba2 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: rb_ecore.c 155 2004-12-09 18:50:20Z tilman $
+ * $Id: rb_ecore.c 366 2006-02-14 21:53:15Z tilman $
  *
  * Copyright (C) 2004 ruby-ecore team (see AUTHORS)
  *
@@ -77,6 +77,7 @@ static VALUE m_time_get (VALUE self)
        return rb_float_new (ecore_time_get ());
 }
 
+#if 0
 static VALUE c_ev_exe_exit_init (VALUE self, VALUE event)
 {
        VALUE c = CLASS_OF (self);
@@ -96,6 +97,7 @@ static VALUE c_ev_exe_exit_init (VALUE self, VALUE event)
 
        return self;
 }
+#endif
 
 static VALUE c_ev_sig_user_init (VALUE self, VALUE event)
 {
@@ -135,10 +137,19 @@ static VALUE c_ev_sig_rt_init (VALUE self, VALUE event)
        return self;
 }
 
+static void at_exit ()
+{
+       ecore_shutdown ();
+}
+
 void Init_ecore (void)
 {
        VALUE c;
 
+       ecore_init ();
+
+       atexit (at_exit);
+
        mEcore = rb_define_module ("Ecore");
 
        rb_define_module_function (mEcore, "main_loop_begin",
@@ -157,32 +168,32 @@ void Init_ecore (void)
        Init_FdHandler ();
 
        /* SIGNAL_HUP */
-       ADD_EVENT (mEcore, ECORE_EVENT_, SIGNAL_HUP,
-                  "SignalHup", c);
-       rb_define_private_method (c, "initialize", c_ev_generic_init, 1);
+       ADD_EVENT (mEcore, ECORE_EVENT_SIGNAL_HUP,
+                  "SignalHupEvent", c);
 
        /* SIGNAL_POWER */
-       ADD_EVENT (mEcore, ECORE_EVENT_, SIGNAL_POWER,
-                  "SignalPower", c);
-       rb_define_private_method (c, "initialize", c_ev_generic_init, 1);
+       ADD_EVENT (mEcore, ECORE_EVENT_SIGNAL_POWER,
+                  "SignalPowerEvent", c);
 
+#if 0
        /* EXE_EXIT */
-       ADD_EVENT (mEcore, ECORE_EVENT_, EXE_EXIT, "ExeExit", c);
+       ADD_EVENT (mEcore, ECORE_EVENT_EXE_EXIT, "ExeExitEvent", c);
        rb_define_private_method (c, "initialize", c_ev_exe_exit_init, 1);
+#endif
 
        /* SIGNAL_USER */
-       ADD_EVENT (mEcore, ECORE_EVENT_SIGNAL_USER,
-                  "SignalUser", c);
+       ADD_EVENT (mEcore, ECORE_EVENT_SIGNAL_USER,
+                  "SignalUserEvent", c);
        rb_define_private_method (c, "initialize", c_ev_sig_user_init, 1);
 
        /* SIGNAL_EXIT */
-       ADD_EVENT (mEcore, ECORE_EVENT_SIGNAL_EXIT,
-                  "SignalExit", c);
+       ADD_EVENT (mEcore, ECORE_EVENT_SIGNAL_EXIT,
+                  "SignalExitEvent", c);
        rb_define_private_method (c, "initialize", c_ev_sig_exit_init, 1);
 
        /* SIGNAL_REALTIME */
-       ADD_EVENT (mEcore, ECORE_EVENT_SIGNAL_REALTIME,
-                  "SignalRealtime", c);
+       ADD_EVENT (mEcore, ECORE_EVENT_SIGNAL_REALTIME,
+                  "SignalRealtimeEvent", c);
        rb_define_private_method (c, "initialize", c_ev_sig_rt_init, 1);
 }