* edje: last move of properties in the right structure.
authorcedric <cedric>
Fri, 16 Jul 2010 16:00:26 +0000 (16:00 +0000)
committercedric <cedric@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Fri, 16 Jul 2010 16:00:26 +0000 (16:00 +0000)
git-svn-id: http://svn.enlightenment.org/svn/e/trunk/edje@50284 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

src/bin/edje_cc_handlers.c
src/lib/edje_calc.c
src/lib/edje_data.c
src/lib/edje_edit.c
src/lib/edje_embryo.c
src/lib/edje_load.c
src/lib/edje_private.h
src/lib/edje_util.c

index cf5f289..24ed3ef 100644 (file)
@@ -3278,19 +3278,19 @@ ob_collections_group_parts_part_description(void)
    ed->image.fill.angle = 0;
    ed->image.fill.spread = 0;
    ed->image.fill.type = EDJE_FILL_TYPE_SCALE;
-   ed->color_class = NULL;
-   ed->color.r = 255;
-   ed->color.g = 255;
-   ed->color.b = 255;
-   ed->color.a = 255;
-   ed->color2.r = 0;
-   ed->color2.g = 0;
-   ed->color2.b = 0;
-   ed->color2.a = 255;
-   ed->color3.r = 0;
-   ed->color3.g = 0;
-   ed->color3.b = 0;
-   ed->color3.a = 128;
+   ed->common.color_class = NULL;
+   ed->common.color.r = 255;
+   ed->common.color.g = 255;
+   ed->common.color.b = 255;
+   ed->common.color.a = 255;
+   ed->common.color2.r = 0;
+   ed->common.color2.g = 0;
+   ed->common.color2.b = 0;
+   ed->common.color2.a = 255;
+   ed->text.color3.r = 0;
+   ed->text.color3.g = 0;
+   ed->text.color3.b = 0;
+   ed->text.color3.a = 128;
    ed->text.align.x = FROM_DOUBLE(0.5);
    ed->text.align.y = FROM_DOUBLE(0.5);
    ed->text.id_source = -1;
@@ -3445,7 +3445,7 @@ st_collections_group_parts_part_description_inherit(void)
 
 #define STRDUP(x) x ? strdup(x) : NULL
 
-   ed->color_class = STRDUP(ed->color_class);
+   ed->common.color_class = STRDUP(ed->common.color_class);
    ed->text.text = STRDUP(ed->text.text);
    ed->text.text_class = STRDUP(ed->text.text_class);
    ed->text.font = STRDUP(ed->text.font);
@@ -3769,7 +3769,7 @@ st_collections_group_parts_part_description_color_class(void)
    ep = eina_list_data_get(eina_list_last(pc->parts));
    ed = ep->default_desc;
    if (ep->other_desc) ed = eina_list_data_get(eina_list_last(ep->other_desc));
-   ed->color_class = parse_str(0);
+   ed->common.color_class = parse_str(0);
 }
 
 /**
@@ -3795,10 +3795,10 @@ st_collections_group_parts_part_description_color(void)
    ep = eina_list_data_get(eina_list_last(pc->parts));
    ed = ep->default_desc;
    if (ep->other_desc) ed = eina_list_data_get(eina_list_last(ep->other_desc));
-   ed->color.r = parse_int_range(0, 0, 255);
-   ed->color.g = parse_int_range(1, 0, 255);
-   ed->color.b = parse_int_range(2, 0, 255);
-   ed->color.a = parse_int_range(3, 0, 255);
+   ed->common.color.r = parse_int_range(0, 0, 255);
+   ed->common.color.g = parse_int_range(1, 0, 255);
+   ed->common.color.b = parse_int_range(2, 0, 255);
+   ed->common.color.a = parse_int_range(3, 0, 255);
 }
 
 /**
@@ -3824,10 +3824,10 @@ st_collections_group_parts_part_description_color2(void)
    ep = eina_list_data_get(eina_list_last(pc->parts));
    ed = ep->default_desc;
    if (ep->other_desc) ed = eina_list_data_get(eina_list_last(ep->other_desc));
-   ed->color2.r = parse_int_range(0, 0, 255);
-   ed->color2.g = parse_int_range(1, 0, 255);
-   ed->color2.b = parse_int_range(2, 0, 255);
-   ed->color2.a = parse_int_range(3, 0, 255);
+   ed->common.color2.r = parse_int_range(0, 0, 255);
+   ed->common.color2.g = parse_int_range(1, 0, 255);
+   ed->common.color2.b = parse_int_range(2, 0, 255);
+   ed->common.color2.a = parse_int_range(3, 0, 255);
 }
 
 /**
@@ -3853,10 +3853,10 @@ st_collections_group_parts_part_description_color3(void)
    ep = eina_list_data_get(eina_list_last(pc->parts));
    ed = ep->default_desc;
    if (ep->other_desc) ed = eina_list_data_get(eina_list_last(ep->other_desc));
-   ed->color3.r = parse_int_range(0, 0, 255);
-   ed->color3.g = parse_int_range(1, 0, 255);
-   ed->color3.b = parse_int_range(2, 0, 255);
-   ed->color3.a = parse_int_range(3, 0, 255);
+   ed->text.color3.r = parse_int_range(0, 0, 255);
+   ed->text.color3.g = parse_int_range(1, 0, 255);
+   ed->text.color3.b = parse_int_range(2, 0, 255);
+   ed->text.color3.a = parse_int_range(3, 0, 255);
 }
 
 /**
index ac262a7..27b9efc 100644 (file)
@@ -1284,22 +1284,22 @@ _edje_part_recalc_single(Edje *ed,
      _edje_part_recalc_single_fill(ep, &desc->image, params, flags);
 
    /* colors */
