Get icon info from hoversel item.
authorIván Briano <sachieru@gmail.com>
Wed, 16 Sep 2009 19:13:55 +0000 (19:13 +0000)
committerIván Briano <sachieru@gmail.com>
Wed, 16 Sep 2009 19:13:55 +0000 (19:13 +0000)
Patch by billiob

SVN revision: 42522

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

index 825839f..e44eedf 100644 (file)
@@ -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
index 11c7049..785dc29 100644 (file)
@@ -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;
+}