ctxpopup: Accessible methods for children_get, extents_get and item name_get 14/71414/3
authorPatryk Kaczmarek <patryk.k@samsung.com>
Thu, 9 Jul 2015 15:05:32 +0000 (17:05 +0200)
committerGerrit Code Review <gerrit@review.vlan103.tizen.org>
Thu, 26 May 2016 05:56:53 +0000 (22:56 -0700)
@tizen_feature: new feature

Change-Id: Iea7270664f9085cba637507de022c15344dd7130
Signed-off-by: Patryk Kaczmarek <patryk.k@samsung.com>
src/lib/elc_ctxpopup.c
src/lib/elm_ctxpopup.eo
src/lib/elm_ctxpopup_item.eo

index 8ca83dc..552fe54 100644 (file)
@@ -1303,9 +1303,6 @@ _item_wrap_cb(void *data, Evas_Object *obj, void *event_info EINA_UNUSED)
    Elm_Ctxpopup_Item_Data *item = data;
    if (!item->wcb.org_func_cb) return;
    item->wcb.org_func_cb((void *)item->wcb.org_data, item->wcb.cobj, EO_OBJ(item));
-//TIZEN ONLY(20150710)ctxpopup: Accessible methods for children_get, extents_get and item name_get
-   eo_do(obj, elm_interface_atspi_accessible_role_set(ELM_ATSPI_ROLE_MENU_ITEM));
-//
 }
 
 EOLIAN static Eo *
@@ -1313,7 +1310,9 @@ _elm_ctxpopup_item_eo_base_constructor(Eo *obj, Elm_Ctxpopup_Item_Data *it)
 {
    obj = eo_do_super_ret(obj, ELM_CTXPOPUP_ITEM_CLASS, obj, eo_constructor());
    it->base = eo_data_scope_get(obj, ELM_WIDGET_ITEM_CLASS);
-
+   //TIZEN ONLY(20150710)ctxpopup: Accessible methods for children_get, extents_get and item name_get
+   eo_do(obj, elm_interface_atspi_accessible_role_set(ELM_ATSPI_ROLE_LIST_ITEM));
+   //
    return obj;
 }
 
@@ -1531,6 +1530,33 @@ _elm_ctxpopup_elm_interface_atspi_accessible_state_set_get(Eo *obj, Elm_Ctxpopup
    return ret;
 }
 
+//TIZEN ONLY(20150710): ctxpopup: Accessible methods for children_get, extents_get and item name_get
+EOLIAN static void
+_elm_ctxpopup_elm_interface_atspi_component_extents_get(Eo *obj EINA_UNUSED, Elm_Ctxpopup_Data *sd, Eina_Bool screen_coords, int *x, int *y, int *w, int *h)
+{
+   int ee_x, ee_y;
+
+   if (!sd->box)
+     {
+        if (x) *x = -1;
+        if (y) *y = -1;
+        if (w) *w = -1;
+        if (h) *h = -1;
+        return;
+     }
+   evas_object_geometry_get(sd->box, x, y, w, h);
+
+   if (screen_coords)
+     {
+        Ecore_Evas *ee = ecore_evas_ecore_evas_get(evas_object_evas_get(sd->box));
+        if (!ee) return;
+        ecore_evas_geometry_get(ee, &ee_x, &ee_y, NULL, NULL);
+        if (x) *x += ee_x;
+        if (y) *y += ee_y;
+     }
+}
+//
+
 static Eina_Bool
 _item_action_activate(Evas_Object *obj, const char *params EINA_UNUSED)
 {
@@ -1575,5 +1601,13 @@ _elm_ctxpopup_elm_interface_atspi_component_highlight_clear(Eo *obj EINA_UNUSED,
 }
 //
 
+//TIZEN ONLY(20150710)ctxpopup: Accessible methods for children_get, extents_get and item name_get
+EOLIAN char *
+_elm_ctxpopup_item_elm_interface_atspi_accessible_name_get(Eo *eo_it EINA_UNUSED, Elm_Ctxpopup_Item_Data *item)
+{
+   return strdup(elm_object_item_text_get(item->list_item));
+}
+//
+
 #include "elm_ctxpopup_item.eo.c"
 #include "elm_ctxpopup.eo.c"
index 376bd48..7f42b4c 100644 (file)
@@ -234,6 +234,7 @@ class Elm.Ctxpopup (Elm.Layout, Elm_Interface_Atspi_Widget_Action)
       Elm.Layout.sizing_eval;
       Elm_Interface_Atspi_Widget_Action.elm_actions.get;
       Elm_Interface_Atspi_Accessible.state_set.get;
+      Elm_Interface_Atspi_Component.extents.get;
       Elm_Interface_Atspi_Component.highlight_grab;
       Elm_Interface_Atspi_Component.highlight_clear;
    }
index 3424f51..402b01a 100644 (file)
@@ -49,5 +49,6 @@ class Elm.Ctxpopup_Item(Elm.Widget_Item, Elm_Interface_Atspi_Widget_Action)
         Elm.Widget_Item.focus.set;
         Elm.Widget_Item.focus.get;
         Elm_Interface_Atspi_Widget_Action.elm_actions.get;
+         Elm_Interface_Atspi_Accessible.name.get;
    }
 }