forked from enlightenment/efl
elementary/elm_widget_item - wrapped the elm_widget_item with elm_object_item
But wonder, is it really needed the auto casting macros? Why user not just use the elm_widget_item directly and make their item data structures dangled to elm_widget_item just like smart object? SVN revision: 62079
This commit is contained in:
parent
5c1acf6c0e
commit
4f559a7cdb
|
@ -346,7 +346,7 @@ extern "C" {
|
||||||
* An Elementary Object item handle.
|
* An Elementary Object item handle.
|
||||||
* @ingroup General
|
* @ingroup General
|
||||||
*/
|
*/
|
||||||
typedef struct _Elm_Widget_Item Elm_Object_Item;
|
typedef struct _Elm_Object_Item Elm_Object_Item;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Called back when a widget's tooltip is activated and needs content.
|
* Called back when a widget's tooltip is activated and needs content.
|
||||||
|
|
|
@ -2933,7 +2933,7 @@ _elm_widget_item_content_part_set(Elm_Widget_Item *item,
|
||||||
|
|
||||||
EAPI Evas_Object *
|
EAPI Evas_Object *
|
||||||
_elm_widget_item_content_part_get(const Elm_Widget_Item *item,
|
_elm_widget_item_content_part_get(const Elm_Widget_Item *item,
|
||||||
const char *part)
|
const char *part)
|
||||||
{
|
{
|
||||||
ELM_WIDGET_ITEM_CHECK_OR_RETURN(item, NULL);
|
ELM_WIDGET_ITEM_CHECK_OR_RETURN(item, NULL);
|
||||||
if (!item->on_content_get_func) return NULL;
|
if (!item->on_content_get_func) return NULL;
|
||||||
|
@ -2942,7 +2942,7 @@ _elm_widget_item_content_part_get(const Elm_Widget_Item *item,
|
||||||
|
|
||||||
EAPI Evas_Object *
|
EAPI Evas_Object *
|
||||||
_elm_widget_item_content_part_unset(Elm_Widget_Item *item,
|
_elm_widget_item_content_part_unset(Elm_Widget_Item *item,
|
||||||
const char *part)
|
const char *part)
|
||||||
{
|
{
|
||||||
ELM_WIDGET_ITEM_CHECK_OR_RETURN(item, NULL);
|
ELM_WIDGET_ITEM_CHECK_OR_RETURN(item, NULL);
|
||||||
if (!item->on_content_unset_func) return NULL;
|
if (!item->on_content_unset_func) return NULL;
|
||||||
|
@ -2961,7 +2961,7 @@ _elm_widget_item_text_part_set(Elm_Widget_Item *item,
|
||||||
|
|
||||||
EAPI const char *
|
EAPI const char *
|
||||||
_elm_widget_item_text_part_get(const Elm_Widget_Item *item,
|
_elm_widget_item_text_part_get(const Elm_Widget_Item *item,
|
||||||
const char *part)
|
const char *part)
|
||||||
{
|
{
|
||||||
ELM_WIDGET_ITEM_CHECK_OR_RETURN(item, NULL);
|
ELM_WIDGET_ITEM_CHECK_OR_RETURN(item, NULL);
|
||||||
if (!item->on_text_get_func) return NULL;
|
if (!item->on_text_get_func) return NULL;
|
||||||
|
|
|
@ -218,6 +218,11 @@ struct _Elm_Widget_Item
|
||||||
/* @todo: TODO check if this is enough for 1.0 release, maybe add padding! */
|
/* @todo: TODO check if this is enough for 1.0 release, maybe add padding! */
|
||||||
};
|
};
|
||||||
|
|
||||||
|
struct _Elm_Object_Item
|
||||||
|
{
|
||||||
|
Elm_Widget_Item it;
|
||||||
|
};
|
||||||
|
|
||||||
#define ELM_NEW(t) calloc(1, sizeof(t))
|
#define ELM_NEW(t) calloc(1, sizeof(t))
|
||||||
|
|
||||||
EAPI Eina_Bool elm_widget_api_check(int ver);
|
EAPI Eina_Bool elm_widget_api_check(int ver);
|
||||||
|
@ -356,11 +361,11 @@ EAPI void _elm_widget_item_cursor_style_set(Elm_Widget_Item *item, c
|
||||||
EAPI const char *_elm_widget_item_cursor_style_get(const Elm_Widget_Item *item);
|
EAPI const char *_elm_widget_item_cursor_style_get(const Elm_Widget_Item *item);
|
||||||
EAPI void _elm_widget_item_cursor_engine_only_set(Elm_Widget_Item *item, Eina_Bool engine_only);
|
EAPI void _elm_widget_item_cursor_engine_only_set(Elm_Widget_Item *item, Eina_Bool engine_only);
|
||||||
EAPI Eina_Bool _elm_widget_item_cursor_engine_only_get(const Elm_Widget_Item *item);
|
EAPI Eina_Bool _elm_widget_item_cursor_engine_only_get(const Elm_Widget_Item *item);
|
||||||
EAPI void _elm_widget_item_content_part_set(Elm_Object_Item *item, const char *part, Evas_Object *content);
|
EAPI void _elm_widget_item_content_part_set(Elm_Widget_Item *item, const char *part, Evas_Object *content);
|
||||||
EAPI Evas_Object *_elm_widget_item_content_part_get(const Elm_Object_Item *item, const char *part);
|
EAPI Evas_Object *_elm_widget_item_content_part_get(const Elm_Widget_Item *item, const char *part);
|
||||||
EAPI Evas_Object *_elm_widget_item_content_part_unset(Elm_Object_Item *item, const char *part);
|
EAPI Evas_Object *_elm_widget_item_content_part_unset(Elm_Widget_Item *item, const char *part);
|
||||||
EAPI void _elm_widget_item_text_part_set(Elm_Object_Item *item, const char *part, const char *label);
|
EAPI void _elm_widget_item_text_part_set(Elm_Widget_Item *item, const char *part, const char *label);
|
||||||
EAPI const char *_elm_widget_item_text_part_get(const Elm_Object_Item *item, const char *part);
|
EAPI const char *_elm_widget_item_text_part_get(const Elm_Widget_Item *item, const char *part);
|
||||||
|
|
||||||
|
|
||||||
/* debug function. don't use it unless you are tracking parenting issues */
|
/* debug function. don't use it unless you are tracking parenting issues */
|
||||||
|
|
Loading…
Reference in New Issue