From: Enlightenment S. <no-...@en...> - 2009-09-16 19:14:06
|
Log: Get icon info from hoversel item. Patch by billiob Author: sachiel Date: 2009-09-16 12:13:55 -0700 (Wed, 16 Sep 2009) New Revision: 42522 Modified: trunk/TMP/st/elementary/src/lib/Elementary.h.in trunk/TMP/st/elementary/src/lib/elc_hoversel.c Modified: trunk/TMP/st/elementary/src/lib/Elementary.h.in =================================================================== --- trunk/TMP/st/elementary/src/lib/Elementary.h.in 2009-09-16 18:05:04 UTC (rev 42521) +++ trunk/TMP/st/elementary/src/lib/Elementary.h.in 2009-09-16 19:13:55 UTC (rev 42522) @@ -563,6 +563,7 @@ 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 Modified: trunk/TMP/st/elementary/src/lib/elc_hoversel.c =================================================================== --- trunk/TMP/st/elementary/src/lib/elc_hoversel.c 2009-09-16 18:05:04 UTC (rev 42521) +++ trunk/TMP/st/elementary/src/lib/elc_hoversel.c 2009-09-16 19:13:55 UTC (rev 42522) @@ -511,3 +511,24 @@ 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; +} |