From 2eefabae8eee6a8fe609df1c923d68d6b550b4bf Mon Sep 17 00:00:00 2001 From: Marcel Hollerbach Date: Sun, 15 Oct 2017 17:08:35 +0200 Subject: [PATCH] elm_grid: port to composition --- src/lib/elementary/elm_grid.c | 13 +++++++------ src/lib/elementary/elm_grid.eo | 3 ++- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/src/lib/elementary/elm_grid.c b/src/lib/elementary/elm_grid.c index 90d3102..65c96ff 100644 --- a/src/lib/elementary/elm_grid.c +++ b/src/lib/elementary/elm_grid.c @@ -3,6 +3,7 @@ #endif #define ELM_INTERFACE_ATSPI_ACCESSIBLE_PROTECTED +#define EFL_UI_FOCUS_COMPOSITION_PROTECTED #include #include @@ -14,12 +15,12 @@ #define MY_CLASS_NAME_LEGACY "elm_grid" static void -_focus_order_flush(Eo *obj) +_elm_grid_efl_ui_focus_composition_prepare(Eo *obj, void *pd EINA_UNUSED) { Elm_Widget_Smart_Data *wpd = efl_data_scope_get(obj, ELM_WIDGET_CLASS); Eina_List *order = evas_object_grid_children_get(wpd->resize_obj); - efl_ui_focus_manager_calc_update_order(wpd->focus.manager, obj, order); + efl_ui_focus_composition_elements_set(obj, order); } static void @@ -125,7 +126,7 @@ _elm_grid_pack(Eo *obj, void *_pd EINA_UNUSED, Evas_Object *subobj, Evas_Coord x elm_widget_sub_object_add(obj, subobj); evas_object_grid_pack(wd->resize_obj, subobj, x, y, w, h); - _focus_order_flush(obj); + efl_ui_focus_composition_dirty(obj); } EOLIAN static void @@ -135,7 +136,7 @@ _elm_grid_unpack(Eo *obj, void *_pd EINA_UNUSED, Evas_Object *subobj) _elm_widget_sub_object_redirect_to_top(obj, subobj); evas_object_grid_unpack(wd->resize_obj, subobj); - _focus_order_flush(obj); + efl_ui_focus_composition_dirty(obj); } EOLIAN static void @@ -154,7 +155,7 @@ _elm_grid_clear(Eo *obj, void *_pd EINA_UNUSED, Eina_Bool clear) } evas_object_grid_clear(wd->resize_obj, clear); - _focus_order_flush(obj); + efl_ui_focus_composition_dirty(obj); } EAPI void @@ -170,7 +171,7 @@ elm_grid_pack_set(Evas_Object *subobj, ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd); evas_object_grid_pack(wd->resize_obj, subobj, x, y, w, h); - _focus_order_flush(obj); + efl_ui_focus_composition_dirty(obj); } EAPI void diff --git a/src/lib/elementary/elm_grid.eo b/src/lib/elementary/elm_grid.eo index 92604eb..8e50daf 100644 --- a/src/lib/elementary/elm_grid.eo +++ b/src/lib/elementary/elm_grid.eo @@ -1,4 +1,4 @@ -class Elm.Grid (Elm.Widget) +class Elm.Grid (Elm.Widget, Efl.Ui.Focus.Composition) { [[Elementary grid class]] legacy_prefix: elm_grid; @@ -56,5 +56,6 @@ class Elm.Grid (Elm.Widget) class.constructor; Efl.Object.constructor; Elm.Widget.theme_apply; + Efl.Ui.Focus.Composition.prepare; } } -- 2.7.4