diff options
author | martin-s <martin-s@ffa7fe5e-494d-0410-b361-a75ebd5db220> | 2008-10-24 20:51:37 +0000 |
---|---|---|
committer | martin-s <martin-s@ffa7fe5e-494d-0410-b361-a75ebd5db220> | 2008-10-24 20:51:37 +0000 |
commit | 37fbca67790882c1f7377a0fcc71b588725e65fd (patch) | |
tree | c7a126b20a4e80e140c539e3e666445eb7c16870 /navit/event.h | |
parent | 13895dee0a96fae550019265136c1d67800c97fe (diff) | |
download | navit-37fbca67790882c1f7377a0fcc71b588725e65fd.tar.gz |
Fix:Core:Cleanup event watch api
git-svn-id: http://svn.code.sf.net/p/navit/code/trunk/navit@1558 ffa7fe5e-494d-0410-b361-a75ebd5db220
Diffstat (limited to 'navit/event.h')
-rw-r--r-- | navit/event.h | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/navit/event.h b/navit/event.h index df0647d10..0f02278fd 100644 --- a/navit/event.h +++ b/navit/event.h @@ -25,11 +25,18 @@ struct event_idle; struct event_timeout; struct event_watch; struct callback; +struct file; + +enum event_watch_cond { + event_watch_cond_read=1, + event_watch_cond_write, + event_watch_cond_except, +}; struct event_methods { void (*main_loop_run)(void); void (*main_loop_quit)(void); - struct event_watch *(*add_watch)(int fd, int w, struct callback *cb); + struct event_watch *(*add_watch)(struct file *file, enum event_watch_cond cond, struct callback *cb); void (*remove_watch)(struct event_watch *ev); struct event_timeout *(*add_timeout)(int timeout, int multi, struct callback *cb); void (*remove_timeout)(struct event_timeout *ev); @@ -37,10 +44,11 @@ struct event_methods { void (*remove_idle)(struct event_idle *ev); }; + /* prototypes */ void event_main_loop_run(void); void event_main_loop_quit(void); -struct event_watch *event_add_watch(int fd, int w, struct callback *cb); +struct event_watch *event_add_watch(struct file *file, enum event_watch_cond cond, struct callback *cb); void event_remove_watch(struct event_watch *ev); struct event_timeout *event_add_timeout(int timeout, int multi, struct callback *cb); void event_remove_timeout(struct event_timeout *ev); |