add E_LIST_HANDLERS_APPEND for simplifying adding event handlers to a list

SVN revision: 76375
This commit is contained in:
Mike Blumenkrantz 2012-09-10 08:18:12 +00:00
parent 118f61ab58
commit 60e1c09cc4
1 changed files with 12 additions and 0 deletions

View File

@ -184,6 +184,18 @@ typedef struct _E_Rect E_Rect;
} \
while (0)
# define E_LIST_HANDLERS_APPEND(list, type, callback, data) \
do \
{ \
Ecore_Event_Handler *_eh; \
_eh = ecore_event_handler_add(type, (Ecore_Event_Handler_Cb)callback, data); \
if (_eh) \
list = eina_list_append(list, _eh); \
else \
ERR("E_LIST_HANDLERS_APPEND"); \
} \
while (0)
# define E_CLAMP(x, min, max) (x < min ? min : (x > max ? max : x))
# define E_RECTS_CLIP_TO_RECT(_x, _y, _w, _h, _cx, _cy, _cw, _ch) \
{ \