]> git.decadent.org.uk Git - ion3.git/blob - libmainloop/defer.h
ee7d400744af7b67b781e44a408ec1bb5e4f18bc
[ion3.git] / libmainloop / defer.h
1 /*
2  * ion/libmainloop/defer.c
3  *
4  * Copyright (c) Tuomo Valkonen 1999-2007. 
5  *
6  * Ion is free software; you can redistribute it and/or modify it under
7  * the terms of the GNU Lesser General Public License as published by
8  * the Free Software Foundation; either version 2.1 of the License, or
9  * (at your option) any later version.
10  */
11
12 #ifndef ION_LIBMAINLOOP_DEFER_H
13 #define ION_LIBMAINLOOP_DEFER_H
14
15 #include <libtu/types.h>
16 #include <libtu/obj.h>
17 #include <libextl/extl.h>
18
19 INTRSTRUCT(WDeferred);
20
21 typedef void WDeferredAction(Obj*);
22
23 extern void mainloop_execute_deferred();
24 extern void mainloop_execute_deferred_on_list(WDeferred **list);
25
26 extern bool mainloop_defer_action(Obj *obj, WDeferredAction *action);
27 extern bool mainloop_defer_action_on_list(Obj *obj, WDeferredAction *action,
28                                           WDeferred **list);
29
30 extern bool mainloop_defer_destroy(Obj *obj);
31
32 extern bool mainloop_defer_extl(ExtlFn fn);
33 extern bool mainloop_defer_extl_on_list(ExtlFn fn, WDeferred **list);
34
35 #endif /* ION_LIBMAINLOOP_DEFER_H */