-   if ((desc->color_class) && (*desc->color_class))
-     cc = _edje_color_class_find(ed, desc->color_class);
+   if ((desc->common.color_class) && (*desc->common.color_class))
+     cc = _edje_color_class_find(ed, desc->common.color_class);
 
    if (cc)
      {
-       params->color.r = (((int)cc->r + 1) * desc->color.r) >> 8;
-       params->color.g = (((int)cc->g + 1) * desc->color.g) >> 8;
-       params->color.b = (((int)cc->b + 1) * desc->color.b) >> 8;
-       params->color.a = (((int)cc->a + 1) * desc->color.a) >> 8;
+       params->color.r = (((int)cc->r + 1) * desc->common.color.r) >> 8;
+       params->color.g = (((int)cc->g + 1) * desc->common.color.g) >> 8;
+       params->color.b = (((int)cc->b + 1) * desc->common.color.b) >> 8;
+       params->color.a = (((int)cc->a + 1) * desc->common.color.a) >> 8;
      }
    else
      {
-       params->color.r = desc->color.r;
-       params->color.g = desc->color.g;
-       params->color.b = desc->color.b;
-       params->color.a = desc->color.a;
+       params->color.r = desc->common.color.r;
+       params->color.g = desc->common.color.g;
+       params->color.b = desc->common.color.b;
+       params->color.a = desc->common.color.a;
      }
 
    /* visible */
