summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/benchmarks/elementary/item_container.c2
-rw-r--r--src/bin/elementary/test_ui_item_container.c6
-rw-r--r--src/lib/elementary/Efl_Ui.h6
-rw-r--r--src/lib/elementary/efl_ui_grid_position_manager.eo17
-rw-r--r--src/lib/elementary/efl_ui_item_container.c30
-rw-r--r--src/lib/elementary/efl_ui_item_container.eo2
-rw-r--r--src/lib/elementary/efl_ui_list_position_manager.eo18
-rw-r--r--src/lib/elementary/efl_ui_position_manager_entity.c (renamed from src/lib/elementary/efl_ui_item_position_manager.c)4
-rw-r--r--src/lib/elementary/efl_ui_position_manager_entity.eo (renamed from src/lib/elementary/efl_ui_item_position_manager.eo)2
-rw-r--r--src/lib/elementary/efl_ui_position_manager_grid.c (renamed from src/lib/elementary/efl_ui_grid_position_manager.c)40
-rw-r--r--src/lib/elementary/efl_ui_position_manager_grid.eo17
-rw-r--r--src/lib/elementary/efl_ui_position_manager_list.c (renamed from src/lib/elementary/efl_ui_list_position_manager.c)46
-rw-r--r--src/lib/elementary/efl_ui_position_manager_list.eo18
-rw-r--r--src/lib/elementary/meson.build12
-rw-r--r--src/tests/elementary/efl_ui_test_grid_container.c4
-rw-r--r--src/tests/elementary/efl_ui_test_item_container.c4
-rw-r--r--src/tests/elementary/efl_ui_test_list_container.c4
-rw-r--r--src/tests/elementary/efl_ui_test_position_manager_common.c26
-rw-r--r--src/tests/elementary/spec/efl_ui_spec_suite.c2
19 files changed, 130 insertions, 130 deletions
diff --git a/src/benchmarks/elementary/item_container.c b/src/benchmarks/elementary/item_container.c
index b93004c8df..5419756e09 100644
--- a/src/benchmarks/elementary/item_container.c
+++ b/src/benchmarks/elementary/item_container.c
@@ -71,7 +71,7 @@ efl_main(void *data EINA_UNUSED, const Efl_Event *ev EINA_UNUSED)
71 efl_ui_win_autodel_set(efl_added, EINA_TRUE) 71 efl_ui_win_autodel_set(efl_added, EINA_TRUE)
72 ); 72 );
73 73
74 list = efl_new(EFL_UI_LIST_POSITION_MANAGER_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_ITEM_CONTAINER_CLASS, win,
76 efl_ui_item_container_position_manager_set(efl_added, list)); 76 efl_ui_item_container_position_manager_set(efl_added, list));
77 efl_content_set(win, item_container); 77 efl_content_set(win, item_container);
diff --git a/src/bin/elementary/test_ui_item_container.c b/src/bin/elementary/test_ui_item_container.c
index 77f410a1b3..af82d7a6d9 100644
--- a/src/bin/elementary/test_ui_item_container.c
+++ b/src/bin/elementary/test_ui_item_container.c
@@ -148,7 +148,7 @@ _select_value_cb(void *data, const Efl_Event *ev)
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}
150 150
151void create_item_container_ui(Efl_Ui_Item_Position_Manager *manager, const Efl_Class *item, const char *name) 151void create_item_container_ui(Efl_Ui_Position_Manager_Entity *manager, const Efl_Class *item, const char *name)
152{ 152{
153 Efl_Ui_Win *win, *o, *tbl, *item_container, *bx; 153 Efl_Ui_Win *win, *o, *tbl, *item_container, *bx;
154 Match_Content_Ctx *ctx = calloc(1, sizeof(*ctx)); 154 Match_Content_Ctx *ctx = calloc(1, sizeof(*ctx));
@@ -261,12 +261,12 @@ void test_efl_ui_item_container_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_GRID_POSITION_MANAGER_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_item_container_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{
271 create_item_container_ui(efl_new(EFL_UI_LIST_POSITION_MANAGER_CLASS), EFL_UI_LIST_DEFAULT_ITEM_CLASS, "Efl.Ui.Item_Container List"); 271 create_item_container_ui(efl_new(EFL_UI_POSITION_MANAGER_LIST_CLASS), EFL_UI_LIST_DEFAULT_ITEM_CLASS, "Efl.Ui.Item_Container List");
272} 272}
diff --git a/src/lib/elementary/Efl_Ui.h b/src/lib/elementary/Efl_Ui.h
index 99e389f190..7d16959036 100644
--- a/src/lib/elementary/Efl_Ui.h
+++ b/src/lib/elementary/Efl_Ui.h
@@ -251,10 +251,10 @@ typedef Eo Efl_Ui_Spotlight_Indicator;
251# include <efl_ui_spin_button.eo.h> 251# include <efl_ui_spin_button.eo.h>
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_item_position_manager.eo.h> 254# include <efl_ui_position_manager_entity.eo.h>
255# include <efl_ui_item_container.eo.h> 255# include <efl_ui_item_container.eo.h>
256# include <efl_ui_list_position_manager.eo.h> 256# include <efl_ui_position_manager_list.eo.h>
257# include <efl_ui_grid_position_manager.eo.h> 257# include <efl_ui_position_manager_grid.eo.h>
258# include <efl_ui_list_item.eo.h> 258# include <efl_ui_list_item.eo.h>
259# include <efl_ui_list_default_item.eo.h> 259# include <efl_ui_list_default_item.eo.h>
260# include <efl_ui_grid_item.eo.h> 260# include <efl_ui_grid_item.eo.h>
diff --git a/src/lib/elementary/efl_ui_grid_position_manager.eo b/src/lib/elementary/efl_ui_grid_position_manager.eo
deleted file mode 100644
index f825f4db9d..0000000000
--- a/src/lib/elementary/efl_ui_grid_position_manager.eo
+++ /dev/null
@@ -1,17 +0,0 @@
1class @beta Efl.Ui.Grid_Position_Manager extends Efl.Object implements Efl.Ui.Item_Position_Manager
2{
3 [[Implementation of @Efl.Ui.Item_Position_Manager for two-dimensional grids.
4
5 Every item in the grid has the same size, which is the biggest minimum size of all items.
6 ]]
7 implements {
8 Efl.Ui.Item_Position_Manager.data_access {set;}
9 Efl.Ui.Item_Position_Manager.viewport {set;}
10 Efl.Ui.Item_Position_Manager.scroll_position {set;}
11 Efl.Ui.Item_Position_Manager.item_added;
12 Efl.Ui.Item_Position_Manager.item_removed;
13 Efl.Ui.Item_Position_Manager.position_single_item;
14 Efl.Ui.Item_Position_Manager.item_size_changed;
15 Efl.Ui.Layout_Orientable.orientation {set; get;}
16 }
17}
diff --git a/src/lib/elementary/efl_ui_item_container.c b/src/lib/elementary/efl_ui_item_container.c
index af737f5316..c7758ba8a9 100644
--- a/src/lib/elementary/efl_ui_item_container.c
+++ b/src/lib/elementary/efl_ui_item_container.c
@@ -25,7 +25,7 @@ typedef struct {
25 Efl_Ui_Select_Mode mode; 25 Efl_Ui_Select_Mode mode;
26 Efl_Ui_Layout_Orientation dir; 26 Efl_Ui_Layout_Orientation dir;
27 Eina_Size2D content_min_size; 27 Eina_Size2D content_min_size;
28 Efl_Ui_Item_Position_Manager *pos_man; 28 Efl_Ui_Position_Manager_Entity *pos_man;
29 struct { 29 struct {
30 Eina_Accessor pass_on; 30 Eina_Accessor pass_on;
31 unsigned int last_index; 31 unsigned int last_index;
@@ -217,7 +217,7 @@ _pan_viewport_changed_cb(void *data, const Efl_Event *ev EINA_UNUSED)
217 MY_DATA_GET(data, pd); 217 MY_DATA_GET(data, pd);
218 Eina_Rect rect = efl_ui_scrollable_viewport_geometry_get(data); 218 Eina_Rect rect = efl_ui_scrollable_viewport_geometry_get(data);
219 219
220 efl_ui_item_position_manager_viewport_set(pd->pos_man, rect); 220 efl_ui_position_manager_entity_viewport_set(pd->pos_man, rect);
221} 221}
222 222
223static void 223static void
@@ -233,7 +233,7 @@ _pan_position_changed_cb(void *data, const Efl_Event *ev EINA_UNUSED)
233 if (max.y > 0.0) 233 if (max.y > 0.0)
234 rpos.y = (double)pos.y/(double)max.y; 234 rpos.y = (double)pos.y/(double)max.y;
235 235
236 efl_ui_item_position_manager_scroll_position_set(pd->pos_man, rpos.x, rpos.y); 236 efl_ui_position_manager_entity_scroll_position_set(pd->pos_man, rpos.x, rpos.y);
237} 237}
238 238
239EFL_CALLBACKS_ARRAY_DEFINE(pan_events_cb, 239EFL_CALLBACKS_ARRAY_DEFINE(pan_events_cb,
@@ -253,7 +253,7 @@ _item_scroll_internal(Eo *obj EINA_UNUSED,
253 253
254 if (!pd->smanager) return; 254 if (!pd->smanager) return;
255 255
256 ipos = efl_ui_item_position_manager_position_single_item(pd->pos_man, eina_list_data_idx(pd->items, item)); 256 ipos = efl_ui_position_manager_entity_position_single_item(pd->pos_man, eina_list_data_idx(pd->items, item));
257 view = efl_ui_scrollable_viewport_geometry_get(pd->smanager); 257 view = efl_ui_scrollable_viewport_geometry_get(pd->smanager);
258 vpos = efl_ui_scrollable_content_pos_get(pd->smanager); 258 vpos = efl_ui_scrollable_content_pos_get(pd->smanager);
259 259
@@ -492,7 +492,7 @@ _hints_changed_cb(void *data, const Efl_Event *ev)
492 MY_DATA_GET(obj, pd); 492 MY_DATA_GET(obj, pd);
493 int idx = eina_list_data_idx(pd->items, ev->object); 493 int idx = eina_list_data_idx(pd->items, ev->object);
494 494
495 efl_ui_item_position_manager_item_size_changed(pd->pos_man, idx, idx); 495 efl_ui_position_manager_entity_item_size_changed(pd->pos_man, idx, idx);
496} 496}
497 497
498static void 498static void
@@ -576,7 +576,7 @@ unregister_item(Eo *obj, Efl_Ui_Item_Container_Data *pd, Efl_Ui_Item *item)
576 pd->items = eina_list_remove(pd->items, item); 576 pd->items = eina_list_remove(pd->items, item);
577 pd->selected = eina_list_remove(pd->selected, item); 577 pd->selected = eina_list_remove(pd->selected, item);
578 efl_event_callback_array_del(item, active_item(), obj); 578 efl_event_callback_array_del(item, active_item(), obj);
579 efl_ui_item_position_manager_item_removed(pd->pos_man, id, item); 579 efl_ui_position_manager_entity_item_removed(pd->pos_man, id, item);
580 580
581 return EINA_TRUE; 581 return EINA_TRUE;
582} 582}
@@ -590,7 +590,7 @@ update_pos_man(Eo *obj EINA_UNUSED, Efl_Ui_Item_Container_Data *pd, Efl_Gfx_Enti
590 pd->obj_accessor.last_index = id; 590 pd->obj_accessor.last_index = id;
591 pd->obj_accessor.current = pd->items; 591 pd->obj_accessor.current = pd->items;
592 } 592 }
593 efl_ui_item_position_manager_item_added(pd->pos_man, id, subobj); 593 efl_ui_position_manager_entity_item_added(pd->pos_man, id, subobj);
594} 594}
595 595
596EOLIAN static Eina_Bool 596EOLIAN static Eina_Bool
@@ -744,20 +744,20 @@ _pos_content_min_size_changed_cb(void *data EINA_UNUSED, const Efl_Event *ev)
744} 744}
745 745
746EFL_CALLBACKS_ARRAY_DEFINE(pos_manager_cbs, 746EFL_CALLBACKS_ARRAY_DEFINE(pos_manager_cbs,
747 {EFL_UI_ITEM_POSITION_MANAGER_EVENT_CONTENT_SIZE_CHANGED, _pos_content_size_changed_cb}, 747 {EFL_UI_POSITION_MANAGER_ENTITY_EVENT_CONTENT_SIZE_CHANGED, _pos_content_size_changed_cb},
748 {EFL_UI_ITEM_POSITION_MANAGER_EVENT_CONTENT_MIN_SIZE_CHANGED, _pos_content_min_size_changed_cb}, 748 {EFL_UI_POSITION_MANAGER_ENTITY_EVENT_CONTENT_MIN_SIZE_CHANGED, _pos_content_min_size_changed_cb},
749) 749)
750 750
751EOLIAN static void 751EOLIAN static void
752_efl_ui_item_container_position_manager_set(Eo *obj, Efl_Ui_Item_Container_Data *pd, Efl_Ui_Item_Position_Manager *layouter) 752_efl_ui_item_container_position_manager_set(Eo *obj, Efl_Ui_Item_Container_Data *pd, Efl_Ui_Position_Manager_Entity *layouter)
753{ 753{
754 if (layouter) 754 if (layouter)
755 EINA_SAFETY_ON_FALSE_RETURN(efl_isa(layouter, EFL_UI_ITEM_POSITION_MANAGER_INTERFACE)); 755 EINA_SAFETY_ON_FALSE_RETURN(efl_isa(layouter, EFL_UI_POSITION_MANAGER_ENTITY_INTERFACE));
756 756
757 if (pd->pos_man) 757 if (pd->pos_man)
758 { 758 {
759 efl_event_callback_array_del(pd->pos_man, pos_manager_cbs(), obj); 759 efl_event_callback_array_del(pd->pos_man, pos_manager_cbs(), obj);
760 efl_ui_item_position_manager_data_access_set(pd->pos_man, NULL, NULL, 0); 760 efl_ui_position_manager_entity_data_access_set(pd->pos_man, NULL, NULL, 0);
761 efl_del(pd->pos_man); 761 efl_del(pd->pos_man);
762 } 762 }
763 pd->pos_man = layouter; 763 pd->pos_man = layouter;
@@ -765,13 +765,13 @@ _efl_ui_item_container_position_manager_set(Eo *obj, Efl_Ui_Item_Container_Data
765 { 765 {
766 efl_parent_set(pd->pos_man, obj); 766 efl_parent_set(pd->pos_man, obj);
767 efl_event_callback_array_add(pd->pos_man, pos_manager_cbs(), obj); 767 efl_event_callback_array_add(pd->pos_man, pos_manager_cbs(), obj);
768 efl_ui_item_position_manager_data_access_set(pd->pos_man, &pd->obj_accessor.pass_on, &pd->size_accessor, eina_list_count(pd->items)); 768 efl_ui_position_manager_entity_data_access_set(pd->pos_man, &pd->obj_accessor.pass_on, &pd->size_accessor, eina_list_count(pd->items));
769 efl_ui_item_position_manager_viewport_set(pd->pos_man, efl_ui_scrollable_viewport_geometry_get(obj)); 769 efl_ui_position_manager_entity_viewport_set(pd->pos_man, efl_ui_scrollable_viewport_geometry_get(obj));
770 efl_ui_layout_orientation_set(pd->pos_man, pd->dir); 770 efl_ui_layout_orientation_set(pd->pos_man, pd->dir);
771 } 771 }
772} 772}
773 773
774EOLIAN static Efl_Ui_Item_Position_Manager* 774EOLIAN static Efl_Ui_Position_Manager_Entity*
775_efl_ui_item_container_position_manager_get(const Eo *obj EINA_UNUSED, Efl_Ui_Item_Container_Data *pd) 775_efl_ui_item_container_position_manager_get(const Eo *obj EINA_UNUSED, Efl_Ui_Item_Container_Data *pd)
776{ 776{
777 return pd->pos_man; 777 return pd->pos_man;
diff --git a/src/lib/elementary/efl_ui_item_container.eo b/src/lib/elementary/efl_ui_item_container.eo
index b8c6d48df2..962eb00d19 100644
--- a/src/lib/elementary/efl_ui_item_container.eo
+++ b/src/lib/elementary/efl_ui_item_container.eo
@@ -47,7 +47,7 @@ class @beta Efl.Ui.Item_Container extends Efl.Ui.Layout_Base implements
47 @property position_manager { 47 @property position_manager {
48 [[Position manager object that handles placement of items.]] 48 [[Position manager object that handles placement of items.]]
49 values { 49 values {
50 position_manager : Efl.Ui.Item_Position_Manager @owned; [[The objects ownership is passed to the item container.]] 50 position_manager : Efl.Ui.Position_Manager.Entity @owned; [[The objects ownership is passed to the item container.]]
51 } 51 }
52 } 52 }
53 } 53 }
diff --git a/src/lib/elementary/efl_ui_list_position_manager.eo b/src/lib/elementary/efl_ui_list_position_manager.eo
deleted file mode 100644
index 5c7135b038..0000000000
--- a/src/lib/elementary/efl_ui_list_position_manager.eo
+++ /dev/null
@@ -1,18 +0,0 @@
1class @beta Efl.Ui.List_Position_Manager extends Efl.Object implements Efl.Ui.Item_Position_Manager
2{
3 [[Implementation of Efl.Ui.Item_Position_manager for a list
4
5 Every item in the list will get at least his minsize applied, changes to the misize are listend to and change the layouting of all items. This supports the vertical and horizontal orientation.
6 ]]
7 implements {
8 Efl.Object.destructor;
9 Efl.Ui.Item_Position_Manager.data_access {set;}
10 Efl.Ui.Item_Position_Manager.viewport {set;}
11 Efl.Ui.Item_Position_Manager.scroll_position {set;}
12 Efl.Ui.Item_Position_Manager.item_added;
13 Efl.Ui.Item_Position_Manager.item_removed;
14 Efl.Ui.Item_Position_Manager.position_single_item;
15 Efl.Ui.Item_Position_Manager.item_size_changed;
16 Efl.Ui.Layout_Orientable.orientation {set; get;}
17 }
18}
diff --git a/src/lib/elementary/efl_ui_item_position_manager.c b/src/lib/elementary/efl_ui_position_manager_entity.c
index abd74f0762..110f88457a 100644
--- a/src/lib/elementary/efl_ui_item_position_manager.c
+++ b/src/lib/elementary/efl_ui_position_manager_entity.c
@@ -9,6 +9,6 @@
9#include <Efl_Ui.h> 9#include <Efl_Ui.h>
10#include "elm_priv.h" 10#include "elm_priv.h"
11 11
12#define MY_CLASS EFL_UI_ITEM_POSITION_MANAGER_CLASS 12#define MY_CLASS EFL_UI_POSITION_MANAGER_ENTITY_CLASS
13 13
14#include "efl_ui_item_position_manager.eo.c" 14#include "efl_ui_position_manager_entity.eo.c"
diff --git a/src/lib/elementary/efl_ui_item_position_manager.eo b/src/lib/elementary/efl_ui_position_manager_entity.eo
index c733f376aa..471e5d6086 100644
--- a/src/lib/elementary/efl_ui_item_position_manager.eo
+++ b/src/lib/elementary/efl_ui_position_manager_entity.eo
@@ -1,5 +1,5 @@
1 1
2interface @beta Efl.Ui.Item_Position_Manager extends Efl.Ui.Layout_Orientable 2interface @beta Efl.Ui.Position_Manager.Entity extends Efl.Ui.Layout_Orientable
3{ 3{
4 [[ 4 [[
5 This abstracts the basic placement of items in a not defined form under a viewport. 5 This abstracts the basic placement of items in a not defined form under a viewport.
diff --git a/src/lib/elementary/efl_ui_grid_position_manager.c b/src/lib/elementary/efl_ui_position_manager_grid.c
index f4dfd78c31..1ae249fca1 100644
--- a/src/lib/elementary/efl_ui_grid_position_manager.c
+++ b/src/lib/elementary/efl_ui_position_manager_grid.c
@@ -7,9 +7,9 @@
7#include "elm_widget.h" 7#include "elm_widget.h"
8#include "elm_priv.h" 8#include "elm_priv.h"
9 9
10#define MY_CLASS EFL_UI_GRID_POSITION_MANAGER_CLASS 10#define MY_CLASS EFL_UI_POSITION_MANAGER_GRID_CLASS
11#define MY_DATA_GET(obj, pd) \ 11#define MY_DATA_GET(obj, pd) \
12 Efl_Ui_Grid_Position_Manager_Data *pd = efl_data_scope_get(obj, MY_CLASS); 12 Efl_Ui_Position_Manager_Grid_Data *pd = efl_data_scope_get(obj, MY_CLASS);
13 13
14typedef struct { 14typedef struct {
15 Eina_Accessor *content_acc, *size_acc; 15 Eina_Accessor *content_acc, *size_acc;
@@ -27,10 +27,10 @@ typedef struct {
27 int columns; 27 int columns;
28 int rows; 28 int rows;
29 } current_display_table; 29 } current_display_table;
30} Efl_Ui_Grid_Position_Manager_Data; 30} Efl_Ui_Position_Manager_Grid_Data;
31 31
32static inline void 32static inline void
33vis_change_segment(Efl_Ui_Grid_Position_Manager_Data *pd, int a, int b, Eina_Bool flag) 33vis_change_segment(Efl_Ui_Position_Manager_Grid_Data *pd, int a, int b, Eina_Bool flag)
34{ 34{
35 for (int i = MIN(a, b); i < MAX(a, b); ++i) 35 for (int i = MIN(a, b); i < MAX(a, b); ++i)
36 { 36 {
@@ -45,7 +45,7 @@ vis_change_segment(Efl_Ui_Grid_Position_Manager_Data *pd, int a, int b, Eina_Boo
45} 45}
46 46
47static void 47static void
48_reposition_content(Eo *obj EINA_UNUSED, Efl_Ui_Grid_Position_Manager_Data *pd) 48_reposition_content(Eo *obj EINA_UNUSED, Efl_Ui_Position_Manager_Grid_Data *pd)
49{ 49{
50 Eina_Size2D space_size; 50 Eina_Size2D space_size;
51 int relevant_space_size, relevant_viewport; 51 int relevant_space_size, relevant_viewport;
@@ -121,7 +121,7 @@ _reposition_content(Eo *obj EINA_UNUSED, Efl_Ui_Grid_Position_Manager_Data *pd)
121} 121}
122 122
123static inline void 123static inline void
124_flush_abs_size(Eo *obj, Efl_Ui_Grid_Position_Manager_Data *pd) 124_flush_abs_size(Eo *obj, Efl_Ui_Position_Manager_Grid_Data *pd)
125{ 125{
126 int minor, major; 126 int minor, major;
127 Eina_Size2D vp_size; 127 Eina_Size2D vp_size;
@@ -165,12 +165,12 @@ _flush_abs_size(Eo *obj, Efl_Ui_Grid_Position_Manager_Data *pd)
165 if (vp_size.h != pd->last_viewport_size.h || vp_size.w != pd->last_viewport_size.w) 165 if (vp_size.h != pd->last_viewport_size.h || vp_size.w != pd->last_viewport_size.w)
166 { 166 {
167 pd->last_viewport_size = vp_size; 167 pd->last_viewport_size = vp_size;
168 efl_event_callback_call(obj, EFL_UI_ITEM_POSITION_MANAGER_EVENT_CONTENT_SIZE_CHANGED, &vp_size); 168 efl_event_callback_call(obj, EFL_UI_POSITION_MANAGER_ENTITY_EVENT_CONTENT_SIZE_CHANGED, &vp_size);
169 } 169 }
170} 170}
171 171
172static inline void 172static inline void
173_update_min_size(Eo *obj EINA_UNUSED, Efl_Ui_Grid_Position_Manager_Data *pd, int added_index) 173_update_min_size(Eo *obj EINA_UNUSED, Efl_Ui_Position_Manager_Grid_Data *pd, int added_index)
174{ 174{
175 Eina_Size2D elemsize; 175 Eina_Size2D elemsize;
176 176
@@ -180,7 +180,7 @@ _update_min_size(Eo *obj EINA_UNUSED, Efl_Ui_Grid_Position_Manager_Data *pd, int
180} 180}
181 181
182static inline void 182static inline void
183_flush_min_size(Eo *obj, Efl_Ui_Grid_Position_Manager_Data *pd) 183_flush_min_size(Eo *obj, Efl_Ui_Position_Manager_Grid_Data *pd)
184{ 184{
185 Eina_Size2D min_size = pd->max_min_size; 185 Eina_Size2D min_size = pd->max_min_size;
186 186
@@ -192,12 +192,12 @@ _flush_min_size(Eo *obj, Efl_Ui_Grid_Position_Manager_Data *pd)
192 if (pd->prev_min_size.w != min_size.w || pd->prev_min_size.h != min_size.h) 192 if (pd->prev_min_size.w != min_size.w || pd->prev_min_size.h != min_size.h)
193 { 193 {
194 pd->prev_min_size = min_size; 194 pd->prev_min_size = min_size;
195 efl_event_callback_call(obj, EFL_UI_ITEM_POSITION_MANAGER_EVENT_CONTENT_MIN_SIZE_CHANGED, &min_size); 195 efl_event_callback_call(obj, EFL_UI_POSITION_MANAGER_ENTITY_EVENT_CONTENT_MIN_SIZE_CHANGED, &min_size);
196 } 196 }
197} 197}
198 198
199EOLIAN static void 199EOLIAN static void
200_efl_ui_grid_position_manager_efl_ui_item_position_manager_data_access_set(Eo *obj EINA_UNUSED, Efl_Ui_Grid_Position_Manager_Data *pd, Eina_Accessor *obj_access, Eina_Accessor *size_access, int size) 200_efl_ui_position_manager_grid_efl_ui_position_manager_entity_data_access_set(Eo *obj EINA_UNUSED, Efl_Ui_Position_Manager_Grid_Data *pd, Eina_Accessor *obj_access, Eina_Accessor *size_access, int size)
201{ 201{
202 pd->size_acc = size_access; 202 pd->size_acc = size_access;
203 pd->content_acc = obj_access; 203 pd->content_acc = obj_access;
@@ -205,7 +205,7 @@ _efl_ui_grid_position_manager_efl_ui_item_position_manager_data_access_set(Eo *o
205} 205}
206 206
207EOLIAN static void 207EOLIAN static void
208_efl_ui_grid_position_manager_efl_ui_item_position_manager_viewport_set(Eo *obj EINA_UNUSED, Efl_Ui_Grid_Position_Manager_Data *pd, Eina_Rect viewport) 208_efl_ui_position_manager_grid_efl_ui_position_manager_entity_viewport_set(Eo *obj EINA_UNUSED, Efl_Ui_Position_Manager_Grid_Data *pd, Eina_Rect viewport)
209{ 209{
210 pd->viewport = viewport; 210 pd->viewport = viewport;
211 _flush_abs_size(obj, pd); 211 _flush_abs_size(obj, pd);
@@ -213,7 +213,7 @@ _efl_ui_grid_position_manager_efl_ui_item_position_manager_viewport_set(Eo *obj
213} 213}
214 214
215EOLIAN static void 215EOLIAN static void
216_efl_ui_grid_position_manager_efl_ui_item_position_manager_scroll_position_set(Eo *obj EINA_UNUSED, Efl_Ui_Grid_Position_Manager_Data *pd, double x, double y) 216_efl_ui_position_manager_grid_efl_ui_position_manager_entity_scroll_position_set(Eo *obj EINA_UNUSED, Efl_Ui_Position_Manager_Grid_Data *pd, double x, double y)
217{ 217{
218 pd->scroll_position.x = x; 218 pd->scroll_position.x = x;
219 pd->scroll_position.y = y; 219 pd->scroll_position.y = y;
@@ -221,7 +221,7 @@ _efl_ui_grid_position_manager_efl_ui_item_position_manager_scroll_position_set(E
221} 221}
222 222
223EOLIAN static void 223EOLIAN static void
224_efl_ui_grid_position_manager_efl_ui_item_position_manager_item_added(Eo *obj, Efl_Ui_Grid_Position_Manager_Data *pd, int added_index, Efl_Gfx_Entity *subobj EINA_UNUSED) 224_efl_ui_position_manager_grid_efl_ui_position_manager_entity_item_added(Eo *obj, Efl_Ui_Position_Manager_Grid_Data *pd, int added_index, Efl_Gfx_Entity *subobj EINA_UNUSED)
225{ 225{
226 pd->size ++; 226 pd->size ++;
227 227
@@ -233,7 +233,7 @@ _efl_ui_grid_position_manager_efl_ui_item_position_manager_item_added(Eo *obj, E
233} 233}
234 234
235EOLIAN static void 235EOLIAN static void
236_efl_ui_grid_position_manager_efl_ui_item_position_manager_item_removed(Eo *obj EINA_UNUSED, Efl_Ui_Grid_Position_Manager_Data *pd, int removed_index EINA_UNUSED, Efl_Gfx_Entity *subobj EINA_UNUSED) 236_efl_ui_position_manager_grid_efl_ui_position_manager_entity_item_removed(Eo *obj EINA_UNUSED, Efl_Ui_Position_Manager_Grid_Data *pd, int removed_index EINA_UNUSED, Efl_Gfx_Entity *subobj EINA_UNUSED)
237{ 237{
238 EINA_SAFETY_ON_FALSE_RETURN(pd->size > 0); 238 EINA_SAFETY_ON_FALSE_RETURN(pd->size > 0);
239 pd->size --; 239 pd->size --;
@@ -247,7 +247,7 @@ _efl_ui_grid_position_manager_efl_ui_item_position_manager_item_removed(Eo *obj
247 247
248 248
249EOLIAN static void 249EOLIAN static void
250_efl_ui_grid_position_manager_efl_ui_item_position_manager_item_size_changed(Eo *obj, Efl_Ui_Grid_Position_Manager_Data *pd, int start_id, int end_id) 250_efl_ui_position_manager_grid_efl_ui_position_manager_entity_item_size_changed(Eo *obj, Efl_Ui_Position_Manager_Grid_Data *pd, int start_id, int end_id)
251{ 251{
252 for (int i = start_id; i <= end_id; ++i) 252 for (int i = start_id; i <= end_id; ++i)
253 { 253 {
@@ -260,7 +260,7 @@ _efl_ui_grid_position_manager_efl_ui_item_position_manager_item_size_changed(Eo
260} 260}
261 261
262EOLIAN static void 262EOLIAN static void
263_efl_ui_grid_position_manager_efl_ui_layout_orientable_orientation_set(Eo *obj EINA_UNUSED, Efl_Ui_Grid_Position_Manager_Data *pd, Efl_Ui_Layout_Orientation dir) 263_efl_ui_position_manager_grid_efl_ui_layout_orientable_orientation_set(Eo *obj EINA_UNUSED, Efl_Ui_Position_Manager_Grid_Data *pd, Efl_Ui_Layout_Orientation dir)
264{ 264{
265 pd->dir = dir; 265 pd->dir = dir;
266 _flush_min_size(obj, pd); 266 _flush_min_size(obj, pd);
@@ -270,13 +270,13 @@ _efl_ui_grid_position_manager_efl_ui_layout_orientable_orientation_set(Eo *obj E
270 270
271 271
272EOLIAN static Efl_Ui_Layout_Orientation 272EOLIAN static Efl_Ui_Layout_Orientation
273_efl_ui_grid_position_manager_efl_ui_layout_orientable_orientation_get(const Eo *obj EINA_UNUSED, Efl_Ui_Grid_Position_Manager_Data *pd) 273_efl_ui_position_manager_grid_efl_ui_layout_orientable_orientation_get(const Eo *obj EINA_UNUSED, Efl_Ui_Position_Manager_Grid_Data *pd)
274{ 274{
275 return pd->dir; 275 return pd->dir;
276} 276}
277 277
278EOLIAN static Eina_Rect 278EOLIAN static Eina_Rect
279_efl_ui_grid_position_manager_efl_ui_item_position_manager_position_single_item(Eo *obj EINA_UNUSED, Efl_Ui_Grid_Position_Manager_Data *pd, int idx) 279_efl_ui_position_manager_grid_efl_ui_position_manager_entity_position_single_item(Eo *obj EINA_UNUSED, Efl_Ui_Position_Manager_Grid_Data *pd, int idx)
280{ 280{
281 Eina_Rect geom; 281 Eina_Rect geom;
282 Eina_Size2D space_size; 282 Eina_Size2D space_size;
@@ -318,4 +318,4 @@ _efl_ui_grid_position_manager_efl_ui_item_position_manager_position_single_item(
318 return geom; 318 return geom;
319} 319}
320 320
321#include "efl_ui_grid_position_manager.eo.c" 321#include "efl_ui_position_manager_grid.eo.c"
diff --git a/src/lib/elementary/efl_ui_position_manager_grid.eo b/src/lib/elementary/efl_ui_position_manager_grid.eo
new file mode 100644
index 0000000000..c7aba19da0
--- /dev/null
+++ b/src/lib/elementary/efl_ui_position_manager_grid.eo
@@ -0,0 +1,17 @@
1class @beta Efl.Ui.Position_Manager.Grid extends Efl.Object implements Efl.Ui.Position_Manager.Entity
2{
3 [[Implementation of @Efl.Ui.Position_Manager.Entity for two-dimensional grids.
4
5 Every item in the grid has the same size, which is the biggest minimum size of all items.
6 ]]
7 implements {
8 Efl.Ui.Position_Manager.Entity.data_access {set;}
9 Efl.Ui.Position_Manager.Entity.viewport {set;}
10 Efl.Ui.Position_Manager.Entity.scroll_position {set;}
11 Efl.Ui.Position_Manager.Entity.item_added;
12 Efl.Ui.Position_Manager.Entity.item_removed;
13 Efl.Ui.Position_Manager.Entity.position_single_item;
14 Efl.Ui.Position_Manager.Entity.item_size_changed;
15 Efl.Ui.Layout_Orientable.orientation {set; get;}
16 }
17}
diff --git a/src/lib/elementary/efl_ui_list_position_manager.c b/src/lib/elementary/efl_ui_position_manager_list.c
index 19308fb0fc..c793bd3327 100644
--- a/src/lib/elementary/efl_ui_list_position_manager.c
+++ b/src/lib/elementary/efl_ui_position_manager_list.c
@@ -8,9 +8,9 @@
8#include "elm_widget.h" 8#include "elm_widget.h"
9#include "elm_priv.h" 9#include "elm_priv.h"
10 10
11#define MY_CLASS EFL_UI_LIST_POSITION_MANAGER_CLASS 11#define MY_CLASS EFL_UI_POSITION_MANAGER_LIST_CLASS
12#define MY_DATA_GET(obj, pd) \ 12#define MY_DATA_GET(obj, pd) \
13 Efl_Ui_List_Position_Manager_Data *pd = efl_data_scope_get(obj, MY_CLASS); 13 Efl_Ui_Position_Manager_List_Data *pd = efl_data_scope_get(obj, MY_CLASS);
14 14
15typedef struct { 15typedef struct {
16 Eina_Accessor *content_acc, *size_acc; 16 Eina_Accessor *content_acc, *size_acc;
@@ -26,7 +26,7 @@ typedef struct {
26 struct { 26 struct {
27 unsigned int start_id, end_id; 27 unsigned int start_id, end_id;
28 } prev_run; 28 } prev_run;
29} Efl_Ui_List_Position_Manager_Data; 29} Efl_Ui_Position_Manager_List_Data;
30 30
31/* 31/*
32 * The here used cache is a sum map 32 * The here used cache is a sum map
@@ -37,7 +37,7 @@ typedef struct {
37 */ 37 */
38 38
39static void 39static void
40cache_require(Eo *obj EINA_UNUSED, Efl_Ui_List_Position_Manager_Data *pd) 40cache_require(Eo *obj EINA_UNUSED, Efl_Ui_Position_Manager_List_Data *pd)
41{ 41{
42 unsigned int i; 42 unsigned int i;
43 43
@@ -78,7 +78,7 @@ cache_require(Eo *obj EINA_UNUSED, Efl_Ui_List_Position_Manager_Data *pd)
78} 78}
79 79
80static void 80static void
81cache_invalidate(Eo *obj EINA_UNUSED, Efl_Ui_List_Position_Manager_Data *pd) 81cache_invalidate(Eo *obj EINA_UNUSED, Efl_Ui_Position_Manager_List_Data *pd)
82{ 82{
83 if (pd->size_cache) 83 if (pd->size_cache)
84 free(pd->size_cache); 84 free(pd->size_cache);
@@ -86,14 +86,14 @@ cache_invalidate(Eo *obj EINA_UNUSED, Efl_Ui_List_Position_Manager_Data *pd)
86} 86}
87 87
88static inline int 88static inline int
89cache_access(Eo *obj EINA_UNUSED, Efl_Ui_List_Position_Manager_Data *pd, unsigned int idx) 89cache_access(Eo *obj EINA_UNUSED, Efl_Ui_Position_Manager_List_Data *pd, unsigned int idx)
90{ 90{
91 EINA_SAFETY_ON_FALSE_RETURN_VAL(idx <= pd->size, 0); 91 EINA_SAFETY_ON_FALSE_RETURN_VAL(idx <= pd->size, 0);
92 return pd->size_cache[idx]; 92 return pd->size_cache[idx];
93} 93}
94 94
95static void 95static void
96recalc_absolut_size(Eo *obj, Efl_Ui_List_Position_Manager_Data *pd) 96recalc_absolut_size(Eo *obj, Efl_Ui_Position_Manager_List_Data *pd)
97{ 97{
98 Eina_Size2D min_size = EINA_SIZE2D(-1, -1); 98 Eina_Size2D min_size = EINA_SIZE2D(-1, -1);
99 cache_require(obj, pd); 99 cache_require(obj, pd);
@@ -108,7 +108,7 @@ recalc_absolut_size(Eo *obj, Efl_Ui_List_Position_Manager_Data *pd)
108 pd->abs_size.w = MAX(cache_access(obj, pd, pd->size), pd->abs_size.w); 108 pd->abs_size.w = MAX(cache_access(obj, pd, pd->size), pd->abs_size.w);
109 } 109 }
110 110
111 efl_event_callback_call(obj, EFL_UI_ITEM_POSITION_MANAGER_EVENT_CONTENT_SIZE_CHANGED, &pd->abs_size); 111 efl_event_callback_call(obj, EFL_UI_POSITION_MANAGER_ENTITY_EVENT_CONTENT_SIZE_CHANGED, &pd->abs_size);
112 112
113 if (pd->dir == EFL_UI_LAYOUT_ORIENTATION_VERTICAL) 113 if (pd->dir == EFL_UI_LAYOUT_ORIENTATION_VERTICAL)
114 { 114 {
@@ -119,11 +119,11 @@ recalc_absolut_size(Eo *obj, Efl_Ui_List_Position_Manager_Data *pd)
119 min_size.h = pd->maximum_min_size; 119 min_size.h = pd->maximum_min_size;
120 } 120 }
121 121
122 efl_event_callback_call(obj, EFL_UI_ITEM_POSITION_MANAGER_EVENT_CONTENT_MIN_SIZE_CHANGED, &min_size); 122 efl_event_callback_call(obj, EFL_UI_POSITION_MANAGER_ENTITY_EVENT_CONTENT_MIN_SIZE_CHANGED, &min_size);
123} 123}
124 124
125static inline void 125static inline void
126vis_change_segment(Efl_Ui_List_Position_Manager_Data *pd, int a, int b, Eina_Bool flag) 126vis_change_segment(Efl_Ui_Position_Manager_List_Data *pd, int a, int b, Eina_Bool flag)
127{ 127{
128 for (int i = MIN(a, b); i < MAX(a, b); ++i) 128 for (int i = MIN(a, b); i < MAX(a, b); ++i)
129 { 129 {
@@ -138,7 +138,7 @@ vis_change_segment(Efl_Ui_List_Position_Manager_Data *pd, int a, int b, Eina_Boo
138} 138}
139 139
140static void 140static void
141position_content(Eo *obj EINA_UNUSED, Efl_Ui_List_Position_Manager_Data *pd) 141position_content(Eo *obj EINA_UNUSED, Efl_Ui_Position_Manager_List_Data *pd)
142{ 142{
143 Eina_Rect geom; 143 Eina_Rect geom;
144 Eina_Size2D space_size; 144 Eina_Size2D space_size;
@@ -244,7 +244,7 @@ _rebuild_job_cb(void *data, Eina_Value v EINA_UNUSED, const Eina_Future *f EINA_
244} 244}
245 245
246static void 246static void
247schedule_recalc_absolut_size(Eo *obj, Efl_Ui_List_Position_Manager_Data *pd) 247schedule_recalc_absolut_size(Eo *obj, Efl_Ui_Position_Manager_List_Data *pd)
248{ 248{
249 if (pd->rebuild_absolut_size) return; 249 if (pd->rebuild_absolut_size) return;
250 250
@@ -253,7 +253,7 @@ schedule_recalc_absolut_size(Eo *obj, Efl_Ui_List_Position_Manager_Data *pd)
253} 253}
254 254
255EOLIAN static void 255EOLIAN static void
256_efl_ui_list_position_manager_efl_ui_item_position_manager_data_access_set(Eo *obj EINA_UNUSED, Efl_Ui_List_Position_Manager_Data *pd, Eina_Accessor *content_access, Eina_Accessor *size_access, int size) 256_efl_ui_position_manager_list_efl_ui_position_manager_entity_data_access_set(Eo *obj EINA_UNUSED, Efl_Ui_Position_Manager_List_Data *pd, Eina_Accessor *content_access, Eina_Accessor *size_access, int size)
257{ 257{
258 cache_invalidate(obj, pd); 258 cache_invalidate(obj, pd);
259 pd->content_acc = content_access; 259 pd->content_acc = content_access;
@@ -262,7 +262,7 @@ _efl_ui_list_position_manager_efl_ui_item_position_manager_data_access_set(Eo *o
262} 262}
263 263
264EOLIAN static void 264EOLIAN static void
265_efl_ui_list_position_manager_efl_ui_item_position_manager_viewport_set(Eo *obj, Efl_Ui_List_Position_Manager_Data *pd, Eina_Rect size) 265_efl_ui_position_manager_list_efl_ui_position_manager_entity_viewport_set(Eo *obj, Efl_Ui_Position_Manager_List_Data *pd, Eina_Rect size)
266{ 266{
267 pd->viewport = size; 267 pd->viewport = size;
268 268
@@ -271,7 +271,7 @@ _efl_ui_list_position_manager_efl_ui_item_position_manager_viewport_set(Eo *obj,
271} 271}
272 272
273EOLIAN static void 273EOLIAN static void
274_efl_ui_list_position_manager_efl_ui_item_position_manager_scroll_position_set(Eo *obj, Efl_Ui_List_Position_Manager_Data *pd, double x, double y) 274_efl_ui_position_manager_list_efl_ui_position_manager_entity_scroll_position_set(Eo *obj, Efl_Ui_Position_Manager_List_Data *pd, double x, double y)
275{ 275{
276 pd->scroll_position.x = x; 276 pd->scroll_position.x = x;
277 pd->scroll_position.y = y; 277 pd->scroll_position.y = y;
@@ -279,7 +279,7 @@ _efl_ui_list_position_manager_efl_ui_item_position_manager_scroll_position_set(E
279} 279}
280 280
281EOLIAN static void 281EOLIAN static void
282_efl_ui_list_position_manager_efl_ui_item_position_manager_item_added(Eo *obj EINA_UNUSED, Efl_Ui_List_Position_Manager_Data *pd, int added_index EINA_UNUSED, Efl_Gfx_Entity *subobj) 282_efl_ui_position_manager_list_efl_ui_position_manager_entity_item_added(Eo *obj EINA_UNUSED, Efl_Ui_Position_Manager_List_Data *pd, int added_index EINA_UNUSED, Efl_Gfx_Entity *subobj)
283{ 283{
284 if (pd->size == 0) 284 if (pd->size == 0)
285 { 285 {
@@ -296,7 +296,7 @@ _efl_ui_list_position_manager_efl_ui_item_position_manager_item_added(Eo *obj EI
296} 296}
297 297
298EOLIAN static void 298EOLIAN static void
299_efl_ui_list_position_manager_efl_ui_item_position_manager_item_removed(Eo *obj EINA_UNUSED, Efl_Ui_List_Position_Manager_Data *pd, int removed_index EINA_UNUSED, Efl_Gfx_Entity *subobj) 299_efl_ui_position_manager_list_efl_ui_position_manager_entity_item_removed(Eo *obj EINA_UNUSED, Efl_Ui_Position_Manager_List_Data *pd, int removed_index EINA_UNUSED, Efl_Gfx_Entity *subobj)
300{ 300{
301 pd->size --; 301 pd->size --;
302 if (subobj) 302 if (subobj)
@@ -308,7 +308,7 @@ _efl_ui_list_position_manager_efl_ui_item_position_manager_item_removed(Eo *obj
308} 308}
309 309
310EOLIAN static Eina_Rect 310EOLIAN static Eina_Rect
311_efl_ui_list_position_manager_efl_ui_item_position_manager_position_single_item(Eo *obj, Efl_Ui_List_Position_Manager_Data *pd, int idx) 311_efl_ui_position_manager_list_efl_ui_position_manager_entity_position_single_item(Eo *obj, Efl_Ui_Position_Manager_List_Data *pd, int idx)
312{ 312{
313 Eina_Rect geom; 313 Eina_Rect geom;
314 Eina_Size2D space_size; 314 Eina_Size2D space_size;
@@ -349,14 +349,14 @@ _efl_ui_list_position_manager_efl_ui_item_position_manager_position_single_item(
349} 349}
350 350
351EOLIAN static void 351EOLIAN static void
352_efl_ui_list_position_manager_efl_ui_item_position_manager_item_size_changed(Eo *obj, Efl_Ui_List_Position_Manager_Data *pd, int start_id EINA_UNUSED, int end_id EINA_UNUSED) 352_efl_ui_position_manager_list_efl_ui_position_manager_entity_item_size_changed(Eo *obj, Efl_Ui_Position_Manager_List_Data *pd, int start_id EINA_UNUSED, int end_id EINA_UNUSED)
353{ 353{
354 cache_invalidate(obj, pd); 354 cache_invalidate(obj, pd);
355 schedule_recalc_absolut_size(obj, pd); 355 schedule_recalc_absolut_size(obj, pd);
356} 356}
357 357
358EOLIAN static void 358EOLIAN static void
359_efl_ui_list_position_manager_efl_ui_layout_orientable_orientation_set(Eo *obj EINA_UNUSED, Efl_Ui_List_Position_Manager_Data *pd, Efl_Ui_Layout_Orientation dir) 359_efl_ui_position_manager_list_efl_ui_layout_orientable_orientation_set(Eo *obj EINA_UNUSED, Efl_Ui_Position_Manager_List_Data *pd, Efl_Ui_Layout_Orientation dir)
360{ 360{
361 pd->dir = dir; 361 pd->dir = dir;
362 //in order to reset the state of the visible items, just hide everything and set the old segment accordingly 362 //in order to reset the state of the visible items, just hide everything and set the old segment accordingly
@@ -371,13 +371,13 @@ _efl_ui_list_position_manager_efl_ui_layout_orientable_orientation_set(Eo *obj E
371} 371}
372 372
373EOLIAN static Efl_Ui_Layout_Orientation 373EOLIAN static Efl_Ui_Layout_Orientation
374_efl_ui_list_position_manager_efl_ui_layout_orientable_orientation_get(const Eo *obj EINA_UNUSED, Efl_Ui_List_Position_Manager_Data *pd) 374_efl_ui_position_manager_list_efl_ui_layout_orientable_orientation_get(const Eo *obj EINA_UNUSED, Efl_Ui_Position_Manager_List_Data *pd)
375{ 375{
376 return pd->dir; 376 return pd->dir;
377} 377}
378 378
379EOLIAN static void 379EOLIAN static void
380_efl_ui_list_position_manager_efl_object_destructor(Eo *obj, Efl_Ui_List_Position_Manager_Data *pd) 380_efl_ui_position_manager_list_efl_object_destructor(Eo *obj, Efl_Ui_Position_Manager_List_Data *pd)
381{ 381{
382 if (pd->rebuild_absolut_size) 382 if (pd->rebuild_absolut_size)
383 eina_future_cancel(pd->rebuild_absolut_size); 383 eina_future_cancel(pd->rebuild_absolut_size);
@@ -386,4 +386,4 @@ _efl_ui_list_position_manager_efl_object_destructor(Eo *obj, Efl_Ui_List_Positio
386} 386}
387 387
388 388
389#include "efl_ui_list_position_manager.eo.c" 389#include "efl_ui_position_manager_list.eo.c"
diff --git a/src/lib/elementary/efl_ui_position_manager_list.eo b/src/lib/elementary/efl_ui_position_manager_list.eo
new file mode 100644
index 0000000000..5295612724
--- /dev/null
+++ b/src/lib/elementary/efl_ui_position_manager_list.eo
@@ -0,0 +1,18 @@
1class @beta Efl.Ui.Position_Manager.List extends Efl.Object implements Efl.Ui.Position_Manager.Entity
2{
3 [[Implementation of @Efl.Ui.Position_Manager.Entity for a list
4
5 Every item in the list will get at least his minsize applied, changes to the misize are listend to and change the layouting of all items. This supports the vertical and horizontal orientation.
6 ]]
7 implements {
8 Efl.Object.destructor;
9 Efl.Ui.Position_Manager.Entity.data_access {set;}
10 Efl.Ui.Position_Manager.Entity.viewport {set;}
11 Efl.Ui.Position_Manager.Entity.scroll_position {set;}
12 Efl.Ui.Position_Manager.Entity.item_added;
13 Efl.Ui.Position_Manager.Entity.item_removed;
14 Efl.Ui.Position_Manager.Entity.position_single_item;
15 Efl.Ui.Position_Manager.Entity.item_size_changed;
16 Efl.Ui.Layout_Orientable.orientation {set; get;}
17 }
18}
diff --git a/src/lib/elementary/meson.build b/src/lib/elementary/meson.build
index 47b2f4bcf9..e3bc6024f0 100644
--- a/src/lib/elementary/meson.build
+++ b/src/lib/elementary/meson.build
@@ -182,9 +182,9 @@ pub_eo_files = [
182 'efl_ui_clickable_util.eo', 182 'efl_ui_clickable_util.eo',
183 'efl_ui_format.eo', 183 'efl_ui_format.eo',
184 'efl_ui_item_container.eo', 184 'efl_ui_item_container.eo',
185 'efl_ui_item_position_manager.eo', 185 'efl_ui_position_manager_entity.eo',
186 'efl_ui_list_position_manager.eo', 186 'efl_ui_position_manager_list.eo',
187 'efl_ui_grid_position_manager.eo', 187 'efl_ui_position_manager_grid.eo',
188] 188]
189 189
190foreach eo_file : pub_eo_files 190foreach eo_file : pub_eo_files
@@ -941,9 +941,9 @@ elementary_src = [
941 'efl_ui_format.c', 941 'efl_ui_format.c',
942 'efl_ui_scroll_util.c', 942 'efl_ui_scroll_util.c',
943 'efl_ui_item_container.c', 943 'efl_ui_item_container.c',
944 'efl_ui_item_position_manager.c', 944 'efl_ui_position_manager_entity.c',
945 'efl_ui_list_position_manager.c', 945 'efl_ui_position_manager_list.c',
946 'efl_ui_grid_position_manager.c', 946 'efl_ui_position_manager_grid.c',
947] 947]
948 948
949elementary_deps = [emile, eo, efl, edje, ethumb, ethumb_client, emotion, ecore_imf, ecore_con, eldbus, efreet, efreet_mime, efreet_trash, eio, atspi, dl, intl] 949elementary_deps = [emile, eo, efl, edje, ethumb, ethumb_client, emotion, ecore_imf, ecore_con, eldbus, efreet, efreet_mime, efreet_trash, eio, atspi, dl, intl]
diff --git a/src/tests/elementary/efl_ui_test_grid_container.c b/src/tests/elementary/efl_ui_test_grid_container.c
index 26549e9893..61776237cb 100644
--- a/src/tests/elementary/efl_ui_test_grid_container.c
+++ b/src/tests/elementary/efl_ui_test_grid_container.c
@@ -11,8 +11,8 @@ static Eo *win;
11static void 11static void
12item_container_setup() 12item_container_setup()
13{ 13{
14 Eo * list = efl_new(EFL_UI_GRID_POSITION_MANAGER_CLASS); 14 Eo * list = efl_new(EFL_UI_POSITION_MANAGER_GRID_CLASS);
15 position_manager = efl_new(EFL_UI_GRID_POSITION_MANAGER_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_ITEM_CONTAINER_CLASS, win,
18 efl_ui_item_container_position_manager_set(efl_added, list)); 18 efl_ui_item_container_position_manager_set(efl_added, list));
diff --git a/src/tests/elementary/efl_ui_test_item_container.c b/src/tests/elementary/efl_ui_test_item_container.c
index fbca2f7f85..9b3de482b3 100644
--- a/src/tests/elementary/efl_ui_test_item_container.c
+++ b/src/tests/elementary/efl_ui_test_item_container.c
@@ -22,8 +22,8 @@ item_container_teardown()
22 22
23EFL_START_TEST(finalizer_check) 23EFL_START_TEST(finalizer_check)
24{ 24{
25 Eo *grid = efl_new(EFL_UI_GRID_POSITION_MANAGER_CLASS); 25 Eo *grid = efl_new(EFL_UI_POSITION_MANAGER_GRID_CLASS);
26 Eo *list = efl_new(EFL_UI_GRID_POSITION_MANAGER_CLASS); 26 Eo *list = efl_new(EFL_UI_POSITION_MANAGER_GRID_CLASS);
27 Eo *random_obj = efl_add(EFL_UI_BUTTON_CLASS, win); 27 Eo *random_obj = efl_add(EFL_UI_BUTTON_CLASS, win);
28 Eo *o; 28 Eo *o;
29 29
diff --git a/src/tests/elementary/efl_ui_test_list_container.c b/src/tests/elementary/efl_ui_test_list_container.c
index 85208a8de1..74a41bacaa 100644
--- a/src/tests/elementary/efl_ui_test_list_container.c
+++ b/src/tests/elementary/efl_ui_test_list_container.c
@@ -11,8 +11,8 @@ static Eo *win;
11static void 11static void
12item_container_setup() 12item_container_setup()
13{ 13{
14 Eo * list = efl_new(EFL_UI_LIST_POSITION_MANAGER_CLASS); 14 Eo * list = efl_new(EFL_UI_POSITION_MANAGER_LIST_CLASS);
15 position_manager = efl_new(EFL_UI_LIST_POSITION_MANAGER_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_ITEM_CONTAINER_CLASS, win,
18 efl_ui_item_container_position_manager_set(efl_added, list)); 18 efl_ui_item_container_position_manager_set(efl_added, list));
diff --git a/src/tests/elementary/efl_ui_test_position_manager_common.c b/src/tests/elementary/efl_ui_test_position_manager_common.c
index 0aba08b147..e465bd3482 100644
--- a/src/tests/elementary/efl_ui_test_position_manager_common.c
+++ b/src/tests/elementary/efl_ui_test_position_manager_common.c
@@ -71,7 +71,7 @@ _initial_setup(void)
71 inner_size_acc.lock = _lock_cb; 71 inner_size_acc.lock = _lock_cb;
72 inner_size_acc.clone = _clone_cb; 72 inner_size_acc.clone = _clone_cb;
73 73
74 efl_ui_item_position_manager_data_access_set(position_manager, 74 efl_ui_position_manager_entity_data_access_set(position_manager,
75 eina_array_accessor_new(arr_obj), 75 eina_array_accessor_new(arr_obj),
76 &inner_size_acc, 0); 76 &inner_size_acc, 0);
77} 77}
@@ -87,7 +87,7 @@ _add_item(Eo *obj, Eina_Size2D size)
87 eina_inarray_push(arr_size, &size); 87 eina_inarray_push(arr_size, &size);
88 88
89 89
90 efl_ui_item_position_manager_item_added(position_manager, idx, obj); 90 efl_ui_position_manager_entity_item_added(position_manager, idx, obj);
91 91
92 return idx; 92 return idx;
93} 93}
@@ -122,15 +122,15 @@ EFL_START_TEST(no_crash1)
122 _initial_setup(); 122 _initial_setup();
123 123
124 //try to resize the viewport while we have no item 124 //try to resize the viewport while we have no item
125 efl_ui_item_position_manager_viewport_set(position_manager, EINA_RECT(20, 20, 200, 200)); 125 efl_ui_position_manager_entity_viewport_set(position_manager, EINA_RECT(20, 20, 200, 200));
126 _iterate_a_few(); 126 _iterate_a_few();
127 efl_ui_item_position_manager_viewport_set(position_manager, EINA_RECT(20, 20, 0, 0)); 127 efl_ui_position_manager_entity_viewport_set(position_manager, EINA_RECT(20, 20, 0, 0));
128 _iterate_a_few(); 128 _iterate_a_few();
129 _add_item(efl_add(EFL_UI_GRID_DEFAULT_ITEM_CLASS, win), EINA_SIZE2D(20, 20)); 129 _add_item(efl_add(EFL_UI_GRID_DEFAULT_ITEM_CLASS, win), EINA_SIZE2D(20, 20));
130 _iterate_a_few(); 130 _iterate_a_few();
131 efl_ui_item_position_manager_viewport_set(position_manager, EINA_RECT(20, 20, 200, 200)); 131 efl_ui_position_manager_entity_viewport_set(position_manager, EINA_RECT(20, 20, 200, 200));
132 _iterate_a_few(); 132 _iterate_a_few();
133 efl_ui_item_position_manager_viewport_set(position_manager, EINA_RECT(20, 20, 0, 0)); 133 efl_ui_position_manager_entity_viewport_set(position_manager, EINA_RECT(20, 20, 0, 0));
134 _iterate_a_few(); 134 _iterate_a_few();
135} 135}
136EFL_END_TEST 136EFL_END_TEST
@@ -140,15 +140,15 @@ EFL_START_TEST(no_crash2)
140 _initial_setup(); 140 _initial_setup();
141 141
142 //try to resize the viewport while we have no item 142 //try to resize the viewport while we have no item
143 efl_ui_item_position_manager_viewport_set(position_manager, EINA_RECT(20, 20, 200, 200)); 143 efl_ui_position_manager_entity_viewport_set(position_manager, EINA_RECT(20, 20, 200, 200));
144 _iterate_a_few(); 144 _iterate_a_few();
145 efl_ui_item_position_manager_viewport_set(position_manager, EINA_RECT(20, 20, 0, 0)); 145 efl_ui_position_manager_entity_viewport_set(position_manager, EINA_RECT(20, 20, 0, 0));
146 _iterate_a_few(); 146 _iterate_a_few();
147 _add_item(NULL, EINA_SIZE2D(20, 20)); 147 _add_item(NULL, EINA_SIZE2D(20, 20));
148 _iterate_a_few(); 148 _iterate_a_few();
149 efl_ui_item_position_manager_viewport_set(position_manager, EINA_RECT(20, 20, 0, 0)); 149 efl_ui_position_manager_entity_viewport_set(position_manager, EINA_RECT(20, 20, 0, 0));
150 _iterate_a_few(); 150 _iterate_a_few();
151 efl_ui_item_position_manager_viewport_set(position_manager, EINA_RECT(20, 20, 200, 200)); 151 efl_ui_position_manager_entity_viewport_set(position_manager, EINA_RECT(20, 20, 200, 200));
152 _iterate_a_few(); 152 _iterate_a_few();
153 _update_item(0, efl_add(EFL_UI_GRID_DEFAULT_ITEM_CLASS, win), EINA_SIZE2D(20, 20)); 153 _update_item(0, efl_add(EFL_UI_GRID_DEFAULT_ITEM_CLASS, win), EINA_SIZE2D(20, 20));
154 _iterate_a_few(); 154 _iterate_a_few();
@@ -166,14 +166,14 @@ EFL_START_TEST(viewport_newsize_event_result)
166{ 166{
167 Eina_Size2D size = EINA_SIZE2D(-2, -2), min_size = EINA_SIZE2D(-2, -2); 167 Eina_Size2D size = EINA_SIZE2D(-2, -2), min_size = EINA_SIZE2D(-2, -2);
168 efl_event_callback_add(position_manager, 168 efl_event_callback_add(position_manager,
169 EFL_UI_ITEM_POSITION_MANAGER_EVENT_CONTENT_SIZE_CHANGED, _content_size_cb, &size); 169 EFL_UI_POSITION_MANAGER_ENTITY_EVENT_CONTENT_SIZE_CHANGED, _content_size_cb, &size);
170 efl_event_callback_add(position_manager, 170 efl_event_callback_add(position_manager,
171 EFL_UI_ITEM_POSITION_MANAGER_EVENT_CONTENT_MIN_SIZE_CHANGED, _content_size_cb, &min_size); 171 EFL_UI_POSITION_MANAGER_ENTITY_EVENT_CONTENT_MIN_SIZE_CHANGED, _content_size_cb, &min_size);
172 _initial_setup(); 172 _initial_setup();
173 _add_item(efl_add(EFL_UI_GRID_DEFAULT_ITEM_CLASS, win), EINA_SIZE2D(20, 20)); 173 _add_item(efl_add(EFL_UI_GRID_DEFAULT_ITEM_CLASS, win), EINA_SIZE2D(20, 20));
174 _add_item(efl_add(EFL_UI_GRID_DEFAULT_ITEM_CLASS, win), EINA_SIZE2D(20, 30)); 174 _add_item(efl_add(EFL_UI_GRID_DEFAULT_ITEM_CLASS, win), EINA_SIZE2D(20, 30));
175 175
176 efl_ui_item_position_manager_viewport_set(position_manager, EINA_RECT(0, 0, 200, 200)); 176 efl_ui_position_manager_entity_viewport_set(position_manager, EINA_RECT(0, 0, 200, 200));
177 _iterate_a_few(); 177 _iterate_a_few();
178 178
179 ck_assert_int_ne(size.w, -2); 179 ck_assert_int_ne(size.w, -2);
diff --git a/src/tests/elementary/spec/efl_ui_spec_suite.c b/src/tests/elementary/spec/efl_ui_spec_suite.c
index c20d974465..bf26623a08 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_LIST_POSITION_MANAGER_CLASS)); 16 efl_ui_item_container_position_manager_set(obj, efl_new(EFL_UI_POSITION_MANAGER_LIST_CLASS));
17 17
18 return obj; 18 return obj;
19} 19}