summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPrasoon Singh <prasoon.16@samsung.com>2017-11-28 09:56:32 +0900
committerShinwoo Kim <cinoo.kim@samsung.com>2017-11-28 09:56:32 +0900
commit8b0c8c2eb70daaca3b9a5cb544edf7aac5a30838 (patch)
treec8a83e9148ebbc3eac436d941783586202ad8213
parentd43fe6c16fd763215e2741b37baa8df913f151c0 (diff)
downloadefl-8b0c8c2eb70daaca3b9a5cb544edf7aac5a30838.tar.gz
elm_entry : Added access action interface in entry.
Summary: Added access action interface in entry. On activate action from atspi client , entry will emit click signal and input panel would be shown. Test Plan: When activate action comes, entry will emit click signal and input panel should be shown. Reviewers: shilpasingh, kimcinoo Reviewed By: shilpasingh Subscribers: cedric, jpeg, rajeshps, govi Differential Revision: https://phab.enlightenment.org/D5544
-rw-r--r--src/lib/elementary/elm_entry.c32
-rw-r--r--src/lib/elementary/elm_entry.eo3
2 files changed, 30 insertions, 5 deletions
diff --git a/src/lib/elementary/elm_entry.c b/src/lib/elementary/elm_entry.c
index 6adff14742..58097a7a6a 100644
--- a/src/lib/elementary/elm_entry.c
+++ b/src/lib/elementary/elm_entry.c
@@ -7,6 +7,7 @@
#define EFL_ACCESS_EDITABLE_TEXT_PROTECTED
#define ELM_LAYOUT_PROTECTED
#define EFL_UI_FOCUS_OBJECT_PROTECTED
+#define EFL_ACCESS_WIDGET_ACTION_PROTECTED
#include <Elementary.h>
#include <Elementary_Cursor.h>
@@ -5418,11 +5419,9 @@ _elm_entry_anchor_hover_end(Eo *obj EINA_UNUSED, Elm_Entry_Data *sd)
}
/* END - ANCHOR HOVER */
-EOLIAN static Eina_Bool
-_elm_entry_elm_widget_on_access_activate(Eo *obj, Elm_Entry_Data *_pd EINA_UNUSED, Efl_Ui_Activate act)
+static void
+_activate(Evas_Object *obj)
{
- if (act != EFL_UI_ACTIVATE_DEFAULT) return EINA_FALSE;
-
ELM_ENTRY_DATA_GET(obj, sd);
if (!elm_widget_disabled_get(obj) &&
@@ -5433,6 +5432,14 @@ _elm_entry_elm_widget_on_access_activate(Eo *obj, Elm_Entry_Data *_pd EINA_UNUSE
if (sd->editable && sd->input_panel_enable)
edje_object_part_text_input_panel_show(sd->entry_edje, "elm.text");
}
+}
+
+EOLIAN static Eina_Bool
+_elm_entry_elm_widget_on_access_activate(Eo *obj, Elm_Entry_Data *_pd EINA_UNUSED, Efl_Ui_Activate act)
+{
+ if (act != EFL_UI_ACTIVATE_DEFAULT) return EINA_FALSE;
+ _activate(obj);
+
return EINA_TRUE;
}
@@ -6040,6 +6047,23 @@ _elm_entry_efl_access_name_get(Eo *obj, Elm_Entry_Data *sd)
return _elm_widget_accessible_plain_name_get(obj, ret);
}
+static Eina_Bool
+_action_activate(Evas_Object *obj, const char *params EINA_UNUSED)
+{
+ _activate(obj);
+ return EINA_TRUE;
+}
+
+EOLIAN const Efl_Access_Action_Data *
+_elm_entry_efl_access_widget_action_elm_actions_get(Eo *obj EINA_UNUSED, Elm_Entry_Data *sd EINA_UNUSED)
+{
+ static Efl_Access_Action_Data atspi_actions[] = {
+ { "activate", "activate", NULL, _action_activate },
+ { NULL, NULL, NULL, NULL}
+ };
+ return &atspi_actions[0];
+}
+
/* Efl.Part begin */
ELM_PART_OVERRIDE(elm_entry, ELM_ENTRY, Elm_Entry_Data)
diff --git a/src/lib/elementary/elm_entry.eo b/src/lib/elementary/elm_entry.eo
index ea7d43daf5..9bb1d6d3db 100644
--- a/src/lib/elementary/elm_entry.eo
+++ b/src/lib/elementary/elm_entry.eo
@@ -117,7 +117,7 @@ enum Elm.Cnp_Mode
class Elm.Entry (Efl.Ui.Layout, Elm.Interface_Scrollable, Efl.Ui.Clickable,
Efl.Access.Text, Efl.Access.Editable.Text, Efl.File,
- Efl.Ui.Selectable, Efl.Ui.Scrollable)
+ Efl.Ui.Selectable, Efl.Ui.Scrollable, Efl.Access.Widget.Action)
{
[[Elementary entry class]]
legacy_prefix: elm_entry;
@@ -989,6 +989,7 @@ class Elm.Entry (Efl.Ui.Layout, Elm.Interface_Scrollable, Efl.Ui.Clickable,
Efl.Access.Editable.Text.cut;
Efl.Access.Editable.Text.delete;
Efl.Access.Editable.Text.paste;
+ Efl.Access.Widget.Action.elm_actions { get; }
Efl.File.file { get; set; }
Efl.Part.part;
}