Enlightenment CVS committal

Author  : rbdpngn
Project : e17
Module  : libs/ewl

Dir     : e17/libs/ewl/src


Modified Files:
        Ewl.h ewl_embed.c ewl_embed.h ewl_enums.h ewl_events.c 
        ewl_misc.c ewl_misc.h ewl_window.c ewl_window.h 


Log Message:
More evas engine abstraction. Also cleaned up a few warnings in the test
program.

===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/Ewl.h,v
retrieving revision 1.47
retrieving revision 1.48
diff -u -3 -r1.47 -r1.48
--- Ewl.h       26 Feb 2004 05:38:30 -0000      1.47
+++ Ewl.h       27 Feb 2004 00:30:58 -0000      1.48
@@ -262,7 +262,6 @@
 #include <Evas.h>
 #include <Edje.h>
 #include <Ecore.h>
-#include <Ecore_X.h>
 #include <Edb.h>
 #include <Etox.h>
 #include <Ewd.h>
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/ewl_embed.c,v
retrieving revision 1.25
retrieving revision 1.26
diff -u -3 -r1.25 -r1.26
--- ewl_embed.c 26 Feb 2004 05:38:31 -0000      1.25
+++ ewl_embed.c 27 Feb 2004 00:30:58 -0000      1.26
@@ -118,7 +118,7 @@
  * through standard evas functions.
  */
 Evas_Object *
