diff --git a/legacy/elementary/src/lib/Elementary.h.in b/legacy/elementary/src/lib/Elementary.h.in index 05a0ae41a5..7dafce81fa 100644 --- a/legacy/elementary/src/lib/Elementary.h.in +++ b/legacy/elementary/src/lib/Elementary.h.in @@ -528,6 +528,7 @@ extern "C" { EAPI Elm_Hoversel_Item *elm_hoversel_item_add(Evas_Object *obj, const char *label, const char *icon_file, Elm_Icon_Type icon_type, void (*func) (void *data, Evas_Object *obj, void *event_info), const void *data); EAPI void elm_hoversel_item_del(Elm_Hoversel_Item *item); EAPI void *elm_hoversel_item_data_get(Elm_Hoversel_Item *it); + EAPI const char *elm_hoversel_item_label_get(Elm_Hoversel_Item *it); /* 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/legacy/elementary/src/lib/elc_hoversel.c b/legacy/elementary/src/lib/elc_hoversel.c index 93bc41dd68..8eb73a4bb4 100644 --- a/legacy/elementary/src/lib/elc_hoversel.c +++ b/legacy/elementary/src/lib/elc_hoversel.c @@ -390,3 +390,20 @@ elm_hoversel_item_data_get(Elm_Hoversel_Item *it) if (!it) return NULL; return it->data; } + +/** + * Get the text label of an hoversel item + * + * This returns the text of the label of the given hoversel item + * + * @param it The item to get the label + * @return The text label of the hoversel item + * + * @ingroup Hoversel + */ +EAPI const char * +elm_hoversel_item_label_get(Elm_Hoversel_Item *it) +{ + if (!it) return NULL; + return it->label; +}