aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMike Blumenkrantz <zmike@osg.samsung.com>2018-01-30 13:12:32 -0500
committerMike Blumenkrantz <zmike@osg.samsung.com>2018-02-06 11:17:14 -0500
commitec8b606614faf05b419226e816e96a4037a9e05c (patch)
tree8d5ac94a59edce57ebff62864346ae25dd0a95a4
parentbump efl version req (diff)
downloadenlightenment-ec8b606614faf05b419226e816e96a4037a9e05c.tar.gz
add macro for adding a prepended event handler to a list
-rw-r--r--src/bin/e_macros.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/bin/e_macros.h b/src/bin/e_macros.h
index 44f68b6cf..1e890432e 100644
--- a/src/bin/e_macros.h
+++ b/src/bin/e_macros.h
@@ -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) \