summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/lib/elementary/efl_ui_position_manager_grid.c18
-rw-r--r--src/lib/elementary/efl_ui_position_manager_grid.eo1
-rw-r--r--src/lib/elementary/efl_ui_position_manager_list.c15
-rw-r--r--src/lib/elementary/efl_ui_position_manager_list.eo2
4 files changed, 33 insertions, 3 deletions
diff --git a/src/lib/elementary/efl_ui_position_manager_grid.c b/src/lib/elementary/efl_ui_position_manager_grid.c
index dc863d0d5f..fee0855ec6 100644
--- a/src/lib/elementary/efl_ui_position_manager_grid.c
+++ b/src/lib/elementary/efl_ui_position_manager_grid.c
@@ -766,7 +766,16 @@ _efl_ui_position_manager_grid_efl_ui_position_manager_entity_version(Eo *obj EIN
766EOLIAN static void 766EOLIAN static void
767_efl_ui_position_manager_grid_efl_ui_position_manager_data_access_v1_data_access_set(Eo *obj, Efl_Ui_Position_Manager_Grid_Data *pd, void *obj_access_data, Efl_Ui_Position_Manager_Object_Batch_Callback obj_access, Eina_Free_Cb obj_access_free_cb, void *size_access_data, Efl_Ui_Position_Manager_Size_Batch_Callback size_access, Eina_Free_Cb size_access_free_cb, int size) 767_efl_ui_position_manager_grid_efl_ui_position_manager_data_access_v1_data_access_set(Eo *obj, Efl_Ui_Position_Manager_Grid_Data *pd, void *obj_access_data, Efl_Ui_Position_Manager_Object_Batch_Callback obj_access, Eina_Free_Cb obj_access_free_cb, void *size_access_data, Efl_Ui_Position_Manager_Size_Batch_Callback size_access, Eina_Free_Cb size_access_free_cb, int size)
768{ 768{
769 // Cleanup cache first
769 _group_cache_invalidate(obj, pd); 770 _group_cache_invalidate(obj, pd);
771
772 // Clean callback if they were set
773 if (pd->callbacks.object.free_cb)
774 pd->callbacks.object.free_cb(pd->callbacks.object.data);
775 if (pd->callbacks.size.free_cb)
776 pd->callbacks.size.free_cb(pd->callbacks.size.data);
777
778 // Set them
770 pd->callbacks.object.data = obj_access_data; 779 pd->callbacks.object.data = obj_access_data;
771 pd->callbacks.object.access = obj_access; 780 pd->callbacks.object.access = obj_access;
772 pd->callbacks.object.free_cb = obj_access_free_cb; 781 pd->callbacks.object.free_cb = obj_access_free_cb;
@@ -779,6 +788,15 @@ _efl_ui_position_manager_grid_efl_ui_position_manager_data_access_v1_data_access
779 788
780} 789}
781 790
791EOLIAN static void
792_efl_ui_position_manager_grid_efl_object_invalidate(Eo *obj,
793 Efl_Ui_Position_Manager_Grid_Data *pd EINA_UNUSED)
794{
795 efl_ui_position_manager_data_access_v1_data_access_set(obj, NULL, NULL, NULL, NULL, NULL, NULL, 0);
796
797 efl_invalidate(efl_super(obj, EFL_UI_POSITION_MANAGER_GRID_CLASS));
798}
799
782EOLIAN static Efl_Object* 800EOLIAN static Efl_Object*
783_efl_ui_position_manager_grid_efl_object_finalize(Eo *obj, Efl_Ui_Position_Manager_Grid_Data *pd) 801_efl_ui_position_manager_grid_efl_object_finalize(Eo *obj, Efl_Ui_Position_Manager_Grid_Data *pd)
784{ 802{
diff --git a/src/lib/elementary/efl_ui_position_manager_grid.eo b/src/lib/elementary/efl_ui_position_manager_grid.eo
index 0af0270545..91deee348e 100644
--- a/src/lib/elementary/efl_ui_position_manager_grid.eo
+++ b/src/lib/elementary/efl_ui_position_manager_grid.eo
@@ -18,5 +18,6 @@ class @beta Efl.Ui.Position_Manager.Grid extends Efl.Object
18 Efl.Ui.Layout_Orientable.orientation {set; get;} 18 Efl.Ui.Layout_Orientable.orientation {set; get;}
19 Efl.Ui.Position_Manager.Data_Access_V1.data_access {set;} 19 Efl.Ui.Position_Manager.Data_Access_V1.data_access {set;}
20 Efl.Object.finalize; 20 Efl.Object.finalize;
21 Efl.Object.invalidate;
21 } 22 }
22} 23}
diff --git a/src/lib/elementary/efl_ui_position_manager_list.c b/src/lib/elementary/efl_ui_position_manager_list.c
index 5a159f308c..706fce768b 100644
--- a/src/lib/elementary/efl_ui_position_manager_list.c
+++ b/src/lib/elementary/efl_ui_position_manager_list.c
@@ -480,12 +480,14 @@ _efl_ui_position_manager_list_efl_ui_layout_orientable_orientation_get(const Eo
480} 480}
481 481
482EOLIAN static void 482EOLIAN static void
483_efl_ui_position_manager_list_efl_object_destructor(Eo *obj, Efl_Ui_Position_Manager_List_Data *pd) 483_efl_ui_position_manager_list_efl_object_invalidate(Eo *obj, Efl_Ui_Position_Manager_List_Data *pd)
484{ 484{
485 if (pd->rebuild_absolut_size) 485 if (pd->rebuild_absolut_size)
486 eina_future_cancel(pd->rebuild_absolut_size); 486 eina_future_cancel(pd->rebuild_absolut_size);
487 487
488 efl_destructor(efl_super(obj, MY_CLASS)); 488 efl_ui_position_manager_data_access_v1_data_access_set(obj, NULL, NULL, NULL, NULL, NULL, NULL, 0);
489
490 efl_invalidate(efl_super(obj, MY_CLASS));
489} 491}
490 492
491EOLIAN static int 493EOLIAN static int
@@ -524,7 +526,16 @@ _efl_ui_position_manager_list_efl_ui_position_manager_entity_version(Eo *obj EIN
524EOLIAN static void 526EOLIAN static void
525_efl_ui_position_manager_list_efl_ui_position_manager_data_access_v1_data_access_set(Eo *obj, Efl_Ui_Position_Manager_List_Data *pd, void *obj_access_data, Efl_Ui_Position_Manager_Object_Batch_Callback obj_access, Eina_Free_Cb obj_access_free_cb, void *size_access_data, Efl_Ui_Position_Manager_Size_Batch_Callback size_access, Eina_Free_Cb size_access_free_cb, int size) 527_efl_ui_position_manager_list_efl_ui_position_manager_data_access_v1_data_access_set(Eo *obj, Efl_Ui_Position_Manager_List_Data *pd, void *obj_access_data, Efl_Ui_Position_Manager_Object_Batch_Callback obj_access, Eina_Free_Cb obj_access_free_cb, void *size_access_data, Efl_Ui_Position_Manager_Size_Batch_Callback size_access, Eina_Free_Cb size_access_free_cb, int size)
526{ 528{
529 // Cleanup cache first
527 cache_invalidate(obj, pd); 530 cache_invalidate(obj, pd);
531
532 // Clean callback if they were set
533 if (pd->callbacks.object.free_cb)
534 pd->callbacks.object.free_cb(pd->callbacks.object.data);
535 if (pd->callbacks.size.free_cb)
536 pd->callbacks.size.free_cb(pd->callbacks.size.data);
537
538 // Set them
528 pd->callbacks.object.data = obj_access_data; 539 pd->callbacks.object.data = obj_access_data;
529 pd->callbacks.object.access = obj_access; 540 pd->callbacks.object.access = obj_access;
530 pd->callbacks.object.free_cb = obj_access_free_cb; 541 pd->callbacks.object.free_cb = obj_access_free_cb;
diff --git a/src/lib/elementary/efl_ui_position_manager_list.eo b/src/lib/elementary/efl_ui_position_manager_list.eo
index 0f66b0a282..3d80b201d4 100644
--- a/src/lib/elementary/efl_ui_position_manager_list.eo
+++ b/src/lib/elementary/efl_ui_position_manager_list.eo
@@ -8,7 +8,7 @@ class @beta Efl.Ui.Position_Manager.List extends Efl.Object
8 the layout of all items. This supports the vertical and horizontal orientation. 8 the layout of all items. This supports the vertical and horizontal orientation.
9 ]] 9 ]]
10 implements { 10 implements {
11 Efl.Object.destructor; 11 Efl.Object.invalidate;
12 Efl.Ui.Position_Manager.Entity.version; 12 Efl.Ui.Position_Manager.Entity.version;
13 Efl.Ui.Position_Manager.Entity.viewport {set;} 13 Efl.Ui.Position_Manager.Entity.viewport {set;}
14 Efl.Ui.Position_Manager.Entity.scroll_position {set;} 14 Efl.Ui.Position_Manager.Entity.scroll_position {set;}