forked from enlightenment/efl
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:
parent
15e9605b7d
commit
79a585884b
|
@ -3372,7 +3372,7 @@ elm_widget_display_mode_set(Evas_Object *obj, Evas_Display_Mode dispmode)
|
||||||
* @return focus move policy of the object.
|
* @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)
|
_efl_ui_widget_focus_move_policy_get(const Eo *obj EINA_UNUSED, Elm_Widget_Smart_Data *sd)
|
||||||
{
|
{
|
||||||
return sd->focus_move_policy;
|
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
|
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;
|
sd->focus_move_policy = policy;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -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));
|
EINA_SAFETY_ON_FALSE_RETURN(efl_isa(next, EFL_UI_WIDGET_CLASS));
|
||||||
ELM_WIDGET_DATA_GET_OR_RETURN(next, next_pd);
|
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()
|
MAPPING()
|
||||||
#undef MAP
|
#undef MAP
|
||||||
dir = efl_ui_focus_util_direction_complement(dir);
|
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()
|
MAPPING()
|
||||||
#undef MAP
|
#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;
|
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()
|
MAPPING()
|
||||||
#undef MAP
|
#undef MAP
|
||||||
|
|
||||||
if (!result)
|
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()
|
MAPPING()
|
||||||
#undef MAP
|
#undef MAP
|
||||||
}
|
}
|
||||||
|
@ -268,7 +268,7 @@ elm_object_focus_next(Evas_Object *obj,
|
||||||
o = efl_ui_focus_manager_move(top, dir);
|
o = efl_ui_focus_manager_move(top, dir);
|
||||||
if (!o)
|
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;
|
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);
|
Efl_Ui_Widget *top = elm_object_top_widget_get(obj);
|
||||||
API_ENTRY_VAL(NULL)
|
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()
|
MAPPING()
|
||||||
#undef MAP
|
#undef MAP
|
||||||
|
|
||||||
|
@ -298,7 +298,7 @@ elm_object_focus_next_item_get(const Evas_Object *obj,
|
||||||
{
|
{
|
||||||
API_ENTRY_VAL(NULL)
|
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()
|
MAPPING()
|
||||||
#undef MAP
|
#undef MAP
|
||||||
|
|
||||||
|
@ -312,7 +312,7 @@ elm_object_focus_next_item_set(Evas_Object *obj,
|
||||||
{
|
{
|
||||||
API_ENTRY()
|
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()
|
MAPPING()
|
||||||
#undef MAP
|
#undef MAP
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue