atspi: expose more actions through atspi bus.

Summary:
Main purpose of exposing widget actions and keyboard shortcuts
is to allow accessibility clients to implement alternative methods
of GUI navigation.

Reviewers: z.kosinski

Reviewed By: z.kosinski

Subscribers: seoz

Differential Revision: https://phab.enlightenment.org/D1227
This commit is contained in:
Lukasz Stanislawski 2014-07-25 10:33:19 +02:00
parent d22bf48eb8
commit 09b9ef0bc0
56 changed files with 565 additions and 53 deletions

View File

@ -50,6 +50,7 @@ includesunstable_HEADERS = \
elm_gen_common.h \
elm_interface_atspi_accessible.h \
elm_interface_atspi_text.h \
elm_interface_atspi_widget_action.h \
elm_interface_fileselector.h \
elm_interface_scrollable.h \
elm_widget.h \

View File

@ -11,6 +11,10 @@
#include "elm_interface_atspi_accessible.h"
#include "elm_interface_atspi_accessible.eo.h"
#define ELM_INTERFACE_ATSPI_WIDGET_ACTION_PROTECTED
#include "elm_interface_atspi_widget_action.h"
#include "elm_interface_atspi_widget_action.eo.h"
#define MY_CLASS ELM_CTXPOPUP_CLASS
#define MY_CLASS_NAME "Elm_Ctxpopup"
@ -1436,4 +1440,19 @@ _item_new(Eo *obj,
return item;
}
EOLIAN static const Elm_Atspi_Action*
_elm_ctxpopup_elm_interface_atspi_widget_action_elm_actions_get(Eo *obj EINA_UNUSED, Elm_Ctxpopup_Data *sd EINA_UNUSED)
{
static Elm_Atspi_Action atspi_actions[] = {
{ "move,previous", "move", "previous", _key_action_move},
{ "move,next", "move", "next", _key_action_move},
{ "move,left", "move", "left", _key_action_move},
{ "move,right", "move", "right", _key_action_move},
{ "move,up", "move", "up", _key_action_move},
{ "move,down", "move", "down", _key_action_move},
{ NULL, NULL, NULL, NULL }
};
return &atspi_actions[0];
}
#include "elc_ctxpopup.eo.c"

View File

@ -1,4 +1,4 @@
class Elm_Ctxpopup (Elm_Layout)
class Elm_Ctxpopup (Elm_Layout, Elm_Interface_Atspi_Widget_Action)
{
eo_prefix: elm_obj_ctxpopup;
properties {
@ -263,6 +263,7 @@ class Elm_Ctxpopup (Elm_Layout)
Elm_Container.content_unset;
Elm_Layout.sub_object_add_enable;
Elm_Layout.sizing_eval;
Elm_Interface_Atspi_Widget_Action.elm_actions.get;
}
events {
language,changed;

View File

@ -18,6 +18,10 @@
#include "elm_interface_atspi_accessible.h"
#include "elm_interface_atspi_accessible.eo.h"
#define ELM_INTERFACE_ATSPI_WIDGET_ACTION_PROTECTED
#include "elm_interface_atspi_widget_action.h"
#include "elm_interface_atspi_widget_action.eo.h"
#define MY_CLASS ELM_FILESELECTOR_CLASS
#define MY_CLASS_NAME "Elm_Fileselector"
@ -2320,4 +2324,15 @@ _elm_fileselector_class_destructor(Eo_Class *klass EINA_UNUSED)
}
}
EOLIAN const Elm_Atspi_Action *
_elm_fileselector_elm_interface_atspi_widget_action_elm_actions_get(Eo *obj EINA_UNUSED, Elm_Fileselector_Data *pd EINA_UNUSED)
{
static Elm_Atspi_Action atspi_actions[] = {
{ "select", "select", NULL, _key_action_select },
{ "escape", "escape", NULL, _key_action_escape},
{ NULL, NULL, NULL, NULL}
};
return &atspi_actions[0];
}
#include "elc_fileselector.eo.c"

View File

