From 66c5976034fc370e49763315406c2adcd9399609 Mon Sep 17 00:00:00 2001 From: Lukasz Stanislawski Date: Wed, 22 Nov 2017 11:38:32 +0100 Subject: [PATCH] elm: add highligh_grab and higlight_clear methods for hover @tizen_feature Change-Id: I988730a2264bbff4913beaad93365ed7a8c4c74b --- src/lib/elementary/elm_hover.c | 33 +++++++++++++++++++++++++++++++++ src/lib/elementary/elm_hover.eo | 2 ++ 2 files changed, 35 insertions(+) diff --git a/src/lib/elementary/elm_hover.c b/src/lib/elementary/elm_hover.c index cf21907..586efe6 100644 --- a/src/lib/elementary/elm_hover.c +++ b/src/lib/elementary/elm_hover.c @@ -6,6 +6,7 @@ #define EFL_ACCESS_PROTECTED #define EFL_ACCESS_WIDGET_ACTION_PROTECTED #define ELM_LAYOUT_PROTECTED +#define EFL_ACCESS_COMPONENT_PROTECTED #include @@ -876,6 +877,38 @@ _elm_hover_efl_access_state_set_get(Eo *obj, Elm_Hover_Data *pd EINA_UNUSED) return states; } +//TIZEN_ONLY(20171122) elm: add highligh_grab and higlight_clear methods for hover +EOLIAN static Eina_Bool +_elm_hover_efl_access_component_highlight_grab(Eo *obj, Elm_Hover_Data *sd) +{ + ELM_HOVER_PARTS_FOREACH + { + if (sd->subs[i].obj) + { + elm_object_accessibility_highlight_set(sd->subs[i].obj, EINA_TRUE); + efl_access_state_changed_signal_emit(obj, EFL_ACCESS_STATE_HIGHLIGHTED, EINA_TRUE); + break; + } + } + return EINA_TRUE; +} + +EOLIAN static Eina_Bool +_elm_hover_efl_access_component_highlight_clear(Eo *obj, Elm_Hover_Data *sd) +{ + ELM_HOVER_PARTS_FOREACH + { + if (sd->subs[i].obj) + { + elm_object_accessibility_highlight_set(sd->subs[i].obj, EINA_FALSE); + efl_access_state_changed_signal_emit(obj, EFL_ACCESS_STATE_HIGHLIGHTED, EINA_FALSE); + break; + } + } + return EINA_TRUE; +} +// + /* Efl.Part begin */ ELM_PART_OVERRIDE(elm_hover, ELM_HOVER, Elm_Hover_Data) diff --git a/src/lib/elementary/elm_hover.eo b/src/lib/elementary/elm_hover.eo index c517b9c..881938a 100644 --- a/src/lib/elementary/elm_hover.eo +++ b/src/lib/elementary/elm_hover.eo @@ -70,6 +70,8 @@ class Elm.Hover (Efl.Ui.Layout, Efl.Ui.Focus.Layer, Efl.Ui.Clickable, Efl.Access Elm.Widget.widget_sub_object_del; Efl.Access.Widget.Action.elm_actions { get; } Efl.Access.state_set { get; } + Efl.Access.Component.highlight_grab; + Efl.Access.Component.highlight_clear; Efl.Part.part; } events { -- 2.7.4