/[zanavi_public1]/navit/navit/event.h
ZANavi

Contents of /navit/navit/event.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2 - (show annotations) (download)
Fri Oct 28 21:19:04 2011 UTC (8 years, 9 months ago) by zoff99
File MIME type: text/plain
File size: 2404 byte(s)
import files
1 /**
2 * Navit, a modular navigation system.
3 * Copyright (C) 2005-2008 Navit Team
4 *
5 * This program is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Library General Public License
7 * version 2 as published by the Free Software Foundation.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU Library General Public License for more details.
13 *
14 * You should have received a copy of the GNU Library General Public
15 * License along with this program; if not, write to the
16 * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
17 * Boston, MA 02110-1301, USA.
18 */
19
20 #ifdef __cplusplus
21 extern "C" {
22 #endif
23
24 struct event_idle;
25 struct event_timeout;
26 struct event_watch;
27 struct callback;
28 struct callback_list;
29 struct file;
30
31 enum event_watch_cond {
32 event_watch_cond_read=1,
33 event_watch_cond_write,
34 event_watch_cond_except,
35 };
36
37 struct event_methods {
38 void (*main_loop_run)(void);
39 void (*main_loop_quit)(void);
40 struct event_watch *(*add_watch)(void *fd, enum event_watch_cond cond, struct callback *cb);
41 void (*remove_watch)(struct event_watch *ev);
42 struct event_timeout *(*add_timeout)(int timeout, int multi, struct callback *cb);
43 void (*remove_timeout)(struct event_timeout *ev);
44 struct event_idle *(*add_idle)(int priority, struct callback *cb);
45 void (*remove_idle)(struct event_idle *ev);
46 void (*call_callback)(struct callback_list *cb);
47 };
48
49
50 /* prototypes */
51 enum event_watch_cond;
52 struct callback;
53 struct callback_list;
54 struct event_idle;
55 struct event_timeout;
56 struct event_watch;
57 void event_main_loop_run(void);
58 void event_main_loop_quit(void);
59 int event_main_loop_has_quit(void);
60 struct event_watch *event_add_watch(void *fd, enum event_watch_cond cond, struct callback *cb);
61 void event_remove_watch(struct event_watch *ev);
62 struct event_timeout *event_add_timeout(int timeout, int multi, struct callback *cb);
63 void event_remove_timeout(struct event_timeout *ev);
64 struct event_idle *event_add_idle(int priority, struct callback *cb);
65 void event_remove_idle(struct event_idle *ev);
66 void event_call_callback(struct callback_list *cb);
67 char const *event_system(void);
68 int event_request_system(const char *system, const char *requestor);
69 /* end of prototypes */
70 #ifdef __cplusplus
71 }
72 #endif

   
Visit the ZANavi Wiki