summaryrefslogtreecommitdiff
path: root/legacy
diff options
context:
space:
mode:
authorCedric BAIL <cedric.bail@free.fr>2010-08-15 18:14:33 +0000
committerCedric BAIL <cedric.bail@free.fr>2010-08-15 18:14:33 +0000
commit1d1a36047bedfaa747d0e98e52e62466718a173b (patch)
treeee0a7a5fe13864a939df2303a3a7da6ffd5b696f /legacy
parent25d756472643474ea7fbf0d17ae849c82f1b61ee (diff)
* edje: remove edje_convert use in edje_cc.
SVN revision: 51134
Diffstat (limited to 'legacy')
-rw-r--r--legacy/edje/src/bin/Makefile.am3
-rw-r--r--legacy/edje/src/bin/edje_cc.c2
-rw-r--r--legacy/edje/src/bin/edje_cc.h8
-rw-r--r--legacy/edje/src/bin/edje_cc_handlers.c2413
-rw-r--r--legacy/edje/src/bin/edje_cc_out.c354
-rw-r--r--legacy/edje/src/bin/edje_convert.c1
-rw-r--r--legacy/edje/src/lib/edje_edit.c10
-rw-r--r--legacy/edje/src/lib/edje_private.h6
-rw-r--r--legacy/edje/src/lib/edje_util.c44
9 files changed, 1564 insertions, 1277 deletions
diff --git a/legacy/edje/src/bin/Makefile.am b/legacy/edje/src/bin/Makefile.am
index b011fe2359..5b5a85d3b6 100644
--- a/legacy/edje/src/bin/Makefile.am
+++ b/legacy/edje/src/bin/Makefile.am
@@ -26,8 +26,7 @@ edje_cc_parse.c \
26edje_cc_mem.c \ 26edje_cc_mem.c \
27edje_cc_handlers.c \ 27edje_cc_handlers.c \
28edje_cc_sources.c \ 28edje_cc_sources.c \
29edje_prefix.c \ 29edje_prefix.c
30edje_convert.c
31 30
32edje_cc_LDADD = $(top_builddir)/src/lib/libedje.la $(ECORE_EVAS_LIBS) $(EVIL_LIBS) 31edje_cc_LDADD = $(top_builddir)/src/lib/libedje.la $(ECORE_EVAS_LIBS) $(EVIL_LIBS)
33edje_cc_LDFLAGS = @lt_enable_auto_import@ 32edje_cc_LDFLAGS = @lt_enable_auto_import@
diff --git a/legacy/edje/src/bin/edje_cc.c b/legacy/edje/src/bin/edje_cc.c
index 3f3617077c..d6b1892e71 100644
--- a/legacy/edje/src/bin/edje_cc.c
+++ b/legacy/edje/src/bin/edje_cc.c
@@ -195,7 +195,7 @@ main(int argc, char **argv)
195 if (!edje_init()) 195 if (!edje_init())
196 exit(-1); 196 exit(-1);
197 197
198 edje_file = mem_alloc(SZ(Old_Edje_File)); 198 edje_file = mem_alloc(SZ(Edje_File));
199 edje_file->compiler = strdup("edje_cc"); 199 edje_file->compiler = strdup("edje_cc");
200 edje_file->version = EDJE_FILE_VERSION; 200 edje_file->version = EDJE_FILE_VERSION;
201 edje_file->feature_ver = 1; /* increment this every time we add a field 201 edje_file->feature_ver = 1; /* increment this every time we add a field
diff --git a/legacy/edje/src/bin/edje_cc.h b/legacy/edje/src/bin/edje_cc.h
index 795386fa5b..9f8838f3a4 100644
--- a/legacy/edje/src/bin/edje_cc.h
+++ b/legacy/edje/src/bin/edje_cc.h
@@ -3,8 +3,6 @@
3 3
4#include <edje_private.h> 4#include <edje_private.h>
5 5
6#include "edje_convert.h"
7
8/* 6/*
9 * On Windows, if the file is not opened in binary mode, 7 * On Windows, if the file is not opened in binary mode,
10 * read does not return the correct size, because of 8 * read does not return the correct size, because of
@@ -105,8 +103,8 @@ struct _SrcFile_List
105/* global fn calls */ 103/* global fn calls */
106void data_setup(void); 104void data_setup(void);
107void data_write(void); 105void data_write(void);
108void data_queue_part_lookup(Old_Edje_Part_Collection *pc, char *name, int *dest); 106void data_queue_part_lookup(Edje_Part_Collection *pc, const char *name, int *dest);
109void data_queue_program_lookup(Old_Edje_Part_Collection *pc, char *name, int *dest); 107void data_queue_program_lookup(Edje_Part_Collection *pc, const char *name, int *dest);
110void data_queue_image_lookup(char *name, int *dest, Eina_Bool *set); 108void data_queue_image_lookup(char *name, int *dest, Eina_Bool *set);
111void data_queue_part_slave_lookup(int *master, int *slave); 109void data_queue_part_slave_lookup(int *master, int *slave);
112void data_queue_image_slave_lookup(int *master, int *slave); 110void data_queue_image_slave_lookup(int *master, int *slave);
@@ -170,7 +168,7 @@ extern int max_quality;
170extern int line; 168extern int line;
171extern Eina_List *stack; 169extern Eina_List *stack;
172extern Eina_List *params; 170extern Eina_List *params;
173extern Old_Edje_File *edje_file; 171extern Edje_File *edje_file;
174extern Eina_List *edje_collections; 172extern Eina_List *edje_collections;
175extern Eina_List *externals; 173extern Eina_List *externals;
176extern Eina_List *fonts; 174extern Eina_List *fonts;
diff --git a/legacy/edje/src/bin/edje_cc_handlers.c b/legacy/edje/src/bin/edje_cc_handlers.c
index 58f2cafd47..79749a7d4c 100644
--- a/legacy/edje/src/bin/edje_cc_handlers.c
+++ b/legacy/edje/src/bin/edje_cc_handlers.c
@@ -65,6 +65,9 @@
65 * <table class="edcref" border="0"> 65 * <table class="edcref" border="0">
66 */ 66 */
67 67
68static Edje_Part_Collection_Directory_Entry *current_de = NULL;
69static Edje_Program *current_program = NULL;
70
68static void st_externals_external(void); 71static void st_externals_external(void);
69 72
70static void st_images_image(void); 73static void st_images_image(void);
@@ -781,6 +784,127 @@ statement_handler_num(void)
781 return sizeof(statement_handlers) / sizeof (New_Object_Handler); 784 return sizeof(statement_handlers) / sizeof (New_Object_Handler);
782} 785}
783 786
787static Edje_Part_Description_Common *
788_edje_part_description_alloc(unsigned char type, const char *collection, const char *part)
789{
790 Edje_Part_Description_Common *result = NULL;
791
792 switch (type)
793 {
794 case EDJE_PART_TYPE_RECTANGLE:
795 case EDJE_PART_TYPE_SWALLOW:
796 case EDJE_PART_TYPE_GROUP:
797 result = mem_alloc(SZ(Edje_Part_Description_Common));
798 break;
799 case EDJE_PART_TYPE_TEXT:
800 case EDJE_PART_TYPE_TEXTBLOCK:
801 {
802 Edje_Part_Description_Text *ed;
803
804 ed = mem_alloc(SZ(Edje_Part_Description_Text));
805
806 ed->text.color3.r = 0;
807 ed->text.color3.g = 0;
808 ed->text.color3.b = 0;
809 ed->text.color3.a = 128;
810 ed->text.align.x = FROM_DOUBLE(0.5);
811 ed->text.align.y = FROM_DOUBLE(0.5);
812 ed->text.id_source = -1;
813 ed->text.id_text_source = -1;
814
815 result = &ed->common;
816 break;
817 }
818 case EDJE_PART_TYPE_IMAGE:
819 {
820 Edje_Part_Description_Image *ed;
821
822 ed = mem_alloc(SZ(Edje_Part_Description_Image));
823
824 ed->image.id = -1;
825 ed->image.fill.smooth = 1;
826 ed->image.fill.pos_rel_x = FROM_DOUBLE(0.0);
827 ed->image.fill.pos_abs_x = 0;
828 ed->image.fill.rel_x = FROM_DOUBLE(1.0);
829 ed->image.fill.abs_x = 0;
830 ed->image.fill.pos_rel_y = FROM_DOUBLE(0.0);
831 ed->image.fill.pos_abs_y = 0;
832 ed->image.fill.rel_y = FROM_DOUBLE(1.0);
833 ed->image.fill.abs_y = 0;
834 ed->image.fill.angle = 0;
835 ed->image.fill.spread = 0;
836 ed->image.fill.type = EDJE_FILL_TYPE_SCALE;
837
838 result = &ed->common;
839 break;
840 }
841 case EDJE_PART_TYPE_BOX:
842 {
843 Edje_Part_Description_Box *ed;
844
845 ed = mem_alloc(SZ(Edje_Part_Description_Box));
846
847 ed->box.layout = NULL;
848 ed->box.alt_layout = NULL;
849 ed->box.align.x = FROM_DOUBLE(0.5);
850 ed->box.align.y = FROM_DOUBLE(0.5);
851 ed->box.padding.x = 0;
852 ed->box.padding.y = 0;
853
854 result = &ed->common;
855 break;
856 }
857 case EDJE_PART_TYPE_TABLE:
858 {
859 Edje_Part_Description_Table *ed;
860
861 ed = mem_alloc(SZ(Edje_Part_Description_Table));
862
863 ed->table.homogeneous = EDJE_OBJECT_TABLE_HOMOGENEOUS_NONE;
864 ed->table.align.x = FROM_DOUBLE(0.5);
865 ed->table.align.y = FROM_DOUBLE(0.5);
866 ed->table.padding.x = 0;
867 ed->table.padding.y = 0;
868
869 result = &ed->common;
870 break;
871 }
872 case EDJE_PART_TYPE_EXTERNAL:
873 {
874 Edje_Part_Description_External *ed;
875
876 ed = mem_alloc(SZ(Edje_Part_Description_External));
877
878 ed->external_params = NULL;
879
880 result = &ed->common;
881 break;
882 }
883 }
884
885 if (!result)
886 {
887 ERR("%s: Error. Unknow type %i of part %s in collection %s.", progname, type, part, collection);
888 exit(-1);
889 }
890
891 return result;
892}
893
894static void
895_edje_program_check(const char *name, Edje_Program *me, Edje_Program **pgrms, unsigned int count)
896{
897 unsigned int i;
898
899 for (i = 0; i < count; ++i)
900 if (pgrms[i] != me && pgrms[i]->name && (!strcmp(name, pgrms[i]->name)))
901 {
902 ERR("%s: Error. parse error %s:%i. There is already a program of the name %s\n",
903 progname, file_in, line - 1, name);
904 exit(-1);
905 }
906}
907
784/*****/ 908/*****/
785 909
786/** 910/**
@@ -813,12 +937,11 @@ static void
813st_externals_external(void) 937st_externals_external(void)
814{ 938{
815 External *ex; 939 External *ex;
816 Edje_External_Directory_Entry *ext;
817 940
818 check_arg_count(1); 941 check_arg_count(1);
819 942
820 if (!edje_file->external_dir) 943 if (!edje_file->external_dir)
821 edje_file->external_dir = mem_alloc(SZ(Old_Edje_External_Directory)); 944 edje_file->external_dir = mem_alloc(SZ(Edje_External_Directory));
822 945
823 ex = mem_alloc(SZ(External)); 946 ex = mem_alloc(SZ(External));
824 ex->name = parse_str(0); 947 ex->name = parse_str(0);
@@ -840,9 +963,18 @@ st_externals_external(void)
840 963
841 if (edje_file->external_dir) 964 if (edje_file->external_dir)
842 { 965 {
843 ext = mem_alloc(SZ(Edje_External_Directory_Entry)); 966 edje_file->external_dir->entries_count++;
844 ext->entry = mem_strdup(ex->name); 967 edje_file->external_dir->entries = realloc(edje_file->external_dir->entries,
845 edje_file->external_dir->entries = eina_list_append(edje_file->external_dir->entries, ext); 968 sizeof (Edje_External_Directory) * edje_file->external_dir->entries_count);
969 memset(edje_file->external_dir->entries + edje_file->external_dir->entries_count - 1,
970 0, sizeof (Edje_External_Directory));
971 if (!edje_file->external_dir->entries)
972 {
973 ERR("%s: Error. not enought memory", progname);
974 exit(-1);
975 }
976
977 edje_file->external_dir->entries[edje_file->external_dir->entries_count - 1].entry = mem_strdup(ex->name);
846 } 978 }
847} 979}
848 980
@@ -903,28 +1035,37 @@ static void
903st_images_image(void) 1035st_images_image(void)
904{ 1036{
905 Edje_Image_Directory_Entry *img; 1037 Edje_Image_Directory_Entry *img;
1038 const char *tmp;
1039 unsigned int i;
906 int v; 1040 int v;
907 1041
908 if (!edje_file->image_dir) 1042 if (!edje_file->image_dir)
909 edje_file->image_dir = mem_alloc(SZ(Old_Edje_Image_Directory)); 1043 edje_file->image_dir = mem_alloc(SZ(Edje_Image_Directory));
910 img = mem_alloc(SZ(Edje_Image_Directory_Entry));
911 img->entry = parse_str(0);
912 {
913 Eina_List *l;
914 Edje_Image_Directory_Entry *limg;
915 1044
916 EINA_LIST_FOREACH(edje_file->image_dir->entries, l, limg) 1045 tmp = parse_str(0);
917 { 1046
918 if (!strcmp(limg->entry, img->entry)) 1047 for (i = 0; i < edje_file->image_dir->entries_count; ++i)
919 { 1048 if (!strcmp(edje_file->image_dir->entries[i].entry, tmp))
920 free((char*) img->entry); 1049 {
921 free(img); 1050 free((char*) tmp);
922 return; 1051 return;
923 } 1052 }
924 } 1053
1054 edje_file->image_dir->entries_count++;
1055 edje_file->image_dir->entries = realloc(edje_file->image_dir->entries,
1056 sizeof (Edje_Image_Directory_Entry) * edje_file->image_dir->entries_count);
1057 memset(edje_file->image_dir->entries + edje_file->image_dir->entries_count - 1,
1058 0, sizeof (Edje_Image_Directory_Entry));
1059 if (!edje_file->image_dir->entries)
1060 {
1061 ERR("%s: Error. No enought memory.", progname);
1062 exit(-1);
925 } 1063 }
926 edje_file->image_dir->entries = eina_list_append(edje_file->image_dir->entries, img); 1064
927 img->id = eina_list_count(edje_file->image_dir->entries) - 1; 1065 img = edje_file->image_dir->entries + edje_file->image_dir->entries_count - 1;
1066
1067 img->entry = tmp;
1068 img->id = edje_file->image_dir->entries_count - 1;
928 v = parse_enum(1, 1069 v = parse_enum(1,
929 "RAW", 0, 1070 "RAW", 0,
930 "COMP", 1, 1071 "COMP", 1,
@@ -996,13 +1137,20 @@ st_images_image(void)
996static void 1137static void
997ob_images_set(void) 1138ob_images_set(void)
998{ 1139{
999 Edje_Image_Directory_Set *set;
1000
1001 if (!edje_file->image_dir) 1140 if (!edje_file->image_dir)
1002 edje_file->image_dir = mem_alloc(SZ(Old_Edje_Image_Directory)); 1141 edje_file->image_dir = mem_alloc(SZ(Edje_Image_Directory));
1003 set = mem_alloc(SZ(Edje_Image_Directory_Set)); 1142
1004 set->id = eina_list_count(edje_file->image_dir->sets); 1143 edje_file->image_dir->sets_count++;
1005 edje_file->image_dir->sets = eina_list_append(edje_file->image_dir->sets, set); 1144 edje_file->image_dir->sets = realloc(edje_file->image_dir->sets,
1145 sizeof (Edje_Image_Directory_Set) * edje_file->image_dir->sets_count);
1146 memset(edje_file->image_dir->sets + edje_file->image_dir->sets_count - 1,
1147 0, sizeof (Edje_Image_Directory_Set));
1148 if (!edje_file->image_dir->sets)
1149 {
1150 ERR("%s: Error. Not enought memory.", progname);
1151 exit(-1);
1152 }
1153 edje_file->image_dir->sets[edje_file->image_dir->sets_count - 1].id = edje_file->image_dir->sets_count - 1;
1006} 1154}
1007 1155
1008/** 1156/**
@@ -1019,12 +1167,9 @@ ob_images_set(void)
1019static void 1167static void
1020st_images_set_name(void) 1168st_images_set_name(void)
1021{ 1169{
1022 Edje_Image_Directory_Set *set;
1023
1024 check_arg_count(1); 1170 check_arg_count(1);
1025 1171
1026 set = eina_list_data_get(eina_list_last(edje_file->image_dir->sets)); 1172 edje_file->image_dir->sets[edje_file->image_dir->sets_count - 1].name = parse_str(0);
1027 set->name = parse_str(0);
1028} 1173}
1029 1174
1030static void 1175static void
@@ -1033,7 +1178,7 @@ ob_images_set_image(void)
1033 Edje_Image_Directory_Set_Entry *entry; 1178 Edje_Image_Directory_Set_Entry *entry;
1034 Edje_Image_Directory_Set *set; 1179 Edje_Image_Directory_Set *set;
1035 1180
1036 set = eina_list_data_get(eina_list_last(edje_file->image_dir->sets)); 1181 set = edje_file->image_dir->sets + edje_file->image_dir->sets_count - 1;
1037 1182
1038 entry = mem_alloc(SZ(Edje_Image_Directory_Set_Entry)); 1183 entry = mem_alloc(SZ(Edje_Image_Directory_Set_Entry));
1039 1184
@@ -1045,10 +1190,9 @@ st_images_set_image_image(void)
1045{ 1190{
1046 Edje_Image_Directory_Set_Entry *entry; 1191 Edje_Image_Directory_Set_Entry *entry;
1047 Edje_Image_Directory_Set *set; 1192 Edje_Image_Directory_Set *set;
1048 Edje_Image_Directory_Entry *img; 1193 unsigned int i;
1049 Eina_List *l;
1050 1194
1051 set = eina_list_data_get(eina_list_last(edje_file->image_dir->sets)); 1195 set = edje_file->image_dir->sets + edje_file->image_dir->sets_count - 1;
1052 entry = eina_list_data_get(eina_list_last(set->entries)); 1196 entry = eina_list_data_get(eina_list_last(set->entries));
1053 1197
1054 /* Add the image to the global pool with the same syntax. */ 1198 /* Add the image to the global pool with the same syntax. */
@@ -1056,12 +1200,12 @@ st_images_set_image_image(void)
1056 1200
1057 entry->name = parse_str(0); 1201 entry->name = parse_str(0);
1058 1202
1059 EINA_LIST_FOREACH(edje_file->image_dir->entries, l, img) 1203 for (i = 0; i < edje_file->image_dir->entries_count; ++i)
1060 if (!strcmp(img->entry, entry->name)) 1204 if (!strcmp(edje_file->image_dir->entries[i].entry, entry->name))
1061 { 1205 {
1062 entry->id = img->id; 1206 entry->id = i;
1063 return; 1207 return;
1064 } 1208 }
1065} 1209}
1066 1210
1067/** 1211/**
@@ -1080,8 +1224,8 @@ st_images_set_image_size(void)
1080{ 1224{
1081 Edje_Image_Directory_Set_Entry *entry; 1225 Edje_Image_Directory_Set_Entry *entry;
1082 Edje_Image_Directory_Set *set; 1226 Edje_Image_Directory_Set *set;
1083 1227
1084 set = eina_list_data_get(eina_list_last(edje_file->image_dir->sets)); 1228 set = edje_file->image_dir->sets + edje_file->image_dir->sets_count - 1;
1085 entry = eina_list_data_get(eina_list_last(set->entries)); 1229 entry = eina_list_data_get(eina_list_last(set->entries));
1086 1230
1087 entry->size.min.w = parse_int(0); 1231 entry->size.min.w = parse_int(0);
@@ -1130,40 +1274,25 @@ static void
1130st_fonts_font(void) 1274st_fonts_font(void)
1131{ 1275{
1132 Font *fn; 1276 Font *fn;
1133 Edje_Font_Directory_Entry *fnt;
1134 1277
1135 check_arg_count(2); 1278 check_arg_count(2);
1136 1279
1137 if (!edje_file->font_dir) 1280 if (!edje_file->fonts)
1138 edje_file->font_dir = mem_alloc(SZ(Old_Edje_Font_Directory)); 1281 edje_file->fonts = eina_hash_string_small_new(free);
1139 1282
1140 fn = mem_alloc(SZ(Font)); 1283 fn = mem_alloc(SZ(Font));
1141 fn->file = parse_str(0); 1284 fn->file = parse_str(0);
1142 fn->name = parse_str(1); 1285 fn->name = parse_str(1);
1143 {
1144 Eina_List *l;
1145 Font *lfn;
1146 1286
1147 EINA_LIST_FOREACH(fonts, l, lfn) 1287 if (eina_hash_find(edje_file->fonts, fn->name))
1148 {
1149 if (!strcmp(lfn->name, fn->name))
1150 {
1151 free(fn->file);
1152 free(fn->name);
1153 free(fn);
1154 return;
1155 }
1156 }
1157 }
1158 fonts = eina_list_append(fonts, fn);
1159
1160 if (edje_file->font_dir)
1161 { 1288 {
1162 fnt = mem_alloc(SZ(Edje_Font_Directory_Entry)); 1289 free(fn->file);
1163 fnt->entry = mem_strdup(fn->name); 1290 free(fn->name);
1164 fnt->file = mem_strdup(fn->file); 1291 free(fn);
1165 edje_file->font_dir->entries = eina_list_append(edje_file->font_dir->entries, fnt); 1292 return;
1166 } 1293 }
1294
1295 eina_hash_direct_add(edje_file->fonts, fn->name, fn);
1167} 1296}
1168 1297
1169/** 1298/**
@@ -1194,14 +1323,21 @@ st_fonts_font(void)
1194static void 1323static void
1195st_data_item(void) 1324st_data_item(void)
1196{ 1325{
1197 Old_Edje_Data *di; 1326 Edje_String *es;
1327 char *key;
1198 1328
1199 check_arg_count(2); 1329 check_arg_count(2);
1200 1330
1201 di = mem_alloc(SZ(Old_Edje_Data)); 1331 key = parse_str(0);
1202 di->key = parse_str(0); 1332
1203 di->value = parse_str(1); 1333 es = mem_alloc(SZ(Edje_String));
1204 edje_file->data = eina_list_append(edje_file->data, di); 1334 es->str = parse_str(1);
1335
1336 if (!edje_file->data)
1337 edje_file->data = eina_hash_string_small_new(free);
1338
1339 /* FIXME: check if data already exist */
1340 eina_hash_direct_add(edje_file->data, key, es);
1205} 1341}
1206 1342
1207/** 1343/**
@@ -1221,17 +1357,19 @@ st_data_file(void)
1221{ 1357{
1222 const char *data; 1358 const char *data;
1223 const char *over; 1359 const char *over;
1224 Old_Edje_Data *di; 1360 Edje_String *es;
1225 char *filename; 1361 char *filename;
1226 char *value; 1362 char *value;
1363 char *key;
1227 int fd; 1364 int fd;
1228 int i; 1365 int i;
1229 struct stat buf; 1366 struct stat buf;
1230 1367
1231 check_arg_count(2); 1368 check_arg_count(2);
1232 1369
1233 di = mem_alloc(SZ(Old_Edje_Data)); 1370 key = parse_str(0);
1234 di->key = parse_str(0); 1371
1372 es = mem_alloc(SZ(Edje_String));
1235 filename = parse_str(1); 1373 filename = parse_str(1);
1236 1374
1237 fd = open(filename, O_RDONLY | O_BINARY, S_IRUSR | S_IWUSR); 1375 fd = open(filename, O_RDONLY | O_BINARY, S_IRUSR | S_IWUSR);
@@ -1272,8 +1410,9 @@ st_data_file(void)
1272 munmap((void*)data, buf.st_size); 1410 munmap((void*)data, buf.st_size);
1273 close(fd); 1411 close(fd);
1274 1412
1275 di->value = value; 1413 es->str = value;
1276 edje_file->data = eina_list_append(edje_file->data, di); 1414
1415 eina_hash_direct_add(edje_file->data, key, es);
1277 1416
1278 free(filename); 1417 free(filename);
1279} 1418}
@@ -1556,8 +1695,8 @@ st_styles_style_tag(void)
1556static void 1695static void
1557ob_collections(void) 1696ob_collections(void)
1558{ 1697{
1559 if (!edje_file->collection_dir) 1698 if (!edje_file->collection)
1560 edje_file->collection_dir = mem_alloc(SZ(Old_Edje_Part_Collection_Directory)); 1699 edje_file->collection = eina_hash_string_small_new(NULL);
1561} 1700}
1562 1701
1563/** 1702/**
@@ -1592,17 +1731,21 @@ ob_collections(void)
1592static void 1731static void
1593ob_collections_group(void) 1732ob_collections_group(void)
1594{ 1733{
1595 Edje_Part_Collection_Directory_Entry *de; 1734 Edje_Part_Collection *pc;
1596 Old_Edje_Part_Collection *pc;
1597 Code *cd; 1735 Code *cd;
1598
1599 de = mem_alloc(SZ(Edje_Part_Collection_Directory_Entry));
1600 edje_file->collection_dir->entries = eina_list_append(edje_file->collection_dir->entries, de);
1601 de->id = eina_list_count(edje_file->collection_dir->entries) - 1;
1602 1736
1603 pc = mem_alloc(SZ(Old_Edje_Part_Collection)); 1737 if (current_de != NULL && current_de->entry == NULL)
1738 {
1739 ERR("%p: Error. A collection without a name was detected, that's not allowed.", progname);
1740 exit(-1);
1741 }
1742
1743 current_de = mem_alloc(SZ(Edje_Part_Collection_Directory_Entry));
1744 current_de->id = eina_list_count(edje_collections);
1745
1746 pc = mem_alloc(SZ(Edje_Part_Collection));
1604 edje_collections = eina_list_append(edje_collections, pc); 1747 edje_collections = eina_list_append(edje_collections, pc);
1605 pc->id = eina_list_count(edje_collections) - 1; 1748 pc->id = current_de->id;
1606 1749
1607 cd = mem_alloc(SZ(Code)); 1750 cd = mem_alloc(SZ(Code));
1608 codes = eina_list_append(codes, cd); 1751 codes = eina_list_append(codes, cd);
@@ -1624,51 +1767,42 @@ ob_collections_group(void)
1624static void 1767static void
1625st_collections_group_name(void) 1768st_collections_group_name(void)
1626{ 1769{
1627 Edje_Part_Collection_Directory_Entry *de, *de_other, *alias; 1770 Edje_Part_Collection_Directory_Entry *older;
1628 Eina_List *l, *l2; 1771 Edje_Part_Collection *current_pc;
1629 1772
1630 check_arg_count(1); 1773 check_arg_count(1);
1631 1774
1632 de = eina_list_data_get(eina_list_last(edje_file->collection_dir->entries)); 1775 current_pc = eina_list_data_get(eina_list_last(edje_collections));
1633 de->entry = parse_str(0); 1776
1634 EINA_LIST_FOREACH(edje_file->collection_dir->entries, l, de_other) 1777 current_de->entry = parse_str(0);
1778 current_pc->part = current_de->entry;
1779
1780 older = eina_hash_find(edje_file->collection, current_de->entry);
1781
1782 if (older)
1635 { 1783 {
1636 if ((de_other != de) && (de_other->entry) && 1784 Edje_Part_Collection *pc;
1637 (!strcmp(de->entry, de_other->entry))) 1785 Eina_List *l;
1786 Code *cd;
1787 int i = 0;
1788
1789 pc = eina_list_nth(edje_collections, older->id);
1790 cd = eina_list_nth(codes, older->id);
1791
1792 eina_hash_del(edje_file->collection, current_de->entry, older);
1793 edje_collections = eina_list_remove(edje_collections, pc);
1794 codes = eina_list_remove(codes, cd);
1795
1796 EINA_LIST_FOREACH(edje_collections, l, pc)
1638 { 1797 {
1639 Old_Edje_Part_Collection *pc; 1798 older = eina_hash_find(edje_file->collection, pc->part);
1640 Code *cd; 1799
1641 int i; 1800 pc->id = i++;
1642 1801 if (older) older->id = pc->id;
1643 pc = eina_list_nth(edje_collections, de_other->id);
1644 cd = eina_list_nth(codes, de_other->id);
1645
1646 edje_file->collection_dir->entries =
1647 eina_list_remove(edje_file->collection_dir->entries, de_other);
1648 edje_collections =
1649 eina_list_remove(edje_collections, pc);
1650 codes =
1651 eina_list_remove(codes, cd);
1652
1653 for (i = 0, l = edje_file->collection_dir->entries; l; l = eina_list_next(l), i++)
1654 {
1655 de_other = eina_list_data_get(l);
1656 for (l2 = aliases; l2; l2 = l2->next)
1657 {
1658 alias = l2->data;
1659 if (alias->id == de_other->id)
1660 alias->id = i;
1661 }
1662 de_other->id = i;
1663 }
1664 for (i = 0, l = edje_collections; l; l = eina_list_next(l), i++)
1665 {
1666 pc = eina_list_data_get(l);
1667 pc->id = i;
1668 }
1669 break;
1670 } 1802 }
1671 } 1803 }
1804
1805 eina_hash_direct_add(edje_file->collection, current_de->entry, current_de);
1672} 1806}
1673 1807
1674/** 1808/**
@@ -1685,7 +1819,7 @@ st_collections_group_name(void)
1685static void 1819static void
1686st_collections_group_script_only(void) 1820st_collections_group_script_only(void)
1687{ 1821{
1688 Old_Edje_Part_Collection *pc; 1822 Edje_Part_Collection *pc;
1689 1823
1690 check_arg_count(1); 1824 check_arg_count(1);
1691 1825
@@ -1696,7 +1830,7 @@ st_collections_group_script_only(void)
1696static void 1830static void
1697st_collections_group_lua_script_only(void) 1831st_collections_group_lua_script_only(void)
1698{ 1832{
1699 Old_Edje_Part_Collection *pc; 1833 Edje_Part_Collection *pc;
1700 1834
1701 check_arg_count(1); 1835 check_arg_count(1);
1702 1836
@@ -1718,13 +1852,12 @@ st_collections_group_lua_script_only(void)
1718static void 1852static void
1719st_collections_group_alias(void) 1853st_collections_group_alias(void)
1720{ 1854{
1721 Edje_Part_Collection_Directory_Entry *de, *alias; 1855 Edje_Part_Collection_Directory_Entry *alias;
1722 1856
1723 check_arg_count(1); 1857 check_arg_count(1);
1724 de = eina_list_data_get(eina_list_last(edje_file->collection_dir->entries));
1725 1858
1726 alias = mem_alloc(SZ(Edje_Part_Collection_Directory_Entry)); 1859 alias = mem_alloc(SZ(Edje_Part_Collection_Directory_Entry));
1727 alias->id = de->id; 1860 alias->id = current_de->id;
1728 alias->entry = parse_str(0); 1861 alias->entry = parse_str(0);
1729 1862
1730 aliases = eina_list_append(aliases, alias); 1863 aliases = eina_list_append(aliases, alias);
@@ -1744,7 +1877,7 @@ st_collections_group_alias(void)
1744static void 1877static void
1745st_collections_group_min(void) 1878st_collections_group_min(void)
1746{ 1879{
1747 Old_Edje_Part_Collection *pc; 1880 Edje_Part_Collection *pc;
1748 1881
1749 check_arg_count(2); 1882 check_arg_count(2);
1750 1883
@@ -1767,7 +1900,7 @@ st_collections_group_min(void)
1767static void 1900static void
1768st_collections_group_max(void) 1901st_collections_group_max(void)
1769{ 1902{
1770 Old_Edje_Part_Collection *pc; 1903 Edje_Part_Collection *pc;
1771 1904
1772 check_arg_count(2); 1905 check_arg_count(2);
1773 1906
@@ -1867,16 +2000,23 @@ ob_collections_group_lua_script(void)
1867static void 2000static void
1868st_collections_group_data_item(void) 2001st_collections_group_data_item(void)
1869{ 2002{
1870 Old_Edje_Part_Collection *pc; 2003 Edje_Part_Collection *pc;
1871 Old_Edje_Data *di; 2004 Edje_String *es;
2005 char *key;
1872 2006
1873 check_arg_count(2); 2007 check_arg_count(2);
1874 2008
1875 pc = eina_list_data_get(eina_list_last(edje_collections)); 2009 pc = eina_list_data_get(eina_list_last(edje_collections));
1876 di = mem_alloc(SZ(Old_Edje_Data)); 2010
1877 di->key = parse_str(0); 2011 if (!pc->data)
1878 di->value = parse_str(1); 2012 pc->data = eina_hash_string_small_new(free);
1879 pc->data = eina_list_append(pc->data, di); 2013
2014 key = parse_str(0);
2015
2016 es = mem_alloc(SZ(Edje_String));
2017 es->str = parse_str(1);
2018
2019 eina_hash_direct_add(pc->data, key, es);
1880} 2020}
1881 2021
1882/** 2022/**
@@ -1898,7 +2038,7 @@ st_collections_group_data_item(void)
1898static void 2038static void
1899st_collections_group_parts_alias(void) 2039st_collections_group_parts_alias(void)
1900{ 2040{
1901 Old_Edje_Part_Collection *pc; 2041 Edje_Part_Collection *pc;
1902 2042
1903 check_arg_count(2); 2043 check_arg_count(2);
1904 2044
@@ -1944,13 +2084,22 @@ st_collections_group_parts_alias(void)
1944static void 2084static void
1945ob_collections_group_parts_part(void) 2085ob_collections_group_parts_part(void)
1946{ 2086{
1947 Old_Edje_Part_Collection *pc; 2087 Edje_Part_Collection *pc;
1948 Old_Edje_Part *ep; 2088 Edje_Part *ep;
2089
2090 ep = mem_alloc(SZ(Edje_Part));
1949 2091
1950 ep = mem_alloc(SZ(Old_Edje_Part));
1951 pc = eina_list_data_get(eina_list_last(edje_collections)); 2092 pc = eina_list_data_get(eina_list_last(edje_collections));
1952 pc->parts = eina_list_append(pc->parts, ep); 2093 pc->parts_count++;
1953 ep->id = eina_list_count(pc->parts) - 1; 2094 pc->parts = realloc(pc->parts, pc->parts_count * sizeof (Edje_Part *));
2095 if (!pc->parts)
2096 {
2097 ERR("%s: Error. Not enought memory.", progname);
2098 exit(-1);
2099 }
2100 pc->parts[pc->parts_count - 1] = ep;
2101
2102 ep->id = pc->parts_count - 1;
1954 ep->type = EDJE_PART_TYPE_IMAGE; 2103 ep->type = EDJE_PART_TYPE_IMAGE;
1955 ep->mouse_events = 1; 2104 ep->mouse_events = 1;
1956 ep->repeat_events = 0; 2105 ep->repeat_events = 0;
@@ -1980,22 +2129,21 @@ ob_collections_group_parts_part(void)
1980static void 2129static void
1981st_collections_group_parts_part_name(void) 2130st_collections_group_parts_part_name(void)
1982{ 2131{
1983 Old_Edje_Part_Collection *pc; 2132 Edje_Part_Collection *pc;
1984 Old_Edje_Part *ep; 2133 Edje_Part *ep;
1985 2134
1986 check_arg_count(1); 2135 check_arg_count(1);
1987 2136
1988 pc = eina_list_data_get(eina_list_last(edje_collections)); 2137 pc = eina_list_data_get(eina_list_last(edje_collections));
1989 ep = eina_list_data_get(eina_list_last(pc->parts)); 2138 ep = pc->parts[pc->parts_count - 1];
1990 ep->name = parse_str(0); 2139 ep->name = parse_str(0);
1991 2140
1992 { 2141 {
1993 Eina_List *l; 2142 unsigned int i;
1994 Old_Edje_Part *lep;
1995 2143
1996 EINA_LIST_FOREACH(pc->parts, l, lep) 2144 for (i = 0; i < pc->parts_count - 1; ++i)
1997 { 2145 {
1998 if ((lep != ep) && (lep->name) && (!strcmp(lep->name, ep->name))) 2146 if (pc->parts[i]->name && (!strcmp(pc->parts[i]->name, ep->name)))
1999 { 2147 {
2000 ERR("%s: Error. parse error %s:%i. There is already a part of the name %s", 2148 ERR("%s: Error. parse error %s:%i. There is already a part of the name %s",
2001 progname, file_in, line - 1, ep->name); 2149 progname, file_in, line - 1, ep->name);
@@ -2028,13 +2176,13 @@ st_collections_group_parts_part_name(void)
2028static void 2176static void
2029st_collections_group_parts_part_type(void) 2177st_collections_group_parts_part_type(void)
2030{ 2178{
2031 Old_Edje_Part_Collection *pc; 2179 Edje_Part_Collection *pc;
2032 Old_Edje_Part *ep; 2180 Edje_Part *ep;
2033 2181
2034 check_arg_count(1); 2182 check_arg_count(1);
2035 2183
2036 pc = eina_list_data_get(eina_list_last(edje_collections)); 2184 pc = eina_list_data_get(eina_list_last(edje_collections));
2037 ep = eina_list_data_get(eina_list_last(pc->parts)); 2185 ep = pc->parts[pc->parts_count - 1];
2038 ep->type = parse_enum(0, 2186 ep->type = parse_enum(0,
2039 "NONE", EDJE_PART_TYPE_NONE, 2187 "NONE", EDJE_PART_TYPE_NONE,
2040 "RECT", EDJE_PART_TYPE_RECTANGLE, 2188 "RECT", EDJE_PART_TYPE_RECTANGLE,
@@ -2047,6 +2195,13 @@ st_collections_group_parts_part_type(void)
2047 "TABLE", EDJE_PART_TYPE_TABLE, 2195 "TABLE", EDJE_PART_TYPE_TABLE,
2048 "EXTERNAL", EDJE_PART_TYPE_EXTERNAL, 2196 "EXTERNAL", EDJE_PART_TYPE_EXTERNAL,
2049 NULL); 2197 NULL);
2198
2199 if (ep->default_desc || ep->other.desc_count > 0)
2200 {
2201 ERR("%s: Error. parse error %s:%i. You can't change type after defining description in part of the name %s",
2202 progname, file_in, line - 1, ep->name);
2203 exit(-1);
2204 }
2050} 2205}
2051 2206
2052/** 2207/**
@@ -2064,13 +2219,13 @@ st_collections_group_parts_part_type(void)
2064static void 2219static void
2065st_collections_group_parts_part_mouse_events(void) 2220st_collections_group_parts_part_mouse_events(void)
2066{ 2221{
2067 Old_Edje_Part_Collection *pc; 2222 Edje_Part_Collection *pc;
2068 Old_Edje_Part *ep; 2223 Edje_Part *ep;
2069 2224
2070 check_arg_count(1); 2225 check_arg_count(1);
2071 2226
2072 pc = eina_list_data_get(eina_list_last(edje_collections)); 2227 pc = eina_list_data_get(eina_list_last(edje_collections));
2073 ep = eina_list_data_get(eina_list_last(pc->parts)); 2228 ep = pc->parts[pc->parts_count - 1];
2074 ep->mouse_events = parse_bool(0); 2229 ep->mouse_events = parse_bool(0);
2075} 2230}
2076 2231
@@ -2088,13 +2243,13 @@ st_collections_group_parts_part_mouse_events(void)
2088static void 2243static void
2089st_collections_group_parts_part_repeat_events(void) 2244st_collections_group_parts_part_repeat_events(void)
2090{ 2245{
2091 Old_Edje_Part_Collection *pc; 2246 Edje_Part_Collection *pc;
2092 Old_Edje_Part *ep; 2247 Edje_Part *ep;
2093 2248
2094 check_arg_count(1); 2249 check_arg_count(1);
2095 2250
2096 pc = eina_list_data_get(eina_list_last(edje_collections)); 2251 pc = eina_list_data_get(eina_list_last(edje_collections));
2097 ep = eina_list_data_get(eina_list_last(pc->parts)); 2252 ep = pc->parts[pc->parts_count - 1];
2098 ep->repeat_events = parse_bool(0); 2253 ep->repeat_events = parse_bool(0);
2099} 2254}
2100 2255
@@ -2116,13 +2271,13 @@ st_collections_group_parts_part_repeat_events(void)
2116static void 2271static void
2117st_collections_group_parts_part_ignore_flags(void) 2272st_collections_group_parts_part_ignore_flags(void)
2118{ 2273{
2119 Old_Edje_Part_Collection *pc; 2274 Edje_Part_Collection *pc;
2120 Old_Edje_Part *ep; 2275 Edje_Part *ep;
2121 2276
2122 check_min_arg_count(1); 2277 check_min_arg_count(1);
2123 2278
2124 pc = eina_list_data_get(eina_list_last(edje_collections)); 2279 pc = eina_list_data_get(eina_list_last(edje_collections));
2125 ep = eina_list_data_get(eina_list_last(pc->parts)); 2280 ep = pc->parts[pc->parts_count - 1];
2126 ep->ignore_flags = parse_flags(0, 2281 ep->ignore_flags = parse_flags(0,
2127 "NONE", EVAS_EVENT_FLAG_NONE, 2282 "NONE", EVAS_EVENT_FLAG_NONE,
2128 "ON_HOLD", EVAS_EVENT_FLAG_ON_HOLD, 2283 "ON_HOLD", EVAS_EVENT_FLAG_ON_HOLD,
@@ -2148,13 +2303,13 @@ st_collections_group_parts_part_ignore_flags(void)
2148static void 2303static void
2149st_collections_group_parts_part_scale(void) 2304st_collections_group_parts_part_scale(void)
2150{ 2305{
2151 Old_Edje_Part_Collection *pc; 2306 Edje_Part_Collection *pc;
2152 Old_Edje_Part *ep; 2307 Edje_Part *ep;
2153 2308
2154 check_arg_count(1); 2309 check_arg_count(1);
2155 2310
2156 pc = eina_list_data_get(eina_list_last(edje_collections)); 2311 pc = eina_list_data_get(eina_list_last(edje_collections));
2157 ep = eina_list_data_get(eina_list_last(pc->parts)); 2312 ep = pc->parts[pc->parts_count - 1];
2158 ep->scale = parse_bool(0); 2313 ep->scale = parse_bool(0);
2159} 2314}
2160 2315
@@ -2177,13 +2332,13 @@ st_collections_group_parts_part_scale(void)
2177static void 2332static void
2178st_collections_group_parts_part_pointer_mode(void) 2333st_collections_group_parts_part_pointer_mode(void)
2179{ 2334{
2180 Old_Edje_Part_Collection *pc; 2335 Edje_Part_Collection *pc;
2181 Old_Edje_Part *ep; 2336 Edje_Part *ep;
2182 2337
2183 check_arg_count(1); 2338 check_arg_count(1);
2184 2339
2185 pc = eina_list_data_get(eina_list_last(edje_collections)); 2340 pc = eina_list_data_get(eina_list_last(edje_collections));
2186 ep = eina_list_data_get(eina_list_last(pc->parts)); 2341 ep = pc->parts[pc->parts_count - 1];
2187 ep->pointer_mode = parse_enum(0, 2342 ep->pointer_mode = parse_enum(0,
2188 "AUTOGRAB", EVAS_OBJECT_POINTER_MODE_AUTOGRAB, 2343 "AUTOGRAB", EVAS_OBJECT_POINTER_MODE_AUTOGRAB,
2189 "NOGRAB", EVAS_OBJECT_POINTER_MODE_NOGRAB, 2344 "NOGRAB", EVAS_OBJECT_POINTER_MODE_NOGRAB,
@@ -2204,13 +2359,13 @@ st_collections_group_parts_part_pointer_mode(void)
2204static void 2359static void
2205st_collections_group_parts_part_precise_is_inside(void) 2360st_collections_group_parts_part_precise_is_inside(void)
2206{ 2361{
2207 Old_Edje_Part_Collection *pc; 2362 Edje_Part_Collection *pc;
2208 Old_Edje_Part *ep; 2363 Edje_Part *ep;
2209 2364
2210 check_arg_count(1); 2365 check_arg_count(1);
2211 2366
2212 pc = eina_list_data_get(eina_list_last(edje_collections)); 2367 pc = eina_list_data_get(eina_list_last(edje_collections));
2213 ep = eina_list_data_get(eina_list_last(pc->parts)); 2368 ep = pc->parts[pc->parts_count - 1];
2214 ep->precise_is_inside = parse_bool(0); 2369 ep->precise_is_inside = parse_bool(0);
2215} 2370}
2216 2371
@@ -2229,13 +2384,13 @@ st_collections_group_parts_part_precise_is_inside(void)
2229static void 2384static void
2230st_collections_group_parts_part_use_alternate_font_metrics(void) 2385st_collections_group_parts_part_use_alternate_font_metrics(void)
2231{ 2386{
2232 Old_Edje_Part_Collection *pc; 2387 Edje_Part_Collection *pc;
2233 Old_Edje_Part *ep; 2388 Edje_Part *ep;
2234 2389
2235 check_arg_count(1); 2390 check_arg_count(1);
2236 2391
2237 pc = eina_list_data_get(eina_list_last(edje_collections)); 2392 pc = eina_list_data_get(eina_list_last(edje_collections));
2238 ep = eina_list_data_get(eina_list_last(pc->parts)); 2393 ep = pc->parts[pc->parts_count - 1];
2239 ep->use_alternate_font_metrics = parse_bool(0); 2394 ep->use_alternate_font_metrics = parse_bool(0);
2240} 2395}
2241 2396
@@ -2253,13 +2408,13 @@ st_collections_group_parts_part_use_alternate_font_metrics(void)
2253static void 2408static void
2254st_collections_group_parts_part_clip_to_id(void) 2409st_collections_group_parts_part_clip_to_id(void)
2255{ 2410{
2256 Old_Edje_Part_Collection *pc; 2411 Edje_Part_Collection *pc;
2257 Old_Edje_Part *ep; 2412 Edje_Part *ep;
2258 2413
2259 check_arg_count(1); 2414 check_arg_count(1);
2260 2415
2261 pc = eina_list_data_get(eina_list_last(edje_collections)); 2416 pc = eina_list_data_get(eina_list_last(edje_collections));
2262 ep = eina_list_data_get(eina_list_last(pc->parts)); 2417 ep = pc->parts[pc->parts_count - 1];
2263 { 2418 {
2264 char *name; 2419 char *name;
2265 2420
@@ -2286,13 +2441,13 @@ st_collections_group_parts_part_clip_to_id(void)
2286static void 2441static void
2287st_collections_group_parts_part_source(void) 2442st_collections_group_parts_part_source(void)
2288{ 2443{
2289 Old_Edje_Part_Collection *pc; 2444 Edje_Part_Collection *pc;
2290 Old_Edje_Part *ep; 2445 Edje_Part *ep;
2291 2446
2292 check_arg_count(1); 2447 check_arg_count(1);
2293 2448
2294 pc = eina_list_data_get(eina_list_last(edje_collections)); 2449 pc = eina_list_data_get(eina_list_last(edje_collections));
2295 ep = eina_list_data_get(eina_list_last(pc->parts)); 2450 ep = pc->parts[pc->parts_count - 1];
2296 2451
2297 //FIXME: validate this somehow (need to decide on the format also) 2452 //FIXME: validate this somehow (need to decide on the format also)
2298 ep->source = parse_str(0); 2453 ep->source = parse_str(0);
@@ -2313,13 +2468,13 @@ st_collections_group_parts_part_source(void)
2313static void 2468static void
2314st_collections_group_parts_part_source2(void) 2469st_collections_group_parts_part_source2(void)
2315{ 2470{
2316 Old_Edje_Part_Collection *pc; 2471 Edje_Part_Collection *pc;
2317 Old_Edje_Part *ep; 2472 Edje_Part *ep;
2318 2473
2319 check_arg_count(1); 2474 check_arg_count(1);
2320 2475
2321 pc = eina_list_data_get(eina_list_last(edje_collections)); 2476 pc = eina_list_data_get(eina_list_last(edje_collections));
2322 ep = eina_list_data_get(eina_list_last(pc->parts)); 2477 ep = pc->parts[pc->parts_count - 1];
2323 2478
2324 //FIXME: validate this somehow (need to decide on the format also) 2479 //FIXME: validate this somehow (need to decide on the format also)
2325 ep->source2 = parse_str(0); 2480 ep->source2 = parse_str(0);
@@ -2340,13 +2495,13 @@ st_collections_group_parts_part_source2(void)
2340static void 2495static void
2341st_collections_group_parts_part_source3(void) 2496st_collections_group_parts_part_source3(void)
2342{ 2497{
2343 Old_Edje_Part_Collection *pc; 2498 Edje_Part_Collection *pc;
2344 Old_Edje_Part *ep; 2499 Edje_Part *ep;
2345 2500
2346 check_arg_count(1); 2501 check_arg_count(1);
2347 2502
2348 pc = eina_list_data_get(eina_list_last(edje_collections)); 2503 pc = eina_list_data_get(eina_list_last(edje_collections));
2349 ep = eina_list_data_get(eina_list_last(pc->parts)); 2504 ep = pc->parts[pc->parts_count - 1];
2350 2505
2351 //FIXME: validate this somehow (need to decide on the format also) 2506 //FIXME: validate this somehow (need to decide on the format also)
2352 ep->source3 = parse_str(0); 2507 ep->source3 = parse_str(0);
@@ -2367,13 +2522,13 @@ st_collections_group_parts_part_source3(void)
2367static void 2522static void
2368st_collections_group_parts_part_source4(void) 2523st_collections_group_parts_part_source4(void)
2369{ 2524{
2370 Old_Edje_Part_Collection *pc; 2525 Edje_Part_Collection *pc;
2371 Old_Edje_Part *ep; 2526 Edje_Part *ep;
2372 2527
2373 check_arg_count(1); 2528 check_arg_count(1);
2374 2529
2375 pc = eina_list_data_get(eina_list_last(edje_collections)); 2530 pc = eina_list_data_get(eina_list_last(edje_collections));
2376 ep = eina_list_data_get(eina_list_last(pc->parts)); 2531 ep = pc->parts[pc->parts_count - 1];
2377 2532
2378 //FIXME: validate this somehow (need to decide on the format also) 2533 //FIXME: validate this somehow (need to decide on the format also)
2379 ep->source4 = parse_str(0); 2534 ep->source4 = parse_str(0);
@@ -2394,13 +2549,13 @@ st_collections_group_parts_part_source4(void)
2394static void 2549static void
2395st_collections_group_parts_part_source5(void) 2550st_collections_group_parts_part_source5(void)
2396{ 2551{
2397 Old_Edje_Part_Collection *pc; 2552 Edje_Part_Collection *pc;
2398 Old_Edje_Part *ep; 2553 Edje_Part *ep;
2399 2554
2400 check_arg_count(1); 2555 check_arg_count(1);
2401 2556
2402 pc = eina_list_data_get(eina_list_last(edje_collections)); 2557 pc = eina_list_data_get(eina_list_last(edje_collections));
2403 ep = eina_list_data_get(eina_list_last(pc->parts)); 2558 ep = pc->parts[pc->parts_count - 1];
2404 2559
2405 //FIXME: validate this somehow (need to decide on the format also) 2560 //FIXME: validate this somehow (need to decide on the format also)
2406 ep->source5 = parse_str(0); 2561 ep->source5 = parse_str(0);
@@ -2421,13 +2576,13 @@ st_collections_group_parts_part_source5(void)
2421static void 2576static void
2422st_collections_group_parts_part_source6(void) 2577st_collections_group_parts_part_source6(void)
2423{ 2578{
2424 Old_Edje_Part_Collection *pc; 2579 Edje_Part_Collection *pc;
2425 Old_Edje_Part *ep; 2580 Edje_Part *ep;
2426 2581
2427 check_arg_count(1); 2582 check_arg_count(1);
2428 2583
2429 pc = eina_list_data_get(eina_list_last(edje_collections)); 2584 pc = eina_list_data_get(eina_list_last(edje_collections));
2430 ep = eina_list_data_get(eina_list_last(pc->parts)); 2585 ep = pc->parts[pc->parts_count - 1];
2431 2586
2432 //FIXME: validate this somehow (need to decide on the format also) 2587 //FIXME: validate this somehow (need to decide on the format also)
2433 ep->source6 = parse_str(0); 2588 ep->source6 = parse_str(0);
@@ -2457,13 +2612,13 @@ st_collections_group_parts_part_source6(void)
2457static void 2612static void
2458st_collections_group_parts_part_effect(void) 2613st_collections_group_parts_part_effect(void)
2459{ 2614{
2460 Old_Edje_Part_Collection *pc; 2615 Edje_Part_Collection *pc;
2461 Old_Edje_Part *ep; 2616 Edje_Part *ep;
2462 2617
2463 check_arg_count(1); 2618 check_arg_count(1);
2464 2619
2465 pc = eina_list_data_get(eina_list_last(edje_collections)); 2620 pc = eina_list_data_get(eina_list_last(edje_collections));
2466 ep = eina_list_data_get(eina_list_last(pc->parts)); 2621 ep = pc->parts[pc->parts_count - 1];
2467 ep->effect = parse_enum(0, 2622 ep->effect = parse_enum(0,
2468 "NONE", EDJE_TEXT_EFFECT_NONE, 2623 "NONE", EDJE_TEXT_EFFECT_NONE,
2469 "PLAIN", EDJE_TEXT_EFFECT_PLAIN, 2624 "PLAIN", EDJE_TEXT_EFFECT_PLAIN,
@@ -2501,13 +2656,13 @@ st_collections_group_parts_part_effect(void)
2501static void 2656static void
2502st_collections_group_parts_part_entry_mode(void) 2657st_collections_group_parts_part_entry_mode(void)
2503{ 2658{
2504 Old_Edje_Part_Collection *pc; 2659 Edje_Part_Collection *pc;
2505 Old_Edje_Part *ep; 2660 Edje_Part *ep;
2506 2661
2507 check_arg_count(1); 2662 check_arg_count(1);
2508 2663
2509 pc = eina_list_data_get(eina_list_last(edje_collections)); 2664 pc = eina_list_data_get(eina_list_last(edje_collections));
2510 ep = eina_list_data_get(eina_list_last(pc->parts)); 2665 ep = pc->parts[pc->parts_count - 1];
2511 ep->entry_mode = parse_enum(0, 2666 ep->entry_mode = parse_enum(0,
2512 "NONE", EDJE_ENTRY_EDIT_MODE_NONE, 2667 "NONE", EDJE_ENTRY_EDIT_MODE_NONE,
2513 "PLAIN", EDJE_ENTRY_EDIT_MODE_SELECTABLE, 2668 "PLAIN", EDJE_ENTRY_EDIT_MODE_SELECTABLE,
@@ -2535,13 +2690,13 @@ st_collections_group_parts_part_entry_mode(void)
2535static void 2690static void
2536st_collections_group_parts_part_select_mode(void) 2691st_collections_group_parts_part_select_mode(void)
2537{ 2692{
2538 Old_Edje_Part_Collection *pc; 2693 Edje_Part_Collection *pc;
2539 Old_Edje_Part *ep; 2694 Edje_Part *ep;
2540 2695
2541 check_arg_count(1); 2696 check_arg_count(1);
2542 2697
2543 pc = eina_list_data_get(eina_list_last(edje_collections)); 2698 pc = eina_list_data_get(eina_list_last(edje_collections));
2544 ep = eina_list_data_get(eina_list_last(pc->parts)); 2699 ep = pc->parts[pc->parts_count - 1];
2545 ep->select_mode = parse_enum(0, 2700 ep->select_mode = parse_enum(0,
2546 "DEFAULT", EDJE_ENTRY_SELECTION_MODE_DEFAULT, 2701 "DEFAULT", EDJE_ENTRY_SELECTION_MODE_DEFAULT,
2547 "EXPLICIT", EDJE_ENTRY_SELECTION_MODE_EXPLICIT, 2702 "EXPLICIT", EDJE_ENTRY_SELECTION_MODE_EXPLICIT,
@@ -2562,13 +2717,13 @@ st_collections_group_parts_part_select_mode(void)
2562static void 2717static void
2563st_collections_group_parts_part_multiline(void) 2718st_collections_group_parts_part_multiline(void)
2564{ 2719{
2565 Old_Edje_Part_Collection *pc; 2720 Edje_Part_Collection *pc;
2566 Old_Edje_Part *ep; 2721 Edje_Part *ep;
2567 2722
2568 check_arg_count(1); 2723 check_arg_count(1);
2569 2724
2570 pc = eina_list_data_get(eina_list_last(edje_collections)); 2725 pc = eina_list_data_get(eina_list_last(edje_collections));
2571 ep = eina_list_data_get(eina_list_last(pc->parts)); 2726 ep = pc->parts[pc->parts_count - 1];
2572 ep->multiline = parse_bool(0); 2727 ep->multiline = parse_bool(0);
2573} 2728}
2574 2729
@@ -2612,13 +2767,13 @@ st_collections_group_parts_part_multiline(void)
2612static void 2767static void
2613st_collections_group_parts_part_dragable_x(void) 2768st_collections_group_parts_part_dragable_x(void)
2614{ 2769{
2615 Old_Edje_Part_Collection *pc; 2770 Edje_Part_Collection *pc;
2616 Old_Edje_Part *ep; 2771 Edje_Part *ep;
2617 2772
2618 check_arg_count(3); 2773 check_arg_count(3);
2619 2774
2620 pc = eina_list_data_get(eina_list_last(edje_collections)); 2775 pc = eina_list_data_get(eina_list_last(edje_collections));
2621 ep = eina_list_data_get(eina_list_last(pc->parts)); 2776 ep = pc->parts[pc->parts_count - 1];
2622 ep->dragable.x = parse_int_range(0, -1, 1); 2777 ep->dragable.x = parse_int_range(0, -1, 1);
2623 ep->dragable.step_x = parse_int_range(1, 0, 0x7fffffff); 2778 ep->dragable.step_x = parse_int_range(1, 0, 0x7fffffff);
2624 ep->dragable.count_x = parse_int_range(2, 0, 0x7fffffff); 2779 ep->dragable.count_x = parse_int_range(2, 0, 0x7fffffff);
@@ -2642,13 +2797,13 @@ st_collections_group_parts_part_dragable_x(void)
2642static void 2797static void
2643st_collections_group_parts_part_dragable_y(void) 2798st_collections_group_parts_part_dragable_y(void)
2644{ 2799{
2645 Old_Edje_Part_Collection *pc; 2800 Edje_Part_Collection *pc;
2646 Old_Edje_Part *ep; 2801 Edje_Part *ep;
2647 2802
2648 check_arg_count(3); 2803 check_arg_count(3);
2649 2804
2650 pc = eina_list_data_get(eina_list_last(edje_collections)); 2805 pc = eina_list_data_get(eina_list_last(edje_collections));
2651 ep = eina_list_data_get(eina_list_last(pc->parts)); 2806 ep = pc->parts[pc->parts_count - 1];
2652 ep->dragable.y = parse_int_range(0, -1, 1); 2807 ep->dragable.y = parse_int_range(0, -1, 1);
2653 ep->dragable.step_y = parse_int_range(1, 0, 0x7fffffff); 2808 ep->dragable.step_y = parse_int_range(1, 0, 0x7fffffff);
2654 ep->dragable.count_y = parse_int_range(2, 0, 0x7fffffff); 2809 ep->dragable.count_y = parse_int_range(2, 0, 0x7fffffff);
@@ -2669,13 +2824,13 @@ st_collections_group_parts_part_dragable_y(void)
2669static void 2824static void
2670st_collections_group_parts_part_dragable_confine(void) 2825st_collections_group_parts_part_dragable_confine(void)
2671{ 2826{
2672 Old_Edje_Part_Collection *pc; 2827 Edje_Part_Collection *pc;
2673 Old_Edje_Part *ep; 2828 Edje_Part *ep;
2674 2829
2675 check_arg_count(1); 2830 check_arg_count(1);
2676 2831
2677 pc = eina_list_data_get(eina_list_last(edje_collections)); 2832 pc = eina_list_data_get(eina_list_last(edje_collections));
2678 ep = eina_list_data_get(eina_list_last(pc->parts)); 2833 ep = pc->parts[pc->parts_count - 1];
2679 { 2834 {
2680 char *name; 2835 char *name;
2681 2836
@@ -2699,13 +2854,13 @@ st_collections_group_parts_part_dragable_confine(void)
2699static void 2854static void
2700st_collections_group_parts_part_dragable_events(void) 2855st_collections_group_parts_part_dragable_events(void)
2701{ 2856{
2702 Old_Edje_Part_Collection *pc; 2857 Edje_Part_Collection *pc;
2703 Old_Edje_Part *ep; 2858 Edje_Part *ep;
2704 2859
2705 check_arg_count(1); 2860 check_arg_count(1);
2706 2861
2707 pc = eina_list_data_get(eina_list_last(edje_collections)); 2862 pc = eina_list_data_get(eina_list_last(edje_collections));
2708 ep = eina_list_data_get(eina_list_last(pc->parts)); 2863 ep = pc->parts[pc->parts_count - 1];
2709 { 2864 {
2710 char *name; 2865 char *name;
2711 2866
@@ -2750,12 +2905,12 @@ st_collections_group_parts_part_dragable_events(void)
2750*/ 2905*/
2751static void ob_collections_group_parts_part_box_items_item(void) 2906static void ob_collections_group_parts_part_box_items_item(void)
2752{ 2907{
2753 Old_Edje_Part_Collection *pc; 2908 Edje_Part_Collection *pc;
2754 Old_Edje_Part *ep; 2909 Edje_Part *ep;
2755 Edje_Pack_Element *item; 2910 Edje_Pack_Element *item;
2756 2911
2757 pc = eina_list_data_get(eina_list_last(edje_collections)); 2912 pc = eina_list_data_get(eina_list_last(edje_collections));
2758 ep = eina_list_data_get(eina_list_last(pc->parts)); 2913 ep = pc->parts[pc->parts_count - 1];
2759 2914
2760 if ((ep->type != EDJE_PART_TYPE_BOX) && (ep->type != EDJE_PART_TYPE_TABLE)) 2915 if ((ep->type != EDJE_PART_TYPE_BOX) && (ep->type != EDJE_PART_TYPE_TABLE))
2761 { 2916 {
@@ -2765,8 +2920,16 @@ static void ob_collections_group_parts_part_box_items_item(void)
2765 exit(-1); 2920 exit(-1);
2766 } 2921 }
2767 2922
2923 ep->items_count++;
2924 ep->items = realloc(ep->items, sizeof (Edje_Pack_Element*) * ep->items_count);
2925 if (!ep->items)
2926 {
2927 ERR("%s: Error. Not enought memory.", progname);
2928 exit(-1);
2929 }
2930
2768 item = mem_alloc(SZ(Edje_Pack_Element)); 2931 item = mem_alloc(SZ(Edje_Pack_Element));
2769 ep->items = eina_list_append(ep->items, item); 2932 ep->items[ep->items_count - 1] = item;
2770 item->type = EDJE_PART_TYPE_GROUP; 2933 item->type = EDJE_PART_TYPE_GROUP;
2771 item->name = NULL; 2934 item->name = NULL;
2772 item->source = NULL; 2935 item->source = NULL;
@@ -2806,16 +2969,15 @@ static void ob_collections_group_parts_part_box_items_item(void)
2806*/ 2969*/
2807static void st_collections_group_parts_part_box_items_item_type(void) 2970static void st_collections_group_parts_part_box_items_item_type(void)
2808{ 2971{
2809 Old_Edje_Part_Collection *pc; 2972 Edje_Part_Collection *pc;
2810 Old_Edje_Part *ep; 2973 Edje_Part *ep;
2811 Edje_Pack_Element *item; 2974 Edje_Pack_Element *item;
2812 2975
2813 check_arg_count(1); 2976 check_arg_count(1);
2814 2977
2815 pc = eina_list_data_get(eina_list_last(edje_collections)); 2978 pc = eina_list_data_get(eina_list_last(edje_collections));
2816 ep = eina_list_data_get(eina_list_last(pc->parts)); 2979 ep = pc->parts[pc->parts_count - 1];
2817 2980 item = ep->items[ep->items_count - 1];
2818 item = eina_list_data_get(eina_list_last(ep->items));
2819 2981
2820 { 2982 {
2821 char *s; 2983 char *s;
@@ -2845,16 +3007,16 @@ static void st_collections_group_parts_part_box_items_item_type(void)
2845*/ 3007*/
2846static void st_collections_group_parts_part_box_items_item_name(void) 3008static void st_collections_group_parts_part_box_items_item_name(void)
2847{ 3009{
2848 Old_Edje_Part_Collection *pc; 3010 Edje_Part_Collection *pc;
2849 Old_Edje_Part *ep; 3011 Edje_Part *ep;
2850 Edje_Pack_Element *item; 3012 Edje_Pack_Element *item;
2851 3013
2852 check_arg_count(1); 3014 check_arg_count(1);
2853 3015
2854 pc = eina_list_data_get(eina_list_last(edje_collections)); 3016 pc = eina_list_data_get(eina_list_last(edje_collections));
2855 ep = eina_list_data_get(eina_list_last(pc->parts)); 3017 ep = pc->parts[pc->parts_count - 1];
3018 item = ep->items[ep->items_count - 1];
2856 3019
2857 item = eina_list_data_get(eina_list_last(ep->items));
2858 item->name = parse_str(0); 3020 item->name = parse_str(0);
2859} 3021}
2860 3022
@@ -2870,16 +3032,16 @@ static void st_collections_group_parts_part_box_items_item_name(void)
2870*/ 3032*/
2871static void st_collections_group_parts_part_box_items_item_source(void) 3033static void st_collections_group_parts_part_box_items_item_source(void)
2872{ 3034{
2873 Old_Edje_Part_Collection *pc; 3035 Edje_Part_Collection *pc;
2874 Old_Edje_Part *ep; 3036 Edje_Part *ep;
2875 Edje_Pack_Element *item; 3037 Edje_Pack_Element *item;
2876 3038
2877 check_arg_count(1); 3039 check_arg_count(1);
2878 3040
2879 pc = eina_list_data_get(eina_list_last(edje_collections)); 3041 pc = eina_list_data_get(eina_list_last(edje_collections));
2880 ep = eina_list_data_get(eina_list_last(pc->parts)); 3042 ep = pc->parts[pc->parts_count - 1];
3043 item = ep->items[ep->items_count - 1];
2881 3044
2882 item = eina_list_data_get(eina_list_last(ep->items));
2883 item->source = parse_str(0); 3045 item->source = parse_str(0);
2884} 3046}
2885 3047
@@ -2895,16 +3057,16 @@ static void st_collections_group_parts_part_box_items_item_source(void)
2895*/ 3057*/
2896static void st_collections_group_parts_part_box_items_item_min(void) 3058static void st_collections_group_parts_part_box_items_item_min(void)
2897{ 3059{
2898 Old_Edje_Part_Collection *pc; 3060 Edje_Part_Collection *pc;
2899 Old_Edje_Part *ep; 3061 Edje_Part *ep;
2900 Edje_Pack_Element *item; 3062 Edje_Pack_Element *item;
2901 3063
2902 check_arg_count(2); 3064 check_arg_count(2);
2903 3065
2904 pc = eina_list_data_get(eina_list_last(edje_collections)); 3066 pc = eina_list_data_get(eina_list_last(edje_collections));
2905 ep = eina_list_data_get(eina_list_last(pc->parts)); 3067 ep = pc->parts[pc->parts_count - 1];
3068 item = ep->items[ep->items_count - 1];
2906 3069
2907 item = eina_list_data_get(eina_list_last(ep->items));
2908 item->min.w = parse_int_range(0, 0, 0x7ffffff); 3070 item->min.w = parse_int_range(0, 0, 0x7ffffff);
2909 item->min.h = parse_int_range(1, 0, 0x7ffffff); 3071 item->min.h = parse_int_range(1, 0, 0x7ffffff);
2910} 3072}
@@ -2921,16 +3083,16 @@ static void st_collections_group_parts_part_box_items_item_min(void)
2921*/ 3083*/
2922static void st_collections_group_parts_part_box_items_item_prefer(void) 3084static void st_collections_group_parts_part_box_items_item_prefer(void)
2923{ 3085{
2924 Old_Edje_Part_Collection *pc; 3086 Edje_Part_Collection *pc;
2925 Old_Edje_Part *ep; 3087 Edje_Part *ep;
2926 Edje_Pack_Element *item; 3088 Edje_Pack_Element *item;
2927 3089
2928 check_arg_count(2); 3090 check_arg_count(2);
2929 3091
2930 pc = eina_list_data_get(eina_list_last(edje_collections)); 3092 pc = eina_list_data_get(eina_list_last(edje_collections));
2931 ep = eina_list_data_get(eina_list_last(pc->parts)); 3093 ep = pc->parts[pc->parts_count - 1];
3094 item = ep->items[ep->items_count - 1];
2932 3095
2933 item = eina_list_data_get(eina_list_last(ep->items));
2934 item->prefer.w = parse_int_range(0, 0, 0x7ffffff); 3096 item->prefer.w = parse_int_range(0, 0, 0x7ffffff);
2935 item->prefer.h = parse_int_range(1, 0, 0x7ffffff); 3097 item->prefer.h = parse_int_range(1, 0, 0x7ffffff);
2936} 3098}
@@ -2946,16 +3108,16 @@ static void st_collections_group_parts_part_box_items_item_prefer(void)
2946*/ 3108*/
2947static void st_collections_group_parts_part_box_items_item_max(void) 3109static void st_collections_group_parts_part_box_items_item_max(void)
2948{ 3110{
2949 Old_Edje_Part_Collection *pc; 3111 Edje_Part_Collection *pc;
2950 Old_Edje_Part *ep; 3112 Edje_Part *ep;
2951 Edje_Pack_Element *item; 3113 Edje_Pack_Element *item;
2952 3114
2953 check_arg_count(2); 3115 check_arg_count(2);
2954 3116
2955 pc = eina_list_data_get(eina_list_last(edje_collections)); 3117 pc = eina_list_data_get(eina_list_last(edje_collections));
2956 ep = eina_list_data_get(eina_list_last(pc->parts)); 3118 ep = pc->parts[pc->parts_count - 1];
3119 item = ep->items[ep->items_count - 1];
2957 3120
2958 item = eina_list_data_get(eina_list_last(ep->items));
2959 item->max.w = parse_int_range(0, 0, 0x7ffffff); 3121 item->max.w = parse_int_range(0, 0, 0x7ffffff);
2960 item->max.h = parse_int_range(1, 0, 0x7ffffff); 3122 item->max.h = parse_int_range(1, 0, 0x7ffffff);
2961} 3123}
@@ -2972,16 +3134,16 @@ static void st_collections_group_parts_part_box_items_item_max(void)
2972*/ 3134*/
2973static void st_collections_group_parts_part_box_items_item_padding(void) 3135static void st_collections_group_parts_part_box_items_item_padding(void)
2974{ 3136{
2975 Old_Edje_Part_Collection *pc; 3137 Edje_Part_Collection *pc;
2976 Old_Edje_Part *ep; 3138 Edje_Part *ep;
2977 Edje_Pack_Element *item; 3139 Edje_Pack_Element *item;
2978 3140
2979 check_arg_count(4); 3141 check_arg_count(4);
2980 3142
2981 pc = eina_list_data_get(eina_list_last(edje_collections)); 3143 pc = eina_list_data_get(eina_list_last(edje_collections));
2982 ep = eina_list_data_get(eina_list_last(pc->parts)); 3144 ep = pc->parts[pc->parts_count - 1];
3145 item = ep->items[ep->items_count - 1];
2983 3146
2984 item = eina_list_data_get(eina_list_last(ep->items));
2985 item->padding.l = parse_int_range(0, 0, 0x7ffffff); 3147 item->padding.l = parse_int_range(0, 0, 0x7ffffff);
2986 item->padding.r = parse_int_range(1, 0, 0x7ffffff); 3148 item->padding.r = parse_int_range(1, 0, 0x7ffffff);
2987 item->padding.t = parse_int_range(2, 0, 0x7ffffff); 3149 item->padding.t = parse_int_range(2, 0, 0x7ffffff);
@@ -3000,16 +3162,16 @@ static void st_collections_group_parts_part_box_items_item_padding(void)
3000*/ 3162*/
3001static void st_collections_group_parts_part_box_items_item_align(void) 3163static void st_collections_group_parts_part_box_items_item_align(void)
3002{ 3164{
3003 Old_Edje_Part_Collection *pc; 3165 Edje_Part_Collection *pc;
3004 Old_Edje_Part *ep; 3166 Edje_Part *ep;
3005 Edje_Pack_Element *item; 3167 Edje_Pack_Element *item;
3006 3168
3007 check_arg_count(2); 3169 check_arg_count(2);
3008 3170
3009 pc = eina_list_data_get(eina_list_last(edje_collections)); 3171 pc = eina_list_data_get(eina_list_last(edje_collections));
3010 ep = eina_list_data_get(eina_list_last(pc->parts)); 3172 ep = pc->parts[pc->parts_count - 1];
3173 item = ep->items[ep->items_count - 1];
3011 3174
3012 item = eina_list_data_get(eina_list_last(ep->items));
3013 item->align.x = FROM_DOUBLE(parse_float_range(0, -1.0, 1.0)); 3175 item->align.x = FROM_DOUBLE(parse_float_range(0, -1.0, 1.0));
3014 item->align.y = FROM_DOUBLE(parse_float_range(1, -1.0, 1.0)); 3176 item->align.y = FROM_DOUBLE(parse_float_range(1, -1.0, 1.0));
3015} 3177}
@@ -3026,16 +3188,16 @@ static void st_collections_group_parts_part_box_items_item_align(void)
3026*/ 3188*/
3027static void st_collections_group_parts_part_box_items_item_weight(void) 3189static void st_collections_group_parts_part_box_items_item_weight(void)
3028{ 3190{
3029 Old_Edje_Part_Collection *pc; 3191 Edje_Part_Collection *pc;
3030 Old_Edje_Part *ep; 3192 Edje_Part *ep;
3031 Edje_Pack_Element *item; 3193 Edje_Pack_Element *item;
3032 3194
3033 check_arg_count(2); 3195 check_arg_count(2);
3034 3196
3035 pc = eina_list_data_get(eina_list_last(edje_collections)); 3197 pc = eina_list_data_get(eina_list_last(edje_collections));
3036 ep = eina_list_data_get(eina_list_last(pc->parts)); 3198 ep = pc->parts[pc->parts_count - 1];
3199 item = ep->items[ep->items_count - 1];
3037 3200
3038 item = eina_list_data_get(eina_list_last(ep->items));
3039 item->weight.x = FROM_DOUBLE(parse_float_range(0, 0.0, 99999.99)); 3201 item->weight.x = FROM_DOUBLE(parse_float_range(0, 0.0, 99999.99));
3040 item->weight.y = FROM_DOUBLE(parse_float_range(1, 0.0, 99999.99)); 3202 item->weight.y = FROM_DOUBLE(parse_float_range(1, 0.0, 99999.99));
3041} 3203}
@@ -3052,16 +3214,16 @@ static void st_collections_group_parts_part_box_items_item_weight(void)
3052*/ 3214*/
3053static void st_collections_group_parts_part_box_items_item_aspect(void) 3215static void st_collections_group_parts_part_box_items_item_aspect(void)
3054{ 3216{
3055 Old_Edje_Part_Collection *pc; 3217 Edje_Part_Collection *pc;
3056 Old_Edje_Part *ep; 3218 Edje_Part *ep;
3057 Edje_Pack_Element *item; 3219 Edje_Pack_Element *item;
3058 3220
3059 check_arg_count(2); 3221 check_arg_count(2);
3060 3222
3061 pc = eina_list_data_get(eina_list_last(edje_collections)); 3223 pc = eina_list_data_get(eina_list_last(edje_collections));
3062 ep = eina_list_data_get(eina_list_last(pc->parts)); 3224 ep = pc->parts[pc->parts_count - 1];
3225 item = ep->items[ep->items_count - 1];
3063 3226
3064 item = eina_list_data_get(eina_list_last(ep->items));
3065 item->aspect.w = parse_int_range(0, 0, 0x7fffffff); 3227 item->aspect.w = parse_int_range(0, 0, 0x7fffffff);
3066 item->aspect.h = parse_int_range(1, 0, 0x7fffffff); 3228 item->aspect.h = parse_int_range(1, 0, 0x7fffffff);
3067} 3229}
@@ -3078,16 +3240,16 @@ static void st_collections_group_parts_part_box_items_item_aspect(void)
3078*/ 3240*/
3079static void st_collections_group_parts_part_box_items_item_aspect_mode(void) 3241static void st_collections_group_parts_part_box_items_item_aspect_mode(void)
3080{ 3242{
3081 Old_Edje_Part_Collection *pc; 3243 Edje_Part_Collection *pc;
3082 Old_Edje_Part *ep; 3244 Edje_Part *ep;
3083 Edje_Pack_Element *item; 3245 Edje_Pack_Element *item;
3084 3246
3085 check_arg_count(1); 3247 check_arg_count(1);
3086 3248
3087 pc = eina_list_data_get(eina_list_last(edje_collections)); 3249 pc = eina_list_data_get(eina_list_last(edje_collections));
3088 ep = eina_list_data_get(eina_list_last(pc->parts)); 3250 ep = pc->parts[pc->parts_count - 1];
3251 item = ep->items[ep->items_count - 1];
3089 3252
3090 item = eina_list_data_get(eina_list_last(ep->items));
3091 item->aspect.mode = parse_enum(0, 3253 item->aspect.mode = parse_enum(0,
3092 "NONE", EDJE_ASPECT_CONTROL_NONE, 3254 "NONE", EDJE_ASPECT_CONTROL_NONE,
3093 "NEITHER", EDJE_ASPECT_CONTROL_NEITHER, 3255 "NEITHER", EDJE_ASPECT_CONTROL_NEITHER,
@@ -3109,16 +3271,16 @@ static void st_collections_group_parts_part_box_items_item_aspect_mode(void)
3109*/ 3271*/
3110static void st_collections_group_parts_part_box_items_item_options(void) 3272static void st_collections_group_parts_part_box_items_item_options(void)
3111{ 3273{
3112 Old_Edje_Part_Collection *pc; 3274 Edje_Part_Collection *pc;
3113 Old_Edje_Part *ep; 3275 Edje_Part *ep;
3114 Edje_Pack_Element *item; 3276 Edje_Pack_Element *item;
3115 3277
3116 check_arg_count(1); 3278 check_arg_count(1);
3117 3279
3118 pc = eina_list_data_get(eina_list_last(edje_collections)); 3280 pc = eina_list_data_get(eina_list_last(edje_collections));
3119 ep = eina_list_data_get(eina_list_last(pc->parts)); 3281 ep = pc->parts[pc->parts_count - 1];
3282 item = ep->items[ep->items_count - 1];
3120 3283
3121 item = eina_list_data_get(eina_list_last(ep->items));
3122 item->options = parse_str(0); 3284 item->options = parse_str(0);
3123} 3285}
3124 3286
@@ -3135,14 +3297,15 @@ static void st_collections_group_parts_part_box_items_item_options(void)
3135*/ 3297*/
3136static void st_collections_group_parts_part_table_items_item_position(void) 3298static void st_collections_group_parts_part_table_items_item_position(void)
3137{ 3299{
3138 Old_Edje_Part_Collection *pc; 3300 Edje_Part_Collection *pc;
3139 Old_Edje_Part *ep; 3301 Edje_Part *ep;
3140 Edje_Pack_Element *item; 3302 Edje_Pack_Element *item;
3141 3303
3142 check_arg_count(2); 3304 check_arg_count(2);
3143 3305
3144 pc = eina_list_data_get(eina_list_last(edje_collections)); 3306 pc = eina_list_data_get(eina_list_last(edje_collections));
3145 ep = eina_list_data_get(eina_list_last(pc->parts)); 3307 ep = pc->parts[pc->parts_count - 1];
3308 item = ep->items[ep->items_count - 1];
3146 3309
3147 if (ep->type != EDJE_PART_TYPE_TABLE) 3310 if (ep->type != EDJE_PART_TYPE_TABLE)
3148 { 3311 {
@@ -3151,8 +3314,7 @@ static void st_collections_group_parts_part_table_items_item_position(void)
3151 progname, file_in, line - 1); 3314 progname, file_in, line - 1);
3152 exit(-1); 3315 exit(-1);
3153 } 3316 }
3154 3317
3155 item = eina_list_data_get(eina_list_last(ep->items));
3156 item->col = parse_int_range(0, 0, 0xffff); 3318 item->col = parse_int_range(0, 0, 0xffff);
3157 item->row = parse_int_range(1, 0, 0xffff); 3319 item->row = parse_int_range(1, 0, 0xffff);
3158} 3320}
@@ -3170,14 +3332,15 @@ static void st_collections_group_parts_part_table_items_item_position(void)
3170*/ 3332*/
3171static void st_collections_group_parts_part_table_items_item_span(void) 3333static void st_collections_group_parts_part_table_items_item_span(void)
3172{ 3334{
3173 Old_Edje_Part_Collection *pc; 3335 Edje_Part_Collection *pc;
3174 Old_Edje_Part *ep; 3336 Edje_Part *ep;
3175 Edje_Pack_Element *item; 3337 Edje_Pack_Element *item;
3176 3338
3177 check_arg_count(2); 3339 check_arg_count(2);
3178 3340
3179 pc = eina_list_data_get(eina_list_last(edje_collections)); 3341 pc = eina_list_data_get(eina_list_last(edje_collections));
3180 ep = eina_list_data_get(eina_list_last(pc->parts)); 3342 ep = pc->parts[pc->parts_count - 1];
3343 item = ep->items[ep->items_count - 1];
3181 3344
3182 if (ep->type != EDJE_PART_TYPE_TABLE) 3345 if (ep->type != EDJE_PART_TYPE_TABLE)
3183 { 3346 {
@@ -3187,7 +3350,6 @@ static void st_collections_group_parts_part_table_items_item_span(void)
3187 exit(-1); 3350 exit(-1);
3188 } 3351 }
3189 3352
3190 item = eina_list_data_get(eina_list_last(ep->items));
3191 item->colspan = parse_int_range(0, 1, 0xffff); 3353 item->colspan = parse_int_range(0, 1, 0xffff);
3192 item->rowspan = parse_int_range(1, 1, 0xffff); 3354 item->rowspan = parse_int_range(1, 1, 0xffff);
3193} 3355}
@@ -3229,93 +3391,70 @@ static void st_collections_group_parts_part_table_items_item_span(void)
3229static void 3391static void
3230ob_collections_group_parts_part_description(void) 3392ob_collections_group_parts_part_description(void)
3231{ 3393{
3232 Old_Edje_Part_Collection *pc; 3394 Edje_Part_Collection *pc;
3233 Old_Edje_Part *ep; 3395 Edje_Part *ep;
3234 Old_Edje_Part_Description *ed; 3396 Edje_Part_Description_Common *ed;
3235 3397
3236 pc = eina_list_data_get(eina_list_last(edje_collections)); 3398 pc = eina_list_data_get(eina_list_last(edje_collections));
3237 ep = eina_list_data_get(eina_list_last(pc->parts)); 3399 ep = pc->parts[pc->parts_count - 1];
3238 ed = mem_alloc(SZ(Old_Edje_Part_Description)); 3400
3401 ed = _edje_part_description_alloc(ep->type, pc->part, ep->name);
3402
3239 if (!ep->default_desc) 3403 if (!ep->default_desc)
3240 ep->default_desc = ed; 3404 {
3405 ep->default_desc = ed;
3406 }
3241 else 3407 else
3242 ep->other_desc = eina_list_append(ep->other_desc, ed); 3408 {
3243 ed->common.visible = 1; 3409 ep->other.desc_count++;
3244 ed->common.align.x = FROM_DOUBLE(0.5); 3410 ep->other.desc = realloc(ep->other.desc,
3245 ed->common.align.y = FROM_DOUBLE(0.5); 3411 sizeof (Edje_Part_Description_Common*) * ep->other.desc_count);
3246 ed->common.min.w = 0; 3412 ep->other.desc[ep->other.desc_count - 1] = ed;
3247 ed->common.min.h = 0; 3413 }
3248 ed->common.fixed.w = 0; 3414
3249 ed->common.fixed.h = 0; 3415 ed->visible = 1;
3250 ed->common.max.w = -1; 3416 ed->align.x = FROM_DOUBLE(0.5);
3251 ed->common.max.h = -1; 3417 ed->align.y = FROM_DOUBLE(0.5);
3252 ed->common.rel1.relative_x = FROM_DOUBLE(0.0); 3418 ed->min.w = 0;
3253 ed->common.rel1.relative_y = FROM_DOUBLE(0.0); 3419 ed->min.h = 0;
3254 ed->common.rel1.offset_x = 0; 3420 ed->fixed.w = 0;
3255 ed->common.rel1.offset_y = 0; 3421 ed->fixed.h = 0;
3256 ed->common.rel1.id_x = -1; 3422 ed->max.w = -1;
3257 ed->common.rel1.id_y = -1; 3423 ed->max.h = -1;
3258 ed->common.rel2.relative_x = FROM_DOUBLE(1.0); 3424 ed->rel1.relative_x = FROM_DOUBLE(0.0);
3259 ed->common.rel2.relative_y = FROM_DOUBLE(1.0); 3425 ed->rel1.relative_y = FROM_DOUBLE(0.0);
3260 ed->common.rel2.offset_x = -1; 3426 ed->rel1.offset_x = 0;
3261 ed->common.rel2.offset_y = -1; 3427 ed->rel1.offset_y = 0;
3262 ed->common.rel2.id_x = -1; 3428 ed->rel1.id_x = -1;
3263 ed->common.rel2.id_y = -1; 3429 ed->rel1.id_y = -1;
3264 ed->image.id = -1; 3430 ed->rel2.relative_x = FROM_DOUBLE(1.0);
3265 ed->image.fill.smooth = 1; 3431 ed->rel2.relative_y = FROM_DOUBLE(1.0);
3266 ed->image.fill.pos_rel_x = FROM_DOUBLE(0.0); 3432 ed->rel2.offset_x = -1;
3267 ed->image.fill.pos_abs_x = 0; 3433 ed->rel2.offset_y = -1;
3268 ed->image.fill.rel_x = FROM_DOUBLE(1.0); 3434 ed->rel2.id_x = -1;
3269 ed->image.fill.abs_x = 0; 3435 ed->rel2.id_y = -1;
3270 ed->image.fill.pos_rel_y = FROM_DOUBLE(0.0); 3436 ed->color_class = NULL;
3271 ed->image.fill.pos_abs_y = 0; 3437 ed->color.r = 255;
3272 ed->image.fill.rel_y = FROM_DOUBLE(1.0); 3438 ed->color.g = 255;
3273 ed->image.fill.abs_y = 0; 3439 ed->color.b = 255;
3274 ed->image.fill.angle = 0; 3440 ed->color.a = 255;
3275 ed->image.fill.spread = 0; 3441 ed->color2.r = 0;
3276 ed->image.fill.type = EDJE_FILL_TYPE_SCALE; 3442 ed->color2.g = 0;
3277 ed->common.color_class = NULL; 3443 ed->color2.b = 0;
3278 ed->common.color.r = 255; 3444 ed->color2.a = 255;
3279 ed->common.color.g = 255; 3445 ed->map.id_persp = -1;
3280 ed->common.color.b = 255; 3446 ed->map.id_light = -1;
3281 ed->common.color.a = 255; 3447 ed->map.rot.id_center = -1;
3282 ed->common.color2.r = 0; 3448 ed->map.rot.x = FROM_DOUBLE(0.0);
3283 ed->common.color2.g = 0; 3449 ed->map.rot.y = FROM_DOUBLE(0.0);
3284 ed->common.color2.b = 0; 3450 ed->map.rot.z = FROM_DOUBLE(0.0);
3285 ed->common.color2.a = 255; 3451 ed->map.on = 0;
3286 ed->text.color3.r = 0; 3452 ed->map.smooth = 1;
3287 ed->text.color3.g = 0; 3453 ed->map.alpha = 1;
3288 ed->text.color3.b = 0; 3454 ed->map.backcull = 0;
3289 ed->text.color3.a = 128; 3455 ed->map.persp_on = 0;
3290 ed->text.align.x = FROM_DOUBLE(0.5); 3456 ed->persp.zplane = 0;
3291 ed->text.align.y = FROM_DOUBLE(0.5); 3457 ed->persp.focal = 1000;
3292 ed->text.id_source = -1;
3293 ed->text.id_text_source = -1;
3294 ed->box.layout = NULL;
3295 ed->box.alt_layout = NULL;
3296 ed->box.align.x = FROM_DOUBLE(0.5);
3297 ed->box.align.y = FROM_DOUBLE(0.5);
3298 ed->box.padding.x = 0;
3299 ed->box.padding.y = 0;
3300 ed->table.homogeneous = EDJE_OBJECT_TABLE_HOMOGENEOUS_NONE;
3301 ed->table.align.x = FROM_DOUBLE(0.5);
3302 ed->table.align.y = FROM_DOUBLE(0.5);
3303 ed->table.padding.x = 0;
3304 ed->table.padding.y = 0;
3305 ed->common.map.id_persp = -1;
3306 ed->common.map.id_light = -1;
3307 ed->common.map.rot.id_center = -1;
3308 ed->common.map.rot.x = FROM_DOUBLE(0.0);
3309 ed->common.map.rot.y = FROM_DOUBLE(0.0);
3310 ed->common.map.rot.z = FROM_DOUBLE(0.0);
3311 ed->common.map.on = 0;
3312 ed->common.map.smooth = 1;
3313 ed->common.map.alpha = 1;
3314 ed->common.map.backcull = 0;
3315 ed->common.map.persp_on = 0;
3316 ed->common.persp.zplane = 0;
3317 ed->common.persp.focal = 1000;
3318 ed->external_params = NULL;
3319} 3458}
3320 3459
3321/** 3460/**
@@ -3334,10 +3473,9 @@ ob_collections_group_parts_part_description(void)
3334static void 3473static void
3335st_collections_group_parts_part_description_inherit(void) 3474st_collections_group_parts_part_description_inherit(void)
3336{ 3475{
3337 Old_Edje_Part_Collection *pc; 3476 Edje_Part_Collection *pc;
3338 Old_Edje_Part *ep; 3477 Edje_Part *ep;
3339 Old_Edje_Part_Description *ed, *parent = NULL; 3478 Edje_Part_Description_Common *ed, *parent = NULL;
3340 Eina_List *l;
3341 Edje_Part_Image_Id *iid; 3479 Edje_Part_Image_Id *iid;
3342 char *parent_name; 3480 char *parent_name;
3343 const char *state_name; 3481 const char *state_name;
@@ -3346,10 +3484,10 @@ st_collections_group_parts_part_description_inherit(void)
3346 check_arg_count(2); 3484 check_arg_count(2);
3347 3485
3348 pc = eina_list_data_get(eina_list_last(edje_collections)); 3486 pc = eina_list_data_get(eina_list_last(edje_collections));
3349 ep = eina_list_data_get(eina_list_last(pc->parts)); 3487 ep = pc->parts[pc->parts_count - 1];
3350 3488
3351 /* inherit may not be used in the default description */ 3489 /* inherit may not be used in the default description */
3352 if (!ep->other_desc) 3490 if (!ep->other.desc_count)
3353 { 3491 {
3354 ERR("%s: Error. parse error %s:%i. " 3492 ERR("%s: Error. parse error %s:%i. "
3355 "inherit may not be used in the default description", 3493 "inherit may not be used in the default description",
@@ -3357,9 +3495,9 @@ st_collections_group_parts_part_description_inherit(void)
3357 exit(-1); 3495 exit(-1);
3358 } 3496 }
3359 3497
3360 ed = eina_list_data_get(eina_list_last(ep->other_desc)); 3498 ed = ep->other.desc[ep->other.desc_count - 1];
3361 3499
3362 if (!ed->common.state.name) 3500 if (!ed->state.name)
3363 { 3501 {
3364 ERR("%s: Error. parse error %s:%i. " 3502 ERR("%s: Error. parse error %s:%i. "
3365 "inherit may only be used after state", 3503 "inherit may only be used after state",
@@ -3375,22 +3513,25 @@ st_collections_group_parts_part_description_inherit(void)
3375 parent = ep->default_desc; 3513 parent = ep->default_desc;
3376 else 3514 else
3377 { 3515 {
3516 Edje_Part_Description_Common *d;
3378 double min_dst = 999.0; 3517 double min_dst = 999.0;
3379 Old_Edje_Part_Description *d; 3518 unsigned int i;
3380 3519
3381 if (!strcmp(parent_name, "default")) 3520 if (!strcmp(parent_name, "default"))
3382 { 3521 {
3383 parent = ep->default_desc; 3522 parent = ep->default_desc;
3384 min_dst = ABS(ep->default_desc->common.state.value - parent_val); 3523 min_dst = ABS(ep->default_desc->state.value - parent_val);
3385 } 3524 }
3386 3525
3387 EINA_LIST_FOREACH(ep->other_desc, l, d) 3526 for (i = 0; i < ep->other.desc_count; ++i)
3388 { 3527 {
3389 if (!strcmp (d->common.state.name, parent_name)) 3528 d = ep->other.desc[i];
3529
3530 if (!strcmp (d->state.name, parent_name))
3390 { 3531 {
3391 double dst; 3532 double dst;
3392 3533
3393 dst = ABS(d->common.state.value - parent_val); 3534 dst = ABS(d->state.value - parent_val);
3394 if (dst < min_dst) 3535 if (dst < min_dst)
3395 { 3536 {
3396 parent = d; 3537 parent = d;
@@ -3408,61 +3549,118 @@ st_collections_group_parts_part_description_inherit(void)
3408 exit(-1); 3549 exit(-1);
3409 } 3550 }
3410 3551
3411 free (parent_name); 3552 free(parent_name);
3412 3553
3413 /* now do a full copy, only state info will be kept */ 3554 /* now do a full copy, only state info will be kept */
3414 state_name = ed->common.state.name; 3555 state_name = ed->state.name;
3415 state_val = ed->common.state.value; 3556 state_val = ed->state.value;
3416 3557
3417 *ed = *parent; 3558 *ed = *parent;
3418 3559
3419 ed->common.state.name = state_name; 3560 ed->state.name = state_name;
3420 ed->common.state.value = state_val; 3561 ed->state.value = state_val;
3421 3562
3422 data_queue_part_slave_lookup(&parent->common.rel1.id_x, &ed->common.rel1.id_x); 3563 data_queue_part_slave_lookup(&parent->rel1.id_x, &ed->rel1.id_x);
3423 data_queue_part_slave_lookup(&parent->common.rel1.id_y, &ed->common.rel1.id_y); 3564 data_queue_part_slave_lookup(&parent->rel1.id_y, &ed->rel1.id_y);
3424 data_queue_part_slave_lookup(&parent->common.rel2.id_x, &ed->common.rel2.id_x); 3565 data_queue_part_slave_lookup(&parent->rel2.id_x, &ed->rel2.id_x);
3425 data_queue_part_slave_lookup(&parent->common.rel2.id_y, &ed->common.rel2.id_y); 3566 data_queue_part_slave_lookup(&parent->rel2.id_y, &ed->rel2.id_y);
3426 data_queue_image_slave_lookup(&parent->image.id, &ed->image.id);
3427 3567
3428 /* make sure all the allocated memory is getting copied, not just 3568 /* make sure all the allocated memory is getting copied, not just
3429 * referenced 3569 * referenced
3430 */ 3570 */
3431 ed->image.tween_list = NULL; 3571#define STRDUP(x) x ? strdup(x) : NULL
3432 3572
3433 EINA_LIST_FOREACH(parent->image.tween_list, l, iid) 3573 ed->color_class = STRDUP(ed->color_class);
3574 switch (ep->type)
3434 { 3575 {
3435 Edje_Part_Image_Id *iid_new; 3576 case EDJE_PART_TYPE_RECTANGLE:
3436 3577 case EDJE_PART_TYPE_SWALLOW:
3437 iid_new = mem_alloc(SZ(Edje_Part_Image_Id)); 3578 case EDJE_PART_TYPE_GROUP:
3438 data_queue_image_slave_lookup(&(iid->id), &(iid_new->id)); 3579 /* Nothing todo, this part only have a common description. */
3439 ed->image.tween_list = eina_list_append(ed->image.tween_list, iid_new); 3580 break;
3581 case EDJE_PART_TYPE_TEXT:
3582 case EDJE_PART_TYPE_TEXTBLOCK:
3583 {
3584 Edje_Part_Description_Text *ted = (Edje_Part_Description_Text*) ed;
3585 Edje_Part_Description_Text *tparent = (Edje_Part_Description_Text*) parent;
3586
3587 ted->text = tparent->text;
3588
3589 ted->text.text.str = STRDUP(ted->text.text.str);
3590 ted->text.text_class = STRDUP(ted->text.text_class);
3591 ted->text.font.str = STRDUP(ted->text.font.str);
3592
3593 data_queue_part_slave_lookup(&(tparent->text.id_source), &(ted->text.id_source));
3594 data_queue_part_slave_lookup(&(tparent->text.id_text_source), &(ted->text.id_text_source));
3595
3596 break;
3597 }
3598 case EDJE_PART_TYPE_IMAGE:
3599 {
3600 Edje_Part_Description_Image *ied = (Edje_Part_Description_Image *) ed;
3601 Edje_Part_Description_Image *iparent = (Edje_Part_Description_Image *) parent;
3602 unsigned int i;
3603
3604 ied->image = iparent->image;
3605
3606 data_queue_image_slave_lookup(&iparent->image.id, &ied->image.id);
3607
3608 ied->image.tweens = calloc(iparent->image.tweens_count,
3609 sizeof (Edje_Part_Image_Id*));
3610 for (i = 0; i < iparent->image.tweens_count; i++)
3611 {
3612 Edje_Part_Image_Id *iid_new;
3613
3614 iid = iparent->image.tweens[i];
3615
3616 iid_new = mem_alloc(SZ(Edje_Part_Image_Id));
3617 data_queue_image_slave_lookup(&(iid->id), &(iid_new->id));
3618 ied->image.tweens[i] = iid_new;
3619 }
3620
3621 break;
3622 }
3623 case EDJE_PART_TYPE_BOX:
3624 {
3625 Edje_Part_Description_Box *bed = (Edje_Part_Description_Box *) ed;
3626 Edje_Part_Description_Box *bparent = (Edje_Part_Description_Box *) parent;
3627
3628 bed->box = bparent->box;
3629
3630 break;
3631 }
3632 case EDJE_PART_TYPE_TABLE:
3633 {
3634 Edje_Part_Description_Table *ted = (Edje_Part_Description_Table *) ed;
3635 Edje_Part_Description_Table *tparent = (Edje_Part_Description_Table *) parent;
3636
3637 ted->table = tparent->table;
3638
3639 break;
3640 }
3641 case EDJE_PART_TYPE_EXTERNAL:
3642 {
3643 Edje_Part_Description_External *eed = (Edje_Part_Description_External *) ed;
3644 Edje_Part_Description_External *eparent = (Edje_Part_Description_External *) parent;
3645
3646 if (eparent->external_params)
3647 {
3648 Eina_List *l;
3649 Edje_External_Param *param, *new_param;
3650
3651 eed->external_params = NULL;
3652 EINA_LIST_FOREACH(eparent->external_params, l, param)
3653 {
3654 new_param = mem_alloc(SZ(Edje_External_Param));
3655 *new_param = *param;
3656 eed->external_params = eina_list_append(eed->external_params, new_param);
3657 }
3658 }
3659 break;
3660 }
3440 } 3661 }
3441 3662
3442#define STRDUP(x) x ? strdup(x) : NULL
3443
3444 ed->common.color_class = STRDUP(ed->common.color_class);
3445 ed->text.text.str = STRDUP(ed->text.text.str);
3446 ed->text.text_class = STRDUP(ed->text.text_class);
3447 ed->text.font.str = STRDUP(ed->text.font.str);
3448#undef STRDUP 3663#undef STRDUP
3449
3450 data_queue_part_slave_lookup(&(parent->text.id_source), &(ed->text.id_source));
3451 data_queue_part_slave_lookup(&(parent->text.id_text_source), &(ed->text.id_text_source));
3452
3453 if (parent->external_params)
3454 {
3455 Eina_List *l;
3456 Edje_External_Param *param, *new_param;
3457
3458 ed->external_params = NULL;
3459 EINA_LIST_FOREACH(parent->external_params, l, param)
3460 {
3461 new_param = mem_alloc(SZ(Edje_External_Param));
3462 *new_param = *param;
3463 ed->external_params = eina_list_append(ed->external_params, new_param);
3464 }
3465 }
3466} 3664}
3467 3665
3468/** 3666/**
@@ -3482,17 +3680,18 @@ st_collections_group_parts_part_description_inherit(void)
3482static void 3680static void
3483st_collections_group_parts_part_description_state(void) 3681st_collections_group_parts_part_description_state(void)
3484{ 3682{
3485 Old_Edje_Part_Collection *pc; 3683 Edje_Part_Collection *pc;
3486 Old_Edje_Part *ep; 3684 Edje_Part *ep;
3487 Old_Edje_Part_Description *ed; 3685 Edje_Part_Description_Common *ed;
3488 char *s; 3686 char *s;
3489 3687
3490 check_arg_count(2); 3688 check_arg_count(2);
3491 3689
3492 pc = eina_list_data_get(eina_list_last(edje_collections)); 3690 pc = eina_list_data_get(eina_list_last(edje_collections));
3493 ep = eina_list_data_get(eina_list_last(pc->parts)); 3691 ep = pc->parts[pc->parts_count - 1];
3692
3494 ed = ep->default_desc; 3693 ed = ep->default_desc;
3495 if (ep->other_desc) ed = eina_list_data_get(eina_list_last(ep->other_desc)); 3694 if (ep->other.desc_count) ed = ep->other.desc[ep->other.desc_count - 1];
3496 3695
3497 s = parse_str(0); 3696 s = parse_str(0);
3498 if (!strcmp (s, "custom")) 3697 if (!strcmp (s, "custom"))
@@ -3503,8 +3702,8 @@ st_collections_group_parts_part_description_state(void)
3503 exit(-1); 3702 exit(-1);
3504 } 3703 }
3505 3704
3506 ed->common.state.name = s; 3705 ed->state.name = s;
3507 ed->common.state.value = parse_float_range(1, 0.0, 1.0); 3706 ed->state.value = parse_float_range(1, 0.0, 1.0);
3508} 3707}
3509 3708
3510/** 3709/**
@@ -3521,17 +3720,19 @@ st_collections_group_parts_part_description_state(void)
3521static void 3720static void
3522st_collections_group_parts_part_description_visible(void) 3721st_collections_group_parts_part_description_visible(void)
3523{ 3722{
3524 Old_Edje_Part_Collection *pc; 3723 Edje_Part_Collection *pc;
3525 Old_Edje_Part *ep; 3724 Edje_Part *ep;
3526 Old_Edje_Part_Description *ed; 3725 Edje_Part_Description_Common *ed;
3527 3726
3528 check_arg_count(1); 3727 check_arg_count(1);
3529 3728
3530 pc = eina_list_data_get(eina_list_last(edje_collections)); 3729 pc = eina_list_data_get(eina_list_last(edje_collections));
3531 ep = eina_list_data_get(eina_list_last(pc->parts)); 3730 ep = pc->parts[pc->parts_count - 1];
3731
3532 ed = ep->default_desc; 3732 ed = ep->default_desc;
3533 if (ep->other_desc) ed = eina_list_data_get(eina_list_last(ep->other_desc)); 3733 if (ep->other.desc_count) ed = ep->other.desc[ep->other.desc_count - 1];
3534 ed->common.visible = parse_bool(0); 3734
3735 ed->visible = parse_bool(0);
3535} 3736}
3536 3737
3537/** 3738/**
@@ -3549,18 +3750,20 @@ st_collections_group_parts_part_description_visible(void)
3549static void 3750static void
3550st_collections_group_parts_part_description_align(void) 3751st_collections_group_parts_part_description_align(void)
3551{ 3752{
3552 Old_Edje_Part_Collection *pc; 3753 Edje_Part_Collection *pc;
3553 Old_Edje_Part *ep; 3754 Edje_Part *ep;
3554 Old_Edje_Part_Description *ed; 3755 Edje_Part_Description_Common *ed;
3555 3756
3556 check_arg_count(2); 3757 check_arg_count(2);
3557 3758
3558 pc = eina_list_data_get(eina_list_last(edje_collections)); 3759 pc = eina_list_data_get(eina_list_last(edje_collections));
3559 ep = eina_list_data_get(eina_list_last(pc->parts)); 3760 ep = pc->parts[pc->parts_count - 1];
3761
3560 ed = ep->default_desc; 3762 ed = ep->default_desc;
3561 if (ep->other_desc) ed = eina_list_data_get(eina_list_last(ep->other_desc)); 3763 if (ep->other.desc_count) ed = ep->other.desc[ep->other.desc_count - 1];
3562 ed->common.align.x = FROM_DOUBLE(parse_float_range(0, 0.0, 1.0)); 3764
3563 ed->common.align.y = FROM_DOUBLE(parse_float_range(1, 0.0, 1.0)); 3765 ed->align.x = FROM_DOUBLE(parse_float_range(0, 0.0, 1.0));
3766 ed->align.y = FROM_DOUBLE(parse_float_range(1, 0.0, 1.0));
3564} 3767}
3565 3768
3566/** 3769/**
@@ -3580,18 +3783,20 @@ st_collections_group_parts_part_description_align(void)
3580static void 3783static void
3581st_collections_group_parts_part_description_fixed(void) 3784st_collections_group_parts_part_description_fixed(void)
3582{ 3785{
3583 Old_Edje_Part_Collection *pc; 3786 Edje_Part_Collection *pc;
3584 Old_Edje_Part *ep; 3787 Edje_Part *ep;
3585 Old_Edje_Part_Description *ed; 3788 Edje_Part_Description_Common *ed;
3586 3789
3587 check_arg_count(2); 3790 check_arg_count(2);
3588 3791
3589 pc = eina_list_data_get(eina_list_last(edje_collections)); 3792 pc = eina_list_data_get(eina_list_last(edje_collections));
3590 ep = eina_list_data_get(eina_list_last(pc->parts)); 3793 ep = pc->parts[pc->parts_count - 1];
3794
3591 ed = ep->default_desc; 3795 ed = ep->default_desc;
3592 if (ep->other_desc) ed = eina_list_data_get(eina_list_last(ep->other_desc)); 3796 if (ep->other.desc_count) ed = ep->other.desc[ep->other.desc_count - 1];
3593 ed->common.fixed.w = parse_float_range(0, 0, 1); 3797
3594 ed->common.fixed.h = parse_float_range(1, 0, 1); 3798 ed->fixed.w = parse_float_range(0, 0, 1);
3799 ed->fixed.h = parse_float_range(1, 0, 1);
3595} 3800}
3596 3801
3597/** 3802/**
@@ -3607,18 +3812,20 @@ st_collections_group_parts_part_description_fixed(void)
3607static void 3812static void
3608st_collections_group_parts_part_description_min(void) 3813st_collections_group_parts_part_description_min(void)
3609{ 3814{
3610 Old_Edje_Part_Collection *pc; 3815 Edje_Part_Collection *pc;
3611 Old_Edje_Part *ep; 3816 Edje_Part *ep;
3612 Old_Edje_Part_Description *ed; 3817 Edje_Part_Description_Common *ed;
3613 3818
3614 check_arg_count(2); 3819 check_arg_count(2);
3615 3820
3616 pc = eina_list_data_get(eina_list_last(edje_collections)); 3821 pc = eina_list_data_get(eina_list_last(edje_collections));
3617 ep = eina_list_data_get(eina_list_last(pc->parts)); 3822 ep = pc->parts[pc->parts_count - 1];
3823
3618 ed = ep->default_desc; 3824 ed = ep->default_desc;
3619 if (ep->other_desc) ed = eina_list_data_get(eina_list_last(ep->other_desc)); 3825 if (ep->other.desc_count) ed = ep->other.desc[ep->other.desc_count - 1];
3620 ed->common.min.w = parse_float_range(0, 0, 0x7fffffff); 3826
3621 ed->common.min.h = parse_float_range(1, 0, 0x7fffffff); 3827 ed->min.w = parse_float_range(0, 0, 0x7fffffff);
3828 ed->min.h = parse_float_range(1, 0, 0x7fffffff);
3622} 3829}
3623 3830
3624/** 3831/**
@@ -3634,18 +3841,20 @@ st_collections_group_parts_part_description_min(void)
3634static void 3841static void
3635st_collections_group_parts_part_description_max(void) 3842st_collections_group_parts_part_description_max(void)
3636{ 3843{
3637 Old_Edje_Part_Collection *pc; 3844 Edje_Part_Collection *pc;
3638 Old_Edje_Part *ep; 3845 Edje_Part *ep;
3639 Old_Edje_Part_Description *ed; 3846 Edje_Part_Description_Common *ed;
3640 3847
3641 check_arg_count(2); 3848 check_arg_count(2);
3642 3849
3643 pc = eina_list_data_get(eina_list_last(edje_collections)); 3850 pc = eina_list_data_get(eina_list_last(edje_collections));
3644 ep = eina_list_data_get(eina_list_last(pc->parts)); 3851 ep = pc->parts[pc->parts_count - 1];
3852
3645 ed = ep->default_desc; 3853 ed = ep->default_desc;
3646 if (ep->other_desc) ed = eina_list_data_get(eina_list_last(ep->other_desc)); 3854 if (ep->other.desc_count) ed = ep->other.desc[ep->other.desc_count - 1];
3647 ed->common.max.w = parse_float_range(0, 0, 0x7fffffff); 3855
3648 ed->common.max.h = parse_float_range(1, 0, 0x7fffffff); 3856 ed->max.w = parse_float_range(0, 0, 0x7fffffff);
3857 ed->max.h = parse_float_range(1, 0, 0x7fffffff);
3649} 3858}
3650 3859
3651/** 3860/**
@@ -3663,18 +3872,20 @@ st_collections_group_parts_part_description_max(void)
3663static void 3872static void
3664st_collections_group_parts_part_description_step(void) 3873st_collections_group_parts_part_description_step(void)
3665{ 3874{
3666 Old_Edje_Part_Collection *pc; 3875 Edje_Part_Collection *pc;
3667 Old_Edje_Part *ep; 3876 Edje_Part *ep;
3668 Old_Edje_Part_Description *ed; 3877 Edje_Part_Description_Common *ed;
3669 3878
3670 check_arg_count(2); 3879 check_arg_count(2);
3671 3880
3672 pc = eina_list_data_get(eina_list_last(edje_collections)); 3881 pc = eina_list_data_get(eina_list_last(edje_collections));
3673 ep = eina_list_data_get(eina_list_last(pc->parts)); 3882 ep = pc->parts[pc->parts_count - 1];
3883
3674 ed = ep->default_desc; 3884 ed = ep->default_desc;
3675 if (ep->other_desc) ed = eina_list_data_get(eina_list_last(ep->other_desc)); 3885 if (ep->other.desc_count) ed = ep->other.desc[ep->other.desc_count - 1];
3676 ed->common.step.x = parse_float_range(0, 0, 0x7fffffff); 3886
3677 ed->common.step.y = parse_float_range(1, 0, 0x7fffffff); 3887 ed->step.x = parse_float_range(0, 0, 0x7fffffff);
3888 ed->step.y = parse_float_range(1, 0, 0x7fffffff);
3678} 3889}
3679 3890
3680/** 3891/**
@@ -3694,18 +3905,20 @@ st_collections_group_parts_part_description_step(void)
3694static void 3905static void
3695st_collections_group_parts_part_description_aspect(void) 3906st_collections_group_parts_part_description_aspect(void)
3696{ 3907{
3697 Old_Edje_Part_Collection *pc; 3908 Edje_Part_Collection *pc;
3698 Old_Edje_Part *ep; 3909 Edje_Part *ep;
3699 Old_Edje_Part_Description *ed; 3910 Edje_Part_Description_Common *ed;
3700 3911
3701 check_arg_count(2); 3912 check_arg_count(2);
3702 3913
3703 pc = eina_list_data_get(eina_list_last(edje_collections)); 3914 pc = eina_list_data_get(eina_list_last(edje_collections));
3704 ep = eina_list_data_get(eina_list_last(pc->parts)); 3915 ep = pc->parts[pc->parts_count - 1];
3916
3705 ed = ep->default_desc; 3917 ed = ep->default_desc;
3706 if (ep->other_desc) ed = eina_list_data_get(eina_list_last(ep->other_desc)); 3918 if (ep->other.desc_count) ed = ep->other.desc[ep->other.desc_count - 1];
3707 ed->common.aspect.min = FROM_DOUBLE(parse_float_range(0, 0.0, 999999999.0)); 3919
3708 ed->common.aspect.max = FROM_DOUBLE(parse_float_range(1, 0.0, 999999999.0)); 3920 ed->aspect.min = FROM_DOUBLE(parse_float_range(0, 0.0, 999999999.0));
3921 ed->aspect.max = FROM_DOUBLE(parse_float_range(1, 0.0, 999999999.0));
3709} 3922}
3710 3923
3711/** 3924/**
@@ -3722,22 +3935,24 @@ st_collections_group_parts_part_description_aspect(void)
3722static void 3935static void
3723st_collections_group_parts_part_description_aspect_preference(void) 3936st_collections_group_parts_part_description_aspect_preference(void)
3724{ 3937{
3725 Old_Edje_Part_Collection *pc; 3938 Edje_Part_Collection *pc;
3726 Old_Edje_Part *ep; 3939 Edje_Part *ep;
3727 Old_Edje_Part_Description *ed; 3940 Edje_Part_Description_Common *ed;
3728 3941
3729 check_arg_count(1); 3942 check_arg_count(1);
3730 3943
3731 pc = eina_list_data_get(eina_list_last(edje_collections)); 3944 pc = eina_list_data_get(eina_list_last(edje_collections));
3732 ep = eina_list_data_get(eina_list_last(pc->parts)); 3945 ep = pc->parts[pc->parts_count - 1];
3946
3733 ed = ep->default_desc; 3947 ed = ep->default_desc;
3734 if (ep->other_desc) ed = eina_list_data_get(eina_list_last(ep->other_desc)); 3948 if (ep->other.desc_count) ed = ep->other.desc[ep->other.desc_count - 1];
3735 ed->common.aspect.prefer = parse_enum(0, 3949
3736 "NONE", EDJE_ASPECT_PREFER_NONE, 3950 ed->aspect.prefer = parse_enum(0,
3737 "VERTICAL", EDJE_ASPECT_PREFER_VERTICAL, 3951 "NONE", EDJE_ASPECT_PREFER_NONE,
3738 "HORIZONTAL", EDJE_ASPECT_PREFER_HORIZONTAL, 3952 "VERTICAL", EDJE_ASPECT_PREFER_VERTICAL,
3739 "BOTH", EDJE_ASPECT_PREFER_BOTH, 3953 "HORIZONTAL", EDJE_ASPECT_PREFER_HORIZONTAL,
3740 NULL); 3954 "BOTH", EDJE_ASPECT_PREFER_BOTH,
3955 NULL);
3741} 3956}
3742 3957
3743/** 3958/**
@@ -3755,17 +3970,19 @@ st_collections_group_parts_part_description_aspect_preference(void)
3755static void 3970static void
3756st_collections_group_parts_part_description_color_class(void) 3971st_collections_group_parts_part_description_color_class(void)
3757{ 3972{
3758 Old_Edje_Part_Collection *pc; 3973 Edje_Part_Collection *pc;
3759 Old_Edje_Part *ep; 3974 Edje_Part *ep;
3760 Old_Edje_Part_Description *ed; 3975 Edje_Part_Description_Common *ed;
3761 3976
3762 check_arg_count(1); 3977 check_arg_count(1);
3763 3978
3764 pc = eina_list_data_get(eina_list_last(edje_collections)); 3979 pc = eina_list_data_get(eina_list_last(edje_collections));
3765 ep = eina_list_data_get(eina_list_last(pc->parts)); 3980 ep = pc->parts[pc->parts_count - 1];
3981
3766 ed = ep->default_desc; 3982 ed = ep->default_desc;
3767 if (ep->other_desc) ed = eina_list_data_get(eina_list_last(ep->other_desc)); 3983 if (ep->other.desc_count) ed = ep->other.desc[ep->other.desc_count - 1];
3768 ed->common.color_class = parse_str(0); 3984
3985 ed->color_class = parse_str(0);
3769} 3986}
3770 3987
3771/** 3988/**
@@ -3781,20 +3998,22 @@ st_collections_group_parts_part_description_color_class(void)
3781static void 3998static void
3782st_collections_group_parts_part_description_color(void) 3999st_collections_group_parts_part_description_color(void)
3783{ 4000{
3784 Old_Edje_Part_Collection *pc; 4001 Edje_Part_Collection *pc;
3785 Old_Edje_Part *ep; 4002 Edje_Part *ep;
3786 Old_Edje_Part_Description *ed; 4003 Edje_Part_Description_Common *ed;
3787 4004
3788 check_arg_count(4); 4005 check_arg_count(4);
3789 4006
3790 pc = eina_list_data_get(eina_list_last(edje_collections)); 4007 pc = eina_list_data_get(eina_list_last(edje_collections));
3791 ep = eina_list_data_get(eina_list_last(pc->parts)); 4008 ep = pc->parts[pc->parts_count - 1];
4009
3792 ed = ep->default_desc; 4010 ed = ep->default_desc;
3793 if (ep->other_desc) ed = eina_list_data_get(eina_list_last(ep->other_desc)); 4011 if (ep->other.desc_count) ed = ep->other.desc[ep->other.desc_count - 1];
3794 ed->common.color.r = parse_int_range(0, 0, 255); 4012
3795 ed->common.color.g = parse_int_range(1, 0, 255); 4013 ed->color.r = parse_int_range(0, 0, 255);
3796 ed->common.color.b = parse_int_range(2, 0, 255); 4014 ed->color.g = parse_int_range(1, 0, 255);
3797 ed->common.color.a = parse_int_range(3, 0, 255); 4015 ed->color.b = parse_int_range(2, 0, 255);
4016 ed->color.a = parse_int_range(3, 0, 255);
3798} 4017}
3799 4018
3800/** 4019/**
@@ -3810,20 +4029,22 @@ st_collections_group_parts_part_description_color(void)
3810static void 4029static void
3811st_collections_group_parts_part_description_color2(void) 4030st_collections_group_parts_part_description_color2(void)
3812{ 4031{
3813 Old_Edje_Part_Collection *pc; 4032 Edje_Part_Collection *pc;
3814 Old_Edje_Part *ep; 4033 Edje_Part *ep;
3815 Old_Edje_Part_Description *ed; 4034 Edje_Part_Description_Common *ed;
3816 4035
3817 check_arg_count(4); 4036 check_arg_count(4);
3818 4037
3819 pc = eina_list_data_get(eina_list_last(edje_collections)); 4038 pc = eina_list_data_get(eina_list_last(edje_collections));
3820 ep = eina_list_data_get(eina_list_last(pc->parts)); 4039 ep = pc->parts[pc->parts_count - 1];
4040
3821 ed = ep->default_desc; 4041 ed = ep->default_desc;
3822 if (ep->other_desc) ed = eina_list_data_get(eina_list_last(ep->other_desc)); 4042 if (ep->other.desc_count) ed = ep->other.desc[ep->other.desc_count - 1];
3823 ed->common.color2.r = parse_int_range(0, 0, 255); 4043
3824 ed->common.color2.g = parse_int_range(1, 0, 255); 4044 ed->color2.r = parse_int_range(0, 0, 255);
3825 ed->common.color2.b = parse_int_range(2, 0, 255); 4045 ed->color2.g = parse_int_range(1, 0, 255);
3826 ed->common.color2.a = parse_int_range(3, 0, 255); 4046 ed->color2.b = parse_int_range(2, 0, 255);
4047 ed->color2.a = parse_int_range(3, 0, 255);
3827} 4048}
3828 4049
3829/** 4050/**
@@ -3839,16 +4060,25 @@ st_collections_group_parts_part_description_color2(void)
3839static void 4060static void
3840st_collections_group_parts_part_description_color3(void) 4061st_collections_group_parts_part_description_color3(void)
3841{ 4062{
3842 Old_Edje_Part_Collection *pc; 4063 Edje_Part_Collection *pc;
3843 Old_Edje_Part *ep; 4064 Edje_Part *ep;
3844 Old_Edje_Part_Description *ed; 4065 Edje_Part_Description_Text *ed;
3845 4066
3846 check_arg_count(4); 4067 check_arg_count(4);
3847 4068
3848 pc = eina_list_data_get(eina_list_last(edje_collections)); 4069 pc = eina_list_data_get(eina_list_last(edje_collections));
3849 ep = eina_list_data_get(eina_list_last(pc->parts)); 4070 ep = pc->parts[pc->parts_count - 1];
3850 ed = ep->default_desc; 4071
3851 if (ep->other_desc) ed = eina_list_data_get(eina_list_last(ep->other_desc)); 4072 if (ep->type != EDJE_PART_TYPE_TEXT
4073 && ep->type != EDJE_PART_TYPE_TEXTBLOCK)
4074 {
4075 ERR("%s: Error. Setting color3 in part %s from %s not of type TEXT or TEXTBLOCK.", progname, ep->name, pc->part);
4076 exit(-1);
4077 }
4078
4079 ed = (Edje_Part_Description_Text*) ep->default_desc;
4080 if (ep->other.desc_count) ed = (Edje_Part_Description_Text*) ep->other.desc[ep->other.desc_count - 1];
4081
3852 ed->text.color3.r = parse_int_range(0, 0, 255); 4082 ed->text.color3.r = parse_int_range(0, 0, 255);
3853 ed->text.color3.g = parse_int_range(1, 0, 255); 4083 ed->text.color3.g = parse_int_range(1, 0, 255);
3854 ed->text.color3.b = parse_int_range(2, 0, 255); 4084 ed->text.color3.b = parse_int_range(2, 0, 255);
@@ -3892,18 +4122,20 @@ st_collections_group_parts_part_description_color3(void)
3892static void 4122static void
3893st_collections_group_parts_part_description_rel1_relative(void) 4123st_collections_group_parts_part_description_rel1_relative(void)
3894{ 4124{
3895 Old_Edje_Part_Collection *pc; 4125 Edje_Part_Collection *pc;
3896 Old_Edje_Part *ep; 4126 Edje_Part *ep;
3897 Old_Edje_Part_Description *ed; 4127 Edje_Part_Description_Common *ed;
3898 4128
3899 check_arg_count(2); 4129 check_arg_count(2);
3900 4130
3901 pc = eina_list_data_get(eina_list_last(edje_collections)); 4131 pc = eina_list_data_get(eina_list_last(edje_collections));
3902 ep = eina_list_data_get(eina_list_last(pc->parts)); 4132 ep = pc->parts[pc->parts_count - 1];
4133
3903 ed = ep->default_desc; 4134 ed = ep->default_desc;
3904 if (ep->other_desc) ed = eina_list_data_get(eina_list_last(ep->other_desc)); 4135 if (ep->other.desc_count) ed = ep->other.desc[ep->other.desc_count - 1];
3905 ed->common.rel1.relative_x = FROM_DOUBLE(parse_float(0)); 4136
3906 ed->common.rel1.relative_y = FROM_DOUBLE(parse_float(1)); 4137 ed->rel1.relative_x = FROM_DOUBLE(parse_float(0));
4138 ed->rel1.relative_y = FROM_DOUBLE(parse_float(1));
3907} 4139}
3908 4140
3909/** 4141/**
@@ -3919,18 +4151,20 @@ st_collections_group_parts_part_description_rel1_relative(void)
3919static void 4151static void
3920st_collections_group_parts_part_description_rel1_offset(void) 4152st_collections_group_parts_part_description_rel1_offset(void)
3921{ 4153{
3922 Old_Edje_Part_Collection *pc; 4154 Edje_Part_Collection *pc;
3923 Old_Edje_Part *ep; 4155 Edje_Part *ep;
3924 Old_Edje_Part_Description *ed; 4156 Edje_Part_Description_Common *ed;
3925 4157
3926 check_arg_count(2); 4158 check_arg_count(2);
3927 4159
3928 pc = eina_list_data_get(eina_list_last(edje_collections)); 4160 pc = eina_list_data_get(eina_list_last(edje_collections));
3929 ep = eina_list_data_get(eina_list_last(pc->parts)); 4161 ep = pc->parts[pc->parts_count - 1];
4162
3930 ed = ep->default_desc; 4163 ed = ep->default_desc;
3931 if (ep->other_desc) ed = eina_list_data_get(eina_list_last(ep->other_desc)); 4164 if (ep->other.desc_count) ed = ep->other.desc[ep->other.desc_count - 1];
3932 ed->common.rel1.offset_x = parse_int(0); 4165
3933 ed->common.rel1.offset_y = parse_int(1); 4166 ed->rel1.offset_x = parse_int(0);
4167 ed->rel1.offset_y = parse_int(1);
3934} 4168}
3935 4169
3936/** 4170/**
@@ -3947,24 +4181,26 @@ st_collections_group_parts_part_description_rel1_offset(void)
3947static void 4181static void
3948st_collections_group_parts_part_description_rel1_to(void) 4182st_collections_group_parts_part_description_rel1_to(void)
3949{ 4183{
3950 Old_Edje_Part_Collection *pc; 4184 Edje_Part_Collection *pc;
3951 Old_Edje_Part *ep; 4185 Edje_Part *ep;
3952 Old_Edje_Part_Description *ed; 4186 Edje_Part_Description_Common *ed;
3953 4187
3954 check_arg_count(1); 4188 check_arg_count(1);
3955 4189
3956 pc = eina_list_data_get(eina_list_last(edje_collections)); 4190 pc = eina_list_data_get(eina_list_last(edje_collections));
3957 ep = eina_list_data_get(eina_list_last(pc->parts)); 4191 ep = pc->parts[pc->parts_count - 1];
4192
3958 ed = ep->default_desc; 4193 ed = ep->default_desc;
3959 if (ep->other_desc) ed = eina_list_data_get(eina_list_last(ep->other_desc)); 4194 if (ep->other.desc_count) ed = ep->other.desc[ep->other.desc_count - 1];
3960 {
3961 char *name;
3962 4195
3963 name = parse_str(0); 4196 {
3964 data_queue_part_lookup(pc, name, &(ed->common.rel1.id_x)); 4197 char *name;
3965 data_queue_part_lookup(pc, name, &(ed->common.rel1.id_y)); 4198
3966 free(name); 4199 name = parse_str(0);
3967 } 4200 data_queue_part_lookup(pc, name, &(ed->rel1.id_x));
4201 data_queue_part_lookup(pc, name, &(ed->rel1.id_y));
4202 free(name);
4203 }
3968} 4204}
3969 4205
3970/** 4206/**
@@ -3981,23 +4217,25 @@ st_collections_group_parts_part_description_rel1_to(void)
3981static void 4217static void
3982st_collections_group_parts_part_description_rel1_to_x(void) 4218st_collections_group_parts_part_description_rel1_to_x(void)
3983{ 4219{
3984 Old_Edje_Part_Collection *pc; 4220 Edje_Part_Collection *pc;
3985 Old_Edje_Part *ep; 4221 Edje_Part *ep;
3986 Old_Edje_Part_Description *ed; 4222 Edje_Part_Description_Common *ed;
3987 4223
3988 check_arg_count(1); 4224 check_arg_count(1);
3989 4225
3990 pc = eina_list_data_get(eina_list_last(edje_collections)); 4226 pc = eina_list_data_get(eina_list_last(edje_collections));
3991 ep = eina_list_data_get(eina_list_last(pc->parts)); 4227 ep = pc->parts[pc->parts_count - 1];
4228
3992 ed = ep->default_desc; 4229 ed = ep->default_desc;
3993 if (ep->other_desc) ed = eina_list_data_get(eina_list_last(ep->other_desc)); 4230 if (ep->other.desc_count) ed = ep->other.desc[ep->other.desc_count - 1];
3994 {
3995 char *name;
3996 4231
3997 name = parse_str(0); 4232 {
3998 data_queue_part_lookup(pc, name, &(ed->common.rel1.id_x)); 4233 char *name;
3999 free(name); 4234
4000 } 4235 name = parse_str(0);
4236 data_queue_part_lookup(pc, name, &(ed->rel1.id_x));
4237 free(name);
4238 }
4001} 4239}
4002 4240
4003/** 4241/**
@@ -4015,124 +4253,136 @@ st_collections_group_parts_part_description_rel1_to_x(void)
4015static void 4253static void
4016st_collections_group_parts_part_description_rel1_to_y(void) 4254st_collections_group_parts_part_description_rel1_to_y(void)
4017{ 4255{
4018 Old_Edje_Part_Collection *pc; 4256 Edje_Part_Collection *pc;
4019 Old_Edje_Part *ep; 4257 Edje_Part *ep;
4020 Old_Edje_Part_Description *ed; 4258 Edje_Part_Description_Common *ed;
4021 4259
4022 check_arg_count(1); 4260 check_arg_count(1);
4023 4261
4024 pc = eina_list_data_get(eina_list_last(edje_collections)); 4262 pc = eina_list_data_get(eina_list_last(edje_collections));
4025 ep = eina_list_data_get(eina_list_last(pc->parts)); 4263 ep = pc->parts[pc->parts_count - 1];
4264
4026 ed = ep->default_desc; 4265 ed = ep->default_desc;
4027 if (ep->other_desc) ed = eina_list_data_get(eina_list_last(ep->other_desc)); 4266 if (ep->other.desc_count) ed = ep->other.desc[ep->other.desc_count - 1];
4028 {
4029 char *name;
4030 4267
4031 name = parse_str(0); 4268 {
4032 data_queue_part_lookup(pc, name, &(ed->common.rel1.id_y)); 4269 char *name;
4033 free(name); 4270
4034 } 4271 name = parse_str(0);
4272 data_queue_part_lookup(pc, name, &(ed->rel1.id_y));
4273 free(name);
4274 }
4035} 4275}
4036 4276
4037static void 4277static void
4038st_collections_group_parts_part_description_rel2_relative(void) 4278st_collections_group_parts_part_description_rel2_relative(void)
4039{ 4279{
4040 Old_Edje_Part_Collection *pc; 4280 Edje_Part_Collection *pc;
4041 Old_Edje_Part *ep; 4281 Edje_Part *ep;
4042 Old_Edje_Part_Description *ed; 4282 Edje_Part_Description_Common *ed;
4043 4283
4044 check_arg_count(2); 4284 check_arg_count(2);
4045 4285
4046 pc = eina_list_data_get(eina_list_last(edje_collections)); 4286 pc = eina_list_data_get(eina_list_last(edje_collections));
4047 ep = eina_list_data_get(eina_list_last(pc->parts)); 4287 ep = pc->parts[pc->parts_count - 1];
4288
4048 ed = ep->default_desc; 4289 ed = ep->default_desc;
4049 if (ep->other_desc) ed = eina_list_data_get(eina_list_last(ep->other_desc)); 4290 if (ep->other.desc_count) ed = ep->other.desc[ep->other.desc_count - 1];
4050 ed->common.rel2.relative_x = FROM_DOUBLE(parse_float(0)); 4291
4051 ed->common.rel2.relative_y = FROM_DOUBLE(parse_float(1)); 4292 ed->rel2.relative_x = FROM_DOUBLE(parse_float(0));
4293 ed->rel2.relative_y = FROM_DOUBLE(parse_float(1));
4052} 4294}
4053 4295
4054static void 4296static void
4055st_collections_group_parts_part_description_rel2_offset(void) 4297st_collections_group_parts_part_description_rel2_offset(void)
4056{ 4298{
4057 Old_Edje_Part_Collection *pc; 4299 Edje_Part_Collection *pc;
4058 Old_Edje_Part *ep; 4300 Edje_Part *ep;
4059 Old_Edje_Part_Description *ed; 4301 Edje_Part_Description_Common *ed;
4060 4302
4061 check_arg_count(2); 4303 check_arg_count(2);
4062 4304
4063 pc = eina_list_data_get(eina_list_last(edje_collections)); 4305 pc = eina_list_data_get(eina_list_last(edje_collections));
4064 ep = eina_list_data_get(eina_list_last(pc->parts)); 4306 ep = pc->parts[pc->parts_count - 1];
4307
4065 ed = ep->default_desc; 4308 ed = ep->default_desc;
4066 if (ep->other_desc) ed = eina_list_data_get(eina_list_last(ep->other_desc)); 4309 if (ep->other.desc_count) ed = ep->other.desc[ep->other.desc_count - 1];
4067 ed->common.rel2.offset_x = parse_int(0); 4310
4068 ed->common.rel2.offset_y = parse_int(1); 4311 ed->rel2.offset_x = parse_int(0);
4312 ed->rel2.offset_y = parse_int(1);
4069} 4313}
4070 4314
4071static void 4315static void
4072st_collections_group_parts_part_description_rel2_to(void) 4316st_collections_group_parts_part_description_rel2_to(void)
4073{ 4317{
4074 Old_Edje_Part_Collection *pc; 4318 Edje_Part_Collection *pc;
4075 Old_Edje_Part *ep; 4319 Edje_Part *ep;
4076 Old_Edje_Part_Description *ed; 4320 Edje_Part_Description_Common *ed;
4077 4321
4078 check_arg_count(1); 4322 check_arg_count(1);
4079 4323
4080 pc = eina_list_data_get(eina_list_last(edje_collections)); 4324 pc = eina_list_data_get(eina_list_last(edje_collections));
4081 ep = eina_list_data_get(eina_list_last(pc->parts)); 4325 ep = pc->parts[pc->parts_count - 1];
4326
4082 ed = ep->default_desc; 4327 ed = ep->default_desc;
4083 if (ep->other_desc) ed = eina_list_data_get(eina_list_last(ep->other_desc)); 4328 if (ep->other.desc_count) ed = ep->other.desc[ep->other.desc_count - 1];
4084 {
4085 char *name;
4086 4329
4087 name = parse_str(0); 4330 {
4088 data_queue_part_lookup(pc, name, &(ed->common.rel2.id_x)); 4331 char *name;
4089 data_queue_part_lookup(pc, name, &(ed->common.rel2.id_y)); 4332
4090 free(name); 4333 name = parse_str(0);
4091 } 4334 data_queue_part_lookup(pc, name, &(ed->rel2.id_x));
4335 data_queue_part_lookup(pc, name, &(ed->rel2.id_y));
4336 free(name);
4337 }
4092} 4338}
4093 4339
4094static void 4340static void
4095st_collections_group_parts_part_description_rel2_to_x(void) 4341st_collections_group_parts_part_description_rel2_to_x(void)
4096{ 4342{
4097 Old_Edje_Part_Collection *pc; 4343 Edje_Part_Collection *pc;
4098 Old_Edje_Part *ep; 4344 Edje_Part *ep;
4099 Old_Edje_Part_Description *ed; 4345 Edje_Part_Description_Common *ed;
4100 4346
4101 check_arg_count(1); 4347 check_arg_count(1);
4102 4348
4103 pc = eina_list_data_get(eina_list_last(edje_collections)); 4349 pc = eina_list_data_get(eina_list_last(edje_collections));
4104 ep = eina_list_data_get(eina_list_last(pc->parts)); 4350 ep = pc->parts[pc->parts_count - 1];
4351
4105 ed = ep->default_desc; 4352 ed = ep->default_desc;
4106 if (ep->other_desc) ed = eina_list_data_get(eina_list_last(ep->other_desc)); 4353 if (ep->other.desc_count) ed = ep->other.desc[ep->other.desc_count - 1];
4107 {
4108 char *name;
4109 4354
4110 name = parse_str(0); 4355 {
4111 data_queue_part_lookup(pc, name, &(ed->common.rel2.id_x)); 4356 char *name;
4112 free(name); 4357
4113 } 4358 name = parse_str(0);
4359 data_queue_part_lookup(pc, name, &(ed->rel2.id_x));
4360 free(name);
4361 }
4114} 4362}
4115 4363
4116static void 4364static void
4117st_collections_group_parts_part_description_rel2_to_y(void) 4365st_collections_group_parts_part_description_rel2_to_y(void)
4118{ 4366{
4119 Old_Edje_Part_Collection *pc; 4367 Edje_Part_Collection *pc;
4120 Old_Edje_Part *ep; 4368 Edje_Part *ep;
4121 Old_Edje_Part_Description *ed; 4369 Edje_Part_Description_Common *ed;
4122 4370
4123 check_arg_count(1); 4371 check_arg_count(1);
4124 4372
4125 pc = eina_list_data_get(eina_list_last(edje_collections)); 4373 pc = eina_list_data_get(eina_list_last(edje_collections));
4126 ep = eina_list_data_get(eina_list_last(pc->parts)); 4374 ep = pc->parts[pc->parts_count - 1];
4375
4127 ed = ep->default_desc; 4376 ed = ep->default_desc;
4128 if (ep->other_desc) ed = eina_list_data_get(eina_list_last(ep->other_desc)); 4377 if (ep->other.desc_count) ed = ep->other.desc[ep->other.desc_count - 1];
4129 {
4130 char *name;
4131 4378
4132 name = parse_str(0); 4379 {
4133 data_queue_part_lookup(pc, name, &(ed->common.rel2.id_y)); 4380 char *name;
4134 free(name); 4381
4135 } 4382 name = parse_str(0);
4383 data_queue_part_lookup(pc, name, &(ed->rel2.id_y));
4384 free(name);
4385 }
4136} 4386}
4137 4387
4138/** 4388/**
@@ -4172,14 +4422,14 @@ st_collections_group_parts_part_description_rel2_to_y(void)
4172static void 4422static void
4173st_collections_group_parts_part_description_image_normal(void) 4423st_collections_group_parts_part_description_image_normal(void)
4174{ 4424{
4175 Old_Edje_Part_Collection *pc; 4425 Edje_Part_Collection *pc;
4176 Old_Edje_Part *ep; 4426 Edje_Part *ep;
4177 Old_Edje_Part_Description *ed; 4427 Edje_Part_Description_Image *ed;
4178 4428
4179 check_arg_count(1); 4429 check_arg_count(1);
4180 4430
4181 pc = eina_list_data_get(eina_list_last(edje_collections)); 4431 pc = eina_list_data_get(eina_list_last(edje_collections));
4182 ep = eina_list_data_get(eina_list_last(pc->parts)); 4432 ep = pc->parts[pc->parts_count - 1];
4183 4433
4184 if (ep->type != EDJE_PART_TYPE_IMAGE) 4434 if (ep->type != EDJE_PART_TYPE_IMAGE)
4185 { 4435 {
@@ -4189,15 +4439,16 @@ st_collections_group_parts_part_description_image_normal(void)
4189 exit(-1); 4439 exit(-1);
4190 } 4440 }
4191 4441
4192 ed = ep->default_desc; 4442 ed = (Edje_Part_Description_Image*) ep->default_desc;
4193 if (ep->other_desc) ed = eina_list_data_get(eina_list_last(ep->other_desc)); 4443 if (ep->other.desc_count) ed = (Edje_Part_Description_Image*) ep->other.desc[ep->other.desc_count - 1];
4194 {
4195 char *name;
4196 4444
4197 name = parse_str(0); 4445 {
4198 data_queue_image_lookup(name, &(ed->image.id), &(ed->image.set)); 4446 char *name;
4199 free(name); 4447
4200 } 4448 name = parse_str(0);
4449 data_queue_image_lookup(name, &(ed->image.id), &(ed->image.set));
4450 free(name);
4451 }
4201} 4452}
4202 4453
4203/** 4454/**
@@ -4215,14 +4466,14 @@ st_collections_group_parts_part_description_image_normal(void)
4215static void 4466static void
4216st_collections_group_parts_part_description_image_tween(void) 4467st_collections_group_parts_part_description_image_tween(void)
4217{ 4468{
4218 Old_Edje_Part_Collection *pc; 4469 Edje_Part_Collection *pc;
4219 Old_Edje_Part *ep; 4470 Edje_Part *ep;
4220 Old_Edje_Part_Description *ed; 4471 Edje_Part_Description_Image *ed;
4221 4472
4222 check_arg_count(1); 4473 check_arg_count(1);
4223 4474
4224 pc = eina_list_data_get(eina_list_last(edje_collections)); 4475 pc = eina_list_data_get(eina_list_last(edje_collections));
4225 ep = eina_list_data_get(eina_list_last(pc->parts)); 4476 ep = pc->parts[pc->parts_count - 1];
4226 4477
4227 if (ep->type != EDJE_PART_TYPE_IMAGE) 4478 if (ep->type != EDJE_PART_TYPE_IMAGE)
4228 { 4479 {
@@ -4232,18 +4483,22 @@ st_collections_group_parts_part_description_image_tween(void)
4232 exit(-1); 4483 exit(-1);
4233 } 4484 }
4234 4485
4235 ed = ep->default_desc; 4486 ed = (Edje_Part_Description_Image*) ep->default_desc;
4236 if (ep->other_desc) ed = eina_list_data_get(eina_list_last(ep->other_desc)); 4487 if (ep->other.desc_count) ed = (Edje_Part_Description_Image*) ep->other.desc[ep->other.desc_count - 1];
4237 {
4238 char *name;
4239 Edje_Part_Image_Id *iid;
4240 4488
4241 iid = mem_alloc(SZ(Edje_Part_Image_Id)); 4489 {
4242 ed->image.tween_list = eina_list_append(ed->image.tween_list, iid); 4490 char *name;
4243 name = parse_str(0); 4491 Edje_Part_Image_Id *iid;
4244 data_queue_image_lookup(name, &(iid->id), &(iid->set)); 4492
4245 free(name); 4493 iid = mem_alloc(SZ(Edje_Part_Image_Id));
4246 } 4494 ed->image.tweens_count++;
4495 ed->image.tweens = realloc(ed->image.tweens,
4496 sizeof (Edje_Part_Image_Id*) * ed->image.tweens_count);
4497 ed->image.tweens[ed->image.tweens_count - 1] = iid;
4498 name = parse_str(0);
4499 data_queue_image_lookup(name, &(iid->id), &(iid->set));
4500 free(name);
4501 }
4247} 4502}
4248 4503
4249/** 4504/**
@@ -4261,14 +4516,14 @@ st_collections_group_parts_part_description_image_tween(void)
4261static void 4516static void
4262st_collections_group_parts_part_description_image_border(void) 4517st_collections_group_parts_part_description_image_border(void)
4263{ 4518{
4264 Old_Edje_Part_Collection *pc; 4519 Edje_Part_Collection *pc;
4265 Old_Edje_Part *ep; 4520 Edje_Part *ep;
4266 Old_Edje_Part_Description *ed; 4521 Edje_Part_Description_Image *ed;
4267 4522
4268 check_arg_count(4); 4523 check_arg_count(4);
4269 4524
4270 pc = eina_list_data_get(eina_list_last(edje_collections)); 4525 pc = eina_list_data_get(eina_list_last(edje_collections));
4271 ep = eina_list_data_get(eina_list_last(pc->parts)); 4526 ep = pc->parts[pc->parts_count - 1];
4272 4527
4273 if (ep->type != EDJE_PART_TYPE_IMAGE) 4528 if (ep->type != EDJE_PART_TYPE_IMAGE)
4274 { 4529 {
@@ -4278,8 +4533,9 @@ st_collections_group_parts_part_description_image_border(void)
4278 exit(-1); 4533 exit(-1);
4279 } 4534 }
4280 4535
4281 ed = ep->default_desc; 4536 ed = (Edje_Part_Description_Image*) ep->default_desc;
4282 if (ep->other_desc) ed = eina_list_data_get(eina_list_last(ep->other_desc)); 4537 if (ep->other.desc_count) ed = (Edje_Part_Description_Image*) ep->other.desc[ep->other.desc_count - 1];
4538
4283 ed->image.border.l = parse_int_range(0, 0, 0x7fffffff); 4539 ed->image.border.l = parse_int_range(0, 0, 0x7fffffff);
4284 ed->image.border.r = parse_int_range(1, 0, 0x7fffffff); 4540 ed->image.border.r = parse_int_range(1, 0, 0x7fffffff);
4285 ed->image.border.t = parse_int_range(2, 0, 0x7fffffff); 4541 ed->image.border.t = parse_int_range(2, 0, 0x7fffffff);
@@ -4301,14 +4557,14 @@ st_collections_group_parts_part_description_image_border(void)
4301static void 4557static void
4302st_collections_group_parts_part_description_image_middle(void) 4558st_collections_group_parts_part_description_image_middle(void)
4303{ 4559{
4304 Old_Edje_Part_Collection *pc; 4560 Edje_Part_Collection *pc;
4305 Old_Edje_Part *ep; 4561 Edje_Part *ep;
4306 Old_Edje_Part_Description *ed; 4562 Edje_Part_Description_Image *ed;
4307 4563
4308 check_arg_count(1); 4564 check_arg_count(1);
4309 4565
4310 pc = eina_list_data_get(eina_list_last(edje_collections)); 4566 pc = eina_list_data_get(eina_list_last(edje_collections));
4311 ep = eina_list_data_get(eina_list_last(pc->parts)); 4567 ep = pc->parts[pc->parts_count - 1];
4312 4568
4313 if (ep->type != EDJE_PART_TYPE_IMAGE) 4569 if (ep->type != EDJE_PART_TYPE_IMAGE)
4314 { 4570 {
@@ -4318,8 +4574,9 @@ st_collections_group_parts_part_description_image_middle(void)
4318 exit(-1); 4574 exit(-1);
4319 } 4575 }
4320 4576
4321 ed = ep->default_desc; 4577 ed = (Edje_Part_Description_Image*) ep->default_desc;
4322 if (ep->other_desc) ed = eina_list_data_get(eina_list_last(ep->other_desc)); 4578 if (ep->other.desc_count) ed = (Edje_Part_Description_Image*) ep->other.desc[ep->other.desc_count - 1];
4579
4323 ed->image.border.no_fill = parse_enum(0, 4580 ed->image.border.no_fill = parse_enum(0,
4324 "1", 0, 4581 "1", 0,
4325 "DEFAULT", 0, 4582 "DEFAULT", 0,
@@ -4343,14 +4600,14 @@ st_collections_group_parts_part_description_image_middle(void)
4343static void 4600static void
4344st_collections_group_parts_part_description_image_border_scale(void) 4601st_collections_group_parts_part_description_image_border_scale(void)
4345{ 4602{
4346 Old_Edje_Part_Collection *pc; 4603 Edje_Part_Collection *pc;
4347 Old_Edje_Part *ep; 4604 Edje_Part *ep;
4348 Old_Edje_Part_Description *ed; 4605 Edje_Part_Description_Image *ed;
4349 4606
4350 check_arg_count(1); 4607 check_arg_count(1);
4351 4608
4352 pc = eina_list_data_get(eina_list_last(edje_collections)); 4609 pc = eina_list_data_get(eina_list_last(edje_collections));
4353 ep = eina_list_data_get(eina_list_last(pc->parts)); 4610 ep = pc->parts[pc->parts_count - 1];
4354 4611
4355 if (ep->type != EDJE_PART_TYPE_IMAGE) 4612 if (ep->type != EDJE_PART_TYPE_IMAGE)
4356 { 4613 {
@@ -4360,8 +4617,9 @@ st_collections_group_parts_part_description_image_border_scale(void)
4360 exit(-1); 4617 exit(-1);
4361 } 4618 }
4362 4619
4363 ed = ep->default_desc; 4620 ed = (Edje_Part_Description_Image*) ep->default_desc;
4364 if (ep->other_desc) ed = eina_list_data_get(eina_list_last(ep->other_desc)); 4621 if (ep->other.desc_count) ed = (Edje_Part_Description_Image*) ep->other.desc[ep->other.desc_count - 1];
4622
4365 ed->image.border.scale = parse_enum(0, 4623 ed->image.border.scale = parse_enum(0,
4366 "0", 0, 4624 "0", 0,
4367 "1", 1, 4625 "1", 1,
@@ -4382,14 +4640,14 @@ st_collections_group_parts_part_description_image_border_scale(void)
4382static void 4640static void
4383st_collections_group_parts_part_description_image_scale_hint(void) 4641st_collections_group_parts_part_description_image_scale_hint(void)
4384{ 4642{
4385 Old_Edje_Part_Collection *pc; 4643 Edje_Part_Collection *pc;
4386 Old_Edje_Part *ep; 4644 Edje_Part *ep;
4387 Old_Edje_Part_Description *ed; 4645 Edje_Part_Description_Image *ed;
4388 4646
4389 check_arg_count(1); 4647 check_arg_count(1);
4390 4648
4391 pc = eina_list_data_get(eina_list_last(edje_collections)); 4649 pc = eina_list_data_get(eina_list_last(edje_collections));
4392 ep = eina_list_data_get(eina_list_last(pc->parts)); 4650 ep = pc->parts[pc->parts_count - 1];
4393 4651
4394 if (ep->type != EDJE_PART_TYPE_IMAGE) 4652 if (ep->type != EDJE_PART_TYPE_IMAGE)
4395 { 4653 {
@@ -4399,8 +4657,9 @@ st_collections_group_parts_part_description_image_scale_hint(void)
4399 exit(-1); 4657 exit(-1);
4400 } 4658 }
4401 4659
4402 ed = ep->default_desc; 4660 ed = (Edje_Part_Description_Image*) ep->default_desc;
4403 if (ep->other_desc) ed = eina_list_data_get(eina_list_last(ep->other_desc)); 4661 if (ep->other.desc_count) ed = (Edje_Part_Description_Image*) ep->other.desc[ep->other.desc_count - 1];
4662
4404 ed->image.scale_hint = parse_enum(0, 4663 ed->image.scale_hint = parse_enum(0,
4405 "NONE", EVAS_IMAGE_SCALE_HINT_NONE, 4664 "NONE", EVAS_IMAGE_SCALE_HINT_NONE,
4406 "DYNAMIC", EVAS_IMAGE_SCALE_HINT_DYNAMIC, 4665 "DYNAMIC", EVAS_IMAGE_SCALE_HINT_DYNAMIC,
@@ -4446,25 +4705,26 @@ st_collections_group_parts_part_description_image_scale_hint(void)
4446static void 4705static void
4447st_collections_group_parts_part_description_fill_smooth(void) 4706st_collections_group_parts_part_description_fill_smooth(void)
4448{ 4707{
4449 Old_Edje_Part_Collection *pc; 4708 Edje_Part_Collection *pc;
4450 Old_Edje_Part *ep; 4709 Edje_Part *ep;
4451 Old_Edje_Part_Description *ed; 4710 Edje_Part_Description_Image *ed;
4452 4711
4453 check_arg_count(1); 4712 check_arg_count(1);
4454 4713
4455 pc = eina_list_data_get(eina_list_last(edje_collections)); 4714 pc = eina_list_data_get(eina_list_last(edje_collections));
4456 ep = eina_list_data_get(eina_list_last(pc->parts)); 4715 ep = pc->parts[pc->parts_count - 1];
4457 4716
4458 if (ep->type != EDJE_PART_TYPE_IMAGE) 4717 if (ep->type != EDJE_PART_TYPE_IMAGE)
4459 { 4718 {
4460 ERR("%s: Error. parse error %s:%i. " 4719 ERR("%s: Error. parse error %s:%i. "
4461 "fill.type attribute in non-IMAGE part.", 4720 "image attributes in non-IMAGE part.",
4462 progname, file_in, line - 1); 4721 progname, file_in, line - 1);
4463 exit(-1); 4722 exit(-1);
4464 } 4723 }
4465 4724
4466 ed = ep->default_desc; 4725 ed = (Edje_Part_Description_Image*) ep->default_desc;
4467 if (ep->other_desc) ed = eina_list_data_get(eina_list_last(ep->other_desc)); 4726 if (ep->other.desc_count) ed = (Edje_Part_Description_Image*) ep->other.desc[ep->other.desc_count - 1];
4727
4468 ed->image.fill.smooth = parse_bool(0); 4728 ed->image.fill.smooth = parse_bool(0);
4469} 4729}
4470 4730
@@ -4482,26 +4742,35 @@ st_collections_group_parts_part_description_fill_smooth(void)
4482static void 4742static void
4483st_collections_group_parts_part_description_fill_spread(void) 4743st_collections_group_parts_part_description_fill_spread(void)
4484{ 4744{
4485 Old_Edje_Part_Collection *pc; 4745 Edje_Part_Collection *pc;
4486 Old_Edje_Part *ep; 4746 Edje_Part *ep;
4487 Old_Edje_Part_Description *ed; 4747 Edje_Part_Description_Image *ed;
4488 4748
4489 check_arg_count(1); 4749 check_arg_count(1);
4490 4750
4491 pc = eina_list_data_get(eina_list_last(edje_collections)); 4751 pc = eina_list_data_get(eina_list_last(edje_collections));
4492 ep = eina_list_data_get(eina_list_last(pc->parts));
4493 4752
4494 /* XXX this will need to include IMAGES when spread support is added to evas images */ 4753 /* XXX this will need to include IMAGES when spread support is added to evas images */
4495 if (ep->type != EDJE_PART_TYPE_GRADIENT) 4754 {
4755 ERR("%s: Error. parse error %s:%i. "
4756 "fill.spread not supported yet.",
4757 progname, file_in, line - 1);
4758 exit(-1);
4759 }
4760
4761 ep = pc->parts[pc->parts_count - 1];
4762
4763 if (ep->type != EDJE_PART_TYPE_IMAGE)
4496 { 4764 {
4497 fprintf(stderr, "%s: Error. parse error %s:%i. " 4765 ERR("%s: Error. parse error %s:%i. "
4498 "gradient attributes in non-GRADIENT part.\n", 4766 "image attributes in non-IMAGE part.",
4499 progname, file_in, line - 1); 4767 progname, file_in, line - 1);
4500 exit(-1); 4768 exit(-1);
4501 } 4769 }
4502 4770
4503 ed = ep->default_desc; 4771 ed = (Edje_Part_Description_Image*) ep->default_desc;
4504 if (ep->other_desc) ed = eina_list_data_get(eina_list_last(ep->other_desc)); 4772 if (ep->other.desc_count) ed = (Edje_Part_Description_Image*) ep->other.desc[ep->other.desc_count - 1];
4773
4505 ed->image.fill.spread = parse_int_range(0, 0, 1); 4774 ed->image.fill.spread = parse_int_range(0, 0, 1);
4506} 4775}
4507 4776
@@ -4519,25 +4788,26 @@ st_collections_group_parts_part_description_fill_spread(void)
4519static void 4788static void
4520st_collections_group_parts_part_description_fill_type(void) 4789st_collections_group_parts_part_description_fill_type(void)
4521{ 4790{
4522 Old_Edje_Part_Collection *pc; 4791 Edje_Part_Collection *pc;
4523 Old_Edje_Part *ep; 4792 Edje_Part *ep;
4524 Old_Edje_Part_Description *ed; 4793 Edje_Part_Description_Image *ed;
4525 4794
4526 check_arg_count(1); 4795 check_arg_count(1);
4527 4796
4528 pc = eina_list_data_get(eina_list_last(edje_collections)); 4797 pc = eina_list_data_get(eina_list_last(edje_collections));
4529 ep = eina_list_data_get(eina_list_last(pc->parts)); 4798 ep = pc->parts[pc->parts_count - 1];
4530 ed = ep->default_desc;
4531 if (ep->other_desc) ed = eina_list_data_get(eina_list_last(ep->other_desc));
4532 4799
4533 if (ep->type != EDJE_PART_TYPE_IMAGE) 4800 if (ep->type != EDJE_PART_TYPE_IMAGE)
4534 { 4801 {
4535 ERR("%s: Error. parse error %s:%i. " 4802 ERR("%s: Error. parse error %s:%i. "
4536 "fill attributes in non-IMAGE part.", 4803 "image attributes in non-IMAGE part.",
4537 progname, file_in, line - 1); 4804 progname, file_in, line - 1);
4538 exit(-1); 4805 exit(-1);
4539 } 4806 }
4540 4807
4808 ed = (Edje_Part_Description_Image*) ep->default_desc;
4809 if (ep->other.desc_count) ed = (Edje_Part_Description_Image*) ep->other.desc[ep->other.desc_count - 1];
4810
4541 ed->image.fill.type = parse_enum(0, 4811 ed->image.fill.type = parse_enum(0,
4542 "SCALE", EDJE_FILL_TYPE_SCALE, 4812 "SCALE", EDJE_FILL_TYPE_SCALE,
4543 "TILE", EDJE_FILL_TYPE_TILE, 4813 "TILE", EDJE_FILL_TYPE_TILE,
@@ -4578,25 +4848,26 @@ st_collections_group_parts_part_description_fill_type(void)
4578static void 4848static void
4579st_collections_group_parts_part_description_fill_origin_relative(void) 4849st_collections_group_parts_part_description_fill_origin_relative(void)
4580{ 4850{
4581 Old_Edje_Part_Collection *pc; 4851 Edje_Part_Collection *pc;
4582 Old_Edje_Part *ep; 4852 Edje_Part *ep;
4583 Old_Edje_Part_Description *ed; 4853 Edje_Part_Description_Image *ed;
4584 4854
4585 check_arg_count(2); 4855 check_arg_count(2);
4586 4856
4587 pc = eina_list_data_get(eina_list_last(edje_collections)); 4857 pc = eina_list_data_get(eina_list_last(edje_collections));
4588 ep = eina_list_data_get(eina_list_last(pc->parts)); 4858 ep = pc->parts[pc->parts_count - 1];
4589 4859
4590 if (ep->type != EDJE_PART_TYPE_IMAGE) 4860 if (ep->type != EDJE_PART_TYPE_IMAGE)
4591 { 4861 {
4592 ERR("%s: Error. parse error %s:%i. " 4862 ERR("%s: Error. parse error %s:%i. "
4593 "fill attributes in non-IMAGE part.", 4863 "image attributes in non-IMAGE part.",
4594 progname, file_in, line - 1); 4864 progname, file_in, line - 1);
4595 exit(-1); 4865 exit(-1);
4596 } 4866 }
4597 4867
4598 ed = ep->default_desc; 4868 ed = (Edje_Part_Description_Image*) ep->default_desc;
4599 if (ep->other_desc) ed = eina_list_data_get(eina_list_last(ep->other_desc)); 4869 if (ep->other.desc_count) ed = (Edje_Part_Description_Image*) ep->other.desc[ep->other.desc_count - 1];
4870
4600 ed->image.fill.pos_rel_x = FROM_DOUBLE(parse_float_range(0, -999999999.0, 999999999.0)); 4871 ed->image.fill.pos_rel_x = FROM_DOUBLE(parse_float_range(0, -999999999.0, 999999999.0));
4601 ed->image.fill.pos_rel_y = FROM_DOUBLE(parse_float_range(1, -999999999.0, 999999999.0)); 4872 ed->image.fill.pos_rel_y = FROM_DOUBLE(parse_float_range(1, -999999999.0, 999999999.0));
4602} 4873}
@@ -4614,25 +4885,26 @@ st_collections_group_parts_part_description_fill_origin_relative(void)
4614static void 4885static void
4615st_collections_group_parts_part_description_fill_origin_offset(void) 4886st_collections_group_parts_part_description_fill_origin_offset(void)
4616{ 4887{
4617 Old_Edje_Part_Collection *pc; 4888 Edje_Part_Collection *pc;
4618 Old_Edje_Part *ep; 4889 Edje_Part *ep;
4619 Old_Edje_Part_Description *ed; 4890 Edje_Part_Description_Image *ed;
4620 4891
4621 check_arg_count(2); 4892 check_arg_count(2);
4622 4893
4623 pc = eina_list_data_get(eina_list_last(edje_collections)); 4894 pc = eina_list_data_get(eina_list_last(edje_collections));
4624 ep = eina_list_data_get(eina_list_last(pc->parts)); 4895 ep = pc->parts[pc->parts_count - 1];
4625 4896
4626 if (ep->type != EDJE_PART_TYPE_IMAGE) 4897 if (ep->type != EDJE_PART_TYPE_IMAGE)
4627 { 4898 {
4628 ERR("%s: Error. parse error %s:%i. " 4899 ERR("%s: Error. parse error %s:%i. "
4629 "fill attributes in non-IMAGE part.", 4900 "image attributes in non-IMAGE part.",
4630 progname, file_in, line - 1); 4901 progname, file_in, line - 1);
4631 exit(-1); 4902 exit(-1);
4632 } 4903 }
4633 4904
4634 ed = ep->default_desc; 4905 ed = (Edje_Part_Description_Image*) ep->default_desc;
4635 if (ep->other_desc) ed = eina_list_data_get(eina_list_last(ep->other_desc)); 4906 if (ep->other.desc_count) ed = (Edje_Part_Description_Image*) ep->other.desc[ep->other.desc_count - 1];
4907
4636 ed->image.fill.pos_abs_x = parse_int(0); 4908 ed->image.fill.pos_abs_x = parse_int(0);
4637 ed->image.fill.pos_abs_y = parse_int(1); 4909 ed->image.fill.pos_abs_y = parse_int(1);
4638} 4910}
@@ -4673,25 +4945,26 @@ st_collections_group_parts_part_description_fill_origin_offset(void)
4673static void 4945static void
4674st_collections_group_parts_part_description_fill_size_relative(void) 4946st_collections_group_parts_part_description_fill_size_relative(void)
4675{ 4947{
4676 Old_Edje_Part_Collection *pc; 4948 Edje_Part_Collection *pc;
4677 Old_Edje_Part *ep; 4949 Edje_Part *ep;
4678 Old_Edje_Part_Description *ed; 4950 Edje_Part_Description_Image *ed;
4679 4951
4680 check_arg_count(2); 4952 check_arg_count(2);
4681 4953
4682 pc = eina_list_data_get(eina_list_last(edje_collections)); 4954 pc = eina_list_data_get(eina_list_last(edje_collections));
4683 ep = eina_list_data_get(eina_list_last(pc->parts)); 4955 ep = pc->parts[pc->parts_count - 1];
4684 ed = ep->default_desc;
4685 if (ep->other_desc) ed = eina_list_data_get(eina_list_last(ep->other_desc));
4686 4956
4687 if (ep->type != EDJE_PART_TYPE_IMAGE) 4957 if (ep->type != EDJE_PART_TYPE_IMAGE)
4688 { 4958 {
4689 ERR("%s: Error. parse error %s:%i. " 4959 ERR("%s: Error. parse error %s:%i. "
4690 "fill attributes in non-IMAGE part.", 4960 "image attributes in non-IMAGE part.",
4691 progname, file_in, line - 1); 4961 progname, file_in, line - 1);
4692 exit(-1); 4962 exit(-1);
4693 } 4963 }
4694 4964
4965 ed = (Edje_Part_Description_Image*) ep->default_desc;
4966 if (ep->other.desc_count) ed = (Edje_Part_Description_Image*) ep->other.desc[ep->other.desc_count - 1];
4967
4695 ed->image.fill.rel_x = FROM_DOUBLE(parse_float_range(0, 0.0, 999999999.0)); 4968 ed->image.fill.rel_x = FROM_DOUBLE(parse_float_range(0, 0.0, 999999999.0));
4696 ed->image.fill.rel_y = FROM_DOUBLE(parse_float_range(1, 0.0, 999999999.0)); 4969 ed->image.fill.rel_y = FROM_DOUBLE(parse_float_range(1, 0.0, 999999999.0));
4697} 4970}
@@ -4709,25 +4982,26 @@ st_collections_group_parts_part_description_fill_size_relative(void)
4709static void 4982static void
4710st_collections_group_parts_part_description_fill_size_offset(void) 4983st_collections_group_parts_part_description_fill_size_offset(void)
4711{ 4984{
4712 Old_Edje_Part_Collection *pc; 4985 Edje_Part_Collection *pc;
4713 Old_Edje_Part *ep; 4986 Edje_Part *ep;
4714 Old_Edje_Part_Description *ed; 4987 Edje_Part_Description_Image *ed;
4715 4988
4716 check_arg_count(2); 4989 check_arg_count(2);
4717 4990
4718 pc = eina_list_data_get(eina_list_last(edje_collections)); 4991 pc = eina_list_data_get(eina_list_last(edje_collections));
4719 ep = eina_list_data_get(eina_list_last(pc->parts)); 4992 ep = pc->parts[pc->parts_count - 1];
4720 ed = ep->default_desc;
4721 if (ep->other_desc) ed = eina_list_data_get(eina_list_last(ep->other_desc));
4722 4993
4723 if (ep->type != EDJE_PART_TYPE_IMAGE) 4994 if (ep->type != EDJE_PART_TYPE_IMAGE)
4724 { 4995 {
4725 ERR("%s: Error. parse error %s:%i. " 4996 ERR("%s: Error. parse error %s:%i. "
4726 "fill attributes in non-IMAGE part.", 4997 "image attributes in non-IMAGE part.",
4727 progname, file_in, line - 1); 4998 progname, file_in, line - 1);
4728 exit(-1); 4999 exit(-1);
4729 } 5000 }
4730 5001
5002 ed = (Edje_Part_Description_Image*) ep->default_desc;
5003 if (ep->other.desc_count) ed = (Edje_Part_Description_Image*) ep->other.desc[ep->other.desc_count - 1];
5004
4731 ed->image.fill.abs_x = parse_int(0); 5005 ed->image.fill.abs_x = parse_int(0);
4732 ed->image.fill.abs_y = parse_int(1); 5006 ed->image.fill.abs_y = parse_int(1);
4733} 5007}
@@ -4778,14 +5052,14 @@ st_collections_group_parts_part_description_fill_size_offset(void)
4778static void 5052static void
4779st_collections_group_parts_part_description_text_text(void) 5053st_collections_group_parts_part_description_text_text(void)
4780{ 5054{
4781 Old_Edje_Part_Collection *pc; 5055 Edje_Part_Collection *pc;
4782 Old_Edje_Part *ep; 5056 Edje_Part *ep;
4783 Old_Edje_Part_Description *ed; 5057 Edje_Part_Description_Text *ed;
4784 char *str = NULL; 5058 char *str = NULL;
4785 int i; 5059 int i;
4786 5060
4787 pc = eina_list_data_get(eina_list_last(edje_collections)); 5061 pc = eina_list_data_get(eina_list_last(edje_collections));
4788 ep = eina_list_data_get(eina_list_last(pc->parts)); 5062 ep = pc->parts[pc->parts_count - 1];
4789 5063
4790 if ((ep->type != EDJE_PART_TYPE_TEXT) && 5064 if ((ep->type != EDJE_PART_TYPE_TEXT) &&
4791 (ep->type != EDJE_PART_TYPE_TEXTBLOCK)) 5065 (ep->type != EDJE_PART_TYPE_TEXTBLOCK))
@@ -4796,8 +5070,9 @@ st_collections_group_parts_part_description_text_text(void)
4796 exit(-1); 5070 exit(-1);
4797 } 5071 }
4798 5072
4799 ed = ep->default_desc; 5073 ed = (Edje_Part_Description_Text*) ep->default_desc;
4800 if (ep->other_desc) ed = eina_list_data_get(eina_list_last(ep->other_desc)); 5074 if (ep->other.desc_count) ed = (Edje_Part_Description_Text*) ep->other.desc[ep->other.desc_count - 1];
5075
4801 for (i = 0; ;i++) 5076 for (i = 0; ;i++)
4802 { 5077 {
4803 char *s; 5078 char *s;
@@ -4830,14 +5105,14 @@ st_collections_group_parts_part_description_text_text(void)
4830static void 5105static void
4831st_collections_group_parts_part_description_text_text_class(void) 5106st_collections_group_parts_part_description_text_text_class(void)
4832{ 5107{
4833 Old_Edje_Part_Collection *pc; 5108 Edje_Part_Collection *pc;
4834 Old_Edje_Part *ep; 5109 Edje_Part *ep;
4835 Old_Edje_Part_Description *ed; 5110 Edje_Part_Description_Text *ed;
4836 5111
4837 check_arg_count(1); 5112 check_arg_count(1);
4838 5113
4839 pc = eina_list_data_get(eina_list_last(edje_collections)); 5114 pc = eina_list_data_get(eina_list_last(edje_collections));
4840 ep = eina_list_data_get(eina_list_last(pc->parts)); 5115 ep = pc->parts[pc->parts_count - 1];
4841 5116
4842 if ((ep->type != EDJE_PART_TYPE_TEXT) && 5117 if ((ep->type != EDJE_PART_TYPE_TEXT) &&
4843 (ep->type != EDJE_PART_TYPE_TEXTBLOCK)) 5118 (ep->type != EDJE_PART_TYPE_TEXTBLOCK))
@@ -4848,8 +5123,9 @@ st_collections_group_parts_part_description_text_text_class(void)
4848 exit(-1); 5123 exit(-1);
4849 } 5124 }
4850 5125
4851 ed = ep->default_desc; 5126 ed = (Edje_Part_Description_Text*) ep->default_desc;
4852 if (ep->other_desc) ed = eina_list_data_get(eina_list_last(ep->other_desc)); 5127 if (ep->other.desc_count) ed = (Edje_Part_Description_Text*) ep->other.desc[ep->other.desc_count - 1];
5128
4853 ed->text.text_class = parse_str(0); 5129 ed->text.text_class = parse_str(0);
4854} 5130}
4855 5131
@@ -4868,16 +5144,17 @@ st_collections_group_parts_part_description_text_text_class(void)
4868static void 5144static void
4869st_collections_group_parts_part_description_text_font(void) 5145st_collections_group_parts_part_description_text_font(void)
4870{ 5146{
4871 Old_Edje_Part_Collection *pc; 5147 Edje_Part_Collection *pc;
4872 Old_Edje_Part *ep; 5148 Edje_Part *ep;
4873 Old_Edje_Part_Description *ed; 5149 Edje_Part_Description_Text *ed;
4874 5150
4875 check_arg_count(1); 5151 check_arg_count(1);
4876 5152
4877 pc = eina_list_data_get(eina_list_last(edje_collections)); 5153 pc = eina_list_data_get(eina_list_last(edje_collections));
4878 ep = eina_list_data_get(eina_list_last(pc->parts)); 5154 ep = pc->parts[pc->parts_count - 1];
4879 5155
4880 if (ep->type != EDJE_PART_TYPE_TEXT) 5156 if ((ep->type != EDJE_PART_TYPE_TEXT) &&
5157 (ep->type != EDJE_PART_TYPE_TEXTBLOCK))
4881 { 5158 {
4882 ERR("%s: Error. parse error %s:%i. " 5159 ERR("%s: Error. parse error %s:%i. "
4883 "text attributes in non-TEXT part.", 5160 "text attributes in non-TEXT part.",
@@ -4885,8 +5162,9 @@ st_collections_group_parts_part_description_text_font(void)
4885 exit(-1); 5162 exit(-1);
4886 } 5163 }
4887 5164
4888 ed = ep->default_desc; 5165 ed = (Edje_Part_Description_Text*) ep->default_desc;
4889 if (ep->other_desc) ed = eina_list_data_get(eina_list_last(ep->other_desc)); 5166 if (ep->other.desc_count) ed = (Edje_Part_Description_Text*) ep->other.desc[ep->other.desc_count - 1];
5167
4890 ed->text.font.str = parse_str(0); 5168 ed->text.font.str = parse_str(0);
4891} 5169}
4892 5170
@@ -4905,25 +5183,27 @@ st_collections_group_parts_part_description_text_font(void)
4905static void 5183static void
4906st_collections_group_parts_part_description_text_style(void) 5184st_collections_group_parts_part_description_text_style(void)
4907{ 5185{
4908 Old_Edje_Part_Collection *pc; 5186 Edje_Part_Collection *pc;
4909 Old_Edje_Part *ep; 5187 Edje_Part *ep;
4910 Old_Edje_Part_Description *ed; 5188 Edje_Part_Description_Text *ed;
4911 5189
4912 check_arg_count(1); 5190 check_arg_count(1);
4913 5191
4914 pc = eina_list_data_get(eina_list_last(edje_collections)); 5192 pc = eina_list_data_get(eina_list_last(edje_collections));
4915 ep = eina_list_data_get(eina_list_last(pc->parts)); 5193 ep = pc->parts[pc->parts_count - 1];
4916 5194
4917 if (ep->type != EDJE_PART_TYPE_TEXTBLOCK) 5195 if ((ep->type != EDJE_PART_TYPE_TEXT) &&
5196 (ep->type != EDJE_PART_TYPE_TEXTBLOCK))
4918 { 5197 {
4919 ERR("%s: Error. parse error %s:%i. " 5198 ERR("%s: Error. parse error %s:%i. "
4920 "text attributes in non-TEXTBLOCK part.", 5199 "text attributes in non-TEXT part.",
4921 progname, file_in, line - 1); 5200 progname, file_in, line - 1);
4922 exit(-1); 5201 exit(-1);
4923 } 5202 }
4924 5203
4925 ed = ep->default_desc; 5204 ed = (Edje_Part_Description_Text*) ep->default_desc;
4926 if (ep->other_desc) ed = eina_list_data_get(eina_list_last(ep->other_desc)); 5205 if (ep->other.desc_count) ed = (Edje_Part_Description_Text*) ep->other.desc[ep->other.desc_count - 1];
5206
4927 ed->text.style.str = parse_str(0); 5207 ed->text.style.str = parse_str(0);
4928} 5208}
4929 5209
@@ -4943,25 +5223,27 @@ st_collections_group_parts_part_description_text_style(void)
4943static void 5223static void
4944st_collections_group_parts_part_description_text_repch(void) 5224st_collections_group_parts_part_description_text_repch(void)
4945{ 5225{
4946 Old_Edje_Part_Collection *pc; 5226 Edje_Part_Collection *pc;
4947 Old_Edje_Part *ep; 5227 Edje_Part *ep;
4948 Old_Edje_Part_Description *ed; 5228 Edje_Part_Description_Text *ed;
4949 5229
4950 check_arg_count(1); 5230 check_arg_count(1);
4951 5231
4952 pc = eina_list_data_get(eina_list_last(edje_collections)); 5232 pc = eina_list_data_get(eina_list_last(edje_collections));
4953 ep = eina_list_data_get(eina_list_last(pc->parts)); 5233 ep = pc->parts[pc->parts_count - 1];
4954 5234
4955 if (ep->type != EDJE_PART_TYPE_TEXTBLOCK) 5235 if ((ep->type != EDJE_PART_TYPE_TEXT) &&
5236 (ep->type != EDJE_PART_TYPE_TEXTBLOCK))
4956 { 5237 {
4957 ERR("%s: Error. parse error %s:%i. " 5238 ERR("%s: Error. parse error %s:%i. "
4958 "text attributes in non-TEXTBLOCK part.", 5239 "text attributes in non-TEXT part.",
4959 progname, file_in, line - 1); 5240 progname, file_in, line - 1);
4960 exit(-1); 5241 exit(-1);
4961 } 5242 }
4962 5243
4963 ed = ep->default_desc; 5244 ed = (Edje_Part_Description_Text*) ep->default_desc;
4964 if (ep->other_desc) ed = eina_list_data_get(eina_list_last(ep->other_desc)); 5245 if (ep->other.desc_count) ed = (Edje_Part_Description_Text*) ep->other.desc[ep->other.desc_count - 1];
5246
4965 ed->text.repch.str = parse_str(0); 5247 ed->text.repch.str = parse_str(0);
4966} 5248}
4967 5249
@@ -4980,16 +5262,17 @@ st_collections_group_parts_part_description_text_repch(void)
4980static void 5262static void
4981st_collections_group_parts_part_description_text_size(void) 5263st_collections_group_parts_part_description_text_size(void)
4982{ 5264{
4983 Old_Edje_Part_Collection *pc; 5265 Edje_Part_Collection *pc;
4984 Old_Edje_Part *ep; 5266 Edje_Part *ep;
4985 Old_Edje_Part_Description *ed; 5267 Edje_Part_Description_Text *ed;
4986 5268
4987 check_arg_count(1); 5269 check_arg_count(1);
4988 5270
4989 pc = eina_list_data_get(eina_list_last(edje_collections)); 5271 pc = eina_list_data_get(eina_list_last(edje_collections));
4990 ep = eina_list_data_get(eina_list_last(pc->parts)); 5272 ep = pc->parts[pc->parts_count - 1];
4991 5273
4992 if (ep->type != EDJE_PART_TYPE_TEXT) 5274 if ((ep->type != EDJE_PART_TYPE_TEXT) &&
5275 (ep->type != EDJE_PART_TYPE_TEXTBLOCK))
4993 { 5276 {
4994 ERR("%s: Error. parse error %s:%i. " 5277 ERR("%s: Error. parse error %s:%i. "
4995 "text attributes in non-TEXT part.", 5278 "text attributes in non-TEXT part.",
@@ -4997,8 +5280,9 @@ st_collections_group_parts_part_description_text_size(void)
4997 exit(-1); 5280 exit(-1);
4998 } 5281 }
4999 5282
5000 ed = ep->default_desc; 5283 ed = (Edje_Part_Description_Text*) ep->default_desc;
5001 if (ep->other_desc) ed = eina_list_data_get(eina_list_last(ep->other_desc)); 5284 if (ep->other.desc_count) ed = (Edje_Part_Description_Text*) ep->other.desc[ep->other.desc_count - 1];
5285
5002 ed->text.size = parse_int_range(0, 0, 255); 5286 ed->text.size = parse_int_range(0, 0, 255);
5003} 5287}
5004 5288
@@ -5017,16 +5301,17 @@ st_collections_group_parts_part_description_text_size(void)
5017static void 5301static void
5018st_collections_group_parts_part_description_text_fit(void) 5302st_collections_group_parts_part_description_text_fit(void)
5019{ 5303{
5020 Old_Edje_Part_Collection *pc; 5304 Edje_Part_Collection *pc;
5021 Old_Edje_Part *ep; 5305 Edje_Part *ep;
5022 Old_Edje_Part_Description *ed; 5306 Edje_Part_Description_Text *ed;
5023 5307
5024 check_arg_count(2); 5308 check_arg_count(2);
5025 5309
5026 pc = eina_list_data_get(eina_list_last(edje_collections)); 5310 pc = eina_list_data_get(eina_list_last(edje_collections));
5027 ep = eina_list_data_get(eina_list_last(pc->parts)); 5311 ep = pc->parts[pc->parts_count - 1];
5028 5312
5029 if (ep->type != EDJE_PART_TYPE_TEXT) 5313 if ((ep->type != EDJE_PART_TYPE_TEXT) &&
5314 (ep->type != EDJE_PART_TYPE_TEXTBLOCK))
5030 { 5315 {
5031 ERR("%s: Error. parse error %s:%i. " 5316 ERR("%s: Error. parse error %s:%i. "