Resolve the cWindow reference using Ruby.
[ruby-ecore.git] / src / ecore_evas / rb_ecore_evas_main.c
index d3487dfa55cfe41278e895926867aee11f335dff..abe87afda538a5f03b3d5daca30756983b0cbe82 100644 (file)
@@ -1,7 +1,7 @@
 /*
- * $Id: rb_ecore_evas_main.c 22 2004-06-26 16:43:41Z tilman $
+ * $Id: rb_ecore_evas_main.c 389 2006-11-11 11:40:24Z tilman $
  *
- * Copyright (C) 2004 Tilman Sauerbeck (tilman at code-monkey de)
+ * Copyright (C) 2004-2005 ruby-ecore team (see AUTHORS)
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public
 #include "rb_ecore_evas.h"
 #include "rb_software_x11.h"
 #include "rb_gl_x11.h"
+#include "rb_xrender_x11.h"
 #include "rb_fb.h"
-
-static VALUE m_init (VALUE self)
-{
-       return INT2FIX (ecore_evas_init ());
-}
-
-static VALUE m_shutdown (VALUE self)
-{
-       return INT2FIX (ecore_evas_shutdown ());
-}
+#include "rb_buffer.h"
 
 void Init_ecore_evas (void)
 {
+       VALUE m;
+
        rb_require ("ecore");
        rb_require ("evas");
 
-       mEvas = rb_define_module_under (mEcore, "Evas");
+       rb_require ("ecore_x");
 
-       rb_define_module_function (mEvas, "init", m_init, 0);
-       rb_define_module_function (mEvas, "shutdown", m_shutdown, 0);
+       m = rb_const_get (mEcore, rb_intern ("X"));
+       cWindow = rb_const_get (m, rb_intern ("Window"));
+
+       mEvas = rb_define_module_under (mEcore, "Evas");
 
        Init_EcoreEvas ();
        Init_SoftwareX11 ();
        Init_GlX11 ();
+       Init_XRenderX11 ();
        Init_Fb ();
+       Init_Buffer ();
 }
-