add E_LIST_HANDLERS_APPEND for simplifying adding event handlers to a list
SVN revision: 76375
This commit is contained in:
parent
118f61ab58
commit
60e1c09cc4
12
src/bin/e.h
12
src/bin/e.h
|
@ -184,6 +184,18 @@ typedef struct _E_Rect E_Rect;
|
||||||
} \
|
} \
|
||||||
while (0)
|
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_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) \
|
# define E_RECTS_CLIP_TO_RECT(_x, _y, _w, _h, _cx, _cy, _cw, _ch) \
|
||||||
{ \
|
{ \
|
||||||
|
|
Loading…
Reference in New Issue