From 9eaf414f8a8a8d26713cc24c538904158bb6eb6f Mon Sep 17 00:00:00 2001 From: Shinwoo Kim Date: Tue, 28 Nov 2017 18:45:50 +0530 Subject: [PATCH] elm: access: add API elm_object_part_access_object_get Change-Id: I2666051f0dd5358936d37b972bcb2dfe9b4717a7 --- src/lib/elementary/elc_popup.c | 8 ++++++++ src/lib/elementary/elm_main.c | 8 ++++++++ src/lib/elementary/elm_object.h | 15 +++++++++++++++ src/lib/elementary/elm_popup.eo | 3 +++ src/lib/elementary/elm_widget.c | 9 +++++++++ src/lib/elementary/elm_widget.eo | 10 ++++++++++ src/lib/elementary/elm_widget.h | 3 +++ 7 files changed, 56 insertions(+) diff --git a/src/lib/elementary/elc_popup.c b/src/lib/elementary/elc_popup.c index 355638d..39148e8 100644 --- a/src/lib/elementary/elc_popup.c +++ b/src/lib/elementary/elc_popup.c @@ -1551,6 +1551,14 @@ _key_action_escape(Evas_Object *obj, const char *params EINA_UNUSED) return EINA_TRUE; } +//TIZEN_ONLY(20160726): add API elm_object_part_access_object_get +EOLIAN static Evas_Object* +_elm_popup_elm_widget_part_access_object_get(const Eo *obj, Elm_Popup_Data *_pd EINA_UNUSED, const char *part) +{ + return _access_object_get(obj, part); +} +// + EOLIAN static void _elm_popup_efl_canvas_group_group_add(Eo *obj, Elm_Popup_Data *priv) { diff --git a/src/lib/elementary/elm_main.c b/src/lib/elementary/elm_main.c index 215c1c0..9953a2b 100644 --- a/src/lib/elementary/elm_main.c +++ b/src/lib/elementary/elm_main.c @@ -2104,6 +2104,14 @@ elm_object_focus_region_show_mode_set(Evas_Object *obj, Elm_Focus_Region_Show_Mo elm_widget_focus_region_show_mode_set(obj, mode); } +//TIZEN_ONLY(20160726): add API elm_object_part_access_object_get +EAPI Evas_Object *elm_object_part_access_object_get(const Evas_Object *obj, const char *part) +{ + EINA_SAFETY_ON_NULL_RETURN_VAL(obj, NULL); + return elm_widget_part_access_object_get(obj, part); +} +// + // TIZEN_ONLY(20171114) Accessibility Highlight Frame added void * _elm_object_accessibility_currently_highlighted_get() diff --git a/src/lib/elementary/elm_object.h b/src/lib/elementary/elm_object.h index bf3d4f8..6b11c2a 100644 --- a/src/lib/elementary/elm_object.h +++ b/src/lib/elementary/elm_object.h @@ -192,6 +192,21 @@ EAPI void elm_object_access_info_set(Evas_Object *obj, c */ EAPI const char *elm_object_access_info_get(Evas_Object *obj); +//TIZEN_ONLY(20160726): add API elm_object_part_access_object_get +/** + * @brief Get the access object which is registered to part + * + * @param obj The object + * @param part The object's part name to get access object + * + * @ingroup Elm_General + * + * @if WEARABLE @since_tizen 3.0 + * @endif + */ +EAPI Evas_Object *elm_object_part_access_object_get(const Evas_Object *obj, const char *part); +// + /** * Get a named object from the children * diff --git a/src/lib/elementary/elm_popup.eo b/src/lib/elementary/elm_popup.eo index 8a37ef9..275a15d 100644 --- a/src/lib/elementary/elm_popup.eo +++ b/src/lib/elementary/elm_popup.eo @@ -174,6 +174,9 @@ class Elm.Popup (Efl.Ui.Layout, Efl.Ui.Focus.Layer, Efl.Access.Widget.Action) Efl.Ui.Translatable.translation_update; Elm.Widget.widget_sub_object_del; Elm.Widget.widget_event; + //TIZEN_ONLY(20160726): add API elm_object_part_access_object_get + Elm.Widget.part_access_object_get; + // Efl.Layout.Signal.signal_emit; Efl.Access.Widget.Action.elm_actions { get; } Efl.Access.state_set { get; } diff --git a/src/lib/elementary/elm_widget.c b/src/lib/elementary/elm_widget.c index a829bae..452e1ee 100644 --- a/src/lib/elementary/elm_widget.c +++ b/src/lib/elementary/elm_widget.c @@ -5816,6 +5816,15 @@ _elm_widget_focus_manager_create(Eo *obj EINA_UNUSED, Elm_Widget_Smart_Data *pd return NULL; } +//TIZEN_ONLY(20160726): add API elm_object_part_access_object_get +EOLIAN static Evas_Object* +_elm_widget_part_access_object_get(const Eo *obj, Elm_Widget_Smart_Data *_pd EINA_UNUSED, const char *part EINA_UNUSED) +{ + WRN("The %s widget does not implement the \"part_access_object_get\" functions.", + efl_class_name_get(efl_class_get(obj))); + return NULL; +} +// /* Legacy APIs */ diff --git a/src/lib/elementary/elm_widget.eo b/src/lib/elementary/elm_widget.eo index a696c9d..5df2bdd 100644 --- a/src/lib/elementary/elm_widget.eo +++ b/src/lib/elementary/elm_widget.eo @@ -509,6 +509,16 @@ abstract Elm.Widget (Efl.Canvas.Group, Efl.Access, animate: bool; [[The enabled value for the highlight animation.]] } } + //TIZEN_ONLY(20160726): add API elm_object_part_access_object_get + part_access_object_get @const { + [[Get the access object of given part of the widget. + @since 1.18]] + return: Efl.Canvas.Object; + params { + @in part: string; [[The object's part name to get access object]] + } + } + // @property focus_move_policy @beta { [[The widget's focus move policy.]] values { diff --git a/src/lib/elementary/elm_widget.h b/src/lib/elementary/elm_widget.h index 19e2367..c362872 100644 --- a/src/lib/elementary/elm_widget.h +++ b/src/lib/elementary/elm_widget.h @@ -767,6 +767,9 @@ EAPI const char *elm_widget_theme_element_get(const Evas_Object *obj); EAPI Eina_Bool elm_widget_theme_style_set(Evas_Object *obj, const char *name); EAPI const char *elm_widget_theme_style_get(const Evas_Object *obj); EAPI Efl_Ui_Theme_Apply elm_widget_element_update(Evas_Object *obj, Evas_Object *component, const char *name); +//TIZEN_ONLY(20160726): add API elm_object_part_access_object_get +EAPI Evas_Object *elm_widget_part_access_object_get(const Evas_Object *obj, const char *part); +// //TIZEN_ONLY(20171108): make atspi_proxy work EAPI Eo* _elm_atspi_bridge_utils_plug_create(Eo *parent, const char *svcname, int svcnum); EAPI Eo* _elm_atspi_bridge_utils_socket_create(Eo *parent, const char *svcname, int svcnum); -- 2.7.4