[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[E-devel] patch for edje



I've been working on the edje library.  I just added a bunch of options for the "set_state_val" function in an .edc file.  I've recompiled everything w/this code and everything seems to work fine.

Also took care of some compiler warnings.

One thing I found when running gdb on the edje program.  It seems that a lot of a text objects settings are calculated twice.  Once in _edje_part_recalc (edje_calc.c).  And then in _edje_text_recalc_apply (edje_text.c).  Am I right in this?

 - Zigs


? data/edje_test.eet
Index: data/include/edje.inc
===================================================================
RCS file: /var/cvs/e/e17/libs/edje/data/include/edje.inc,v
retrieving revision 1.20
diff -u -r1.20 edje.inc
--- data/include/edje.inc	9 Oct 2005 09:49:53 -0000	1.20
+++ data/include/edje.inc	12 Jun 2006 01:35:54 -0000
@@ -150,9 +150,31 @@
 	STATE_MAX = 3,
 	STATE_STEP = 4,
 	STATE_ASPECT = 5,
-	STATE_COLOR = 6,
-	STATE_COLOR2 = 7,
-	STATE_COLOR3 = 8
+	STATE_ASPECT_PREF = 6,
+	STATE_COLOR = 7,
+	STATE_COLOR2 = 8,
+	STATE_COLOR3 = 9,
+	STATE_COLOR_CLASS = 10,
+	STATE_REL1 = 11,
+    STATE_REL1_TO = 12,
+	STATE_REL1_OFFSET = 13,
+	STATE_REL2 = 14,
+    STATE_REL2_TO = 15,
+	STATE_REL2_OFFSET = 16,
+	STATE_IMAGE = 17,
+	STATE_BORDER = 18,
+	STATE_FILL_SMOOTH = 19,
+	STATE_FILL_POS = 20,
+	STATE_FILL_SIZE = 21,
+	STATE_TEXT = 22,
+	STATE_TEXT_CLASS = 23,
+	STATE_TEXT_FONT = 24,
+    STATE_TEXT_STYLE = 25,
+	STATE_TEXT_SIZE = 26,
+	STATE_TEXT_FIT = 27,
+	STATE_TEXT_MIN = 28,
+	STATE_TEXT_ALIGN = 29,
+    STATE_VISIBLE = 30
 };
 
 native set_state_val(part_id, State_Param:p, ...);
Index: src/lib/edje_embryo.c
===================================================================
RCS file: /var/cvs/e/e17/libs/edje/src/lib/edje_embryo.c,v
retrieving revision 1.51
diff -u -r1.51 edje_embryo.c
--- src/lib/edje_embryo.c	19 Mar 2006 04:22:35 -0000	1.51
+++ src/lib/edje_embryo.c	12 Jun 2006 01:35:56 -0000
@@ -134,6 +134,28 @@
  * color[r,g,b,a]
  * color2[r,g,b,a]
  * color3[r,g,b,a]
+ * aspect_preference
+ * rel1[relx,rely]
+ * rel1[part_id,part_id]
+ * rel1[offx,offy]
+ * rel2[relx,relyr]
+ * rel2[part_id,part_id]
+ * rel2[offx,offy]
+ * image[image_id] <- all images have an Id not name in the edje
+ * border[l,r,t,b]
+ * fill[smooth]
+ * fill[pos_relx,pos_rely,pos_offx,pos_offy]
+ * fill[sz_relx,sz_rely,sz_offx,sz_offy]
+ * color_class
+ * text[text]
+ * text[text_class]
+ * text[font]
+ * text[size]
+ * text[style]
+ * text[fit_x,fit_y]
+ * text[min_x,min_y]
+ * text[align_x,align_y]
+ * visible
  *
  * ** part_id and program_id need to be able to be "found" from strings
  * 
@@ -152,27 +174,6 @@
  * set_clip(part_id, clip_part_id)
  * get_clip(part_id)
  *
