Enlightenment CVS committal

Author  : rbdpngn
Project : e17
Module  : libs/ewl

Dir     : e17/libs/ewl/src


Modified Files:
        Ewl.h Makefile.am ewl_config.c ewl_container.c ewl_events.c 
        ewl_events.h ewl_floater.c ewl_image.c ewl_image.h ewl_imenu.c 
        ewl_menu.c ewl_misc.c ewl_selectionbar.c ewl_text.c 
        ewl_textarea.c ewl_theme.c ewl_widget.c ewl_widget.h 
        ewl_window.c ewl_window.h 
Added Files:
        ewl_embed.c ewl_embed.h 


Log Message:
Big transitional commit. EWL now uses Edje for it's theme files, there will be
some layout breakage until Edje evolves a bit further. Also transitioned the
top-level container from the Window to a container called Embed. The Embed
container can be used to nest EWL inside of an existing evas. The event
handling through the Embed object is not debugged, so don't play with it yet
unless you are willing/capable of helping with debugging and patching.

===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/Ewl.h,v
retrieving revision 1.31
retrieving revision 1.32
diff -u -3 -r1.31 -r1.32
--- Ewl.h       28 Jun 2003 06:50:32 -0000      1.31
+++ Ewl.h       13 Jul 2003 05:52:49 -0000      1.32
@@ -5,7 +5,7 @@
 extern          "C" {
 #endif
 
-#include <Ebits.h>
+#include <Edje.h>
 #include <Ecore.h>
 #include <Ecore_X.h>
 #include <Edb.h>
@@ -54,6 +54,7 @@
 #include <ewl_fileselector.h>
 #include <ewl_floater.h>
 #include <ewl_filedialog.h>
+#include <ewl_embed.h>
 #include <ewl_window.h>
 #include <ewl_text.h>
 #include <ewl_entry.h>
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/Makefile.am,v
retrieving revision 1.34
retrieving revision 1.35
diff -u -3 -r1.34 -r1.35
--- Makefile.am 28 Jun 2003 06:50:32 -0000      1.34
+++ Makefile.am 13 Jul 2003 05:52:49 -0000      1.35
@@ -1,6 +1,6 @@
 ## Process this file with automake to produce Makefile.in
 
-INCLUDES = @ebits_cflags@ @ecore_cflags@ @edb_cflags@ @evas_cflags@ @ewd_cflags@ 
@etox_cflags@
+INCLUDES = @edje_cflags@ @ecore_cflags@ @edb_cflags@ @evas_cflags@ @ewd_cflags@ 
@etox_cflags@
 
 lib_LTLIBRARIES = libewl.la
 
@@ -18,6 +18,7 @@
        ewl_container.h \
        ewl_cursor.h \
        ewl_debug.h \
+       ewl_embed.h \
        ewl_entry.h \
        ewl_enums.h \
        ewl_events.h \
@@ -62,6 +63,7 @@
        ewl_config.c \
        ewl_container.c \
        ewl_cursor.c \
+       ewl_embed.c \
        ewl_entry.c \
        ewl_events.c \
        ewl_fileselector.c \
@@ -94,5 +96,5 @@
        ewl_widget.c \
        ewl_window.c
 
-libewl_la_LIBADD = @ebits_libs@ @ecore_libs@ @edb_libs@ @evas_libs@ @ewd_libs@ 
@etox_libs@ -lm
+libewl_la_LIBADD = @edje_libs@ @ecore_libs@ @edb_libs@ @evas_libs@ @ewd_libs@ 
@etox_libs@ -lm
 libewl_la_LDFLAGS = -version-info 0:0:0
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/ewl_config.c,v
retrieving revision 1.24
retrieving revision 1.25
diff -u -3 -r1.24 -r1.25
--- ewl_config.c        3 Jun 2003 04:00:39 -0000       1.24
+++ ewl_config.c        13 Jul 2003 05:52:49 -0000      1.25
@@ -18,7 +18,7 @@
 
 Ewl_Config ewl_config;
 
-extern Ewd_List *ewl_window_list;
+extern Ewd_List *ewl_embed_list;
 
 /**
  * ewl_config_init - initialize the configuration system
@@ -236,24 +236,24 @@
        nc.theme.name = ewl_config_get_str("system", "/theme/name");
        nc.theme.cache = ewl_config_get_int("system", "/theme/cache");
 
-       if (ewl_window_list && !ewd_list_is_empty(ewl_window_list)) {
-               Ewl_Window     *w;
+       if (ewl_embed_list && !ewd_list_is_empty(ewl_embed_list)) {
+               Ewl_Embed      *e;
 
-               ewd_list_goto_first(ewl_window_list);
+               ewd_list_goto_first(ewl_embed_list);
 
-               while ((w = ewd_list_next(ewl_window_list)) != NULL) {
-                       if (!w->evas)
+               while ((e = ewd_list_next(ewl_embed_list)) != NULL) {
+                       if (!e->evas)
                                continue;
 
                        if (nc.evas.font_cache) {
-                               evas_font_cache_flush(w->evas);
-                               evas_font_cache_set(w->evas,
+                               evas_font_cache_flush(e->evas);
+                               evas_font_cache_set(e->evas,
                                                    nc.evas.font_cache);
                        }
 
                        if (nc.evas.image_cache) {
-                               evas_image_cache_flush(w->evas);
-                               evas_image_cache_set(w->evas,
+                               evas_image_cache_flush(e->evas);
+                               evas_image_cache_set(e->evas,
                                                     nc.evas.image_cache);
                        }
                }
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/ewl_container.c,v
retrieving revision 1.36
retrieving revision 1.37
diff -u -3 -r1.36 -r1.37
--- ewl_container.c     3 Jun 2003 04:00:40 -0000       1.36
+++ ewl_container.c     13 Jul 2003 05:52:49 -0000      1.37
@@ -546,7 +546,7 @@
 void __ewl_container_realize(Ewl_Widget * w, void *ev_data, void *user_data)
 {
        int             i = 0;
-       Ewl_Window     *win;
+       Ewl_Embed      *emb;
        Ewl_Container  *c;
        Ewl_Widget     *child;
 
@@ -555,13 +555,13 @@
 
        c = EWL_CONTAINER(w);
 
-       win = ewl_window_find_window_by_widget(w);
+       emb = ewl_embed_find_by_widget(w);
 
        /*
         * Create the clip box for this container, this keeps children clipped
         * to the wanted area.
         */
-       c->clip_box = evas_object_rectangle_add(win->evas);
+       c->clip_box = evas_object_rectangle_add(emb->evas);
        evas_object_move(c->clip_box, CURRENT_X(w), CURRENT_Y(w));
        evas_object_resize(c->clip_box, CURRENT_W(w), CURRENT_H(w));
        evas_object_layer_set(c->clip_box, LAYER(w));
@@ -606,9 +606,9 @@
        DCHECK_PARAM_PTR("w", w);
 
        if (EWL_CONTAINER(w)->clip_box) {
-               Ewl_Window     *win;
+               Ewl_Embed      *emb;
 
-               win = ewl_window_find_window_by_widget(w);
+               emb = ewl_embed_find_by_widget(w);
 
                /*
                 * Move the clip box into the new position and size of the
@@ -625,7 +625,7 @@
 
 void __ewl_container_destroy(Ewl_Widget * w, void *ev_data, void *user_data)
 {
-       Ewl_Window     *win;
+       Ewl_Embed      *emb;
        Ewl_Container  *c;
        Ewl_Widget     *child;
 
@@ -638,7 +638,7 @@
         * Clean up the clip box of the container.
         */
        if (c->clip_box) {
-               win = ewl_window_find_window_by_widget(w);
+               emb = ewl_embed_find_by_widget(w);
 
                evas_object_hide(c->clip_box);
                evas_object_clip_unset(c->clip_box);
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/ewl_events.c,v
retrieving revision 1.33
retrieving revision 1.34
diff -u -3 -r1.33 -r1.34
--- ewl_events.c        28 Jun 2003 07:08:47 -0000      1.33
+++ ewl_events.c        13 Jul 2003 05:52:49 -0000      1.34
@@ -7,17 +7,6 @@
 Ewl_Widget     *last_focused = NULL;
 Ewl_Widget     *dnd_widget = NULL;
 
-static void     ewl_ev_window_expose(void *data, int type, void *_ev);
-static void     ewl_ev_window_configure(void *data, int type, void *_ev);
-static void     ewl_ev_window_delete(void *data, int type, void *_ev);
-
-static void     ewl_ev_key_down(void *data, int type, void *_ev);
-static void     ewl_ev_key_up(void *data, int type, void *_ev);
-static void     ewl_ev_mouse_down(void *data, int type, void *_ev);
-static void     ewl_ev_mouse_up(void *data, int type, void *_ev);
-static void     ewl_ev_mouse_move(void *data, int type, void *_ev);
-static void     ewl_ev_mouse_out(void *data, int type, void *_ev);
-
 
 /**
  * ewl_ev_init - initialize the event handlers for dispatching to proper widgets
@@ -66,27 +55,27 @@
  * Returns no value. Dispatches the expose event to the appropriate window for
  * handling.
  */
-static void ewl_ev_window_expose(void *data, int type, void * _ev)
+int ewl_ev_window_expose(void *data, int type, void * _ev)
 {
        /*
         * Widgets don't need to know about this usually, but we still need to
         * let them know in case a widget is using a non-evas based draw method
         */
        Ecore_X_Event_Window_Damage *ev;
-       Ewl_Window     *window;
+       Ewl_Embed      *embed;
 
        DENTER_FUNCTION(DLEVEL_STABLE);
 
        ev = _ev;
 
-       window = ewl_window_find_window_by_evas_window(ev->win);
-       if (!window)
-               DRETURN(DLEVEL_STABLE);
+       embed = ewl_embed_find_by_evas_window(ev->win);
+       if (!embed)
+               DRETURN_INT(TRUE, DLEVEL_STABLE);
 
-       evas_damage_rectangle_add(window->evas, ev->x, ev->y, ev->w, ev->h);
-       ewl_callback_call(EWL_WIDGET(window), EWL_CALLBACK_EXPOSE);
+       evas_damage_rectangle_add(embed->evas, ev->x, ev->y, ev->w, ev->h);
+       ewl_callback_call(EWL_WIDGET(embed), EWL_CALLBACK_EXPOSE);
 
-       DLEAVE_FUNCTION(DLEVEL_STABLE);
+       DRETURN_INT(TRUE, DLEVEL_STABLE);
 }
 
 /**
@@ -96,7 +85,7 @@
  * Returns no value. Dispatches a configure even to the appropriate ewl
  * window.
  */
-static void ewl_ev_window_configure(void *data, int type, void *_ev)
+int ewl_ev_window_configure(void *data, int type, void *_ev)
 {
        /*
         * When a configure event occurs, we must update the windows geometry
@@ -110,7 +99,7 @@
 
        window = ewl_window_find_window(ev->win);
        if (!window)
-               DRETURN(DLEVEL_STABLE);
+               DRETURN_INT(TRUE, DLEVEL_STABLE);
 
        window->x = ev->x;
        window->y = ev->y;
@@ -123,7 +112,7 @@
                                            ev->h);
        }
 
-       DLEAVE_FUNCTION(DLEVEL_STABLE);
+       DRETURN_INT(TRUE, DLEVEL_STABLE);
 }
 
 /**
@@ -133,7 +122,7 @@
  * Returns no value. Dispatches the delete event to the appropriate ewl
  * window.
  */
-static void ewl_ev_window_delete(void *data, int type, void *_ev)
+int ewl_ev_window_delete(void *data, int type, void *_ev)
 {
        /*
         * Retrieve the appropriate ewl_window using the x window id that is
@@ -149,11 +138,11 @@
        window = ewl_window_find_window(ev->win);
 
        if (!window)
-               DRETURN(DLEVEL_STABLE);
+               DRETURN_INT(TRUE, DLEVEL_STABLE);
 
        ewl_callback_call(EWL_WIDGET(window), EWL_CALLBACK_DELETE_WINDOW);
 
-       DLEAVE_FUNCTION(DLEVEL_STABLE);
+       DRETURN_INT(TRUE, DLEVEL_STABLE);
 }
 
 /**
@@ -163,23 +152,23 @@
  * Returns no value. Dispatches the key down event to the appropriate ewl
  * window.
  */
-static void ewl_ev_key_down(void *data, int type, void *_ev)
+int ewl_ev_key_down(void *data, int type, void *_ev)
 {
        /*
         * Dispatcher of key down events, these get sent to the last widget
         * selected.
         */
-       Ewl_Window     *window;
+       Ewl_Embed      *embed;
        Ecore_X_Event_Key_Down *ev;
 
        DENTER_FUNCTION(DLEVEL_STABLE);
 
        ev = _ev;
 
-       window = ewl_window_find_window_by_evas_window(ev->win);
+       embed = ewl_embed_find_by_evas_window(ev->win);
 
-       if (!window)
-               DRETURN(DLEVEL_STABLE);
+       if (!embed)
+               DRETURN_INT(TRUE, DLEVEL_STABLE);
 
        /*
         * If a widget has been selected then we send the keystroke to the
@@ -190,12 +179,12 @@
                                                  EWL_CALLBACK_KEY_DOWN, ev);
                last_key = last_selected;
        } else {
-               ewl_callback_call_with_event_data(EWL_WIDGET(window),
+               ewl_callback_call_with_event_data(EWL_WIDGET(embed),
                                                  EWL_CALLBACK_KEY_DOWN, ev);
-               last_key = EWL_WIDGET(window);
+               last_key = EWL_WIDGET(embed);
        }
 
-       DLEAVE_FUNCTION(DLEVEL_STABLE);
+       DRETURN_INT(TRUE, DLEVEL_STABLE);
 }
 
 /**
@@ -205,21 +194,21 @@
  * Returns no value. Dispatches the key up event to the appropriate ewl
  * window.
  */
-static void ewl_ev_key_up(void *data, int type, void *_ev)
+int ewl_ev_key_up(void *data, int type, void *_ev)
 {
        /*
         * Dispatch key up events to the appropriate widget
         */
-       Ewl_Window     *window;
+       Ewl_Embed      *embed;
        Ecore_X_Event_Key_Up *ev;
 
        DENTER_FUNCTION(DLEVEL_STABLE);
 
        ev = _ev;
 
-       window = ewl_window_find_window_by_evas_window(ev->win);
-       if (!window)
-               DRETURN(DLEVEL_STABLE);
+       embed = ewl_embed_find_by_evas_window(ev->win);
+       if (!embed)
+               DRETURN_INT(TRUE, DLEVEL_STABLE);
 
        /*
         * If a widget has received a keydown event, then it should receive a
@@ -229,7 +218,7 @@
                ewl_callback_call_with_event_data(last_key, EWL_CALLBACK_KEY_UP,
                                                  ev);
 
-       DLEAVE_FUNCTION(DLEVEL_STABLE);
+       DRETURN_INT(TRUE, DLEVEL_STABLE);
 }
 
 
@@ -240,21 +229,22 @@
  * Returns no value. Dispatches the mouse down event to the appropriate ewl
  * window. Also determines the widgets clicked state.
  */
-static void ewl_ev_mouse_down(void *data, int type, void *_ev)
+int ewl_ev_mouse_down(void *data, int type, void *_ev)
 {
        Ewl_Widget     *widget = NULL;
-       Ewl_Window     *window;
+       Ewl_Embed      *embed;
        Ecore_X_Event_Mouse_Button_Down *ev;
 
        DENTER_FUNCTION(DLEVEL_STABLE);
 
        ev = _ev;
 
-       window = ewl_window_find_window_by_evas_window(ev->win);
-       if (!window)
-               DRETURN(DLEVEL_STABLE);
+       embed = ewl_embed_find_by_evas_window(ev->win);
+       if (!embed)
+               DRETURN_INT(TRUE, DLEVEL_STABLE);
 
-       widget = ewl_window_get_child_at(window, ev->x, ev->y);
+       widget = ewl_container_get_child_at_recursive(EWL_CONTAINER(embed),
+                       ev->x, ev->y);
 
        /*
         * Determine whether this widget has already been selected, if not,
@@ -288,7 +278,7 @@
         */
        last_selected = widget;
 
-       DLEAVE_FUNCTION(DLEVEL_STABLE);
+       DRETURN_INT(TRUE, DLEVEL_STABLE);
 }
 
 
@@ -299,18 +289,18 @@
  * Returns no value. Dispatches the mouse up event to the appropriate ewl
  * window. Also determines the widgets clicked state.
  */
-static void ewl_ev_mouse_up(void *data, int type, void *_ev)
+int ewl_ev_mouse_up(void *data, int type, void *_ev)
 {
-       Ewl_Window     *window;
+       Ewl_Embed      *embed;
        Ecore_X_Event_Mouse_Button_Up *ev;
 
        DENTER_FUNCTION(DLEVEL_STABLE);
 
        ev = _ev;
 
-       window = ewl_window_find_window_by_evas_window(ev->win);
-       if (!window)
-               DRETURN(DLEVEL_STABLE);
+       embed = ewl_embed_find_by_evas_window(ev->win);
+       if (!embed)
+               DRETURN_INT(TRUE, DLEVEL_STABLE);
 
        if (last_selected && !(last_selected->state & EWL_STATE_DISABLED)) {
                last_selected->state &= ~EWL_STATE_PRESSED;
@@ -318,7 +308,7 @@
                                                  EWL_CALLBACK_MOUSE_UP, ev);
        }
 
-       DLEAVE_FUNCTION(DLEVEL_STABLE);
+       DRETURN_INT(TRUE, DLEVEL_STABLE);
 }
 
 
@@ -329,21 +319,22 @@
  * Returns no value. Dispatches the mouse move event to the appropriate ewl
  * window.
  */
-static void ewl_ev_mouse_move(void *data, int type, void *_ev)
+int ewl_ev_mouse_move(void *data, int type, void *_ev)
 {
        Ewl_Widget     *widget;
-       Ewl_Window     *window;
+       Ewl_Embed      *embed;
        Ecore_X_Event_Mouse_Move *ev;
 
        DENTER_FUNCTION(DLEVEL_STABLE);
 
        ev = _ev;
 
-       window = ewl_window_find_window_by_evas_window(ev->win);
-       if (!window)
-               DRETURN(DLEVEL_STABLE);
+       embed = ewl_embed_find_by_evas_window(ev->win);
+       if (!embed)
+               DRETURN_INT(TRUE, DLEVEL_STABLE);
 
-       widget = ewl_window_get_child_at(window, ev->x, ev->y);
+       widget = ewl_container_get_child_at_recursive(EWL_CONTAINER(embed),
+                       ev->x, ev->y);
 
        if (last_focused && (widget != last_focused)) {
                last_focused->state &= ~EWL_STATE_HILITED;
@@ -369,7 +360,7 @@
        else
                dnd_widget = NULL;
 
-       DLEAVE_FUNCTION(DLEVEL_STABLE);
+       DRETURN_INT(TRUE, DLEVEL_STABLE);
 }
 
 /**
@@ -379,7 +370,7 @@
  * Returns no value. Dispatches the mouse out event to the appropriate ewl
  * window.
  */
-static void ewl_ev_mouse_out(void *data, int type, void *_ev)
+int ewl_ev_mouse_out(void *data, int type, void *_ev)
 {
        DENTER_FUNCTION(DLEVEL_STABLE);
 
@@ -388,5 +379,5 @@
                last_focused = NULL;
        }
 
-       DLEAVE_FUNCTION(DLEVEL_STABLE);
+       DRETURN_INT(TRUE, DLEVEL_STABLE);
 }
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/ewl_events.h,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -3 -r1.12 -r1.13
--- ewl_events.h        25 May 2002 05:46:40 -0000      1.12
+++ ewl_events.h        13 Jul 2003 05:52:49 -0000      1.13
@@ -4,4 +4,15 @@
 
 int             ewl_ev_init(void);
 
+int ewl_ev_window_expose(void *data, int type, void *_ev);
+int ewl_ev_window_configure(void *data, int type, void *_ev);
+int ewl_ev_window_delete(void *data, int type, void *_ev);
+
+int ewl_ev_key_down(void *data, int type, void *_ev);
+int ewl_ev_key_up(void *data, int type, void *_ev);
+int ewl_ev_mouse_down(void *data, int type, void *_ev);
+int ewl_ev_mouse_up(void *data, int type, void *_ev);
+int ewl_ev_mouse_move(void *data, int type, void *_ev);
+int ewl_ev_mouse_out(void *data, int type, void *_ev);
+
 #endif                         /* __EWL_EVENTS_H__ */
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/ewl_floater.c,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -3 -r1.9 -r1.10
--- ewl_floater.c       18 Apr 2003 20:35:41 -0000      1.9
+++ ewl_floater.c       13 Jul 2003 05:52:49 -0000      1.10
@@ -72,10 +72,6 @@
        f->follows = parent;
 
        /*
-       window = ewl_window_find_window_by_widget(parent);
-       */
-
-       /*
         * Need to add callbacks to the window that contains it as well the
         * widget it follows, if they are not the same.
         */
@@ -84,7 +80,7 @@
 
 
        /*
-        * Setup the basic callbacks for special events. 
+        * FIXME: Setup the basic callbacks for special events. 
         */
        /*
        ewl_callback_insert_after(w, EWL_CALLBACK_REPARENT,
@@ -94,14 +90,14 @@
 
 
        /* 
-        * add the floater to the window 
+        * FIXME: add the floater to the window 
         */
        /*
        ewl_container_append_child(EWL_CONTAINER(window), w);
        */
 
        /*
-        * Set the layer for this floater and increment the windows layering
+        * FIXME: Set the layer for this floater and increment the windows layering
         * for the floaters.
         */
        /*
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/ewl_image.c,v
retrieving revision 1.25
retrieving revision 1.26
diff -u -3 -r1.25 -r1.26
--- ewl_image.c 28 Jun 2003 06:50:32 -0000      1.25
+++ ewl_image.c 13 Jul 2003 05:52:49 -0000      1.26
@@ -86,14 +86,14 @@
 {
        int             old_type;
        Ewl_Widget     *w;
-       Ewl_Window     *win;
+       Ewl_Embed      *emb;
 
        DENTER_FUNCTION(DLEVEL_STABLE);
        DCHECK_PARAM_PTR("i", i);
 
        w = EWL_WIDGET(i);
 
-       win = ewl_window_find_window_by_widget(w);
+       emb = ewl_embed_find_by_widget(w);
 
        IF_FREE(i->path);
 
@@ -120,15 +120,9 @@
                        /*
                         * Type is important for using the correct free calls.
                         */
-                       if (old_type == EWL_IMAGE_TYPE_EBITS) {
-                               ebits_hide(i->image);
-                               ebits_unset_clip(i->image);
-                               ebits_free(i->image);
-                       } else {
-                               evas_object_hide(i->image);
-                               evas_object_clip_unset(i->image);
-                               evas_object_del(i->image);
-                       }
+                       evas_object_hide(i->image);
+                       evas_object_clip_unset(i->image);
+                       evas_object_del(i->image);
 
                        i->image = NULL;
                }
@@ -240,43 +234,41 @@
 void __ewl_image_realize(Ewl_Widget * w, void *ev_data, void *user_data)
 {
        Ewl_Image      *i;
-       Ewl_Window     *win;
+       Ewl_Embed      *emb;
 
        DENTER_FUNCTION(DLEVEL_STABLE);
        DCHECK_PARAM_PTR("w", w);
 
        i = EWL_IMAGE(w);
 
-       win = ewl_window_find_window_by_widget(w);
+       emb = ewl_embed_find_by_widget(w);
 
        /*
         * Load the image based on the type.
         */
-       if (i->type == EWL_IMAGE_TYPE_EBITS) {
-               i->image = ebits_load(i->path);
+       if (i->type == EWL_IMAGE_TYPE_EDJE) {
+               i->image = edje_object_add(emb->evas);
                if (!i->image)
                        return;
 
-               ebits_add_to_evas(i->image, win->evas);
-               ebits_set_layer(i->image, LAYER(w));
-               ebits_set_clip(i->image, w->fx_clip_box);
-               ebits_get_min_size(i->image, &i->ow, &i->oh);
-               ebits_show(i->image);
+               if (i->path)
+                       edje_object_file_set(i->image, i->path, "EWL");
 
        } else {
-               i->image = evas_object_image_add(win->evas);
+               i->image = evas_object_image_add(emb->evas);
                if (!i->image)
                        return;
 
                if (i->path)
                        evas_object_image_file_set(i->image, i->path, NULL);
 
-               evas_object_layer_set(i->image, LAYER(w));
-               evas_object_clip_set(i->image, w->fx_clip_box);
-               evas_object_image_size_get(i->image, &i->ow, &i->oh);
-               evas_object_show(i->image);
        }
 
+       evas_object_layer_set(i->image, LAYER(w));
+       evas_object_clip_set(i->image, w->fx_clip_box);
+       evas_object_image_size_get(i->image, &i->ow, &i->oh);
+       evas_object_show(i->image);
+
        if (!i->ow)
                i->ow = 256;
        else
@@ -298,24 +290,18 @@
 void __ewl_image_reparent(Ewl_Widget * w, void *ev_data, void *user_data)
 {
        Ewl_Image      *i;
-       Ewl_Window     *win;
 
        i = EWL_IMAGE(w);
        if (!i->image)
                return;
 
-       win = ewl_window_find_window_by_widget(w);
-
-       if (i->type == EWL_IMAGE_TYPE_EBITS)
-               ebits_set_layer(i->image, LAYER(w));
-       else
-               evas_object_layer_set(i->image, LAYER(w));
+       evas_object_layer_set(i->image, LAYER(w));
 }
 
 void __ewl_image_configure(Ewl_Widget * w, void *ev_data, void *user_data)
 {
        Ewl_Image      *i;
-       Ewl_Window     *win;
+       Ewl_Embed      *emb;
        int             ww, hh;
 
        DENTER_FUNCTION(DLEVEL_STABLE);
@@ -325,7 +311,7 @@
        if (!i->image)
                return;
 
-       win = ewl_window_find_window_by_widget(w);
+       emb = ewl_embed_find_by_widget(w);
 
        ww = CURRENT_W(w) - (INSET_LEFT(w) + INSET_RIGHT(w));
        hh = CURRENT_H(w) - (INSET_TOP(w) + INSET_BOTTOM(w));
@@ -333,16 +319,12 @@
        /*
         * Move the image into place based on type.
         */
-       if (i->type == EWL_IMAGE_TYPE_EBITS) {
-               ebits_move(i->image, CURRENT_X(w) + INSET_LEFT(w),
-                               CURRENT_Y(w) + INSET_TOP(w));
-               ebits_resize(i->image, i->sw * ww, i->sh * hh);
-       } else {
-               evas_object_move(i->image, CURRENT_X(w), CURRENT_Y(w));
-               evas_object_resize(i->image, ww, hh);
+       if (i->type != EWL_IMAGE_TYPE_EDJE)
                evas_object_image_fill_set(i->image, 0, 0, i->sw * ww,
                                i->sh * hh);
-       }
+
+       evas_object_move(i->image, CURRENT_X(w), CURRENT_Y(w));
+       evas_object_resize(i->image, ww, hh);
 
        DLEAVE_FUNCTION(DLEVEL_STABLE);
 }
@@ -360,7 +342,7 @@
        l = strlen(i);
 
        if (l >= 8 && !(strncasecmp((char *) i + l - 8, ".bits.db", 8)))
-               return EWL_IMAGE_TYPE_EBITS;
+               return EWL_IMAGE_TYPE_EDJE;
 
        return EWL_IMAGE_TYPE_NORMAL;
 }
@@ -369,18 +351,18 @@
 void __ewl_image_mouse_down(Ewl_Widget * w, void *ev_data, void *user_data)
 {
        Ewl_Image      *i;
-       Ewl_Window     *win;
+       Ewl_Embed      *emb;
        Ecore_X_Event_Mouse_Button_Down *ev;
 
        DENTER_FUNCTION(DLEVEL_STABLE);
        DCHECK_PARAM_PTR("w", w);
 
        i = EWL_IMAGE(w);
-       win = ewl_window_find_window_by_widget(w);
+       emb = ewl_embed_find_by_widget(w);
        ev = ev_data;
 
-       if (i->type == EWL_IMAGE_TYPE_EBITS)
-               evas_event_feed_mouse_down(win->evas, ev->button);
+       if (i->type == EWL_IMAGE_TYPE_EDJE)
+               evas_event_feed_mouse_down(emb->evas, ev->button);
 
        DLEAVE_FUNCTION(DLEVEL_STABLE);
 }
@@ -388,18 +370,18 @@
 void __ewl_image_mouse_up(Ewl_Widget * w, void *ev_data, void *user_data)
 {
        Ewl_Image      *i;
-       Ewl_Window     *win;
+       Ewl_Embed      *emb;
        Ecore_X_Event_Mouse_Button_Up *ev;
 
        DENTER_FUNCTION(DLEVEL_STABLE);
        DCHECK_PARAM_PTR("w", w);
 
        i = EWL_IMAGE(w);
-       win = ewl_window_find_window_by_widget(w);
+       emb = ewl_embed_find_by_widget(w);
        ev = ev_data;
 
-       if (i->type == EWL_IMAGE_TYPE_EBITS)
-               evas_event_feed_mouse_up(win->evas, ev->button);
+       if (i->type == EWL_IMAGE_TYPE_EDJE)
+               evas_event_feed_mouse_up(emb->evas, ev->button);
 
        DLEAVE_FUNCTION(DLEVEL_STABLE);
 }
@@ -407,18 +389,18 @@
 void __ewl_image_mouse_move(Ewl_Widget * w, void *ev_data, void *user_data)
 {
        Ewl_Image      *i;
-       Ewl_Window     *win;
+       Ewl_Embed      *emb;
        Ecore_X_Event_Mouse_Move *ev;
 
        DENTER_FUNCTION(DLEVEL_STABLE);
        DCHECK_PARAM_PTR("w", w);
 
        i = EWL_IMAGE(w);
-       win = ewl_window_find_window_by_widget(w);
+       emb = ewl_embed_find_by_widget(w);
        ev = ev_data;
 
-       if (i->type == EWL_IMAGE_TYPE_EBITS)
-               evas_event_feed_mouse_move(win->evas, ev->x, ev->y);
+       if (i->type == EWL_IMAGE_TYPE_EDJE)
+               evas_event_feed_mouse_move(emb->evas, ev->x, ev->y);
 
        DLEAVE_FUNCTION(DLEVEL_STABLE);
 }
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/ewl_image.h,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -3 -r1.13 -r1.14
--- ewl_image.h 29 Apr 2003 18:33:16 -0000      1.13
+++ ewl_image.h 13 Jul 2003 05:52:49 -0000      1.14
@@ -6,7 +6,7 @@
 
 enum _ewl_image_type {
        EWL_IMAGE_TYPE_NORMAL,
-       EWL_IMAGE_TYPE_EBITS
+       EWL_IMAGE_TYPE_EDJE
 };
 
 typedef struct _ewl_image Ewl_Image;
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/ewl_imenu.c,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -3 -r1.8 -r1.9
--- ewl_imenu.c 30 Jun 2003 05:58:59 -0000      1.8
+++ ewl_imenu.c 13 Jul 2003 05:52:49 -0000      1.9
@@ -58,7 +58,7 @@
 void __ewl_imenu_expand(Ewl_Widget * w, void *ev_data, void *user_data)
 {
        Ewl_IMenu      *menu;
-       Ewl_Window *win;
+       Ewl_Embed      *emb;
 
        DENTER_FUNCTION(DLEVEL_STABLE);
 
@@ -77,8 +77,8 @@
        ewl_object_set_alignment(EWL_OBJECT(menu->popup),
                                 EWL_ALIGNMENT_LEFT | EWL_ALIGNMENT_TOP);
 
-       win = ewl_window_find_window_by_widget(w);
-       ewl_container_append_child(EWL_CONTAINER(win), menu->popup); 
+       emb = ewl_embed_find_by_widget(w);
+       ewl_container_append_child(EWL_CONTAINER(emb), menu->popup); 
 
        /*
         * Position the popup menu relative to the menu.
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/ewl_menu.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -3 -r1.7 -r1.8
--- ewl_menu.c  4 Jun 2003 01:46:44 -0000       1.7
+++ ewl_menu.c  13 Jul 2003 05:52:49 -0000      1.8
@@ -74,12 +74,12 @@
 
 void __expand_menu(Ewl_Widget * w, void *ev_data, void *user_data)
 {
-       int             x, y;
+       int             x = 0, y = 0;
        Ewl_Menu       *menu;
-       Ewl_Window     *pwin;
+       Ewl_Embed      *emb;
 
        menu = EWL_MENU(w);
-       pwin = ewl_window_find_window_by_widget(w);
+       emb = ewl_embed_find_by_widget(w);
 
        /*
         * Create the popup menu portion of the menu. Do this prior to
@@ -91,7 +91,10 @@
        ewl_object_set_fill_policy(EWL_OBJECT(menu->popup),
                                   EWL_FILL_POLICY_NONE);
 
-       ewl_window_get_position(pwin, &x, &y);
+       /* FIXME: We will need a real function for doing this from the embed
+        * perspective.
+       ewl_window_get_position(emb, &x, &y);
+       */
 
        /*
         * Position the popup menu relative to the menu.
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/ewl_misc.c,v
retrieving revision 1.31
retrieving revision 1.32
diff -u -3 -r1.31 -r1.32
--- ewl_misc.c  28 Jun 2003 06:50:32 -0000      1.31
+++ ewl_misc.c  13 Jul 2003 05:52:49 -0000      1.32
@@ -4,7 +4,7 @@
 int             ewl_idle_render(void *data);
 
 char           *xdisplay = NULL;
-extern Ewd_List *ewl_window_list;
+extern Ewd_List *ewl_embed_list;
 static Ewd_List *configure_list = NULL;
 
 void            __ewl_init_parse_options(int argc, char **argv);
@@ -42,6 +42,7 @@
        __ewl_init_parse_options(argc, argv);
 
        ecore_init();
+       edje_init();
        if (!ecore_x_init(xdisplay)) {
                fprintf(stderr, "ERRR: Cannot connect to X display!\n");
                exit(-1);
@@ -71,7 +72,7 @@
                exit(-1);
        }
 
-       ewl_window_list = ewd_list_new();
+       ewl_embed_list = ewd_list_new();
        ecore_idle_enterer_add(ewl_idle_render, NULL);
 
        DLEAVE_FUNCTION(DLEVEL_STABLE);
@@ -109,16 +110,16 @@
 int ewl_idle_render(void *data)
 {
        Ewl_Widget     *w;
-       Ewl_Window     *win;
+       Ewl_Embed      *emb;
 
        DENTER_FUNCTION(DLEVEL_STABLE);
 
-       if (!ewl_window_list) {
+       if (!ewl_embed_list) {
                DERROR("EWL has not been initialized. Exiting....\n");
                exit(-1);
        }
 
-       if (ewd_list_is_empty(ewl_window_list))
+       if (ewd_list_is_empty(ewl_embed_list))
                DRETURN_INT(TRUE, DLEVEL_STABLE);
 
        /*
@@ -134,23 +135,23 @@
        }
 
        /*
-        * Rerender each window and realize them as necessary. Done after
-        * configuration to avoid multiple passes of the window list when no
-        * new windows have been created.
+        * Rerender each embed and realize them as necessary. Done after
+        * configuration to avoid multiple passes of the embed list when no
+        * new embeds have been created.
         */
-       ewd_list_goto_first(ewl_window_list);
-       while ((win = EWL_WINDOW(ewd_list_next(ewl_window_list))) != NULL) {
+       ewd_list_goto_first(ewl_embed_list);
+       while ((emb = ewd_list_next(ewl_embed_list)) != NULL) {
                /*
-                * If we have any unrealized windows at this point, we want to
+                * If we have any unrealized embeds at this point, we want to
                 * realize and configure them to layout the children correct.
                 */
-               if (VISIBLE(win) && !REALIZED(win)) {
-                       ewl_widget_realize(EWL_WIDGET(win));
-                       ewl_widget_configure(EWL_WIDGET(win));
+               if (VISIBLE(emb) && !REALIZED(emb)) {
+                       ewl_widget_realize(EWL_WIDGET(emb));
+                       ewl_widget_configure(EWL_WIDGET(emb));
                }
 
-               if (win->evas)
-                       evas_render(win->evas);
+               if (emb->evas)
+                       evas_render(emb->evas);
        }
 
        DRETURN_INT(TRUE, DLEVEL_STABLE);
@@ -258,13 +259,13 @@
 void ewl_configure_request(Ewl_Widget * w)
 {
        static int longest = 0;
-       Ewl_Window     *win;
+       Ewl_Embed      *emb;
        Ewl_Widget     *search;
 
        DENTER_FUNCTION(DLEVEL_TESTING);
        DCHECK_PARAM_PTR("w", w);
 
-       win = ewl_window_find_window_by_widget(w);
+       emb = ewl_embed_find_by_widget(w);
 
        /*
         * We don't need to configure if it's outside the viewable space in
@@ -281,10 +282,10 @@
                                x > (int)(CURRENT_X(p) + CURRENT_W(p)) ||
                                (int)(y + height) < CURRENT_Y(p) ||
                                y > (int)(CURRENT_Y(p) + CURRENT_H(p)) ||
-                               (int)(x + width) < CURRENT_X(win) ||
-                               x > (int)(CURRENT_X(win) + CURRENT_W(win)) ||
-                               (int)(y + height) < CURRENT_Y(win) ||
-                               y > (int)(CURRENT_Y(win) + CURRENT_H(win))) {
+                               (int)(x + width) < CURRENT_X(emb) ||
+                               x > (int)(CURRENT_X(emb) + CURRENT_W(emb)) ||
+                               (int)(y + height) < CURRENT_Y(emb) ||
+                               y > (int)(CURRENT_Y(emb) + CURRENT_H(emb))) {
                        w->flags |= EWL_FLAGS_OBSCURED;
                        if (w->fx_clip_box)
                                evas_object_hide(w->fx_clip_box);
@@ -323,11 +324,11 @@
                DRETURN(DLEVEL_TESTING);
 
        /*
-        * Need to check if the window that holds w is scheduled for
+        * Need to check if the embed that holds w is scheduled for
         * configuration. This is the easiest way to test if we can avoid
         * adding this widget to the configuration list.
         */
-       if (EWL_WIDGET(win)->flags & EWL_FLAGS_CSCHEDULED)
+       if (EWL_WIDGET(emb)->flags & EWL_FLAGS_CSCHEDULED)
                DRETURN(DLEVEL_TESTING);
 
        /*
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/ewl_selectionbar.c,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -3 -r1.9 -r1.10
--- ewl_selectionbar.c  28 Jun 2003 06:50:32 -0000      1.9
+++ ewl_selectionbar.c  13 Jul 2003 05:52:49 -0000      1.10
@@ -62,7 +62,7 @@
 void ewl_selectionbar_init(Ewl_Selectionbar * s, Ewl_Widget * parent)
 {
        Ewl_Widget     *w;
-       Ewl_Window     *window;
+       Ewl_Embed      *embed;
 
 
        DENTER_FUNCTION(DLEVEL_STABLE);
@@ -94,8 +94,8 @@
                            __focus_in, w);
 
 
-       window = ewl_window_find_window_by_widget(parent);
-       ewl_callback_append(EWL_WIDGET(window), EWL_CALLBACK_CONFIGURE,
+       embed = ewl_embed_find_by_widget(parent);
+       ewl_callback_append(EWL_WIDGET(embed), EWL_CALLBACK_CONFIGURE,
                            __ewl_selectionbar_parent_configure, w);
 
 
@@ -306,7 +306,7 @@
        Ewl_Selectionbar *s;
        Ewd_List       *children;
        Ewl_Widget     *child;
-       Ewl_Window     *window;
+       Ewl_Embed      *embed;
        Ewl_Object     *o;
 
        int             mx, my;
@@ -324,12 +324,12 @@
         * First check that the mouse left the selectionbar and that
         * focus didn't just go to one of it's children
         */
-       window = ewl_window_find_window_by_widget(w);
+       embed = ewl_embed_find_by_widget(w);
 
        /*
         * FIXME: This is not in ecore yet.
         */
-       /* ecore_pointer_xy(window->evas_window, &mx, &my); */
+       /* ecore_pointer_xy(embed->evas_window, &mx, &my); */
        mx = 0;
        my = 0;
 
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/ewl_text.c,v
retrieving revision 1.47
retrieving revision 1.48
diff -u -3 -r1.47 -r1.48
--- ewl_text.c  22 Apr 2003 20:05:22 -0000      1.47
+++ ewl_text.c  13 Jul 2003 05:52:49 -0000      1.48
@@ -538,14 +538,14 @@
 __ewl_text_realize(Ewl_Widget * w, void *ev_data, void *user_data)
 {
        Ewl_Text       *t;
-       Ewl_Window     *win;
+       Ewl_Embed      *emb;
 
        DENTER_FUNCTION(DLEVEL_STABLE);
        DCHECK_PARAM_PTR("w", w);
 
        t = EWL_TEXT(w);
-       win = ewl_window_find_window_by_widget(w);
-       t->estyle = estyle_new(win->evas, t->text, t->style);
+       emb = ewl_embed_find_by_widget(w);
+       t->estyle = estyle_new(emb->evas, t->text, t->style);
 
        DLEAVE_FUNCTION(DLEVEL_STABLE);
 }
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/ewl_textarea.c,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -3 -r1.10 -r1.11
--- ewl_textarea.c      14 Apr 2003 22:08:06 -0000      1.10
+++ ewl_textarea.c      13 Jul 2003 05:52:49 -0000      1.11
@@ -157,7 +157,7 @@
 {
        int             r, g, b, a;
        char           *style;
-       Ewl_Window     *win;
+       Ewl_Embed      *emb;
        Ewl_TextArea   *ta;
 
        DENTER_FUNCTION(DLEVEL_STABLE);
@@ -166,14 +166,14 @@
        ta = EWL_TEXTAREA(w);
 
        /*
-        * Find the window so we know which evas to draw onto.
+        * Find the embed so we know which evas to draw onto.
         */
-       win = ewl_window_find_window_by_widget(w);
+       emb = ewl_embed_find_by_widget(w);
 
        /*
         * Create the etox
         */
-       ta->etox = etox_new(win->evas);
+       ta->etox = etox_new(emb->evas);
 
        /*
         * If the user setup their own context, use that.
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/ewl_theme.c,v
retrieving revision 1.43
retrieving revision 1.44
diff -u -3 -r1.43 -r1.44
--- ewl_theme.c 3 Jun 2003 04:00:50 -0000       1.43
+++ ewl_theme.c 13 Jul 2003 05:52:49 -0000      1.44
@@ -194,7 +194,7 @@
 
        temp = strdup(path);
        ewd_list_append(font_paths, temp);
-       ewl_window_font_path_add(temp);
+       ewl_embed_font_path_add(temp);
 
        DLEAVE_FUNCTION(DLEVEL_STABLE);
 }
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/ewl_widget.c,v
retrieving revision 1.59
retrieving revision 1.60
diff -u -3 -r1.59 -r1.60
--- ewl_widget.c        30 Jun 2003 05:58:59 -0000      1.59
+++ ewl_widget.c        13 Jul 2003 05:52:49 -0000      1.60
@@ -40,7 +40,7 @@
                                     void *user_data);
  */
 
-static inline void __ewl_widget_ebits_destroy(Ewl_Widget *w);
+static inline void __ewl_widget_theme_destroy(Ewl_Widget *w);
 static inline void __ewl_widget_cleanup_fx_clip(Ewl_Widget *w);
 
 /**
@@ -433,8 +433,8 @@
        IF_FREE(w->bit_state);
        w->bit_state = strdup(state);
 
-       if (w->ebits_object)
-               ebits_set_named_bit_state(w->ebits_object, "Base", state);
+       if (w->theme_object)
+               edje_object_signal_emit(w->theme_object, state, "EWL");
 
        DRETURN(DLEVEL_STABLE);
 }
@@ -533,16 +533,16 @@
  */
 void __ewl_widget_destroy(Ewl_Widget * w, void *ev_data, void *data)
 {
-       Ewl_Window     *win;
+       Ewl_Embed      *emb;
        Ewd_List       *destroy_cbs;
 
        DENTER_FUNCTION(DLEVEL_STABLE);
        DCHECK_PARAM_PTR("w", w);
 
        /*
-        * First find it's parent window so we can destroy the evas objects.
+        * First find it's parent embed so we can destroy the evas objects.
         */
-       win = ewl_window_find_window_by_widget(w);
+       emb = ewl_embed_find_by_widget(w);
 
        /*
         * First remove the parents reference to this widget to avoid bad
@@ -551,7 +551,7 @@
        if (w->parent)
                ewl_container_remove_child(EWL_CONTAINER(w->parent), w);
 
-       __ewl_widget_ebits_destroy(w);
+       __ewl_widget_theme_destroy(w);
        __ewl_widget_cleanup_fx_clip(w);
 
        /*
@@ -608,20 +608,19 @@
  */
 void __ewl_widget_realize(Ewl_Widget * w, void *ev_data, void *user_data)
 {
-       Ewl_Window     *win;
+       Ewl_Embed      *emb;
        Ewl_Container  *pc;
 
        DENTER_FUNCTION(DLEVEL_STABLE);
        DCHECK_PARAM_PTR("w", w);
 
-       win = ewl_window_find_window_by_widget(w);
+       emb = ewl_embed_find_by_widget(w);
 
        /*
         * Create the fx clip box where special fx can be drawn to affect the
         * entire contents of the widget
         */
-       w->fx_clip_box = evas_object_rectangle_add(win->evas);
-       evas_object_layer_set(w->fx_clip_box, LAYER(w));
+       w->fx_clip_box = evas_object_rectangle_add(emb->evas);
 
        pc = EWL_CONTAINER(w->parent);
 
@@ -633,6 +632,8 @@
 
        ewl_widget_theme_update(w);
 
+       evas_object_layer_set(w->fx_clip_box, LAYER(w));
+
        DLEAVE_FUNCTION(DLEVEL_STABLE);
 }
 
@@ -641,13 +642,13 @@
  */
 void __ewl_widget_unrealize(Ewl_Widget * w, void *ev_data, void *user_data)
 {
-       Ewl_Window     *win;
+       Ewl_Embed      *emb;
        Ewl_Container  *pc;
 
        DENTER_FUNCTION(DLEVEL_STABLE);
        DCHECK_PARAM_PTR("w", w);
 
-       win = ewl_window_find_window_by_widget(w);
+       emb = ewl_embed_find_by_widget(w);
 
        pc = EWL_CONTAINER(w->parent);
 
@@ -674,12 +675,12 @@
  */
 void __ewl_widget_configure(Ewl_Widget * w, void *ev_data, void *user_data)
 {
-       Ewl_Window     *win;
+       Ewl_Embed      *emb;
 
        DENTER_FUNCTION(DLEVEL_STABLE);
        DCHECK_PARAM_PTR("w", w);
 
-       win = ewl_window_find_window_by_widget(w);
+       emb = ewl_embed_find_by_widget(w);
 
        /*
         * Adjust the clip box to display the widget.
@@ -694,13 +695,13 @@
        }
 
        /*
-        * Move the base ebits object to the correct size and position
+        * Move the base theme object to the correct size and position
         */
-       if (w->ebits_object) {
-               ebits_move(w->ebits_object,
+       if (w->theme_object) {
+               evas_object_move(w->theme_object,
                                CURRENT_X(w) - INSET_LEFT(w),
                                CURRENT_Y(w) - INSET_TOP(w));
-               ebits_resize(w->ebits_object,
+               evas_object_resize(w->theme_object,
                                CURRENT_W(w) + INSET_LEFT(w) + INSET_RIGHT(w),
                                CURRENT_H(w) + INSET_TOP(w) + INSET_BOTTOM(w));
        }
@@ -719,15 +720,16 @@
        int             p_l = 0, p_r = 0, p_t = 0, p_b = 0;
        char           *i = NULL;
        char           *key = NULL;
-       char           *visible;
-       Ewl_Window     *win = NULL;
+       Ewl_Embed      *emb = NULL;
 
        DENTER_FUNCTION(DLEVEL_STABLE);
        DCHECK_PARAM_PTR("w", w);
 
-       if (w->ebits_object) {
-               ebits_get_insets(w->ebits_object, &i_l, &i_r, &i_t, &i_b);
-               ebits_get_padding(w->ebits_object, &p_l, &p_r, &p_t, &p_b);
+       if (w->theme_object) {
+               /* FIXME: No edje equivalent yet.
+               ebits_get_insets(w->theme_object, &i_l, &i_r, &i_t, &i_b);
+               ebits_get_padding(w->theme_object, &p_l, &p_r, &p_t, &p_b);
+               */
        }
 
        ewl_object_get_insets(EWL_OBJECT(w), &l, &r, &t, &b);
@@ -744,28 +746,17 @@
        p_t = t - p_t;
        p_b = b - p_b;
 
-       __ewl_widget_ebits_destroy(w);
+       __ewl_widget_theme_destroy(w);
 
        /*
         * Calculate the length of the base key string, then allocate
         * the memory for it plus room for placing /visible at the end.
         */
-       len = strlen(w->appearance) + 14;
+       len = strlen(w->appearance) + 6;
        key = NEW(char, len);
-       snprintf(key, len, "%s/base/visible", w->appearance);
-
-       /*
-        * Determine the widgets visibility, return if not visible
-        */
-       visible = ewl_theme_data_get_str(w, key);
-
-       if (!visible || !strncasecmp(visible, "no", 2)) {
-               FREE(key);
-               DRETURN(DLEVEL_STABLE);
-       }
 
        /*
-        * Retrieve the path to the ebits file that will be loaded
+        * Retrieve the path to the theme file that will be loaded
         * return if no file to be loaded.
         */
        snprintf(key, len, "%s/base", w->appearance);
@@ -774,59 +765,75 @@
        FREE(key);
 
        if (i) {
-               win = ewl_window_find_window_by_widget(w);
-               if (!win)
+               emb = ewl_embed_find_by_widget(w);
+               if (!emb)
                        DRETURN(DLEVEL_STABLE);
 
                /*
-                * Load the ebits object
+                * Load the theme object
                 */
-               w->ebits_object = ebits_load(i);
+               w->theme_object = edje_object_add(emb->evas);
+               edje_object_file_set(w->theme_object, i, "EWL");
                FREE(i);
        }
 
        /*
-        * Set up the ebits object on the widgets evas
+        * Set up the theme object on the widgets evas
         */
-       if (w->ebits_object) {
+       if (w->theme_object) {
 
-               ebits_add_to_evas(w->ebits_object, win->evas);
-               ebits_set_layer(w->ebits_object, LAYER(w));
+               evas_object_layer_set(w->theme_object, LAYER(w));
                if (w->fx_clip_box)
-                       ebits_set_clip(w->ebits_object, w->fx_clip_box);
-               ebits_show(w->ebits_object);
+                       evas_object_clip_set(w->theme_object, w->fx_clip_box);
+               evas_object_show(w->theme_object);
 
                /*
                 * Set the insets based on cached information from the
                 * ebit, this can be overwritten later.
                 */
-               ebits_get_insets(w->ebits_object, &l, &r, &t, &b);
+               /* FIXME: More edje growing pains
+               ebits_get_insets(w->theme_object, &l, &r, &t, &b);
+               */
                ewl_object_set_insets(EWL_OBJECT(w), l + i_l, r + i_r, t + i_t,
                                b + i_b);
 
-               ebits_get_padding(w->ebits_object, &l, &r, &t, &b);
+               /*
+                * FIXME: More edje growing pains
+               ebits_get_padding(w->theme_object, &l, &r, &t, &b);
+               */
                ewl_object_set_padding(EWL_OBJECT(w), l + p_l, r + p_r, t + p_t,
                                b + p_b);
 
                if (w->state & EWL_STATE_DISABLED)
-                       ebits_set_named_bit_state(w->ebits_object, "Base",
-                                       "disabled");
+                       edje_object_signal_emit(w->theme_object, "disabled", "EWL");
 
                /*
                 * Propagate minimum sizes from the bit theme to the widget.
                 */
-               ebits_get_min_size(w->ebits_object, &i_l, &i_t);
+               /*
+                * FIXME: More edje growing pains
+               ebits_get_min_size(w->theme_object, &i_l, &i_t);
+               */
+
+               if (i_l && MINIMUM_W(w) == EWL_OBJECT_MIN_SIZE)
+                       ewl_object_set_minimum_w(EWL_OBJECT(w), i_l);
 
-               ewl_object_set_minimum_w(EWL_OBJECT(w), i_l);
-               ewl_object_set_minimum_h(EWL_OBJECT(w), i_t);
+               if (i_t && MINIMUM_H(w) == EWL_OBJECT_MIN_SIZE)
+                       ewl_object_set_minimum_h(EWL_OBJECT(w), i_t);
 
                /*
                 * Propagate maximum sizes from the bit theme to the widget.
                 */
-               ebits_get_max_size(w->ebits_object, &i_l, &i_t);
+               /*
+                * FIXME: More edje growing pains
+               ebits_get_max_size(w->theme_object, &i_l, &i_t);
+               */
+
+               if (i_l && MAXIMUM_W(w) == EWL_OBJECT_MAX_SIZE)
+                       ewl_object_set_maximum_w(EWL_OBJECT(w), i_l);
 
-               ewl_object_set_maximum_w(EWL_OBJECT(w), i_l);
-               ewl_object_set_maximum_h(EWL_OBJECT(w), i_t);
+               if (i_t && MAXIMUM_H(w) == EWL_OBJECT_MAX_SIZE)
+                       ewl_object_set_maximum_h(EWL_OBJECT(w), i_t);
        }
 
        DRETURN(DLEVEL_STABLE);
@@ -839,7 +846,7 @@
 {
        Evas           *oevas;
        Ewl_Container  *pc;
-       Ewl_Window     *win;
+       Ewl_Embed      *emb;
 
        DENTER_FUNCTION(DLEVEL_STABLE);
        DCHECK_PARAM_PTR("w", w);
@@ -858,8 +865,8 @@
         */
        if (REALIZED(w) && w->fx_clip_box) {
                oevas = evas_object_evas_get(w->fx_clip_box);
-               win = ewl_window_find_window_by_widget(w);
-               if (oevas != win->evas)
+               emb = ewl_embed_find_by_widget(w);
+               if (oevas != emb->evas)
                        ewl_widget_unrealize(w);
        }
        else {
@@ -940,29 +947,18 @@
                ewl_widget_update_appearance(w, "normal");
 }
 
-/*
- * FIXME: When edje thems are phased in, we must pass events on
-static void
-__ewl_widget_mouse_move(Ewl_Widget *w, void *ev_data, void *user_data)
-{
-       if (w->state & EWL_STATE_DISABLED)
-               DRETURN(DLEVEL_STABLE);
-
-}
- */
-
-static inline void __ewl_widget_ebits_destroy(Ewl_Widget *w)
+static inline void __ewl_widget_theme_destroy(Ewl_Widget *w)
 {
        DENTER_FUNCTION(DLEVEL_STABLE);
 
        /*
         * Destroy old image (if any) 
         */
-       if (w->ebits_object) {
-               ebits_hide(w->ebits_object);
-               ebits_unset_clip(w->ebits_object);
-               ebits_free(w->ebits_object);
-               w->ebits_object = NULL;
+       if (w->theme_object) {
+               evas_object_hide(w->theme_object);
+               evas_object_clip_unset(w->theme_object);
+               evas_object_del(w->theme_object);
+               w->theme_object = NULL;
        }
 
        DLEAVE_FUNCTION(DLEVEL_STABLE);
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/ewl_widget.h,v
retrieving revision 1.27
retrieving revision 1.28
diff -u -3 -r1.27 -r1.28
--- ewl_widget.h        7 Apr 2003 18:02:28 -0000       1.27
+++ ewl_widget.h        13 Jul 2003 05:52:49 -0000      1.28
@@ -21,7 +21,7 @@
 
        Evas_Object    *fx_clip_box;
 
-       Ebits_Object   *ebits_object;
+       Evas_Object    *theme_object;
        char           *bit_state;
        char           *appearance;
        int             layer;
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/ewl_window.c,v
retrieving revision 1.49
retrieving revision 1.50
diff -u -3 -r1.49 -r1.50
--- ewl_window.c        28 Jun 2003 06:50:32 -0000      1.49
+++ ewl_window.c        13 Jul 2003 05:52:49 -0000      1.50
@@ -1,7 +1,7 @@
 
 #include <Ewl.h>
 
-Ewd_List       *ewl_window_list = NULL;
+extern Ewd_List *ewl_embed_list;
 
 void            __ewl_window_realize(Ewl_Widget * w, void *ev_data,
                                     void *user_data);
@@ -57,9 +57,9 @@
        DENTER_FUNCTION(DLEVEL_STABLE);
        DCHECK_PARAM_PTR_RET("window", window, NULL);
 
-       ewd_list_goto_first(ewl_window_list);
+       ewd_list_goto_first(ewl_embed_list);
 
-       while ((retwin = ewd_list_next(ewl_window_list)))
+       while ((retwin = ewd_list_next(ewl_embed_list)))
                if (retwin->window == window)
                        DRETURN_PTR(retwin, DLEVEL_STABLE);
 
@@ -67,69 +67,6 @@
 }
 
 /**
- * ewl_window_font_path_add - add a font path to all windows after realized
- * @path: the font path to add to the windows
- *
- * Returns no value. Adds the search path @path to the evases created in the
- * windows. Using ewl_theme_font_path_add is preferred.
- */
-void ewl_window_font_path_add(char *path)
-{
-       Ewl_Window *win;
-
-       DENTER_FUNCTION(DLEVEL_STABLE);
-
-       DCHECK_PARAM_PTR("path", path);
-
-       ewd_list_goto_first(ewl_window_list);
-       while ((win = ewd_list_next(ewl_window_list)))
-               if (REALIZED(win))
-                       evas_font_path_append(win->evas, path);
-
-       DLEAVE_FUNCTION(DLEVEL_STABLE);
-}
-
-/**
- * ewl_window_find_window_by_evas_window - find an ewl window by its evas window
- * @window: the evas window to search for on the list of windows
- *
- * Returns the found window on success, NULL on failure to find the window.
- */
-Ewl_Window     *ewl_window_find_window_by_evas_window(Window window)
-{
-       Ewl_Window     *retwin;
-
-       DENTER_FUNCTION(DLEVEL_STABLE);
-       DCHECK_PARAM_PTR_RET("window", window, NULL);
-
-       ewd_list_goto_first(ewl_window_list);
-
-       while ((retwin = ewd_list_next(ewl_window_list)) != NULL) {
-               if (retwin->evas_window == window)
-                       return retwin;
-       }
-
-       DRETURN_PTR(NULL, DLEVEL_STABLE);
-}
-
-/**
- * ewl_window_find_window_by_widget - find an ewl window by a widget inside
- * @w: the widget to search for its window
- *
- * Returns the found window on success, NULL on failure to find the window.
- */
-Ewl_Window     *ewl_window_find_window_by_widget(Ewl_Widget * w)
-{
-       DENTER_FUNCTION(DLEVEL_STABLE);
-       DCHECK_PARAM_PTR_RET("w", w, NULL);
-
-       while (w->parent)
-               w = w->parent;
-
-       DRETURN_PTR(EWL_WINDOW(w), DLEVEL_STABLE);
-}
-
-/**
  * ewl_window_set_title - set the title of the specified window
  * @win: the window to change the title
  * @title: the title to set for the window
@@ -232,31 +169,6 @@
 }
 
 /**
- * ewl_window_get_child_at - find the child at given coordinates
- * @win: the window to search for a child
- * @x: the x coordinate to look for an intersecting child
- * @y: the y coordinate to look for an intersecting child
- *
- * Returns the child found at the given coordinates @x, @y in the window @win.
- */
-Ewl_Widget     *ewl_window_get_child_at(Ewl_Window * win, int x, int y)
-{
-       Ewl_Widget     *widget = NULL;
-
-       DENTER_FUNCTION(DLEVEL_STABLE);
-
-       DCHECK_PARAM_PTR_RET("win", win, NULL);
-
-       /*
-        * Do a recursive search in the window for a child at the given
-        * coordinates.
-        */
-       widget = ewl_container_get_child_at_recursive(EWL_CONTAINER(win), x, y);
-
-       DRETURN_PTR(widget, DLEVEL_STABLE);
-}
-
-/**
  * ewl_window_init - initialize a window to default values and callbacks
  * @w: the window to be initialized to default values and callbacks
  *
@@ -271,9 +183,8 @@
        /*
         * Initialize the fields of the inherited container class
         */
-       ewl_container_init(EWL_CONTAINER(w), "window",
-                          __ewl_window_child_add, __ewl_window_child_resize,
-                          NULL);
+       ewl_embed_init(EWL_EMBED(w));
+       ewl_widget_set_appearance(EWL_WIDGET(w), "window");
 
        w->title = strdup("EWL!");
 
@@ -296,14 +207,13 @@
 
        LAYER(w) = -1000;
 
-       ewd_list_append(ewl_window_list, w);
-
        DRETURN_INT(TRUE, DLEVEL_STABLE);
 }
 
 void __ewl_window_realize(Ewl_Widget * w, void *ev_data, void *user_data)
 {
        Ewl_Object     *o;
+       Ewl_Embed      *embed;
        Ewl_Window     *window;
        char           *font_path;
        Ewd_List       *paths;
@@ -311,6 +221,7 @@
        DENTER_FUNCTION(DLEVEL_STABLE);
        DCHECK_PARAM_PTR("w", w);
 
+       embed = EWL_EMBED(w);
        window = EWL_WINDOW(w);
        o = EWL_OBJECT(w);
 
@@ -329,12 +240,12 @@
        ecore_x_window_prop_title_set(window->window, window->title);
        ecore_x_window_prop_delete_request_set(window->window, 1);
 
-       window->evas = evas_new();
-       evas_output_method_set(window->evas,
+       embed->evas = evas_new();
+       evas_output_method_set(embed->evas,
                        evas_render_method_lookup("software_x11"));
-       evas_output_size_set(window->evas, ewl_object_get_current_w(o),
+       evas_output_size_set(embed->evas, ewl_object_get_current_w(o),
                        ewl_object_get_current_h(o));
-       evas_output_viewport_set(window->evas, ewl_object_get_current_x(o),
+       evas_output_viewport_set(embed->evas, ewl_object_get_current_x(o),
                        ewl_object_get_current_y(o),
                        ewl_object_get_current_w(o),
                        ewl_object_get_current_h(o));
@@ -343,7 +254,7 @@
                Evas_Engine_Info_Software_X11 *info;
 
                info = (Evas_Engine_Info_Software_X11 *)
-                       evas_engine_info_get(window->evas);
+                       evas_engine_info_get(embed->evas);
 
                info->info.display = ecore_x_display_get();
                info->info.visual = DefaultVisual(info->info.display,
@@ -355,15 +266,15 @@
                                DefaultScreen(info->info.display));
                info->info.rotation = 0;
                info->info.debug = 0;
-               evas_engine_info_set(window->evas, (Evas_Engine_Info *)info);
+               evas_engine_info_set(embed->evas, (Evas_Engine_Info *)info);
        }
 
        paths = ewl_theme_font_path_get();
        ewd_list_goto_first(paths);
        while ((font_path = ewd_list_next(paths)))
-               evas_font_path_append(window->evas, font_path);
+               evas_font_path_append(embed->evas, font_path);
 
-       window->evas_window = window->window;
+       embed->evas_window = window->window;
 
        if (window->flags & EWL_WINDOW_BORDERLESS)
                ecore_x_window_prop_borderless_set(window->window, 1);
@@ -374,18 +285,18 @@
 void __ewl_window_unrealize(Ewl_Widget * w, void *ev_data, void *user_data)
 {
        Ewl_Object     *o;
-       Ewl_Window     *window;
+       Ewl_Embed      *embed;
 
        DENTER_FUNCTION(DLEVEL_STABLE);
        DCHECK_PARAM_PTR("w", w);
 
-       window = EWL_WINDOW(w);
+       embed = EWL_EMBED(w);
        o = EWL_OBJECT(w);
 
-       evas_free(window->evas);
-       window->evas = NULL;
+       evas_free(embed->evas);
+       embed->evas = NULL;
 
-       ecore_x_window_del(window->window);
+       ecore_x_window_del(EWL_WINDOW(embed)->window);
 
        DLEAVE_FUNCTION(DLEVEL_STABLE);
 }
@@ -402,7 +313,7 @@
                ecore_x_window_prop_borderless_set(EWL_WINDOW(w)->window, 1);
 
        ecore_x_window_show(EWL_WINDOW(w)->window);
-       ecore_x_window_show(EWL_WINDOW(w)->evas_window);
+       ecore_x_window_show(EWL_EMBED(w)->evas_window);
 
        DLEAVE_FUNCTION(DLEVEL_STABLE);
 }
@@ -412,7 +323,7 @@
        DENTER_FUNCTION(DLEVEL_STABLE);
        DCHECK_PARAM_PTR("widget", widget);
 
-       ecore_x_window_hide(EWL_WINDOW(widget)->evas_window);
+       ecore_x_window_hide(EWL_EMBED(widget)->evas_window);
        ecore_x_window_hide(EWL_WINDOW(widget)->window);
 
        DLEAVE_FUNCTION(DLEVEL_STABLE);
@@ -429,24 +340,20 @@
 
        IF_FREE(win->title);
 
-       ecore_x_window_hide(win->evas_window);
+       ecore_x_window_hide(EWL_EMBED(win)->evas_window);
        ecore_x_window_hide(win->window);
 
-       ecore_x_window_del(win->evas_window);
+       ecore_x_window_del(EWL_EMBED(win)->evas_window);
        ecore_x_window_del(win->window);
 
        IF_FREE(win->title);
 
-       if (ewd_list_goto(ewl_window_list, w))
-               ewd_list_remove(ewl_window_list);
-
        DLEAVE_FUNCTION(DLEVEL_STABLE);
 }
 
 void __ewl_window_configure(Ewl_Widget * w, void *ev_data, void *user_data)
 {
        Ewl_Window     *win;
-       Ewl_Object     *child;
        unsigned int    width, height;
 
        DENTER_FUNCTION(DLEVEL_STABLE);
@@ -478,100 +385,12 @@
         * well.
         */
        ecore_x_window_resize(win->window, width, height);
-       ecore_x_window_resize(win->evas_window, width, height);
-       evas_output_size_set(win->evas, width, height);
-       evas_output_viewport_set(win->evas,
+       ecore_x_window_resize(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,
                        ewl_object_get_current_x(EWL_OBJECT(w)),
                        ewl_object_get_current_y(EWL_OBJECT(w)),
                        width, height);
-
-       /*
-        * Configure each of the child widgets.
-        */
-       ewd_list_goto_first(EWL_CONTAINER(w)->children);
-       while ((child = ewd_list_next(EWL_CONTAINER(w)->children))) {
-               /*
-                * Try to give the child the full size of the window from it's
-                * base position. The object will constrict it based on the
-                * fill policy. Don't add the TOP and LEFT insets since
-                * they've already been accounted for.
-                */
-               ewl_object_request_size(child,
-                                       CURRENT_W(w) -
-                                       ewl_object_get_current_x(child),
-                                       CURRENT_H(w) -
-                                       ewl_object_get_current_y(child));
-       }
-
-       DLEAVE_FUNCTION(DLEVEL_STABLE);
-}
-
-void __ewl_window_child_add(Ewl_Container * win, Ewl_Widget * child)
-{
-       int size;
-
-       LAYER(child) += 100;
-
-       size = ewl_object_get_current_x(EWL_OBJECT(child)) +
-               ewl_object_get_current_w(EWL_OBJECT(child)) - CURRENT_X(win);
-       if (size > PREFERRED_W(win))
-               ewl_object_set_preferred_w(EWL_OBJECT(win), size);
-
-       size = ewl_object_get_current_y(EWL_OBJECT(child)) +
-               ewl_object_get_current_h(EWL_OBJECT(child)) - CURRENT_Y(win);
-       if (size > PREFERRED_H(win))
-               ewl_object_set_preferred_h(EWL_OBJECT(win), size);
-}
-
-void __ewl_window_child_resize(Ewl_Container *c, Ewl_Widget *w,
-               int size, Ewl_Orientation o)
-{
-       int            maxw = 0, maxh = 0;
-       Ewl_Window    *win;
-       Ewl_Object    *child;
-
-       DENTER_FUNCTION(DLEVEL_STABLE);
-
-       child = EWL_OBJECT(w);
-       win = EWL_WINDOW(c);
-
-       ewd_list_goto_first(EWL_CONTAINER(win)->children);
-       while ((child = ewd_list_next(EWL_CONTAINER(win)->children))) {
-               int             cs;
-
-               /*
-                * Adjust children for insets
-                */
-               if (ewl_object_get_current_x(child) < CURRENT_X(win))
-                       ewl_object_request_x(child, CURRENT_X(win));
-               if (ewl_object_get_current_y(child) < CURRENT_Y(win))
-                       ewl_object_request_y(child, CURRENT_Y(win));
-
-               cs = ewl_object_get_current_x(child) +
-                       ewl_object_get_minimum_w(child);
-
-               /*
-                * Check the width and x position vs. window width.
-                */
-               if (maxw < cs)
-                       maxw = cs;
-
-               cs = ewl_object_get_current_y(child) +
-                       ewl_object_get_minimum_h(child);
-
-               /*
-                * Check the height and y position vs. window height.
-                */
-               if (maxh < cs)
-                       maxh = cs;
-
-       }
-
-       ewl_object_set_preferred_size(EWL_OBJECT(win), maxw, maxh);
-
-       ewl_object_request_size(EWL_OBJECT(c),
-                               ewl_object_get_current_w(EWL_OBJECT(c)),
-                               ewl_object_get_current_h(EWL_OBJECT(c)));
 
        DLEAVE_FUNCTION(DLEVEL_STABLE);
 }
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/ewl_window.h,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -3 -r1.19 -r1.20
--- ewl_window.h        28 Jun 2003 06:50:32 -0000      1.19
+++ ewl_window.h        13 Jul 2003 05:52:49 -0000      1.20
@@ -10,18 +10,10 @@
 
 struct _ewl_window
 {
-       Ewl_Container   widget;
+       Ewl_Embed       embed;
 
        Window          window;
 
-       /*
-        * The following fields allow for drawing the widgets
-        */
-       Evas           *evas;
-       Window          evas_window;
-
-       Ebits_Object   *ebits_object;
-
        char           *title;
 
        /*
@@ -36,15 +28,11 @@
 
 Ewl_Widget     *ewl_window_new();
 int             ewl_window_init(Ewl_Window * win);
-void            ewl_window_font_path_add(char *path);
 Ewl_Window     *ewl_window_find_window(Window window);
-Ewl_Window     *ewl_window_find_window_by_evas_window(Window window);
-Ewl_Window     *ewl_window_find_window_by_widget(Ewl_Widget * w);
 void            ewl_window_set_title(Ewl_Window * win, char *title);
 char           *ewl_window_get_title(Ewl_Window * win);
 void            ewl_window_set_borderless(Ewl_Window * win);
 void            ewl_window_move(Ewl_Window * win, int x, int y);
 void            ewl_window_get_position(Ewl_Window * win, int *x, int *y);
-Ewl_Widget     *ewl_window_get_child_at(Ewl_Window * win, int x, int y);
 
 #endif                         /* __EWL_WINDOW_H__ */




-------------------------------------------------------
This SF.Net email sponsored by: Parasoft
Error proof Web apps, automate testing & more.
Download & eval WebKing and get a free book.
www.parasoft.com/bulletproofapps1
_______________________________________________
enlightenment-cvs mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to