From ff0595d93ada8becd1f7604804d62307915373be Mon Sep 17 00:00:00 2001 From: =?utf8?q?Iv=C3=A1n=20Briano?= Date: Wed, 16 Sep 2009 19:13:55 +0000 Subject: [PATCH] Get icon info from hoversel item. Patch by billiob SVN revision: 42522 --- src/lib/Elementary.h.in | 1 + src/lib/elc_hoversel.c | 21 +++++++++++++++++++++ 2 files changed, 22 insertions(+) diff --git a/src/lib/Elementary.h.in b/src/lib/Elementary.h.in index 825839f..e44eedf 100644 --- a/src/lib/Elementary.h.in +++ b/src/lib/Elementary.h.in @@ -563,6 +563,7 @@ extern "C" { EAPI void *elm_hoversel_item_data_get(Elm_Hoversel_Item *it); EAPI const char *elm_hoversel_item_label_get(Elm_Hoversel_Item *it); EAPI void elm_hoversel_item_icon_set(Elm_Hoversel_Item *it, const char *icon_file, const char *icon_group, Elm_Icon_Type icon_type); + EAPI void elm_hoversel_item_icon_get(Elm_Hoversel_Item *it, const char **icon_file, const char **icon_group, Elm_Icon_Type *icon_type); /* smart callbacks called: * "clicked" - the user clicked the hoversel button and popped up the sel * "selected" - an item in the hoversel list is selected diff --git a/src/lib/elc_hoversel.c b/src/lib/elc_hoversel.c index 11c7049..785dc29 100644 --- a/src/lib/elc_hoversel.c +++ b/src/lib/elc_hoversel.c @@ -511,3 +511,24 @@ elm_hoversel_item_icon_set(Elm_Hoversel_Item *it, const char *icon_file, const c it->icon_type = icon_type; } +/** + * Get the icon object of the hoversel item + * + * @param it The item to get the icon from + * @param icon_file The image file path on disk used for the icon or standard + * icon name. return + * @param icon_group The edje group used if @p icon_file is an edje file. NULL + * if the icon is not an edje file. return + * @param icon_type The icon type. return + * + * @ingroup Hoversel + */ +EAPI void +elm_hoversel_item_icon_get(Elm_Hoversel_Item *it, const char **icon_file, const char **icon_group, Elm_Icon_Type *icon_type) +{ + if (!it) return; + + if (icon_file) *icon_file = it->icon_file; + if (icon_group) *icon_group = it->icon_group; + if (icon_type) *icon_type = it->icon_type; +} -- 2.7.4