- *
- * Need to implement support for the following properties
- * in get/set_state_val():
- *
- * aspect_preference
- * rel1[relx,rely,part_id,part_id]
- * rel1[offx,offy]
- * rel2[relx,rely,part_id,part_id]
- * rel2[offx,offy]
- * image[image_id] <- all images have an Id not name in the edje
- * border[l,r,t,b]
- * fill[smooth]
- * fill[pos_relx,pos_rely,pos_offx,pos_offy]
- * fill[sz_relx,sz_rely,sz_offx,sz_offy]
- * color_class
- * text[text_class]
- * text[font]
- * text[size]
- * text[fit_x,fit_y]
- * text[min_x,min_y]
- * text[align_x,align_y]
  * 
  * ADD/DEL CUSTOM OBJECTS UNDER SOLE EMBRYO SCRIPT CONTROL
  * 
@@ -187,6 +188,12 @@
    ___l = embryo_data_string_length_get(ep, ___cptr); \
    if (((str) = alloca(___l + 1))) \
    embryo_data_string_get(ep, ___cptr, (str));}}
+#define GETSTREVAS(str, par) { \
+   if ((str)) { \
+	if ((par) && (!strcmp((par), (str)))) return 0; \
+	if ((par)) evas_stringshare_del((par)); \
+	(par) = (char *)evas_stringshare_add((str)); } \
+   else (par) = NULL; }
 #define GETFLOAT(val, par) { \
    float *___cptr; \
    if ((___cptr = (float *)embryo_data_address_get(ep, (par)))) { \
@@ -199,6 +206,18 @@
    Embryo_Cell *___cptr; \
    if ((___cptr = embryo_data_address_get(ep, (par)))) { \
    embryo_data_string_set(ep, str, ___cptr);}}
