summaryrefslogtreecommitdiff
path: root/navit/event.h
diff options
context:
space:
mode:
authormartin-s <martin-s@ffa7fe5e-494d-0410-b361-a75ebd5db220>2008-10-24 20:51:37 +0000
committermartin-s <martin-s@ffa7fe5e-494d-0410-b361-a75ebd5db220>2008-10-24 20:51:37 +0000
commit505963f797632a603cd50f613533414ad9e64fde (patch)
treec7a126b20a4e80e140c539e3e666445eb7c16870 /navit/event.h
parent2d067427d993514f647737dc65fafaa88035a218 (diff)
downloadnavit-svn-505963f797632a603cd50f613533414ad9e64fde.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.h12
1 files changed, 10 insertions, 2 deletions
diff --git a/navit/event.h b/navit/event.h
index df0647d1..0f02278f 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);