forked from enlightenment/efl
elementary/elm_object_item - added signal emit func.
SVN revision: 63424
This commit is contained in:
parent
a2fcea3f01
commit
a1f1eb1689
|
@ -1122,6 +1122,20 @@ extern "C" {
|
|||
*/
|
||||
EAPI void elm_object_item_data_set(Elm_Object_Item *it, void *data);
|
||||
|
||||
/**
|
||||
* Send a signal to the edje object of the widget item.
|
||||
*
|
||||
* This function sends a signal to the edje object of the obj item. An
|
||||
* edje program can respond to a signal by specifying matching
|
||||
* 'signal' and 'source' fields.
|
||||
*
|
||||
* @param it The Elementary object item
|
||||
* @param emission The signal's name.
|
||||
* @param source The signal's source.
|
||||
* @ingroup General
|
||||
*/
|
||||
EAPI void elm_object_item_signal_emit(Elm_Object_Item *it, const char *emission, const char *source) EINA_ARG_NONNULL(1);
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
|
|
@ -2126,3 +2126,9 @@ elm_object_item_data_set(Elm_Object_Item *it, void *data)
|
|||
{
|
||||
elm_widget_item_data_set(it, data);
|
||||
}
|
||||
|
||||
EAPI void
|
||||
elm_object_item_signal_emit(Elm_Object_Item *it, const char *emission, const char *source)
|
||||
{
|
||||
elm_widget_item_signal_emit(it, emission, source);
|
||||
}
|
||||
|
|
|
@ -3100,6 +3100,16 @@ _elm_widget_item_text_part_set(Elm_Widget_Item *item,
|
|||
item->on_text_set_func((Elm_Object_Item *) item, part, label);
|
||||
}
|
||||
|
||||
EAPI void
|
||||
_elm_widget_item_signal_emit(Elm_Widget_Item *item,
|
||||
const char *emission,
|
||||
const char *source)
|
||||
{
|
||||
ELM_WIDGET_ITEM_CHECK_OR_RETURN(item);
|
||||
if (item->on_signal_emit_func)
|
||||
item->on_signal_emit_func((Elm_Object_Item *) item, emission, source);
|
||||
}
|
||||
|
||||
EAPI const char *
|
||||
_elm_widget_item_text_part_get(const Elm_Widget_Item *item,
|
||||
const char *part)
|
||||
|
@ -3149,6 +3159,14 @@ _elm_widget_item_text_get_hook_set(Elm_Widget_Item *item,
|
|||
item->on_text_get_func = func;
|
||||
}
|
||||
|
||||
EAPI void
|
||||
_elm_widget_item_signal_emit_hook_set(Elm_Widget_Item *item,
|
||||
Elm_Widget_On_Signal_Emit_Cb func)
|
||||
{
|
||||
ELM_WIDGET_ITEM_CHECK_OR_RETURN(item);
|
||||
item->on_signal_emit_func = func;
|
||||
}
|
||||
|
||||
EAPI void
|
||||
_elm_widget_item_access_info_set(Elm_Widget_Item *item, const char *txt)
|
||||
{
|
||||
|
|
|
@ -200,6 +200,7 @@ typedef void (*Elm_Widget_On_Content_Set_Cb)(void *data, const char *part, Evas_
|
|||
typedef const char *(*Elm_Widget_On_Text_Get_Cb)(const void *data, const char *part);
|
||||
typedef Evas_Object *(*Elm_Widget_On_Content_Get_Cb)(const void *data, const char *part);
|
||||
typedef Evas_Object *(*Elm_Widget_On_Content_Unset_Cb)(const void *data, const char *part);
|
||||
typedef void (*Elm_Widget_On_Signal_Emit_Cb)(void *data, const char *emission, const char *source);
|
||||
|
||||
#define ELM_ACCESS_TYPE 0 // when reading out widget or item this is read first
|
||||
#define ELM_ACCESS_INFO 1 // next read is info - this is normally label
|
||||
|
@ -254,6 +255,7 @@ struct _Elm_Widget_Item
|
|||
Elm_Widget_On_Content_Unset_Cb on_content_unset_func;
|
||||
Elm_Widget_On_Text_Set_Cb on_text_set_func;
|
||||
Elm_Widget_On_Text_Get_Cb on_text_get_func;
|
||||
Elm_Widget_On_Signal_Emit_Cb on_signal_emit_func;
|
||||
Elm_Access_Info *access;
|
||||
const char *access_info;
|
||||
/* widget variations should have data from here and on */
|
||||
|
@ -445,6 +447,7 @@ EAPI void _elm_widget_item_content_get_hook_set(Elm_Widget_Item *ite
|
|||
EAPI void _elm_widget_item_content_unset_hook_set(Elm_Widget_Item *item, Elm_Widget_On_Content_Unset_Cb func);
|
||||
EAPI void _elm_widget_item_text_set_hook_set(Elm_Widget_Item *item, Elm_Widget_On_Text_Set_Cb func);
|
||||
EAPI void _elm_widget_item_text_get_hook_set(Elm_Widget_Item *item, Elm_Widget_On_Text_Get_Cb func);
|
||||
EAPI void _elm_widget_item_signal_emit_hook_set(Elm_Widget_Item *it, Elm_Widget_On_Signal_Emit_Cb func);
|
||||
EAPI void _elm_widget_item_access_info_set(Elm_Widget_Item *item, const char *txt);
|
||||
|
||||
|
||||
|
@ -602,6 +605,18 @@ EAPI void elm_widget_tree_dot_dump(const Evas_Object *top, FILE *out
|
|||
*/
|
||||
#define elm_widget_item_text_part_get(item, part) \
|
||||
_elm_widget_item_text_part_get((const Elm_Widget_Item *)item, part)
|
||||
/**
|
||||
* Convenience function to query item's text part get.
|
||||
* @see _elm_widget_item_text_part_get()
|
||||
*/
|
||||
#define elm_widget_item_text_part_get(item, part) \
|
||||
_elm_widget_item_text_part_get((const Elm_Widget_Item *)item, part)
|
||||
/**
|
||||
* Convenience function to query item's signal emit.
|
||||
* @see _elm_widget_item_signal_emit()
|
||||
*/
|
||||
#define elm_widget_item_signal_emit(item, emission, source) \
|
||||
_elm_widget_item_signal_emit((Elm_Widget_Item *)item, emission, source)
|
||||
/**
|
||||
* Convenience function to query item's content set hook.
|
||||
* @see _elm_widget_item_content_set_hook_set()
|
||||
|
@ -632,6 +647,12 @@ EAPI void elm_widget_tree_dot_dump(const Evas_Object *top, FILE *out
|
|||
*/
|
||||
#define elm_widget_item_text_get_hook_set(item, func) \
|
||||
_elm_widget_item_text_get_hook_set((Elm_Widget_Item *)item, (Elm_Widget_On_Text_Get_Cb)func)
|
||||
/**
|
||||
* Convenience function to query item's signal emit hook.
|
||||
* @see _elm_widget_item_signal_emit_hook_set()
|
||||
*/
|
||||
#define elm_widget_item_signal_emit_hook_set(item, func) \
|
||||
_elm_widget_item_signal_emit_hook_set((Elm_Widget_Item *)item, (Elm_Widget_On_Signal_Emit_Cb)func)
|
||||
|
||||
/**
|
||||
* Cast and ensure the given pointer is an Elm_Widget_Item or return NULL.
|
||||
|
|
Loading…
Reference in New Issue