Enlightenment CVS committal

Author  : rbdpngn
Project : e17
Module  : libs/ewl

Dir     : e17/libs/ewl/src


Modified Files:
        ewl_misc.c ewl_text.c ewl_text.h ewl_tree.c ewl_widget.c 


Log Message:
Updated theme files, various minor fixes and tweaks. Updated to use latest
estyle api.

===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/ewl_misc.c,v
retrieving revision 1.32
retrieving revision 1.33
diff -u -3 -r1.32 -r1.33
--- ewl_misc.c  13 Jul 2003 05:52:49 -0000      1.32
+++ ewl_misc.c  5 Aug 2003 20:24:06 -0000       1.33
@@ -60,13 +60,6 @@
 
        ewl_callbacks_init();
 
-       /*
-       if (!ewl_fx_init()) {
-               DERROR("Could not init fx data. Exiting....");
-               exit(-1);
-       }
-       */
-
        if (!ewl_theme_init()) {
                DERROR("Could not init theme data. Exiting....");
                exit(-1);
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/ewl_text.c,v
retrieving revision 1.48
retrieving revision 1.49
diff -u -3 -r1.48 -r1.49
--- ewl_text.c  13 Jul 2003 05:52:49 -0000      1.48
+++ ewl_text.c  5 Aug 2003 20:24:06 -0000       1.49
@@ -283,7 +283,7 @@
        w = EWL_WIDGET(t);
 
        if (t->estyle)
-               estyle_set_color(t->estyle, r, g, b, a);
+               evas_object_color_set(t->estyle, r, g, b, a);
 
        t->r = r;
        t->g = g;
@@ -382,6 +382,7 @@
 void
 ewl_text_get_text_geometry(Ewl_Text * t, int *xx, int *yy, int *ww, int *hh)
 {
+       double ex, ey, ew, eh;
        DENTER_FUNCTION(DLEVEL_STABLE);
        DCHECK_PARAM_PTR("t", t);
 
@@ -389,8 +390,13 @@
         * Need to check if the estyle has been created yet, it may won't be if
         * the widget has not yet been realized.
         */
-       if (t->estyle)
-               estyle_geometry(t->estyle, xx, yy, ww, hh);
+       if (t->estyle) {
+               evas_object_geometry_get(t->estyle, &ex, &ey, &ew, &eh);
+               *xx = (int)(ex);
+               *yy = (int)(ey);
+               *ww = (int)(ew);
+               *hh = (int)(eh);
+       }
        else {
                *xx = CURRENT_X(t);
                *yy = CURRENT_Y(t);
@@ -431,6 +437,7 @@
 ewl_text_get_letter_geometry(Ewl_Text * t, int i, int *xx, int *yy,
                             int *ww, int *hh)
 {
+       double ex = 0, ey = 0, ew = 0, eh = 0;
        Ewl_Widget     *w;
 
        DENTER_FUNCTION(DLEVEL_STABLE);
@@ -438,15 +445,19 @@
 
        w = EWL_WIDGET(t);
 
-       if (t->estyle)
-               estyle_text_at(t->estyle, i, xx, yy, ww, hh);
-       else {
-               *xx = 0;
-               *yy = 0;
-               *ww = 0;
-               *hh = 0;
+       if (t->estyle) {
+               estyle_text_at(t->estyle, i, &ex, &ey, &ew, &eh);
        }
 
+       if (xx)
+               *xx = (int)(ex);
+       if (yy)
+               *yy = (int)(ey);
+       if (ww)
+               *ww = (int)(ew);
+       if (hh)
+               *hh = (int)(eh);
+
        DLEAVE_FUNCTION(DLEVEL_STABLE);
 }
 
@@ -467,6 +478,7 @@
 ewl_text_get_letter_geometry_at(Ewl_Text * t, int x, int y,
                                int *tx, int *ty, int *tw, int *th)
 {
+       double ex = 0, ey = 0, ew = 0, eh = 0;
        int             i = 0;
        Ewl_Widget     *w;
 
@@ -476,15 +488,20 @@
        w = EWL_WIDGET(t);
 
 
-       if (t->estyle)
-               i = estyle_text_at_position(t->estyle, x, y, tx, ty, tw, th);
-       else {
-               *tx = 0;
-               *ty = 0;
-               *tw = 0;
-               *th = 0;
+       if (t->estyle) {
+               i = estyle_text_at_position(t->estyle, (double)x, (double)y,
+                               &ex, &ey, &ew, &eh);
        }
 
+       if (tx)
+               *tx = (int)(ex);
+       if (ty)
+               *ty = (int)(ey);
+       if (tw)
+               *tw = (int)(ew);
+       if (th)
+               *th = (int)(eh);
+
        DRETURN_INT(i, DLEVEL_STABLE);
 }
 
@@ -561,7 +578,7 @@
        t = EWL_TEXT(w);
 
        if (t->estyle)
-               estyle_free(t->estyle);
+               evas_object_del(t->estyle);
 
        IF_FREE(t->text);
        IF_FREE(t->font);
@@ -580,7 +597,7 @@
        t = EWL_TEXT(w);
 
        if (t->estyle)
-               estyle_move(t->estyle, CURRENT_X(t), CURRENT_Y(t));
+               evas_object_move(t->estyle, CURRENT_X(t), CURRENT_Y(t));
 
        DLEAVE_FUNCTION(DLEVEL_STABLE);
 }
@@ -639,14 +656,14 @@
        /*
         * Set move it into the correct position.
         */
-       estyle_set_color(t->estyle, t->r, t->g, t->b, t->a);
+       evas_object_color_set(t->estyle, t->r, t->g, t->b, t->a);
 
        /*
         * Adjust the clip box for the estyle and then display it.
         */
-       estyle_set_clip(t->estyle, w->fx_clip_box);
-       estyle_set_layer(t->estyle, LAYER(w));
-       estyle_show(t->estyle);
+       evas_object_clip_set(t->estyle, w->fx_clip_box);
+       evas_object_layer_set(t->estyle, LAYER(w));
+       evas_object_show(t->estyle);
 
        __ewl_text_update_size(t);
 
@@ -667,8 +684,8 @@
                DRETURN(DLEVEL_STABLE);
 
 
-       estyle_set_clip(t->estyle, w->fx_clip_box);
-       estyle_set_layer(t->estyle, LAYER(w));
+       evas_object_clip_set(t->estyle, w->fx_clip_box);
+       evas_object_layer_set(t->estyle, LAYER(w));
 
        DLEAVE_FUNCTION(DLEVEL_STABLE);
 }
@@ -676,15 +693,16 @@
 void
 __ewl_text_update_size(Ewl_Text * t)
 {
-       int             x, y, width, height;
+       double          x, y, width, height;
 
        /*
         * Adjust the properties of the widget to indicate the size of the text.
         */
-       estyle_geometry(t->estyle, &x, &y, &width, &height);
+       evas_object_geometry_get(t->estyle, &x, &y, &width, &height);
 
        /*
         * Set the preferred size to the size of the estyle
         */
-       ewl_object_set_preferred_size(EWL_OBJECT(t), width, height);
+       ewl_object_set_preferred_size(EWL_OBJECT(t), (unsigned int)(width),
+                       (unsigned int)(height));
 }
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/ewl_text.h,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -3 -r1.21 -r1.22
--- ewl_text.h  26 Feb 2003 01:15:24 -0000      1.21
+++ ewl_text.h  5 Aug 2003 20:24:06 -0000       1.22
@@ -8,7 +8,7 @@
 
 struct _ewl_text {
        Ewl_Widget      widget;
-       Estyle         *estyle;
+       Evas_Object         *estyle;
 
        char           *text;
        char           *font;
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/ewl_tree.c,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -3 -r1.15 -r1.16
--- ewl_tree.c  16 Jul 2003 20:31:20 -0000      1.15
+++ ewl_tree.c  5 Aug 2003 20:24:06 -0000       1.16
@@ -464,9 +464,8 @@
        ewd_list_goto_first(EWL_CONTAINER(node)->children);
        ewd_list_next(EWL_CONTAINER(node)->children);
 
-       while ((w = ewd_list_next(EWL_CONTAINER(node)->children))) {
+       while ((w = ewd_list_next(EWL_CONTAINER(node)->children)))
                ewl_widget_show(w);
-       }
 
        __ewl_tree_node_theme_update(EWL_WIDGET(node), NULL, NULL);
 
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/ewl_widget.c,v
retrieving revision 1.64
retrieving revision 1.65
diff -u -3 -r1.64 -r1.65
--- ewl_widget.c        18 Jul 2003 18:13:51 -0000      1.64
+++ ewl_widget.c        5 Aug 2003 20:24:06 -0000       1.65
@@ -814,22 +814,21 @@
                 * Propagate minimum sizes from the bit theme to the widget.
                 */
                edje_object_size_min_get(w->theme_object, &width, &height);
+               i_l = (unsigned int)(width);
+               i_t = (unsigned int)(height);
 
                if (i_l && MINIMUM_W(w) == EWL_OBJECT_MIN_SIZE)
-                       ewl_object_set_minimum_w(EWL_OBJECT(w),
-                                       (unsigned int)(width));
+                       ewl_object_set_minimum_w(EWL_OBJECT(w), i_l);
 
                if (i_t && MINIMUM_H(w) == EWL_OBJECT_MIN_SIZE)
-                       ewl_object_set_minimum_h(EWL_OBJECT(w),
-                                       (unsigned int)(height));
+                       ewl_object_set_minimum_h(EWL_OBJECT(w), i_t);
 
                /*
                 * Propagate maximum sizes from the bit theme to the widget.
                 */
-               /*
-                * FIXME: More edje growing pains
-               ebits_get_max_size(w->theme_object, &i_l, &i_t);
-               */
+               edje_object_size_max_get(w->theme_object, &width, &height);
+               i_l = (unsigned int)(width);
+               i_t = (unsigned int)(height);
 
                if (i_l && MAXIMUM_W(w) == EWL_OBJECT_MAX_SIZE)
                        ewl_object_set_maximum_w(EWL_OBJECT(w), i_l);




-------------------------------------------------------
This SF.Net email sponsored by: Free pre-built ASP.NET sites including
Data Reports, E-commerce, Portals, and Forums are available now.
Download today and enter to win an XBOX or Visual Studio .NET.
http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_01/01
_______________________________________________
enlightenment-cvs mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to