@@ -1336,25 +1336,25 @@ _edje_part_recalc_single(Edje *ed,
         /* text colors */
         if (cc)
           {
-            params->type.text.color2.r = (((int)cc->r2 + 1) * desc->color2.r) >> 8;
-            params->type.text.color2.g = (((int)cc->g2 + 1) * desc->color2.g) >> 8;
-            params->type.text.color2.b = (((int)cc->b2 + 1) * desc->color2.b) >> 8;
-            params->type.text.color2.a = (((int)cc->a2 + 1) * desc->color2.a) >> 8;
-            params->type.text.color3.r = (((int)cc->r3 + 1) * desc->color3.r) >> 8;
-            params->type.text.color3.g = (((int)cc->g3 + 1) * desc->color3.g) >> 8;
-            params->type.text.color3.b = (((int)cc->b3 + 1) * desc->color3.b) >> 8;
-            params->type.text.color3.a = (((int)cc->a3 + 1) * desc->color3.a) >> 8;
+            params->type.text.color2.r = (((int)cc->r2 + 1) * desc->common.color2.r) >> 8;
+            params->type.text.color2.g = (((int)cc->g2 + 1) * desc->common.color2.g) >> 8;
+            params->type.text.color2.b = (((int)cc->b2 + 1) * desc->common.color2.b) >> 8;
+            params->type.text.color2.a = (((int)cc->a2 + 1) * desc->common.color2.a) >> 8;
+            params->type.text.color3.r = (((int)cc->r3 + 1) * desc->text.color3.r) >> 8;
+            params->type.text.color3.g = (((int)cc->g3 + 1) * desc->text.color3.g) >> 8;
+            params->type.text.color3.b = (((int)cc->b3 + 1) * desc->text.color3.b) >> 8;
+            params->type.text.color3.a = (((int)cc->a3 + 1) * desc->text.color3.a) >> 8;
           }
         else
           {
-             params->type.text.color2.r = desc->color2.r;
-             params->type.text.color2.g = desc->color2.g;
-             params->type.text.color2.b = desc->color2.b;
-             params->type.text.color2.a = desc->color2.a;
-             params->type.text.color3.r = desc->color3.r;
-             params->type.text.color3.g = desc->color3.g;
-             params->type.text.color3.b = desc->color3.b;
-             params->type.text.color3.a = desc->color3.a;
+             params->type.text.color2.r = desc->common.color2.r;
+             params->type.text.color2.g = desc->common.color2.g;
+             params->type.text.color2.b = desc->common.color2.b;
+             params->type.text.color2.a = desc->common.color2.a;
+             params->type.text.color3.r = desc->text.color3.r;
+             params->type.text.color3.g = desc->text.color3.g;
+             params->type.text.color3.b = desc->text.color3.b;
+             params->type.text.color3.a = desc->text.color3.a;
           }
         break;
       case EDJE_PART_TYPE_RECTANGLE:
@@ -2159,34 +2159,34 @@ _edje_part_recalc(Edje *ed, Edje_Real_Part *ep, int flags)
                                  lz1 = ep2desc1->common.persp.zplane +
                                    TO_INT(SCALE(ep2pos, ep2desc2->common.persp.zplane -
                                                 ep2desc1->common.persp.zplane));
-                                 lr1 = ep2desc1->color.r +
-                                   TO_INT(SCALE(ep2pos, ep2desc2->color.r -
-                                                ep2desc1->color.r));
-                                 lg1 = ep2desc1->color.g +
-                                   TO_INT(SCALE(ep2pos, ep2desc2->color.g -
-                                                ep2desc1->color.b));
-                                 lb1 = ep2desc1->color.b +
-                                   TO_INT(SCALE(ep2pos, ep2desc2->color.g -
-                                                ep2desc1->color.b));
-                                 lar1 = ep2desc1->color2.r +
-                                   TO_INT(SCALE(ep2pos, ep2desc2->color2.r -
-                                                ep2desc1->color2.r));
-                                 lag1 = ep2desc1->color2.g +
-                                   TO_INT(SCALE(ep2pos, ep2desc2->color2.g -
-                                                ep2desc1->color2.b));
-                                 lab1 = ep2desc1->color2.b +
-                                   TO_INT(SCALE(ep2pos, ep2desc2->color2.g -
-                                                ep2desc1->color2.b));
+                                 lr1 = ep2desc1->common.color.r +
+                                   TO_INT(SCALE(ep2pos, ep2desc2->common.color.r -
+                                                ep2desc1->common.color.r));
+                                 lg1 = ep2desc1->common.color.g +
+                                   TO_INT(SCALE(ep2pos, ep2desc2->common.color.g -
+                                                ep2desc1->common.color.b));
+                                 lb1 = ep2desc1->common.color.b +
+                                   TO_INT(SCALE(ep2pos, ep2desc2->common.color.g -
+                                                ep2desc1->common.color.b));
+                                 lar1 = ep2desc1->common.color2.r +
+                                   TO_INT(SCALE(ep2pos, ep2desc2->common.color2.r -
+                                                ep2desc1->common.color2.r));
+                                 lag1 = ep2desc1->common.color2.g +
+                                   TO_INT(SCALE(ep2pos, ep2desc2->common.color2.g -
+                                                ep2desc1->common.color2.b));
+                                 lab1 = ep2desc1->common.color2.b +
+                                   TO_INT(SCALE(ep2pos, ep2desc2->common.color2.g -
+                                                ep2desc1->common.color2.b));
                               }
                             else
                               {
                                  lz1 = ep2desc1->common.persp.zplane;
-                                 lr1 = ep2desc1->color.r;
-                                 lg1 = ep2desc1->color.g;
-                                 lb1 = ep2desc1->color.b;
-                                 lar1 = ep2desc1->color2.r;
-                                 lag1 = ep2desc1->color2.g;
-                                 lab1 = ep2desc1->color2.b;
+                                 lr1 = ep2desc1->common.color.r;
+                                 lg1 = ep2desc1->common.color.g;
+                                 lb1 = ep2desc1->common.color.b;
+                                 lar1 = ep2desc1->common.color2.r;
+                                 lag1 = ep2desc1->common.color2.g;
+                                 lab1 = ep2desc1->common.color2.b;
                               }
                          }
                     }
@@ -2220,34 +2220,34 @@ _edje_part_recalc(Edje *ed, Edje_Real_Part *ep, int flags)
                                  lz2 = ep2desc1->common.persp.zplane +
                                    TO_INT(SCALE(ep2pos, ep2desc2->common.persp.zplane -
                                                 ep2desc1->common.persp.zplane));
