From 178b363bac45bc89fbde8e8692ea9b8aecccbe80 Mon Sep 17 00:00:00 2001 From: Marcel Hollerbach Date: Sun, 30 Apr 2017 11:36:19 +0200 Subject: [PATCH] efl_ui_focus_manager: specify the event in the same way evas does --- src/lib/elementary/efl_ui_focus_manager.c | 4 ++-- src/lib/elementary/efl_ui_focus_manager.eo | 2 +- src/lib/elementary/efl_ui_focus_manager_sub.c | 2 +- src/lib/elementary/elm_main.c | 4 ++-- src/tests/elementary/elm_test_focus_sub.c | 12 ++++++------ 5 files changed, 12 insertions(+), 12 deletions(-) diff --git a/src/lib/elementary/efl_ui_focus_manager.c b/src/lib/elementary/efl_ui_focus_manager.c index 14b060b..00741e7 100644 --- a/src/lib/elementary/efl_ui_focus_manager.c +++ b/src/lib/elementary/efl_ui_focus_manager.c @@ -434,7 +434,7 @@ dirty_flush(Efl_Ui_Focus_Manager *obj, Efl_Ui_Focus_Manager_Data *pd, Node *node { if (!eina_list_data_find(pd->dirty, node)) return; - efl_event_callback_call(obj, EFL_UI_FOCUS_MANAGER_EVENT_PRE_FLUSH, NULL); + efl_event_callback_call(obj, EFL_UI_FOCUS_MANAGER_EVENT_FLUSH_PRE, NULL); pd->dirty = eina_list_remove(pd->dirty, node); @@ -446,7 +446,7 @@ dirty_flush_all(Efl_Ui_Focus_Manager *obj, Efl_Ui_Focus_Manager_Data *pd) { Node *node; - efl_event_callback_call(obj, EFL_UI_FOCUS_MANAGER_EVENT_PRE_FLUSH, NULL); + efl_event_callback_call(obj, EFL_UI_FOCUS_MANAGER_EVENT_FLUSH_PRE, NULL); EINA_LIST_FREE(pd->dirty, node) { diff --git a/src/lib/elementary/efl_ui_focus_manager.eo b/src/lib/elementary/efl_ui_focus_manager.eo index 272b03e..8b95774 100644 --- a/src/lib/elementary/efl_ui_focus_manager.eo +++ b/src/lib/elementary/efl_ui_focus_manager.eo @@ -223,7 +223,7 @@ class Efl.Ui.Focus.Manager (Efl.Object) { events { redirect,changed : Efl.Ui.Focus.Manager; [[Emitted when the redirect object has changed, the old manager is passed as event info]] - pre,flush; [[Emitted once the graph calculationg will be performed]] + flush,pre; [[Emitted once the graph calculationg will be performed]] coords,dirty; [[Emitted once the graph is dirty, this means there are potential changes in border_elements you want to know about]] focused : Efl.Ui.Focus.Object; [[Emitted if the manager has focused an diff --git a/src/lib/elementary/efl_ui_focus_manager_sub.c b/src/lib/elementary/efl_ui_focus_manager_sub.c index 6fee181..73a7691 100644 --- a/src/lib/elementary/efl_ui_focus_manager_sub.c +++ b/src/lib/elementary/efl_ui_focus_manager_sub.c @@ -144,7 +144,7 @@ _redirect_changed_cb(void *data, const Efl_Event *ev EINA_UNUSED) } EFL_CALLBACKS_ARRAY_DEFINE(parent_manager, - {EFL_UI_FOCUS_MANAGER_EVENT_PRE_FLUSH, _parent_manager_pre_flush}, + {EFL_UI_FOCUS_MANAGER_EVENT_FLUSH_PRE, _parent_manager_pre_flush}, {EFL_UI_FOCUS_MANAGER_EVENT_REDIRECT_CHANGED, _redirect_changed_cb} ); diff --git a/src/lib/elementary/elm_main.c b/src/lib/elementary/elm_main.c index bb1938a..163dd36 100644 --- a/src/lib/elementary/elm_main.c +++ b/src/lib/elementary/elm_main.c @@ -34,7 +34,7 @@ EAPI Elm_Version *elm_version = &_version; void _efl_ui_focus_manager_redirect_events_del(Efl_Ui_Focus_Manager *manager, Eo *obj) { - efl_event_callback_forwarder_del(manager, EFL_UI_FOCUS_MANAGER_EVENT_PRE_FLUSH, obj); + efl_event_callback_forwarder_del(manager, EFL_UI_FOCUS_MANAGER_EVENT_FLUSH_PRE, obj); efl_event_callback_forwarder_del(manager, EFL_UI_FOCUS_MANAGER_EVENT_REDIRECT_CHANGED, obj); efl_event_callback_forwarder_del(manager, EFL_UI_FOCUS_MANAGER_EVENT_FOCUSED , obj); efl_event_callback_forwarder_del(manager, EFL_UI_FOCUS_MANAGER_EVENT_COORDS_DIRTY, obj); @@ -43,7 +43,7 @@ _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) { - efl_event_callback_forwarder_add(manager, EFL_UI_FOCUS_MANAGER_EVENT_PRE_FLUSH, obj); + efl_event_callback_forwarder_add(manager, EFL_UI_FOCUS_MANAGER_EVENT_FLUSH_PRE, obj); efl_event_callback_forwarder_add(manager, EFL_UI_FOCUS_MANAGER_EVENT_REDIRECT_CHANGED, obj); efl_event_callback_forwarder_add(manager, EFL_UI_FOCUS_MANAGER_EVENT_FOCUSED , obj); efl_event_callback_forwarder_add(manager, EFL_UI_FOCUS_MANAGER_EVENT_COORDS_DIRTY, obj); diff --git a/src/tests/elementary/elm_test_focus_sub.c b/src/tests/elementary/elm_test_focus_sub.c index d214fb5..226df53 100644 --- a/src/tests/elementary/elm_test_focus_sub.c +++ b/src/tests/elementary/elm_test_focus_sub.c @@ -82,7 +82,7 @@ _setup(Efl_Ui_Focus_Manager **m, Efl_Ui_Focus_Manager_Sub **sub, Efl_Ui_Focus_Ob efl_ui_focus_manager_root_set(efl_added, root_manager) ); //flush now all changes - efl_event_callback_call(manager, EFL_UI_FOCUS_MANAGER_EVENT_PRE_FLUSH, NULL); + efl_event_callback_call(manager, EFL_UI_FOCUS_MANAGER_EVENT_FLUSH_PRE, NULL); registered = NULL; unregistered = NULL; @@ -129,7 +129,7 @@ START_TEST(correct_register) efl_ui_focus_manager_register(sub, child2, root, NULL); efl_ui_focus_manager_register(sub, child3, root, NULL); //now force submanager to flush things - efl_event_callback_call(manager, EFL_UI_FOCUS_MANAGER_EVENT_PRE_FLUSH, NULL); + efl_event_callback_call(manager, EFL_UI_FOCUS_MANAGER_EVENT_FLUSH_PRE, NULL); ck_assert_ptr_eq(unregistered, NULL); fail_if(!_set_equal(registered, set1)); @@ -164,7 +164,7 @@ START_TEST(correct_unregister) efl_ui_focus_manager_register(sub, child1, root, NULL); efl_ui_focus_manager_register(sub, child2, root, NULL); efl_ui_focus_manager_register(sub, child3, root, NULL); - efl_event_callback_call(manager, EFL_UI_FOCUS_MANAGER_EVENT_PRE_FLUSH, NULL); + efl_event_callback_call(manager, EFL_UI_FOCUS_MANAGER_EVENT_FLUSH_PRE, NULL); eina_list_free(unregistered); unregistered = NULL; eina_list_free(registered); @@ -172,7 +172,7 @@ START_TEST(correct_unregister) //test unregister stuff efl_ui_focus_manager_unregister(sub, child3); - efl_event_callback_call(manager, EFL_UI_FOCUS_MANAGER_EVENT_PRE_FLUSH, NULL); + efl_event_callback_call(manager, EFL_UI_FOCUS_MANAGER_EVENT_FLUSH_PRE, NULL); ck_assert_ptr_eq(registered, NULL); fail_if(!_set_equal(unregistered, set)); eina_list_free(unregistered); @@ -206,7 +206,7 @@ START_TEST(correct_un_register) //test register stuff efl_ui_focus_manager_register(sub, child1, root, NULL); efl_ui_focus_manager_register(sub, child3, root, NULL); - efl_event_callback_call(manager, EFL_UI_FOCUS_MANAGER_EVENT_PRE_FLUSH, NULL); + efl_event_callback_call(manager, EFL_UI_FOCUS_MANAGER_EVENT_FLUSH_PRE, NULL); eina_list_free(unregistered); unregistered = NULL; eina_list_free(registered); @@ -215,7 +215,7 @@ START_TEST(correct_un_register) //test unregister stuff efl_ui_focus_manager_unregister(sub, child3); efl_ui_focus_manager_register(sub, child2, root, NULL); - efl_event_callback_call(manager, EFL_UI_FOCUS_MANAGER_EVENT_PRE_FLUSH, NULL); + efl_event_callback_call(manager, EFL_UI_FOCUS_MANAGER_EVENT_FLUSH_PRE, NULL); fail_if(!_set_equal(registered, set_add)); fail_if(!_set_equal(unregistered, set_del)); -- 2.7.4