elm: [ctxpopup] Accessible methods for children_get, extents_get and item name_get
authorPatryk Kaczmarek <patryk.k@samsung.com>
Thu, 23 Nov 2017 09:49:13 +0000 (15:19 +0530)
committerJiyoun Park <jy0703.park@samsung.com>
Thu, 21 Dec 2017 09:03:09 +0000 (18:03 +0900)
@tizen_feature

orignal patch: c5c9c27c0ea5fb105ef600b925a36fe75552ba58

Change-Id: I309432b1fcdc395e3736136b996483e4878ea758

src/lib/elementary/elc_ctxpopup.c
src/lib/elementary/elm_ctxpopup.eo
src/lib/elementary/elm_ctxpopup_item.eo

index 90a63a9..8d16034 100644 (file)
@@ -1280,6 +1280,9 @@ _elm_ctxpopup_item_efl_object_constructor(Eo *obj, Elm_Ctxpopup_Item_Data *it)
 {
    obj = efl_constructor(efl_super(obj, ELM_CTXPOPUP_ITEM_CLASS));
    it->base = efl_data_scope_get(obj, ELM_WIDGET_ITEM_CLASS);
+   //TIZEN ONLY(20150710)ctxpopup: Accessible methods for children_get, extents_get and item name_get
+   efl_access_role_set(obj, EFL_ACCESS_ROLE_LIST_ITEM);
+   //
 
    return obj;
 }
@@ -1581,6 +1584,35 @@ _elm_ctxpopup_efl_access_state_set_get(Eo *obj, Elm_Ctxpopup_Data *sd EINA_UNUSE
    return ret;
 }
 
+//TIZEN ONLY(20150710): ctxpopup: Accessible methods for children_get, extents_get and item name_get
+EOLIAN static Eina_Rect
+_elm_ctxpopup_efl_access_component_extents_get(Eo *obj EINA_UNUSED, Elm_Ctxpopup_Data *sd, Eina_Bool screen_coords)
+{
+   int ee_x, ee_y;
+   Eina_Rect r;
+
+   if (!sd->box)
+     {
+        r.x = -1;
+        r.y = -1;
+        r.w = -1;
+        r.h = -1;
+        return r;
+     }
+   r = efl_gfx_geometry_get(sd->box);
+
+   if (screen_coords)
+     {
+        Ecore_Evas *ee = ecore_evas_ecore_evas_get(evas_object_evas_get(sd->box));
+        if (!ee) return r;
+        ecore_evas_geometry_get(ee, &ee_x, &ee_y, NULL, NULL);
+        r.x += ee_x;
+        r.y += ee_y;
+     }
+   return r;
+}
+//
+
 static Eina_Bool
 _item_access_action_activate(Evas_Object *obj, const char *params EINA_UNUSED)
 {
@@ -1625,6 +1657,14 @@ _elm_ctxpopup_efl_access_component_highlight_clear(Eo *obj EINA_UNUSED, Elm_Ctxp
 }
 //
 
+//TIZEN ONLY(20150710)ctxpopup: Accessible methods for children_get, extents_get and item name_get
+EOLIAN static const char*
+_elm_ctxpopup_item_efl_access_name_get(Eo *eo_it EINA_UNUSED, Elm_Ctxpopup_Item_Data *item)
+{
+   return strdup(elm_object_item_text_get(item->list_item));
+}
+//
+
 /* Internal EO APIs and hidden overrides */
 
 ELM_WIDGET_KEY_DOWN_DEFAULT_IMPLEMENT(elm_ctxpopup, Elm_Ctxpopup_Data)
index cdcb6a4..1729a5f 100644 (file)
@@ -219,6 +219,7 @@ class Elm.Ctxpopup (Efl.Ui.Layout, Efl.Ui.Focus.Layer, Efl.Access.Widget.Action,
       Efl.Access.Component.highlight_grab;
       Efl.Access.Component.highlight_clear;
       //
+      Efl.Access.Component.extents { get; }
    }
    events {
       dismissed; [[Called when context popup was dismissed]]
index 8c87b23..8fd9eb6 100644 (file)
@@ -26,5 +26,6 @@ class Elm.Ctxpopup.Item(Elm.Widget.Item, Efl.Ui.Item, Efl.Access.Widget.Action)
         Efl.Ui.Item.prev { get; }
         Efl.Ui.Item.next { get; }
         Efl.Access.Widget.Action.elm_actions { get; }
+        Efl.Access.name { get; }
    }
 }