elementary/general - added new API elm_object_item_object_get
authorhermet <hermet@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Thu, 6 Oct 2011 01:13:51 +0000 (01:13 +0000)
committerMike McCormack <mj.mccormack@samsung.com>
Wed, 9 Nov 2011 01:43:42 +0000 (10:43 +0900)
It returns the widget object handle which contains the given item.

git-svn-id: https://svn.enlightenment.org/svn/e/trunk/elementary@63861 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

src/lib/Elementary.h.in
src/lib/elm_main.c

index 5ad2a4d..fe14274 100644 (file)
@@ -1071,6 +1071,18 @@ extern "C" {
 #define elm_object_content_unset(obj) elm_object_content_part_unset((obj), NULL)
 
    /**
+    * Get the wiget object's handle which contains a given item
+    *
+    * @param item The Elementary object item 
+    * @return The widget object
+    *
+    * @note This returns the widget object itself that an item belongs to.
+    *
+    * @ingroup General
+    */
+   EAPI Evas_Object *elm_object_item_object_get(const Elm_Object_Item *it) EINA_ARG_NONNULL(1);
+
+   /**
     * Set a content of an object item
     *
     * @param it The Elementary object item
index b9b1d6c..85a9a2c 100644 (file)
@@ -2132,6 +2132,12 @@ elm_longpress_timeout_get(void)
    return _elm_config->longpress_timeout;
 }
 
+EAPI Evas_Object *
+elm_object_item_object_get(const Elm_Object_Item *it)
+{
+   return ((Elm_Widget_Item *) it)->widget;
+}
+
 EAPI void
 elm_object_item_content_part_set(Elm_Object_Item *it,
                                  const char *part,