From: Marcel Hollerbach Date: Thu, 22 Nov 2018 16:54:57 +0000 (+0100) Subject: elm_focus: implement missing functions X-Git-Tag: submit/tizen/20181205.064917~91 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=2d289aa50bc9588729641e031400e56efcb80e74;p=platform%2Fupstream%2Fefl.git elm_focus: implement missing functions there is one function that needs to be implemented by the inheritor of Efl.Ui.Focus.Object and that is focus_parent, otherwise child_focus cannot be propagated correctly. This is now achived correctly for all widgets. This fixes from elm_object_focus_get results for toolbar and calendar. Segmentcontrol inherits from the class, however, the widget itself does not allow focus, so its never registered probebly. Differential Revision: https://phab.enlightenment.org/D7331 --- diff --git a/src/lib/elementary/efl_ui_calendar.c b/src/lib/elementary/efl_ui_calendar.c index 15ab19b..ae0e0ab 100644 --- a/src/lib/elementary/efl_ui_calendar.c +++ b/src/lib/elementary/efl_ui_calendar.c @@ -1301,4 +1301,10 @@ _efl_ui_calendar_item_efl_ui_focus_object_focus_geometry_get(const Eo *obj EINA_ return efl_gfx_entity_geometry_get(pd->part); } +EOLIAN static Efl_Ui_Focus_Object* +_efl_ui_calendar_item_efl_ui_focus_object_focus_parent_get(const Eo *obj, Efl_Ui_Calendar_Item_Data *pd EINA_UNUSED) +{ + return efl_parent_get(obj); +} + #include "efl_ui_calendar_item.eo.c" diff --git a/src/lib/elementary/efl_ui_calendar_item.eo b/src/lib/elementary/efl_ui_calendar_item.eo index d2d5c46..cccc17c 100644 --- a/src/lib/elementary/efl_ui_calendar_item.eo +++ b/src/lib/elementary/efl_ui_calendar_item.eo @@ -11,6 +11,7 @@ class Efl.Ui.Calendar_Item (Efl.Object, Efl.Ui.Focus.Object) } implements { Efl.Ui.Focus.Object.focus {set;} + Efl.Ui.Focus.Object.focus_parent {get;} Efl.Ui.Focus.Object.focus_geometry {get;} } } diff --git a/src/lib/elementary/elm_calendar.c b/src/lib/elementary/elm_calendar.c index c77a2e2..00e2306 100644 --- a/src/lib/elementary/elm_calendar.c +++ b/src/lib/elementary/elm_calendar.c @@ -2513,4 +2513,11 @@ _elm_calendar_item_efl_ui_focus_object_focus_geometry_get(const Eo *obj EINA_UNU return efl_gfx_entity_geometry_get(pd->part); } +EOLIAN static Efl_Ui_Focus_Object* +_elm_calendar_item_efl_ui_focus_object_focus_parent_get(const Eo *obj, Elm_Calendar_Item_Data *pd EINA_UNUSED) +{ + return efl_parent_get(obj); +} + + #include "elm_calendar_item.eo.c" diff --git a/src/lib/elementary/elm_calendar_item.eo b/src/lib/elementary/elm_calendar_item.eo index e5c2696..3ae581d 100644 --- a/src/lib/elementary/elm_calendar_item.eo +++ b/src/lib/elementary/elm_calendar_item.eo @@ -11,6 +11,7 @@ class Elm.Calendar.Item (Efl.Object, Efl.Ui.Focus.Object) } implements { Efl.Ui.Focus.Object.focus {set;} + Efl.Ui.Focus.Object.focus_parent {get;} Efl.Ui.Focus.Object.focus_geometry {get;} } } diff --git a/src/lib/elementary/elm_segment_control.c b/src/lib/elementary/elm_segment_control.c index 5c7af09..13d7a66 100644 --- a/src/lib/elementary/elm_segment_control.c +++ b/src/lib/elementary/elm_segment_control.c @@ -819,6 +819,12 @@ _elm_segment_control_item_efl_ui_focus_object_focus_geometry_get(const Eo *obj E return efl_gfx_entity_geometry_get(VIEW(pd)); } +EOLIAN static Efl_Ui_Focus_Object* +_elm_segment_control_item_efl_ui_focus_object_focus_parent_get(const Eo *obj EINA_UNUSED, Elm_Segment_Control_Item_Data *pd) +{ + return WIDGET(pd); +} + /* Internal EO APIs and hidden overrides */ #define ELM_SEGMENT_CONTROL_EXTRA_OPS \ diff --git a/src/lib/elementary/elm_segment_control_item.eo b/src/lib/elementary/elm_segment_control_item.eo index dab3f9c..666737a 100644 --- a/src/lib/elementary/elm_segment_control_item.eo +++ b/src/lib/elementary/elm_segment_control_item.eo @@ -42,5 +42,6 @@ class Elm.Segment_Control.Item(Elm.Widget.Item, Efl.Ui.Focus.Object, Efl.Ui.Lega Elm.Widget.Item.part_text { get; set; } Elm.Widget.Item.part_content { get; set; } Efl.Ui.Focus.Object.focus_geometry {get; } + Efl.Ui.Focus.Object.focus_parent {get;} } } diff --git a/src/lib/elementary/elm_toolbar.c b/src/lib/elementary/elm_toolbar.c index 90cd79b..763e826 100644 --- a/src/lib/elementary/elm_toolbar.c +++ b/src/lib/elementary/elm_toolbar.c @@ -4687,6 +4687,12 @@ _elm_toolbar_elm_widget_class_color_clear(Eo *obj, Elm_Toolbar_Data *sd EINA_UNU /******* * END * *******/ +EOLIAN static Efl_Ui_Focus_Object* +_elm_toolbar_item_efl_ui_focus_object_focus_parent_get(const Eo *obj, Elm_Toolbar_Item_Data *pd) +{ + return WIDGET(pd); +} + /* Standard widget overrides */ diff --git a/src/lib/elementary/elm_toolbar_item.eo b/src/lib/elementary/elm_toolbar_item.eo index 26e4419..4e77dfd 100644 --- a/src/lib/elementary/elm_toolbar_item.eo +++ b/src/lib/elementary/elm_toolbar_item.eo @@ -322,6 +322,7 @@ class Elm.Toolbar_Item(Elm.Widget.Item, Efl.Ui.Focus.Object, Efl.Ui.Legacy) Elm.Widget.Item.part_content_unset; Efl.Ui.Focus.Object.focus_geometry { get; } Efl.Ui.Focus.Object.focus { set; } + Efl.Ui.Focus.Object.focus_parent { get; } Efl.Access.Object.i18n_name { get; } Efl.Access.Object.state_set { get; }