summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcel Hollerbach <mail@marcel-hollerbach.de>2020-02-17 13:56:06 +0100
committerMarcel Hollerbach <mail@marcel-hollerbach.de>2020-02-19 16:28:11 +0100
commit090c351d388da6f19644ea83685419c9db9bb4e1 (patch)
tree047652d3e92ce88149c0898e402b8a765a24f2f0
parent6c251b2d0163a19f4928c3388fb8e675d8f00bdc (diff)
elementary: use array instead of list for subchildren
this safes in the runtime of elm_test round about 9kb (*). Additionally, using a array here is jumping way fewer times arround in memory, as we do not need to jump from node to node in a list. Additionally, this commit replaces a few abort disabler macros with a error checking macro. (which cleans the log). *: explanation: we have round about 600 widgets in elm_test, every widget is normally refered once, every list node has 4 pointer, makes round about 9600 bytes or rougly 9 KB. So the messured savings are more or less explaining the reality. Reviewed-by: Carsten Haitzler (Rasterman) <rasterman.com> Differential Revision: https://phab.enlightenment.org/D11374
-rw-r--r--src/lib/elementary/efl_ui_layout.c28
-rw-r--r--src/lib/elementary/efl_ui_panel.c21
-rw-r--r--src/lib/elementary/efl_ui_widget.c120
-rw-r--r--src/lib/elementary/efl_ui_widget_common.c13
-rw-r--r--src/lib/elementary/elm_box.c21
-rw-r--r--src/lib/elementary/elm_config.c4
-rw-r--r--src/lib/elementary/elm_focus_legacy.c10
-rw-r--r--src/lib/elementary/elm_genlist.c8
-rw-r--r--src/lib/elementary/elm_grid.c21
-rw-r--r--src/lib/elementary/elm_panel.c21
-rw-r--r--src/lib/elementary/elm_table.c21
-rw-r--r--src/lib/elementary/elm_widget.h2
-rw-r--r--src/tests/elementary/efl_ui_test_widget.c10
13 files changed, 158 insertions, 142 deletions
diff --git a/src/lib/elementary/efl_ui_layout.c b/src/lib/elementary/efl_ui_layout.c
index 3b6c50ba2a..8569735005 100644
--- a/src/lib/elementary/efl_ui_layout.c
+++ b/src/lib/elementary/efl_ui_layout.c
@@ -179,11 +179,13 @@ _sizing_eval(Evas_Object *obj, Efl_Ui_Layout_Data *sd, Elm_Layout_Data *ld)
179 179
180 if (sd->calc_subobjs && !evas_smart_objects_calculating_get(evas_object_evas_get(obj))) 180 if (sd->calc_subobjs && !evas_smart_objects_calculating_get(evas_object_evas_get(obj)))
181 { 181 {
182 Eina_List *l;
183 Eo *subobj; 182 Eo *subobj;
184 /* user has manually triggered a smart calc and wants subobjs to also calc */ 183 /* user has manually triggered a smart calc and wants subobjs to also calc */
185 EINA_LIST_FOREACH(wd->subobjs, l, subobj) 184 for (unsigned int i = 0; i < eina_array_count(wd->children); ++i)
186 efl_canvas_group_calculate(subobj); 185 {
186 subobj = eina_array_data_get(wd->children, i);
187 efl_canvas_group_calculate(subobj);
188 }
187 } 189 }
188 elm_coords_finger_size_adjust(sd->finger_size_multiplier_x, &rest_w, 190 elm_coords_finger_size_adjust(sd->finger_size_multiplier_x, &rest_w,
189 sd->finger_size_multiplier_y, &rest_h); 191 sd->finger_size_multiplier_y, &rest_h);
@@ -926,8 +928,6 @@ _efl_ui_layout_base_efl_canvas_group_group_del(Eo *obj, Efl_Ui_Layout_Data *sd)
926 Efl_Ui_Layout_Sub_Object_Data *sub_d; 928 Efl_Ui_Layout_Sub_Object_Data *sub_d;
927 Efl_Ui_Layout_Sub_Object_Cursor *pc; 929 Efl_Ui_Layout_Sub_Object_Cursor *pc;
928 Edje_Signal_Data *esd; 930 Edje_Signal_Data *esd;
929 Evas_Object *child;
930 Eina_List *l;
931 Efl_Model *model; 931 Efl_Model *model;
932 932
933 ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd); 933 ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd);
@@ -982,15 +982,15 @@ _efl_ui_layout_base_efl_canvas_group_group_del(Eo *obj, Efl_Ui_Layout_Data *sd)
982 982
983 /* let's make our Edje object the *last* to be processed, since it 983 /* let's make our Edje object the *last* to be processed, since it
984 * may (smart) parent other sub objects here */ 984 * may (smart) parent other sub objects here */
985 EINA_LIST_FOREACH(wd->subobjs, l, child) 985 {
986 { 986 unsigned int resize_id = 0;
987 if (child == wd->resize_obj) 987 if (eina_array_find(wd->children, wd->resize_obj, &resize_id))
988 { 988 {
989 wd->subobjs = 989 //exchange with last
990 eina_list_demote_list(wd->subobjs, l); 990 eina_array_data_set(wd->children, resize_id, eina_array_data_get(wd->children, eina_array_count(wd->children) - 1));
991 break; 991 eina_array_data_set(wd->children, eina_array_count(wd->children) - 1, wd->resize_obj);
992 } 992 }
993 } 993 }
994 994
995 sd->destructed_is = EINA_TRUE; 995 sd->destructed_is = EINA_TRUE;
996 996
diff --git a/src/lib/elementary/efl_ui_panel.c b/src/lib/elementary/efl_ui_panel.c
index c173224a5f..212ce3de5d 100644
--- a/src/lib/elementary/efl_ui_panel.c
+++ b/src/lib/elementary/efl_ui_panel.c
@@ -886,9 +886,6 @@ _efl_ui_panel_efl_object_constructor(Eo *obj, Efl_Ui_Panel_Data *_pd)
886EOLIAN static void 886EOLIAN static void
887_efl_ui_panel_efl_object_destructor(Eo *obj, Efl_Ui_Panel_Data *sd) 887_efl_ui_panel_efl_object_destructor(Eo *obj, Efl_Ui_Panel_Data *sd)
888{ 888{
889 Evas_Object *child;
890 Eina_List *l;
891
892 ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd); 889 ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd);
893 890
894 sd->delete_me = EINA_TRUE; 891 sd->delete_me = EINA_TRUE;
@@ -897,15 +894,15 @@ _efl_ui_panel_efl_object_destructor(Eo *obj, Efl_Ui_Panel_Data *sd)
897 894
898 /* let's make our panel object the *last* to be processed, since it 895 /* let's make our panel object the *last* to be processed, since it
899 * may (smart) parent other sub objects here */ 896 * may (smart) parent other sub objects here */
900 EINA_LIST_FOREACH(wd->subobjs, l, child) 897 {
901 { 898 unsigned int resize_id = 0;
902 if (child == sd->bx) 899 if (eina_array_find(wd->children, wd->resize_obj, &resize_id))
903 { 900 {
904 wd->subobjs = 901 //exchange with last
905 eina_list_demote_list(wd->subobjs, l); 902 eina_array_data_set(wd->children, resize_id, eina_array_data_get(wd->children, eina_array_count(wd->children) - 1));
906 break; 903 eina_array_data_set(wd->children, eina_array_count(wd->children) - 1, wd->resize_obj);
907 } 904 }
908 } 905 }
909 906
910 efl_destructor(efl_super(obj, MY_CLASS)); 907 efl_destructor(efl_super(obj, MY_CLASS));
911} 908}
diff --git a/src/lib/elementary/efl_ui_widget.c b/src/lib/elementary/efl_ui_widget.c
index c27838b61c..c4d128dd43 100644
--- a/src/lib/elementary/efl_ui_widget.c
+++ b/src/lib/elementary/efl_ui_widget.c
@@ -734,6 +734,14 @@ _efl_ui_widget_efl_canvas_group_group_add(Eo *obj, Elm_Widget_Smart_Data *priv)
734 _obj_mouse_in, obj); 734 _obj_mouse_in, obj);
735} 735}
736 736
737static Eina_Bool
738_keep(void *data, void *gdata)
739{
740 if (data == gdata)
741 return EINA_FALSE;
742 return EINA_TRUE;
743}
744
737EOLIAN static void 745EOLIAN static void
738_efl_ui_widget_efl_canvas_group_group_del(Eo *obj, Elm_Widget_Smart_Data *sd) 746_efl_ui_widget_efl_canvas_group_group_del(Eo *obj, Elm_Widget_Smart_Data *sd)
739{ 747{
@@ -747,20 +755,18 @@ _efl_ui_widget_efl_canvas_group_group_del(Eo *obj, Elm_Widget_Smart_Data *sd)
747 _callbacks_del(sd->hover_obj, obj); 755 _callbacks_del(sd->hover_obj, obj);
748 sd->hover_obj = NULL; 756 sd->hover_obj = NULL;
749 } 757 }
750 758 while(eina_array_count(sd->children))
751 while (sd->subobjs)
752 { 759 {
753 sobj = eina_list_data_get(sd->subobjs); 760 sobj = eina_array_data_get(sd->children, 0);
754 761
755 /* let the objects clean-up themselves and get rid of this list */
756 if (!elm_widget_sub_object_del(obj, sobj)) 762 if (!elm_widget_sub_object_del(obj, sobj))
757 { 763 {
758 ERR("failed to remove sub object %p from %p\n", sobj, obj); 764 ERR("failed to remove sub object %p from %p\n", sobj, obj);
759 sd->subobjs = eina_list_remove_list 765 eina_array_remove(sd->children, _keep, sobj);
760 (sd->subobjs, sd->subobjs);
761 } 766 }
762 // FIXME: is that a legacy or a new object ? 767 // FIXME: is that a legacy or a new object ?
763 evas_object_del(sobj); 768 evas_object_del(sobj);
769 EINA_SAFETY_ON_TRUE_RETURN(eina_array_count(sd->children) && sobj == eina_array_data_get(sd->children, 0));
764 } 770 }
765 sd->tooltips = eina_list_free(sd->tooltips); /* should be empty anyway */ 771 sd->tooltips = eina_list_free(sd->tooltips); /* should be empty anyway */
766 sd->cursors = eina_list_free(sd->cursors); /* should be empty anyway */ 772 sd->cursors = eina_list_free(sd->cursors); /* should be empty anyway */
@@ -851,14 +857,14 @@ _efl_ui_widget_efl_gfx_entity_size_set(Eo *obj EINA_UNUSED, Elm_Widget_Smart_Dat
851void 857void
852_elm_widget_full_eval_children(Eo *obj, Elm_Widget_Smart_Data *sd) 858_elm_widget_full_eval_children(Eo *obj, Elm_Widget_Smart_Data *sd)
853{ 859{
854 Eina_List *l;
855 Eo *child; 860 Eo *child;
856 861
857 _full_eval(obj, sd); 862 _full_eval(obj, sd);
858 863
859 EINA_LIST_FOREACH(sd->subobjs , l, child) 864 for (unsigned int i = 0; i < eina_array_count(sd->children); ++i)
860 { 865 {
861 Elm_Widget_Smart_Data *sd_child; 866 Elm_Widget_Smart_Data *sd_child;
867 child = eina_array_data_get(sd->children, i);
862 868
863 if (!efl_isa(child, EFL_UI_WIDGET_CLASS)) continue; 869 if (!efl_isa(child, EFL_UI_WIDGET_CLASS)) continue;
864 870
@@ -954,12 +960,13 @@ EOLIAN static void
954_efl_ui_widget_efl_canvas_object_is_frame_object_set(Eo *obj, Elm_Widget_Smart_Data *pd, Eina_Bool frame) 960_efl_ui_widget_efl_canvas_object_is_frame_object_set(Eo *obj, Elm_Widget_Smart_Data *pd, Eina_Bool frame)
955{ 961{
956 Evas_Object *o; 962 Evas_Object *o;
957 Eina_List *li;
958 963
959 frame = !!frame; 964 frame = !!frame;
960 efl_canvas_object_is_frame_object_set(efl_super(obj, MY_CLASS), frame); 965 efl_canvas_object_is_frame_object_set(efl_super(obj, MY_CLASS), frame);
961 EINA_LIST_FOREACH(pd->subobjs, li, o) 966 for (unsigned int i = 0; i < eina_array_count(pd->children); ++i)
962 { 967 {
968 o = eina_array_data_get(pd->children, i);
969
963 if (evas_object_data_get(o, "_elm_leaveme")) continue; 970 if (evas_object_data_get(o, "_elm_leaveme")) continue;
964 efl_canvas_object_is_frame_object_set(o, frame); 971 efl_canvas_object_is_frame_object_set(o, frame);
965 } 972 }
@@ -1185,13 +1192,14 @@ EAPI Eina_Bool
1185elm_widget_access(Evas_Object *obj, 1192elm_widget_access(Evas_Object *obj,
1186 Eina_Bool is_access) 1193 Eina_Bool is_access)
1187{ 1194{
1188 const Eina_List *l;
1189 Evas_Object *child; 1195 Evas_Object *child;
1190 Eina_Bool ret = EINA_TRUE; 1196 Eina_Bool ret = EINA_TRUE;
1191 1197
1192 API_ENTRY return EINA_FALSE; 1198 API_ENTRY return EINA_FALSE;
1193 EINA_LIST_FOREACH(sd->subobjs, l, child) 1199 for (unsigned int i = 0; i < eina_array_count(sd->children); ++i)
1194 { 1200 {
1201 child = eina_array_data_get(sd->children, i);
1202
1195 if (elm_widget_is(child)) 1203 if (elm_widget_is(child))
1196 ret &= elm_widget_access(child, is_access); 1204 ret &= elm_widget_access(child, is_access);
1197 } 1205 }
@@ -1227,10 +1235,12 @@ elm_widget_theme(Evas_Object *obj)
1227 Eina_Bool err_generic = EINA_FALSE; 1235 Eina_Bool err_generic = EINA_FALSE;
1228 1236
1229 API_ENTRY return EFL_UI_THEME_APPLY_ERROR_GENERIC; 1237 API_ENTRY return EFL_UI_THEME_APPLY_ERROR_GENERIC;
1230 1238 for (unsigned int i = 0; i < eina_array_count(sd->children); ++i)
1231 EINA_LIST_FOREACH(sd->subobjs, l, child) 1239 {
1232 if (_elm_widget_is(child)) 1240 child = eina_array_data_get(sd->children, i);
1233 _elm_widget_theme_helper(elm_widget_theme(child), &err_default, &err_generic); 1241 if (_elm_widget_is(child))
1242 _elm_widget_theme_helper(elm_widget_theme(child), &err_default, &err_generic);
1243 }
1234 1244
1235 if (sd->hover_obj) 1245 if (sd->hover_obj)
1236 _elm_widget_theme_helper(elm_widget_theme(sd->hover_obj), &err_default, &err_generic); 1246 _elm_widget_theme_helper(elm_widget_theme(sd->hover_obj), &err_default, &err_generic);
@@ -1278,8 +1288,9 @@ elm_widget_theme_specific(Evas_Object *obj,
1278 } 1288 }
1279 } 1289 }
1280 if (!force) return; 1290 if (!force) return;
1281 EINA_LIST_FOREACH(sd->subobjs, l, child) 1291 for (unsigned int i = 0; i < eina_array_count(sd->children); ++i)
1282 { 1292 {
1293 child = eina_array_data_get(sd->children, i);
1283 if (elm_widget_is(child)) 1294 if (elm_widget_is(child))
1284 elm_widget_theme_specific(child, th, force); 1295 elm_widget_theme_specific(child, th, force);
1285 } 1296 }
@@ -1437,7 +1448,7 @@ _efl_ui_widget_widget_parent_set(Eo *obj, Elm_Widget_Smart_Data *pd, Efl_Ui_Widg
1437 if (parent) 1448 if (parent)
1438 { 1449 {
1439 ELM_WIDGET_DATA_GET_OR_RETURN(parent, ppd); 1450 ELM_WIDGET_DATA_GET_OR_RETURN(parent, ppd);
1440 EINA_SAFETY_ON_FALSE_RETURN(eina_list_data_find(ppd->subobjs, obj)); 1451 EINA_SAFETY_ON_FALSE_RETURN(eina_array_find(ppd->children, obj, NULL));
1441 if (ppd->parent_obj == parent) 1452 if (ppd->parent_obj == parent)
1442 { 1453 {
1443 CRI("ATTEMPTING TO SET CHILD OF PARENT AS PARENT OF ITS OWN PARENT. THIS IS A BUG."); 1454 CRI("ATTEMPTING TO SET CHILD OF PARENT AS PARENT OF ITS OWN PARENT. THIS IS A BUG.");
@@ -1503,7 +1514,8 @@ _efl_ui_widget_widget_parent_set(Eo *obj, Elm_Widget_Smart_Data *pd, Efl_Ui_Widg
1503static void 1514static void
1504_widget_add_sub(Eo *obj, Elm_Widget_Smart_Data *sd, Evas_Object *sobj) 1515_widget_add_sub(Eo *obj, Elm_Widget_Smart_Data *sd, Evas_Object *sobj)
1505{ 1516{
1506 sd->subobjs = eina_list_append(sd->subobjs, sobj); 1517 if (!sd->children) sd->children = eina_array_new(1);
1518 eina_array_push(sd->children, sobj);
1507 evas_object_data_set(sobj, "elm-parent", obj); 1519 evas_object_data_set(sobj, "elm-parent", obj);
1508 _callbacks_add(sobj, obj); 1520 _callbacks_add(sobj, obj);
1509} 1521}
@@ -1511,7 +1523,7 @@ _widget_add_sub(Eo *obj, Elm_Widget_Smart_Data *sd, Evas_Object *sobj)
1511static void 1523static void
1512_widget_del_sub(Eo *obj, Elm_Widget_Smart_Data *sd, Evas_Object *sobj) 1524_widget_del_sub(Eo *obj, Elm_Widget_Smart_Data *sd, Evas_Object *sobj)
1513{ 1525{
1514 sd->subobjs = eina_list_remove(sd->subobjs, sobj); 1526 eina_array_remove(sd->children, _keep, sobj);
1515 evas_object_data_del(sobj, "elm-parent"); 1527 evas_object_data_del(sobj, "elm-parent");
1516 _callbacks_del(sobj, obj); 1528 _callbacks_del(sobj, obj);
1517} 1529}
@@ -1734,7 +1746,6 @@ EAPI void
1734elm_widget_tree_unfocusable_set(Eo *obj, Eina_Bool tree_unfocusable) 1746elm_widget_tree_unfocusable_set(Eo *obj, Eina_Bool tree_unfocusable)
1735{ 1747{
1736 Efl_Ui_Widget *subs; 1748 Efl_Ui_Widget *subs;
1737 Eina_List *n;
1738 Elm_Widget_Smart_Data *pd = efl_data_scope_safe_get(obj, MY_CLASS); 1749 Elm_Widget_Smart_Data *pd = efl_data_scope_safe_get(obj, MY_CLASS);
1739 EINA_SAFETY_ON_NULL_RETURN(pd); 1750 EINA_SAFETY_ON_NULL_RETURN(pd);
1740 int distance, parent_counter = (pd->parent_obj ? _tree_unfocusable_counter_get(pd->parent_obj) : 0); 1751 int distance, parent_counter = (pd->parent_obj ? _tree_unfocusable_counter_get(pd->parent_obj) : 0);
@@ -1751,9 +1762,9 @@ elm_widget_tree_unfocusable_set(Eo *obj, Eina_Bool tree_unfocusable)
1751 distance = MAX(MIN(tree_unfocusable, 1), 0); 1762 distance = MAX(MIN(tree_unfocusable, 1), 0);
1752 pd->tree_unfocusable = parent_counter + distance; 1763 pd->tree_unfocusable = parent_counter + distance;
1753 } 1764 }
1754 1765 for (unsigned int i = 0; i < eina_array_count(pd->children); ++i)
1755 EINA_LIST_FOREACH(pd->subobjs, n, subs)
1756 { 1766 {
1767 subs = eina_array_data_get(pd->children, i);
1757 if (efl_isa(subs, EFL_UI_WIDGET_CLASS)) 1768 if (efl_isa(subs, EFL_UI_WIDGET_CLASS))
1758 elm_widget_tree_unfocusable_set(subs, elm_widget_tree_unfocusable_get(obj)); 1769 elm_widget_tree_unfocusable_set(subs, elm_widget_tree_unfocusable_get(obj));
1759 } 1770 }
@@ -1797,13 +1808,13 @@ EAPI Eina_List*
1797elm_widget_can_focus_child_list_get(const Eo *obj) 1808elm_widget_can_focus_child_list_get(const Eo *obj)
1798{ 1809{
1799 Elm_Widget_Smart_Data *sd = efl_data_scope_safe_get(obj, MY_CLASS); 1810 Elm_Widget_Smart_Data *sd = efl_data_scope_safe_get(obj, MY_CLASS);
1800 const Eina_List *l;
1801 Eina_List *child_list = NULL; 1811 Eina_List *child_list = NULL;
1802 Evas_Object *child; 1812 Evas_Object *child;
1803 1813
1804 if (!sd) return NULL; 1814 if (!sd) return NULL;
1805 EINA_LIST_FOREACH(sd->subobjs, l, child) 1815 for (unsigned int i = 0; i < eina_array_count(sd->children); ++i)
1806 { 1816 {
1817 child = eina_array_data_get(sd->children, i);
1807 if (!_elm_widget_is(child)) continue; 1818 if (!_elm_widget_is(child)) continue;
1808 if ((elm_widget_can_focus_get(child)) && 1819 if ((elm_widget_can_focus_get(child)) &&
1809 (evas_object_visible_get(child)) && 1820 (evas_object_visible_get(child)) &&
@@ -2068,13 +2079,13 @@ void
2068_elm_widget_top_win_focused_set(Evas_Object *obj, 2079_elm_widget_top_win_focused_set(Evas_Object *obj,
2069 Eina_Bool top_win_focused) 2080 Eina_Bool top_win_focused)
2070{ 2081{
2071 const Eina_List *l;
2072 Evas_Object *child; 2082 Evas_Object *child;
2073 API_ENTRY return; 2083 API_ENTRY return;
2074 2084
2075 if (sd->top_win_focused == top_win_focused) return; 2085 if (sd->top_win_focused == top_win_focused) return;
2076 EINA_LIST_FOREACH(sd->subobjs, l, child) 2086 for (unsigned int i = 0; i < eina_array_count(sd->children); ++i)
2077 { 2087 {
2088 child = eina_array_data_get(sd->children, i);
2078 if (elm_widget_is(child)) 2089 if (elm_widget_is(child))
2079 _elm_widget_top_win_focused_set(child, top_win_focused); 2090 _elm_widget_top_win_focused_set(child, top_win_focused);
2080 } 2091 }
@@ -2095,7 +2106,6 @@ EOLIAN static void
2095_efl_ui_widget_disabled_set(Eo *obj EINA_UNUSED, Elm_Widget_Smart_Data *pd, Eina_Bool disabled) 2106_efl_ui_widget_disabled_set(Eo *obj EINA_UNUSED, Elm_Widget_Smart_Data *pd, Eina_Bool disabled)
2096{ 2107{
2097 Efl_Ui_Widget *subs; 2108 Efl_Ui_Widget *subs;
2098 Eina_List *n;
2099 int distance, parent_counter = (pd->parent_obj ? _disabled_counter_get(pd->parent_obj) : 0); 2109 int distance, parent_counter = (pd->parent_obj ? _disabled_counter_get(pd->parent_obj) : 0);
2100 2110
2101 if (disabled) 2111 if (disabled)
@@ -2110,9 +2120,9 @@ _efl_ui_widget_disabled_set(Eo *obj EINA_UNUSED, Elm_Widget_Smart_Data *pd, Eina
2110 distance = MAX(MIN(disabled, 1), 0); 2120 distance = MAX(MIN(disabled, 1), 0);
2111 pd->disabled = parent_counter + distance; 2121 pd->disabled = parent_counter + distance;
2112 } 2122 }
2113 2123 for (unsigned int i = 0; i < eina_array_count(pd->children); ++i)
2114 EINA_LIST_FOREACH(pd->subobjs, n, subs)
2115 { 2124 {
2125 subs = eina_array_data_get(pd->children, i);
2116 if (efl_isa(subs, EFL_UI_WIDGET_CLASS)) 2126 if (efl_isa(subs, EFL_UI_WIDGET_CLASS))
2117 efl_ui_widget_disabled_set(subs, efl_ui_widget_disabled_get(obj)); 2127 efl_ui_widget_disabled_set(subs, efl_ui_widget_disabled_get(obj));
2118 } 2128 }
@@ -2169,10 +2179,10 @@ _efl_ui_widget_scroll_hold_push(Eo *obj, Elm_Widget_Smart_Data *sd)
2169 else 2179 else
2170 { 2180 {
2171 Evas_Object *child; 2181 Evas_Object *child;
2172 Eina_List *l;
2173 2182
2174 EINA_LIST_FOREACH(sd->subobjs, l, child) 2183 for (unsigned int i = 0; i < eina_array_count(sd->children); ++i)
2175 { 2184 {
2185 child = eina_array_data_get(sd->children, i);
2176 if (elm_widget_is(child) && _elm_scrollable_is(child)) 2186 if (elm_widget_is(child) && _elm_scrollable_is(child))
2177 { 2187 {
2178 if (elm_widget_is_legacy(child)) 2188 if (elm_widget_is_legacy(child))
@@ -2203,10 +2213,10 @@ _efl_ui_widget_scroll_hold_pop(Eo *obj, Elm_Widget_Smart_Data *sd)
2203 else 2213 else
2204 { 2214 {
2205 Evas_Object *child; 2215 Evas_Object *child;
2206 Eina_List *l;
2207 2216
2208 EINA_LIST_FOREACH(sd->subobjs, l, child) 2217 for (unsigned int i = 0; i < eina_array_count(sd->children); ++i)
2209 { 2218 {
2219 child = eina_array_data_get(sd->children, i);
2210 if (elm_widget_is(child) && _elm_scrollable_is(child)) 2220 if (elm_widget_is(child) && _elm_scrollable_is(child))
2211 { 2221 {
2212 if (elm_widget_is_legacy(child)) 2222 if (elm_widget_is_legacy(child))
@@ -2246,10 +2256,10 @@ _efl_ui_widget_scroll_freeze_push(Eo *obj, Elm_Widget_Smart_Data *sd)
2246 else 2256 else
2247 { 2257 {
2248 Evas_Object *child; 2258 Evas_Object *child;
2249 Eina_List *l;
2250 2259
2251 EINA_LIST_FOREACH(sd->subobjs, l, child) 2260 for (unsigned int i = 0; i < eina_array_count(sd->children); ++i)
2252 { 2261 {
2262 child = eina_array_data_get(sd->children, i);
2253 if (elm_widget_is(child) && _elm_scrollable_is(child)) 2263 if (elm_widget_is(child) && _elm_scrollable_is(child))
2254 { 2264 {
2255 if (elm_widget_is_legacy(child)) 2265 if (elm_widget_is_legacy(child))
@@ -2280,10 +2290,11 @@ _efl_ui_widget_scroll_freeze_pop(Eo *obj, Elm_Widget_Smart_Data *sd)
2280 else 2290 else
2281 { 2291 {
2282 Evas_Object *child; 2292 Evas_Object *child;
2283 Eina_List *l;
2284 2293
2285 EINA_LIST_FOREACH(sd->subobjs, l, child) 2294 for (unsigned int i = 0; i < eina_array_count(sd->children); ++i)
2286 { 2295 {
2296 child = eina_array_data_get(sd->children, i);
2297
2287 if (elm_widget_is(child) && _elm_scrollable_is(child)) 2298 if (elm_widget_is(child) && _elm_scrollable_is(child))
2288 { 2299 {
2289 if (elm_widget_is_legacy(child)) 2300 if (elm_widget_is_legacy(child))
@@ -2517,13 +2528,14 @@ elm_widget_part_translatable_text_get(const Eo *obj, const char *part, const cha
2517EOLIAN static void 2528EOLIAN static void
2518_efl_ui_widget_efl_ui_l10n_translation_update(Eo *obj EINA_UNUSED, Elm_Widget_Smart_Data *sd) 2529_efl_ui_widget_efl_ui_l10n_translation_update(Eo *obj EINA_UNUSED, Elm_Widget_Smart_Data *sd)
2519{ 2530{
2520 const Eina_List *l;
2521 Evas_Object *child; 2531 Evas_Object *child;
2522 2532
2523 EINA_LIST_FOREACH(sd->subobjs, l, child) 2533 for (unsigned int i = 0; i < eina_array_count(sd->children); ++i)
2524 { 2534 {
2535 child = eina_array_data_get(sd->children, i);
2525 if (elm_widget_is(child)) 2536 if (elm_widget_is(child))
2526 efl_ui_l10n_translation_update(child); 2537 efl_ui_l10n_translation_update(child);
2538
2527 } 2539 }
2528 2540
2529 if (sd->hover_obj) efl_ui_l10n_translation_update(sd->hover_obj); 2541 if (sd->hover_obj) efl_ui_l10n_translation_update(sd->hover_obj);
@@ -2883,15 +2895,16 @@ elm_widget_type_check(const Evas_Object *obj,
2883EAPI Evas_Object * 2895EAPI Evas_Object *
2884elm_widget_name_find(const Eo *obj, const char *name, int recurse) 2896elm_widget_name_find(const Eo *obj, const char *name, int recurse)
2885{ 2897{
2886 Eina_List *l;
2887 Evas_Object *child; 2898 Evas_Object *child;
2888 const char *s; 2899 const char *s;
2889 INTERNAL_ENTRY NULL; 2900 INTERNAL_ENTRY NULL;
2890 2901
2891 if (!name) return NULL; 2902 if (!name) return NULL;
2892 if (!_elm_widget_is(obj)) return NULL; 2903 if (!_elm_widget_is(obj)) return NULL;
2893 EINA_LIST_FOREACH(sd->subobjs, l, child) 2904
2905 for (unsigned int i = 0; i < eina_array_count(sd->children); ++i)
2894 { 2906 {
2907 child = eina_array_data_get(sd->children, i);
2895 s = evas_object_name_get(child); 2908 s = evas_object_name_get(child);
2896 if ((s) && (!strcmp(s, name))) return child; 2909 if ((s) && (!strcmp(s, name))) return child;
2897 if ((recurse != 0) && 2910 if ((recurse != 0) &&
@@ -3116,7 +3129,6 @@ elm_widget_display_mode_set(Evas_Object *obj, Evas_Display_Mode dispmode)
3116{ 3129{
3117 Evas_Display_Mode prev_dispmode; 3130 Evas_Display_Mode prev_dispmode;
3118 Evas_Object *child; 3131 Evas_Object *child;
3119 Eina_List *l;
3120 3132
3121 API_ENTRY return; 3133 API_ENTRY return;
3122 prev_dispmode = evas_object_size_hint_display_mode_get(obj); 3134 prev_dispmode = evas_object_size_hint_display_mode_get(obj);
@@ -3126,8 +3138,9 @@ elm_widget_display_mode_set(Evas_Object *obj, Evas_Display_Mode dispmode)
3126 3138
3127 evas_object_size_hint_display_mode_set(obj, dispmode); 3139 evas_object_size_hint_display_mode_set(obj, dispmode);
3128 3140
3129 EINA_LIST_FOREACH (sd->subobjs, l, child) 3141 for (unsigned int i = 0; i < eina_array_count(sd->children); ++i)
3130 { 3142 {
3143 child = eina_array_data_get(sd->children, i);
3131 if (elm_widget_is(child)) 3144 if (elm_widget_is(child))
3132 elm_widget_display_mode_set(child, dispmode); 3145 elm_widget_display_mode_set(child, dispmode);
3133 } 3146 }
@@ -4701,8 +4714,11 @@ _sub_obj_tree_dump(const Evas_Object *obj,
4701 DBG("+ %s(%p)\n", 4714 DBG("+ %s(%p)\n",
4702 elm_widget_type_get(obj), 4715 elm_widget_type_get(obj),
4703 obj); 4716 obj);
4704 EINA_LIST_FOREACH(sd->subobjs, l, obj) 4717 for (unsigned int i = 0; i < eina_array_count(sd->children); ++i)
4718 {
4719 obj = eina_array_data_get(sd->children, i);
4705 _sub_obj_tree_dump(obj, lvl + 1); 4720 _sub_obj_tree_dump(obj, lvl + 1);
4721 }
4706 } 4722 }
4707 else 4723 else
4708 DBG("+ %s(%p)\n", evas_object_type_get(obj), obj); 4724 DBG("+ %s(%p)\n", evas_object_type_get(obj), obj);
@@ -4753,8 +4769,12 @@ _sub_obj_tree_dot_dump(const Evas_Object *obj,
4753 4769
4754 Eina_List *l; 4770 Eina_List *l;
4755 Evas_Object *o; 4771 Evas_Object *o;
4756 EINA_LIST_FOREACH(sd->subobjs, l, o) 4772
4757 _sub_obj_tree_dot_dump(o, output); 4773 for (unsigned int i = 0; i < eina_array_count(sd->children); ++i)
4774 {
4775 o = eina_array_data_get(sd->children, i);
4776 _sub_obj_tree_dot_dump(o, output);
4777 }
4758} 4778}
4759 4779
4760#endif 4780#endif
@@ -4950,12 +4970,14 @@ _efl_ui_widget_efl_access_object_i18n_name_get(const Eo *obj, Elm_Widget_Smart_D
4950EOLIAN static Eina_List* 4970EOLIAN static Eina_List*
4951_efl_ui_widget_efl_access_object_access_children_get(const Eo *obj EINA_UNUSED, Elm_Widget_Smart_Data *pd) 4971_efl_ui_widget_efl_access_object_access_children_get(const Eo *obj EINA_UNUSED, Elm_Widget_Smart_Data *pd)
4952{ 4972{
4953 Eina_List *l, *accs = NULL; 4973 Eina_List *accs = NULL;
4954 Evas_Object *widget; 4974 Evas_Object *widget;
4955 Efl_Access_Type type; 4975 Efl_Access_Type type;
4956 4976
4957 EINA_LIST_FOREACH(pd->subobjs, l, widget) 4977 for (unsigned int i = 0; i < eina_array_count(pd->children); ++i)
4958 { 4978 {
4979 widget = eina_array_data_get(pd->children, i);
4980
4959 if (!elm_object_widget_check(widget)) continue; 4981 if (!elm_object_widget_check(widget)) continue;
4960 if (!efl_isa(widget, EFL_ACCESS_OBJECT_MIXIN)) continue; 4982 if (!efl_isa(widget, EFL_ACCESS_OBJECT_MIXIN)) continue;
4961 type = efl_access_object_access_type_get(widget); 4983 type = efl_access_object_access_type_get(widget);
diff --git a/src/lib/elementary/efl_ui_widget_common.c b/src/lib/elementary/efl_ui_widget_common.c
index c83fd07c92..97313e2037 100644
--- a/src/lib/elementary/efl_ui_widget_common.c
+++ b/src/lib/elementary/efl_ui_widget_common.c
@@ -61,13 +61,14 @@ static Efl_Ui_Widget*
61_next_widget(Efl_Gfx_Entity* o) 61_next_widget(Efl_Gfx_Entity* o)
62{ 62{
63 Efl_Ui_Widget *parent; 63 Efl_Ui_Widget *parent;
64 Eina_List *rel;
65 64
66 parent = _fetch_parent_widget(o); 65 parent = _fetch_parent_widget(o);
67 ELM_WIDGET_DATA_GET_OR_RETURN(parent, pd, NULL); 66 ELM_WIDGET_DATA_GET_OR_RETURN(parent, pd, NULL);
68 rel = eina_list_data_find_list(pd->subobjs, o); 67 unsigned int id;
69 68 if (eina_array_find(pd->children, o, &id) && id + 1 < eina_array_count(pd->children))
70 return eina_list_data_get(eina_list_next(rel)); 69 return eina_array_data_get(pd->children, id + 1);
70 else
71 return NULL;
71} 72}
72 73
73static Eina_Bool 74static Eina_Bool
@@ -90,9 +91,9 @@ _widget_next(Widget_Iterator *it, void **data)
90 } 91 }
91 92
92 //If there is a child, go there 93 //If there is a child, go there
93 if (pd && pd->subobjs) 94 if (pd && eina_array_count(pd->children))
94 { 95 {
95 it->current = eina_list_data_get(pd->subobjs); 96 it->current = eina_array_data_get(pd->children, 0);
96 goto deliver; 97 goto deliver;
97 } 98 }
98 99
diff --git a/src/lib/elementary/elm_box.c b/src/lib/elementary/elm_box.c
index 73a73092c1..ff0c32a3c5 100644
--- a/src/lib/elementary/elm_box.c
+++ b/src/lib/elementary/elm_box.c
@@ -337,9 +337,6 @@ _elm_box_efl_canvas_group_group_add(Eo *obj, Elm_Box_Data *_pd EINA_UNUSED)
337EOLIAN static void 337EOLIAN static void
338_elm_box_efl_canvas_group_group_del(Eo *obj, Elm_Box_Data *sd) 338_elm_box_efl_canvas_group_group_del(Eo *obj, Elm_Box_Data *sd)
339{ 339{
340 Eina_List *l;
341 Evas_Object *child;
342
343 sd->delete_me = EINA_TRUE; 340 sd->delete_me = EINA_TRUE;
344 341
345 ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd); 342 ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd);
@@ -349,15 +346,15 @@ _elm_box_efl_canvas_group_group_del(Eo *obj, Elm_Box_Data *sd)
349 346
350 /* let's make our box object the *last* to be processed, since it 347 /* let's make our box object the *last* to be processed, since it
351 * may (smart) parent other sub objects here */ 348 * may (smart) parent other sub objects here */
352 EINA_LIST_FOREACH (wd->subobjs, l, child) 349 {
353 { 350 unsigned int resize_id = 0;
354 if (child == wd->resize_obj) 351 if (eina_array_find(wd->children, wd->resize_obj, &resize_id))
355 { 352 {
356 wd->subobjs = 353 //exchange with last
357 eina_list_demote_list(wd->subobjs, l); 354 eina_array_data_set(wd->children, resize_id, eina_array_data_get(wd->children, eina_array_count(wd->children) - 1));
358 break; 355 eina_array_data_set(wd->children, eina_array_count(wd->children) - 1, wd->resize_obj);
359 } 356 }
360 } 357 }
361 358
362 efl_canvas_group_del(efl_super(obj, MY_CLASS)); 359 efl_canvas_group_del(efl_super(obj, MY_CLASS));
363} 360}
diff --git a/src/lib/elementary/elm_config.c b/src/lib/elementary/elm_config.c
index 9903538253..d95f5d914b 100644
--- a/src/lib/elementary/elm_config.c
+++ b/src/lib/elementary/elm_config.c
@@ -3521,7 +3521,6 @@ _efl_ui_widget_config_reload(Efl_Ui_Widget *obj)
3521 Elm_Focus_Move_Policy focus_move_policy = elm_config_focus_move_policy_get(); 3521 Elm_Focus_Move_Policy focus_move_policy = elm_config_focus_move_policy_get();
3522 ELM_WIDGET_DATA_GET_OR_RETURN(obj, sd); 3522 ELM_WIDGET_DATA_GET_OR_RETURN(obj, sd);
3523 Efl_Ui_Widget *w; 3523 Efl_Ui_Widget *w;
3524 Eina_List *n;
3525 3524
3526 //reload focus move policy 3525 //reload focus move policy
3527 if (efl_ui_widget_focus_move_policy_automatic_get(obj) && 3526 if (efl_ui_widget_focus_move_policy_automatic_get(obj) &&
@@ -3530,8 +3529,9 @@ _efl_ui_widget_config_reload(Efl_Ui_Widget *obj)
3530 sd->focus_move_policy = focus_move_policy; 3529 sd->focus_move_policy = focus_move_policy;
3531 } 3530 }
3532 3531
3533 EINA_LIST_FOREACH(sd->subobjs, n, w) 3532 for (unsigned int i = 0; i < eina_array_count(sd->children); ++i)
3534 { 3533 {
3534 w = eina_array_data_get(sd->children, i);
3535 if (efl_isa(w, EFL_UI_WIDGET_CLASS)) 3535 if (efl_isa(w, EFL_UI_WIDGET_CLASS))
3536 _efl_ui_widget_config_reload(w); 3536 _efl_ui_widget_config_reload(w);
3537 } 3537 }
diff --git a/src/lib/elementary/elm_focus_legacy.c b/src/lib/elementary/elm_focus_legacy.c
index c43fe6d8de..f11c705d08 100644
--- a/src/lib/elementary/elm_focus_legacy.c
+++ b/src/lib/elementary/elm_focus_legacy.c
@@ -51,12 +51,18 @@ _flush_manager(Efl_Ui_Widget *obj, Elm_Widget_Smart_Data *pd)
51 manager = efl_ui_focus_object_focus_manager_get(obj); 51 manager = efl_ui_focus_object_focus_manager_get(obj);
52 if (manager) 52 if (manager)
53 { 53 {
54 Eina_List *order; 54 Eina_List *order = NULL;
55 55
56 if (pd->legacy_focus.custom_chain) 56 if (pd->legacy_focus.custom_chain)
57 order = eina_list_clone(pd->legacy_focus.custom_chain); 57 order = eina_list_clone(pd->legacy_focus.custom_chain);
58 else 58 else
59 order = eina_list_clone(pd->subobjs); 59 {
60 for (unsigned int i = 0; i < eina_array_count(pd->children); ++i)
61 {
62 Eo *sobj = eina_array_data_get(pd->children, i);
63 order = eina_list_append(order, sobj);
64 }
65 }
60 66
61 efl_ui_focus_manager_calc_update_order(manager, obj, order); 67 efl_ui_focus_manager_calc_update_order(manager, obj, order);
62 } 68 }
diff --git a/src/lib/elementary/elm_genlist.c b/src/lib/elementary/elm_genlist.c
index b84e830545..6d53c6f255 100644
--- a/src/lib/elementary/elm_genlist.c
+++ b/src/lib/elementary/elm_genlist.c
@@ -372,7 +372,6 @@ static void
372_widget_calculate_recursive(Eo *obj) 372_widget_calculate_recursive(Eo *obj)
373{ 373{
374 Elm_Widget_Smart_Data *pd = NULL; 374 Elm_Widget_Smart_Data *pd = NULL;
375 Eina_List *l;
376 Evas_Object *child; 375 Evas_Object *child;
377 376
378 if (!efl_isa(obj, EFL_UI_WIDGET_CLASS)) return; 377 if (!efl_isa(obj, EFL_UI_WIDGET_CLASS)) return;
@@ -388,8 +387,11 @@ _widget_calculate_recursive(Eo *obj)
388 return; 387 return;
389 } 388 }
390 389
391 EINA_LIST_FOREACH(pd->subobjs, l, child) 390 for (unsigned int i = 0; i < eina_array_count(pd->children); ++i)
392 _widget_calculate_recursive(child); 391 {
392 child = eina_array_data_get(pd->children, i);
393 _widget_calculate_recursive(child);
394 }
393 395
394 efl_canvas_group_calculate(obj); 396 efl_canvas_group_calculate(obj);
395} 397}
diff --git a/src/lib/elementary/elm_grid.c b/src/lib/elementary/elm_grid.c
index 6548f21e16..39a7b9cbc8 100644
--- a/src/lib/elementary/elm_grid.c
+++ b/src/lib/elementary/elm_grid.c
@@ -73,22 +73,19 @@ _elm_grid_efl_canvas_group_group_add(Eo *obj, void *_pd EINA_UNUSED)
73EOLIAN static void 73EOLIAN static void
74_elm_grid_efl_canvas_group_group_del(Eo *obj, void *_pd EINA_UNUSED) 74_elm_grid_efl_canvas_group_group_del(Eo *obj, void *_pd EINA_UNUSED)
75{ 75{
76 Eina_List *l;
77 Evas_Object *child;
78
79 ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd); 76 ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd);
80 77
81 /* let's make our grid object the *last* to be processed, since it 78 /* let's make our grid object the *last* to be processed, since it
82 * may (smart) parent other sub objects here */ 79 * may (smart) parent other sub objects here */
83 EINA_LIST_FOREACH(wd->subobjs, l, child) 80 {
84 { 81 unsigned int resize_id = 0;
85 if (child == wd->resize_obj) 82 if (eina_array_find(wd->children, wd->resize_obj, &resize_id))
86 { 83 {
87 wd->subobjs = 84 //exchange with last
88 eina_list_demote_list(wd->subobjs, l); 85 eina_array_data_set(wd->children, resize_id, eina_array_data_get(wd->children, eina_array_count(wd->children) - 1));
89 break; 86 eina_array_data_set(wd->children, eina_array_count(wd->children) - 1, wd->resize_obj);
90 } 87 }
91 } 88 }
92 89
93 efl_canvas_group_del(efl_super(obj, MY_CLASS)); 90 efl_canvas_group_del(efl_super(obj, MY_CLASS));
94} 91}
diff --git a/src/lib/elementary/elm_panel.c b/src/lib/elementary/elm_panel.c
index 97f4267b2b..ef93c71996 100644
--- a/src/lib/elementary/elm_panel.c
+++ b/src/lib/elementary/elm_panel.c
@@ -868,9 +868,6 @@ _elm_panel_efl_canvas_group_group_add(Eo *obj, Elm_Panel_Data *priv)
868EOLIAN static void 868EOLIAN static void
869_elm_panel_efl_canvas_group_group_del(Eo *obj, Elm_Panel_Data *sd) 869_elm_panel_efl_canvas_group_group_del(Eo *obj, Elm_Panel_Data *sd)
870{ 870{
871 Evas_Object *child;
872 Eina_List *l;
873
874 ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd); 871 ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd);
875 872
876 sd->delete_me = EINA_TRUE; 873 sd->delete_me = EINA_TRUE;
@@ -879,15 +876,15 @@ _elm_panel_efl_canvas_group_group_del(Eo *obj, Elm_Panel_Data *sd)
879 876
880 /* let's make our panel object the *last* to be processed, since it 877 /* let's make our panel object the *last* to be processed, since it
881 * may (smart) parent other sub objects here */ 878 * may (smart) parent other sub objects here */
882 EINA_LIST_FOREACH(wd->subobjs, l, child) 879 {
883 { 880 unsigned int resize_id = 0;
884 if (child == sd->bx) 881 if (eina_array_find(wd->children, wd->resize_obj, &resize_id))
885 { 882 {
886 wd->subobjs = 883 //exchange with last
887 eina_list_demote_list(wd->subobjs, l); 884 eina_array_data_set(wd->children, resize_id, eina_array_data_get(wd->children, eina_array_count(wd->children) - 1));
888 break; 885 eina_array_data_set(wd->children, eina_array_count(wd->children) - 1, wd->resize_obj);
889 } 886 }
890 } 887 }
891 888
892 efl_canvas_group_del(efl_super(obj, MY_CLASS)); 889 efl_canvas_group_del(efl_super(obj, MY_CLASS));
893} 890}
diff --git a/src/lib/elementary/elm_table.c b/src/lib/elementary/elm_table.c
index 39c1031536..c34a0b3095 100644
--- a/src/lib/elementary/elm_table.c
+++ b/src/lib/elementary/elm_table.c
@@ -109,9 +109,6 @@ _elm_table_efl_canvas_group_group_add(Eo *obj, void *_pd EINA_UNUSED)
109EOLIAN static void 109EOLIAN static void
110_elm_table_efl_canvas_group_group_del(Eo *obj, void *_pd EINA_UNUSED) 110_elm_table_efl_canvas_group_group_del(Eo *obj, void *_pd EINA_UNUSED)
111{ 111{
112 Eina_List *l;
113 Evas_Object *child;
114
115 ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd); 112 ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd);
116 113
117 evas_object_event_callback_del_full 114 evas_object_event_callback_del_full
@@ -120,15 +117,15 @@ _elm_table_efl_canvas_group_group_del(Eo *obj, void *_pd EINA_UNUSED)
120 117
121 /* let's make our table object the *last* to be processed, since it 118 /* let's make our table object the *last* to be processed, since it
122 * may (smart) parent other sub objects here */ 119 * may (smart) parent other sub objects here */
123 EINA_LIST_FOREACH(wd->subobjs, l, child) 120 {
124 { 121 unsigned int resize_id = 0;
125 if (child == wd->resize_obj) 122 if (eina_array_find(wd->children, wd->resize_obj, &resize_id))
126 { 123 {
127 wd->subobjs = 124 //exchange with last
128 eina_list_demote_list(wd->subobjs, l); 125 eina_array_data_set(wd->children, resize_id, eina_array_data_get(wd->children, eina_array_count(wd->children) - 1));
129 break; 126 eina_array_data_set(wd->children, eina_array_count(wd->children) - 1, wd->resize_obj);
130 } 127 }
131 } 128 }
132 129
133 efl_canvas_group_del(efl_super(obj, MY_CLASS)); 130 efl_canvas_group_del(efl_super(obj, MY_CLASS));
134} 131}
diff --git a/src/lib/elementary/elm_widget.h b/src/lib/elementary/elm_widget.h
index ab8ea9a215..8a6d5dd855 100644
--- a/src/lib/elementary/elm_widget.h
+++ b/src/lib/elementary/elm_widget.h
@@ -332,7 +332,7 @@ typedef void (*Elm_Widget_On_Show_Region_Cb)(void *data, Evas_Object *obj, Eina_
332typedef struct _Elm_Widget_Smart_Data 332typedef struct _Elm_Widget_Smart_Data
333{ 333{
334 Evas_Object *parent_obj; /**< parent object of a widget in the elementary tree */ 334 Evas_Object *parent_obj; /**< parent object of a widget in the elementary tree */
335 Eina_List *subobjs; /**< list of widgets' sub objects in the elementary tree */ 335 Eina_Array *children;
336 Evas_Object *resize_obj; /**< an unique object for each widget that shows the look of a widget. Resize object's geometry is same as the widget. This resize object is different from that of window's resize object. */ 336 Evas_Object *resize_obj; /**< an unique object for each widget that shows the look of a widget. Resize object's geometry is same as the widget. This resize object is different from that of window's resize object. */
337 Evas_Object *hover_obj; 337 Evas_Object *hover_obj;
338 Evas_Object *bg; 338 Evas_Object *bg;
diff --git a/src/tests/elementary/efl_ui_test_widget.c b/src/tests/elementary/efl_ui_test_widget.c
index 74e8f2eac9..7e55fd1b79 100644
--- a/src/tests/elementary/efl_ui_test_widget.c
+++ b/src/tests/elementary/efl_ui_test_widget.c
@@ -93,7 +93,7 @@ resize_object(Efl_Canvas_Object *o)
93{ 93{
94 Efl_Ui_Widget_Data *pd = efl_data_scope_safe_get(o, EFL_UI_WIDGET_CLASS); 94 Efl_Ui_Widget_Data *pd = efl_data_scope_safe_get(o, EFL_UI_WIDGET_CLASS);
95 95
96 return eina_list_data_get(pd->subobjs); 96 return eina_array_data_get(pd->children, 0);
97} 97}
98 98
99EFL_START_TEST(efl_ui_test_widget_widget_sub_iterator) 99EFL_START_TEST(efl_ui_test_widget_widget_sub_iterator)
@@ -182,16 +182,16 @@ EFL_START_TEST(efl_ui_test_widget_sub_object_add_del)
182 State s; 182 State s;
183 183
184 _small_ui(&s); 184 _small_ui(&s);
185 DISABLE_ABORT_ON_CRITICAL_START; 185 EXPECT_ERROR_START;
186 ck_assert(!efl_ui_widget_sub_object_add(s.btn1, s.btn1)); 186 ck_assert(!efl_ui_widget_sub_object_add(s.btn1, s.btn1));
187 DISABLE_ABORT_ON_CRITICAL_END; 187 EXPECT_ERROR_END;
188 ck_assert(efl_ui_widget_sub_object_add(s.box, s.btn1)); 188 ck_assert(efl_ui_widget_sub_object_add(s.box, s.btn1));
189 DISABLE_ABORT_ON_CRITICAL_START; 189 EXPECT_ERROR_START;
190 ck_assert(!efl_ui_widget_sub_object_add(s.box, NULL)); 190 ck_assert(!efl_ui_widget_sub_object_add(s.box, NULL));
191 ck_assert(!efl_ui_widget_sub_object_del(s.btn1, s.btn1)); 191 ck_assert(!efl_ui_widget_sub_object_del(s.btn1, s.btn1));
192 ck_assert(!efl_ui_widget_sub_object_del(s.box, NULL)); 192 ck_assert(!efl_ui_widget_sub_object_del(s.box, NULL));
193 ck_assert(!efl_ui_widget_sub_object_del(s.btn1, s.box)); 193 ck_assert(!efl_ui_widget_sub_object_del(s.btn1, s.box));
194 DISABLE_ABORT_ON_CRITICAL_END; 194 EXPECT_ERROR_END;
195 ck_assert(efl_ui_widget_sub_object_del(s.box, s.btn1)); 195 ck_assert(efl_ui_widget_sub_object_del(s.box, s.btn1));
196} 196}
197EFL_END_TEST 197EFL_END_TEST