summaryrefslogtreecommitdiff
path: root/ev.h
diff options
context:
space:
mode:
authorroot <root>2007-10-31 10:50:05 +0000
committerroot <root>2007-10-31 10:50:05 +0000
commit487c8aa2bb79f45c17a479dd48d8dc45948d2527 (patch)
treed8b88a71744977869fa55954631e65783ddf83a0 /ev.h
parent04c8cb9913a370451296919b6dd2567793de9a75 (diff)
EV first rough cut
Diffstat (limited to 'ev.h')
-rw-r--r--ev.h17
1 files changed, 16 insertions, 1 deletions
diff --git a/ev.h b/ev.h
index 9d2b2e9..7236712 100644
--- a/ev.h
+++ b/ev.h
@@ -40,6 +40,21 @@ typedef double ev_tstamp;
EV_WATCHER (type); \
ev_tstamp at /* private */
+/* base class, nothing to see here unless you subclass */
+struct ev_watcher {
+ EV_WATCHER (ev_watcher);
+};
+
+/* base class, nothing to see here unless you subclass */
+struct ev_watcher_list {
+ EV_WATCHER_LIST (ev_watcher_list);
+};
+
+/* base class, nothing to see here unless you subclass */
+struct ev_watcher_time {
+ EV_WATCHER_TIME (ev_watcher_time);
+};
+
/* invoked after a specific time, repeatable (based on monotonic clock) */
struct ev_timer
{
@@ -102,7 +117,7 @@ ev_tstamp ev_time (void);
#define EVLOOP_NONBLOCK 1 /* do not block/wait */
#define EVLOOP_ONESHOT 2 /* block *once* only */
void ev_loop (int flags);
-extern int ev_loop_done; /* set to 1 to break out of event loop */
+extern int ev_loop_done; /* set to 1 to break out of event loop, set to 2 to break out of all event loops */
/* these may evaluate ev multiple times, and the other arguments at most once */
/* either use evw_init + evXXX_set, or the evXXX_init macro, below, to first initialise a watcher */