summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Blumenkrantz <zmike@samsung.com>2019-03-07 10:50:01 -0500
committerCedric BAIL <cedric.bail@free.fr>2019-03-07 14:17:03 -0800
commit79a585884b4987777c8051a2d7f5a169931172eb (patch)
tree78c71cc91b67c82fdf5595c57cf1d0de94eab87d
parent15e9605b7d1e4609c3c506ad3c3aebd2caee2e30 (diff)
elm: remove legacy type usage from eo focus functions
Reviewed-by: Cedric BAIL <cedric.bail@free.fr> Differential Revision: https://phab.enlightenment.org/D8226
-rw-r--r--src/lib/elementary/efl_ui_widget.c6
-rw-r--r--src/lib/elementary/elm_focus_legacy.c16
2 files changed, 11 insertions, 11 deletions
diff --git a/src/lib/elementary/efl_ui_widget.c b/src/lib/elementary/efl_ui_widget.c
index 4bd900f..f7e3f19 100644
--- a/src/lib/elementary/efl_ui_widget.c
+++ b/src/lib/elementary/efl_ui_widget.c
@@ -3372,7 +3372,7 @@ elm_widget_display_mode_set(Evas_Object *obj, Evas_Display_Mode dispmode)
3372 * @return focus move policy of the object. 3372 * @return focus move policy of the object.
3373 * 3373 *
3374 **/ 3374 **/
3375EOLIAN static Elm_Focus_Move_Policy 3375EOLIAN static Efl_Ui_Focus_Move_Policy
3376_efl_ui_widget_focus_move_policy_get(const Eo *obj EINA_UNUSED, Elm_Widget_Smart_Data *sd) 3376_efl_ui_widget_focus_move_policy_get(const Eo *obj EINA_UNUSED, Elm_Widget_Smart_Data *sd)
3377{ 3377{
3378 return sd->focus_move_policy; 3378 return sd->focus_move_policy;
@@ -3388,9 +3388,9 @@ _efl_ui_widget_focus_move_policy_get(const Eo *obj EINA_UNUSED, Elm_Widget_Smart
3388 */ 3388 */
3389 3389
3390EOLIAN static void 3390EOLIAN static void
3391_efl_ui_widget_focus_move_policy_set(Eo *obj EINA_UNUSED, Elm_Widget_Smart_Data *sd, Elm_Focus_Move_Policy policy) 3391_efl_ui_widget_focus_move_policy_set(Eo *obj EINA_UNUSED, Elm_Widget_Smart_Data *sd, Efl_Ui_Focus_Move_Policy policy)
3392{ 3392{
3393 if (sd->focus_move_policy == policy) return; 3393 if (sd->focus_move_policy == (Elm_Focus_Move_Policy)policy) return;
3394 sd->focus_move_policy = policy; 3394 sd->focus_move_policy = policy;
3395} 3395}
3396 3396
diff --git a/src/lib/elementary/elm_focus_legacy.c b/src/lib/elementary/elm_focus_legacy.c
index cfe6a6d..b0cc1e6 100644
--- a/src/lib/elementary/elm_focus_legacy.c
+++ b/src/lib/elementary/elm_focus_legacy.c
@@ -107,11 +107,11 @@ elm_object_focus_next_object_set(Evas_Object *obj,
107 EINA_SAFETY_ON_FALSE_RETURN(efl_isa(next, EFL_UI_WIDGET_CLASS)); 107 EINA_SAFETY_ON_FALSE_RETURN(efl_isa(next, EFL_UI_WIDGET_CLASS));
108 ELM_WIDGET_DATA_GET_OR_RETURN(next, next_pd); 108 ELM_WIDGET_DATA_GET_OR_RETURN(next, next_pd);
109 109
110 #define MAP(direction, field) if (dir == EFL_UI_FOCUS_DIRECTION_ ##direction) pd->legacy_focus.field = next; 110 #define MAP(direction, field) if ((Efl_Ui_Focus_Direction)dir == EFL_UI_FOCUS_DIRECTION_ ##direction) pd->legacy_focus.field = next;
111 MAPPING() 111 MAPPING()
112 #undef MAP 112 #undef MAP
113 dir = efl_ui_focus_util_direction_complement(dir); 113 dir = efl_ui_focus_util_direction_complement(dir);
114 #define MAP(direction, field) if (dir == EFL_UI_FOCUS_DIRECTION_ ##direction) next_pd->legacy_focus.field = obj; 114 #define MAP(direction, field) if ((Efl_Ui_Focus_Direction)dir == EFL_UI_FOCUS_DIRECTION_ ##direction) next_pd->legacy_focus.field = obj;
115 MAPPING() 115 MAPPING()
116 #undef MAP 116 #undef MAP
117} 117}
@@ -178,13 +178,13 @@ _get_legacy_target(EINA_UNUSED Evas_Object *eo, Elm_Widget_Smart_Data *pd, Elm_F
178{ 178{
179 Evas_Object *result = NULL; 179 Evas_Object *result = NULL;
180 180
181 #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); 181 #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);
182 MAPPING() 182 MAPPING()
183 #undef MAP 183 #undef MAP
184 184
185 if (!result) 185 if (!result)
186 { 186 {
187 #define MAP(direction, field) if (dir == EFL_UI_FOCUS_DIRECTION_ ##direction && pd->legacy_focus.field) result = pd->legacy_focus.field; 187 #define MAP(direction, field) if ((Efl_Ui_Focus_Direction)dir == EFL_UI_FOCUS_DIRECTION_ ##direction && pd->legacy_focus.field) result = pd->legacy_focus.field;
188 MAPPING() 188 MAPPING()
189 #undef MAP 189 #undef MAP
190 } 190 }
@@ -268,7 +268,7 @@ elm_object_focus_next(Evas_Object *obj,
268 o = efl_ui_focus_manager_move(top, dir); 268 o = efl_ui_focus_manager_move(top, dir);
269 if (!o) 269 if (!o)
270 { 270 {
271 if (dir == EFL_UI_FOCUS_DIRECTION_NEXT || dir == EFL_UI_FOCUS_DIRECTION_PREVIOUS) 271 if ((Efl_Ui_Focus_Direction)dir == EFL_UI_FOCUS_DIRECTION_NEXT || (Efl_Ui_Focus_Direction)dir == EFL_UI_FOCUS_DIRECTION_PREVIOUS)
272 { 272 {
273 Efl_Ui_Focus_Object *root; 273 Efl_Ui_Focus_Object *root;
274 274
@@ -285,7 +285,7 @@ elm_object_focus_next_object_get(const Evas_Object *obj,
285 Efl_Ui_Widget *top = elm_object_top_widget_get(obj); 285 Efl_Ui_Widget *top = elm_object_top_widget_get(obj);
286 API_ENTRY_VAL(NULL) 286 API_ENTRY_VAL(NULL)
287 287
288 #define MAP(direction, field) if (dir == EFL_UI_FOCUS_DIRECTION_ ##direction && pd->legacy_focus.field) return pd->legacy_focus.field; 288 #define MAP(direction, field) if ((Efl_Ui_Focus_Direction)dir == EFL_UI_FOCUS_DIRECTION_ ##direction && pd->legacy_focus.field) return pd->legacy_focus.field;
289 MAPPING() 289 MAPPING()
290 #undef MAP 290 #undef MAP
291 291
@@ -298,7 +298,7 @@ elm_object_focus_next_item_get(const Evas_Object *obj,
298{ 298{
299 API_ENTRY_VAL(NULL) 299 API_ENTRY_VAL(NULL)
300 300
301 #define MAP(direction, field) if (dir == EFL_UI_FOCUS_DIRECTION_ ##direction && pd->legacy_focus.item_ ##field) return pd->legacy_focus.item_ ##field; 301 #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;
302 MAPPING() 302 MAPPING()
303 #undef MAP 303 #undef MAP
304 304
@@ -312,7 +312,7 @@ elm_object_focus_next_item_set(Evas_Object *obj,
312{ 312{
313 API_ENTRY() 313 API_ENTRY()
314 314
315 #define MAP(direction, field) if (dir == EFL_UI_FOCUS_DIRECTION_ ##direction) pd->legacy_focus.item_ ##field = next_item; 315 #define MAP(direction, field) if ((Efl_Ui_Focus_Direction)dir == EFL_UI_FOCUS_DIRECTION_ ##direction) pd->legacy_focus.item_ ##field = next_item;
316 MAPPING() 316 MAPPING()
317 #undef MAP 317 #undef MAP
318} 318}