efl_ui_focus_object: rename API

these API names have been considered a better choice.

ref T7571

Reviewed-by: Xavi Artigas <xavierartigas@yahoo.es>
Differential Revision: https://phab.enlightenment.org/D7994
This commit is contained in:
Marcel Hollerbach 2019-02-21 21:46:32 +01:00
parent 229dc576e6
commit 89b62fd225
13 changed files with 37 additions and 37 deletions

View File

@ -185,7 +185,7 @@ _efl_ui_focus_composition_dirty(Eo *obj EINA_UNUSED, Efl_Ui_Focus_Composition_Da
}
EOLIAN static void
_efl_ui_focus_composition_efl_ui_focus_object_prepare_logical_none_recursive(Eo *obj, Efl_Ui_Focus_Composition_Data *pd EINA_UNUSED)
_efl_ui_focus_composition_efl_ui_focus_object_setup_order_non_recursive(Eo *obj, Efl_Ui_Focus_Composition_Data *pd EINA_UNUSED)
{
if (pd->dirty)
{
@ -193,7 +193,7 @@ _efl_ui_focus_composition_efl_ui_focus_object_prepare_logical_none_recursive(Eo
pd->dirty = EINA_FALSE;
}
efl_ui_focus_object_prepare_logical_none_recursive(efl_super(obj, MY_CLASS));
efl_ui_focus_object_setup_order_non_recursive(efl_super(obj, MY_CLASS));
}
EOLIAN static void

View File

@ -39,7 +39,7 @@ mixin @beta Efl.Ui.Focus.Composition requires Efl.Ui.Widget {
implements {
Efl.Object.invalidate;
Efl.Ui.Widget.focus_state_apply;
Efl.Ui.Focus.Object.prepare_logical_none_recursive;
Efl.Ui.Focus.Object.setup_order_non_recursive;
@empty .prepare;
}
}

View File

@ -1047,7 +1047,7 @@ _prepare_node(Node *root)
Eina_List *n;
Node *node;
efl_ui_focus_object_prepare_logical(root->focusable);
efl_ui_focus_object_setup_order(root->focusable);
EINA_LIST_FOREACH(root->tree.children, n, node)
{
@ -1193,7 +1193,7 @@ _prev_item(Node *node)
parent = T(node).parent;
//we are accessing the parents children, prepare!
efl_ui_focus_object_prepare_logical(parent->focusable);
efl_ui_focus_object_setup_order(parent->focusable);
lnode = eina_list_data_find_list(T(parent).children, node);
lnode = eina_list_prev(lnode);
@ -1232,7 +1232,7 @@ _next(Node *node)
parent = T(n).parent;
//we are accessing the parents children, prepare!
efl_ui_focus_object_prepare_logical(parent->focusable);
efl_ui_focus_object_setup_order(parent->focusable);
lnode = eina_list_data_find_list(T(parent).children, n);
lnode = eina_list_next(lnode);
@ -1262,7 +1262,7 @@ _prev(Node *node)
//we are accessing prev items children, prepare them!
if (n && n->focusable)
efl_ui_focus_object_prepare_logical(n->focusable);
efl_ui_focus_object_setup_order(n->focusable);
//case 1 there is a item in the parent previous to node, which has children
if (n && T(n).children && !n->redirect_manager)
@ -1323,7 +1323,7 @@ _logical_movement(Eo *obj, Efl_Ui_Focus_Manager_Calc_Data *pd EINA_UNUSED, Node
tmp = eina_list_clone(T(result).saved_order);
efl_ui_focus_manager_calc_update_order(obj, result->focusable, tmp);
}
efl_ui_focus_object_prepare_logical(result->focusable);
efl_ui_focus_object_setup_order(result->focusable);
}
result = deliver(result);
@ -1413,7 +1413,7 @@ _request_subchild(Node *node)
do
{
if (target != node)
efl_ui_focus_object_prepare_logical(target->focusable);
efl_ui_focus_object_setup_order(target->focusable);
target = _next(target);
//abort if we are exceeding the childrens of node
@ -1466,7 +1466,7 @@ _efl_ui_focus_manager_calc_efl_ui_focus_manager_manager_focus_set(Eo *obj, Efl_U
F_DBG(" %p is logical, fetching the next subnode that is either a redirect or a regular", obj);
//important! if there are no children _next would return the parent of node which will exceed the limit of children of node
efl_ui_focus_object_prepare_logical(node->focusable);
efl_ui_focus_object_setup_order(node->focusable);
target = _request_subchild(node);
@ -1796,10 +1796,10 @@ _efl_ui_focus_manager_calc_efl_ui_focus_manager_fetch(Eo *obj, Efl_Ui_Focus_Mana
dirty_flush(obj, pd, n);
//make sure to prepare_logical so next and prev are correctly
//make sure to setup_order so next and prev are correctly
if (n->tree.parent)
efl_ui_focus_object_prepare_logical(n->tree.parent->focusable);
efl_ui_focus_object_prepare_logical(n->focusable);
efl_ui_focus_object_setup_order(n->tree.parent->focusable);
efl_ui_focus_object_setup_order(n->focusable);
#define DIR_CLONE(dir) _convert(DIRECTION_ACCESS(n,dir));

View File

@ -34,13 +34,13 @@ _efl_ui_focus_object_focus_get(const Eo *obj EINA_UNUSED, Efl_Ui_Focus_Object_Da
}
EOLIAN static void
_efl_ui_focus_object_prepare_logical(Eo *obj, Efl_Ui_Focus_Object_Data *pd)
_efl_ui_focus_object_setup_order(Eo *obj, Efl_Ui_Focus_Object_Data *pd)
{
if (pd->ongoing_prepare_call) return;
pd->ongoing_prepare_call = EINA_TRUE;
efl_ui_focus_object_prepare_logical_none_recursive(obj);
efl_ui_focus_object_setup_order_non_recursive(obj);
pd->ongoing_prepare_call = EINA_FALSE;
}

View File

@ -54,13 +54,13 @@ mixin @beta Efl.Ui.Focus.Object
child_focus : bool;
}
}
prepare_logical {
[[Tells the object that its children will be queried soon by the given manager.
Deleting manager items in this call will result in undefined behaviour and may cause your system to crash.
setup_order {
[[Tells the object that its children will be queried soon by the focus manager. Overwrite this to update the order of the children. Deleting items in this call will
result in undefined behaviour and may cause your system to crash.
]]
}
prepare_logical_none_recursive @protected {
[[This is called when prepare_logical is called, but only on the first call, additional recursive calls to $prepare_logical will not call this function agian.]]
setup_order_non_recursive @protected {
[[This is called when @.setup_order is called, but only on the first call, additional recursive calls to @.setup_order will not call this function again.]]
}
on_focus_update @protected {
[[Virtual function handling focus in/out events on the widget]]
@ -69,7 +69,7 @@ mixin @beta Efl.Ui.Focus.Object
}
implements {
@empty .focus_geometry;
@empty .prepare_logical_none_recursive;
@empty .setup_order_non_recursive;
@empty .focus_manager;
@empty .focus_parent;
@empty .on_focus_update;

View File

@ -67,7 +67,7 @@ _efl_ui_focus_parent_provider_gen_efl_ui_focus_parent_provider_find_logical_pare
if (parent == pd->container)
{
item = eina_hash_find(pd->map, &above_gengrid);
efl_ui_focus_object_prepare_logical(pd->container);
efl_ui_focus_object_setup_order(pd->container);
if (item)
return item;
@ -91,7 +91,7 @@ _efl_ui_focus_parent_provider_gen_item_fetch(Eo *obj EINA_UNUSED, Efl_Ui_Focus_P
if (efl_isa(item, ELM_WIDGET_ITEM_CLASS))
{
efl_ui_focus_object_prepare_logical(pd->container);
efl_ui_focus_object_setup_order(pd->container);
return item;
}
else
@ -114,7 +114,7 @@ _efl_ui_focus_parent_provider_gen_item_fetch(Eo *obj EINA_UNUSED, Efl_Ui_Focus_P
}
item = eina_hash_find(pd->map, &above_gengrid);
efl_ui_focus_object_prepare_logical(pd->container);
efl_ui_focus_object_setup_order(pd->container);
return item;
}

View File

@ -5831,7 +5831,7 @@ _elm_gengrid_efl_ui_widget_focus_state_apply(Eo *obj, Elm_Gengrid_Data *pd EINA_
}
EOLIAN static void
_elm_gengrid_item_efl_ui_focus_object_prepare_logical_none_recursive(Eo *obj, Elm_Gen_Item *pd)
_elm_gengrid_item_efl_ui_focus_object_setup_order_non_recursive(Eo *obj, Elm_Gen_Item *pd)
{
Eina_List *n;
Efl_Ui_Widget *wid;
@ -5842,7 +5842,7 @@ _elm_gengrid_item_efl_ui_focus_object_prepare_logical_none_recursive(Eo *obj, El
_elm_widget_full_eval(wid);
}
efl_ui_focus_object_prepare_logical_none_recursive(efl_super(obj, ELM_GENGRID_ITEM_CLASS));
efl_ui_focus_object_setup_order_non_recursive(efl_super(obj, ELM_GENGRID_ITEM_CLASS));
}
EOLIAN static Efl_Ui_Focus_Object*

View File

@ -230,7 +230,7 @@ class Elm.Gengrid.Item extends Elm.Widget.Item.Static_Focus implements Efl.Ui.Fo
Elm.Widget.Item.cursor_unset;
Efl.Access.Object.i18n_name { get; }
Efl.Access.Object.state_set { get; }
Efl.Ui.Focus.Object.prepare_logical_none_recursive;
Efl.Ui.Focus.Object.setup_order_non_recursive;
Efl.Ui.Focus.Object.focus_parent { get; }
}
}

View File

@ -8910,7 +8910,7 @@ _elm_genlist_efl_object_provider_find(const Eo *obj, Elm_Genlist_Data *pd, const
}
EOLIAN static void
_elm_genlist_item_efl_ui_focus_object_prepare_logical_none_recursive(Eo *obj, Elm_Gen_Item *pd)
_elm_genlist_item_efl_ui_focus_object_setup_order_non_recursive(Eo *obj, Elm_Gen_Item *pd)
{
Eina_List *n;
Efl_Ui_Widget *wid;
@ -8921,7 +8921,7 @@ _elm_genlist_item_efl_ui_focus_object_prepare_logical_none_recursive(Eo *obj, El
_elm_widget_full_eval(wid);
}
efl_ui_focus_object_prepare_logical_none_recursive(efl_super(obj, ELM_GENLIST_ITEM_CLASS));
efl_ui_focus_object_setup_order_non_recursive(efl_super(obj, ELM_GENLIST_ITEM_CLASS));
}
EOLIAN static Eina_Bool

View File

@ -431,7 +431,7 @@ class Elm.Genlist.Item extends Elm.Widget.Item.Static_Focus implements Efl.Ui.Le
Elm.Widget.Item.cursor_unset;
Efl.Access.Object.i18n_name { get; }
Efl.Access.Object.state_set { get; }
Efl.Ui.Focus.Object.prepare_logical_none_recursive;
Efl.Ui.Focus.Object.setup_order_non_recursive;
Efl.Ui.Focus.Object.focus_parent { get; }
}
}

View File

@ -155,7 +155,7 @@ _items_visibility_fix(Elm_Toolbar *obj,
}
}
efl_ui_focus_composition_dirty(obj);
efl_ui_focus_object_prepare_logical(obj);
efl_ui_focus_object_setup_order(obj);
}
static void

View File

@ -35,7 +35,7 @@ _list_realized_cb(void *data, const Efl_Event *ev)
if (!elm_object_item_disabled_get(data) &&
elm_genlist_item_type_get(data) != ELM_GENLIST_ITEM_GROUP)
efl_ui_focus_object_prepare_logical(data);
efl_ui_focus_object_setup_order(data);
}
static void
@ -57,8 +57,8 @@ _grid_realized_cb(void *data, const Efl_Event *ev)
Elm_Widget_Item_Data *wpd = efl_data_scope_get(data, ELM_WIDGET_ITEM_CLASS);
//first prepare the container
efl_ui_focus_object_prepare_logical(wpd->widget);
efl_ui_focus_object_prepare_logical(data);
efl_ui_focus_object_setup_order(wpd->widget);
efl_ui_focus_object_setup_order(data);
}
}
@ -83,12 +83,12 @@ _unrealized_cb(void *data, const Efl_Event *ev EINA_UNUSED)
}
EOLIAN static void
_elm_widget_item_static_focus_efl_ui_focus_object_prepare_logical_none_recursive(Eo *obj, Elm_Widget_Item_Static_Focus_Data *pd EINA_UNUSED)
_elm_widget_item_static_focus_efl_ui_focus_object_setup_order_non_recursive(Eo *obj, Elm_Widget_Item_Static_Focus_Data *pd EINA_UNUSED)
{
Eo *logical_child;
Elm_Widget_Item_Data *wpd = efl_data_scope_get(obj, ELM_WIDGET_ITEM_CLASS);
efl_ui_focus_object_prepare_logical_none_recursive(efl_super(obj, MY_CLASS));
efl_ui_focus_object_setup_order_non_recursive(efl_super(obj, MY_CLASS));
if (!pd->realized)
{

View File

@ -4,6 +4,6 @@ class Elm.Widget.Item.Static_Focus extends Elm.Widget.Item implements Efl.Ui.Foc
implements {
Efl.Object.constructor;
Efl.Object.destructor;
Efl.Ui.Focus.Object.prepare_logical_none_recursive;
Efl.Ui.Focus.Object.setup_order_non_recursive;
}
}