summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMarcel Hollerbach <mail@marcel-hollerbach.de>2019-07-24 17:57:01 +0200
committerMarcel Hollerbach <mail@marcel-hollerbach.de>2019-07-25 20:27:39 +0200
commita4f7baa911a07d225e81d747bd7d79a177aae552 (patch)
treeaff892ace767ef9e35784a690bf59e9937c32bc3 /src
parent167d2475e8f879e96d80fa4a03eb3ab06098bfe5 (diff)
rename efl_ui_item_container -> efl_ui_collection
this is the first rename of the main widget, the renames of the test suites will follow Reviewed-by: Cedric BAIL <cedric.bail@free.fr> Differential Revision: https://phab.enlightenment.org/D9408
Diffstat (limited to 'src')
-rw-r--r--src/benchmarks/elementary/item_container.c10
-rw-r--r--src/bin/elementary/test.c8
-rw-r--r--src/bin/elementary/test_ui_item_container.c18
-rw-r--r--src/lib/elementary/Efl_Ui.h2
-rw-r--r--src/lib/elementary/efl_ui_collection.c (renamed from src/lib/elementary/efl_ui_item_container.c)113
-rw-r--r--src/lib/elementary/efl_ui_collection.eo (renamed from src/lib/elementary/efl_ui_item_container.eo)2
-rw-r--r--src/lib/elementary/efl_ui_grid.c2
-rw-r--r--src/lib/elementary/efl_ui_grid.eo2
-rw-r--r--src/lib/elementary/efl_ui_list.c2
-rw-r--r--src/lib/elementary/efl_ui_list.eo2
-rw-r--r--src/lib/elementary/meson.build4
-rw-r--r--src/tests/elementary/efl_ui_suite.c2
-rw-r--r--src/tests/elementary/efl_ui_test_grid.c2
-rw-r--r--src/tests/elementary/efl_ui_test_grid_container.c4
-rw-r--r--src/tests/elementary/efl_ui_test_item_container.c8
-rw-r--r--src/tests/elementary/efl_ui_test_item_container_common.c20
-rw-r--r--src/tests/elementary/efl_ui_test_list_container.c4
-rw-r--r--src/tests/elementary/spec/efl_ui_spec_suite.c2
-rw-r--r--src/tests/elementary/spec/test_efl_ui_item_container_list.eo2
19 files changed, 112 insertions, 97 deletions
diff --git a/src/benchmarks/elementary/item_container.c b/src/benchmarks/elementary/item_container.c
index 5419756e09..982df1df81 100644
--- a/src/benchmarks/elementary/item_container.c
+++ b/src/benchmarks/elementary/item_container.c
@@ -10,11 +10,11 @@ _timer_tick(void *data, const Efl_Event *ev)
10{ 10{
11 if (timer % 2 == 0) 11 if (timer % 2 == 0)
12 { 12 {
13 efl_ui_item_container_item_scroll(data, last, EINA_TRUE); 13 efl_ui_collection_item_scroll(data, last, EINA_TRUE);
14 } 14 }
15 else 15 else
16 { 16 {
17 efl_ui_item_container_item_scroll(data, first, EINA_TRUE); 17 efl_ui_collection_item_scroll(data, first, EINA_TRUE);
18 } 18 }
19 19
20 timer--; 20 timer--;
@@ -51,7 +51,7 @@ _started_cb(void *data, const Efl_Event *ev EINA_UNUSED)
51static void 51static void
52_first_frame_cb(void *data, const Efl_Event *ev EINA_UNUSED) 52_first_frame_cb(void *data, const Efl_Event *ev EINA_UNUSED)
53{ 53{
54 efl_ui_item_container_item_scroll(data, middle, EINA_FALSE); 54 efl_ui_collection_item_scroll(data, middle, EINA_FALSE);
55 //give time to stabelize 55 //give time to stabelize
56 efl_add(EFL_LOOP_TIMER_CLASS, efl_main_loop_get(), 56 efl_add(EFL_LOOP_TIMER_CLASS, efl_main_loop_get(),
57 efl_loop_timer_interval_set(efl_added, 15.0), 57 efl_loop_timer_interval_set(efl_added, 15.0),
@@ -72,8 +72,8 @@ efl_main(void *data EINA_UNUSED, const Efl_Event *ev EINA_UNUSED)
72 ); 72 );
73 73
74 list = efl_new(EFL_UI_POSITION_MANAGER_LIST_CLASS); 74 list = efl_new(EFL_UI_POSITION_MANAGER_LIST_CLASS);
75 item_container = efl_add(EFL_UI_ITEM_CONTAINER_CLASS, win, 75 item_container = efl_add(EFL_UI_COLLECTION_CLASS, win,
76 efl_ui_item_container_position_manager_set(efl_added, list)); 76 efl_ui_collection_position_manager_set(efl_added, list));
77 efl_content_set(win, item_container); 77 efl_content_set(win, item_container);
78 78
79 printf("Building 5000 objects\n"); 79 printf("Building 5000 objects\n");
diff --git a/src/bin/elementary/test.c b/src/bin/elementary/test.c
index 2062f18acb..79d56af40e 100644
--- a/src/bin/elementary/test.c
+++ b/src/bin/elementary/test.c
@@ -394,8 +394,8 @@ void test_ui_spotlight_scroll(void *data, Evas_Object *obj, void *event_info);
394 394
395void test_ui_relative_layout(void *data, Evas_Object *obj, void *event_info); 395void test_ui_relative_layout(void *data, Evas_Object *obj, void *event_info);
396void test_efl_ui_radio(void *data, Evas_Object *obj, void *event_info); 396void test_efl_ui_radio(void *data, Evas_Object *obj, void *event_info);
397void test_efl_ui_item_container_list(void *data, Evas_Object *obj, void *event_info ); 397void test_efl_ui_collection_list(void *data, Evas_Object *obj, void *event_info );
398void test_efl_ui_item_container_grid(void *data, Evas_Object *obj, void *event_info); 398void test_efl_ui_collection_grid(void *data, Evas_Object *obj, void *event_info);
399static void _list_udpate(void); 399static void _list_udpate(void);
400 400
401static Evas_Object *win, *tbx, *entry; // TODO: refactoring 401static Evas_Object *win, *tbx, *entry; // TODO: refactoring
@@ -869,8 +869,8 @@ add_tests:
869 ADD_TEST_EO(NULL, "Containers", "Efl.Ui.Table (Linear API)", test_ui_table_linear); 869 ADD_TEST_EO(NULL, "Containers", "Efl.Ui.Table (Linear API)", test_ui_table_linear);
870 ADD_TEST_EO(NULL, "Containers", "Efl.Ui.Table_Static", test_ui_table_static); 870 ADD_TEST_EO(NULL, "Containers", "Efl.Ui.Table_Static", test_ui_table_static);
871 ADD_TEST_EO(NULL, "Containers", "Efl.Ui.Relative_Layout", test_ui_relative_layout); 871 ADD_TEST_EO(NULL, "Containers", "Efl.Ui.Relative_Layout", test_ui_relative_layout);
872 ADD_TEST_EO(NULL, "Containers", "Efl.Ui.Item_Container List", test_efl_ui_item_container_list); 872 ADD_TEST_EO(NULL, "Containers", "Efl.Ui.Collection List", test_efl_ui_collection_list);
873 ADD_TEST_EO(NULL, "Containers", "Efl.Ui.Item_Container Grid", test_efl_ui_item_container_grid); 873 ADD_TEST_EO(NULL, "Containers", "Efl.Ui.Collection Grid", test_efl_ui_collection_grid);
874 874
875 //------------------------------// 875 //------------------------------//
876 ADD_TEST_EO(NULL, "Events", "Event Refeed", test_events); 876 ADD_TEST_EO(NULL, "Events", "Event Refeed", test_events);
diff --git a/src/bin/elementary/test_ui_item_container.c b/src/bin/elementary/test_ui_item_container.c
index af82d7a6d9..97f3f0797b 100644
--- a/src/bin/elementary/test_ui_item_container.c
+++ b/src/bin/elementary/test_ui_item_container.c
@@ -20,7 +20,7 @@ _scroll_to_animated_cb(void *data, const Efl_Event *ev EINA_UNUSED)
20 20
21 EINA_SAFETY_ON_NULL_RETURN(element_1154); 21 EINA_SAFETY_ON_NULL_RETURN(element_1154);
22 22
23 efl_ui_item_container_item_scroll(data, element_1154, EINA_TRUE); 23 efl_ui_collection_item_scroll(data, element_1154, EINA_TRUE);
24} 24}
25 25
26static void 26static void
@@ -30,7 +30,7 @@ _scroll_to_cb(void *data, const Efl_Event *ev EINA_UNUSED)
30 30
31 EINA_SAFETY_ON_NULL_RETURN(element_10); 31 EINA_SAFETY_ON_NULL_RETURN(element_10);
32 32
33 efl_ui_item_container_item_scroll(data, element_10, EINA_FALSE); 33 efl_ui_collection_item_scroll(data, element_10, EINA_FALSE);
34} 34}
35 35
36static void 36static void
@@ -54,7 +54,7 @@ _change_min_size_cb(void *data EINA_UNUSED, const Efl_Event *ev EINA_UNUSED)
54 54
55typedef struct { 55typedef struct {
56 Efl_Ui_Check *v, *h; 56 Efl_Ui_Check *v, *h;
57 Efl_Ui_Item_Container *c; 57 Efl_Ui_Collection *c;
58} Match_Content_Ctx; 58} Match_Content_Ctx;
59 59
60static void 60static void
@@ -76,7 +76,7 @@ _widget_del_cb(void *data, const Efl_Event *ev EINA_UNUSED)
76} 76}
77 77
78static void 78static void
79_add_item(Efl_Ui_Item_Container *c) 79_add_item(Efl_Ui_Collection *c)
80{ 80{
81 Efl_Class *itc = efl_key_data_get(c, "__item_class"); 81 Efl_Class *itc = efl_key_data_get(c, "__item_class");
82 char buf[PATH_MAX]; 82 char buf[PATH_MAX];
@@ -143,7 +143,7 @@ _add_thousend_items(void *data, const Efl_Event *ev EINA_UNUSED)
143static void 143static void
144_select_value_cb(void *data, const Efl_Event *ev) 144_select_value_cb(void *data, const Efl_Event *ev)
145{ 145{
146 Efl_Ui_Item_Container *c = data; 146 Efl_Ui_Collection *c = data;
147 147
148 efl_ui_select_mode_set(c, efl_ui_radio_group_selected_value_get(ev->object)); 148 efl_ui_select_mode_set(c, efl_ui_radio_group_selected_value_get(ev->object));
149} 149}
@@ -160,8 +160,8 @@ void create_item_container_ui(Efl_Ui_Position_Manager_Entity *manager, const Efl
160 tbl = efl_add(EFL_UI_TABLE_CLASS, win); 160 tbl = efl_add(EFL_UI_TABLE_CLASS, win);
161 efl_content_set(win, tbl); 161 efl_content_set(win, tbl);
162 162
163 item_container = o = efl_add(EFL_UI_ITEM_CONTAINER_CLASS, win, 163 item_container = o = efl_add(EFL_UI_COLLECTION_CLASS, win,
164 efl_ui_item_container_position_manager_set(efl_added, manager)); 164 efl_ui_collection_position_manager_set(efl_added, manager));
165 efl_key_data_set(o, "__item_class", item); 165 efl_key_data_set(o, "__item_class", item);
166 efl_event_callback_add(o, EFL_EVENT_DEL, _widget_del_cb, ctx); 166 efl_event_callback_add(o, EFL_EVENT_DEL, _widget_del_cb, ctx);
167 for (int i = 0; i < 2000; ++i) 167 for (int i = 0; i < 2000; ++i)
@@ -257,14 +257,14 @@ void create_item_container_ui(Efl_Ui_Position_Manager_Entity *manager, const Efl
257 efl_pack_end(bx, o); 257 efl_pack_end(bx, o);
258} 258}
259 259
260void test_efl_ui_item_container_grid(void *data EINA_UNUSED, 260void test_efl_ui_collection_grid(void *data EINA_UNUSED,
261 Evas_Object *obj EINA_UNUSED, 261 Evas_Object *obj EINA_UNUSED,
262 void *event_info EINA_UNUSED) 262 void *event_info EINA_UNUSED)
263{ 263{
264 create_item_container_ui(efl_new(EFL_UI_POSITION_MANAGER_GRID_CLASS), EFL_UI_GRID_DEFAULT_ITEM_CLASS, "Efl.Ui.Item_Container Grid"); 264 create_item_container_ui(efl_new(EFL_UI_POSITION_MANAGER_GRID_CLASS), EFL_UI_GRID_DEFAULT_ITEM_CLASS, "Efl.Ui.Item_Container Grid");
265} 265}
266 266
267void test_efl_ui_item_container_list(void *data EINA_UNUSED, 267void test_efl_ui_collection_list(void *data EINA_UNUSED,
268 Evas_Object *obj EINA_UNUSED, 268 Evas_Object *obj EINA_UNUSED,
269 void *event_info EINA_UNUSED) 269 void *event_info EINA_UNUSED)
270{ 270{
diff --git a/src/lib/elementary/Efl_Ui.h b/src/lib/elementary/Efl_Ui.h
index 0cf1d0fb5d..93d3a0a1fa 100644
--- a/src/lib/elementary/Efl_Ui.h
+++ b/src/lib/elementary/Efl_Ui.h
@@ -252,7 +252,7 @@ typedef Eo Efl_Ui_Spotlight_Indicator;
252# include <efl_ui_slider.eo.h> 252# include <efl_ui_slider.eo.h>
253# include <efl_ui_item.eo.h> 253# include <efl_ui_item.eo.h>
254# include <efl_ui_position_manager_entity.eo.h> 254# include <efl_ui_position_manager_entity.eo.h>
255# include <efl_ui_item_container.eo.h> 255# include <efl_ui_collection.eo.h>
256# include <efl_ui_position_manager_list.eo.h> 256# include <efl_ui_position_manager_list.eo.h>
257# include <efl_ui_position_manager_grid.eo.h> 257# include <efl_ui_position_manager_grid.eo.h>
258# include <efl_ui_list_default_item.eo.h> 258# include <efl_ui_list_default_item.eo.h>
diff --git a/src/lib/elementary/efl_ui_item_container.c b/src/lib/elementary/efl_ui_collection.c
index e2a8a65b7d..564bb108e0 100644
--- a/src/lib/elementary/efl_ui_item_container.c
+++ b/src/lib/elementary/efl_ui_collection.c
@@ -145,10 +145,10 @@ _fast_accessor_remove(Fast_Accessor *accessor, const Eina_List *removed_elem)
145 145
146} 146}
147 147
148#define MY_CLASS EFL_UI_ITEM_CONTAINER_CLASS 148#define MY_CLASS EFL_UI_COLLECTION_CLASS
149 149
150#define MY_DATA_GET(obj, pd) \ 150#define MY_DATA_GET(obj, pd) \
151 Efl_Ui_Item_Container_Data *pd = efl_data_scope_get(obj, MY_CLASS); 151 Efl_Ui_Collection_Data *pd = efl_data_scope_get(obj, MY_CLASS);
152 152
153typedef struct { 153typedef struct {
154 Efl_Ui_Scroll_Manager *smanager; 154 Efl_Ui_Scroll_Manager *smanager;
@@ -166,13 +166,13 @@ typedef struct {
166 Fast_Accessor obj_accessor; 166 Fast_Accessor obj_accessor;
167 Fast_Accessor size_accessor; 167 Fast_Accessor size_accessor;
168 Efl_Gfx_Entity *sizer; 168 Efl_Gfx_Entity *sizer;
169} Efl_Ui_Item_Container_Data; 169} Efl_Ui_Collection_Data;
170 170
171static Eina_Bool register_item(Eo *obj, Efl_Ui_Item_Container_Data *pd, Efl_Ui_Item *item); 171static Eina_Bool register_item(Eo *obj, Efl_Ui_Collection_Data *pd, Efl_Ui_Item *item);
172static Eina_Bool unregister_item(Eo *obj, Efl_Ui_Item_Container_Data *pd, Efl_Ui_Item *item); 172static Eina_Bool unregister_item(Eo *obj, Efl_Ui_Collection_Data *pd, Efl_Ui_Item *item);
173 173
174static void 174static void
175flush_min_size(Eo *obj, Efl_Ui_Item_Container_Data *pd) 175flush_min_size(Eo *obj, Efl_Ui_Collection_Data *pd)
176{ 176{
177 Eina_Size2D tmp = pd->content_min_size; 177 Eina_Size2D tmp = pd->content_min_size;
178 178
@@ -186,7 +186,7 @@ flush_min_size(Eo *obj, Efl_Ui_Item_Container_Data *pd)
186} 186}
187 187
188static int 188static int
189clamp_index(Efl_Ui_Item_Container_Data *pd, int index) 189clamp_index(Efl_Ui_Collection_Data *pd, int index)
190{ 190{
191 if (index < ((int)eina_list_count(pd->items)) * -1) 191 if (index < ((int)eina_list_count(pd->items)) * -1)
192 return -1; 192 return -1;
@@ -196,7 +196,7 @@ clamp_index(Efl_Ui_Item_Container_Data *pd, int index)
196} 196}
197 197
198static int 198static int
199index_adjust(Efl_Ui_Item_Container_Data *pd, int index) 199index_adjust(Efl_Ui_Collection_Data *pd, int index)
200{ 200{
201 int c = eina_list_count(pd->items); 201 int c = eina_list_count(pd->items);
202 if (index < c * -1) 202 if (index < c * -1)
@@ -240,7 +240,7 @@ EFL_CALLBACKS_ARRAY_DEFINE(pan_events_cb,
240 240
241static void 241static void
242_item_scroll_internal(Eo *obj EINA_UNUSED, 242_item_scroll_internal(Eo *obj EINA_UNUSED,
243 Efl_Ui_Item_Container_Data *pd, 243 Efl_Ui_Collection_Data *pd,
244 Efl_Ui_Item *item, 244 Efl_Ui_Item *item,
245 double align, 245 double align,
246 Eina_Bool anim) 246 Eina_Bool anim)
@@ -262,25 +262,25 @@ _item_scroll_internal(Eo *obj EINA_UNUSED,
262} 262}
263 263
264EOLIAN static void 264EOLIAN static void
265_efl_ui_item_container_item_scroll(Eo *obj, Efl_Ui_Item_Container_Data *pd, Efl_Ui_Item *item, Eina_Bool animation) 265_efl_ui_collection_item_scroll(Eo *obj, Efl_Ui_Collection_Data *pd, Efl_Ui_Item *item, Eina_Bool animation)
266{ 266{
267 _item_scroll_internal(obj, pd, item, -1.0, animation); 267 _item_scroll_internal(obj, pd, item, -1.0, animation);
268} 268}
269 269
270EOLIAN static void 270EOLIAN static void
271_efl_ui_item_container_item_scroll_align(Eo *obj, Efl_Ui_Item_Container_Data *pd, Efl_Ui_Item *item, double align, Eina_Bool animation) 271_efl_ui_collection_item_scroll_align(Eo *obj, Efl_Ui_Collection_Data *pd, Efl_Ui_Item *item, double align, Eina_Bool animation)
272{ 272{
273 _item_scroll_internal(obj, pd, item, align, animation); 273 _item_scroll_internal(obj, pd, item, align, animation);
274} 274}
275 275
276EOLIAN static Efl_Ui_Item* 276EOLIAN static Efl_Ui_Item*
277_efl_ui_item_container_last_selected_item_get(const Eo *obj EINA_UNUSED, Efl_Ui_Item_Container_Data *pd) 277_efl_ui_collection_last_selected_item_get(const Eo *obj EINA_UNUSED, Efl_Ui_Collection_Data *pd)
278{ 278{
279 return eina_list_last_data_get(pd->selected); 279 return eina_list_last_data_get(pd->selected);
280} 280}
281 281
282EOLIAN static Eina_Iterator* 282EOLIAN static Eina_Iterator*
283_efl_ui_item_container_selected_items_get(Eo *obj EINA_UNUSED, Efl_Ui_Item_Container_Data *pd) 283_efl_ui_collection_selected_items_get(Eo *obj EINA_UNUSED, Efl_Ui_Collection_Data *pd)
284{ 284{
285 return eina_list_iterator_new(pd->selected); 285 return eina_list_iterator_new(pd->selected);
286} 286}
@@ -303,7 +303,7 @@ _size_accessor_get_at(Fast_Accessor *accessor, unsigned int idx, void **data)
303 303
304 304
305EOLIAN static Efl_Object* 305EOLIAN static Efl_Object*
306_efl_ui_item_container_efl_object_constructor(Eo *obj, Efl_Ui_Item_Container_Data *pd EINA_UNUSED) 306_efl_ui_collection_efl_object_constructor(Eo *obj, Efl_Ui_Collection_Data *pd EINA_UNUSED)
307{ 307{
308 Eo *o; 308 Eo *o;
309 309
@@ -336,7 +336,7 @@ _efl_ui_item_container_efl_object_constructor(Eo *obj, Efl_Ui_Item_Container_Dat
336} 336}
337 337
338EOLIAN static Efl_Object* 338EOLIAN static Efl_Object*
339_efl_ui_item_container_efl_object_finalize(Eo *obj, Efl_Ui_Item_Container_Data *pd) 339_efl_ui_collection_efl_object_finalize(Eo *obj, Efl_Ui_Collection_Data *pd)
340{ 340{
341 EINA_SAFETY_ON_NULL_RETURN_VAL(pd->pos_man, NULL); 341 EINA_SAFETY_ON_NULL_RETURN_VAL(pd->pos_man, NULL);
342 342
@@ -344,7 +344,7 @@ _efl_ui_item_container_efl_object_finalize(Eo *obj, Efl_Ui_Item_Container_Data *
344} 344}
345 345
346EOLIAN static Eina_Error 346EOLIAN static Eina_Error
347_efl_ui_item_container_efl_ui_widget_theme_apply(Eo *obj, Efl_Ui_Item_Container_Data *pd) 347_efl_ui_collection_efl_ui_widget_theme_apply(Eo *obj, Efl_Ui_Collection_Data *pd)
348{ 348{
349 Eina_Error res; 349 Eina_Error res;
350 350
@@ -358,13 +358,13 @@ _efl_ui_item_container_efl_ui_widget_theme_apply(Eo *obj, Efl_Ui_Item_Container_
358} 358}
359 359
360EOLIAN static void 360EOLIAN static void
361_efl_ui_item_container_efl_object_destructor(Eo *obj, Efl_Ui_Item_Container_Data *pd EINA_UNUSED) 361_efl_ui_collection_efl_object_destructor(Eo *obj, Efl_Ui_Collection_Data *pd EINA_UNUSED)
362{ 362{
363 efl_destructor(efl_super(obj, MY_CLASS)); 363 efl_destructor(efl_super(obj, MY_CLASS));
364} 364}
365 365
366static void 366static void
367deselect_all(Efl_Ui_Item_Container_Data *pd) 367deselect_all(Efl_Ui_Collection_Data *pd)
368{ 368{
369 while(pd->selected) 369 while(pd->selected)
370 { 370 {
@@ -375,9 +375,9 @@ deselect_all(Efl_Ui_Item_Container_Data *pd)
375} 375}
376 376
377EOLIAN static void 377EOLIAN static void
378_efl_ui_item_container_efl_object_invalidate(Eo *obj, Efl_Ui_Item_Container_Data *pd EINA_UNUSED) 378_efl_ui_collection_efl_object_invalidate(Eo *obj, Efl_Ui_Collection_Data *pd EINA_UNUSED)
379{ 379{
380 efl_ui_item_container_position_manager_set(obj, NULL); 380 efl_ui_collection_position_manager_set(obj, NULL);
381 381
382 deselect_all(pd); 382 deselect_all(pd);
383 383
@@ -388,19 +388,19 @@ _efl_ui_item_container_efl_object_invalidate(Eo *obj, Efl_Ui_Item_Container_Data
388} 388}
389 389
390EOLIAN static Eina_Iterator* 390EOLIAN static Eina_Iterator*
391_efl_ui_item_container_efl_container_content_iterate(Eo *obj EINA_UNUSED, Efl_Ui_Item_Container_Data *pd) 391_efl_ui_collection_efl_container_content_iterate(Eo *obj EINA_UNUSED, Efl_Ui_Collection_Data *pd)
392{ 392{
393 return eina_list_iterator_new(pd->items); 393 return eina_list_iterator_new(pd->items);
394} 394}
395 395
396EOLIAN static int 396EOLIAN static int
397_efl_ui_item_container_efl_container_content_count(Eo *obj EINA_UNUSED, Efl_Ui_Item_Container_Data *pd) 397_efl_ui_collection_efl_container_content_count(Eo *obj EINA_UNUSED, Efl_Ui_Collection_Data *pd)
398{ 398{
399 return eina_list_count(pd->items); 399 return eina_list_count(pd->items);
400} 400}
401 401
402EOLIAN static void 402EOLIAN static void
403_efl_ui_item_container_efl_ui_layout_orientable_orientation_set(Eo *obj EINA_UNUSED, Efl_Ui_Item_Container_Data *pd, Efl_Ui_Layout_Orientation dir) 403_efl_ui_collection_efl_ui_layout_orientable_orientation_set(Eo *obj EINA_UNUSED, Efl_Ui_Collection_Data *pd, Efl_Ui_Layout_Orientation dir)
404{ 404{
405 if (pd->dir == dir) return; 405 if (pd->dir == dir) return;
406 406
@@ -410,13 +410,13 @@ _efl_ui_item_container_efl_ui_layout_orientable_orientation_set(Eo *obj EINA_UNU
410} 410}
411 411
412EOLIAN static Efl_Ui_Layout_Orientation 412EOLIAN static Efl_Ui_Layout_Orientation
413_efl_ui_item_container_efl_ui_layout_orientable_orientation_get(const Eo *obj EINA_UNUSED, Efl_Ui_Item_Container_Data *pd) 413_efl_ui_collection_efl_ui_layout_orientable_orientation_get(const Eo *obj EINA_UNUSED, Efl_Ui_Collection_Data *pd)
414{ 414{
415 return pd->dir; 415 return pd->dir;
416} 416}
417 417
418EOLIAN static void 418EOLIAN static void
419_efl_ui_item_container_efl_ui_scrollable_interactive_match_content_set(Eo *obj EINA_UNUSED, Efl_Ui_Item_Container_Data *pd, Eina_Bool w, Eina_Bool h) 419_efl_ui_collection_efl_ui_scrollable_interactive_match_content_set(Eo *obj EINA_UNUSED, Efl_Ui_Collection_Data *pd, Eina_Bool w, Eina_Bool h)
420{ 420{
421 if (pd->match_content.w == w && pd->match_content.h == h) 421 if (pd->match_content.w == w && pd->match_content.h == h)
422 return; 422 return;
@@ -429,7 +429,7 @@ _efl_ui_item_container_efl_ui_scrollable_interactive_match_content_set(Eo *obj E
429} 429}
430 430
431EOLIAN static void 431EOLIAN static void
432_efl_ui_item_container_efl_ui_multi_selectable_select_mode_set(Eo *obj EINA_UNUSED, Efl_Ui_Item_Container_Data *pd, Efl_Ui_Select_Mode mode) 432_efl_ui_collection_efl_ui_multi_selectable_select_mode_set(Eo *obj EINA_UNUSED, Efl_Ui_Collection_Data *pd, Efl_Ui_Select_Mode mode)
433{ 433{
434 pd->mode = mode; 434 pd->mode = mode;
435 if ((mode == EFL_UI_SELECT_MODE_SINGLE_ALWAYS || mode == EFL_UI_SELECT_MODE_SINGLE) && 435 if ((mode == EFL_UI_SELECT_MODE_SINGLE_ALWAYS || mode == EFL_UI_SELECT_MODE_SINGLE) &&
@@ -448,7 +448,7 @@ _efl_ui_item_container_efl_ui_multi_selectable_select_mode_set(Eo *obj EINA_UNUS
448} 448}
449 449
450EOLIAN static Efl_Ui_Select_Mode 450EOLIAN static Efl_Ui_Select_Mode
451_efl_ui_item_container_efl_ui_multi_selectable_select_mode_get(const Eo *obj EINA_UNUSED, Efl_Ui_Item_Container_Data *pd) 451_efl_ui_collection_efl_ui_multi_selectable_select_mode_get(const Eo *obj EINA_UNUSED, Efl_Ui_Collection_Data *pd)
452{ 452{
453 return pd->mode; 453 return pd->mode;
454} 454}
@@ -538,7 +538,7 @@ EFL_CALLBACKS_ARRAY_DEFINE(active_item,
538) 538)
539 539
540static Eina_Bool 540static Eina_Bool
541register_item(Eo *obj, Efl_Ui_Item_Container_Data *pd, Efl_Ui_Item *item) 541register_item(Eo *obj, Efl_Ui_Collection_Data *pd, Efl_Ui_Item *item)
542{ 542{
543 EINA_SAFETY_ON_FALSE_RETURN_VAL(efl_isa(item, EFL_UI_ITEM_CLASS), EINA_FALSE); 543 EINA_SAFETY_ON_FALSE_RETURN_VAL(efl_isa(item, EFL_UI_ITEM_CLASS), EINA_FALSE);
544 EINA_SAFETY_ON_TRUE_RETURN_VAL(!!eina_list_data_find(pd->items, item), EINA_FALSE); 544 EINA_SAFETY_ON_TRUE_RETURN_VAL(!!eina_list_data_find(pd->items, item), EINA_FALSE);
@@ -555,7 +555,7 @@ register_item(Eo *obj, Efl_Ui_Item_Container_Data *pd, Efl_Ui_Item *item)
555} 555}
556 556
557static Eina_Bool 557static Eina_Bool
558unregister_item(Eo *obj, Efl_Ui_Item_Container_Data *pd, Efl_Ui_Item *item) 558unregister_item(Eo *obj, Efl_Ui_Collection_Data *pd, Efl_Ui_Item *item)
559{ 559{
560 Eina_List *elem = eina_list_data_find_list(pd->items, item); 560 Eina_List *elem = eina_list_data_find_list(pd->items, item);
561 if (!elem) 561 if (!elem)
@@ -576,12 +576,13 @@ unregister_item(Eo *obj, Efl_Ui_Item_Container_Data *pd, Efl_Ui_Item *item)
576 pd->selected = eina_list_remove(pd->selected, item); 576 pd->selected = eina_list_remove(pd->selected, item);
577 efl_event_callback_array_del(item, active_item(), obj); 577 efl_event_callback_array_del(item, active_item(), obj);
578 efl_ui_position_manager_entity_item_removed(pd->pos_man, id, item); 578 efl_ui_position_manager_entity_item_removed(pd->pos_man, id, item);
579 efl_ui_item_container_set(item, NULL);
579 580
580 return EINA_TRUE; 581 return EINA_TRUE;
581} 582}
582 583
583static void 584static void
584update_pos_man(Eo *obj EINA_UNUSED, Efl_Ui_Item_Container_Data *pd, Efl_Gfx_Entity *subobj) 585update_pos_man(Eo *obj EINA_UNUSED, Efl_Ui_Collection_Data *pd, Efl_Gfx_Entity *subobj)
585{ 586{
586 int id = eina_list_data_idx(pd->items, subobj); 587 int id = eina_list_data_idx(pd->items, subobj);
587 if (id == 0) 588 if (id == 0)
@@ -595,7 +596,7 @@ update_pos_man(Eo *obj EINA_UNUSED, Efl_Ui_Item_Container_Data *pd, Efl_Gfx_Enti
595} 596}
596 597
597EOLIAN static Eina_Bool 598EOLIAN static Eina_Bool
598_efl_ui_item_container_efl_pack_pack_clear(Eo *obj EINA_UNUSED, Efl_Ui_Item_Container_Data *pd) 599_efl_ui_collection_efl_pack_pack_clear(Eo *obj EINA_UNUSED, Efl_Ui_Collection_Data *pd)
599{ 600{
600 while(pd->items) 601 while(pd->items)
601 { 602 {
@@ -606,7 +607,7 @@ _efl_ui_item_container_efl_pack_pack_clear(Eo *obj EINA_UNUSED, Efl_Ui_Item_Cont
606} 607}
607 608
608EOLIAN static Eina_Bool 609EOLIAN static Eina_Bool
609_efl_ui_item_container_efl_pack_unpack_all(Eo *obj, Efl_Ui_Item_Container_Data *pd) 610_efl_ui_collection_efl_pack_unpack_all(Eo *obj, Efl_Ui_Collection_Data *pd)
610{ 611{
611 while(pd->items) 612 while(pd->items)
612 { 613 {
@@ -617,7 +618,7 @@ _efl_ui_item_container_efl_pack_unpack_all(Eo *obj, Efl_Ui_Item_Container_Data *
617} 618}
618 619
619EOLIAN static Efl_Gfx_Entity* 620EOLIAN static Efl_Gfx_Entity*
620_efl_ui_item_container_efl_pack_linear_pack_unpack_at(Eo *obj, Efl_Ui_Item_Container_Data *pd, int index) 621_efl_ui_collection_efl_pack_linear_pack_unpack_at(Eo *obj, Efl_Ui_Collection_Data *pd, int index)
621{ 622{
622 Efl_Ui_Item *it = eina_list_nth(pd->items, index_adjust(pd, index)); 623 Efl_Ui_Item *it = eina_list_nth(pd->items, index_adjust(pd, index));
623 624
@@ -630,21 +631,21 @@ _efl_ui_item_container_efl_pack_linear_pack_unpack_at(Eo *obj, Efl_Ui_Item_Conta
630} 631}
631 632
632EOLIAN static Eina_Bool 633EOLIAN static Eina_Bool
633_efl_ui_item_container_efl_pack_unpack(Eo *obj, Efl_Ui_Item_Container_Data *pd, Efl_Gfx_Entity *subobj) 634_efl_ui_collection_efl_pack_unpack(Eo *obj, Efl_Ui_Collection_Data *pd, Efl_Gfx_Entity *subobj)
634{ 635{
635 return unregister_item(obj, pd, subobj); 636 return unregister_item(obj, pd, subobj);
636} 637}
637 638
638 639
639EOLIAN static Eina_Bool 640EOLIAN static Eina_Bool
640_efl_ui_item_container_efl_pack_pack(Eo *obj, Efl_Ui_Item_Container_Data *pd EINA_UNUSED, Efl_Gfx_Entity *subobj) 641_efl_ui_collection_efl_pack_pack(Eo *obj, Efl_Ui_Collection_Data *pd EINA_UNUSED, Efl_Gfx_Entity *subobj)
641{ 642{
642 return efl_pack_end(obj, subobj); 643 return efl_pack_end(obj, subobj);
643} 644}
644 645
645 646
646EOLIAN static Eina_Bool 647EOLIAN static Eina_Bool
647_efl_ui_item_container_efl_pack_linear_pack_end(Eo *obj, Efl_Ui_Item_Container_Data *pd, Efl_Gfx_Entity *subobj) 648_efl_ui_collection_efl_pack_linear_pack_end(Eo *obj, Efl_Ui_Collection_Data *pd, Efl_Gfx_Entity *subobj)
648{ 649{
649 if (!register_item(obj, pd, subobj)) 650 if (!register_item(obj, pd, subobj))
650 return EINA_FALSE; 651 return EINA_FALSE;
@@ -655,7 +656,7 @@ _efl_ui_item_container_efl_pack_linear_pack_end(Eo *obj, Efl_Ui_Item_Container_D
655 656
656 657
657EOLIAN static Eina_Bool 658EOLIAN static Eina_Bool
658_efl_ui_item_container_efl_pack_linear_pack_begin(Eo *obj, Efl_Ui_Item_Container_Data *pd, Efl_Gfx_Entity *subobj) 659_efl_ui_collection_efl_pack_linear_pack_begin(Eo *obj, Efl_Ui_Collection_Data *pd, Efl_Gfx_Entity *subobj)
659{ 660{
660 if (!register_item(obj, pd, subobj)) 661 if (!register_item(obj, pd, subobj))
661 return EINA_FALSE; 662 return EINA_FALSE;
@@ -665,7 +666,7 @@ _efl_ui_item_container_efl_pack_linear_pack_begin(Eo *obj, Efl_Ui_Item_Container
665} 666}
666 667
667EOLIAN static Eina_Bool 668EOLIAN static Eina_Bool
668_efl_ui_item_container_efl_pack_linear_pack_before(Eo *obj, Efl_Ui_Item_Container_Data *pd, Efl_Gfx_Entity *subobj, const Efl_Gfx_Entity *existing) 669_efl_ui_collection_efl_pack_linear_pack_before(Eo *obj, Efl_Ui_Collection_Data *pd, Efl_Gfx_Entity *subobj, const Efl_Gfx_Entity *existing)
669{ 670{
670 Eina_List *subobj_list = eina_list_data_find_list(pd->items, existing); 671 Eina_List *subobj_list = eina_list_data_find_list(pd->items, existing);
671 EINA_SAFETY_ON_NULL_RETURN_VAL(subobj_list, EINA_FALSE); 672 EINA_SAFETY_ON_NULL_RETURN_VAL(subobj_list, EINA_FALSE);
@@ -678,7 +679,7 @@ _efl_ui_item_container_efl_pack_linear_pack_before(Eo *obj, Efl_Ui_Item_Containe
678} 679}
679 680
680EOLIAN static Eina_Bool 681EOLIAN static Eina_Bool
681_efl_ui_item_container_efl_pack_linear_pack_after(Eo *obj, Efl_Ui_Item_Container_Data *pd, Efl_Gfx_Entity *subobj, const Efl_Gfx_Entity *existing) 682_efl_ui_collection_efl_pack_linear_pack_after(Eo *obj, Efl_Ui_Collection_Data *pd, Efl_Gfx_Entity *subobj, const Efl_Gfx_Entity *existing)
682{ 683{
683 Eina_List *subobj_list = eina_list_data_find_list(pd->items, existing); 684 Eina_List *subobj_list = eina_list_data_find_list(pd->items, existing);
684 EINA_SAFETY_ON_NULL_RETURN_VAL(subobj_list, EINA_FALSE); 685 EINA_SAFETY_ON_NULL_RETURN_VAL(subobj_list, EINA_FALSE);
@@ -691,7 +692,7 @@ _efl_ui_item_container_efl_pack_linear_pack_after(Eo *obj, Efl_Ui_Item_Container
691} 692}
692 693
693EOLIAN static Eina_Bool 694EOLIAN static Eina_Bool
694_efl_ui_item_container_efl_pack_linear_pack_at(Eo *obj, Efl_Ui_Item_Container_Data *pd, Efl_Gfx_Entity *subobj, int index) 695_efl_ui_collection_efl_pack_linear_pack_at(Eo *obj, Efl_Ui_Collection_Data *pd, Efl_Gfx_Entity *subobj, int index)
695{ 696{
696 Eina_List *subobj_list; 697 Eina_List *subobj_list;
697 int clamp; 698 int clamp;
@@ -713,13 +714,13 @@ _efl_ui_item_container_efl_pack_linear_pack_at(Eo *obj, Efl_Ui_Item_Container_Da
713} 714}
714 715
715EOLIAN static int 716EOLIAN static int
716_efl_ui_item_container_efl_pack_linear_pack_index_get(Eo *obj EINA_UNUSED, Efl_Ui_Item_Container_Data *pd, const Efl_Gfx_Entity *subobj) 717_efl_ui_collection_efl_pack_linear_pack_index_get(Eo *obj EINA_UNUSED, Efl_Ui_Collection_Data *pd, const Efl_Gfx_Entity *subobj)
717{ 718{
718 return eina_list_data_idx(pd->items, (void*)subobj); 719 return eina_list_data_idx(pd->items, (void*)subobj);
719} 720}
720 721
721EOLIAN static Efl_Gfx_Entity* 722EOLIAN static Efl_Gfx_Entity*
722_efl_ui_item_container_efl_pack_linear_pack_content_get(Eo *obj EINA_UNUSED, Efl_Ui_Item_Container_Data *pd, int index) 723_efl_ui_collection_efl_pack_linear_pack_content_get(Eo *obj EINA_UNUSED, Efl_Ui_Collection_Data *pd, int index)
723{ 724{
724 return eina_list_nth(pd->items, index_adjust(pd, index)); 725 return eina_list_nth(pd->items, index_adjust(pd, index));
725} 726}
@@ -750,7 +751,7 @@ EFL_CALLBACKS_ARRAY_DEFINE(pos_manager_cbs,
750) 751)
751 752
752EOLIAN static void 753EOLIAN static void
753_efl_ui_item_container_position_manager_set(Eo *obj, Efl_Ui_Item_Container_Data *pd, Efl_Ui_Position_Manager_Entity *layouter) 754_efl_ui_collection_position_manager_set(Eo *obj, Efl_Ui_Collection_Data *pd, Efl_Ui_Position_Manager_Entity *layouter)
754{ 755{
755 if (layouter) 756 if (layouter)
756 EINA_SAFETY_ON_FALSE_RETURN(efl_isa(layouter, EFL_UI_POSITION_MANAGER_ENTITY_INTERFACE)); 757 EINA_SAFETY_ON_FALSE_RETURN(efl_isa(layouter, EFL_UI_POSITION_MANAGER_ENTITY_INTERFACE));
@@ -773,32 +774,46 @@ _efl_ui_item_container_position_manager_set(Eo *obj, Efl_Ui_Item_Container_Data
773} 774}
774 775
775EOLIAN static Efl_Ui_Position_Manager_Entity* 776EOLIAN static Efl_Ui_Position_Manager_Entity*
776_efl_ui_item_container_position_manager_get(const Eo *obj EINA_UNUSED, Efl_Ui_Item_Container_Data *pd) 777_efl_ui_collection_position_manager_get(const Eo *obj EINA_UNUSED, Efl_Ui_Collection_Data *pd)
777{ 778{
778 return pd->pos_man; 779 return pd->pos_man;
779} 780}
780 781
781EOLIAN static Efl_Ui_Focus_Manager* 782EOLIAN static Efl_Ui_Focus_Manager*
782_efl_ui_item_container_efl_ui_widget_focus_manager_focus_manager_create(Eo *obj, Efl_Ui_Item_Container_Data *pd EINA_UNUSED, Efl_Ui_Focus_Object *root) 783_efl_ui_collection_efl_ui_widget_focus_manager_focus_manager_create(Eo *obj, Efl_Ui_Collection_Data *pd EINA_UNUSED, Efl_Ui_Focus_Object *root)
783{ 784{
784 return efl_add(EFL_UI_FOCUS_MANAGER_CALC_CLASS, obj, 785 return efl_add(EFL_UI_FOCUS_MANAGER_CALC_CLASS, obj,
785 efl_ui_focus_manager_root_set(efl_added, root)); 786 efl_ui_focus_manager_root_set(efl_added, root));
786} 787}
787 788
788EOLIAN static Eina_Bool 789EOLIAN static Eina_Bool
789_efl_ui_item_container_efl_ui_widget_focus_state_apply(Eo *obj, Efl_Ui_Item_Container_Data *pd EINA_UNUSED, Efl_Ui_Widget_Focus_State current_state, Efl_Ui_Widget_Focus_State *configured_state, Efl_Ui_Widget *redirect EINA_UNUSED) 790_efl_ui_collection_efl_ui_widget_focus_state_apply(Eo *obj, Efl_Ui_Collection_Data *pd EINA_UNUSED, Efl_Ui_Widget_Focus_State current_state, Efl_Ui_Widget_Focus_State *configured_state, Efl_Ui_Widget *redirect EINA_UNUSED)
790{ 791{
791 return efl_ui_widget_focus_state_apply(efl_super(obj, MY_CLASS), current_state, configured_state, obj); 792 return efl_ui_widget_focus_state_apply(efl_super(obj, MY_CLASS), current_state, configured_state, obj);
792} 793}
793 794
794EOLIAN static Efl_Ui_Focus_Object* 795EOLIAN static Efl_Ui_Focus_Object*
795_efl_ui_item_container_efl_ui_focus_manager_move(Eo *obj, Efl_Ui_Item_Container_Data *pd, Efl_Ui_Focus_Direction direction) 796_efl_ui_collection_efl_ui_focus_manager_move(Eo *obj, Efl_Ui_Collection_Data *pd, Efl_Ui_Focus_Direction direction)
796{ 797{
797 Eo *new_obj, *focus; 798 Eo *new_obj, *focus;
798 Eina_Size2D step; 799 Eina_Size2D step;
799 800
800 new_obj = efl_ui_focus_manager_move(efl_super(obj, MY_CLASS), direction);
801 focus = efl_ui_focus_manager_focus_get(obj); 801 focus = efl_ui_focus_manager_focus_get(obj);
802 if (focus)
803 {
804 /* if this is outside the viewport, then we must bring that in first */
805 Eina_Rect viewport;
806 Eina_Rect element;
807 element = efl_gfx_entity_geometry_get(focus);
808 viewport = efl_gfx_entity_geometry_get(obj);
809 if (!eina_spans_intersect(element.x, element.x+element.w, viewport.x, viewport.x+viewport.w) &&
810 !eina_spans_intersect(element.y, element.y+element.h, viewport.y, viewport.y+viewport.y))
811 {
812 efl_ui_scrollable_scroll(obj, element, EINA_TRUE);
813 return focus;
814 }
815 }
816 new_obj = efl_ui_focus_manager_move(efl_super(obj, MY_CLASS), direction);
802 step = efl_gfx_hint_size_min_get(focus); 817 step = efl_gfx_hint_size_min_get(focus);
803 if (!new_obj) 818 if (!new_obj)
804 { 819 {
@@ -855,4 +870,4 @@ _efl_ui_item_container_efl_ui_focus_manager_move(Eo *obj, Efl_Ui_Item_Container_
855 return new_obj; 870 return new_obj;
856} 871}
857 872
858#include "efl_ui_item_container.eo.c" 873#include "efl_ui_collection.eo.c"
diff --git a/src/lib/elementary/efl_ui_item_container.eo b/src/lib/elementary/efl_ui_collection.eo
index 962eb00d19..26f3bb3bc0 100644
--- a/src/lib/elementary/efl_ui_item_container.eo
+++ b/src/lib/elementary/efl_ui_collection.eo
@@ -1,4 +1,4 @@
1class @beta Efl.Ui.Item_Container extends Efl.Ui.Layout_Base implements 1class @beta Efl.Ui.Collection extends Efl.Ui.Layout_Base implements
2 Efl.Ui.Scrollable_Interactive, 2 Efl.Ui.Scrollable_Interactive,
3 Efl.Ui.Scrollbar, 3 Efl.Ui.Scrollbar,
4 Efl.Pack_Linear, Efl.Pack_Layout, 4 Efl.Pack_Linear, Efl.Pack_Layout,
diff --git a/src/lib/elementary/efl_ui_grid.c b/src/lib/elementary/efl_ui_grid.c
index a82c0a77dd..709765373c 100644
--- a/src/lib/elementary/efl_ui_grid.c
+++ b/src/lib/elementary/efl_ui_grid.c
@@ -24,7 +24,7 @@ _efl_ui_grid_efl_object_constructor(Eo *obj, Efl_Ui_Grid_Data *pd EINA_UNUSED)
24{ 24{
25 obj = efl_constructor(efl_super(obj, MY_CLASS)); 25 obj = efl_constructor(efl_super(obj, MY_CLASS));
26 26
27 efl_ui_item_container_position_manager_set(obj, efl_new(EFL_UI_POSITION_MANAGER_GRID_CLASS)); 27 efl_ui_collection_position_manager_set(obj, efl_new(EFL_UI_POSITION_MANAGER_GRID_CLASS));
28 28
29 return obj; 29 return obj;
30} 30}
diff --git a/src/lib/elementary/efl_ui_grid.eo b/src/lib/elementary/efl_ui_grid.eo
index 5ae359b727..48221f8f72 100644
--- a/src/lib/elementary/efl_ui_grid.eo
+++ b/src/lib/elementary/efl_ui_grid.eo
@@ -1,4 +1,4 @@
1class @beta Efl.Ui.Grid extends Efl.Ui.Item_Container 1class @beta Efl.Ui.Grid extends Efl.Ui.Collection
2{ 2{
3 [[Simple grid widget with Pack interface.]] 3 [[Simple grid widget with Pack interface.]]
4 4
diff --git a/src/lib/elementary/efl_ui_list.c b/src/lib/elementary/efl_ui_list.c
index eb842e137a..9a4cc7fb16 100644
--- a/src/lib/elementary/efl_ui_list.c
+++ b/src/lib/elementary/efl_ui_list.c
@@ -24,7 +24,7 @@ _efl_ui_list_efl_object_constructor(Eo *obj, Efl_Ui_List_Data *pd EINA_UNUSED)
24{ 24{
25 obj = efl_constructor(efl_super(obj, MY_CLASS)); 25 obj = efl_constructor(efl_super(obj, MY_CLASS));
26 26
27 efl_ui_item_container_position_manager_set(obj, efl_new(EFL_UI_POSITION_MANAGER_LIST_CLASS)); 27 efl_ui_collection_position_manager_set(obj, efl_new(EFL_UI_POSITION_MANAGER_LIST_CLASS));
28 28
29 return obj; 29 return obj;
30} 30}
diff --git a/src/lib/elementary/efl_ui_list.eo b/src/lib/elementary/efl_ui_list.eo
index 6254e16a18..94e90f760d 100644
--- a/src/lib/elementary/efl_ui_list.eo
+++ b/src/lib/elementary/efl_ui_list.eo
@@ -1,4 +1,4 @@
1class @beta Efl.Ui.List extends Efl.Ui.Item_Container 1class @beta Efl.Ui.List extends Efl.Ui.Collection
2{ 2{
3 [[Simple list widget with Pack interface.]] 3 [[Simple list widget with Pack interface.]]
4 implements { 4 implements {
diff --git a/src/lib/elementary/meson.build b/src/lib/elementary/meson.build
index 07d85244a1..72226f5cf3 100644
--- a/src/lib/elementary/meson.build
+++ b/src/lib/elementary/meson.build
@@ -179,7 +179,7 @@ pub_eo_files = [
179 'efl_ui_clickable.eo', 179 'efl_ui_clickable.eo',
180 'efl_ui_clickable_util.eo', 180 'efl_ui_clickable_util.eo',
181 'efl_ui_format.eo', 181 'efl_ui_format.eo',
182 'efl_ui_item_container.eo', 182 'efl_ui_collection.eo',
183 'efl_ui_position_manager_entity.eo', 183 'efl_ui_position_manager_entity.eo',
184 'efl_ui_position_manager_list.eo', 184 'efl_ui_position_manager_list.eo',
185 'efl_ui_position_manager_grid.eo', 185 'efl_ui_position_manager_grid.eo',
@@ -934,7 +934,7 @@ elementary_src = [
934 'efl_ui_clickable_util.c', 934 'efl_ui_clickable_util.c',
935 'efl_ui_format.c', 935 'efl_ui_format.c',
936 'efl_ui_scroll_util.c', 936 'efl_ui_scroll_util.c',
937 'efl_ui_item_container.c', 937 'efl_ui_collection.c',
938 'efl_ui_position_manager_entity.c', 938 'efl_ui_position_manager_entity.c',
939 'efl_ui_position_manager_list.c', 939 'efl_ui_position_manager_list.c',
940 'efl_ui_position_manager_grid.c', 940 'efl_ui_position_manager_grid.c',
diff --git a/src/tests/elementary/efl_ui_suite.c b/src/tests/elementary/efl_ui_suite.c
index bc8a1c6902..3478095936 100644
--- a/src/tests/elementary/efl_ui_suite.c
+++ b/src/tests/elementary/efl_ui_suite.c
@@ -32,7 +32,7 @@ static const Efl_Test_Case etc[] = {
32 { "efl_ui_win", efl_ui_test_win }, 32 { "efl_ui_win", efl_ui_test_win },
33 { "efl_ui_spin", efl_ui_test_spin }, 33 { "efl_ui_spin", efl_ui_test_spin },
34 { "efl_ui_spin_button", efl_ui_test_spin_button }, 34 { "efl_ui_spin_button", efl_ui_test_spin_button },
35 { "efl_ui_item_container", efl_ui_test_item_container }, 35 { "efl_ui_collection", efl_ui_test_item_container },
36 { "efl_ui_grid_container", efl_ui_test_grid_container }, 36 { "efl_ui_grid_container", efl_ui_test_grid_container },
37 { "efl_ui_list_container", efl_ui_test_list_container }, 37 { "efl_ui_list_container", efl_ui_test_list_container },
38 { NULL, NULL } 38 { NULL, NULL }
diff --git a/src/tests/elementary/efl_ui_test_grid.c b/src/tests/elementary/efl_ui_test_grid.c
index a8d4ea0433..9eaa096ad0 100644
--- a/src/tests/elementary/efl_ui_test_grid.c
+++ b/src/tests/elementary/efl_ui_test_grid.c
@@ -289,7 +289,7 @@ EFL_START_TEST(efl_ui_grid_scroll)
289 289
290 efl_event_callback_array_add(grid, grid_scroll_callbacks(), timer); 290 efl_event_callback_array_add(grid, grid_scroll_callbacks(), timer);
291 /*FIXME: efl_ui_scroll_interface only emit scroll event when animation exist */ 291 /*FIXME: efl_ui_scroll_interface only emit scroll event when animation exist */
292 efl_ui_item_container_item_scroll(grid, item, EINA_TRUE); 292 efl_ui_collection_item_scroll(grid, item, EINA_TRUE);
293 ecore_main_loop_begin(); 293 ecore_main_loop_begin();
294} 294}
295EFL_END_TEST 295EFL_END_TEST
diff --git a/src/tests/elementary/efl_ui_test_grid_container.c b/src/tests/elementary/efl_ui_test_grid_container.c
index 61776237cb..a8e94b05b4 100644
--- a/src/tests/elementary/efl_ui_test_grid_container.c
+++ b/src/tests/elementary/efl_ui_test_grid_container.c
@@ -14,8 +14,8 @@ item_container_setup()
14 Eo * list = efl_new(EFL_UI_POSITION_MANAGER_GRID_CLASS); 14 Eo * list = efl_new(EFL_UI_POSITION_MANAGER_GRID_CLASS);
15 position_manager = efl_new(EFL_UI_POSITION_MANAGER_GRID_CLASS); 15 position_manager = efl_new(EFL_UI_POSITION_MANAGER_GRID_CLASS);
16 win = win_add(); 16 win = win_add();
17 item_container = efl_add(EFL_UI_ITEM_CONTAINER_CLASS, win, 17 item_container = efl_add(EFL_UI_COLLECTION_CLASS, win,
18 efl_ui_item_container_position_manager_set(efl_added, list)); 18 efl_ui_collection_position_manager_set(efl_added, list));
19 19
20} 20}
21 21
diff --git a/src/tests/elementary/efl_ui_test_item_container.c b/src/tests/elementary/efl_ui_test_item_container.c
index 9b3de482b3..349f73fee0 100644
--- a/src/tests/elementary/efl_ui_test_item_container.c
+++ b/src/tests/elementary/efl_ui_test_item_container.c
@@ -28,18 +28,18 @@ EFL_START_TEST(finalizer_check)
28 Eo *o; 28 Eo *o;
29 29
30 EXPECT_ERROR_START; 30 EXPECT_ERROR_START;
31 ck_assert_ptr_eq(efl_add(EFL_UI_ITEM_CONTAINER_CLASS, win), NULL); 31 ck_assert_ptr_eq(efl_add(EFL_UI_COLLECTION_CLASS, win), NULL);
32 EXPECT_ERROR_END; 32 EXPECT_ERROR_END;
33 33
34 EXPECT_ERROR_START; 34 EXPECT_ERROR_START;
35 ck_assert_ptr_eq(efl_add(EFL_UI_ITEM_CONTAINER_CLASS, win, efl_ui_item_container_position_manager_set(efl_added, random_obj)), NULL); 35 ck_assert_ptr_eq(efl_add(EFL_UI_COLLECTION_CLASS, win, efl_ui_collection_position_manager_set(efl_added, random_obj)), NULL);
36 EXPECT_ERROR_END; 36 EXPECT_ERROR_END;
37 37
38 o = efl_add(EFL_UI_ITEM_CONTAINER_CLASS, win, efl_ui_item_container_position_manager_set(efl_added, grid)); 38 o = efl_add(EFL_UI_COLLECTION_CLASS, win, efl_ui_collection_position_manager_set(efl_added, grid));
39 ck_assert_ptr_ne(o, NULL); 39 ck_assert_ptr_ne(o, NULL);
40 ck_assert_ptr_eq(efl_parent_get(grid), o); 40 ck_assert_ptr_eq(efl_parent_get(grid), o);
41 efl_del(o); 41 efl_del(o);
42 o = efl_add(EFL_UI_ITEM_CONTAINER_CLASS, win, efl_ui_item_container_position_manager_set(efl_added, list)); 42 o = efl_add(EFL_UI_COLLECTION_CLASS, win, efl_ui_collection_position_manager_set(efl_added, list));
43 ck_assert_ptr_ne(o, NULL); 43 ck_assert_ptr_ne(o, NULL);
44 ck_assert_ptr_eq(efl_parent_get(list), o); 44 ck_assert_ptr_eq(efl_parent_get(list), o);
45 efl_del(o); 45 efl_del(o);
diff --git a/src/tests/elementary/efl_ui_test_item_container_common.c b/src/tests/elementary/efl_ui_test_item_container_common.c
index e97f3e7971..3a7cad3678 100644
--- a/src/tests/elementary/efl_ui_test_item_container_common.c
+++ b/src/tests/elementary/efl_ui_test_item_container_common.c
@@ -67,8 +67,8 @@ EFL_START_TEST(test_multi_select)
67 unselected = NULL; 67 unselected = NULL;
68 ck_assert_int_eq(efl_ui_item_selected_get(efl_pack_content_get(item_container, 0)), EINA_TRUE); 68 ck_assert_int_eq(efl_ui_item_selected_get(efl_pack_content_get(item_container, 0)), EINA_TRUE);
69 ck_assert_int_eq(efl_ui_item_selected_get(efl_pack_content_get(item_container, 2)), EINA_TRUE); 69 ck_assert_int_eq(efl_ui_item_selected_get(efl_pack_content_get(item_container, 2)), EINA_TRUE);
70 ck_assert_ptr_eq(efl_ui_item_container_last_selected_item_get(item_container), efl_pack_content_get(item_container, 2)); 70 ck_assert_ptr_eq(efl_ui_collection_last_selected_item_get(item_container), efl_pack_content_get(item_container, 2));
71 _iterator_to_array(&arr_selected, efl_ui_item_container_selected_items_get(item_container)); 71 _iterator_to_array(&arr_selected, efl_ui_collection_selected_items_get(item_container));
72 ck_assert_int_eq(eina_array_count(arr_selected), 2); 72 ck_assert_int_eq(eina_array_count(arr_selected), 2);
73 ck_assert_ptr_eq(eina_array_data_get(arr_selected, 0), efl_pack_content_get(item_container, 0)); 73 ck_assert_ptr_eq(eina_array_data_get(arr_selected, 0), efl_pack_content_get(item_container, 0));
74 ck_assert_ptr_eq(eina_array_data_get(arr_selected, 1), efl_pack_content_get(item_container, 2)); 74 ck_assert_ptr_eq(eina_array_data_get(arr_selected, 1), efl_pack_content_get(item_container, 2));
@@ -109,8 +109,8 @@ EFL_START_TEST(test_multi_select_removal)
109 selected = NULL; 109 selected = NULL;
110 unselected = NULL; 110 unselected = NULL;
111 111
112 ck_assert_ptr_eq(efl_ui_item_container_last_selected_item_get(item_container), NULL); 112 ck_assert_ptr_eq(efl_ui_collection_last_selected_item_get(item_container), NULL);
113 _iterator_to_array(&arr_selected, efl_ui_item_container_selected_items_get(item_container)); 113 _iterator_to_array(&arr_selected, efl_ui_collection_selected_items_get(item_container));
114 ck_assert_int_eq(eina_array_count(arr_selected), 0); 114 ck_assert_int_eq(eina_array_count(arr_selected), 0);
115 efl_event_callback_del(item_container, EFL_UI_EVENT_ITEM_SELECTED, _set_pointer_quit, &selected); 115 efl_event_callback_del(item_container, EFL_UI_EVENT_ITEM_SELECTED, _set_pointer_quit, &selected);
116 efl_event_callback_del(item_container, EFL_UI_EVENT_ITEM_UNSELECTED, _set_pointer_quit, &unselected); 116 efl_event_callback_del(item_container, EFL_UI_EVENT_ITEM_UNSELECTED, _set_pointer_quit, &unselected);
@@ -140,8 +140,8 @@ EFL_START_TEST(test_single_select)
140 unselected = NULL; 140 unselected = NULL;
141 ck_assert_int_eq(efl_ui_item_selected_get(efl_pack_content_get(item_container, 0)), EINA_FALSE); 141 ck_assert_int_eq(efl_ui_item_selected_get(efl_pack_content_get(item_container, 0)), EINA_FALSE);
142 ck_assert_int_eq(efl_ui_item_selected_get(efl_pack_content_get(item_container, 2)), EINA_TRUE); 142 ck_assert_int_eq(efl_ui_item_selected_get(efl_pack_content_get(item_container, 2)), EINA_TRUE);
143 ck_assert_ptr_eq(efl_ui_item_container_last_selected_item_get(item_container), efl_pack_content_get(item_container, 2)); 143 ck_assert_ptr_eq(efl_ui_collection_last_selected_item_get(item_container), efl_pack_content_get(item_container, 2));
144 _iterator_to_array(&arr_selected, efl_ui_item_container_selected_items_get(item_container)); 144 _iterator_to_array(&arr_selected, efl_ui_collection_selected_items_get(item_container));
145 ck_assert_int_eq(eina_array_count(arr_selected), 1); 145 ck_assert_int_eq(eina_array_count(arr_selected), 1);
146 ck_assert_ptr_eq(eina_array_data_get(arr_selected, 0), efl_pack_content_get(item_container, 2)); 146 ck_assert_ptr_eq(eina_array_data_get(arr_selected, 0), efl_pack_content_get(item_container, 2));
147 147
@@ -183,8 +183,8 @@ EFL_START_TEST(test_single_select_always)
183 unselected = NULL; 183 unselected = NULL;
184 ck_assert_int_eq(efl_ui_item_selected_get(efl_pack_content_get(item_container, 0)), EINA_FALSE); 184 ck_assert_int_eq(efl_ui_item_selected_get(efl_pack_content_get(item_container, 0)), EINA_FALSE);
185 ck_assert_int_eq(efl_ui_item_selected_get(efl_pack_content_get(item_container, 2)), EINA_TRUE); 185 ck_assert_int_eq(efl_ui_item_selected_get(efl_pack_content_get(item_container, 2)), EINA_TRUE);
186 ck_assert_ptr_eq(efl_ui_item_container_last_selected_item_get(item_container), efl_pack_content_get(item_container, 2)); 186 ck_assert_ptr_eq(efl_ui_collection_last_selected_item_get(item_container), efl_pack_content_get(item_container, 2));
187 _iterator_to_array(&arr_selected, efl_ui_item_container_selected_items_get(item_container)); 187 _iterator_to_array(&arr_selected, efl_ui_collection_selected_items_get(item_container));
188 ck_assert_int_eq(eina_array_count(arr_selected), 1); 188 ck_assert_int_eq(eina_array_count(arr_selected), 1);
189 ck_assert_ptr_eq(eina_array_data_get(arr_selected, 0), efl_pack_content_get(item_container, 2)); 189 ck_assert_ptr_eq(eina_array_data_get(arr_selected, 0), efl_pack_content_get(item_container, 2));
190 efl_event_callback_del(item_container, EFL_UI_EVENT_ITEM_SELECTED, _set_pointer_quit, &selected); 190 efl_event_callback_del(item_container, EFL_UI_EVENT_ITEM_SELECTED, _set_pointer_quit, &selected);
@@ -215,8 +215,8 @@ EFL_START_TEST(test_none_select)
215 unselected = NULL; 215 unselected = NULL;
216 ck_assert_int_eq(efl_ui_item_selected_get(efl_pack_content_get(item_container, 0)), EINA_FALSE); 216 ck_assert_int_eq(efl_ui_item_selected_get(efl_pack_content_get(item_container, 0)), EINA_FALSE);
217 ck_assert_int_eq(efl_ui_item_selected_get(efl_pack_content_get(item_container, 2)), EINA_FALSE); 217 ck_assert_int_eq(efl_ui_item_selected_get(efl_pack_content_get(item_container, 2)), EINA_FALSE);
218 ck_assert_ptr_eq(efl_ui_item_container_last_selected_item_get(item_container), NULL); 218 ck_assert_ptr_eq(efl_ui_collection_last_selected_item_get(item_container), NULL);
219 _iterator_to_array(&arr_selected, efl_ui_item_container_selected_items_get(item_container)); 219 _iterator_to_array(&arr_selected, efl_ui_collection_selected_items_get(item_container));
220 ck_assert_int_eq(eina_array_count(arr_selected), 0); 220 ck_assert_int_eq(eina_array_count(arr_selected), 0);
221 efl_event_callback_del(item_container, EFL_UI_EVENT_ITEM_SELECTED, _set_pointer_quit, &selected); 221 efl_event_callback_del(item_container, EFL_UI_EVENT_ITEM_SELECTED, _set_pointer_quit, &selected);
222 efl_event_callback_del(item_container, EFL_UI_EVENT_ITEM_UNSELECTED, _set_pointer_quit, &unselected); 222 efl_event_callback_del(item_container, EFL_UI_EVENT_ITEM_UNSELECTED, _set_pointer_quit, &unselected);
diff --git a/src/tests/elementary/efl_ui_test_list_container.c b/src/tests/elementary/efl_ui_test_list_container.c
index 74a41bacaa..6edad08126 100644
--- a/src/tests/elementary/efl_ui_test_list_container.c
+++ b/src/tests/elementary/efl_ui_test_list_container.c
@@ -14,8 +14,8 @@ item_container_setup()
14 Eo * list = efl_new(EFL_UI_POSITION_MANAGER_LIST_CLASS); 14 Eo * list = efl_new(EFL_UI_POSITION_MANAGER_LIST_CLASS);
15 position_manager = efl_new(EFL_UI_POSITION_MANAGER_LIST_CLASS); 15 position_manager = efl_new(EFL_UI_POSITION_MANAGER_LIST_CLASS);
16 win = win_add(); 16 win = win_add();
17 item_container = efl_add(EFL_UI_ITEM_CONTAINER_CLASS, win, 17 item_container = efl_add(EFL_UI_COLLECTION_CLASS, win,
18 efl_ui_item_container_position_manager_set(efl_added, list)); 18 efl_ui_collection_position_manager_set(efl_added, list));
19 19
20} 20}
21 21
diff --git a/src/tests/elementary/spec/efl_ui_spec_suite.c b/src/tests/elementary/spec/efl_ui_spec_suite.c
index bf26623a08..8316e36bc7 100644
--- a/src/tests/elementary/spec/efl_ui_spec_suite.c
+++ b/src/tests/elementary/spec/efl_ui_spec_suite.c
@@ -13,7 +13,7 @@ EOLIAN static Efl_Object*
13_test_efl_ui_item_container_list_efl_object_constructor(Eo *obj, void *pd EINA_UNUSED) 13_test_efl_ui_item_container_list_efl_object_constructor(Eo *obj, void *pd EINA_UNUSED)
14{ 14{
15 efl_constructor(efl_super(obj, TEST_EFL_UI_ITEM_CONTAINER_LIST_CLASS)); 15 efl_constructor(efl_super(obj, TEST_EFL_UI_ITEM_CONTAINER_LIST_CLASS));
16 efl_ui_item_container_position_manager_set(obj, efl_new(EFL_UI_POSITION_MANAGER_LIST_CLASS)); 16 efl_ui_collection_position_manager_set(obj, efl_new(EFL_UI_POSITION_MANAGER_LIST_CLASS));
17 17
18 return obj; 18 return obj;
19} 19}
diff --git a/src/tests/elementary/spec/test_efl_ui_item_container_list.eo b/src/tests/elementary/spec/test_efl_ui_item_container_list.eo
index d61bc0fcaa..e1cb3e9884 100644
--- a/src/tests/elementary/spec/test_efl_ui_item_container_list.eo
+++ b/src/tests/elementary/spec/test_efl_ui_item_container_list.eo
@@ -1,4 +1,4 @@
1class @beta Test.Efl.Ui.Item_Container_List extends Efl.Ui.Item_Container { 1class @beta Test.Efl.Ui.Item_Container_List extends Efl.Ui.Collection {
2 data: null; 2 data: null;
3 implements { 3 implements {
4 Efl.Object.constructor; 4 Efl.Object.constructor;