hoversel: accessibility enhancements
Allow to dismiss hover using accessibility API. Change accessibiility role to popup.
This commit is contained in:
parent
328c7d6ba7
commit
1e0304ea43
|
@ -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"
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue