summaryrefslogtreecommitdiff
path: root/src/lib/elementary/elc_ctxpopup.c
diff options
context:
space:
mode:
authorLukasz Stanislawski <l.stanislaws@samsung.com>2017-11-20 12:03:29 +0900
committerJean-Philippe Andre <jp.andre@samsung.com>2017-11-20 12:03:29 +0900
commit2f294aeb88fab4537a68283e30493f6fc951f0f8 (patch)
tree48bb34ad6178896ca4807d73c8a866d32d27510d /src/lib/elementary/elc_ctxpopup.c
parent26e49ca56267de0fdbc48ce1e232063e14e7027f (diff)
elm: add "activate" action to ctxpopup items
Summary: Change-Id: I0974c3bec02a05d3d46d7cc0fd86572e32248a3b Subscribers: jenkins, cedric, jpeg Differential Revision: https://phab.enlightenment.org/D5493
Diffstat (limited to 'src/lib/elementary/elc_ctxpopup.c')
-rw-r--r--src/lib/elementary/elc_ctxpopup.c30
1 files changed, 28 insertions, 2 deletions
diff --git a/src/lib/elementary/elc_ctxpopup.c b/src/lib/elementary/elc_ctxpopup.c
index d6eae68..b8e6f80 100644
--- a/src/lib/elementary/elc_ctxpopup.c
+++ b/src/lib/elementary/elc_ctxpopup.c
@@ -1251,9 +1251,8 @@ elm_ctxpopup_item_next_get(const Evas_Object *obj)
1251} 1251}
1252 1252
1253static void 1253static void
1254_item_wrap_cb(void *data, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED) 1254_item_select(Elm_Ctxpopup_Item_Data *item)
1255{ 1255{
1256 Elm_Ctxpopup_Item_Data *item = data;
1257 Elm_Object_Item *eo_item2; 1256 Elm_Object_Item *eo_item2;
1258 Eina_List *l; 1257 Eina_List *l;
1259 1258
@@ -1269,6 +1268,13 @@ _item_wrap_cb(void *data, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UN
1269 item->wcb.org_func_cb((void *)item->wcb.org_data, item->wcb.cobj, EO_OBJ(item)); 1268 item->wcb.org_func_cb((void *)item->wcb.org_data, item->wcb.cobj, EO_OBJ(item));
1270} 1269}
1271 1270
1271static void
1272_item_wrap_cb(void *data, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED)
1273{
1274 Elm_Ctxpopup_Item_Data *item = data;
1275 _item_select(item);
1276}
1277
1272EOLIAN static Eo * 1278EOLIAN static Eo *
1273_elm_ctxpopup_item_efl_object_constructor(Eo *obj, Elm_Ctxpopup_Item_Data *it) 1279_elm_ctxpopup_item_efl_object_constructor(Eo *obj, Elm_Ctxpopup_Item_Data *it)
1274{ 1280{
@@ -1575,6 +1581,26 @@ _elm_ctxpopup_efl_access_state_set_get(Eo *obj, Elm_Ctxpopup_Data *sd EINA_UNUSE
1575 return ret; 1581 return ret;
1576} 1582}
1577 1583
1584static Eina_Bool
1585_item_access_action_activate(Evas_Object *obj, const char *params EINA_UNUSED)
1586{
1587 ELM_CTXPOPUP_ITEM_DATA_GET(obj, it);
1588 if (!it) return EINA_FALSE;
1589
1590 _item_select(it);
1591 return EINA_TRUE;
1592}
1593
1594EOLIAN static const Efl_Access_Action_Data*
1595_elm_ctxpopup_item_efl_access_widget_action_elm_actions_get(Eo *obj EINA_UNUSED, Elm_Ctxpopup_Item_Data *sd EINA_UNUSED)
1596{
1597 static Efl_Access_Action_Data atspi_actions[] = {
1598 { "activate", NULL, NULL, _item_access_action_activate},
1599 { NULL, NULL, NULL, NULL }
1600 };
1601 return &atspi_actions[0];
1602}
1603
1578/* Internal EO APIs and hidden overrides */ 1604/* Internal EO APIs and hidden overrides */
1579 1605
1580ELM_WIDGET_KEY_DOWN_DEFAULT_IMPLEMENT(elm_ctxpopup, Elm_Ctxpopup_Data) 1606ELM_WIDGET_KEY_DOWN_DEFAULT_IMPLEMENT(elm_ctxpopup, Elm_Ctxpopup_Data)