stanluk pushed a commit to branch master. http://git.enlightenment.org/core/elementary.git/commit/?id=b67ab124df4ac55bad9b4235622fc81758f47bc5
commit b67ab124df4ac55bad9b4235622fc81758f47bc5 Author: Lukasz Stanislawski <l.stanisl...@samsung.com> Date: Tue Dec 15 13:30:52 2015 +0100 hoversel: accessibility enhancements Allow to dismiss hover using accessibility API. Change accessibiility role to popup. --- src/lib/elm_hover.c | 20 +++++++++++++++++++- src/lib/elm_hover.eo | 3 ++- 2 files changed, 21 insertions(+), 2 deletions(-) diff --git a/src/lib/elm_hover.c b/src/lib/elm_hover.c index e7659a9..1216cc5 100644 --- a/src/lib/elm_hover.c +++ b/src/lib/elm_hover.c @@ -3,6 +3,7 @@ #endif #define ELM_INTERFACE_ATSPI_ACCESSIBLE_PROTECTED +#define ELM_INTERFACE_ATSPI_WIDGET_ACTION_PROTECTED #include <Elementary.h> @@ -685,7 +686,7 @@ _elm_hover_eo_base_constructor(Eo *obj, Elm_Hover_Data *_pd EINA_UNUSED) eo_do(obj, evas_obj_type_set(MY_CLASS_NAME_LEGACY), evas_obj_smart_callbacks_descriptions_set(_smart_callbacks), - elm_interface_atspi_accessible_role_set(ELM_ATSPI_ROLE_GLASS_PANE)); + elm_interface_atspi_accessible_role_set(ELM_ATSPI_ROLE_POPUP_MENU)); return obj; } @@ -836,4 +837,21 @@ _elm_hover_class_constructor(Eo_Class *klass) evas_smart_legacy_type_register(MY_CLASS_NAME_LEGACY, klass); } +static Eina_Bool +_action_dismiss(Evas_Object *obj, const char *params EINA_UNUSED) +{ + eo_do(obj, elm_obj_hover_dismiss()); + return EINA_TRUE; +} + +EOLIAN const Elm_Atspi_Action * +_elm_hover_elm_interface_atspi_widget_action_elm_actions_get(Eo *obj EINA_UNUSED, Elm_Hover_Data *pd EINA_UNUSED) +{ + static Elm_Atspi_Action atspi_actions[] = { + { "dismiss", NULL, NULL, _action_dismiss}, + { NULL, NULL, NULL, NULL} + }; + return &atspi_actions[0]; +} + #include "elm_hover.eo.c" diff --git a/src/lib/elm_hover.eo b/src/lib/elm_hover.eo index 03a84b5..65a3238 100644 --- a/src/lib/elm_hover.eo +++ b/src/lib/elm_hover.eo @@ -7,7 +7,7 @@ enum Elm.Hover.Axis both [[ELM_HOVER_AXIS_BOTH -- both.]] } -class Elm.Hover (Elm.Layout, Evas.Clickable_Interface) +class Elm.Hover (Elm.Layout, Evas.Clickable_Interface, Elm_Interface_Atspi_Widget_Action) { eo_prefix: elm_obj_hover; methods { @@ -75,6 +75,7 @@ class Elm.Hover (Elm.Layout, Evas.Clickable_Interface) Elm.Container.content_unset; Elm.Layout.sizing_eval; Elm.Layout.content_aliases.get; + Elm_Interface_Atspi_Widget_Action.elm_actions.get; } events { smart,changed; --