elm: remove legacy type usage from eo focus functions

Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D8226
This commit is contained in:
Mike Blumenkrantz 2019-03-07 10:50:01 -05:00 committed by Cedric BAIL
parent 15e9605b7d
commit 79a585884b
2 changed files with 11 additions and 11 deletions

View File

@ -3372,7 +3372,7 @@ elm_widget_display_mode_set(Evas_Object *obj, Evas_Display_Mode dispmode)
* @return focus move policy of the object.
*
**/
EOLIAN static Elm_Focus_Move_Policy
EOLIAN static Efl_Ui_Focus_Move_Policy
_efl_ui_widget_focus_move_policy_get(const Eo *obj EINA_UNUSED, Elm_Widget_Smart_Data *sd)
{
return sd->focus_move_policy;
@ -3388,9 +3388,9 @@ _efl_ui_widget_focus_move_policy_get(const Eo *obj EINA_UNUSED, Elm_Widget_Smart
*/
EOLIAN static void
_efl_ui_widget_focus_move_policy_set(Eo *obj EINA_UNUSED, Elm_Widget_Smart_Data *sd, Elm_Focus_Move_Policy policy)
_efl_ui_widget_focus_move_policy_set(Eo *obj EINA_UNUSED, Elm_Widget_Smart_Data *sd, Efl_Ui_Focus_Move_Policy policy)
{
if (sd->focus_move_policy == policy) return;
if (sd->focus_move_policy == (Elm_Focus_Move_Policy)policy) return;
sd->focus_move_policy = policy;
}

View File

@ -107,11 +107,11 @@ elm_object_focus_next_object_set(Evas_Object *obj,
EINA_SAFETY_ON_FALSE_RETURN(efl_isa(next, EFL_UI_WIDGET_CLASS));
ELM_WIDGET_DATA_GET_OR_RETURN(next, next_pd);
#define MAP(direction, field) if (dir == EFL_UI_FOCUS_DIRECTION_ ##direction) pd->legacy_focus.field = next;
#define MAP(direction, field) if ((Efl_Ui_Focus_Direction)dir == EFL_UI_FOCUS_DIRECTION_ ##direction) pd->legacy_focus.field = next;
MAPPING()
#undef MAP
dir = efl_ui_focus_util_direction_complement(dir);
#define MAP(direction, field) if (dir == EFL_UI_FOCUS_DIRECTION_ ##direction) next_pd->legacy_focus.field = obj;
#define MAP(direction, field) if ((Efl_Ui_Focus_Direction)dir == EFL_UI_FOCUS_DIRECTION_ ##direction) next_pd->legacy_focus.field = obj;
MAPPING()
#undef MAP
}
@ -178,13 +178,13 @@ _get_legacy_target(EINA_UNUSED Evas_Object *eo, Elm_Widget_Smart_Data *pd, Elm_F
{
Evas_Object *result = NULL;
#define MAP(direction, field) if (dir == EFL_UI_FOCUS_DIRECTION_ ##direction && pd->legacy_focus.item_ ##field) result = elm_object_item_widget_get(pd->legacy_focus.item_ ##field);
#define MAP(direction, field) if ((Efl_Ui_Focus_Direction)dir == EFL_UI_FOCUS_DIRECTION_ ##direction && pd->legacy_focus.item_ ##field) result = elm_object_item_widget_get(pd->legacy_focus.item_ ##field);
MAPPING()
#undef MAP
if (!result)
{
#define MAP(direction, field) if (dir == EFL_UI_FOCUS_DIRECTION_ ##direction && pd->legacy_focus.field) result = pd->legacy_focus.field;
#define MAP(direction, field) if ((Efl_Ui_Focus_Direction)dir == EFL_UI_FOCUS_DIRECTION_ ##direction && pd->legacy_focus.field) result = pd->legacy_focus.field;
MAPPING()
#undef MAP
}
@ -268,7 +268,7 @@ elm_object_focus_next(Evas_Object *obj,
o = efl_ui_focus_manager_move(top, dir);
if (!o)
{
if (dir == EFL_UI_FOCUS_DIRECTION_NEXT || dir == EFL_UI_FOCUS_DIRECTION_PREVIOUS)
if ((Efl_Ui_Focus_Direction)dir == EFL_UI_FOCUS_DIRECTION_NEXT || (Efl_Ui_Focus_Direction)dir == EFL_UI_FOCUS_DIRECTION_PREVIOUS)
{
Efl_Ui_Focus_Object *root;
@ -285,7 +285,7 @@ elm_object_focus_next_object_get(const Evas_Object *obj,
Efl_Ui_Widget *top = elm_object_top_widget_get(obj);
API_ENTRY_VAL(NULL)
#define MAP(direction, field) if (dir == EFL_UI_FOCUS_DIRECTION_ ##direction && pd->legacy_focus.field) return pd->legacy_focus.field;
#define MAP(direction, field) if ((Efl_Ui_Focus_Direction)dir == EFL_UI_FOCUS_DIRECTION_ ##direction && pd->legacy_focus.field) return pd->legacy_focus.field;
MAPPING()
#undef MAP
@ -298,7 +298,7 @@ elm_object_focus_next_item_get(const Evas_Object *obj,
{
API_ENTRY_VAL(NULL)
#define MAP(direction, field) if (dir == EFL_UI_FOCUS_DIRECTION_ ##direction && pd->legacy_focus.item_ ##field) return pd->legacy_focus.item_ ##field;
#define MAP(direction, field) if ((Efl_Ui_Focus_Direction)dir == EFL_UI_FOCUS_DIRECTION_ ##direction && pd->legacy_focus.item_ ##field) return pd->legacy_focus.item_ ##field;
MAPPING()
#undef MAP
@ -312,7 +312,7 @@ elm_object_focus_next_item_set(Evas_Object *obj,
{
API_ENTRY()
#define MAP(direction, field) if (dir == EFL_UI_FOCUS_DIRECTION_ ##direction) pd->legacy_focus.item_ ##field = next_item;
#define MAP(direction, field) if ((Efl_Ui_Focus_Direction)dir == EFL_UI_FOCUS_DIRECTION_ ##direction) pd->legacy_focus.item_ ##field = next_item;
MAPPING()
#undef MAP
}