Add toolbar item data getter / setter

Useful for bindings


SVN revision: 53898
This commit is contained in:
Bruno Dilly 2010-10-26 13:15:32 +00:00
parent de2fc0b261
commit a544658e28
2 changed files with 38 additions and 0 deletions

View File

@ -1187,6 +1187,8 @@ extern "C" {
EAPI Evas_Object *elm_toolbar_item_icon_get(const Elm_Toolbar_Item *item);
EAPI const char *elm_toolbar_item_label_get(const Elm_Toolbar_Item *item);
EAPI void elm_toolbar_item_label_set(Elm_Toolbar_Item *item, const char *label);
EAPI void *elm_toolbar_item_data_get(const Elm_Toolbar_Item *item);
EAPI void elm_toolbar_item_data_set(Elm_Toolbar_Item *item, const void *data);
EAPI Elm_Toolbar_Item *elm_toolbar_item_find_by_label(const Evas_Object *obj, const char *label);
EAPI Eina_Bool elm_toolbar_item_selected_get(const Elm_Toolbar_Item *item);
EAPI void elm_toolbar_item_selected_set(Elm_Toolbar_Item *item, Eina_Bool selected);

View File

@ -1576,3 +1576,39 @@ elm_toolbar_item_find_by_label(const Evas_Object *obj, const char *label)
return NULL;
}
/**
* Set the data item from the toolbar item
*
* This set the data value passed on the elm_toolbar_item_append() and
* related item addition calls.
*
* @param item The item
* @param data The new data pointer to set
*
* @ingroup Toolbar
*/
EAPI void
elm_toolbar_item_data_set(Elm_Toolbar_Item *item, const void *data)
{
ELM_TOOLBAR_ITEM_CHECK_OR_RETURN(item);
elm_widget_item_data_set(item, data);
}
/**
* Get the data item from the toolbar item
*
* This returns the data value passed on the elm_toolbar_item_append() and
* related item addition calls.
*
* @param item The item
* @return The data pointer provided when created
*
* @ingroup Toolbar
*/
EAPI void *
elm_toolbar_item_data_get(const Elm_Toolbar_Item *item)
{
ELM_TOOLBAR_ITEM_CHECK_OR_RETURN(item, NULL);
return elm_widget_item_data_get(item);
}