kimcinoo pushed a commit to branch master.

commit 741243b645248223527ef834ed0dc10622a0ffd3
Author: Tae-Hwan Kim <[email protected]>
Date:   Tue Jun 4 19:34:18 2013 +0900

    [Access] Add new API to register a part on an object item as an access 
object.
    Author: bluezery
---
 src/lib/elm_access.c      |  4 +++-
 src/lib/elm_main.c        | 29 +++++++++++++++++++++++++++++
 src/lib/elm_object_item.h | 12 ++++++++++++
 3 files changed, 44 insertions(+), 1 deletion(-)

diff --git a/src/lib/elm_access.c b/src/lib/elm_access.c
index 1ad0884..c5497b1 100644
--- a/src/lib/elm_access.c
+++ b/src/lib/elm_access.c
@@ -1065,7 +1065,9 @@ _elm_access_widget_item_unregister(Elm_Widget_Item *item)
 
    if (!item->access_obj) return;
 
-   ho = item->view;
+   Elm_Access_Info *ac = _elm_access_object_get(item->access_obj);
+   ho = ac->hoverobj;
+
    evas_object_event_callback_del_full(ho, EVAS_CALLBACK_RESIZE,
                                   _content_resize, item->access_obj);
    evas_object_event_callback_del_full(ho, EVAS_CALLBACK_MOVE,
diff --git a/src/lib/elm_main.c b/src/lib/elm_main.c
index 33b5c5b..add6f22 100644
--- a/src/lib/elm_main.c
+++ b/src/lib/elm_main.c
@@ -1687,6 +1687,35 @@ elm_object_item_access_info_set(Elm_Object_Item *it, 
const char *txt)
 }
 
 EAPI Evas_Object *
+elm_object_item_part_access_register(Elm_Object_Item *item, const char *part)
+{
+   EINA_SAFETY_ON_NULL_RETURN_VAL(item, NULL);
+   EINA_SAFETY_ON_NULL_RETURN_VAL(part, NULL);
+
+   Elm_Widget_Item *it = (Elm_Widget_Item *)item;
+   Evas_Object *edj;
+   Evas_Object *parent;
+
+   const char *type = elm_widget_type_get(VIEW(item));
+
+   if (type && !strcmp(type, "elm_layout"))
+     {
+        edj = elm_layout_edje_get(VIEW(item));
+        parent = VIEW(item);
+     }
+   else
+     {
+        edj = VIEW(item);
+        parent = WIDGET(item);
+     }
+
+   elm_object_item_access_unregister(item);
+   it->access_obj =
+      _elm_access_edje_object_part_object_register(parent, edj, part);
+   return it->access_obj;
+}
+
+EAPI Evas_Object *
 elm_object_item_access_register(Elm_Object_Item *item)
 {
    Elm_Widget_Item *it;
diff --git a/src/lib/elm_object_item.h b/src/lib/elm_object_item.h
index 5047806..5c75d6e 100644
--- a/src/lib/elm_object_item.h
+++ b/src/lib/elm_object_item.h
@@ -222,6 +222,18 @@ EAPI void                         
elm_object_item_access_info_set(Elm_Object_Ite
 EAPI Evas_Object                 
*elm_object_item_access_register(Elm_Object_Item *item);
 
 /**
+ * @brief Register a part on an object item as an accessible object.
+ * @since 1.8
+ *
+ * @param item The elementary object item
+ * @param part The part name to set
+ * @return Accessible object of the object item or NULL for any error
+ *
+ * @ingroup General
+ */
+EAPI Evas_Object                 
*elm_object_item_part_access_register(Elm_Object_Item *item, const char *part);
+
+/**
  * @brief Unregister accessible object of the object item.
  * @since 1.8
  *

-- 

------------------------------------------------------------------------------
How ServiceNow helps IT people transform IT departments:
1. A cloud service to automate IT design, transition and operations
2. Dashboards that offer high-level views of enterprise services
3. A single system of record for all IT processes
http://p.sf.net/sfu/servicenow-d2d-j

Reply via email to