-ewl_embed_set_evas(Ewl_Embed *emb, Evas *evas, Ecore_X_Window evas_window)
+ewl_embed_set_evas(Ewl_Embed *emb, Evas *evas, void *evas_window)
 {
        Ewl_Widget *w;
        Ewd_List   *paths;
@@ -523,7 +523,7 @@
  * @return Returns the found embed on success, NULL on failure.
  * @brief Find an ewl embed by its evas window
  */
-Ewl_Embed      *ewl_embed_find_by_evas_window(Ecore_X_Window window)
+Ewl_Embed      *ewl_embed_find_by_evas_window(void *window)
 {
        Ewl_Embed      *retemb;
 
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/ewl_embed.h,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -3 -r1.16 -r1.17
--- ewl_embed.h 26 Feb 2004 05:38:31 -0000      1.16
+++ ewl_embed.h 27 Feb 2004 00:30:58 -0000      1.17
@@ -36,7 +36,7 @@
        Ewl_Overlay     overlay; /**< Inherits from the Ewl_Overlay class */
 
        Evas           *evas; /**< Evas where drawing takes place. */
-       Ecore_X_Window  evas_window; /**< The window holding the evas. */
+       void           *evas_window; /**< The window holding the evas. */
 
        Evas_Object    *smart; /**< Object to manipulate Ewl_Embed from evas */
        Ewd_List       *tab_order; /**< Order of widgets to send focus on tab */
@@ -45,7 +45,7 @@
 Ewl_Widget     *ewl_embed_new(void);
 int             ewl_embed_init(Ewl_Embed * win);
 Evas_Object    *ewl_embed_set_evas(Ewl_Embed *emb, Evas *evas,
-                                  Ecore_X_Window evas_window);
+                                  void *evas_window);
 void            ewl_embed_feed_key_down(Ewl_Embed *embed, char *keyname);
 void            ewl_embed_feed_key_up(Ewl_Embed *embed, char *keyname);
 void            ewl_embed_feed_mouse_down(Ewl_Embed *embed, int b, int x,
@@ -55,7 +55,7 @@
 void            ewl_embed_feed_mouse_move(Ewl_Embed *embed, int x, int y);
 void            ewl_embed_feed_mouse_out();
 void            ewl_embed_font_path_add(char *path);
-Ewl_Embed      *ewl_embed_find_by_evas_window(Ecore_X_Window win);
+Ewl_Embed      *ewl_embed_find_by_evas_window(void *win);
 Ewl_Embed      *ewl_embed_find_by_widget(Ewl_Widget * w);
 void            ewl_embed_next_tab_order(Ewl_Embed *e);
 void            ewl_embed_remove_tab_order(Ewl_Embed *e, Ewl_Widget *w);
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/ewl_enums.h,v
retrieving revision 1.47
retrieving revision 1.48
diff -u -3 -r1.47 -r1.48
--- ewl_enums.h 23 Feb 2004 06:08:13 -0000      1.47
+++ ewl_enums.h 27 Feb 2004 00:30:58 -0000      1.48
@@ -232,6 +232,19 @@
 
 typedef enum Ewl_Filedialog_Type Ewl_Filedialog_Type;
 
+enum Ewl_Engine
+{
+       EWL_ENGINE_SOFTWARE_X11 = 1,
+       EWL_ENGINE_GL_X11 = 2,
+       EWL_ENGINE_FB = 4,
+};
+
+typedef enum Ewl_Engine Ewl_Engine;
+
+#define EWL_ENGINE_X11 (EWL_ENGINE_SOFTWARE_X11 | EWL_ENGINE_GL_X11)
+#define EWL_ENGINE_ALL (EWL_ENGINE_SOFTWARE_X11 | EWL_ENGINE_GL_X11 | \
+                       EWL_ENGINE_FB)
+
 /**
  * @}
  */
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/ewl_events.c,v
retrieving revision 1.51
retrieving revision 1.52
diff -u -3 -r1.51 -r1.52
--- ewl_events.c        26 Feb 2004 05:38:33 -0000      1.51
+++ ewl_events.c        27 Feb 2004 00:30:58 -0000      1.52
@@ -4,6 +4,14 @@
 #include "ewl-config.h"
 #endif
 
+#ifdef HAVE_EVAS_ENGINE_FB_H
+#include "Ecore_Fb.h"
+#endif
+
+#ifdef HAVE_EVAS_ENGINE_SOFTWARE_X11_H
+#include "Ecore_X.h"
+#endif
+
 extern Ewl_Widget     *last_selected;
 extern Ewl_Widget     *last_key;
 extern Ewl_Widget     *last_focused;
@@ -40,56 +48,63 @@
  */
 int ewl_ev_init(void)
 {
+       unsigned int engine;
        DENTER_FUNCTION(DLEVEL_STABLE);
 
+       engine = ewl_get_engine_mask();
 #ifdef HAVE_EVAS_ENGINE_SOFTWARE_X11_H
        /*
         * Register dispatching functions for window events.
         */
-       ecore_event_handler_add(ECORE_X_EVENT_WINDOW_DAMAGE,
-                               ewl_ev_x_window_expose, NULL);
-       ecore_event_handler_add(ECORE_X_EVENT_WINDOW_CONFIGURE,
-                               ewl_ev_x_window_configure, NULL);
-       ecore_event_handler_add(ECORE_X_EVENT_WINDOW_DELETE_REQUEST,
-                               ewl_ev_x_window_delete, NULL);
-
-       /*
-        * Register dispatching functions for keyboard events.
-        */
-       ecore_event_handler_add(ECORE_X_EVENT_KEY_DOWN, ewl_ev_x_key_down,
-                               NULL);
-       ecore_event_handler_add(ECORE_X_EVENT_KEY_UP, ewl_ev_x_key_up, NULL);
-
-       /*
-        * Finally, register dispatching functions for mouse events.
-        */
-       ecore_event_handler_add(ECORE_X_EVENT_MOUSE_BUTTON_DOWN,
-                               ewl_ev_x_mouse_down, NULL);
-       ecore_event_handler_add(ECORE_X_EVENT_MOUSE_BUTTON_UP,
-                               ewl_ev_x_mouse_up, NULL);
-       ecore_event_handler_add(ECORE_X_EVENT_MOUSE_MOVE,
-                               ewl_ev_x_mouse_move, NULL);
-       ecore_event_handler_add(ECORE_X_EVENT_MOUSE_OUT, ewl_ev_x_mouse_out,
-                               NULL);
-
-       /*
-        * Selection callbacks to allow for pasting.
-        */
-       ecore_event_handler_add(ECORE_X_EVENT_SELECTION_NOTIFY, ewl_ev_x_paste,
-                               NULL);
+       if (engine & EWL_ENGINE_X11) {
+               ecore_event_handler_add(ECORE_X_EVENT_WINDOW_DAMAGE,
+                                       ewl_ev_x_window_expose, NULL);
+               ecore_event_handler_add(ECORE_X_EVENT_WINDOW_CONFIGURE,
+                                       ewl_ev_x_window_configure, NULL);
+               ecore_event_handler_add(ECORE_X_EVENT_WINDOW_DELETE_REQUEST,
+                                       ewl_ev_x_window_delete, NULL);
+
+               /*
+                * Register dispatching functions for keyboard events.
+                */
+               ecore_event_handler_add(ECORE_X_EVENT_KEY_DOWN,
+                                       ewl_ev_x_key_down, NULL);
+               ecore_event_handler_add(ECORE_X_EVENT_KEY_UP, ewl_ev_x_key_up,
+                                       NULL);
+
+               /*
+                * Finally, register dispatching functions for mouse events.
+                */
+               ecore_event_handler_add(ECORE_X_EVENT_MOUSE_BUTTON_DOWN,
+                                       ewl_ev_x_mouse_down, NULL);
+               ecore_event_handler_add(ECORE_X_EVENT_MOUSE_BUTTON_UP,
+                                       ewl_ev_x_mouse_up, NULL);
+               ecore_event_handler_add(ECORE_X_EVENT_MOUSE_MOVE,
+                                       ewl_ev_x_mouse_move, NULL);
+               ecore_event_handler_add(ECORE_X_EVENT_MOUSE_OUT,
+                                       ewl_ev_x_mouse_out, NULL);
+
+               /*
+                * Selection callbacks to allow for pasting.
+                */
+               ecore_event_handler_add(ECORE_X_EVENT_SELECTION_NOTIFY,
+                                       ewl_ev_x_paste, NULL);
+       }
 #endif
 
 #ifdef HAVE_EVAS_ENGINE_FB
-       ecore_event_handler_add(ECORE_FB_EVENT_KEY_DOWN, ewl_ev_fb_key_down,
-                               NULL);
-       ecore_event_handler_add(ECORE_FB_EVENT_KEY_UP, ewl_ev_fb_key_up,
-                               NULL);
-       ecore_event_handler_add(ECORE_FB_EVENT_MOUSE_DOWN, ewl_ev_fb_mouse_down,
-                               NULL);
-       ecore_event_handler_add(ECORE_FB_EVENT_MOUSE_UP, ewl_ev_fb_mouse_up,
-                               NULL);
-       ecore_event_handler_add(ECORE_FB_EVENT_MOUSE_MOVE, ewl_ev_fb_mouse_move,
-                               NULL);
+       if (engine & EWL_ENGINE_FB) {
+               ecore_event_handler_add(ECORE_FB_EVENT_KEY_DOWN,
+                                       ewl_ev_fb_key_down, NULL);
+               ecore_event_handler_add(ECORE_FB_EVENT_KEY_UP, ewl_ev_fb_key_up,
+                                       NULL);
+               ecore_event_handler_add(ECORE_FB_EVENT_MOUSE_DOWN,
+                                       ewl_ev_fb_mouse_down, NULL);
+               ecore_event_handler_add(ECORE_FB_EVENT_MOUSE_UP,
+                                       ewl_ev_fb_mouse_up, NULL);
+               ecore_event_handler_add(ECORE_FB_EVENT_MOUSE_MOVE,
+                                       ewl_ev_fb_mouse_move, NULL);
+       }
 #endif
 
        DRETURN_INT(1, DLEVEL_STABLE);
@@ -119,7 +134,7 @@
 
        ev = e;
 
-       embed = ewl_embed_find_by_evas_window(ev->win);
+       embed = ewl_embed_find_by_evas_window((void *)ev->win);
        if (!embed)
                DRETURN_INT(TRUE, DLEVEL_STABLE);
 
@@ -150,7 +165,7 @@
        DENTER_FUNCTION(DLEVEL_STABLE);
        ev = e;
 
-       window = ewl_window_find_window(ev->win);
+       window = ewl_window_find_window((void *)ev->win);
        if (!window)
                DRETURN_INT(TRUE, DLEVEL_STABLE);
 
@@ -191,7 +206,7 @@
 
        ev = e;
 
-       window = ewl_window_find_window(ev->win);
+       window = ewl_window_find_window((void *)ev->win);
        if (!window)
                DRETURN_INT(TRUE, DLEVEL_STABLE);
 
@@ -218,7 +233,7 @@
 
        ev = e;
 
-       embed = ewl_embed_find_by_evas_window(ev->win);
+       embed = ewl_embed_find_by_evas_window((void *)ev->win);
 
        if (!embed)
                DRETURN_INT(TRUE, DLEVEL_STABLE);
@@ -246,7 +261,7 @@
 
        ev = e;
 
-       embed = ewl_embed_find_by_evas_window(ev->win);
+       embed = ewl_embed_find_by_evas_window((void *)ev->win);
        if (!embed)
                DRETURN_INT(TRUE, DLEVEL_STABLE);
 
@@ -275,7 +290,7 @@
 
        ev = e;
 
-       embed = ewl_embed_find_by_evas_window(ev->win);
+       embed = ewl_embed_find_by_evas_window((void *)ev->win);
        if (!embed)
                DRETURN_INT(TRUE, DLEVEL_STABLE);
 
@@ -304,7 +319,7 @@
 
        ev = e;
 
-       embed = ewl_embed_find_by_evas_window(ev->win);
+       embed = ewl_embed_find_by_evas_window((void *)ev->win);
        if (!embed)
                DRETURN_INT(TRUE, DLEVEL_STABLE);
 
@@ -332,7 +347,7 @@
 
        ev = e;
 
-       embed = ewl_embed_find_by_evas_window(ev->win);
+       embed = ewl_embed_find_by_evas_window((void *)ev->win);
        if (!embed)
                DRETURN_INT(TRUE, DLEVEL_STABLE);
 
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/ewl_misc.c,v
retrieving revision 1.65
retrieving revision 1.66
diff -u -3 -r1.65 -r1.66
--- ewl_misc.c  26 Feb 2004 05:38:35 -0000      1.65
+++ ewl_misc.c  27 Feb 2004 00:30:58 -0000      1.66
@@ -1,24 +1,52 @@
-
 #include <Ewl.h>
 
-int             ewl_idle_render(void *data);
+#ifdef HAVE_CONFIG_H
+#include "ewl-config.h"
+#endif
+
+#ifdef HAVE_EVAS_ENGINE_FB_H
+#include <Ecore_Fb.h>
+#endif
+
+#ifdef HAVE_EVAS_ENGINE_SOFTWARE_X11_H
+#include <Ecore_X.h>
+#endif
+
+#ifdef HAVE_EVAS_ENGINE_SOFTWARE_X11_H
+#include <Evas_Engine_Software_X11.h>
+#endif
 
 extern Ewd_List *ewl_embed_list;
 extern Ewd_List *ewl_window_list;
 
+/*
+ * Configuration and option related flags.
+ */
 static unsigned int    debug_segv = 0;
+static unsigned int    use_engine = EWL_ENGINE_ALL;
 static unsigned int    phase_status = 0;
+
+/*
+ *
+ */
 static Ecore_Timer    *config_timer = NULL;
 
+/*
+ * Queues for scheduling various actions.
+ */
 static Ewd_List *configure_list = NULL;
 static Ewd_List *realize_list = NULL;
 static Ewd_List *destroy_list = NULL;
+static Ewd_List *child_add_list= NULL;
 
+/*
+ * Lists for cleaning up evas related memory at convenient times.
+ */
 static Ewd_List *free_evas_list = NULL;
 static Ewd_List *free_evas_object_list = NULL;
 
-static Ewd_List *child_add_list= NULL;
 
+int             ewl_idle_render(void *data);
 static void     ewl_init_parse_options(int *argc, char **argv);
 static void     ewl_init_remove_option(int *argc, char **argv, int i);
 int             ewl_ecore_exit(void *data, int type, void *event);
@@ -55,10 +83,14 @@
  */
 void ewl_init(int *argc, char **argv)
 {
-       char           *xdisplay = NULL;
+       static int initialized = 0;
 
        DENTER_FUNCTION(DLEVEL_STABLE);
 
+       initialized++;
+       if (initialized > 1)
+               DRETURN(DLEVEL_STABLE);
+
        configure_list = ewd_list_new();
        realize_list = ewd_list_new();
        destroy_list = ewd_list_new();
@@ -70,8 +102,35 @@
 
        ecore_init();
        edje_init();
-       if (!ecore_x_init(xdisplay)) {
-               fprintf(stderr, "ERRR: Cannot connect to X display!\n");
+
+#ifdef HAVE_EVAS_ENGINE_SOFTWARE_X11_H
+       /*
+        * Attempt to pick the correct engine by adjusting the bitmask
+        * relative to the success of each engines init routine.
+        */
+       if (use_engine & EWL_ENGINE_X11) {
+               if (!ecore_x_init(NULL))
+                       use_engine &= ~EWL_ENGINE_X11;
+               else
+                       use_engine &= EWL_ENGINE_X11;
+       }
+#endif
+
+#ifdef HAVE_EVAS_ENGINE_FB_H
+       /*
+        * Maybe the X11 engines arent' available or they failed, so see if
+        * we should load up the FB.
+        */
+       if (use_engine & EWL_ENGINE_FB) {
+               if (!ecore_fb_init(NULL))
+                       use_engine &= ~EWL_ENGINE_FB;
+               else
+                       use_engine &= EWL_ENGINE_FB;
+       }
+#endif
+
+       if (!use_engine) {
+               fprintf(stderr, "ERRR: Cannot open display!\n");
                exit(-1);
        }
 
@@ -250,10 +309,26 @@
 
        i = 0;
        while (i < *argc) {
+               int matched = 0;
                if (!strcmp(argv[i], "--ewl-segv")) {
                        debug_segv = 1;
-                       ewl_init_remove_option(argc, argv, i);
+                       matched++;
+               }
+               else if (!strcmp(argv[i], "--ewl-software-x11")) {
+                       use_engine = EWL_ENGINE_SOFTWARE_X11;
+                       matched++;
                }
+               else if (!strcmp(argv[i], "--ewl-gl-x11")) {
+                       use_engine = EWL_ENGINE_GL_X11;
+                       matched++;
+               }
+               else if (!strcmp(argv[i], "--ewl-fb")) {
+                       use_engine = EWL_ENGINE_FB;
+                       matched++;
+               }
+
+               if (matched)
+                       ewl_init_remove_option(argc, argv, i);
                else
                        i++;
        }
@@ -631,6 +706,12 @@
        DRETURN_INT((phase_status & EWL_FLAG_QUEUED_RSCHEDULED), DLEVEL_STABLE);
 }
 
+unsigned int ewl_get_engine_mask()
+{
+       DENTER_FUNCTION(DLEVEL_STABLE);
+       DRETURN_INT(use_engine, DLEVEL_STABLE);
+}
+
 void ewl_destroy_request(Ewl_Widget *w)
 {
        DENTER_FUNCTION(DLEVEL_STABLE);
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/ewl_misc.h,v
retrieving revision 1.25
retrieving revision 1.26
diff -u -3 -r1.25 -r1.26
--- ewl_misc.h  25 Feb 2004 06:57:28 -0000      1.25
+++ ewl_misc.h  27 Feb 2004 00:30:58 -0000      1.26
@@ -29,6 +29,7 @@
 void            ewl_enter_realize_phase(void);
 void            ewl_exit_realize_phase(void);
 int             ewl_in_realize_phase(void);
+unsigned int    ewl_get_engine_mask();
 void            ewl_evas_destroy(Evas *evas);
 void            ewl_evas_object_destroy(Evas_Object *obj);
 
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/ewl_window.c,v
retrieving revision 1.74
retrieving revision 1.75
diff -u -3 -r1.74 -r1.75
--- ewl_window.c        26 Feb 2004 05:38:41 -0000      1.74
+++ ewl_window.c        27 Feb 2004 00:30:58 -0000      1.75
@@ -4,6 +4,14 @@
 #include "ewl-config.h"
 #endif
 
+#ifdef HAVE_EVAS_ENGINE_FB_H
+#include <Ecore_Fb.h>
+#endif
+
+#ifdef HAVE_EVAS_ENGINE_SOFTWARE_X11_H
+#include <Ecore_X.h>
+#endif
+
 #ifdef HAVE_EVAS_ENGINE_GL_X11_H
 #include <Evas_Engine_GL_X11.h>
 #endif
@@ -54,7 +62,7 @@
  * @return Returns the found ewl window on success, NULL on failure.
  * @brief Find an ewl window by it's X window
  */
-Ewl_Window     *ewl_window_find_window(Ecore_X_Window window)
+Ewl_Window     *ewl_window_find_window(void *window)
 {
        Ewl_Window     *retwin;
 
@@ -95,7 +103,7 @@
        if (!REALIZED(win))
                return;
 
-       ecore_x_window_prop_title_set(win->window, title);
+       ecore_x_window_prop_title_set((Ecore_X_Window)win->window, title);
 
        DLEAVE_FUNCTION(DLEVEL_STABLE);
 }
@@ -140,7 +148,7 @@
        if (!REALIZED(win))
                return;
 
-       ecore_x_window_prop_name_class_set(win->window, name, win->name);
+       ecore_x_window_prop_name_class_set((Ecore_X_Window)win->window, name, 
win->name);
 
        DLEAVE_FUNCTION(DLEVEL_STABLE);
 }
@@ -185,7 +193,7 @@
        if (!REALIZED(win))
                return;
 
-       ecore_x_window_prop_name_class_set(win->window, classname,
+       ecore_x_window_prop_name_class_set((Ecore_X_Window)win->window, classname,
                                           win->classname);
 
        DLEAVE_FUNCTION(DLEVEL_STABLE);
@@ -222,7 +230,7 @@
        win->flags |= EWL_WINDOW_BORDERLESS;
 
        if (REALIZED(win))
-               ecore_x_window_prop_borderless_set(win->window, TRUE);
+               ecore_x_window_prop_borderless_set((Ecore_X_Window)win->window, TRUE);
 
        DLEAVE_FUNCTION(DLEVEL_STABLE);
 }
@@ -243,7 +251,7 @@
        DCHECK_PARAM_PTR("win", win);
 
        if (REALIZED(win))
-               ecore_x_window_move(win->window, x, y);
+               ecore_x_window_move((Ecore_X_Window)win->window, x, y);
 
        DLEAVE_FUNCTION(DLEVEL_STABLE);
 }
@@ -360,18 +368,19 @@
         */
 #ifdef HAVE_EVAS_ENGINE_SOFTWARE_X11_H
        if (strstr(render, "x11")) {
-               window->window = ecore_x_window_new(0, window->x, window->y,
+               window->window = (void *)ecore_x_window_new(0, window->x,
+                                               window->y,
                                                ewl_object_get_current_w(o),
                                                ewl_object_get_current_h(o));
 
-               ecore_x_window_prop_name_class_set(window->window, window->name,
+               ecore_x_window_prop_name_class_set((Ecore_X_Window)window->window, 
window->name,
                                           window->classname);
-               ecore_x_window_prop_title_set(window->window, window->title);
-               ecore_x_window_prop_protocol_set(window->window,
+               ecore_x_window_prop_title_set((Ecore_X_Window)window->window, 
window->title);
+               ecore_x_window_prop_protocol_set((Ecore_X_Window)window->window,
                                        ECORE_X_WM_PROTOCOL_DELETE_REQUEST,1);
 
                if (window->flags & EWL_WINDOW_BORDERLESS)
-                       ecore_x_window_prop_borderless_set(window->window, 1);
+                       
ecore_x_window_prop_borderless_set((Ecore_X_Window)window->window, 1);
        }
 #endif
 
@@ -392,7 +401,7 @@
                glinfo->info.colormap = glinfo->func.best_colormap_get(
                                glinfo->info.display,
                                DefaultScreen(glinfo->info.display));
-               glinfo->info.drawable = window->window;
+               glinfo->info.drawable = (Ecore_X_Window)window->window;
                glinfo->info.depth = glinfo->func.best_depth_get(
                                glinfo->info.display,
                                DefaultScreen(glinfo->info.display));
@@ -421,7 +430,7 @@
                                DefaultScreen(sinfo->info.display));
                sinfo->info.colormap = DefaultColormap(sinfo->info.display,
                                DefaultScreen(sinfo->info.display));
-               sinfo->info.drawable = window->window;
+               sinfo->info.drawable = (Ecore_X_Window)window->window;
                sinfo->info.depth = DefaultDepth(sinfo->info.display,
                                DefaultScreen(sinfo->info.display));
                sinfo->info.rotation = 0;
@@ -460,7 +469,7 @@
        ewl_evas_destroy(embed->evas);
        embed->evas = NULL;
 
-       ecore_x_window_del(EWL_WINDOW(embed)->window);
+       ecore_x_window_del((Ecore_X_Window)EWL_WINDOW(embed)->window);
 
        DLEAVE_FUNCTION(DLEVEL_STABLE);
 }
@@ -474,10 +483,10 @@
                DRETURN(DLEVEL_STABLE);
 
        if (EWL_WINDOW(w)->flags & EWL_WINDOW_BORDERLESS)
-               ecore_x_window_prop_borderless_set(EWL_WINDOW(w)->window, 1);
+               
ecore_x_window_prop_borderless_set((Ecore_X_Window)EWL_WINDOW(w)->window, 1);
 
-       ecore_x_window_show(EWL_WINDOW(w)->window);
-       ecore_x_window_show(EWL_EMBED(w)->evas_window);
+       ecore_x_window_show((Ecore_X_Window)EWL_WINDOW(w)->window);
+       ecore_x_window_show((Ecore_X_Window)EWL_EMBED(w)->evas_window);
 
        DLEAVE_FUNCTION(DLEVEL_STABLE);
 }
@@ -487,8 +496,8 @@
        DENTER_FUNCTION(DLEVEL_STABLE);
        DCHECK_PARAM_PTR("widget", widget);
 
-       ecore_x_window_hide(EWL_EMBED(widget)->evas_window);
-       ecore_x_window_hide(EWL_WINDOW(widget)->window);
+       ecore_x_window_hide((Ecore_X_Window)EWL_EMBED(widget)->evas_window);
+       ecore_x_window_hide((Ecore_X_Window)EWL_WINDOW(widget)->window);
 
        DLEAVE_FUNCTION(DLEVEL_STABLE);
 }
@@ -504,11 +513,11 @@
 
        IF_FREE(win->title);
 
-       ecore_x_window_hide(EWL_EMBED(win)->evas_window);
-       ecore_x_window_hide(win->window);
+       ecore_x_window_hide((Ecore_X_Window)EWL_EMBED(win)->evas_window);
+       ecore_x_window_hide((Ecore_X_Window)win->window);
 
-       ecore_x_window_del(EWL_EMBED(win)->evas_window);
-       ecore_x_window_del(win->window);
+       ecore_x_window_del((Ecore_X_Window)EWL_EMBED(win)->evas_window);
+       ecore_x_window_del((Ecore_X_Window)win->window);
 
        IF_FREE(win->title);
 
@@ -534,10 +543,10 @@
        /*
         * Adjust the maximum window bounds to match the widget
         */
-       ecore_x_window_prop_min_size_set(win->window,
+       ecore_x_window_prop_min_size_set((Ecore_X_Window)win->window,
                        ewl_object_get_minimum_w(EWL_OBJECT(w)),
                        ewl_object_get_minimum_h(EWL_OBJECT(w)));
-       ecore_x_window_prop_max_size_set(win->window,
+       ecore_x_window_prop_max_size_set((Ecore_X_Window)win->window,
                        ewl_object_get_maximum_w(EWL_OBJECT(w)),
                        ewl_object_get_maximum_h(EWL_OBJECT(w)));
 
@@ -554,12 +563,12 @@
        if (win->flags & EWL_WINDOW_USER_CONFIGURE)
                win->flags &= ~EWL_WINDOW_USER_CONFIGURE;
        else {
-               ecore_x_window_resize(win->window, width, height);
+               ecore_x_window_resize((Ecore_X_Window)win->window, width, height);
 
        }
 
        if (EWL_EMBED(win)->evas_window != win->window)
-               ecore_x_window_resize(EWL_EMBED(win)->evas_window, width,
+               ecore_x_window_resize((Ecore_X_Window)EWL_EMBED(win)->evas_window, 
width,
                                      height);
        evas_output_size_set(EWL_EMBED(win)->evas, width, height);
        evas_output_viewport_set(EWL_EMBED(win)->evas,
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/ewl_window.h,v
retrieving revision 1.27
retrieving revision 1.28
diff -u -3 -r1.27 -r1.28
--- ewl_window.h        14 Jan 2004 20:42:54 -0000      1.27
+++ ewl_window.h        27 Feb 2004 00:30:58 -0000      1.28
@@ -36,7 +36,7 @@
 {
        Ewl_Embed       embed; /**< Inherits from the Ewl_Embed class */
 
-       Ecore_X_Window  window; /**< Provides a window for drawing */
+       void           *window; /**< Provides a window for drawing */
 
        char           *title; /**< The current title on the provided window */
        char           *name; /**< Current name on the provided window */
@@ -51,7 +51,7 @@
 
 Ewl_Widget     *ewl_window_new(void);
 int             ewl_window_init(Ewl_Window * win);
-Ewl_Window     *ewl_window_find_window(Ecore_X_Window window);
+Ewl_Window     *ewl_window_find_window(void *window);
 void            ewl_window_set_title(Ewl_Window * win, char *title);
 char           *ewl_window_get_title(Ewl_Window * win);
 void            ewl_window_set_name(Ewl_Window * win, char *name);




-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps & Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id=1356&alloc_id=3438&op=click
_______________________________________________
enlightenment-cvs mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to