summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCedric BAIL <cedric.bail@free.fr>2020-01-02 12:10:56 -0800
committerMarcel Hollerbach <mail@marcel-hollerbach.de>2020-01-30 17:06:21 +0100
commitfa0fb44d09755d439ae0ebc092448bf920b7e4aa (patch)
tree82df2f3bd2a080cb525c282f495fdd8e88f90cad
parent81cbe8bdc80084433cefec4896734ce32fdfc379 (diff)
downloadefl-fa0fb44d09755d439ae0ebc092448bf920b7e4aa.tar.gz
elementary: make focus manager update_children and update_order an internal function to not expose list<>.
Reviewed-by: Daniel Kolesa <daniel@octaforge.org> Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de> Differential Revision: https://phab.enlightenment.org/D11045
-rw-r--r--src/lib/elementary/efl_ui_focus_manager_calc.c22
-rw-r--r--src/lib/elementary/efl_ui_focus_manager_calc.eo19
-rw-r--r--src/lib/elementary/elm_priv.h4
-rw-r--r--src/tests/elementary/efl_ui_test_focus_common.h2
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);