const char *icon_group;
Elm_Icon_Type icon_type;
void (*func) (void *data, Evas_Object *obj, void *event_info);
+ void (*del_cb) (void *data, Evas_Object *obj, void *event_info);
void *data;
};
elm_hoversel_hover_end(obj);
EINA_LIST_FREE(wd->items, it)
{
+ if (it->del_cb) it->del_cb((void *)it->data, it->obj, it);
eina_stringshare_del(it->label);
eina_stringshare_del(it->icon_file);
eina_stringshare_del(it->icon_group);
{
Widget_Data *wd = elm_widget_data_get(it->obj);
+ if (it->del_cb) it->del_cb((void *)it->data, it->obj, it);
if (!wd) return;
elm_hoversel_hover_end(it->obj);
wd->items = eina_list_remove(wd->items, it);
free(it);
}
+/**
+ * Set the function called when an hoversel item is freed.
+ *
+ * @param it The item to set the callback on
+ * @param func The function called
+ *
+ * @ingroup Hoversel
+ */
+EAPI void
+elm_hoversel_item_del_cb_set(Elm_Hoversel_Item *it, void (*func)(void *data, Evas_Object *obj, void *event_info))
+{
+ it->del_cb = func;
+}
+
/**
* Get the data pointer passed to the item add function
*
free(it);
}
+/**
+ * Set the function called when a list item is freed.
+ *
+ * @param it The item to set the callback on
+ * @param func The function called
+ *
+ * @ingroup Hoversel
+ */
EAPI void
elm_list_item_del_cb_set(Elm_List_Item *it, void (*func)(void *data, Evas_Object *obj, void *event_info))
{