forked from enlightenment/efl
efl_ui_focus_manager: specify the event in the same way evas does
This commit is contained in:
parent
c9aeeef9a5
commit
178b363bac
|
@ -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)
|
||||
{
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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}
|
||||
);
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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));
|
||||
|
||||
|
|
Loading…
Reference in New Issue