forked from enlightenment/efl
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
This commit is contained in:
parent
d43fe6c16f
commit
8b0c8c2eb7
|
@ -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)
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue