add macro for adding a prepended event handler to a list

This commit is contained in:
Mike Blumenkrantz 2018-01-30 13:12:32 -05:00
parent 727b1cd902
commit ec8b606614
1 changed files with 9 additions and 0 deletions

View File

@ -100,6 +100,15 @@
list = eina_list_append(list, _eh); \
} \
while (0)
# define E_LIST_HANDLER_APPEND_PRE(list, type, callback, data) \
do \
{ \
Ecore_Event_Handler *_eh; \
_eh = ecore_event_handler_prepend(type, (Ecore_Event_Handler_Cb)callback, data); \
assert(_eh); \
list = eina_list_append(list, _eh); \
} \
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) \