+#define SETSTRALLOCATE(s) { \
+   if (s) { \
+	if (strlen((s)) < params[4]) { \
+	    SETSTR((s), params[3]); } \
+	else { \
+	     char *ss; \
+	     ss = alloca(strlen((s))); \
+	     strcpy(ss, (s)); \
+	     ss[params[4] - 2] = 0; \
+	     SETSTR(ss, params[3]); }} \
+   else \
+      SETSTR("", params[3]);}
 #define SETFLOAT(val, par) { \
    float *___cptr; \
    if ((___cptr = (float *)embryo_data_address_get(ep, (par)))) { \
@@ -1514,7 +1533,7 @@
 
    *d = *parent;
 
-   d->state.name = evas_stringshare_add("custom");
+   d->state.name = (char *)evas_stringshare_add("custom");
    d->state.value = 0.0;
 
    /* make sure all the allocated memory is getting copied,
@@ -1532,7 +1551,7 @@
 	d->image.tween_list = evas_list_append(d->image.tween_list, iid_new);
      }
 
-#define DUP(x) x ? evas_stringshare_add(x) : NULL
+#define DUP(x) x ? (char *)evas_stringshare_add(x) : NULL
    d->color_class = DUP(d->color_class);
    d->text.text = DUP(d->text.text);
    d->text.text_class = DUP(d->text.text_class);
@@ -1603,6 +1622,12 @@
 	 GETFLOAT(rp->custom.description->aspect.max, params[4]);
 
 	 break;
+      case EDJE_STATE_PARAM_ASPECT_PREF:
+         CHKPARAM(3);
+         
+         GETINT(rp->custom.description->aspect.prefer, params[3]);
+
+         break;
      case EDJE_STATE_PARAM_COLOR:
 	 CHKPARAM(6);
 
@@ -1630,10 +1655,197 @@
 	 GETINT(rp->custom.description->color3.a, params[6]);
 
 	 break;
+      case EDJE_STATE_PARAM_COLOR_CLASS:
+         CHKPARAM(3);
+
+	 char *cc;
+	 GETSTR(cc, params[3]);
+         GETSTREVAS(cc, rp->custom.description->color_class);
+	 
+         break;
+      case EDJE_STATE_PARAM_REL1:
+         CHKPARAM(4);
+
+         GETFLOAT(rp->custom.description->rel1.relative_x, params[3]);
+         GETFLOAT(rp->custom.description->rel1.relative_y, params[4]);
+
+         break;
+      case EDJE_STATE_PARAM_REL1_TO:
+	 CHKPARAM(4);
+
+         GETINT(rp->custom.description->rel1.id_x, params[3]);
+         GETINT(rp->custom.description->rel1.id_y, params[4]);
+
+	 if (rp->param1.description->rel1.id_x >= 0)
+	   rp->param1.rel1_to_x = ed->table_parts[rp->param1.description->rel1.id_x % ed->table_parts_size];
+	 if (rp->param1.description->rel1.id_y >= 0)
+	   rp->param1.rel1_to_y = ed->table_parts[rp->param1.description->rel1.id_y % ed->table_parts_size];
+
+	 break;
+      case EDJE_STATE_PARAM_REL1_OFFSET:
+	 CHKPARAM(4);
+
+	 GETINT(rp->custom.description->rel1.offset_x, params[3]);
+	 GETINT(rp->custom.description->rel1.offset_y, params[4]);
+
+	 break;
+      case EDJE_STATE_PARAM_REL2:
+         CHKPARAM(4);
+
+         GETFLOAT(rp->custom.description->rel2.relative_x, params[3]);
+         GETFLOAT(rp->custom.description->rel2.relative_y, params[4]);
+
+         break;
+      case EDJE_STATE_PARAM_REL2_TO:
+	 CHKPARAM(4);
+
+         GETINT(rp->custom.description->rel2.id_x, params[3]);
+         GETINT(rp->custom.description->rel2.id_y, params[4]);
+
+	 if (rp->param1.description->rel2.id_x >= 0)
+	   rp->param1.rel2_to_x = ed->table_parts[rp->param1.description->rel2.id_x % ed->table_parts_size];
+	 if (rp->param1.description->rel2.id_y >= 0)
+	   rp->param1.rel2_to_y = ed->table_parts[rp->param1.description->rel2.id_y % ed->table_parts_size];
+
+	 break;
+      case EDJE_STATE_PARAM_REL2_OFFSET:
+	 CHKPARAM(4);
+
+	 GETINT(rp->custom.description->rel2.offset_x, params[3]);
+	 GETINT(rp->custom.description->rel2.offset_y, params[4]);
+         
+	 break;
+      case EDJE_STATE_PARAM_IMAGE:
+	 if ( (rp->part->type != EDJE_PART_TYPE_IMAGE) ) return 0;
+         CHKPARAM(3);
+
+	 GETINT(rp->custom.description->image.id, params[3]);
+	 
+         break;
+      case EDJE_STATE_PARAM_BORDER:
+	 if ( (rp->part->type != EDJE_PART_TYPE_IMAGE) ) return 0;
+         CHKPARAM(6);
+
+         GETINT(rp->custom.description->border.l, params[3]);
+         GETINT(rp->custom.description->border.r, params[4]);
+         GETINT(rp->custom.description->border.t, params[5]);
+         GETINT(rp->custom.description->border.b, params[6]);
+
+         break;
+      case EDJE_STATE_PARAM_FILL_SMOOTH:
+	 if ( (rp->part->type != EDJE_PART_TYPE_IMAGE) ) return 0;
+         CHKPARAM(3);
+
+         GETINT(rp->custom.description->fill.smooth, params[3]);
+
+         break;
+      case EDJE_STATE_PARAM_FILL_POS:
+	 if ( (rp->part->type != EDJE_PART_TYPE_IMAGE) ) return 0;
+         CHKPARAM(6);
+
+         GETFLOAT(rp->custom.description->fill.pos_rel_x, params[3]);
+         GETFLOAT(rp->custom.description->fill.pos_rel_y, params[4]);
+         GETINT(rp->custom.description->fill.pos_abs_x, params[5]);
+         GETINT(rp->custom.description->fill.pos_abs_y, params[6]);
+
+         break;
+      case EDJE_STATE_PARAM_FILL_SIZE:
+	 if ( (rp->part->type != EDJE_PART_TYPE_IMAGE) ) return 0;
+         CHKPARAM(6);
+
+         GETFLOAT(rp->custom.description->fill.rel_x, params[3]);
+         GETFLOAT(rp->custom.description->fill.rel_y, params[4]);
+         GETINT(rp->custom.description->fill.abs_x, params[5]);
+         GETINT(rp->custom.description->fill.abs_y, params[6]);
+
+         break;
+      case EDJE_STATE_PARAM_TEXT:
+	 if ( (rp->part->type != EDJE_PART_TYPE_TEXT) \
+	       && (rp->part->type != EDJE_PART_TYPE_TEXTBLOCK))
+	   return 0;
+	 CHKPARAM(3);
+
+	 char *s;
+	 
+	 GETSTR(s, params[3]);
+	 GETSTREVAS(s, rp->custom.description->text.text);
+
+	 break;
+      case EDJE_STATE_PARAM_TEXT_CLASS:
+	 if ( (rp->part->type != EDJE_PART_TYPE_TEXT) \
+	       && (rp->part->type != EDJE_PART_TYPE_TEXTBLOCK))
+	   return 0;
+	 CHKPARAM(3);
+
+	 char *tc;
+	 GETSTR(tc, params[3]);
+	 GETSTREVAS(tc, rp->custom.description->text.text_class);
+
+	 break;
+      case EDJE_STATE_PARAM_TEXT_FONT:
+	 if ((rp->part->type != EDJE_PART_TYPE_TEXT)) return 0;
+	 CHKPARAM(3);
+
+	 char *tf;
+	 GETSTR(tf, params[3]);
+         GETSTREVAS(tf, rp->custom.description->text.font);
+
+	 break;
+      case EDJE_STATE_PARAM_TEXT_STYLE:
+	 if ((rp->part->type != EDJE_PART_TYPE_TEXTBLOCK)) return 0;
+	 CHKPARAM(3);
+
+	 char *ts;
+	 GETSTR(ts, params[3]);
+	 GETSTREVAS(ts, rp->custom.description->text.style);
+
+	 break;
+      case EDJE_STATE_PARAM_TEXT_SIZE:
+	 if ((rp->part->type != EDJE_PART_TYPE_TEXT)) return 0;
+         CHKPARAM(3);
+
+         GETINT(rp->custom.description->text.size, params[3]);
+
+         break;
+      case EDJE_STATE_PARAM_TEXT_FIT:
+	 if ((rp->part->type != EDJE_PART_TYPE_TEXT)) return 0;
+         CHKPARAM(4);
+	 
+         GETINT(rp->custom.description->text.fit_x, params[3]);
+         GETINT(rp->custom.description->text.fit_y, params[4]);
+
+         break;
+      case EDJE_STATE_PARAM_TEXT_MIN:
+	 if ( (rp->part->type != EDJE_PART_TYPE_TEXT) \
+	       && (rp->part->type != EDJE_PART_TYPE_TEXTBLOCK))
+	   return 0;
+         CHKPARAM(4);
+
+         GETINT(rp->custom.description->text.min_x, params[3]);
+         GETINT(rp->custom.description->text.min_y, params[4]);
+
+         break;
+      case EDJE_STATE_PARAM_TEXT_ALIGN:
+	 if ((rp->part->type != EDJE_PART_TYPE_TEXT)) return 0;
+         CHKPARAM(4);
+
+         GETFLOAT(rp->custom.description->text.align.x, params[3]);
+         GETFLOAT(rp->custom.description->text.align.y, params[4]);
+
+         break;
+      case EDJE_STATE_PARAM_VISIBLE:
+	 CHKPARAM(3);
+
+	 GETINT(rp->custom.description->visible, params[3]);
+
+	 break;	    
       default:
 	 break;
      }
 
+   ed->dirty=1;
+   _edje_recalc(ed);
+
    return 0;
 }
 
@@ -1695,6 +1907,12 @@
 	 SETFLOAT(rp->custom.description->aspect.max, params[4]);
 
 	 break;
+      case EDJE_STATE_PARAM_ASPECT_PREF:
+         CHKPARAM(3);
+         
+         SETINT(rp->custom.description->aspect.prefer, params[3]);
+
+         break;
      case EDJE_STATE_PARAM_COLOR:
 	 CHKPARAM(6);
 
@@ -1722,6 +1940,180 @@
 	 SETINT(rp->custom.description->color3.a, params[6]);
 
 	 break;
+      case EDJE_STATE_PARAM_COLOR_CLASS:
+         CHKPARAM(4);
+
+	 char *cc;
+	 cc = rp->custom.description->color_class;
+	 SETSTRALLOCATE(cc);
+
+         break;
+      case EDJE_STATE_PARAM_REL1:
+         CHKPARAM(4);
+
+         SETFLOAT(rp->custom.description->rel1.relative_x, params[3]);
+         SETFLOAT(rp->custom.description->rel1.relative_y, params[4]);
+
+         break;
+      case EDJE_STATE_PARAM_REL1_TO:
+	 CHKPARAM(4);
+
+         SETINT(rp->custom.description->rel1.id_x, params[3]);
+         SETINT(rp->custom.description->rel1.id_y, params[4]);
+
+	 break;
+      case EDJE_STATE_PARAM_REL1_OFFSET:
+	 CHKPARAM(4);
+
+	 SETINT(rp->custom.description->rel1.offset_x, params[3]);
+	 SETINT(rp->custom.description->rel1.offset_y, params[4]);
+
+	 break;
+      case EDJE_STATE_PARAM_REL2:
+         CHKPARAM(4);
+
+         SETFLOAT(rp->custom.description->rel2.relative_x, params[3]);
+         SETFLOAT(rp->custom.description->rel2.relative_y, params[4]);
+
+         break;
+      case EDJE_STATE_PARAM_REL2_TO:
+	 CHKPARAM(4);
+
+         SETINT(rp->custom.description->rel2.id_x, params[3]);
+         SETINT(rp->custom.description->rel2.id_y, params[4]);
+
+	 break;
+      case EDJE_STATE_PARAM_REL2_OFFSET:
+	 CHKPARAM(4);
+
+	 SETINT(rp->custom.description->rel2.offset_x, params[3]);
+	 SETINT(rp->custom.description->rel2.offset_y, params[4]);
+         
+	 break;
+      case EDJE_STATE_PARAM_IMAGE:
+	 if ( (rp->part->type != EDJE_PART_TYPE_IMAGE) ) return 0;
+         CHKPARAM(3);
+
+         SETINT(rp->custom.description->image.id, params[3]);
+
+         break;
+      case EDJE_STATE_PARAM_BORDER:
+	 if ( (rp->part->type != EDJE_PART_TYPE_IMAGE) ) return 0;
+         CHKPARAM(6);
+
+         SETINT(rp->custom.description->border.l, params[3]);
+         SETINT(rp->custom.description->border.r, params[4]);
+         SETINT(rp->custom.description->border.t, params[5]);
+         SETINT(rp->custom.description->border.b, params[6]);
+
+         break;
+      case EDJE_STATE_PARAM_FILL_SMOOTH:
+	 if ( (rp->part->type != EDJE_PART_TYPE_IMAGE) ) return 0;
+         CHKPARAM(3);
+
+         SETINT(rp->custom.description->fill.smooth, params[3]);
+
+         break;
+      case EDJE_STATE_PARAM_FILL_POS:
+	 if ( (rp->part->type != EDJE_PART_TYPE_IMAGE) ) return 0;
+         CHKPARAM(6);
+
+         SETFLOAT(rp->custom.description->fill.pos_rel_x, params[3]);
+         SETFLOAT(rp->custom.description->fill.pos_rel_y, params[4]);
+         SETINT(rp->custom.description->fill.pos_abs_x, params[5]);
+         SETINT(rp->custom.description->fill.pos_abs_y, params[6]);
+
+         break;
+      case EDJE_STATE_PARAM_FILL_SIZE:
+	 if ( (rp->part->type != EDJE_PART_TYPE_IMAGE) ) return 0;
+         CHKPARAM(6);
+
+         SETFLOAT(rp->custom.description->fill.rel_x, params[3]);
+         SETFLOAT(rp->custom.description->fill.rel_y, params[4]);
+         SETINT(rp->custom.description->fill.abs_x, params[5]);
+         SETINT(rp->custom.description->fill.abs_y, params[6]);
+
+         break;
+      case EDJE_STATE_PARAM_TEXT:
+	 if ( (rp->part->type != EDJE_PART_TYPE_TEXT) \
+	       && (rp->part->type != EDJE_PART_TYPE_TEXTBLOCK))
+	   return 0;
+	 CHKPARAM(4);
+
+	 char *s;
+
+	 s = rp->custom.description->text.text;
+	 SETSTRALLOCATE(s);
+
+	 break;
+      case EDJE_STATE_PARAM_TEXT_CLASS:
+	 if ( (rp->part->type != EDJE_PART_TYPE_TEXT) \
+	       && (rp->part->type != EDJE_PART_TYPE_TEXTBLOCK))
+	   return 0;
+	 CHKPARAM(4);
+
+	 char *tc;
+	 tc = rp->custom.description->text.text_class;
+	 SETSTRALLOCATE(tc);
+
+	 break;
+      case EDJE_STATE_PARAM_TEXT_FONT:
+	 if ((rp->part->type != EDJE_PART_TYPE_TEXT)) return 0;
+	 CHKPARAM(4);
+
+	 char *tf;
+	 tf = rp->custom.description->text.font;
+	 SETSTRALLOCATE(tf);
+
+	 break;
+      case EDJE_STATE_PARAM_TEXT_STYLE:
+	 if ((rp->part->type != EDJE_PART_TYPE_TEXTBLOCK)) return 0;
+	 CHKPARAM(4);
+
+	 char *ts;
+	 ts = rp->custom.description->text.style;
+	 SETSTRALLOCATE(ts);
+
+	 break;
+      case EDJE_STATE_PARAM_TEXT_SIZE:
+	 if ((rp->part->type != EDJE_PART_TYPE_TEXT)) return 0;
+         CHKPARAM(3);
+
+         SETINT(rp->custom.description->text.size, params[3]);
+
+         break;
+      case EDJE_STATE_PARAM_TEXT_FIT:
+	 if ((rp->part->type != EDJE_PART_TYPE_TEXT)) return 0;
+         CHKPARAM(4);
+
+         SETINT(rp->custom.description->text.fit_x, params[3]);
+         SETINT(rp->custom.description->text.fit_y, params[4]);
+
+         break;
+      case EDJE_STATE_PARAM_TEXT_MIN:
+	 if ( (rp->part->type != EDJE_PART_TYPE_TEXT) \
+	       && (rp->part->type != EDJE_PART_TYPE_TEXTBLOCK))
+	   return 0;
+         CHKPARAM(4);
+
+         SETINT(rp->custom.description->text.min_x, params[3]);
+         SETINT(rp->custom.description->text.min_y, params[4]);
+
+         break;
+      case EDJE_STATE_PARAM_TEXT_ALIGN:
+	 if ((rp->part->type != EDJE_PART_TYPE_TEXT)) return 0;
+         CHKPARAM(4);
+
+         SETFLOAT(rp->custom.description->text.align.x, params[3]);
+         SETFLOAT(rp->custom.description->text.align.y, params[4]);
+
+         break;
+      case EDJE_STATE_PARAM_VISIBLE:
+	 CHKPARAM(3);
+
+	 SETINT(rp->custom.description->visible, params[3]);
+
+	 break;
       default:
 	 break;
      }
Index: src/lib/edje_private.h
===================================================================
RCS file: /var/cvs/e/e17/libs/edje/src/lib/edje_private.h,v
retrieving revision 1.107
diff -u -r1.107 edje_private.h
--- src/lib/edje_private.h	28 Mar 2006 07:45:54 -0000	1.107
+++ src/lib/edje_private.h	12 Jun 2006 01:35:56 -0000
@@ -168,7 +168,6 @@
 #define EDJE_ASPECT_PREFER_VERTICAL   1
 #define EDJE_ASPECT_PREFER_HORIZONTAL 2
 #define EDJE_ASPECT_PREFER_BOTH       3
-
 #define EDJE_VAR_MAGIC_BASE 0x12fe84ba
 
 #define EDJE_STATE_PARAM_NONE         0
@@ -177,10 +176,32 @@
 #define EDJE_STATE_PARAM_MAX          3
 #define EDJE_STATE_PARAM_STEP         4
 #define EDJE_STATE_PARAM_ASPECT       5
-#define EDJE_STATE_PARAM_COLOR        6
-#define EDJE_STATE_PARAM_COLOR2       7
-#define EDJE_STATE_PARAM_COLOR3       8
-#define EDJE_STATE_PARAM_LAST         9
+#define EDJE_STATE_PARAM_ASPECT_PREF  6
+#define EDJE_STATE_PARAM_COLOR        7
+#define EDJE_STATE_PARAM_COLOR2       8
+#define EDJE_STATE_PARAM_COLOR3       9
+#define EDJE_STATE_PARAM_COLOR_CLASS  10
+#define EDJE_STATE_PARAM_REL1         11
+#define EDJE_STATE_PARAM_REL1_TO      12
+#define EDJE_STATE_PARAM_REL1_OFFSET  13
+#define EDJE_STATE_PARAM_REL2         14
+#define EDJE_STATE_PARAM_REL2_TO      15
+#define EDJE_STATE_PARAM_REL2_OFFSET  16
+#define EDJE_STATE_PARAM_IMAGE        17
+#define EDJE_STATE_PARAM_BORDER       18
+#define EDJE_STATE_PARAM_FILL_SMOOTH  19
+#define EDJE_STATE_PARAM_FILL_POS     20
+#define EDJE_STATE_PARAM_FILL_SIZE    21
+#define EDJE_STATE_PARAM_TEXT         22
+#define EDJE_STATE_PARAM_TEXT_CLASS   23
+#define EDJE_STATE_PARAM_TEXT_FONT    24
+#define EDJE_STATE_PARAM_TEXT_STYLE   25
+#define EDJE_STATE_PARAM_TEXT_SIZE    26
+#define EDJE_STATE_PARAM_TEXT_FIT     27
+#define EDJE_STATE_PARAM_TEXT_MIN     28
+#define EDJE_STATE_PARAM_TEXT_ALIGN   29
+#define EDJE_STATE_PARAM_VISIBLE      30
+#define EDJE_STATE_PARAM_LAST         31
 
 /*----------*/
 
@@ -593,6 +614,7 @@
 	 int                 out_size;
 	 double              align_x, align_y;
 	 double              elipsis;
+     int                 fit_x, fit_y;
       } cache;
       Edje_Real_Part        *source;
       Edje_Real_Part        *text_source;
