return 0;
}
child_ed = _edje_fetch(child_obj);
- child_ed->parent = eina_stringshare_add(rp->part->name);
-
+ child_ed->parent = eina_stringshare_add(rp->part->name);
+
group_path = eina_list_remove(group_path, group_path_entry);
eina_stringshare_del(group_path_entry);
}
else
{
+ pack_it->parent = rp;
+
_edje_object_pack_item_hints_set(child_obj, pack_it);
evas_object_show(child_obj);
if (pack_it->name)
- evas_object_name_set(child_obj, pack_it->name);
+ evas_object_name_set(child_obj, pack_it->name);
+
if (rp->part->type == EDJE_PART_TYPE_BOX)
{
_edje_real_part_box_append(rp, child_obj);
static void
_cb_signal_repeat(void *data, Evas_Object *obj, const char *signal, const char *source)
{
+ Edje_Pack_Element *pack_it;
Evas_Object *parent;
Edje *ed;
Edje *ed_parent;
char new_src[4096]; /* XXX is this max reasonable? */
size_t length_parent = 0;
+ size_t length_index = 0;
size_t length_source;
+ int i = 0;
const char *alias = NULL;
parent = data;
ed = _edje_fetch(obj);
if (!ed) return;
+
+ pack_it = evas_object_data_get(obj, "\377 edje.box_item");
+ if (!pack_it) pack_it = evas_object_data_get(obj, "\377 edje.table_item");
+ if (pack_it)
+ {
+ if (!pack_it->name)
+ {
+ Eina_List *child = NULL;
+ Evas_Object *o;
+
+ if (pack_it->parent->part->type == EDJE_PART_TYPE_BOX)
+ {
+ child = evas_object_box_children_get(pack_it->parent->object);
+ }
+ else if (pack_it->parent->part->type == EDJE_PART_TYPE_TABLE)
+ {
+ child = evas_object_table_children_get(pack_it->parent->object);
+ }
+
+ EINA_LIST_FREE(child, o)
+ {
+ if (o == obj) break;
+ i++;
+ }
+
+ eina_list_free(child);
+
+ length_index = 12;
+ }
+ else
+ {
+ length_index = strlen(pack_it->name) + 2;
+ }
+ }
+
/* Replace snprint("%s%c%s") == memcpy + *new_src + memcat */
if (ed->parent)
length_parent = strlen(ed->parent);
length_source = strlen(source);
- if (length_source + length_parent + 2 > sizeof(new_src))
+ if (length_source + length_parent + 2 + length_index > sizeof(new_src))
return;
if (ed->parent)
memcpy(new_src, ed->parent, length_parent);
+ if (ed->parent && length_index)
+ {
+ new_src[length_parent++] = EDJE_PART_PATH_SEPARATOR_INDEXL;
+ if (length_index == 12)
+ length_parent += eina_convert_itoa(i, new_src + length_parent);
+ else
+ {
+ memcpy(new_src + length_parent, pack_it->name, length_index);
+ length_parent += length_index - 2;
+ }
+ new_src[length_parent++] = EDJE_PART_PATH_SEPARATOR_INDEXR;
+ }
+
new_src[length_parent] = EDJE_PART_PATH_SEPARATOR;
memcpy(new_src + length_parent + 1, source, length_source + 1);
typedef struct _Edje_Patterns Edje_Patterns;
typedef struct _Edje_Part_Box_Animation Edje_Part_Box_Animation;
+typedef struct _Edje Edje;
+typedef struct _Edje_Real_Part_State Edje_Real_Part_State;
+typedef struct _Edje_Real_Part_Drag Edje_Real_Part_Drag;
+typedef struct _Edje_Real_Part_Set Edje_Real_Part_Set;
+typedef struct _Edje_Real_Part Edje_Real_Part;
+typedef struct _Edje_Running_Program Edje_Running_Program;
+typedef struct _Edje_Signal_Callback Edje_Signal_Callback;
+typedef struct _Edje_Calc_Params Edje_Calc_Params;
+typedef struct _Edje_Pending_Program Edje_Pending_Program;
+typedef struct _Edje_Text_Style Edje_Text_Style;
+typedef struct _Edje_Color_Class Edje_Color_Class;
+typedef struct _Edje_Text_Class Edje_Text_Class;
+typedef struct _Edje_Var Edje_Var;
+typedef struct _Edje_Var_Int Edje_Var_Int;
+typedef struct _Edje_Var_Float Edje_Var_Float;
+typedef struct _Edje_Var_String Edje_Var_String;
+typedef struct _Edje_Var_List Edje_Var_List;
+typedef struct _Edje_Var_Hash Edje_Var_Hash;
+typedef struct _Edje_Var_Animator Edje_Var_Animator;
+typedef struct _Edje_Var_Timer Edje_Var_Timer;
+typedef struct _Edje_Var_Pool Edje_Var_Pool;
+typedef struct _Edje_Signal_Source_Char Edje_Signal_Source_Char;
+typedef struct _Edje_Text_Insert_Filter_Callback Edje_Text_Insert_Filter_Callback;
+
#define EDJE_INF_MAX_W 100000
#define EDJE_INF_MAX_H 100000
struct _Edje_Pack_Element
{
unsigned char type; /* only GROUP supported for now */
+ Edje_Real_Part *parent; /* pointer to the table/box that hold it, set at runtime */
const char *name; /* if != NULL, will be set with evas_object_name_set */
const char *source; /* group name to use as source for this element */
Edje_Size min, prefer, max;
/*----------*/
-
-typedef struct _Edje Edje;
-typedef struct _Edje_Real_Part_State Edje_Real_Part_State;
-typedef struct _Edje_Real_Part_Drag Edje_Real_Part_Drag;
-typedef struct _Edje_Real_Part_Set Edje_Real_Part_Set;
-typedef struct _Edje_Real_Part Edje_Real_Part;
-typedef struct _Edje_Running_Program Edje_Running_Program;
-typedef struct _Edje_Signal_Callback Edje_Signal_Callback;
-typedef struct _Edje_Calc_Params Edje_Calc_Params;
-typedef struct _Edje_Pending_Program Edje_Pending_Program;
-typedef struct _Edje_Text_Style Edje_Text_Style;
-typedef struct _Edje_Color_Class Edje_Color_Class;
-typedef struct _Edje_Text_Class Edje_Text_Class;
-typedef struct _Edje_Var Edje_Var;
-typedef struct _Edje_Var_Int Edje_Var_Int;
-typedef struct _Edje_Var_Float Edje_Var_Float;
-typedef struct _Edje_Var_String Edje_Var_String;
-typedef struct _Edje_Var_List Edje_Var_List;
-typedef struct _Edje_Var_Hash Edje_Var_Hash;
-typedef struct _Edje_Var_Animator Edje_Var_Animator;
-typedef struct _Edje_Var_Timer Edje_Var_Timer;
-typedef struct _Edje_Var_Pool Edje_Var_Pool;
-typedef struct _Edje_Signal_Source_Char Edje_Signal_Source_Char;
-typedef struct _Edje_Text_Insert_Filter_Callback Edje_Text_Insert_Filter_Callback;
-
struct _Edje_Signal_Source_Char
{
EINA_RBTREE;