2 * ion/libmainloop/defer.c
4 * Copyright (c) Tuomo Valkonen 1999-2007.
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.
12 #ifndef ION_LIBMAINLOOP_DEFER_H
13 #define ION_LIBMAINLOOP_DEFER_H
15 #include <libtu/types.h>
16 #include <libtu/obj.h>
17 #include <libextl/extl.h>
19 INTRSTRUCT(WDeferred);
21 typedef void WDeferredAction(Obj*);
23 extern void mainloop_execute_deferred();
24 extern void mainloop_execute_deferred_on_list(WDeferred **list);
26 extern bool mainloop_defer_action(Obj *obj, WDeferredAction *action);
27 extern bool mainloop_defer_action_on_list(Obj *obj, WDeferredAction *action,
30 extern bool mainloop_defer_destroy(Obj *obj);
32 extern bool mainloop_defer_extl(ExtlFn fn);
33 extern bool mainloop_defer_extl_on_list(ExtlFn fn, WDeferred **list);
35 #endif /* ION_LIBMAINLOOP_DEFER_H */