From: Tilman Sauerbeck Date: Sat, 11 Nov 2006 11:40:24 +0000 (+0000) Subject: Resolve the cWindow reference using Ruby. X-Git-Url: http://git.code-monkey.de/?p=ruby-ecore.git;a=commitdiff_plain;h=5c851d60ccd05df625b6ccaf4a425339912a1da3 Resolve the cWindow reference using Ruby. --- diff --git a/src/ecore_evas/rb_ecore_evas_main.c b/src/ecore_evas/rb_ecore_evas_main.c index b77925f..abe87af 100644 --- a/src/ecore_evas/rb_ecore_evas_main.c +++ b/src/ecore_evas/rb_ecore_evas_main.c @@ -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) * @@ -33,9 +33,16 @@ void Init_ecore_evas (void) { + VALUE m; + 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 (); diff --git a/src/ecore_evas/rb_ecore_evas_main.h b/src/ecore_evas/rb_ecore_evas_main.h index 8817478..58bacbd 100644 --- a/src/ecore_evas/rb_ecore_evas_main.h +++ b/src/ecore_evas/rb_ecore_evas_main.h @@ -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) * @@ -21,7 +21,7 @@ #ifndef __RB_ECORE_EVAS_MAIN_H #define __RB_ECORE_EVAS_MAIN_H -VALUE mEvas; +VALUE mEvas, cWindow; #endif diff --git a/src/ecore_evas/rb_gl_x11.c b/src/ecore_evas/rb_gl_x11.c index c0e5136..a6da8b1 100644 --- a/src/ecore_evas/rb_gl_x11.c +++ b/src/ecore_evas/rb_gl_x11.c @@ -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) * @@ -133,8 +133,6 @@ void Init_GlX11 (void) { VALUE c; - rb_require ("ecore_x"); - c = rb_define_class_under (mEvas, "GlX11", cEcoreEvas); rb_define_alloc_func (c, c_alloc); diff --git a/src/ecore_evas/rb_software_x11.c b/src/ecore_evas/rb_software_x11.c index 8549dc5..e8c3833 100644 --- a/src/ecore_evas/rb_software_x11.c +++ b/src/ecore_evas/rb_software_x11.c @@ -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) * @@ -133,8 +133,6 @@ void Init_SoftwareX11 (void) { VALUE c; - rb_require ("ecore_x"); - c = rb_define_class_under (mEvas, "SoftwareX11", cEcoreEvas); rb_define_alloc_func (c, c_alloc); diff --git a/src/ecore_evas/rb_xrender_x11.c b/src/ecore_evas/rb_xrender_x11.c index 505638d..a214ed1 100644 --- a/src/ecore_evas/rb_xrender_x11.c +++ b/src/ecore_evas/rb_xrender_x11.c @@ -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) * @@ -133,8 +133,6 @@ void Init_XRenderX11 (void) { VALUE c; - rb_require ("ecore_x"); - c = rb_define_class_under (mEvas, "XRenderX11", cEcoreEvas); rb_define_alloc_func (c, c_alloc); diff --git a/src/ecore_x/rb_window.c b/src/ecore_x/rb_window.c index 204d301..3005b4a 100644 --- a/src/ecore_x/rb_window.c +++ b/src/ecore_x/rb_window.c @@ -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) * @@ -29,7 +29,7 @@ #include "rb_window.h" #include "rb_cursor.h" -VALUE cWindow; +static VALUE cWindow; static void c_mark (RbWindow *w) { diff --git a/src/ecore_x/rb_window.h b/src/ecore_x/rb_window.h index f9f04e5..efd9713 100644 --- a/src/ecore_x/rb_window.h +++ b/src/ecore_x/rb_window.h @@ -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) * @@ -29,8 +29,4 @@ typedef struct { void Init_Window (void); VALUE TO_ECORE_X_WINDOW (VALUE parent, Ecore_X_Window w); -#ifndef __RB_WINDOW_C -extern VALUE cWindow; -#endif - #endif