-                                 lr2 = ep2desc1->color.r +
-                                   TO_INT(SCALE(ep2pos, ep2desc2->color.r -
-                                                ep2desc1->color.r));
-                                 lg2 = ep2desc1->color.g +
-                                   TO_INT(SCALE(ep2pos, ep2desc2->color.g -
-                                                ep2desc1->color.b));
-                                 lb2 = ep2desc1->color.b +
-                                   TO_INT(SCALE(ep2pos, ep2desc2->color.g -
-                                                ep2desc1->color.b));
-                                 lar2 = ep2desc1->color2.r +
-                                   TO_INT(SCALE(ep2pos, ep2desc2->color2.r -
-                                                ep2desc1->color2.r));
-                                 lag2 = ep2desc1->color2.g +
-                                   TO_INT(SCALE(ep2pos, ep2desc2->color2.g -
-                                                ep2desc1->color2.b));
-                                 lab2 = ep2desc1->color2.b +
-                                   TO_INT(SCALE(ep2pos, ep2desc2->color2.g -
-                                                ep2desc1->color2.b));
+                                 lr2 = ep2desc1->common.color.r +
+                                   TO_INT(SCALE(ep2pos, ep2desc2->common.color.r -
+                                                ep2desc1->common.color.r));
+                                 lg2 = ep2desc1->common.color.g +
+                                   TO_INT(SCALE(ep2pos, ep2desc2->common.color.g -
+                                                ep2desc1->common.color.b));
+                                 lb2 = ep2desc1->common.color.b +
+                                   TO_INT(SCALE(ep2pos, ep2desc2->common.color.g -
+                                                ep2desc1->common.color.b));
+                                 lar2 = ep2desc1->common.color2.r +
+                                   TO_INT(SCALE(ep2pos, ep2desc2->common.color2.r -
+                                                ep2desc1->common.color2.r));
+                                 lag2 = ep2desc1->common.color2.g +
+                                   TO_INT(SCALE(ep2pos, ep2desc2->common.color2.g -
+                                                ep2desc1->common.color2.b));
+                                 lab2 = ep2desc1->common.color2.b +
+                                   TO_INT(SCALE(ep2pos, ep2desc2->common.color2.g -
+                                                ep2desc1->common.color2.b));
                               }
                             else
                               {
                                  lz2 = ep2desc1->common.persp.zplane;
-                                 lr2 = ep2desc1->color.r;
-                                 lg2 = ep2desc1->color.g;
-                                 lb2 = ep2desc1->color.b;
-                                 lar2 = ep2desc1->color2.r;
-                                 lag2 = ep2desc1->color2.g;
-                                 lab2 = ep2desc1->color2.b;
+                                 lr2 = ep2desc1->common.color.r;
+                                 lg2 = ep2desc1->common.color.g;
+                                 lb2 = ep2desc1->common.color.b;
+                                 lar2 = ep2desc1->common.color2.r;
+                                 lag2 = ep2desc1->common.color2.g;
+                                 lab2 = ep2desc1->common.color2.b;
                               }
                          }
                     }
index 7a0a341..faf8abd 100644 (file)
@@ -297,19 +297,19 @@ _edje_edd_init(void)
    EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description, Edje_Part_Description, "fill.angle", image.fill.angle, EET_T_INT);
    EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description, Edje_Part_Description, "fill.spread", image.fill.spread, EET_T_INT);
    EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description, Edje_Part_Description, "fill.type", image.fill.type, EET_T_CHAR);
-   EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description, Edje_Part_Description, "color_class", color_class, EET_T_STRING);
-   EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description, Edje_Part_Description, "color.r", color.r, EET_T_UCHAR);
-   EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description, Edje_Part_Description, "color.g", color.g, EET_T_UCHAR);
-   EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description, Edje_Part_Description, "color.b", color.b, EET_T_UCHAR);
-   EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description, Edje_Part_Description, "color.a", color.a, EET_T_UCHAR);
-   EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description, Edje_Part_Description, "color2.r", color2.r, EET_T_UCHAR);
-   EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description, Edje_Part_Description, "color2.g", color2.g, EET_T_UCHAR);
-   EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description, Edje_Part_Description, "color2.b", color2.b, EET_T_UCHAR);
-   EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description, Edje_Part_Description, "color2.a", color2.a, EET_T_UCHAR);
-   EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description, Edje_Part_Description, "color3.r", color3.r, EET_T_UCHAR);
-   EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description, Edje_Part_Description, "color3.g", color3.g, EET_T_UCHAR);
-   EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description, Edje_Part_Description, "color3.b", color3.b, EET_T_UCHAR);
-   EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description, Edje_Part_Description, "color3.a", color3.a, EET_T_UCHAR);
+   EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description, Edje_Part_Description, "color_class", common.color_class, EET_T_STRING);
+   EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description, Edje_Part_Description, "color.r", common.color.r, EET_T_UCHAR);
+   EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description, Edje_Part_Description, "color.g", common.color.g, EET_T_UCHAR);
+   EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description, Edje_Part_Description, "color.b", common.color.b, EET_T_UCHAR);
+   EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description, Edje_Part_Description, "color.a", common.color.a, EET_T_UCHAR);
+   EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description, Edje_Part_Description, "color2.r", common.color2.r, EET_T_UCHAR);
+   EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description, Edje_Part_Description, "color2.g", common.color2.g, EET_T_UCHAR);
+   EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description, Edje_Part_Description, "color2.b", common.color2.b, EET_T_UCHAR);
+   EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description, Edje_Part_Description, "color2.a", common.color2.a, EET_T_UCHAR);
+   EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description, Edje_Part_Description, "color3.r", text.color3.r, EET_T_UCHAR);
+   EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description, Edje_Part_Description, "color3.g", text.color3.g, EET_T_UCHAR);
+   EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description, Edje_Part_Description, "color3.b", text.color3.b, EET_T_UCHAR);
+   EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description, Edje_Part_Description, "color3.a", text.color3.a, EET_T_UCHAR);
    EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description, Edje_Part_Description, "text.text", text.text, EET_T_STRING);
    EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description, Edje_Part_Description, "text.text_class", text.text_class, EET_T_STRING);
    EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description, Edje_Part_Description, "text.style", text.style, EET_T_STRING);
