bu5hm4n pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=fa0fb44d09755d439ae0ebc092448bf920b7e4aa

commit fa0fb44d09755d439ae0ebc092448bf920b7e4aa
Author: Cedric BAIL <cedric.b...@free.fr>
Date:   Thu Jan 2 12:10:56 2020 -0800

    elementary: make focus manager update_children and update_order an internal 
function to not expose list<>.
    
    Reviewed-by: Daniel Kolesa <dan...@octaforge.org>
    Reviewed-by: Marcel Hollerbach <m...@marcel-hollerbach.de>
    Differential Revision: https://phab.enlightenment.org/D11045
---
 src/lib/elementary/efl_ui_focus_manager_calc.c  | 22 +++++++++++++++++++++-
 src/lib/elementary/efl_ui_focus_manager_calc.eo | 19 -------------------
 src/lib/elementary/elm_priv.h                   |  4 ++++
 src/tests/elementary/efl_ui_test_focus_common.h |  2 ++
 4 files changed, 27 insertions(+), 20 deletions(-)

diff --git a/src/lib/elementary/efl_ui_focus_manager_calc.c 
b/src/lib/elementary/efl_ui_focus_manager_calc.c
index 7be3913474..9c104ab7a9 100644
--- a/src/lib/elementary/efl_ui_focus_manager_calc.c
+++ b/src/lib/elementary/efl_ui_focus_manager_calc.c
@@ -2061,7 +2061,27 @@ 
_efl_ui_focus_manager_calc_efl_ui_focus_manager_dirty_logic_unfreeze(Eo *obj, Ef
     }
 }
 
+static void
+_efl_ui_focus_manager_calc_update_children_ownership_fallback(Efl_Ui_Focus_Object
 *parent, Eina_List *children)
+{
+   (void)parent;
+   eina_list_free(children);
+}
+
+EOAPI EFL_FUNC_BODYV_FALLBACK(efl_ui_focus_manager_calc_update_children, 
Eina_Bool, 0, 
_efl_ui_focus_manager_calc_update_children_ownership_fallback(parent, 
children);, EFL_FUNC_CALL(parent, children), Efl_Ui_Focus_Object *parent, 
Eina_List *children);
+
+static void
+_efl_ui_focus_manager_calc_update_order_ownership_fallback(Efl_Ui_Focus_Object 
*parent, Eina_List *children)
+{
+   (void)parent;
+   eina_list_free(children);
+}
+
+EOAPI EFL_VOID_FUNC_BODYV_FALLBACK(efl_ui_focus_manager_calc_update_order, 
_efl_ui_focus_manager_calc_update_order_ownership_fallback(parent, children);, 
EFL_FUNC_CALL(parent, children), Efl_Ui_Focus_Object *parent, Eina_List 
*children);
+
 #define EFL_UI_FOCUS_MANAGER_CALC_EXTRA_OPS \
-   EFL_OBJECT_OP_FUNC(efl_dbg_info_get, 
_efl_ui_focus_manager_calc_efl_object_dbg_info_get)
+  EFL_OBJECT_OP_FUNC(efl_dbg_info_get, 
_efl_ui_focus_manager_calc_efl_object_dbg_info_get), \
+  EFL_OBJECT_OP_FUNC(efl_ui_focus_manager_calc_update_children, 
_efl_ui_focus_manager_calc_update_children), \
+  EFL_OBJECT_OP_FUNC(efl_ui_focus_manager_calc_update_order, 
_efl_ui_focus_manager_calc_update_order)
 
 #include "efl_ui_focus_manager_calc.eo.c"
diff --git a/src/lib/elementary/efl_ui_focus_manager_calc.eo 
b/src/lib/elementary/efl_ui_focus_manager_calc.eo
index cd9ad90fa5..ed86b7b05c 100644
--- a/src/lib/elementary/efl_ui_focus_manager_calc.eo
+++ b/src/lib/elementary/efl_ui_focus_manager_calc.eo
@@ -55,25 +55,6 @@ class @beta Efl.Ui.Focus.Manager_Calc extends Efl.Object 
implements Efl.Ui.Focus
             }
             return : bool; [[$true if successful, $false otherwise.]]
         }
-        update_children {
-            [[Sets the list of children to a different order.]]
-            params {
-                parent : Efl.Ui.Focus.Object; [[The parent to update.]]
-                children : list<Efl.Ui.Focus.Object> @move; [[The list of 
children with the new order.]]
-            }
-            return : bool; [[$true if successful, $false otherwise.]]
-        }
-        update_order {
-            [[Sets the list of children to a different order.
-
-              Objects in the list which are not children of $parent are 
ignored.
-              Compare to @.update_children.
-            ]]
-            params {
-                parent : Efl.Ui.Focus.Object; [[The parent to update.]]
-                children : list<Efl.Ui.Focus.Object> @move; [[The list of 
objects with the new order.]]
-            }
-        }
         unregister {
             [[Unregister the given item from the focus graph.]]
             params {
diff --git a/src/lib/elementary/elm_priv.h b/src/lib/elementary/elm_priv.h
index 5aa18c3e62..87e6bdb0bf 100644
--- a/src/lib/elementary/elm_priv.h
+++ b/src/lib/elementary/elm_priv.h
@@ -852,6 +852,10 @@ void                 _elm_win_wl_cursor_set(Evas_Object 
*obj, const char *cursor
 void _efl_ui_focus_manager_redirect_events_del(Efl_Ui_Focus_Manager *manager, 
Eo *obj);
 void _efl_ui_focus_manager_redirect_events_add(Efl_Ui_Focus_Manager *manager, 
Eo *obj);
 
+EOAPI Eina_Bool efl_ui_focus_manager_calc_update_children(Eo *obj, 
Efl_Ui_Focus_Object *parent, Eina_List *children EFL_TRANSFER_OWNERSHIP);
+EOAPI void efl_ui_focus_manager_calc_update_order(Eo *obj, Efl_Ui_Focus_Object 
*parent, Eina_List *children EFL_TRANSFER_OWNERSHIP);
+
+
 void _efl_access_shutdown(void);
 
 /* Combobox: no proper support for Efl.Part API yet. */
diff --git a/src/tests/elementary/efl_ui_test_focus_common.h 
b/src/tests/elementary/efl_ui_test_focus_common.h
index ceda6a0074..bf6cf44cb0 100644
--- a/src/tests/elementary/efl_ui_test_focus_common.h
+++ b/src/tests/elementary/efl_ui_test_focus_common.h
@@ -16,6 +16,8 @@
   Efl_Ui_Focus_Object* name; \
   name = focus_test_object_new("" #name "",x, y, w, h); \
 
+/* This is an internal function at the moment, but an exported symbol and can 
be used by tests */
+Eina_Bool efl_ui_focus_manager_calc_update_children(Eo *obj, 
Efl_Ui_Focus_Object *parent, Eina_List *children EFL_TRANSFER_OWNERSHIP);
 
 Efl_Ui_Focus_Object* focus_test_object_new(const char *name, int x, int y, int 
w, int h);
 

-- 


Reply via email to