summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMike Blumenkrantz <zmike@samsung.com>2019-03-04 13:42:04 -0500
committerMike Blumenkrantz <zmike@samsung.com>2019-03-04 13:42:05 -0500
commit12467afd40bdae7cf33f4528888130190a25013d (patch)
treea0951a23bf0e621060aa4dabaa89ce0d3eb43b7f /src
parent7b6878bb288d8464cd76482159a03a24968f21c4 (diff)
efl.layout.calc: remove list<> usage in FIXME for event
Summary: make this an array since there is no need to use a list here anyway ref T7581 Reviewers: cedric Reviewed By: cedric Subscribers: cedric, #reviewers, #committers Tags: #efl_api Maniphest Tasks: T7581 Differential Revision: https://phab.enlightenment.org/D8058
Diffstat (limited to 'src')
-rw-r--r--src/lib/edje/edje_calc.c53
-rw-r--r--src/lib/edje/efl_layout_calc.eo3
2 files changed, 29 insertions, 27 deletions
diff --git a/src/lib/edje/edje_calc.c b/src/lib/edje/edje_calc.c
index 18dd82d0cb..032ec030f2 100644
--- a/src/lib/edje/edje_calc.c
+++ b/src/lib/edje/edje_calc.c
@@ -3640,7 +3640,7 @@ _edje_map_prop_set(Evas_Map *map, const Edje_Calc_Params *pf,
3640#define Rel2X 2 3640#define Rel2X 2
3641#define Rel2Y 3 3641#define Rel2Y 3
3642static Eina_Bool 3642static Eina_Bool
3643_circular_dependency_find(Edje *ed, Edje_Real_Part *ep, Edje_Real_Part *cep, Eina_List **clist) 3643_circular_dependency_find(Edje *ed, Edje_Real_Part *ep, Edje_Real_Part *cep, Eina_Array *arr)
3644{ 3644{
3645 Edje_Real_Part *rp = NULL; 3645 Edje_Real_Part *rp = NULL;
3646 3646
@@ -3654,18 +3654,18 @@ _circular_dependency_find(Edje *ed, Edje_Real_Part *ep, Edje_Real_Part *cep, Ein
3654 if (cep->param1.description->rel1.id_x >= 0) 3654 if (cep->param1.description->rel1.id_x >= 0)
3655 { 3655 {
3656 rp = ed->table_parts[cep->param1.description->rel1.id_x]; 3656 rp = ed->table_parts[cep->param1.description->rel1.id_x];
3657 if (_circular_dependency_find(ed, ep, rp, clist)) 3657 if (_circular_dependency_find(ed, ep, rp, arr))
3658 { 3658 {
3659 *clist = eina_list_prepend(*clist, rp->part->name); 3659 eina_array_push(arr, eina_stringshare_ref(rp->part->name));
3660 return EINA_TRUE; 3660 return EINA_TRUE;
3661 } 3661 }
3662 } 3662 }
3663 if (cep->param1.description->rel2.id_x >= 0) 3663 if (cep->param1.description->rel2.id_x >= 0)
3664 { 3664 {
3665 rp = ed->table_parts[cep->param1.description->rel2.id_x]; 3665 rp = ed->table_parts[cep->param1.description->rel2.id_x];
3666 if (_circular_dependency_find(ed, ep, rp, clist)) 3666 if (_circular_dependency_find(ed, ep, rp, arr))
3667 { 3667 {
3668 *clist = eina_list_prepend(*clist, rp->part->name); 3668 eina_array_push(arr, eina_stringshare_ref(rp->part->name));
3669 return EINA_TRUE; 3669 return EINA_TRUE;
3670 } 3670 }
3671 } 3671 }
@@ -3676,18 +3676,18 @@ _circular_dependency_find(Edje *ed, Edje_Real_Part *ep, Edje_Real_Part *cep, Ein
3676 if (cep->param2->description->rel1.id_x >= 0) 3676 if (cep->param2->description->rel1.id_x >= 0)
3677 { 3677 {
3678 rp = ed->table_parts[cep->param2->description->rel1.id_x]; 3678 rp = ed->table_parts[cep->param2->description->rel1.id_x];
3679 if (_circular_dependency_find(ed, ep, rp, clist)) 3679 if (_circular_dependency_find(ed, ep, rp, arr))
3680 { 3680 {
3681 *clist = eina_list_prepend(*clist, rp->part->name); 3681 eina_array_push(arr, eina_stringshare_ref(rp->part->name));
3682 return EINA_TRUE; 3682 return EINA_TRUE;
3683 } 3683 }
3684 } 3684 }
3685 if (cep->param2->description->rel2.id_x >= 0) 3685 if (cep->param2->description->rel2.id_x >= 0)
3686 { 3686 {
3687 rp = ed->table_parts[cep->param2->description->rel2.id_x]; 3687 rp = ed->table_parts[cep->param2->description->rel2.id_x];
3688 if (_circular_dependency_find(ed, ep, rp, clist)) 3688 if (_circular_dependency_find(ed, ep, rp, arr))
3689 { 3689 {
3690 *clist = eina_list_prepend(*clist, rp->part->name); 3690 eina_array_push(arr, eina_stringshare_ref(rp->part->name));
3691 return EINA_TRUE; 3691 return EINA_TRUE;
3692 } 3692 }
3693 } 3693 }
@@ -3700,18 +3700,18 @@ _circular_dependency_find(Edje *ed, Edje_Real_Part *ep, Edje_Real_Part *cep, Ein
3700 if (cep->param1.description->rel1.id_y >= 0) 3700 if (cep->param1.description->rel1.id_y >= 0)
3701 { 3701 {
3702 rp = ed->table_parts[cep->param1.description->rel1.id_y]; 3702 rp = ed->table_parts[cep->param1.description->rel1.id_y];
3703 if (_circular_dependency_find(ed, ep, rp, clist)) 3703 if (_circular_dependency_find(ed, ep, rp, arr))
3704 { 3704 {
3705 *clist = eina_list_prepend(*clist, rp->part->name); 3705 eina_array_push(arr, eina_stringshare_ref(rp->part->name));
3706 return EINA_TRUE; 3706 return EINA_TRUE;
3707 } 3707 }
3708 } 3708 }
3709 if (cep->param1.description->rel2.id_y >= 0) 3709 if (cep->param1.description->rel2.id_y >= 0)
3710 { 3710 {
3711 rp = ed->table_parts[cep->param1.description->rel2.id_y]; 3711 rp = ed->table_parts[cep->param1.description->rel2.id_y];
3712 if (_circular_dependency_find(ed, ep, rp, clist)) 3712 if (_circular_dependency_find(ed, ep, rp, arr))
3713 { 3713 {
3714 *clist = eina_list_prepend(*clist, rp->part->name); 3714 eina_array_push(arr, eina_stringshare_ref(rp->part->name));
3715 return EINA_TRUE; 3715 return EINA_TRUE;
3716 } 3716 }
3717 } 3717 }
@@ -3721,18 +3721,18 @@ _circular_dependency_find(Edje *ed, Edje_Real_Part *ep, Edje_Real_Part *cep, Ein
3721 if (cep->param2->description->rel1.id_y >= 0) 3721 if (cep->param2->description->rel1.id_y >= 0)
3722 { 3722 {
3723 rp = ed->table_parts[cep->param2->description->rel1.id_y]; 3723 rp = ed->table_parts[cep->param2->description->rel1.id_y];
3724 if (_circular_dependency_find(ed, ep, rp, clist)) 3724 if (_circular_dependency_find(ed, ep, rp, arr))
3725 { 3725 {
3726 *clist = eina_list_prepend(*clist, rp->part->name); 3726 eina_array_push(arr, eina_stringshare_ref(rp->part->name));
3727 return EINA_TRUE; 3727 return EINA_TRUE;
3728 } 3728 }
3729 } 3729 }
3730 if (cep->param2->description->rel2.id_y >= 0) 3730 if (cep->param2->description->rel2.id_y >= 0)
3731 { 3731 {
3732 rp = ed->table_parts[cep->param2->description->rel2.id_y]; 3732 rp = ed->table_parts[cep->param2->description->rel2.id_y];
3733 if (_circular_dependency_find(ed, ep, rp, clist)) 3733 if (_circular_dependency_find(ed, ep, rp, arr))
3734 { 3734 {
3735 *clist = eina_list_prepend(*clist, rp->part->name); 3735 eina_array_push(arr, eina_stringshare_ref(rp->part->name));
3736 return EINA_TRUE; 3736 return EINA_TRUE;
3737 } 3737 }
3738 } 3738 }
@@ -3892,26 +3892,29 @@ _edje_part_recalc(Edje *ed, Edje_Real_Part *ep, int flags, Edje_Calc_Params *sta
3892 axes, ep->calculating, 3892 axes, ep->calculating,
3893 faxes, flags); 3893 faxes, flags);
3894 3894
3895 Eina_List *clist = NULL; 3895 Eina_Array *part_array = eina_array_new(10);;
3896 Eina_List *l = NULL;
3897 char *part_name;
3898 char depends_path[PATH_MAX] = "";
3899 3896
3900 if (_circular_dependency_find(ed, ep, NULL, &clist)) 3897 if (_circular_dependency_find(ed, ep, NULL, part_array))
3901 { 3898 {
3899 Eina_Array_Iterator it;
3900 unsigned int i;
3901 char *part_name;
3902 char depends_path[PATH_MAX] = "";
3903
3904 efl_event_callback_legacy_call(ed->obj, EFL_LAYOUT_EVENT_CIRCULAR_DEPENDENCY, part_array);
3902 strncat(depends_path, ep->part->name, 3905 strncat(depends_path, ep->part->name,
3903 sizeof(depends_path) - strlen(depends_path) - 1); 3906 sizeof(depends_path) - strlen(depends_path) - 1);
3904 EINA_LIST_FOREACH(clist, l, part_name) 3907 EINA_ARRAY_ITER_NEXT(part_array, i, part_name, it)
3905 { 3908 {
3906 strncat(depends_path, " -> ", 3909 strncat(depends_path, " -> ",
3907 sizeof(depends_path) - strlen(depends_path) - 1); 3910 sizeof(depends_path) - strlen(depends_path) - 1);
3908 strncat(depends_path, part_name, 3911 strncat(depends_path, part_name,
3909 sizeof(depends_path) - strlen(depends_path) - 1); 3912 sizeof(depends_path) - strlen(depends_path) - 1);
3913 eina_stringshare_del(part_name);
3910 } 3914 }
3911 efl_event_callback_legacy_call(ed->obj, EFL_LAYOUT_EVENT_CIRCULAR_DEPENDENCY, clist);
3912 ERR("Circular dependency in the group '%s' : %s", 3915 ERR("Circular dependency in the group '%s' : %s",
3913 ed->group, depends_path); 3916 ed->group, depends_path);
3914 eina_list_free(clist); 3917 eina_array_free(part_array);
3915 } 3918 }
3916#endif 3919#endif
3917 return; 3920 return;
diff --git a/src/lib/edje/efl_layout_calc.eo b/src/lib/edje/efl_layout_calc.eo
index ab43fbbe1f..cf4f45ebde 100644
--- a/src/lib/edje/efl_layout_calc.eo
+++ b/src/lib/edje/efl_layout_calc.eo
@@ -109,8 +109,7 @@ interface @beta Efl.Layout.Calc
109 } 109 }
110 events { 110 events {
111 recalc: void; [[The layout was recalculated.]] 111 recalc: void; [[The layout was recalculated.]]
112 /* FIXME: The actual type is list<string> but the C# bindings do not support that yet */ 112 circular,dependency: const(array<string>); [[A circular dependency between parts of the
113 circular,dependency: void; [[A circular dependency between parts of the
114 object was found.]] 113 object was found.]]
115 } 114 }
116} 115}