Index: src/lib/edje_text.c
===================================================================
RCS file: /var/cvs/e/e17/libs/edje/src/lib/edje_text.c,v
retrieving revision 1.53
diff -u -r1.53 edje_text.c
--- src/lib/edje_text.c	28 Mar 2006 07:45:54 -0000	1.53
+++ src/lib/edje_text.c	12 Jun 2006 01:35:57 -0000
@@ -331,7 +331,9 @@
        (!strcmp(ep->text.cache.in_str, text)) &&
        (ep->text.cache.align_x == params->text.align.x) &&
        (ep->text.cache.align_y == params->text.align.y) &&
-       (ep->text.cache.elipsis == params->text.elipsis))
+       (ep->text.cache.elipsis == params->text.elipsis) &&
+       (ep->text.cache.fit_x == chosen_desc->text.fit_x) &&
+       (ep->text.cache.fit_y == chosen_desc->text.fit_y))
      {
 	text = (char *) ep->text.cache.out_str;
 	size = ep->text.cache.out_size;
@@ -462,6 +464,8 @@
    ep->text.cache.align_x = params->text.align.x;
    ep->text.cache.align_y = params->text.align.y;
    ep->text.cache.elipsis = params->text.elipsis;
+   ep->text.cache.fit_x = chosen_desc->text.fit_x;
+   ep->text.cache.fit_y = chosen_desc->text.fit_y;
    arrange_text:
    
    if (inlined_font) evas_object_text_font_source_set(ep->object, ed->path);