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)
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 6adff14..58097a7 100644
--- a/src/lib/elementary/elm_entry.c
+++ b/src/lib/elementary/elm_entry.c
@@ -7,6 +7,7 @@
7#define EFL_ACCESS_EDITABLE_TEXT_PROTECTED 7#define EFL_ACCESS_EDITABLE_TEXT_PROTECTED
8#define ELM_LAYOUT_PROTECTED 8#define ELM_LAYOUT_PROTECTED
9#define EFL_UI_FOCUS_OBJECT_PROTECTED 9#define EFL_UI_FOCUS_OBJECT_PROTECTED
10#define EFL_ACCESS_WIDGET_ACTION_PROTECTED
10 11
11#include <Elementary.h> 12#include <Elementary.h>
12#include <Elementary_Cursor.h> 13#include <Elementary_Cursor.h>
@@ -5418,11 +5419,9 @@ _elm_entry_anchor_hover_end(Eo *obj EINA_UNUSED, Elm_Entry_Data *sd)
5418} 5419}
5419/* END - ANCHOR HOVER */ 5420/* END - ANCHOR HOVER */
5420 5421
5421EOLIAN static Eina_Bool 5422static void
5422_elm_entry_elm_widget_on_access_activate(Eo *obj, Elm_Entry_Data *_pd EINA_UNUSED, Efl_Ui_Activate act) 5423_activate(Evas_Object *obj)
5423{ 5424{
5424 if (act != EFL_UI_ACTIVATE_DEFAULT) return EINA_FALSE;
5425
5426 ELM_ENTRY_DATA_GET(obj, sd); 5425 ELM_ENTRY_DATA_GET(obj, sd);
5427 5426
5428 if (!elm_widget_disabled_get(obj) && 5427 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
5433 if (sd->editable && sd->input_panel_enable) 5432 if (sd->editable && sd->input_panel_enable)
5434 edje_object_part_text_input_panel_show(sd->entry_edje, "elm.text"); 5433 edje_object_part_text_input_panel_show(sd->entry_edje, "elm.text");
5435 } 5434 }
5435}
5436
5437EOLIAN static Eina_Bool
5438_elm_entry_elm_widget_on_access_activate(Eo *obj, Elm_Entry_Data *_pd EINA_UNUSED, Efl_Ui_Activate act)
5439{
5440 if (act != EFL_UI_ACTIVATE_DEFAULT) return EINA_FALSE;
5441 _activate(obj);
5442
5436 return EINA_TRUE; 5443 return EINA_TRUE;
5437} 5444}
5438 5445
@@ -6040,6 +6047,23 @@ _elm_entry_efl_access_name_get(Eo *obj, Elm_Entry_Data *sd)
6040 return _elm_widget_accessible_plain_name_get(obj, ret); 6047 return _elm_widget_accessible_plain_name_get(obj, ret);
6041} 6048}
6042 6049
6050static Eina_Bool
6051_action_activate(Evas_Object *obj, const char *params EINA_UNUSED)
6052{
6053 _activate(obj);
6054 return EINA_TRUE;
6055}
6056
6057EOLIAN const Efl_Access_Action_Data *
6058_elm_entry_efl_access_widget_action_elm_actions_get(Eo *obj EINA_UNUSED, Elm_Entry_Data *sd EINA_UNUSED)
6059{
6060 static Efl_Access_Action_Data atspi_actions[] = {
6061 { "activate", "activate", NULL, _action_activate },
6062 { NULL, NULL, NULL, NULL}
6063 };
6064 return &atspi_actions[0];
6065}
6066
6043/* Efl.Part begin */ 6067/* Efl.Part begin */
6044 6068
6045ELM_PART_OVERRIDE(elm_entry, ELM_ENTRY, Elm_Entry_Data) 6069ELM_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 ea7d43d..9bb1d6d 100644
--- a/src/lib/elementary/elm_entry.eo
+++ b/src/lib/elementary/elm_entry.eo
@@ -117,7 +117,7 @@ enum Elm.Cnp_Mode
117 117
118class Elm.Entry (Efl.Ui.Layout, Elm.Interface_Scrollable, Efl.Ui.Clickable, 118class Elm.Entry (Efl.Ui.Layout, Elm.Interface_Scrollable, Efl.Ui.Clickable,
119 Efl.Access.Text, Efl.Access.Editable.Text, Efl.File, 119 Efl.Access.Text, Efl.Access.Editable.Text, Efl.File,
120 Efl.Ui.Selectable, Efl.Ui.Scrollable) 120 Efl.Ui.Selectable, Efl.Ui.Scrollable, Efl.Access.Widget.Action)
121{ 121{
122 [[Elementary entry class]] 122 [[Elementary entry class]]
123 legacy_prefix: elm_entry; 123 legacy_prefix: elm_entry;
@@ -989,6 +989,7 @@ class Elm.Entry (Efl.Ui.Layout, Elm.Interface_Scrollable, Efl.Ui.Clickable,
989 Efl.Access.Editable.Text.cut; 989 Efl.Access.Editable.Text.cut;
990 Efl.Access.Editable.Text.delete; 990 Efl.Access.Editable.Text.delete;
991 Efl.Access.Editable.Text.paste; 991 Efl.Access.Editable.Text.paste;
992 Efl.Access.Widget.Action.elm_actions { get; }
992 Efl.File.file { get; set; } 993 Efl.File.file { get; set; }
993 Efl.Part.part; 994 Efl.Part.part;
994 } 995 }