git-svn-id: http://svn.enlightenment.org/svn/e/trunk/edje@50267
7cbeb6ba-43b4-40fd-8cce-
4c39aea84d33
{
Edje_Part_Collection_Directory_Entry *ce;
Edje_Part_Collection *edc;
+ Edje_Part *part;
+ Eina_List *l;
edc = oedc;
ce->ref = edc;
- /* FIXME : Count type part and change their structure */
+ /* Count each type part and their respective state */
+ EINA_LIST_FOREACH(oedc->parts, l, part)
+ {
+ int *count;
+ int dummy = 0;
+
+
+ switch (part->type)
+ {
+#define CSP(Tp, Ce) \
+ case EDJE_PART_TYPE_##Tp : \
+ count = &Ce->count.Tp; \
+ break;
+
+ CSP(RECTANGLE, ce);
+ CSP(TEXT, ce);
+ CSP(IMAGE, ce);
+ CSP(SWALLOW, ce);
+ CSP(TEXTBLOCK, ce);
+ CSP(GROUP, ce);
+ CSP(BOX, ce);
+ CSP(TABLE, ce);
+ CSP(EXTERNAL, ce);
+ default:
+ count = &dummy;
+ break;
+ }
+
+ *count += eina_list_count(part->other_desc) + 1;
+ }
+
+ /* FIXME : change structure layout */
return edc;
}
const char *entry; /* the nominal name of the part collection */
int id; /* the id of this named part collection */
+ struct
+ {
+ int RECTANGLE;
+ int TEXT;
+ int IMAGE;
+ int SWALLOW;
+ int TEXTBLOCK;
+ int GROUP;
+ int BOX;
+ int TABLE;
+ int EXTERNAL;
+ } count;
+
Edje_Part_Collection *ref;
};