*
* If you want to free this data, or handle that the way you need when the
* item is deleted, set a callback function for that, with
- * elm_diskselector_item_del_cb_set().
+ * elm_object_item_del_cb_set().
*
* As you can see we check if @c it is not @c NULL after appending it.
* If an error happens, we won't try to set a function for it.
printf("Error adding item\n");
return;
}
- elm_diskselector_item_del_cb_set(ds_it, _free_data);
+ elm_object_item_del_cb_set(ds_it, _free_data);
}
static void
hoversel_it = elm_hoversel_item_add(obj, str, NULL, ELM_ICON_NONE, NULL,
str);
- elm_hoversel_item_del_cb_set(hoversel_it, _free);
+ elm_object_item_del_cb_set(hoversel_it, _free);
}
static void
elm_index_item_append(d.index, buf, it);
index_it = elm_index_item_find(d.index, it);
- elm_index_item_del_cb_set(index_it, _index_item_del);
+ elm_object_item_del_cb_set(index_it, _index_item_del);
}
}
td->app = ad;
td->tab = elm_toolbar_item_append(td->app->tabs, NULL, "New tab",
_tab_clicked_cb, td);
- elm_toolbar_item_del_cb_set(td->tab, _tb_item_del_cb);
+ elm_object_item_del_cb_set(td->tab, _tb_item_del_cb);
evas_object_data_set(td->web, "tab_data", td);
EAPI void
elm_hoversel_item_del_cb_set(Elm_Object_Item *it, Evas_Smart_Cb func)
{
- ELM_OBJ_ITEM_CHECK_OR_RETURN(it);
- elm_widget_item_del_cb_set(it, func);
+ elm_object_item_del_cb_set(it, func);
}
EAPI void *
* @warning Should @b not be called while the hoversel is active; use
* elm_hoversel_expanded_get() to check first.
*
- * @see elm_hoversel_item_del_cb_set()
* @see elm_hoversel_item_del()
*/
EAPI void elm_hoversel_clear(Evas_Object *obj);
* hoversel is active; use elm_hoversel_expanded_get() to check first).
*
* @see elm_hoversel_item_add()
- * @see elm_hoversel_item_del_cb_set()
*/
EAPI void elm_hoversel_item_del(Elm_Object_Item *it);
/**
- * @brief Set the function to be called when an item from the hoversel is
- * freed.
- *
- * @param it The item to set the callback on
- * @param func The function called
- *
- * That function will receive these parameters:
- * @li void * item data
- * @li Evas_Object * hoversel object
- * @li Elm_Object_Item * hoversel item
- *
- * @see elm_hoversel_item_add()
- */
-EAPI void elm_hoversel_item_del_cb_set(Elm_Object_Item *it, Evas_Smart_Cb func);
-
-/**
* @brief This sets the icon for the given hoversel item.
*
* @param it The item to set the icon
EINA_DEPRECATED EAPI const char *elm_hoversel_item_label_get(const Elm_Object_Item *it);
/**
+ * @brief Set the function to be called when an item from the hoversel is
+ * freed.
+ *
+ * @param it The item to set the callback on
+ * @param func The function called
+ *
+ * That function will receive these parameters:
+ * @li void * item data
+ * @li Evas_Object * hoversel object
+ * @li Elm_Object_Item * hoversel item
+ *
+ * @see elm_hoversel_item_add()
+ * @deprecated Use elm_object_item_del_cb_set() instead
+ */
+EINA_DEPRECATED EAPI void elm_hoversel_item_del_cb_set(Elm_Object_Item *it, Evas_Smart_Cb func);
+
+/**
* Set actionslider labels.
*
* @param obj The actionslider object
*/
EINA_DEPRECATED EAPI const char *elm_diskselector_item_label_get(const Elm_Object_Item *it);
+/**
+ * Set the function called when a diskselector item is freed.
+ *
+ * @param it The item to set the callback on
+ * @param func The function called
+ *
+ * If there is a @p func, then it will be called prior item's memory release.
+ * That will be called with the following arguments:
+ * @li item's data;
+ * @li item's Evas object;
+ * @li item itself;
+ *
+ * This way, a data associated to a diskselector item could be properly
+ * freed.
+ * @deprecated Use elm_object_item_del_cb_set() instead
+ *
+ * @ingroup Diskselector
+ */
+EINA_DEPRECATED EAPI void elm_diskselector_item_del_cb_set(Elm_Object_Item *it, Evas_Smart_Cb func);
+
EINA_DEPRECATED EAPI void elm_factory_content_set(Evas_Object *obj, Evas_Object *content);
EINA_DEPRECATED EAPI Evas_Object *elm_factory_content_get(const Evas_Object *obj);
EINA_DEPRECATED EAPI void elm_index_item_data_set(Elm_Object_Item *it, const void *data);
/**
- * @brief Set the label on the label object
+ * Set the function to be called when a given index widget item is freed.
+ *
+ * @param it The item to set the callback on
+ * @param func The function to call on the item's deletion
+ *
+ * When called, @p func will have both @c data and @c event_info
+ * arguments with the @p it item's data value and, naturally, the
+ * @c obj argument with a handle to the parent index widget.
+ *
+ * @deprecated Use elm_object_item_del_cb_set() instead
+ * @ingroup Index
+ */
+EINA_DEPRECATED EAPI void elm_index_item_del_cb_set(Elm_Object_Item *it, Evas_Smart_Cb func);
+
+/**
+* @brief Set the label on the label object
*
* @param obj The label object
* @param label The label will be used on the label object
EINA_DEPRECATED EAPI void *elm_menu_item_data_get(const Elm_Object_Item *it);
/**
+ * @brief Set the function called when a menu item is deleted.
+ *
+ * @param it The item to set the callback on
+ * @param func The function called
+ *
+ * @see elm_menu_item_add()
+ * @see elm_menu_item_del()
+ * @deprecated Use elm_object_item_del_cb_set() instead
+ */
+EINA_DEPRECATED EAPI void elm_menu_item_del_cb_set(Elm_Object_Item *it, Evas_Smart_Cb func);
+
+/**
* @brief Sets the data to be associated with menu item @p item.
*
* @param it The item
EINA_DEPRECATED EAPI Eina_Bool elm_toolbar_orientation_get(const Evas_Object *obj);
/**
+ * Set the function called when a toolbar item is freed.
+ *
+ * @param it The item to set the callback on.
+ * @param func The function called.
+ *
+ * If there is a @p func, then it will be called prior item's memory release.
+ * That will be called with the following arguments:
+ * @li item's data;
+ * @li item's Evas object;
+ * @li item itself;
+ *
+ * This way, a data associated to a toolbar item could be properly freed.
+ *
+ * @deprecated Use elm_object_item_del_cb_set() instead
+ * @ingroup Toolbar
+ */
+EINA_DEPRECATED EAPI void elm_toolbar_item_del_cb_set(Elm_Object_Item *it, Evas_Smart_Cb func);
+
+/**
* @brief Link a Elm_Payer with an Elm_Video object.
*
* @param player the Elm_Player object.
EAPI void
elm_diskselector_item_del_cb_set(Elm_Object_Item *it, Evas_Smart_Cb func)
{
- ELM_OBJ_ITEM_CHECK_OR_RETURN(it);
- elm_widget_item_del_cb_set(it, func);
+ elm_object_item_del_cb_set(it, func);
}
EAPI void *
* elm_diskselector_item_del().
*
* Associated @p data can be properly freed when item is deleted if a
- * callback function is set with elm_diskselector_item_del_cb_set().
+ * callback function is set with elm_object_item_del_cb_set().
*
* If a function is passed as argument, it will be called everytime this item
* is selected, i.e., the user stops the diskselector with this
* @endcode
*
* @see elm_diskselector_item_del()
- * @see elm_diskselector_item_del_cb_set()
* @see elm_diskselector_clear()
* @see elm_icon_add()
*
*
* @see elm_diskselector_clear()
* @see elm_diskselector_item_append()
- * @see elm_diskselector_item_del_cb_set()
*
* @ingroup Diskselector
*/
EAPI void elm_diskselector_item_del(Elm_Object_Item *it);
/**
- * Set the function called when a diskselector item is freed.
- *
- * @param it The item to set the callback on
- * @param func The function called
- *
- * If there is a @p func, then it will be called prior item's memory release.
- * That will be called with the following arguments:
- * @li item's data;
- * @li item's Evas object;
- * @li item itself;
- *
- * This way, a data associated to a diskselector item could be properly
- * freed.
- *
- * @ingroup Diskselector
- */
-EAPI void elm_diskselector_item_del_cb_set(Elm_Object_Item *it, Evas_Smart_Cb func);
-
-/**
* Get the selected item.
*
* @param obj The diskselector object.
EAPI void
elm_index_item_del_cb_set(Elm_Object_Item *it, Evas_Smart_Cb func)
{
- ELM_OBJ_ITEM_CHECK_OR_RETURN(it);
- elm_widget_item_del_cb_set(it, func);
+ elm_object_item_del_cb_set(it, func);
}
EAPI const char *
* @param obj The index object
* @param item The item to be removed from @p obj
*
- * If a deletion callback is set, via elm_index_item_del_cb_set(),
+ * If a deletion callback is set, via elm_object_item_del_cb_set(),
* that callback function will be called by this one.
*
* @ingroup Index
*
* @param obj The index object.
*
- * If deletion callbacks are set, via elm_index_item_del_cb_set(),
+ * If deletion callbacks are set, via elm_object_item_del_cb_set(),
* that callback function will be called for each item in @p obj.
*
* @ingroup Index
EAPI void elm_index_item_go(Evas_Object *obj, int level);
/**
- * Set the function to be called when a given index widget item is freed.
- *
- * @param it The item to set the callback on
- * @param func The function to call on the item's deletion
- *
- * When called, @p func will have both @c data and @c event_info
- * arguments with the @p it item's data value and, naturally, the
- * @c obj argument with a handle to the parent index widget.
- *
- * @ingroup Index
- */
-EAPI void elm_index_item_del_cb_set(Elm_Object_Item *it, Evas_Smart_Cb func);
-
-/**
* Get the letter (string) set on a given index widget item.
*
* @param it The index item handle
return _elm_widget_item_disabled_get((Elm_Widget_Item *) it);
}
+EAPI void elm_object_item_del_cb_set(Elm_Object_Item *it, Evas_Smart_Cb del_cb)
+{
+ _elm_widget_item_del_cb_set((Elm_Widget_Item *) it, del_cb);
+}
EAPI void
elm_menu_item_del_cb_set(Elm_Object_Item *it, Evas_Smart_Cb func)
{
- ELM_OBJ_ITEM_CHECK_OR_RETURN(it);
- elm_widget_item_del_cb_set(it, func);
+ elm_object_item_del_cb_set(it, func);
}
EAPI void *
EAPI void elm_menu_item_del(Elm_Object_Item *it);
/**
- * @brief Set the function called when a menu item is deleted.
- *
- * @param it The item to set the callback on
- * @param func The function called
- *
- * @see elm_menu_item_add()
- * @see elm_menu_item_del()
- */
-EAPI void elm_menu_item_del_cb_set(Elm_Object_Item *it, Evas_Smart_Cb func);
-
-/**
* @brief Returns a list of @p item's subitems.
*
* @param it The item
* @ingroup Styles
*/
EAPI Eina_Bool elm_object_item_disabled_get(const Elm_Object_Item *it);
+
+/**
+ * @brief Set the function to be called when an item from the widget is
+ * freed.
+ *
+ * @param it The item to set the callback on
+ * @param func The function called
+ *
+ * That function will receive these parameters:
+ * @li void * item data
+ * @li Evas_Object * widget object
+ * @li Elm_Object_Item * widget item
+ *
+ * @see elm_object_item_del()
+ * @ingroup General
+ */
+EAPI void elm_object_item_del_cb_set(Elm_Object_Item *it, Evas_Smart_Cb del_cb);
EAPI void
elm_toolbar_item_del_cb_set(Elm_Object_Item *it, Evas_Smart_Cb func)
{
- ELM_OBJ_ITEM_CHECK_OR_RETURN(it);
- elm_widget_item_del_cb_set(it, func);
+ elm_object_item_del_cb_set(it, func);
}
EAPI Eina_Bool
* elm_toolbar_item_del().
*
* Associated @p data can be properly freed when item is deleted if a
- * callback function is set with elm_toolbar_item_del_cb_set().
+ * callback function is set with elm_object_item_del_cb_set().
*
* If a function is passed as argument, it will be called everytime this item
* is selected, i.e., the user clicks over an unselected item.
*
* @see elm_toolbar_item_icon_set()
* @see elm_toolbar_item_del()
- * @see elm_toolbar_item_del_cb_set()
*
* @ingroup Toolbar
*/
* elm_toolbar_item_del().
*
* Associated @p data can be properly freed when item is deleted if a
- * callback function is set with elm_toolbar_item_del_cb_set().
+ * callback function is set with elm_object_item_del_cb_set().
*
* If a function is passed as argument, it will be called everytime this item
* is selected, i.e., the user clicks over an unselected item.
*
* @see elm_toolbar_item_icon_set()
* @see elm_toolbar_item_del()
- * @see elm_toolbar_item_del_cb_set()
*
* @ingroup Toolbar
*/
* elm_toolbar_item_del().
*
* Associated @p data can be properly freed when item is deleted if a
- * callback function is set with elm_toolbar_item_del_cb_set().
+ * callback function is set with elm_object_item_del_cb_set().
*
* If a function is passed as argument, it will be called everytime this item
* is selected, i.e., the user clicks over an unselected item.
*
* @see elm_toolbar_item_icon_set()
* @see elm_toolbar_item_del()
- * @see elm_toolbar_item_del_cb_set()
*
* @ingroup Toolbar
*/
* elm_toolbar_item_del().
*
* Associated @p data can be properly freed when item is deleted if a
- * callback function is set with elm_toolbar_item_del_cb_set().
+ * callback function is set with elm_object_item_del_cb_set().
*
* If a function is passed as argument, it will be called everytime this item
* is selected, i.e., the user clicks over an unselected item.
*
* @see elm_toolbar_item_icon_set()
* @see elm_toolbar_item_del()
- * @see elm_toolbar_item_del_cb_set()
*
* @ingroup Toolbar
*/
* @param it The item of toolbar to be deleted.
*
* @see elm_toolbar_item_append()
- * @see elm_toolbar_item_del_cb_set()
*
* @ingroup Toolbar
*/
EAPI void elm_toolbar_item_del(Elm_Object_Item *it);
-/**
- * Set the function called when a toolbar item is freed.
- *
- * @param it The item to set the callback on.
- * @param func The function called.
- *
- * If there is a @p func, then it will be called prior item's memory release.
- * That will be called with the following arguments:
- * @li item's data;
- * @li item's Evas object;
- * @li item itself;
- *
- * This way, a data associated to a toolbar item could be properly freed.
- *
- * @ingroup Toolbar
- */
-EAPI void elm_toolbar_item_del_cb_set(Elm_Object_Item *it, Evas_Smart_Cb func);
/**
* Set or unset item as a separator.