Resolve the cWindow reference using Ruby.
authorTilman Sauerbeck <tilman@code-monkey.de>
Sat, 11 Nov 2006 11:40:24 +0000 (11:40 +0000)
committerTilman Sauerbeck <tilman@code-monkey.de>
Sat, 11 Nov 2006 11:40:24 +0000 (11:40 +0000)
src/ecore_evas/rb_ecore_evas_main.c
src/ecore_evas/rb_ecore_evas_main.h
src/ecore_evas/rb_gl_x11.c
src/ecore_evas/rb_software_x11.c
src/ecore_evas/rb_xrender_x11.c
src/ecore_x/rb_window.c
src/ecore_x/rb_window.h

index b77925f16fcfae496d28d5262a49217826331d50..abe87afda538a5f03b3d5daca30756983b0cbe82 100644 (file)
@@ -1,5 +1,5 @@
 /*
 /*
- * $Id: rb_ecore_evas_main.c 348 2005-12-24 17:11:24Z tilman $
+ * $Id: rb_ecore_evas_main.c 389 2006-11-11 11:40:24Z tilman $
  *
  * Copyright (C) 2004-2005 ruby-ecore team (see AUTHORS)
  *
  *
  * Copyright (C) 2004-2005 ruby-ecore team (see AUTHORS)
  *
 
 void Init_ecore_evas (void)
 {
 
 void Init_ecore_evas (void)
 {
+       VALUE m;
+
        rb_require ("ecore");
        rb_require ("evas");
 
        rb_require ("ecore");
        rb_require ("evas");
 
+       rb_require ("ecore_x");
+
+       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 ();
        mEvas = rb_define_module_under (mEcore, "Evas");
 
        Init_EcoreEvas ();
index 8817478af64debb02fe89f08d44daf7a33b1209f..58bacbd859f327ebd0f726cebd904ddeb1b0a725 100644 (file)
@@ -1,5 +1,5 @@
 /*
 /*
- * $Id: rb_ecore_evas_main.h 77 2004-08-19 17:39:29Z tilman $
+ * $Id: rb_ecore_evas_main.h 389 2006-11-11 11:40:24Z tilman $
  *
  * Copyright (C) 2004 ruby-ecore team (see AUTHORS)
  *
  *
  * Copyright (C) 2004 ruby-ecore team (see AUTHORS)
  *
@@ -21,7 +21,7 @@
 #ifndef __RB_ECORE_EVAS_MAIN_H
 #define __RB_ECORE_EVAS_MAIN_H
 
 #ifndef __RB_ECORE_EVAS_MAIN_H
 #define __RB_ECORE_EVAS_MAIN_H
 
-VALUE mEvas;
+VALUE mEvas, cWindow;
 
 #endif
 
 
 #endif
 
index c0e5136f4e3e2f66627ef5e98c605a05ae8d90f5..a6da8b1bebde3cd9eb1fd465ea9dfeda570f7c73 100644 (file)
@@ -1,5 +1,5 @@
 /*
 /*
- * $Id: rb_gl_x11.c 351 2006-02-10 15:25:40Z tilman $
+ * $Id: rb_gl_x11.c 389 2006-11-11 11:40:24Z tilman $
  *
  * Copyright (C) 2004 ruby-ecore team (see AUTHORS)
  *
  *
  * Copyright (C) 2004 ruby-ecore team (see AUTHORS)
  *
@@ -133,8 +133,6 @@ void Init_GlX11 (void)
 {
        VALUE c;
 
 {
        VALUE c;
 
-       rb_require ("ecore_x");
-
        c = rb_define_class_under (mEvas, "GlX11", cEcoreEvas);
 
        rb_define_alloc_func (c, c_alloc);
        c = rb_define_class_under (mEvas, "GlX11", cEcoreEvas);
 
        rb_define_alloc_func (c, c_alloc);
index 8549dc550adcdeb7b7297aad84868ffa621fb8ae..e8c38338ffac1ac44dbdbd3356df523b74d0847d 100644 (file)
@@ -1,5 +1,5 @@
 /*
 /*
- * $Id: rb_software_x11.c 351 2006-02-10 15:25:40Z tilman $
+ * $Id: rb_software_x11.c 389 2006-11-11 11:40:24Z tilman $
  *
  * Copyright (C) 2004 ruby-ecore team (see AUTHORS)
  *
  *
  * Copyright (C) 2004 ruby-ecore team (see AUTHORS)
  *
@@ -133,8 +133,6 @@ void Init_SoftwareX11 (void)
 {
        VALUE c;
 
 {
        VALUE c;
 
-       rb_require ("ecore_x");
-
        c = rb_define_class_under (mEvas, "SoftwareX11", cEcoreEvas);
 
        rb_define_alloc_func (c, c_alloc);
        c = rb_define_class_under (mEvas, "SoftwareX11", cEcoreEvas);
 
        rb_define_alloc_func (c, c_alloc);
index 505638d21fc545ccefc3dee6204130af008c861a..a214ed1d4f98a5d50e527226a6178e35b3004904 100644 (file)
@@ -1,5 +1,5 @@
 /*
 /*
- * $Id: rb_xrender_x11.c 351 2006-02-10 15:25:40Z tilman $
+ * $Id: rb_xrender_x11.c 389 2006-11-11 11:40:24Z tilman $
  *
  * Copyright (C) 2005 ruby-ecore team (see AUTHORS)
  *
  *
  * Copyright (C) 2005 ruby-ecore team (see AUTHORS)
  *
@@ -133,8 +133,6 @@ void Init_XRenderX11 (void)
 {
        VALUE c;
 
 {
        VALUE c;
 
-       rb_require ("ecore_x");
-
        c = rb_define_class_under (mEvas, "XRenderX11", cEcoreEvas);
 
        rb_define_alloc_func (c, c_alloc);
        c = rb_define_class_under (mEvas, "XRenderX11", cEcoreEvas);
 
        rb_define_alloc_func (c, c_alloc);
index 204d3014444db9e32a8d5972bc6dca4d32e48de5..3005b4ae907ca930aa270d73b317be9046a3247b 100644 (file)
@@ -1,5 +1,5 @@
 /*
 /*
- * $Id: rb_window.c 351 2006-02-10 15:25:40Z tilman $
+ * $Id: rb_window.c 389 2006-11-11 11:40:24Z tilman $
  *
  * Copyright (C) 2004 ruby-ecore team (see AUTHORS)
  *
  *
  * Copyright (C) 2004 ruby-ecore team (see AUTHORS)
  *
@@ -29,7 +29,7 @@
 #include "rb_window.h"
 #include "rb_cursor.h"
 
 #include "rb_window.h"
 #include "rb_cursor.h"
 
-VALUE cWindow;
+static VALUE cWindow;
 
 static void c_mark (RbWindow *w)
 {
 
 static void c_mark (RbWindow *w)
 {
index f9f04e5b66935220b80118683b2aa07262ac1be1..efd97136674a44f365687779485d64f651fdd3e7 100644 (file)
@@ -1,5 +1,5 @@
 /*
 /*
- * $Id: rb_window.h 77 2004-08-19 17:39:29Z tilman $
+ * $Id: rb_window.h 389 2006-11-11 11:40:24Z tilman $
  *
  * Copyright (C) 2004 ruby-ecore team (see AUTHORS)
  *
  *
  * Copyright (C) 2004 ruby-ecore team (see AUTHORS)
  *
@@ -29,8 +29,4 @@ typedef struct {
 void Init_Window (void);
 VALUE TO_ECORE_X_WINDOW (VALUE parent, Ecore_X_Window w);
 
 void Init_Window (void);
 VALUE TO_ECORE_X_WINDOW (VALUE parent, Ecore_X_Window w);
 
-#ifndef __RB_WINDOW_C
-extern VALUE cWindow;
-#endif
-
 #endif
 #endif