From 232d068aa5d930daaf97708cea2441f96679b995 Mon Sep 17 00:00:00 2001 From: hermet Date: Thu, 6 Oct 2011 01:13:51 +0000 Subject: [PATCH] elementary/general - added new API elm_object_item_object_get 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 | 12 ++++++++++++ src/lib/elm_main.c | 6 ++++++ 2 files changed, 18 insertions(+) diff --git a/src/lib/Elementary.h.in b/src/lib/Elementary.h.in index 5ad2a4d..fe14274 100644 --- a/src/lib/Elementary.h.in +++ b/src/lib/Elementary.h.in @@ -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 diff --git a/src/lib/elm_main.c b/src/lib/elm_main.c index b9b1d6c..85a9a2c 100644 --- a/src/lib/elm_main.c +++ b/src/lib/elm_main.c @@ -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, -- 2.7.4