Search
lxdream.org :: lxdream/src/hook.h :: diff
lxdream 0.9.1
released Jun 29
Download Now
filename src/hook.h
changeset 1034:7044e01148f0
prev1021:848db285a184
author nkeynes
date Fri Sep 17 20:08:50 2010 +1000 (13 years ago)
permissions -rw-r--r--
last change Refactor shader management to support multiple programs, which are all
defined in the shaders.glsl, rather than split up into one file per
fragment.
file annotate diff log raw
1.1 --- a/src/hook.h Wed Jun 03 11:37:10 2009 +0000
1.2 +++ b/src/hook.h Fri Sep 17 20:08:50 2010 +1000
1.3 @@ -22,7 +22,7 @@
1.4 #include <assert.h>
1.5
1.6 /**
1.7 - * Hook functions are generally useful, so we'd let to limit the overhead (and
1.8 + * Hook functions are generally useful, so we'd like to limit the overhead (and
1.9 * opportunity for stupid bugs) by minimizing the amount of code involved. Glib
1.10 * has GHook (and of course signals), but they don't actually simplify anything
1.11 * at this level.
1.12 @@ -46,6 +46,7 @@
1.13
1.14 #define FOREACH_HOOK( h, name ) struct name##_hook_struct *h; for( h = name##_hook_list; h != NULL; h = h->next )
1.15
1.16 +#define CALL_HOOKS0( name ) FOREACH_HOOK(h,name) { h->fn(h->user_data); }
1.17 #define CALL_HOOKS( name, args... ) FOREACH_HOOK(h, name) { h->fn(args, h->user_data); }
1.18
1.19 #define DEFINE_HOOK( name, fn_type ) \
.