index 9e763f1..ab8782d 100644 (file)
@@ -2655,19 +2655,19 @@ edje_edit_state_add(Evas_Object *obj, const char *part, const char *name, double
    pd->image.fill.angle = 0;
    pd->image.fill.spread = 0;
    pd->image.fill.type = EDJE_FILL_TYPE_SCALE;
-   pd->color_class = NULL;
-   pd->color.r = 255;
-   pd->color.g = 255;
-   pd->color.b = 255;
-   pd->color.a = 255;
-   pd->color2.r = 0;
-   pd->color2.g = 0;
-   pd->color2.b = 0;
-   pd->color2.a = 255;
-   pd->color3.r = 0;
-   pd->color3.g = 0;
-   pd->color3.b = 0;
-   pd->color3.a = 128;
+   pd->common.color_class = NULL;
+   pd->common.color.r = 255;
+   pd->common.color.g = 255;
+   pd->common.color.b = 255;
+   pd->common.color.a = 255;
+   pd->common.color2.r = 0;
+   pd->common.color2.g = 0;
+   pd->common.color2.b = 0;
+   pd->common.color2.a = 255;
+   pd->text.color3.r = 0;
+   pd->text.color3.g = 0;
+   pd->text.color3.b = 0;
+   pd->text.color3.a = 128;
    pd->text.align.x = 0.5;
    pd->text.align.y = 0.5;
    pd->text.id_source = -1;
@@ -2801,7 +2801,7 @@ edje_edit_state_copy(Evas_Object *obj, const char *part, const char *from, doubl
    PD_COPY(image.fill.spread);
    PD_COPY(image.fill.smooth);
    PD_COPY(image.fill.type);
-   PD_STRING_COPY(color_class);
+   PD_STRING_COPY(common.color_class);
    PD_STRING_COPY(text.text);
    PD_STRING_COPY(text.text_class);
    PD_STRING_COPY(text.style);
@@ -2832,18 +2832,18 @@ edje_edit_state_copy(Evas_Object *obj, const char *part, const char *from, doubl
    PD_COPY(table.align.y);
    PD_COPY(table.padding.x);
    PD_COPY(table.padding.y);
-   PD_COPY(color.r);
-   PD_COPY(color.g);
-   PD_COPY(color.b);
-   PD_COPY(color.a);
-   PD_COPY(color2.r);
-   PD_COPY(color2.g);
-   PD_COPY(color2.b);
-   PD_COPY(color2.a);
-   PD_COPY(color3.r);
-   PD_COPY(color3.g);
-   PD_COPY(color3.b);
-   PD_COPY(color3.a);
+   PD_COPY(common.color.r);
+   PD_COPY(common.color.g);
+   PD_COPY(common.color.b);
+   PD_COPY(common.color.a);
+   PD_COPY(common.color2.r);
+   PD_COPY(common.color2.g);
+   PD_COPY(common.color2.b);
+   PD_COPY(common.color2.a);
+   PD_COPY(text.color3.r);
+   PD_COPY(text.color3.g);
+   PD_COPY(text.color3.b);
+   PD_COPY(text.color3.a);
    /* XXX: optimize this, most likely we don't need to remove and add */
    EINA_LIST_FREE(pdto->external_params, p)
      {
@@ -2964,33 +2964,33 @@ FUNC_STATE_REL(rel2, x);
 FUNC_STATE_REL(rel2, y);
 
 //colors
-#define FUNC_COLOR(Code)                                               \
+#define FUNC_COLOR(Class, Code)                                                \
   EAPI void                                                            \
   edje_edit_state_color##Code##_get(Evas_Object *obj, const char *part, const char *state, double value, int *r, int *g, int *b, int *a) \
   {                                                                    \
      GET_PD_OR_RETURN();                                               \
                                                                        \
-     if (r) *r = pd->color##Code.r;                                    \
-     if (g) *g = pd->color##Code.g;                                    \
-     if (b) *b = pd->color##Code.b;                                    \
-     if (a) *a = pd->color##Code.a;                                    \
+     if (r) *r = pd->Class.color##Code.r;                              \
+     if (g) *g = pd->Class.color##Code.g;                              \
+     if (b) *b = pd->Class.color##Code.b;                              \
+     if (a) *a = pd->Class.color##Code.a;                              \
   }                                                                    \
   EAPI void                                                            \
   edje_edit_state_color##Code##_set(Evas_Object *obj, const char *part, const char *state, double value, int r, int g, int b, int a) \
   {                                                                    \
      GET_PD_OR_RETURN();                                               \
                                                                        \
-     if (r > -1 && r < 256) pd->color##Code.r = r;                     \
-     if (g > -1 && g < 256) pd->color##Code.g = g;                     \
-     if (b > -1 && b < 256) pd->color##Code.b = b;                     \
-     if (a > -1 && a < 256) pd->color##Code.a = a;                     \
+     if (r > -1 && r < 256) pd->Class.color##Code.r = r;               \
+     if (g > -1 && g < 256) pd->Class.color##Code.g = g;               \
+     if (b > -1 && b < 256) pd->Class.color##Code.b = b;               \
+     if (a > -1 && a < 256) pd->Class.color##Code.a = a;               \
                                                                        \
      edje_object_calc_force(obj);                                      \
   }
 
-FUNC_COLOR();
-FUNC_COLOR(2);
-FUNC_COLOR(3);
+FUNC_COLOR(common, );
+FUNC_COLOR(common, 2);
+FUNC_COLOR(text, 3);
 
 #define FUNC_STATE_DOUBLE(Class, Value)                                        \
   EAPI double                                                          \
@@ -3112,7 +3112,7 @@ edje_edit_state_color_class_get(Evas_Object *obj, const char *part, const char *
 {
    GET_PD_OR_RETURN(NULL);
    //printf("Get ColorClass of part: %s state: %s\n", part, state);
-   return eina_stringshare_add(pd->color_class);
+   return eina_stringshare_add(pd->common.color_class);
 }
 
 EAPI void
@@ -3120,8 +3120,8 @@ edje_edit_state_color_class_set(Evas_Object *obj, const char *part, const char *
 {
    GET_PD_OR_RETURN();
    //printf("Set ColorClass of part: %s state: %s [to: %s]\n", part, state, color_class);
-   _edje_if_string_free(ed, pd->color_class);
-   pd->color_class = (char*)eina_stringshare_add(color_class);
+   _edje_if_string_free(ed, pd->common.color_class);
+   pd->common.color_class = (char*)eina_stringshare_add(color_class);
 }
 
 EAPI const Eina_List *
@@ -5114,21 +5114,21 @@ _edje_generate_source_of_state(Evas_Object *obj, const char *part, const char *s
    if (pd->common.aspect.prefer)
       BUF_APPENDF(I5"aspect_preference: %s;\n", prefers[pd->common.aspect.prefer]);
 
-   if (pd->color_class)
-      BUF_APPENDF(I5"color_class: \"%s\";\n", pd->color_class);
-
-   if (pd->color.r != 255 || pd->color.g != 255 ||
-       pd->color.b != 255 ||  pd->color.a != 255)
-      BUF_APPENDF(I5"color: %d %d %d %d;\n",
-              pd->color.r, pd->color.g, pd->color.b, pd->color.a);
-   if (pd->color2.r != 0 || pd->color2.g != 0 ||
-        pd->color2.b != 0 ||  pd->color2.a != 255)
-      BUF_APPENDF(I5"color2: %d %d %d %d;\n",
-              pd->color2.r, pd->color2.g, pd->color2.b, pd->color2.a);
-   if (pd->color3.r != 0 || pd->color3.g != 0 ||
-        pd->color3.b != 0 ||  pd->color3.a != 128)
-      BUF_APPENDF(I5"color3: %d %d %d %d;\n",
-              pd->color3.r, pd->color3.g, pd->color3.b, pd->color3.a);
+   if (pd->common.color_class)
+     BUF_APPENDF(I5"color_class: \"%s\";\n", pd->common.color_class);
+
+   if (pd->common.color.r != 255 || pd->common.color.g != 255 ||
+       pd->common.color.b != 255 || pd->common.color.a != 255)
+     BUF_APPENDF(I5"color: %d %d %d %d;\n",
+                pd->common.color.r, pd->common.color.g, pd->common.color.b, pd->common.color.a);
+   if (pd->common.color2.r != 0 || pd->common.color2.g != 0 ||
+       pd->common.color2.b != 0 || pd->common.color2.a != 255)
+     BUF_APPENDF(I5"color2: %d %d %d %d;\n",
+                pd->common.color2.r, pd->common.color2.g, pd->common.color2.b, pd->common.color2.a);
+   if (pd->text.color3.r != 0 || pd->text.color3.g != 0 ||
+       pd->text.color3.b != 0 || pd->text.color3.a != 128)
+     BUF_APPENDF(I5"color3: %d %d %d %d;\n",
+                pd->text.color3.r, pd->text.color3.g, pd->text.color3.b, pd->text.color3.a);
 
    //Rel1
    if (pd->common.rel1.relative_x || pd->common.rel1.relative_y || pd->common.rel1.offset_x ||
index d0cebef..b691551 100644 (file)
@@ -1620,7 +1620,7 @@ _edje_embryo_fn_custom_state(Embryo_Program *ep, Embryo_Cell *params)
      }
 
 #define DUP(x) x ? (char *)eina_stringshare_add(x) : NULL
-   d->color_class = DUP(d->color_class);
+   d->common.color_class = DUP(d->common.color_class);
    d->text.text = DUP(d->text.text);
    d->text.text_class = DUP(d->text.text_class);
    d->text.font = DUP(d->text.font);
@@ -1700,35 +1700,35 @@ _edje_embryo_fn_set_state_val(Embryo_Program *ep, Embryo_Cell *params)
       case EDJE_STATE_PARAM_COLOR:
         CHKPARAM(6);
 
-        GETINT(rp->custom->description->color.r, params[3]);
-        GETINT(rp->custom->description->color.g, params[4]);
-        GETINT(rp->custom->description->color.b, params[5]);
-        GETINT(rp->custom->description->color.a, params[6]);
+        GETINT(rp->custom->description->common.color.r, params[3]);
+        GETINT(rp->custom->description->common.color.g, params[4]);
+        GETINT(rp->custom->description->common.color.b, params[5]);
+        GETINT(rp->custom->description->common.color.a, params[6]);
 
         break;
       case EDJE_STATE_PARAM_COLOR2:
         CHKPARAM(6);
 
-        GETINT(rp->custom->description->color2.r, params[3]);
-        GETINT(rp->custom->description->color2.g, params[4]);
-        GETINT(rp->custom->description->color2.b, params[5]);
-        GETINT(rp->custom->description->color2.a, params[6]);
+        GETINT(rp->custom->description->common.color2.r, params[3]);
+        GETINT(rp->custom->description->common.color2.g, params[4]);
+        GETINT(rp->custom->description->common.color2.b, params[5]);
+        GETINT(rp->custom->description->common.color2.a, params[6]);
 
         break;
       case EDJE_STATE_PARAM_COLOR3:
         CHKPARAM(6);
 
-        GETINT(rp->custom->description->color3.r, params[3]);
-        GETINT(rp->custom->description->color3.g, params[4]);
-        GETINT(rp->custom->description->color3.b, params[5]);
-        GETINT(rp->custom->description->color3.a, params[6]);
+        GETINT(rp->custom->description->text.color3.r, params[3]);
+        GETINT(rp->custom->description->text.color3.g, params[4]);
+        GETINT(rp->custom->description->text.color3.b, params[5]);
+        GETINT(rp->custom->description->text.color3.a, params[6]);
 
         break;
       case EDJE_STATE_PARAM_COLOR_CLASS:
         CHKPARAM(3);
 
         GETSTR(s, params[3]);
-        GETSTREVAS(s, rp->custom->description->color_class);
+        GETSTREVAS(s, rp->custom->description->common.color_class);
 
         break;
       case EDJE_STATE_PARAM_REL1:
@@ -2057,34 +2057,34 @@ _edje_embryo_fn_get_state_val(Embryo_Program *ep, Embryo_Cell *params)
       case EDJE_STATE_PARAM_COLOR:
         CHKPARAM(6);
 
-        SETINT(rp->custom->description->color.r, params[3]);
-        SETINT(rp->custom->description->color.g, params[4]);
-        SETINT(rp->custom->description->color.b, params[5]);
-        SETINT(rp->custom->description->color.a, params[6]);
+        SETINT(rp->custom->description->common.color.r, params[3]);
+        SETINT(rp->custom->description->common.color.g, params[4]);
+        SETINT(rp->custom->description->common.color.b, params[5]);
+        SETINT(rp->custom->description->common.color.a, params[6]);
 
         break;
       case EDJE_STATE_PARAM_COLOR2:
         CHKPARAM(6);
 
-        SETINT(rp->custom->description->color2.r, params[3]);
-        SETINT(rp->custom->description->color2.g, params[4]);
-        SETINT(rp->custom->description->color2.b, params[5]);
-        SETINT(rp->custom->description->color2.a, params[6]);
+        SETINT(rp->custom->description->common.color2.r, params[3]);
+        SETINT(rp->custom->description->common.color2.g, params[4]);
+        SETINT(rp->custom->description->common.color2.b, params[5]);
+        SETINT(rp->custom->description->common.color2.a, params[6]);
 
         break;
       case EDJE_STATE_PARAM_COLOR3:
         CHKPARAM(6);
 
-        SETINT(rp->custom->description->color3.r, params[3]);
-        SETINT(rp->custom->description->color3.g, params[4]);
-        SETINT(rp->custom->description->color3.b, params[5]);
-        SETINT(rp->custom->description->color3.a, params[6]);
+        SETINT(rp->custom->description->text.color3.r, params[3]);
+        SETINT(rp->custom->description->text.color3.g, params[4]);
+        SETINT(rp->custom->description->text.color3.b, params[5]);
+        SETINT(rp->custom->description->text.color3.a, params[6]);
 
         break;
       case EDJE_STATE_PARAM_COLOR_CLASS:
         CHKPARAM(4);
 
-        s = rp->custom->description->color_class;
+        s = rp->custom->description->common.color_class;
         SETSTRALLOCATE(s);
 
         break;
index 060734b..beb8145 100644 (file)
@@ -362,12 +362,12 @@ _edje_object_file_set_internal(Evas_Object *obj, const char *file, const char *g
                  if (errors)
                    break;
                  /* Register any color classes in this parts descriptions. */
-                 if ((ep->default_desc) && (ep->default_desc->color_class))
-                   _edje_color_class_member_add(ed, ep->default_desc->color_class);
+                 if ((ep->default_desc) && (ep->default_desc->common.color_class))
+                   _edje_color_class_member_add(ed, ep->default_desc->common.color_class);
 
                  EINA_LIST_FOREACH(ep->other_desc, hist, desc)
-                   if (desc->color_class)
-                     _edje_color_class_member_add(ed, desc->color_class);
+                   if (desc->common.color_class)
+                     _edje_color_class_member_add(ed, desc->common.color_class);
               }
             /* build real parts */
             for (n = 0, l = ed->collection->parts; l; l = eina_list_next(l), n++)
@@ -1156,11 +1156,11 @@ _edje_collection_free_part_description_free(Edje_Part_Description *desc, Eina_Bo
      _edje_external_params_free(desc->external_params, free_strings);
    if (free_strings)
      {
-       if (desc->color_class)     eina_stringshare_del(desc->color_class);
-       if (desc->text.text)       eina_stringshare_del(desc->text.text);
-       if (desc->text.text_class) eina_stringshare_del(desc->text.text_class);
-       if (desc->text.style)      eina_stringshare_del(desc->text.style);
-       if (desc->text.font)       eina_stringshare_del(desc->text.font);
+       if (desc->common.color_class) eina_stringshare_del(desc->common.color_class);
+       if (desc->text.text)          eina_stringshare_del(desc->text.text);
+       if (desc->text.text_class)    eina_stringshare_del(desc->text.text_class);
+       if (desc->text.style)         eina_stringshare_del(desc->text.style);
+       if (desc->text.font)          eina_stringshare_del(desc->text.font);
      }
    free(desc);
 }
index 0d07f40..93e3691 100644 (file)
@@ -648,6 +648,10 @@ struct _Edje_Part_Description_Common
    Edje_Position step; /* size stepping by n pixels, 0 = none */
    Edje_Aspect_Prefer aspect;
 
+   char      *color_class; /* how to modify the color */
+   Edje_Color color;
+   Edje_Color color2;
+
    struct {
       FLOAT_T        relative_x;
       FLOAT_T       relative_y;
@@ -717,6 +721,7 @@ struct _Edje_Part_Description_Spec_Text
    char          *repch; /* replacement char for password mode entry */
 
    Edje_Alignment align; /* text alignment within bounds */
+   Edje_Color     color3;
 
    double         elipsis; /* 0.0 - 1.0 defining where the elipsis align */
    int            size; /* 0 = use user set size */
@@ -760,9 +765,6 @@ struct _Edje_Part_Description
    Edje_Part_Description_Spec_Box box;
    Edje_Part_Description_Spec_Table table;
 
-   char             *color_class; /* how to modify the color */
-
-   Edje_Color color, color2, color3;  /* color for rect or text, shadow etc. */
    Eina_List *external_params; /* parameters for external objects */
 };
 
index 27edf02..90cde22 100644 (file)
@@ -4457,12 +4457,12 @@ _edje_color_class_on_del(Edje *ed, Edje_Part *ep)
    Eina_List *tmp;
    Edje_Part_Description *desc;
 
-   if ((ep->default_desc) && (ep->default_desc->color_class))
-     _edje_color_class_member_del(ed, ep->default_desc->color_class);
+   if ((ep->default_desc) && (ep->default_desc->common.color_class))
+     _edje_color_class_member_del(ed, ep->default_desc->common.color_class);
 
    EINA_LIST_FOREACH(ep->other_desc, tmp, desc)
-     if (desc->color_class)
-       _edje_color_class_member_del(ed, desc->color_class);
+     if (desc->common.color_class)
+       _edje_color_class_member_del(ed, desc->common.color_class);
 }
 
 Edje_Text_Class *