forked from enlightenment/efl
parent
da512dde9b
commit
8a66dd5b56
|
@ -361,6 +361,8 @@ extern "C" {
|
|||
EAPI void *ecore_event_handler_del(Ecore_Event_Handler *event_handler);
|
||||
EAPI Ecore_Event *ecore_event_add(int type, void *ev, Ecore_End_Cb func_free, void *data);
|
||||
EAPI void *ecore_event_del(Ecore_Event *event);
|
||||
EAPI void *ecore_event_handler_data_get(Ecore_Event_Handler *eh);
|
||||
EAPI void *ecore_event_handler_data_set(Ecore_Event_Handler *eh, void *data);
|
||||
EAPI int ecore_event_type_new(void);
|
||||
EAPI Ecore_Event_Filter *ecore_event_filter_add(Ecore_Data_Cb func_start, Ecore_Filter_Cb func_filter, Ecore_End_Cb func_end, const void *data);
|
||||
EAPI void *ecore_event_filter_del(Ecore_Event_Filter *ef);
|
||||
|
|
|
@ -170,6 +170,45 @@ ecore_event_handler_del(Ecore_Event_Handler *event_handler)
|
|||
return event_handler->data;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Get the data associated with an #Ecore_Event_Handler
|
||||
* @param eh The event handler
|
||||
* @return The data
|
||||
* This function returns the data previously associated with @p eh.
|
||||
*/
|
||||
EAPI void *
|
||||
ecore_event_handler_data_get(Ecore_Event_Handler *eh)
|
||||
{
|
||||
if (!ECORE_MAGIC_CHECK(eh, ECORE_MAGIC_EVENT_HANDLER))
|
||||
{
|
||||
ECORE_MAGIC_FAIL(eh, ECORE_MAGIC_EVENT_HANDLER, "ecore_event_handler_data_get");
|
||||
return NULL;
|
||||
}
|
||||
return eh->data;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Set the data associated with an #Ecore_Event_Handler
|
||||
* @param eh The event handler
|
||||
* @param data The data to associate
|
||||
* @return The previous data
|
||||
* This function sets @p data to @p eh and returns the old data pointer
|
||||
* which was previously associated with @p eh.
|
||||
*/
|
||||
EAPI void *
|
||||
ecore_event_handler_data_set(Ecore_Event_Handler *eh, void *data)
|
||||
{
|
||||
void *old;
|
||||
if (!ECORE_MAGIC_CHECK(eh, ECORE_MAGIC_EVENT_HANDLER))
|
||||
{
|
||||
ECORE_MAGIC_FAIL(eh, ECORE_MAGIC_EVENT_HANDLER, "ecore_event_handler_data_get");
|
||||
return NULL;
|
||||
}
|
||||
old = eh->data;
|
||||
eh->data = data;
|
||||
return old;
|
||||
}
|
||||
|
||||
static void
|
||||
_ecore_event_generic_free (void *data __UNUSED__, void *event)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue