summaryrefslogtreecommitdiff
path: root/src/tests
diff options
context:
space:
mode:
authorMarcel Hollerbach <mail@marcel-hollerbach.de>2019-08-16 14:06:46 +0200
committerMarcel Hollerbach <mail@marcel-hollerbach.de>2019-08-21 07:50:50 +0200
commite2b859bdaeabb29b8cadfab3083faee66858a40d (patch)
treeab52c0ce272c7590032609e65497ec98a7d4517b /src/tests
parentf0b24631c0b50476628a932925781bfae4773d7b (diff)
efl_ui_position_manager: pass on information about group ids
every batched call will now contain the id of the first item, if the conditions in the documentation are met. ref T8115 Reviewed-by: Cedric BAIL <cedric.bail@free.fr> Differential Revision: https://phab.enlightenment.org/D9586
Diffstat (limited to 'src/tests')
-rw-r--r--src/tests/elementary/efl_ui_test_position_manager_common.c25
1 files changed, 17 insertions, 8 deletions
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 ea89662837..5901424dc1 100644
--- a/src/tests/elementary/efl_ui_test_position_manager_common.c
+++ b/src/tests/elementary/efl_ui_test_position_manager_common.c
@@ -25,33 +25,42 @@ item_container_teardown()
25 win = NULL; 25 win = NULL;
26} 26}
27 27
28static int 28static Efl_Ui_Position_Manager_Batch_Result
29_size_accessor_get_at(void *data EINA_UNUSED, int start_id, Eina_Rw_Slice memory) 29_size_accessor_get_at(void *data EINA_UNUSED, int start_id, Eina_Rw_Slice memory)
30{ 30{
31 int i; 31 int i;
32 Efl_Ui_Position_Manager_Batch_Size_Access *sizes = memory.mem;
33 Efl_Ui_Position_Manager_Batch_Result result;
32 34
33 for (i = start_id; i < (int)(MIN(start_id + memory.len, eina_inarray_count(arr_size))); ++i) 35 for (i = start_id; i < (int)(MIN(start_id + memory.len, eina_inarray_count(arr_size))); ++i)
34 { 36 {
35 Eina_Size2D *size = eina_inarray_nth(arr_size, i); 37 Eina_Size2D *size = eina_inarray_nth(arr_size, i);
36 38
37 ((Eina_Size2D*)memory.mem)[i - start_id] = *size; 39 sizes[i - start_id].size = *size;
40 sizes[i - start_id].group = 0;
38 } 41 }
39 return i - start_id; 42 result.filled_items = i - start_id;
43 result.group_id = -1;
44 return result;
40} 45}
41 46
42static int 47static Efl_Ui_Position_Manager_Batch_Result
43_obj_accessor_get_at(void *data EINA_UNUSED, int start_id, Eina_Rw_Slice memory) 48_obj_accessor_get_at(void *data EINA_UNUSED, int start_id, Eina_Rw_Slice memory)
44{ 49{
45 int i; 50 int i;
51 Efl_Ui_Position_Manager_Batch_Entity_Access *objs = memory.mem;
52 Efl_Ui_Position_Manager_Batch_Result result;
46 53
47 for (i = start_id; i < (int)(MIN(start_id + memory.len, eina_array_count(arr_obj))); ++i) 54 for (i = start_id; i < (int)(MIN(start_id + memory.len, eina_array_count(arr_obj))); ++i)
48 { 55 {
49 Efl_Gfx_Entity *geom = eina_array_data_get(arr_obj, i); 56 Efl_Gfx_Entity *geom = eina_array_data_get(arr_obj, i);
50 57
51 ((Efl_Gfx_Entity**)memory.mem)[i - start_id] = geom; 58 objs[i - start_id].entity = geom;
59 objs[i - start_id].group = 0;
52 } 60 }
53 61 result.filled_items = i - start_id;
54 return i - start_id; 62 result.group_id = -1;
63 return result;
55} 64}
56static void 65static void
57_initial_setup(void) 66_initial_setup(void)