diff --git a/legacy/elementary/src/lib/Makefile.am b/legacy/elementary/src/lib/Makefile.am index efff270233..11e5e36384 100644 --- a/legacy/elementary/src/lib/Makefile.am +++ b/legacy/elementary/src/lib/Makefile.am @@ -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 \ diff --git a/legacy/elementary/src/lib/elc_ctxpopup.c b/legacy/elementary/src/lib/elc_ctxpopup.c index a2ae83d252..072638d206 100644 --- a/legacy/elementary/src/lib/elc_ctxpopup.c +++ b/legacy/elementary/src/lib/elc_ctxpopup.c @@ -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" diff --git a/legacy/elementary/src/lib/elc_ctxpopup.eo b/legacy/elementary/src/lib/elc_ctxpopup.eo index b9ffdbc673..4dc74d585c 100644 --- a/legacy/elementary/src/lib/elc_ctxpopup.eo +++ b/legacy/elementary/src/lib/elc_ctxpopup.eo @@ -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; diff --git a/legacy/elementary/src/lib/elc_fileselector.c b/legacy/elementary/src/lib/elc_fileselector.c index 106b91039b..cf91b176ad 100644 --- a/legacy/elementary/src/lib/elc_fileselector.c +++ b/legacy/elementary/src/lib/elc_fileselector.c @@ -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" diff --git a/legacy/elementary/src/lib/elc_fileselector.eo b/legacy/elementary/src/lib/elc_fileselector.eo index 255da19c34..9b85ae4342 100644 --- a/legacy/elementary/src/lib/elc_fileselector.eo +++ b/legacy/elementary/src/lib/elc_fileselector.eo @@ -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; diff --git a/legacy/elementary/src/lib/elc_hoversel.c b/legacy/elementary/src/lib/elc_hoversel.c index 612ba6c834..a7d43e95d1 100644 --- a/legacy/elementary/src/lib/elc_hoversel.c +++ b/legacy/elementary/src/lib/elc_hoversel.c @@ -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" diff --git a/legacy/elementary/src/lib/elc_hoversel.eo b/legacy/elementary/src/lib/elc_hoversel.eo index 385356ec3d..47ad95da54 100644 --- a/legacy/elementary/src/lib/elc_hoversel.eo +++ b/legacy/elementary/src/lib/elc_hoversel.eo @@ -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; diff --git a/legacy/elementary/src/lib/elc_naviframe.c b/legacy/elementary/src/lib/elc_naviframe.c index cefcfd4934..2e58c44b94 100644 --- a/legacy/elementary/src/lib/elc_naviframe.c +++ b/legacy/elementary/src/lib/elc_naviframe.c @@ -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" diff --git a/legacy/elementary/src/lib/elc_player.c b/legacy/elementary/src/lib/elc_player.c index 3da4abee9e..3733d353f1 100644 --- a/legacy/elementary/src/lib/elc_player.c +++ b/legacy/elementary/src/lib/elc_player.c @@ -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" diff --git a/legacy/elementary/src/lib/elc_player.eo b/legacy/elementary/src/lib/elc_player.eo index 84ebbd4152..b85ea39855 100644 --- a/legacy/elementary/src/lib/elc_player.eo +++ b/legacy/elementary/src/lib/elc_player.eo @@ -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; diff --git a/legacy/elementary/src/lib/elc_popup.c b/legacy/elementary/src/lib/elc_popup.c index c5a3d78439..65233d989e 100644 --- a/legacy/elementary/src/lib/elc_popup.c +++ b/legacy/elementary/src/lib/elc_popup.c @@ -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" diff --git a/legacy/elementary/src/lib/elc_popup.eo b/legacy/elementary/src/lib/elc_popup.eo index 00618eb9ba..c3b73c5de1 100644 --- a/legacy/elementary/src/lib/elc_popup.eo +++ b/legacy/elementary/src/lib/elc_popup.eo @@ -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; diff --git a/legacy/elementary/src/lib/elm_atspi_bridge.c b/legacy/elementary/src/lib/elm_atspi_bridge.c index 66d63ebb64..e83757c914 100644 --- a/legacy/elementary/src/lib/elm_atspi_bridge.c +++ b/legacy/elementary/src/lib/elm_atspi_bridge.c @@ -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++; } diff --git a/legacy/elementary/src/lib/elm_button.c b/legacy/elementary/src/lib/elm_button.c index d9376c08f8..418b791574 100644 --- a/legacy/elementary/src/lib/elm_button.c +++ b/legacy/elementary/src/lib/elm_button.c @@ -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 diff --git a/legacy/elementary/src/lib/elm_calendar.c b/legacy/elementary/src/lib/elm_calendar.c index 976c9bb1b0..1bde95d89f 100644 --- a/legacy/elementary/src/lib/elm_calendar.c +++ b/legacy/elementary/src/lib/elm_calendar.c @@ -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" diff --git a/legacy/elementary/src/lib/elm_calendar.eo b/legacy/elementary/src/lib/elm_calendar.eo index 0d30bcaedc..2156ef6859 100644 --- a/legacy/elementary/src/lib/elm_calendar.eo +++ b/legacy/elementary/src/lib/elm_calendar.eo @@ -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; diff --git a/legacy/elementary/src/lib/elm_check.c b/legacy/elementary/src/lib/elm_check.c index f649410208..9a6373651d 100644 --- a/legacy/elementary/src/lib/elm_check.c +++ b/legacy/elementary/src/lib/elm_check.c @@ -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 diff --git a/legacy/elementary/src/lib/elm_colorselector.c b/legacy/elementary/src/lib/elm_colorselector.c index dad612fdb3..e57294d0a3 100644 --- a/legacy/elementary/src/lib/elm_colorselector.c +++ b/legacy/elementary/src/lib/elm_colorselector.c @@ -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" diff --git a/legacy/elementary/src/lib/elm_colorselector.eo b/legacy/elementary/src/lib/elm_colorselector.eo index fda588bc89..bc97658939 100644 --- a/legacy/elementary/src/lib/elm_colorselector.eo +++ b/legacy/elementary/src/lib/elm_colorselector.eo @@ -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; diff --git a/legacy/elementary/src/lib/elm_diskselector.c b/legacy/elementary/src/lib/elm_diskselector.c index 44a56df6ca..1021d8438a 100644 --- a/legacy/elementary/src/lib/elm_diskselector.c +++ b/legacy/elementary/src/lib/elm_diskselector.c @@ -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" diff --git a/legacy/elementary/src/lib/elm_diskselector.eo b/legacy/elementary/src/lib/elm_diskselector.eo index 11655603ec..87dab781a0 100644 --- a/legacy/elementary/src/lib/elm_diskselector.eo +++ b/legacy/elementary/src/lib/elm_diskselector.eo @@ -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; diff --git a/legacy/elementary/src/lib/elm_flipselector.c b/legacy/elementary/src/lib/elm_flipselector.c index 09a1d47fb8..b7b826e460 100644 --- a/legacy/elementary/src/lib/elm_flipselector.c +++ b/legacy/elementary/src/lib/elm_flipselector.c @@ -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" diff --git a/legacy/elementary/src/lib/elm_flipselector.eo b/legacy/elementary/src/lib/elm_flipselector.eo index eba93555bc..d78827c044 100644 --- a/legacy/elementary/src/lib/elm_flipselector.eo +++ b/legacy/elementary/src/lib/elm_flipselector.eo @@ -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; diff --git a/legacy/elementary/src/lib/elm_gengrid.c b/legacy/elementary/src/lib/elm_gengrid.c index c357e5a1a0..03c6d7ac0e 100644 --- a/legacy/elementary/src/lib/elm_gengrid.c +++ b/legacy/elementary/src/lib/elm_gengrid.c @@ -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" diff --git a/legacy/elementary/src/lib/elm_genlist.c b/legacy/elementary/src/lib/elm_genlist.c index f09f1fe90c..bb347d1ce2 100644 --- a/legacy/elementary/src/lib/elm_genlist.c +++ b/legacy/elementary/src/lib/elm_genlist.c @@ -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" diff --git a/legacy/elementary/src/lib/elm_genlist.eo b/legacy/elementary/src/lib/elm_genlist.eo index 78aed245aa..cc4077c3a5 100644 --- a/legacy/elementary/src/lib/elm_genlist.eo +++ b/legacy/elementary/src/lib/elm_genlist.eo @@ -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; diff --git a/legacy/elementary/src/lib/elm_image.c b/legacy/elementary/src/lib/elm_image.c index 73ca0a68d7..eb0ac6ab3e 100644 --- a/legacy/elementary/src/lib/elm_image.c +++ b/legacy/elementary/src/lib/elm_image.c @@ -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]; } diff --git a/legacy/elementary/src/lib/elm_interface_atspi_action.eo b/legacy/elementary/src/lib/elm_interface_atspi_action.eo index 0f876e7298..4afa82a89b 100644 --- a/legacy/elementary/src/lib/elm_interface_atspi_action.eo +++ b/legacy/elementary/src/lib/elm_interface_atspi_action.eo @@ -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 { diff --git a/legacy/elementary/src/lib/elm_interface_atspi_widget_action.c b/legacy/elementary/src/lib/elm_interface_atspi_widget_action.c index af2a052747..489ad814d6 100644 --- a/legacy/elementary/src/lib/elm_interface_atspi_widget_action.c +++ b/legacy/elementary/src/lib/elm_interface_atspi_widget_action.c @@ -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; diff --git a/legacy/elementary/src/lib/elm_interface_atspi_widget_action.eo b/legacy/elementary/src/lib/elm_interface_atspi_widget_action.eo index 7d5d1a798e..5f24f73321 100644 --- a/legacy/elementary/src/lib/elm_interface_atspi_widget_action.eo +++ b/legacy/elementary/src/lib/elm_interface_atspi_widget_action.eo @@ -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 */ } } diff --git a/legacy/elementary/src/lib/elm_interface_atspi_widget_action.h b/legacy/elementary/src/lib/elm_interface_atspi_widget_action.h new file mode 100644 index 0000000000..8002edfe4e --- /dev/null +++ b/legacy/elementary/src/lib/elm_interface_atspi_widget_action.h @@ -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; diff --git a/legacy/elementary/src/lib/elm_list.c b/legacy/elementary/src/lib/elm_list.c index bf20b911f9..455c2084f0 100644 --- a/legacy/elementary/src/lib/elm_list.c +++ b/legacy/elementary/src/lib/elm_list.c @@ -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" diff --git a/legacy/elementary/src/lib/elm_list.eo b/legacy/elementary/src/lib/elm_list.eo index c093d05752..8a495d0ed2 100644 --- a/legacy/elementary/src/lib/elm_list.eo +++ b/legacy/elementary/src/lib/elm_list.eo @@ -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; diff --git a/legacy/elementary/src/lib/elm_map.c b/legacy/elementary/src/lib/elm_map.c index 4541279c54..a704e4ac4f 100644 --- a/legacy/elementary/src/lib/elm_map.c +++ b/legacy/elementary/src/lib/elm_map.c @@ -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" diff --git a/legacy/elementary/src/lib/elm_map.eo b/legacy/elementary/src/lib/elm_map.eo index d394785a3a..5d07d771ed 100644 --- a/legacy/elementary/src/lib/elm_map.eo +++ b/legacy/elementary/src/lib/elm_map.eo @@ -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; diff --git a/legacy/elementary/src/lib/elm_panel.c b/legacy/elementary/src/lib/elm_panel.c index c3245a28d1..b6af91b387 100644 --- a/legacy/elementary/src/lib/elm_panel.c +++ b/legacy/elementary/src/lib/elm_panel.c @@ -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" diff --git a/legacy/elementary/src/lib/elm_panel.eo b/legacy/elementary/src/lib/elm_panel.eo index 25e98b7ac9..e2396154d0 100644 --- a/legacy/elementary/src/lib/elm_panel.eo +++ b/legacy/elementary/src/lib/elm_panel.eo @@ -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; diff --git a/legacy/elementary/src/lib/elm_photocam.c b/legacy/elementary/src/lib/elm_photocam.c index da9895debf..57e813769d 100644 --- a/legacy/elementary/src/lib/elm_photocam.c +++ b/legacy/elementary/src/lib/elm_photocam.c @@ -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" diff --git a/legacy/elementary/src/lib/elm_photocam.eo b/legacy/elementary/src/lib/elm_photocam.eo index 70dfb3bf19..f07a054245 100644 --- a/legacy/elementary/src/lib/elm_photocam.eo +++ b/legacy/elementary/src/lib/elm_photocam.eo @@ -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; diff --git a/legacy/elementary/src/lib/elm_radio.c b/legacy/elementary/src/lib/elm_radio.c index 0532c1834f..045ce29170 100644 --- a/legacy/elementary/src/lib/elm_radio.c +++ b/legacy/elementary/src/lib/elm_radio.c @@ -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" diff --git a/legacy/elementary/src/lib/elm_radio.eo b/legacy/elementary/src/lib/elm_radio.eo index 22037c4518..ae5d99a47e 100644 --- a/legacy/elementary/src/lib/elm_radio.eo +++ b/legacy/elementary/src/lib/elm_radio.eo @@ -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; diff --git a/legacy/elementary/src/lib/elm_scroller.c b/legacy/elementary/src/lib/elm_scroller.c index 7d10c7516f..64c6e09541 100644 --- a/legacy/elementary/src/lib/elm_scroller.c +++ b/legacy/elementary/src/lib/elm_scroller.c @@ -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" diff --git a/legacy/elementary/src/lib/elm_scroller.eo b/legacy/elementary/src/lib/elm_scroller.eo index cee1b65dc2..953cc853a9 100644 --- a/legacy/elementary/src/lib/elm_scroller.eo +++ b/legacy/elementary/src/lib/elm_scroller.eo @@ -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; diff --git a/legacy/elementary/src/lib/elm_slider.c b/legacy/elementary/src/lib/elm_slider.c index 64d4e1d089..e437bb155f 100644 --- a/legacy/elementary/src/lib/elm_slider.c +++ b/legacy/elementary/src/lib/elm_slider.c @@ -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" diff --git a/legacy/elementary/src/lib/elm_slider.eo b/legacy/elementary/src/lib/elm_slider.eo index c4255eb788..3712789d4b 100644 --- a/legacy/elementary/src/lib/elm_slider.eo +++ b/legacy/elementary/src/lib/elm_slider.eo @@ -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; diff --git a/legacy/elementary/src/lib/elm_slideshow.c b/legacy/elementary/src/lib/elm_slideshow.c index 830b763c0a..890d2280b4 100644 --- a/legacy/elementary/src/lib/elm_slideshow.c +++ b/legacy/elementary/src/lib/elm_slideshow.c @@ -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" diff --git a/legacy/elementary/src/lib/elm_slideshow.eo b/legacy/elementary/src/lib/elm_slideshow.eo index c54c427ab8..b32112b72e 100644 --- a/legacy/elementary/src/lib/elm_slideshow.eo +++ b/legacy/elementary/src/lib/elm_slideshow.eo @@ -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; diff --git a/legacy/elementary/src/lib/elm_spinner.c b/legacy/elementary/src/lib/elm_spinner.c index 8f167c618e..afba203a66 100644 --- a/legacy/elementary/src/lib/elm_spinner.c +++ b/legacy/elementary/src/lib/elm_spinner.c @@ -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" diff --git a/legacy/elementary/src/lib/elm_spinner.eo b/legacy/elementary/src/lib/elm_spinner.eo index cf29276b93..ed31d4a277 100644 --- a/legacy/elementary/src/lib/elm_spinner.eo +++ b/legacy/elementary/src/lib/elm_spinner.eo @@ -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; } - } diff --git a/legacy/elementary/src/lib/elm_toolbar.c b/legacy/elementary/src/lib/elm_toolbar.c index 5467739663..c38a40f063 100644 --- a/legacy/elementary/src/lib/elm_toolbar.c +++ b/legacy/elementary/src/lib/elm_toolbar.c @@ -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" diff --git a/legacy/elementary/src/lib/elm_toolbar.eo b/legacy/elementary/src/lib/elm_toolbar.eo index 4c46d83544..70f69d697e 100644 --- a/legacy/elementary/src/lib/elm_toolbar.eo +++ b/legacy/elementary/src/lib/elm_toolbar.eo @@ -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; diff --git a/legacy/elementary/src/lib/elm_video.c b/legacy/elementary/src/lib/elm_video.c index d49b58133c..cf0ac909d4 100644 --- a/legacy/elementary/src/lib/elm_video.c +++ b/legacy/elementary/src/lib/elm_video.c @@ -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" diff --git a/legacy/elementary/src/lib/elm_video.eo b/legacy/elementary/src/lib/elm_video.eo index f3382146d8..bd3589e747 100644 --- a/legacy/elementary/src/lib/elm_video.eo +++ b/legacy/elementary/src/lib/elm_video.eo @@ -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; diff --git a/legacy/elementary/src/lib/elm_win.c b/legacy/elementary/src/lib/elm_win.c index abcf482dba..77696de905 100644 --- a/legacy/elementary/src/lib/elm_win.c +++ b/legacy/elementary/src/lib/elm_win.c @@ -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" diff --git a/legacy/elementary/src/lib/elm_win.eo b/legacy/elementary/src/lib/elm_win.eo index 2981f1b5d7..ff797d2fcc 100644 --- a/legacy/elementary/src/lib/elm_win.eo +++ b/legacy/elementary/src/lib/elm_win.eo @@ -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; diff --git a/legacy/elementary/src/tests/elm_cxx_suite.cc b/legacy/elementary/src/tests/elm_cxx_suite.cc index 73873c285a..d64b56c384 100644 --- a/legacy/elementary/src/tests/elm_cxx_suite.cc +++ b/legacy/elementary/src/tests/elm_cxx_suite.cc @@ -22,6 +22,7 @@ #include #include #include +#include #include #include