@ -1,4 +1,5 @@
class Elm_Fileselector (Elm_Layout, Elm_Interface_Fileselector)
class Elm_Fileselector (Elm_Layout, Elm_Interface_Fileselector,
Elm_Interface_Atspi_Widget_Action)
{
eo_prefix: elm_obj_fileselector;
properties {
@ -61,6 +62,7 @@ class Elm_Fileselector (Elm_Layout, Elm_Interface_Fileselector)
Elm_Interface_Fileselector.multi_select;
Elm_Interface_Fileselector.folder_only;
Elm_Interface_Fileselector.mode;
Elm_Interface_Atspi_Widget_Action.elm_actions.get;
}
events {
focused;

View File

@ -11,6 +11,10 @@
#include "elm_interface_atspi_accessible.h"
#include "elm_interface_atspi_accessible.eo.h"
#define ELM_INTERFACE_ATSPI_WIDGET_ACTION_PROTECTED
#include "elm_interface_atspi_widget_action.h"
#include "elm_interface_atspi_widget_action.eo.h"
#define MY_CLASS ELM_HOVERSEL_CLASS
#define MY_CLASS_NAME "Elm_Hoversel"
@ -591,4 +595,17 @@ _elm_hoversel_class_constructor(Eo_Class *klass)
evas_smart_legacy_type_register(MY_CLASS_NAME_LEGACY, klass);
}
EOLIAN const Elm_Atspi_Action *
_elm_hoversel_elm_interface_atspi_widget_action_elm_actions_get(Eo *obj EINA_UNUSED, Elm_Hoversel_Data *pd EINA_UNUSED)
{
static Elm_Atspi_Action atspi_actions[] = {
{ "move,up", "move", "up", _key_action_move},
{ "move,down", "move", "down", _key_action_move},
{ "move,left", "move", "left", _key_action_move},
{ "move,right", "move", "right", _key_action_move},
{ NULL, NULL, NULL, NULL}
};
return &atspi_actions[0];
}
#include "elc_hoversel.eo.c"

View File

@ -1,4 +1,5 @@
class Elm_Hoversel (Elm_Button, Evas.Selectable_Interface)
class Elm_Hoversel (Elm_Button, Evas.Selectable_Interface,
Elm_Interface_Atspi_Widget_Action)
{
eo_prefix: elm_obj_hoversel;
properties {
@ -149,6 +150,7 @@ class Elm_Hoversel (Elm_Button, Evas.Selectable_Interface)
Elm_Widget.translate;
Elm_Widget.event;
Elm_Button.admits_autorepeat.get;
Elm_Interface_Atspi_Widget_Action.elm_actions.get;
}
events {
selected;

View File

@ -12,6 +12,7 @@
#include "elm_interface_atspi_accessible.eo.h"
#define ELM_INTERFACE_ATSPI_WIDGET_ACTION_PROTECTED
#include "elm_interface_atspi_widget_action.h"
#include "elm_interface_atspi_widget_action.eo.h"
#define MY_CLASS ELM_NAVIFRAME_CLASS
@ -1888,10 +1889,14 @@ _elm_naviframe_class_constructor(Eo_Class *klass)
evas_smart_legacy_type_register(MY_CLASS_NAME_LEGACY, klass);
}
EOLIAN const Elm_Action *
EOLIAN const Elm_Atspi_Action *
_elm_naviframe_elm_interface_atspi_widget_action_elm_actions_get(Eo *obj EINA_UNUSED, Elm_Naviframe_Data *pd EINA_UNUSED)
{
return &key_actions[0];
static Elm_Atspi_Action atspi_actions[] = {
{ "top_item_get", "top_item_get", NULL, _key_action_top_item_get },
{ NULL, NULL, NULL, NULL }
};
return &atspi_actions[0];
}
#include "elc_naviframe.eo.c"

View File

@ -13,6 +13,10 @@
#include "elm_interface_atspi_accessible.h"
#include "elm_interface_atspi_accessible.eo.h"
#define ELM_INTERFACE_ATSPI_WIDGET_ACTION_PROTECTED
#include "elm_interface_atspi_widget_action.h"
#include "elm_interface_atspi_widget_action.eo.h"
#define MY_CLASS ELM_PLAYER_CLASS
#define MY_CLASS_NAME "Elm_Player"
@ -722,4 +726,16 @@ _elm_player_class_constructor(Eo_Class *klass)
evas_smart_legacy_type_register(MY_CLASS_NAME_LEGACY, klass);
}
EOLIAN const Elm_Atspi_Action *
_elm_player_elm_interface_atspi_widget_action_elm_actions_get(Eo *obj EINA_UNUSED, Elm_Player_Data *pd EINA_UNUSED)
{
static Elm_Atspi_Action atspi_actions[] = {
{ "move,left", "move", "left", _key_action_move},
{ "move,right", "move", "right", _key_action_move},
{ "play", "play", NULL, _key_action_play},
{ NULL, NULL, NULL, NULL}
};
return &atspi_actions[0];
}
#include "elc_player.eo.c"

View File

@ -1,4 +1,4 @@
class Elm_Player (Elm_Layout)
class Elm_Player (Elm_Layout, Elm_Interface_Atspi_Widget_Action)
{
eo_prefix: elm_obj_player;
implements {
@ -10,6 +10,7 @@ class Elm_Player (Elm_Layout)
Elm_Widget.event;
Elm_Container.content_set;
Elm_Layout.sizing_eval;
Elm_Interface_Atspi_Widget_Action.elm_actions.get;
}
events {
forward,clicked;

View File

@ -10,6 +10,10 @@
#include "elm_interface_atspi_accessible.h"
#include "elm_interface_atspi_accessible.eo.h"
#define ELM_INTERFACE_ATSPI_WIDGET_ACTION_PROTECTED
#include "elm_interface_atspi_widget_action.h"
#include "elm_interface_atspi_widget_action.eo.h"
#define MY_CLASS ELM_POPUP_CLASS
#define MY_CLASS_NAME "Elm_Popup"
@ -1692,4 +1696,19 @@ _elm_popup_class_constructor(Eo_Class *klass)
evas_smart_legacy_type_register(MY_CLASS_NAME_LEGACY, klass);
}
EOLIAN const Elm_Atspi_Action *
_elm_popup_elm_interface_atspi_widget_action_elm_actions_get(Eo *obj EINA_UNUSED, Elm_Popup_Data *pd EINA_UNUSED)
{
static Elm_Atspi_Action atspi_actions[] = {
{ "move,previous", "move", "previous", _key_action_move},
{ "move,next", "move", "next", _key_action_move},
{ "move,left", "move", "left", _key_action_move},
{ "move,right", "move", "right", _key_action_move},
{ "move,up", "move", "up", _key_action_move},
{ "move,down", "move", "down", _key_action_move},
{ NULL, NULL, NULL, NULL }
};
return &atspi_actions[0];
}
#include "elc_popup.eo.c"

View File

@ -1,4 +1,4 @@
class Elm_Popup (Elm_Layout)
class Elm_Popup (Elm_Layout, Elm_Interface_Atspi_Widget_Action)
{
eo_prefix: elm_obj_popup;
properties {
@ -177,6 +177,7 @@ class Elm_Popup (Elm_Layout)
Elm_Layout.text_set;
Elm_Layout.text_get;
Elm_Layout.sizing_eval;
Elm_Interface_Atspi_Widget_Action.elm_actions.get;
}
events {
block,clicked;

View File

@ -921,7 +921,8 @@ _action_localized_name_get(const Eldbus_Service_Interface *iface, const Eldbus_M
static Eldbus_Message *
_action_key_binding_get(const Eldbus_Service_Interface *iface, const Eldbus_Message *msg)
{
const char *key, *obj_path = eldbus_service_object_path_get(iface);
const char *obj_path = eldbus_service_object_path_get(iface);
char *key;
Eo *obj = _access_object_from_path(obj_path);
int idx;
Eldbus_Message *ret;
@ -933,8 +934,8 @@ _action_key_binding_get(const Eldbus_Service_Interface *iface, const Eldbus_Mess
EINA_SAFETY_ON_NULL_RETURN_VAL(ret, NULL);
eo_do(obj, key = elm_interface_atspi_action_keybinding_get(idx));
key = key ? key : "";
eldbus_message_arguments_append(ret, "s", key);
eldbus_message_arguments_append(ret, "s", key ? key : "");
if (key) free(key);
return ret;
}
@ -962,12 +963,13 @@ _action_actions_get(const Eldbus_Service_Interface *iface, const Eldbus_Message
int id = 0;
EINA_LIST_FREE(actions, action)
{
const char *key, *descr;
const char *descr;
char *key;
eo_do(obj, key = elm_interface_atspi_action_keybinding_get(id));
key = key ? key : "";
eo_do(obj, descr = elm_interface_atspi_action_description_get(id));
descr = descr ? descr : "";
eldbus_message_iter_arguments_append(iter_array, "sss", action, descr, key);
eldbus_message_iter_arguments_append(iter_array, "sss", action, descr, key ? key : "");
if (key) free(key);
id++;
}

View File

@ -11,6 +11,7 @@
// ATSPI Accessibility
#define ELM_INTERFACE_ATSPI_WIDGET_ACTION_PROTECTED
#include "elm_interface_atspi_widget_action.h"
#include "elm_interface_atspi_widget_action.eo.h"
#define ELM_INTERFACE_ATSPI_ACCESSIBLE_PROTECTED
@ -427,10 +428,14 @@ _elm_button_elm_widget_focus_direction_manager_is(Eo *obj EINA_UNUSED, Elm_Butto
return EINA_FALSE;
}
EOLIAN const Elm_Action *
EOLIAN const Elm_Atspi_Action *
_elm_button_elm_interface_atspi_widget_action_elm_actions_get(Eo *obj EINA_UNUSED, Elm_Button_Data *pd EINA_UNUSED)
{
return &key_actions[0];
static Elm_Atspi_Action atspi_actions[] = {
{ "activate", "activate", NULL, _key_action_activate },
{ NULL, NULL, NULL, NULL}
};
return &atspi_actions[0];
}
static void

View File

@ -10,6 +10,10 @@
#include "elm_interface_atspi_accessible.h"
#include "elm_interface_atspi_accessible.eo.h"
#define ELM_INTERFACE_ATSPI_WIDGET_ACTION_PROTECTED
#include "elm_interface_atspi_widget_action.h"
#include "elm_interface_atspi_widget_action.eo.h"
#define MY_CLASS ELM_CALENDAR_CLASS
#define MY_CLASS_NAME "Elm_Calendar"
@ -1435,4 +1439,19 @@ _elm_calendar_class_constructor(Eo_Class *klass)
_elm_calendar_smart_focus_next_enable = EINA_TRUE;
}
EOLIAN static const Elm_Atspi_Action*
_elm_calendar_elm_interface_atspi_widget_action_elm_actions_get(Eo *obj EINA_UNUSED, Elm_Calendar_Data *sd EINA_UNUSED)
{
static Elm_Atspi_Action atspi_actions[] = {
{ "move,prior", "move", "prior", _key_action_move},
{ "move,next", "move", "next", _key_action_move},
{ "move,left", "move", "left", _key_action_move},
{ "move,right", "move", "right", _key_action_move},
{ "move,up", "move", "up", _key_action_move},
{ "move,down", "move", "down", _key_action_move},
{ NULL, NULL, NULL, NULL }
};
return &atspi_actions[0];
}
#include "elm_calendar.eo.c"

View File

@ -1,4 +1,4 @@
class Elm_Calendar (Elm_Layout)
class Elm_Calendar (Elm_Layout, Elm_Interface_Atspi_Widget_Action)
{
eo_prefix: elm_obj_calendar;
properties {
@ -402,6 +402,7 @@ class Elm_Calendar (Elm_Layout)
Elm_Widget.focus_next;
Elm_Widget.event;
Elm_Layout.sizing_eval;
Elm_Interface_Atspi_Widget_Action.elm_actions.get;
}
events {
changed;

View File

@ -13,6 +13,7 @@
#include "elm_interface_atspi_accessible.eo.h"
#define ELM_INTERFACE_ATSPI_WIDGET_ACTION_PROTECTED
#include "elm_interface_atspi_widget_action.h"
#include "elm_interface_atspi_widget_action.eo.h"
#define MY_CLASS ELM_CHECK_CLASS
@ -437,10 +438,14 @@ _elm_check_elm_widget_focus_direction_manager_is(Eo *obj EINA_UNUSED, Elm_Check_
return EINA_FALSE;
}
EOLIAN const Elm_Action *
EOLIAN const Elm_Atspi_Action *
_elm_check_elm_interface_atspi_widget_action_elm_actions_get(Eo *obj EINA_UNUSED, Elm_Check_Data *pd EINA_UNUSED)
{
return &key_actions[0];
static Elm_Atspi_Action atspi_action[] = {
{ "activate", "activate", NULL, _key_action_activate },
{ NULL, NULL, NULL, NULL }
};
return &atspi_action[0];
}
static void

View File

@ -10,6 +10,10 @@
#include "elm_interface_atspi_accessible.h"
#include "elm_interface_atspi_accessible.eo.h"
#define ELM_INTERFACE_ATSPI_WIDGET_ACTION_PROTECTED
#include "elm_interface_atspi_widget_action.h"
#include "elm_interface_atspi_widget_action.eo.h"
#define MY_CLASS ELM_COLORSELECTOR_CLASS
#define MY_CLASS_NAME "Elm_Colorselector"
@ -2145,4 +2149,17 @@ _elm_colorselector_class_constructor(Eo_Class *klass)
_elm_colorselector_smart_focus_next_enable = EINA_TRUE;
}
EOLIAN static const Elm_Atspi_Action*
_elm_colorselector_elm_interface_atspi_widget_action_elm_actions_get(Eo *obj EINA_UNUSED, Elm_Colorselector_Data *sd EINA_UNUSED)
{
static Elm_Atspi_Action atspi_actions[] = {
{ "move,left", "move", "left", _key_action_move},
{ "move,right", "move", "right", _key_action_move},
{ "move,up", "move", "up", _key_action_move},
{ "move,down", "move", "down", _key_action_move},
{ NULL, NULL, NULL, NULL }
};
return &atspi_actions[0];
}
#include "elm_colorselector.eo.c"

View File

@ -1,4 +1,4 @@
class Elm_Colorselector (Elm_Layout)
class Elm_Colorselector (Elm_Layout, Elm_Interface_Atspi_Widget_Action)
{
eo_prefix: elm_obj_colorselector;
properties {
@ -135,6 +135,7 @@ class Elm_Colorselector (Elm_Layout)
Elm_Widget.access;
Elm_Widget.event;
Elm_Layout.sizing_eval;
Elm_Interface_Atspi_Widget_Action.elm_actions.get;
}
events {
color,item,selected;

View File

@ -11,6 +11,10 @@
#include "elm_interface_atspi_accessible.h"
#include "elm_interface_atspi_accessible.eo.h"
#define ELM_INTERFACE_ATSPI_WIDGET_ACTION_PROTECTED
#include "elm_interface_atspi_widget_action.h"
#include "elm_interface_atspi_widget_action.eo.h"
#define DISPLAY_ITEM_NUM_MIN 3
#define MY_CLASS ELM_DISKSELECTOR_CLASS
@ -1787,4 +1791,17 @@ _elm_diskselector_class_constructor(Eo_Class *klass)
_elm_diskselector_smart_focus_next_enable = EINA_TRUE;
}
EOLIAN static const Elm_Atspi_Action*
_elm_diskselector_elm_interface_atspi_widget_action_elm_actions_get(Eo *obj EINA_UNUSED, Elm_Diskselector_Data *sd EINA_UNUSED)
{
static Elm_Atspi_Action atspi_actions[] = {
{ "move,previous", "move", "prev", _key_action_move},
{ "move,next", "move", "next", _key_action_move},
{ "move,first", "move", "first", _key_action_move},
{ "move,last", "move", "last", _key_action_move},
{ NULL, NULL, NULL, NULL }
};
return &atspi_actions[0];
}
#include "elm_diskselector.eo.c"

View File

@ -1,4 +1,5 @@
class Elm_Diskselector (Elm_Widget, Elm_Interface_Scrollable)
class Elm_Diskselector (Elm_Widget, Elm_Interface_Scrollable,
Elm_Interface_Atspi_Widget_Action)
{
eo_prefix: elm_obj_diskselector;
properties {
@ -249,6 +250,7 @@ class Elm_Diskselector (Elm_Widget, Elm_Interface_Scrollable)
Elm_Widget.sub_object_del;
Elm_Widget.event;
Elm_Interface_Scrollable.policy;
Elm_Interface_Atspi_Widget_Action.elm_actions.get;
}
events {
selected;

View File

@ -11,6 +11,10 @@
#include "elm_interface_atspi_accessible.h"
#include "elm_interface_atspi_accessible.eo.h"
#define ELM_INTERFACE_ATSPI_WIDGET_ACTION_PROTECTED
#include "elm_interface_atspi_widget_action.h"
#include "elm_interface_atspi_widget_action.eo.h"
#define MY_CLASS ELM_FLIPSELECTOR_CLASS
#define MY_CLASS_NAME "Elm_Flipselector"
@ -862,4 +866,15 @@ _elm_flipselector_class_constructor(Eo_Class *klass)
evas_smart_legacy_type_register(MY_CLASS_NAME_LEGACY, klass);
}
EOLIAN const Elm_Atspi_Action *
_elm_flipselector_elm_interface_atspi_widget_action_elm_actions_get(Eo *obj EINA_UNUSED, Elm_Flipselector_Data *pd EINA_UNUSED)
{
static Elm_Atspi_Action atspi_actions[] = {
{ "flip,up", "flip", "up", _key_action_flip},
{ "flip,down", "flip", "down", _key_action_flip},
{ NULL, NULL, NULL, NULL}
};
return &atspi_actions[0];
}
#include "elm_flipselector.eo.c"

View File

@ -1,4 +1,4 @@
class Elm_Flipselector (Elm_Layout)
class Elm_Flipselector (Elm_Layout, Elm_Interface_Atspi_Widget_Action)
{
eo_prefix: elm_obj_flipselector;
properties {
@ -202,6 +202,7 @@ class Elm_Flipselector (Elm_Layout)
Elm_Widget.focus_direction_manager_is;
Elm_Widget.event;
Elm_Layout.sizing_eval;
Elm_Interface_Atspi_Widget_Action.elm_actions.get;
}
events {
selected;

View File

@ -12,6 +12,10 @@
#include "elm_interface_atspi_accessible.h"
#include "elm_interface_atspi_accessible.eo.h"
#define ELM_INTERFACE_ATSPI_WIDGET_ACTION_PROTECTED
#include "elm_interface_atspi_widget_action.h"
#include "elm_interface_atspi_widget_action.eo.h"
#define MY_PAN_CLASS ELM_GENGRID_PAN_CLASS
#define MY_PAN_CLASS_NAME "Elm_Gengrid_Pan"
@ -4795,4 +4799,27 @@ _elm_gengrid_class_constructor(Eo_Class *klass)
evas_smart_legacy_type_register(MY_CLASS_NAME_LEGACY, klass);
}
EOLIAN const Elm_Atspi_Action *
_elm_gengrid_elm_interface_atspi_widget_action_elm_actions_get(Eo *obj EINA_UNUSED, Elm_Gengrid_Data *pd EINA_UNUSED)
{
static Elm_Atspi_Action atspi_actions[] = {
{ "move,prior", "move", "prior", _key_action_move},
{ "move,next", "move", "next", _key_action_move},
{ "move,left", "move", "left", _key_action_move},
{ "move,left,multi", "move", "left_multi", _key_action_move},
{ "move,right", "move", "right", _key_action_move},
{ "move,right,multi", "move", "right_multi", _key_action_move},
{ "move,up", "move", "up", _key_action_move},
{ "move,up,multi", "move", "up_multi", _key_action_move},
{ "move,down", "move", "down", _key_action_move},
{ "move,down,multi", "move", "down_multi", _key_action_move},
{ "move,first", "move", "first", _key_action_move},
{ "move,last", "move", "last", _key_action_move},
{ "select", "select", NULL, _key_action_select},
{ "escape", "escape", NULL, _key_action_escape},
{ NULL, NULL, NULL, NULL }
};
return &atspi_actions[0];
}
#include "elm_gengrid.eo.c"

View File

@ -15,6 +15,10 @@
#include "elm_interface_atspi_accessible.h"
#include "elm_interface_atspi_accessible.eo.h"
#define ELM_INTERFACE_ATSPI_WIDGET_ACTION_PROTECTED
#include "elm_interface_atspi_widget_action.h"
#include "elm_interface_atspi_widget_action.eo.h"
#define MY_PAN_CLASS ELM_GENLIST_PAN_CLASS
#define MY_PAN_CLASS_NAME "Elm_Genlist_Pan"
@ -7621,4 +7625,25 @@ _elm_genlist_class_constructor(Eo_Class *klass)
evas_smart_legacy_type_register(MY_CLASS_NAME_LEGACY, klass);
}
EOLIAN const Elm_Atspi_Action *
_elm_genlist_elm_interface_atspi_widget_action_elm_actions_get(Eo *obj EINA_UNUSED, Elm_Genlist_Data *pd EINA_UNUSED)
{
static Elm_Atspi_Action atspi_actions[] = {
{ "move,prior", "move", "prior", _key_action_move},
{ "move,next", "move", "next", _key_action_move},
{ "move,left", "move", "left", _key_action_move},
{ "move,right", "move", "right", _key_action_move},
{ "move,up", "move", "up", _key_action_move},
{ "move,up,multi", "move", "up_multi", _key_action_move},
{ "move,down", "move", "down", _key_action_move},
{ "move,down,multi", "move", "down_multi", _key_action_move},
{ "move,first", "move", "first", _key_action_move},
{ "move,last", "move", "last", _key_action_move},
{ "select", "select", NULL, _key_action_select},
{ "escape", "escape", NULL, _key_action_escape},
{ NULL, NULL, NULL, NULL }
};
return &atspi_actions[0];
}
#include "elm_genlist.eo.c"

View File

@ -1,4 +1,5 @@
class Elm_Genlist (Elm_Layout, Elm_Interface_Scrollable, Evas.Clickable_Interface)
class Elm_Genlist (Elm_Layout, Elm_Interface_Scrollable, Evas.Clickable_Interface,
Elm_Interface_Atspi_Widget_Action)
{
eo_prefix: elm_obj_genlist;
properties {
@ -727,6 +728,7 @@ class Elm_Genlist (Elm_Layout, Elm_Interface_Scrollable, Evas.Clickable_Interfac
Elm_Layout.sizing_eval;
Elm_Interface_Scrollable.bounce_allow;
Elm_Interface_Scrollable.policy;
Elm_Interface_Atspi_Widget_Action.elm_actions.get;
}
events {
language,changed;

View File

@ -15,6 +15,7 @@
#include "elm_interface_atspi_accessible.eo.h"
#define ELM_INTERFACE_ATSPI_WIDGET_ACTION_PROTECTED
#include "elm_interface_atspi_widget_action.h"
#include "elm_interface_atspi_widget_action.eo.h"
#define FMT_SIZE_T "%zu"
@ -1345,10 +1346,14 @@ _elm_image_elm_interface_atspi_image_extents_get(Eo *obj, Elm_Image_Data *sd EIN
elm_image_object_size_get(obj, w, h);
}
EOLIAN const Elm_Action *
EOLIAN const Elm_Atspi_Action *
_elm_image_elm_interface_atspi_widget_action_elm_actions_get(Eo *obj EINA_UNUSED, Elm_Image_Data *pd EINA_UNUSED)
{
return &key_actions[0];
static Elm_Atspi_Action atspi_actions[] = {
{ "activate", "activate", NULL, _key_action_activate },
{ NULL, NULL, NULL, NULL },
};
return &atspi_actions[0];
}

View File

@ -59,11 +59,12 @@ mixin Elm_Interface_Atspi_Action ()
return bool;
}
keybinding_get @protected {
/*@ Gets configured keybinding for specific action and widget. */
/*@ Gets configured keybinding for specific action and widget.
returned pointer should be free by a user.*/
params {
@in int id;
}
return const(char)*;
return char*;
}
}
implements {

View File

@ -10,6 +10,7 @@
#define ELM_INTERFACE_ATSPI_WIDGET_ACTION_PROTECTED
#include "elm_interface_atspi_action.eo.h"
#include "elm_interface_atspi_widget_action.h"
#include "elm_interface_atspi_widget_action.eo.h"
extern Eina_Hash *_elm_key_bindings;
@ -17,7 +18,8 @@ extern Eina_Hash *_elm_key_bindings;
EOLIAN static Eina_Bool
_elm_interface_atspi_widget_action_elm_interface_atspi_action_action_do(Eo *obj, void *pd EINA_UNUSED, int id)
{
const Elm_Action *actions = NULL;
const Elm_Atspi_Action *actions = NULL;
const char *param;
Eina_Bool (*func)(Eo *eo, const char *params) = NULL;
int tmp = 0;
@ -29,6 +31,7 @@ _elm_interface_atspi_widget_action_elm_interface_atspi_action_action_do(Eo *obj,
if (tmp == id)
{
func = actions[tmp].func;
param = actions[tmp].param;
break;
}
tmp++;
@ -37,15 +40,15 @@ _elm_interface_atspi_widget_action_elm_interface_atspi_action_action_do(Eo *obj,
if (!func)
return EINA_FALSE;
return func(obj, NULL);
return func(obj, param);
}
EOLIAN static const char *
EOLIAN static char*
_elm_interface_atspi_widget_action_elm_interface_atspi_action_keybinding_get(Eo *obj, void *pd EINA_UNUSED, int id)
{
const Elm_Action *actions = NULL;
Eina_List *l, *binding_list;
const char *action = NULL;
const Elm_Atspi_Action *actions = NULL;
Eina_List *l1, *binding_list;
const char *action = NULL, *param = NULL;
Elm_Config_Binding_Key *binding;
int tmp = 0;
@ -59,7 +62,8 @@ _elm_interface_atspi_widget_action_elm_interface_atspi_action_keybinding_get(Eo
{
if (tmp == id)
{
action = actions->name;
action = actions[tmp].action;
param = actions[tmp].param;
break;
}
tmp++;
@ -70,10 +74,22 @@ _elm_interface_atspi_widget_action_elm_interface_atspi_action_keybinding_get(Eo
if (binding_list)
{
EINA_LIST_FOREACH(binding_list, l, binding)
EINA_LIST_FOREACH(binding_list, l1, binding)
{
if (!strcmp(binding->action, action))
return binding->key;
if (!strcmp(binding->action, action) && (!param ||
!strcmp(binding->params, param)))
{
Eina_List *l2;
Elm_Config_Binding_Modifier *bm;
char *ret;
Eina_Strbuf *buf = eina_strbuf_new();
eina_strbuf_append_printf(buf, "%s", binding->key);
EINA_LIST_FOREACH(binding->modifiers, l2, bm)
if (bm->flag) eina_strbuf_append_printf(buf, "+%s", bm->mod);
ret = eina_strbuf_string_steal(buf);
eina_strbuf_free(buf);
return ret;
}
}
}
@ -83,7 +99,7 @@ _elm_interface_atspi_widget_action_elm_interface_atspi_action_keybinding_get(Eo
EOLIAN static const char *
_elm_interface_atspi_widget_action_elm_interface_atspi_action_name_get(Eo *obj, void *pd EINA_UNUSED, int id)
{
const Elm_Action *actions = NULL;
const Elm_Atspi_Action *actions = NULL;
int tmp = 0;
eo_do(obj, actions = elm_interface_atspi_widget_action_elm_actions_get());
@ -91,7 +107,7 @@ _elm_interface_atspi_widget_action_elm_interface_atspi_action_name_get(Eo *obj,
while (actions[tmp].name)
{
if (tmp == id) return actions->name;
if (tmp == id) return actions[tmp].name;
tmp++;
}
return NULL;
@ -112,7 +128,7 @@ _elm_interface_atspi_widget_action_elm_interface_atspi_action_description_get(Eo
EOLIAN static Eina_List*
_elm_interface_atspi_widget_action_elm_interface_atspi_action_actions_get(Eo *obj, void *pd EINA_UNUSED)
{
const Elm_Action *actions = NULL;
const Elm_Atspi_Action *actions = NULL;
Eina_List *ret = NULL;
int tmp = 0;

View File

@ -8,7 +8,7 @@ mixin Elm_Interface_Atspi_Widget_Action (Elm_Interface_Atspi_Action)
get {
}
values {
const(Elm_Action)* actions; /*@ NULL-terminated array of Elm_Actions
const(Elm_Atspi_Action)* actions; /*@ NULL-terminated array of Elm_Actions
*/
}
}

View File

@ -0,0 +1,10 @@
struct _Elm_Atspi_Action
{
const char *name;
const char *action;
const char *param;
Eina_Bool (*func)(Evas_Object *obj, const char *params);
};
typedef struct _Elm_Atspi_Action Elm_Atspi_Action;

View File

@ -12,6 +12,10 @@
#include "elm_interface_atspi_accessible.h"
#include "elm_interface_atspi_accessible.eo.h"
#define ELM_INTERFACE_ATSPI_WIDGET_ACTION_PROTECTED
#include "elm_interface_atspi_widget_action.h"
#include "elm_interface_atspi_widget_action.eo.h"
#define MY_CLASS ELM_LIST_CLASS
#define MY_CLASS_NAME "Elm_List"
@ -2985,4 +2989,27 @@ _elm_list_class_constructor(Eo_Class *klass)
evas_smart_legacy_type_register(MY_CLASS_NAME_LEGACY, klass);
}
EOLIAN const Elm_Atspi_Action *
_elm_list_elm_interface_atspi_widget_action_elm_actions_get(Eo *obj EINA_UNUSED, Elm_List_Data *pd EINA_UNUSED)
{
static Elm_Atspi_Action atspi_actions[] = {
{ "move,prior", "move", "prior", _key_action_move},
{ "move,next", "move", "next", _key_action_move},
{ "move,left", "move", "left", _key_action_move},
{ "move,left,multi", "move", "left_multi", _key_action_move},
{ "move,right", "move", "right", _key_action_move},
{ "move,right,multi", "move", "right_multi", _key_action_move},
{ "move,up", "move", "up", _key_action_move},
{ "move,up,multi", "move", "up_multi", _key_action_move},
{ "move,down", "move", "down", _key_action_move},
{ "move,down,multi", "move", "down_multi", _key_action_move},
{ "move,first", "move", "first", _key_action_move},
{ "move,last", "move", "last", _key_action_move},
{ "select", "select", NULL, _key_action_select},
{ "escape", "escape", NULL, _key_action_escape},
{ NULL, NULL, NULL, NULL }
};
return &atspi_actions[0];
}
#include "elm_list.eo.c"

View File

@ -1,4 +1,5 @@
class Elm_List (Elm_Layout, Elm_Interface_Scrollable)
class Elm_List (Elm_Layout, Elm_Interface_Scrollable,
Elm_Interface_Atspi_Widget_Action)
{
eo_prefix: elm_obj_list;
properties {
@ -607,6 +608,7 @@ class Elm_List (Elm_Layout, Elm_Interface_Scrollable)
Elm_Widget.item_loop_enabled.get;
Elm_Layout.sizing_eval;
Elm_Interface_Scrollable.policy.set;
Elm_Interface_Atspi_Widget_Action.elm_actions.get;
}
events {
activated;

View File

@ -12,6 +12,10 @@
#include "elm_interface_atspi_accessible.h"
#include "elm_interface_atspi_accessible.eo.h"
#define ELM_INTERFACE_ATSPI_WIDGET_ACTION_PROTECTED
#include "elm_interface_atspi_widget_action.h"
#include "elm_interface_atspi_widget_action.eo.h"
#define MY_PAN_CLASS ELM_MAP_PAN_CLASS
#define MY_PAN_CLASS_NAME "Elm_Map_Pan"
@ -5501,4 +5505,21 @@ _elm_map_class_constructor(Eo_Class *klass)
evas_smart_legacy_type_register(MY_CLASS_NAME_LEGACY, klass);
}
EOLIAN const Elm_Atspi_Action *
_elm_map_elm_interface_atspi_widget_action_elm_actions_get(Eo *obj EINA_UNUSED, Elm_Map_Data *pd EINA_UNUSED)
{
static Elm_Atspi_Action atspi_actions[] = {
{ "move,prior", "move", "prior", _key_action_move},
{ "move,next", "move", "next", _key_action_move},
{ "move,left", "move", "left", _key_action_move},
{ "move,right", "move", "right", _key_action_move},
{ "move,up", "move", "up", _key_action_move},
{ "move,down", "move", "down", _key_action_move},
{ "zoom,in", "zoom", "in", _key_action_zoom},
{ "zoom,out", "zoom", "out", _key_action_zoom},
{ NULL, NULL, NULL, NULL }
};
return &atspi_actions[0];
}
#include "elm_map.eo.c"

View File

@ -1,4 +1,5 @@
class Elm_Map (Elm_Widget, Elm_Interface_Scrollable)
class Elm_Map (Elm_Widget, Elm_Interface_Scrollable,
Elm_Interface_Atspi_Widget_Action)
{
eo_prefix: elm_obj_map;
properties {
@ -780,6 +781,7 @@ class Elm_Map (Elm_Widget, Elm_Interface_Scrollable)
Elm_Widget.theme_apply;
Elm_Widget.on_focus;
Elm_Widget.event;
Elm_Interface_Atspi_Widget_Action.elm_actions.get;
}
events {
clicked;

View File

@ -13,6 +13,10 @@
#include "elm_interface_atspi_accessible.h"
#include "elm_interface_atspi_accessible.eo.h"
#define ELM_INTERFACE_ATSPI_WIDGET_ACTION_PROTECTED
#include "elm_interface_atspi_widget_action.h"
#include "elm_interface_atspi_widget_action.eo.h"
#define MY_CLASS ELM_PANEL_CLASS
#define MY_CLASS_NAME "Elm_Panel"
@ -1387,4 +1391,14 @@ _elm_panel_class_constructor(Eo_Class *klass)
evas_smart_legacy_type_register(MY_CLASS_NAME_LEGACY, klass);
}
EOLIAN const Elm_Atspi_Action *
_elm_panel_elm_interface_atspi_widget_action_elm_actions_get(Eo *obj EINA_UNUSED, Elm_Panel_Data *pd EINA_UNUSED)
{
static Elm_Atspi_Action atspi_actions[] = {
{ "toggle", "toggle", NULL, _key_action_toggle},
{ NULL, NULL, NULL, NULL }
};
return &atspi_actions[0];
}
#include "elm_panel.eo.c"

View File

@ -1,4 +1,5 @@
class Elm_Panel (Elm_Layout, Elm_Interface_Scrollable)
class Elm_Panel (Elm_Layout, Elm_Interface_Scrollable,
Elm_Interface_Atspi_Widget_Action)
{
eo_prefix: elm_obj_panel;
properties {
@ -96,6 +97,7 @@ class Elm_Panel (Elm_Layout, Elm_Interface_Scrollable)
Elm_Container.content_unset;
Elm_Container.content_set;
Elm_Layout.sizing_eval;
Elm_Interface_Atspi_Widget_Action.elm_actions.get;
}
events {
focused;

View File

@ -12,6 +12,10 @@
#include "elm_interface_atspi_accessible.h"
#include "elm_interface_atspi_accessible.eo.h"
#define ELM_INTERFACE_ATSPI_WIDGET_ACTION_PROTECTED
#include "elm_interface_atspi_widget_action.h"
#include "elm_interface_atspi_widget_action.eo.h"
#define MY_PAN_CLASS ELM_PHOTOCAM_PAN_CLASS
#define MY_PAN_CLASS_NAME "Elm_Photocam_Pan"
@ -2075,4 +2079,21 @@ _elm_photocam_class_constructor(Eo_Class *klass)
evas_smart_legacy_type_register(MY_CLASS_NAME_LEGACY, klass);
}
EOLIAN const Elm_Atspi_Action *
_elm_photocam_elm_interface_atspi_widget_action_elm_actions_get(Eo *obj EINA_UNUSED, Elm_Photocam_Data *pd EINA_UNUSED)
{
static Elm_Atspi_Action atspi_actions[] = {
{ "move,prior", "move", "prior", _key_action_move},
{ "move,next", "move", "next", _key_action_move},
{ "move,left", "move", "left", _key_action_move},
{ "move,right", "move", "right", _key_action_move},
{ "move,up", "move", "up", _key_action_move},
{ "move,down", "move", "down", _key_action_move},
{ "zoom,in", "zoom", "in", _key_action_zoom},
{ "zoom,out", "zoom", "out", _key_action_zoom},
{ NULL, NULL, NULL, NULL }
};
return &atspi_actions[0];
}
#include "elm_photocam.eo.c"

View File

@ -1,4 +1,5 @@
class Elm_Photocam (Elm_Widget, Elm_Interface_Scrollable)
class Elm_Photocam (Elm_Widget, Elm_Interface_Scrollable,
Elm_Interface_Atspi_Widget_Action)
{
eo_prefix: elm_obj_photocam;
properties {
@ -234,6 +235,7 @@ class Elm_Photocam (Elm_Widget, Elm_Interface_Scrollable)
Elm_Widget.on_focus;
Elm_Widget.event;
Elm_Interface_Scrollable.region_bring_in;
Elm_Interface_Atspi_Widget_Action.elm_actions.get;
}
events {
clicked;

View File

@ -12,6 +12,10 @@
#include "elm_interface_atspi_accessible.h"
#include "elm_interface_atspi_accessible.eo.h"
#define ELM_INTERFACE_ATSPI_WIDGET_ACTION_PROTECTED
#include "elm_interface_atspi_widget_action.h"
#include "elm_interface_atspi_widget_action.eo.h"
#define MY_CLASS ELM_RADIO_CLASS
#define MY_CLASS_NAME "Elm_Radio"
@ -444,4 +448,14 @@ _elm_radio_class_constructor(Eo_Class *klass)
evas_smart_legacy_type_register(MY_CLASS_NAME_LEGACY, klass);
}
EOLIAN const Elm_Atspi_Action *
_elm_radio_elm_interface_atspi_widget_action_elm_actions_get(Eo *obj EINA_UNUSED, Elm_Radio_Data *pd EINA_UNUSED)
{
static Elm_Atspi_Action atspi_actions[] = {
{ "activate", "activate", NULL, _key_action_activate},
{ NULL, NULL, NULL, NULL }
};
return &atspi_actions[0];
}
#include "elm_radio.eo.c"

View File

@ -1,4 +1,4 @@
class Elm_Radio (Elm_Layout)
class Elm_Radio (Elm_Layout, Elm_Interface_Atspi_Widget_Action)
{
eo_prefix: elm_obj_radio;
properties {
@ -112,6 +112,7 @@ class Elm_Radio (Elm_Layout)
Elm_Layout.text_aliases.get;
Elm_Layout.content_aliases.get;
Elm_Layout.sizing_eval;
Elm_Interface_Atspi_Widget_Action.elm_actions.get;
}
events {
changed;

View File

@ -13,6 +13,10 @@
#include "elm_interface_atspi_accessible.h"
#include "elm_interface_atspi_accessible.eo.h"
#define ELM_INTERFACE_ATSPI_WIDGET_ACTION_PROTECTED
#include "elm_interface_atspi_widget_action.h"
#include "elm_interface_atspi_widget_action.eo.h"
#define MY_CLASS ELM_SCROLLER_CLASS
#define MY_CLASS_NAME "Elm_Scroller"
@ -1128,4 +1132,21 @@ _elm_scroller_class_constructor(Eo_Class *klass)
evas_smart_legacy_type_register(MY_CLASS_NAME_LEGACY, klass);
}
EOLIAN const Elm_Atspi_Action *
_elm_scroller_elm_interface_atspi_widget_action_elm_actions_get(Eo *obj EINA_UNUSED, Elm_Scroller_Data *pd EINA_UNUSED)
{
static Elm_Atspi_Action atspi_actions[] = {
{ "move,prior", "move", "prior", _key_action_move},
{ "move,next", "move", "next", _key_action_move},
{ "move,left", "move", "left", _key_action_move},
{ "move,right", "move", "right", _key_action_move},
{ "move,up", "move", "up", _key_action_move},
{ "move,down", "move", "down", _key_action_move},
{ "move,first", "move", "first", _key_action_move},
{ "move,last", "move", "last", _key_action_move},
{ NULL, NULL, NULL, NULL }
};
return &atspi_actions[0];
}
#include "elm_scroller.eo.c"

View File

@ -1,4 +1,5 @@
class Elm_Scroller (Elm_Layout, Elm_Interface_Scrollable)
class Elm_Scroller (Elm_Layout, Elm_Interface_Scrollable,
Elm_Interface_Atspi_Widget_Action)
{
eo_prefix: elm_obj_scroller;
properties {
@ -92,6 +93,7 @@ class Elm_Scroller (Elm_Layout, Elm_Interface_Scrollable)
Elm_Interface_Scrollable.page_size.set;
Elm_Interface_Scrollable.policy.set;
Elm_Interface_Scrollable.single_direction;
Elm_Interface_Atspi_Widget_Action.elm_actions.get;
}
events {
focused;

View File

@ -12,6 +12,10 @@
#include "elm_interface_atspi_accessible.h"
#include "elm_interface_atspi_accessible.eo.h"
#define ELM_INTERFACE_ATSPI_WIDGET_ACTION_PROTECTED
#include "elm_interface_atspi_widget_action.h"
#include "elm_interface_atspi_widget_action.eo.h"
#define ELM_INTERFACE_ATSPI_VALUE_PROTECTED
#include "elm_interface_atspi_value.eo.h"
@ -1236,6 +1240,19 @@ _elm_slider_elm_interface_atspi_value_increment_get(Eo *obj EINA_UNUSED, Elm_Sli
return sd->step;
}
EOLIAN const Elm_Atspi_Action *
_elm_slider_elm_interface_atspi_widget_action_elm_actions_get(Eo *obj EINA_UNUSED, Elm_Slider_Data *pd EINA_UNUSED)
{
static Elm_Atspi_Action atspi_actions[] = {
{ "drag,left", "drag", "left", _key_action_drag},
{ "drag,right", "drag", "right", _key_action_drag},
{ "drag,up", "drag", "up", _key_action_drag},
{ "drag,down", "drag", "down", _key_action_drag},
{ NULL, NULL, NULL, NULL}
};
return &atspi_actions[0];
}
// A11Y Accessibility - END
#include "elm_slider.eo.c"

View File

@ -1,4 +1,5 @@
class Elm_Slider (Elm_Layout, Elm_Interface_Atspi_Value)
class Elm_Slider (Elm_Layout, Elm_Interface_Atspi_Value,
Elm_Interface_Atspi_Widget_Action)
{
eo_prefix: elm_obj_slider;
properties {
@ -379,6 +380,7 @@ class Elm_Slider (Elm_Layout, Elm_Interface_Atspi_Value)
Elm_Interface_Atspi_Value.value_and_text.set;
Elm_Interface_Atspi_Value.range.get;
Elm_Interface_Atspi_Value.increment.get;
Elm_Interface_Atspi_Widget_Action.elm_actions.get;
}
events {
changed;

View File

@ -11,6 +11,10 @@
#include "elm_interface_atspi_accessible.h"
#include "elm_interface_atspi_accessible.eo.h"
#define ELM_INTERFACE_ATSPI_WIDGET_ACTION_PROTECTED
#include "elm_interface_atspi_widget_action.h"
#include "elm_interface_atspi_widget_action.eo.h"
#define MY_CLASS ELM_SLIDESHOW_CLASS
#define MY_CLASS_NAME "Elm_Slideshow"
@ -712,4 +716,16 @@ _elm_slideshow_class_constructor(Eo_Class *klass)
evas_smart_legacy_type_register(MY_CLASS_NAME_LEGACY, klass);
}
EOLIAN static const Elm_Atspi_Action*
_elm_slideshow_elm_interface_atspi_widget_action_elm_actions_get(Eo *obj EINA_UNUSED, Elm_Slideshow_Data *sd EINA_UNUSED)
{
static Elm_Atspi_Action atspi_actions[] = {
{ "move,left", "move", "left", _key_action_move},
{ "move,right", "move", "right", _key_action_move},
{ "pause", "pause", NULL, _key_action_pause},
{ NULL, NULL, NULL, NULL }
};
return &atspi_actions[0];
}
#include "elm_slideshow.eo.c"

View File

@ -1,4 +1,4 @@
class Elm_Slideshow (Elm_Layout)
class Elm_Slideshow (Elm_Layout, Elm_Interface_Atspi_Widget_Action)
{
eo_prefix: elm_obj_slideshow;
properties {
@ -424,6 +424,7 @@ class Elm_Slideshow (Elm_Layout)
Elm_Widget.focus_direction_manager_is;
Elm_Widget.event;
Elm_Layout.sizing_eval;
Elm_Interface_Atspi_Widget_Action.elm_actions.get;
}
events {
changed;

View File

@ -17,6 +17,10 @@
#define ELM_INTERFACE_ATSPI_VALUE_PROTECTED
#include "elm_interface_atspi_value.eo.h"
#define ELM_INTERFACE_ATSPI_WIDGET_ACTION_PROTECTED
#include "elm_interface_atspi_widget_action.h"
#include "elm_interface_atspi_widget_action.eo.h"
#define MY_CLASS ELM_SPINNER_CLASS
#define MY_CLASS_NAME "Elm_Spinner"
@ -1107,6 +1111,20 @@ _elm_spinner_elm_interface_atspi_accessible_name_get(Eo *obj, Elm_Spinner_Data *
{
return elm_layout_text_get(obj, "elm.text");
}
EOLIAN static const Elm_Atspi_Action*
_elm_spinner_elm_interface_atspi_widget_action_elm_actions_get(Eo *obj EINA_UNUSED, Elm_Spinner_Data *sd EINA_UNUSED)
{
static Elm_Atspi_Action atspi_actions[] = {
{ "spin,left", "spin", "left", _key_action_spin},
{ "spin,right", "spin", "right", _key_action_spin},
{ "spin,up", "spin", "up", _key_action_spin},
{ "spin,down", "spin", "down", _key_action_spin},
{ "toggle", "toggle", NULL, _key_action_toggle},
{ NULL, NULL, NULL, NULL }
};
return &atspi_actions[0];
}
// A11Y Accessibility - END
#include "elm_spinner.eo.c"

View File

@ -1,4 +1,4 @@
class Elm_Spinner (Elm_Layout, Elm_Interface_Atspi_Value)
class Elm_Spinner (Elm_Layout, Elm_Interface_Atspi_Value, Elm_Interface_Atspi_Widget_Action)
{
eo_prefix: elm_obj_spinner;
properties {
@ -379,6 +379,7 @@ class Elm_Spinner (Elm_Layout, Elm_Interface_Atspi_Value)
Elm_Interface_Atspi_Value.value_and_text.set;
Elm_Interface_Atspi_Value.range.get;
Elm_Interface_Atspi_Value.increment.get;
Elm_Interface_Atspi_Widget_Action.elm_actions.get;
}
events {
changed;
@ -390,5 +391,4 @@ class Elm_Spinner (Elm_Layout, Elm_Interface_Atspi_Value)
focused;
unfocused;
}
}

View File

@ -12,6 +12,10 @@
#include "elm_interface_atspi_accessible.h"
#include "elm_interface_atspi_accessible.eo.h"
#define ELM_INTERFACE_ATSPI_WIDGET_ACTION_PROTECTED
#include "elm_interface_atspi_widget_action.h"
#include "elm_interface_atspi_widget_action.eo.h"
#define MY_CLASS ELM_TOOLBAR_CLASS
#define MY_CLASS_NAME "Elm_Toolbar"
@ -3844,4 +3848,18 @@ _elm_toolbar_class_constructor(Eo_Class *klass)
evas_smart_legacy_type_register(MY_CLASS_NAME_LEGACY, klass);
}
EOLIAN static const Elm_Atspi_Action*
_elm_toolbar_elm_interface_atspi_widget_action_elm_actions_get(Eo *obj EINA_UNUSED, Elm_Toolbar_Data *sd EINA_UNUSED)
{
static Elm_Atspi_Action atspi_actions[] = {
{ "select", "select", NULL, _key_action_select},
{ "move,left", "move", "left", _key_action_move},
{ "move,right", "move", "right", _key_action_move},
{ "move,up", "move", "up", _key_action_move},
{ "move,down", "move", "down", _key_action_move},
{ NULL, NULL, NULL, NULL }
};
return &atspi_actions[0];
}
#include "elm_toolbar.eo.c"

View File

@ -1,4 +1,5 @@
class Elm_Toolbar (Elm_Widget, Elm_Interface_Scrollable)
class Elm_Toolbar (Elm_Widget, Elm_Interface_Scrollable,
Elm_Interface_Atspi_Widget_Action)
{
eo_prefix: elm_obj_toolbar;
properties {
@ -511,6 +512,7 @@ class Elm_Toolbar (Elm_Widget, Elm_Interface_Scrollable)
Elm_Widget.event;
Elm_Widget.focus_highlight_geometry_get;
Elm_Widget.focused_item.get;
Elm_Interface_Atspi_Widget_Action.elm_actions.get;
}
events {
scroll;

View File

@ -17,6 +17,10 @@
#include "elm_interface_atspi_accessible.h"
#include "elm_interface_atspi_accessible.eo.h"
#define ELM_INTERFACE_ATSPI_WIDGET_ACTION_PROTECTED
#include "elm_interface_atspi_widget_action.h"
#include "elm_interface_atspi_widget_action.eo.h"
#define MY_CLASS ELM_VIDEO_CLASS
#define MY_CLASS_NAME "Elm_Video"
@ -436,4 +440,16 @@ _elm_video_class_constructor(Eo_Class *klass)
evas_smart_legacy_type_register(MY_CLASS_NAME_LEGACY, klass);
}
EOLIAN const Elm_Atspi_Action *
_elm_video_elm_interface_atspi_widget_action_elm_actions_get(Eo *obj EINA_UNUSED, Elm_Video_Data *pd EINA_UNUSED)
{
static Elm_Atspi_Action atspi_actions[] = {
{ "move,left", "move", "left", _key_action_move},
{ "move,right", "move", "right", _key_action_move},
{ "play", "play", NULL, _key_action_play},
{ NULL, NULL, NULL, NULL}
};
return &atspi_actions[0];
}
#include "elm_video.eo.c"

View File

@ -1,4 +1,4 @@
class Elm_Video (Elm_Layout)
class Elm_Video (Elm_Layout, Elm_Interface_Atspi_Widget_Action)
{
eo_prefix: elm_obj_video;
properties {
@ -210,6 +210,7 @@ class Elm_Video (Elm_Layout)
Elm_Widget.focus_direction_manager_is;
Elm_Widget.event;
Elm_Layout.sizing_eval;
Elm_Interface_Atspi_Widget_Action.elm_actions.get;
}
events {
focused;

View File

@ -15,6 +15,10 @@
#include "elm_interface_atspi_window.eo.h"
#include "elm_interface_atspi_widget.eo.h"
#define ELM_INTERFACE_ATSPI_WIDGET_ACTION_PROTECTED
#include "elm_interface_atspi_widget_action.h"
#include "elm_interface_atspi_widget_action.eo.h"
#define MY_CLASS ELM_WIN_CLASS
#define MY_CLASS_NAME "Elm_Win"
@ -4906,4 +4910,19 @@ _elm_win_elm_interface_atspi_accessible_parent_get(Eo *obj EINA_UNUSED, Elm_Win_
return _elm_atspi_bridge_root_get();
}
EOLIAN static const Elm_Atspi_Action*
_elm_win_elm_interface_atspi_widget_action_elm_actions_get(Eo *obj EINA_UNUSED, Elm_Win_Data *sd EINA_UNUSED)
{
static Elm_Atspi_Action atspi_actions[] = {
{ "move,previous", "move", "previous", _key_action_move},
{ "move,next", "move", "next", _key_action_move},
{ "move,left", "move", "left", _key_action_move},
{ "move,right", "move", "right", _key_action_move},
{ "move,up", "move", "up", _key_action_move},
{ "move,down", "move", "down", _key_action_move},
{ NULL, NULL, NULL, NULL }
};
return &atspi_actions[0];
}
#include "elm_win.eo.c"

View File

@ -1,4 +1,5 @@
class Elm_Win (Elm_Widget, Elm_Interface_Atspi_Window)
class Elm_Win (Elm_Widget, Elm_Interface_Atspi_Window,
Elm_Interface_Atspi_Widget_Action)
{
eo_prefix: elm_obj_win;
constructors {
@ -1346,6 +1347,7 @@ class Elm_Win (Elm_Widget, Elm_Interface_Atspi_Window)
Elm_Widget.on_focus;
Elm_Widget.event;
Elm_Interface_Atspi_Accessible.parent.get;
Elm_Interface_Atspi_Widget_Action.elm_actions.get;
}
events {
delete,request;

View File

@ -22,6 +22,7 @@
#include <elm_interface_scrollable.h>
#include <elm_interface_atspi_text.h>
#include <elm_interface_atspi_accessible.h>
#include <elm_interface_atspi_widget_action.h>
#include <elc_ctxpopup.eo.hh>
#include <elc_fileselector_button.eo.hh>