discomfitor pushed a commit to branch master.

http://git.enlightenment.org/core/enlightenment.git/commit/?id=ec8b606614faf05b419226e816e96a4037a9e05c

commit ec8b606614faf05b419226e816e96a4037a9e05c
Author: Mike Blumenkrantz <[email protected]>
Date:   Tue Jan 30 13:12:32 2018 -0500

    add macro for adding a prepended event handler to a list
---
 src/bin/e_macros.h | 9 +++++++++
 1 file changed, 9 insertions(+)

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) \

-- 


Reply via email to