projects
/
platform
/
upstream
/
enlightenment.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
118f61a
)
add E_LIST_HANDLERS_APPEND for simplifying adding event handlers to a list
author
Mike Blumenkrantz
<michael.blumenkrantz@gmail.com>
Mon, 10 Sep 2012 08:18:12 +0000
(08:18 +0000)
committer
Mike Blumenkrantz
<michael.blumenkrantz@gmail.com>
Mon, 10 Sep 2012 08:18:12 +0000
(08:18 +0000)
SVN revision: 76375
src/bin/e.h
patch
|
blob
|
history
diff --git
a/src/bin/e.h
b/src/bin/e.h
index
9d438e5
..
dc2cafe
100644
(file)
--- a/
src/bin/e.h
+++ b/
src/bin/e.h
@@
-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) \
{ \