elementary/toolbar, diskseletor - deprecated tooltip APIs

SVN revision: 67127
This commit is contained in:
ChunEon Park 2012-01-12 08:25:12 +00:00
parent 6ac8466eba
commit 8e4a2fcbe9
5 changed files with 204 additions and 192 deletions

View File

@ -398,12 +398,12 @@ test_tooltip(void *data __UNUSED__,
evas_object_show(tb);
tb_it = elm_toolbar_item_append(tb, NULL, "Open", NULL, NULL);
elm_toolbar_item_tooltip_text_set(tb_it, "Opens a file");
elm_object_item_tooltip_text_set(tb_it, "Opens a file");
tb_it = elm_toolbar_item_append(tb, NULL, "Icon", NULL, NULL);
elm_toolbar_item_tooltip_content_cb_set
elm_object_item_tooltip_content_cb_set
(tb_it, _tt_item_icon, (void *)456L, _tt_item_icon_del);
elm_toolbar_item_tooltip_style_set(tb_it, "transparent");
elm_object_item_tooltip_style_set(tb_it, "transparent");
bt = elm_button_add(win);
elm_object_text_set(bt, "Simple text tooltip");

View File

@ -1470,6 +1470,96 @@ EINA_DEPRECATED EAPI void elm_diskselector_item_del_cb_set(Elm
*/
EINA_DEPRECATED EAPI void elm_diskselector_item_del(Elm_Object_Item *it);
/**
* Set the text to be shown in the diskselector item.
*
* @param it Target item
* @param text The text to set in the content
*
* Setup the text as tooltip to object. The item can have only one tooltip,
* so any previous tooltip data is removed.
*
* @deprecated Use elm_object_item_tooltip_text_set() instead
* @see elm_object_tooltip_text_set() for more details.
*
* @ingroup Diskselector
*/
EINA_DEPRECATED EAPI void elm_diskselector_item_tooltip_text_set(Elm_Object_Item *it, const char *text);
/**
* Set the content to be shown in the tooltip item.
*
* Setup the tooltip to item. The item can have only one tooltip,
* so any previous tooltip data is removed. @p func(with @p data) will
* be called every time that need show the tooltip and it should
* return a valid Evas_Object. This object is then managed fully by
* tooltip system and is deleted when the tooltip is gone.
*
* @param it the diskselector item being attached a tooltip.
* @param func the function used to create the tooltip contents.
* @param data what to provide to @a func as callback data/context.
* @param del_cb called when data is not needed anymore, either when
* another callback replaces @p func, the tooltip is unset with
* elm_diskselector_item_tooltip_unset() or the owner @a item
* dies. This callback receives as the first parameter the
* given @a data, and @c event_info is the item.
*
* @deprecated Use elm_object_item_tooltip_content_cb_set() instead
* @see elm_object_tooltip_content_cb_set() for more details.
*
* @ingroup Diskselector
*/
EINA_DEPRECATED EAPI void elm_diskselector_item_tooltip_content_cb_set(Elm_Object_Item *it, Elm_Tooltip_Item_Content_Cb func, const void *data, Evas_Smart_Cb del_cb);
/**
* Unset tooltip from item.
*
* @param it diskselector item to remove previously set tooltip.
*
* Remove tooltip from item. The callback provided as del_cb to
* elm_diskselector_item_tooltip_content_cb_set() will be called to notify
* it is not used anymore.
*
* @deprecated Use elm_object_item_tooltip_unset() instead
* @see elm_object_tooltip_unset() for more details.
* @see elm_diskselector_item_tooltip_content_cb_set()
*
* @ingroup Diskselector
*/
EINA_DEPRECATED EAPI void elm_diskselector_item_tooltip_unset(Elm_Object_Item *it);
/**
* Sets a different style for this item tooltip.
*
* @note before you set a style you should define a tooltip with
* elm_diskselector_item_tooltip_content_cb_set() or
* elm_diskselector_item_tooltip_text_set()
*
* @param it diskselector item with tooltip already set.
* @param style the theme style to use (default, transparent, ...)
*
* @deprecated Use elm_object_item_tooltip_style_set() instead
* @see elm_object_tooltip_style_set() for more details.
*
* @ingroup Diskselector
*/
EINA_DEPRECATED EAPI void elm_diskselector_item_tooltip_style_set(Elm_Object_Item *it, const char *style);
/**
* Get the style for this item tooltip.
*
* @param it diskselector item with tooltip already set.
* @return style the theme style in use, defaults to "default". If the
* object does not have a tooltip set, then NULL is returned.
*
* @deprecated Use elm_object_item_tooltip_style_get() instead
* @see elm_object_tooltip_style_get() for more details.
* @see elm_diskselector_item_tooltip_style_set()
*
* @ingroup Diskselector
*/
EINA_DEPRECATED EAPI const char *elm_diskselector_item_tooltip_style_get(const Elm_Object_Item *it);
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);
@ -2785,6 +2875,97 @@ EINA_DEPRECATED EAPI void elm_toolbar_item_del_cb_set(El
*/
EINA_DEPRECATED EAPI void elm_toolbar_item_del(Elm_Object_Item *it);
/**
* Set the text to be shown in a given toolbar item's tooltips.
*
* @param it toolbar item.
* @param text The text to set in the content.
*
* Setup the text as tooltip to object. The item can have only one tooltip,
* so any previous tooltip data - set with this function or
* elm_toolbar_item_tooltip_content_cb_set() - is removed.
*
* @deprecated Use elm_object_item_tooltip_text_set() instead
* @see elm_object_tooltip_text_set() for more details.
*
* @ingroup Toolbar
*/
EINA_DEPRECATED EAPI void elm_toolbar_item_tooltip_text_set(Elm_Object_Item *it, const char *text);
/**
* Set the content to be shown in the tooltip item.
*
* Setup the tooltip to item. The item can have only one tooltip,
* so any previous tooltip data is removed. @p func(with @p data) will
* be called every time that need show the tooltip and it should
* return a valid Evas_Object. This object is then managed fully by
* tooltip system and is deleted when the tooltip is gone.
*
* @param it the toolbar item being attached a tooltip.
* @param func the function used to create the tooltip contents.
* @param data what to provide to @a func as callback data/context.
* @param del_cb called when data is not needed anymore, either when
* another callback replaces @a func, the tooltip is unset with
* elm_toolbar_item_tooltip_unset() or the owner @a item
* dies. This callback receives as the first parameter the
* given @a data, and @c event_info is the item.
*
* @deprecated Use elm_object_item_tooltip_content_cb_set() instead
* @see elm_object_tooltip_content_cb_set() for more details.
*
* @ingroup Toolbar
*/
EINA_DEPRECATED EAPI void elm_toolbar_item_tooltip_content_cb_set(Elm_Object_Item *it, Elm_Tooltip_Item_Content_Cb func, const void *data, Evas_Smart_Cb del_cb);
/**
* Unset tooltip from item.
*
* @param it toolbar item to remove previously set tooltip.
*
* Remove tooltip from item. The callback provided as del_cb to
* elm_toolbar_item_tooltip_content_cb_set() will be called to notify
* it is not used anymore.
*
* @deprecated Use elm_object_item_tooltip_unset() instead
* @see elm_object_tooltip_unset() for more details.
* @see elm_toolbar_item_tooltip_content_cb_set()
*
* @ingroup Toolbar
*/
EINA_DEPRECATED EAPI void elm_toolbar_item_tooltip_unset(Elm_Object_Item *it);
/**
* Sets a different style for this item tooltip.
*
* @note before you set a style you should define a tooltip with
* elm_toolbar_item_tooltip_content_cb_set() or
* elm_toolbar_item_tooltip_text_set()
*
* @param it toolbar item with tooltip already set.
* @param style the theme style to use (default, transparent, ...)
*
* @deprecated Use elm_object_item_tooltip_style_set() instead
* @see elm_object_tooltip_style_set() for more details.
*
* @ingroup Toolbar
*/
EINA_DEPRECATED EAPI void elm_toolbar_item_tooltip_style_set(Elm_Object_Item *it, const char *style);
/**
* Get the style for this item tooltip.
*
* @param it toolbar item with tooltip already set.
* @return style the theme style in use, defaults to "default". If the
* object does not have a tooltip set, then NULL is returned.
*
* @deprecated Use elm_object_item_style_get() instead
* @see elm_object_tooltip_style_get() for more details.
* @see elm_toolbar_item_tooltip_style_set()
*
* @ingroup Toolbar
*/
EINA_DEPRECATED EAPI const char *elm_toolbar_item_tooltip_style_get(const Elm_Object_Item *it);
/**
* @brief Link a Elm_Payer with an Elm_Video object.
*

View File

@ -429,90 +429,6 @@ EAPI Elm_Object_Item *elm_diskselector_item_prev_get(const Elm_Object_Item *it);
*/
EAPI Elm_Object_Item *elm_diskselector_item_next_get(const Elm_Object_Item *it);
/**
* Set the text to be shown in the diskselector item.
*
* @param it Target item
* @param text The text to set in the content
*
* Setup the text as tooltip to object. The item can have only one tooltip,
* so any previous tooltip data is removed.
*
* @see elm_object_tooltip_text_set() for more details.
*
* @ingroup Diskselector
*/
EAPI void elm_diskselector_item_tooltip_text_set(Elm_Object_Item *it, const char *text);
/**
* Set the content to be shown in the tooltip item.
*
* Setup the tooltip to item. The item can have only one tooltip,
* so any previous tooltip data is removed. @p func(with @p data) will
* be called every time that need show the tooltip and it should
* return a valid Evas_Object. This object is then managed fully by
* tooltip system and is deleted when the tooltip is gone.
*
* @param it the diskselector item being attached a tooltip.
* @param func the function used to create the tooltip contents.
* @param data what to provide to @a func as callback data/context.
* @param del_cb called when data is not needed anymore, either when
* another callback replaces @p func, the tooltip is unset with
* elm_diskselector_item_tooltip_unset() or the owner @a item
* dies. This callback receives as the first parameter the
* given @a data, and @c event_info is the item.
*
* @see elm_object_tooltip_content_cb_set() for more details.
*
* @ingroup Diskselector
*/
EAPI void elm_diskselector_item_tooltip_content_cb_set(Elm_Object_Item *it, Elm_Tooltip_Item_Content_Cb func, const void *data, Evas_Smart_Cb del_cb);
/**
* Unset tooltip from item.
*
* @param it diskselector item to remove previously set tooltip.
*
* Remove tooltip from item. The callback provided as del_cb to
* elm_diskselector_item_tooltip_content_cb_set() will be called to notify
* it is not used anymore.
*
* @see elm_object_tooltip_unset() for more details.
* @see elm_diskselector_item_tooltip_content_cb_set()
*
* @ingroup Diskselector
*/
EAPI void elm_diskselector_item_tooltip_unset(Elm_Object_Item *it);
/**
* Sets a different style for this item tooltip.
*
* @note before you set a style you should define a tooltip with
* elm_diskselector_item_tooltip_content_cb_set() or
* elm_diskselector_item_tooltip_text_set()
*
* @param it diskselector item with tooltip already set.
* @param style the theme style to use (default, transparent, ...)
*
* @see elm_object_tooltip_style_set() for more details.
*
* @ingroup Diskselector
*/
EAPI void elm_diskselector_item_tooltip_style_set(Elm_Object_Item *it, const char *style);
/**
* Get the style for this item tooltip.
*
* @param it diskselector item with tooltip already set.
* @return style the theme style in use, defaults to "default". If the
* object does not have a tooltip set, then NULL is returned.
*
* @see elm_object_tooltip_style_get() for more details.
* @see elm_diskselector_item_tooltip_style_set()
*
* @ingroup Diskselector
*/
EAPI const char *elm_diskselector_item_tooltip_style_get(const Elm_Object_Item *it);
/**
* Set the cursor to be shown when mouse is over the diskselector item

View File

@ -1020,13 +1020,13 @@ _mouse_up(void *data, Evas *evas __UNUSED__, Evas_Object *obj __UNUSED__, void *
}
static void
_item_disable(void *data)
_item_disable(Elm_Object_Item *it)
{
Elm_List_Item *it = data;
if (it->base.disabled)
edje_object_signal_emit(VIEW(it), "elm,state,disabled", "elm");
Elm_List_Item *item = (Elm_List_Item *) it;
if (item->base.disabled)
edje_object_signal_emit(VIEW(item), "elm,state,disabled", "elm");
else
edje_object_signal_emit(VIEW(it), "elm,state,enabled", "elm");
edje_object_signal_emit(VIEW(item), "elm,state,enabled", "elm");
}
static void
@ -1075,7 +1075,7 @@ _item_content_set(Elm_Object_Item *it, const char *part, Evas_Object *content)
static Evas_Object *
_item_content_get(const Elm_Object_Item *it, const char *part)
{
ELM_OBJ_ITEM_CHECK_OR_RETURN(it);
ELM_OBJ_ITEM_CHECK_OR_RETURN(it, NULL);
Elm_List_Item *item = (Elm_List_Item *) it;
if ((!part) || (!strcmp(part, "start")))
@ -1092,20 +1092,20 @@ _item_content_get(const Elm_Object_Item *it, const char *part)
}
static Evas_Object *
_item_content_unset(const void *data, const char *part)
_item_content_unset(const Elm_Object_Item *it, const char *part)
{
Elm_List_Item *it = (Elm_List_Item *)data;
Elm_List_Item *item = (Elm_List_Item *) it;
if ((!part) || (!strcmp(part, "start")))
{
Evas_Object *obj = it->icon;
_item_content_set((void *)data, part, NULL);
Evas_Object *obj = item->icon;
_item_content_set((Elm_Object_Item *) it, part, NULL);
return obj;
}
else if (!strcmp(part, "end"))
{
Evas_Object *obj = it->end;
_item_content_set((void *)data, part, NULL);
Evas_Object *obj = item->end;
_item_content_set((Elm_Object_Item *) it, part, NULL);
return obj;
}
return NULL;
@ -1116,7 +1116,7 @@ _item_text_set(Elm_Object_Item *it, const char *part, const char *text)
{
ELM_OBJ_ITEM_CHECK_OR_RETURN(it);
Elm_List_Item *list_it = (Elm_List_Item *) it;
if (part && strcmp(part, "default")) return NULL;
if (part && strcmp(part, "default")) return;
if (!eina_stringshare_replace(&list_it->label, text)) return;
if (VIEW(list_it))
edje_object_part_text_set(VIEW(list_it), "elm.text", text);
@ -1126,6 +1126,7 @@ static const char *
_item_text_get(const Elm_Object_Item *it, const char *part)
{
ELM_OBJ_ITEM_CHECK_OR_RETURN(it, NULL);
if (part && strcmp(part, "default")) return NULL;
return ((Elm_List_Item *) it)->label;
}
@ -1165,12 +1166,12 @@ _item_new(Evas_Object *obj, const char *label, Evas_Object *icon, Evas_Object *e
evas_object_event_callback_add(it->end, EVAS_CALLBACK_CHANGED_SIZE_HINTS,
_changed_size_hints, obj);
}
_elm_widget_item_disable_hook_set((Elm_Widget_Item *)it, _item_disable);
_elm_widget_item_content_set_hook_set((Elm_Widget_Item *)it, _item_content_set);
_elm_widget_item_content_get_hook_set((Elm_Widget_Item *)it, _item_content_get);
_elm_widget_item_content_unset_hook_set((Elm_Widget_Item *)it, _item_content_unset);
_elm_widget_item_text_set_hook_set((Elm_Widget_Item *)it, _item_text_set);
_elm_widget_item_text_get_hook_set((Elm_Widget_Item *)it, _item_text_get);
elm_widget_item_disable_hook_set(it, _item_disable);
elm_widget_item_content_set_hook_set(it, _item_content_set);
elm_widget_item_content_get_hook_set(it, _item_content_get);
elm_widget_item_content_unset_hook_set(it, _item_content_unset);
elm_widget_item_text_set_hook_set(it, _item_text_set);
elm_widget_item_text_get_hook_set(it, _item_text_get);
return it;
}

View File

@ -894,92 +894,6 @@ EAPI Elm_Toolbar_Item_State *elm_toolbar_item_state_next(Elm_Object_Item *i
*/
EAPI Elm_Toolbar_Item_State *elm_toolbar_item_state_prev(Elm_Object_Item *it);
/**
* Set the text to be shown in a given toolbar item's tooltips.
*
* @param it toolbar item.
* @param text The text to set in the content.
*
* Setup the text as tooltip to object. The item can have only one tooltip,
* so any previous tooltip data - set with this function or
* elm_toolbar_item_tooltip_content_cb_set() - is removed.
*
* @see elm_object_tooltip_text_set() for more details.
*
* @ingroup Toolbar
*/
EAPI void elm_toolbar_item_tooltip_text_set(Elm_Object_Item *it, const char *text);
/**
* Set the content to be shown in the tooltip item.
*
* Setup the tooltip to item. The item can have only one tooltip,
* so any previous tooltip data is removed. @p func(with @p data) will
* be called every time that need show the tooltip and it should
* return a valid Evas_Object. This object is then managed fully by
* tooltip system and is deleted when the tooltip is gone.
*
* @param it the toolbar item being attached a tooltip.
* @param func the function used to create the tooltip contents.
* @param data what to provide to @a func as callback data/context.
* @param del_cb called when data is not needed anymore, either when
* another callback replaces @a func, the tooltip is unset with
* elm_toolbar_item_tooltip_unset() or the owner @a item
* dies. This callback receives as the first parameter the
* given @a data, and @c event_info is the item.
*
* @see elm_object_tooltip_content_cb_set() for more details.
*
* @ingroup Toolbar
*/
EAPI void elm_toolbar_item_tooltip_content_cb_set(Elm_Object_Item *it, Elm_Tooltip_Item_Content_Cb func, const void *data, Evas_Smart_Cb del_cb);
/**
* Unset tooltip from item.
*
* @param it toolbar item to remove previously set tooltip.
*
* Remove tooltip from item. The callback provided as del_cb to
* elm_toolbar_item_tooltip_content_cb_set() will be called to notify
* it is not used anymore.
*
* @see elm_object_tooltip_unset() for more details.
* @see elm_toolbar_item_tooltip_content_cb_set()
*
* @ingroup Toolbar
*/
EAPI void elm_toolbar_item_tooltip_unset(Elm_Object_Item *it);
/**
* Sets a different style for this item tooltip.
*
* @note before you set a style you should define a tooltip with
* elm_toolbar_item_tooltip_content_cb_set() or
* elm_toolbar_item_tooltip_text_set()
*
* @param it toolbar item with tooltip already set.
* @param style the theme style to use (default, transparent, ...)
*
* @see elm_object_tooltip_style_set() for more details.
*
* @ingroup Toolbar
*/
EAPI void elm_toolbar_item_tooltip_style_set(Elm_Object_Item *it, const char *style);
/**
* Get the style for this item tooltip.
*
* @param it toolbar item with tooltip already set.
* @return style the theme style in use, defaults to "default". If the
* object does not have a tooltip set, then NULL is returned.
*
* @see elm_object_tooltip_style_get() for more details.
* @see elm_toolbar_item_tooltip_style_set()
*
* @ingroup Toolbar
*/
EAPI const char *elm_toolbar_item_tooltip_style_get(const Elm_Object_Item *it);
/**
* Set the type of mouse pointer/cursor decoration to be shown,
* when the mouse pointer is over the given toolbar widget item