Mercurial > MadButterfly
annotate include/mb_backend.h @ 1019:1a3cc22ee1bd refine_backend_if
Fix testcase of animate.c for mb_timer_man_t
author | Thinker K.F. Li <thinker@codemud.net> |
---|---|
date | Mon, 22 Nov 2010 13:52:59 +0800 |
parents | 9b5d4839c5bb |
children | 84006acab6af |
rev | line source |
---|---|
984
3fe8054457a8
Change interface of mb_backend_t for more concise
Thinker K.F. Li <thinker@codemud.net>
parents:
diff
changeset
|
1 #ifndef __MB_BACKEND_H_ |
3fe8054457a8
Change interface of mb_backend_t for more concise
Thinker K.F. Li <thinker@codemud.net>
parents:
diff
changeset
|
2 #define __MB_BACKEND_H_ |
3fe8054457a8
Change interface of mb_backend_t for more concise
Thinker K.F. Li <thinker@codemud.net>
parents:
diff
changeset
|
3 |
991
1882700bb4b9
Adapt mb_tman_t to mb_timer_man_t
Thinker K.F. Li <thinker@codemud.net>
parents:
990
diff
changeset
|
4 #include "mb_redraw_man.h" |
1882700bb4b9
Adapt mb_tman_t to mb_timer_man_t
Thinker K.F. Li <thinker@codemud.net>
parents:
990
diff
changeset
|
5 #include "mb_timer.h" |
1882700bb4b9
Adapt mb_tman_t to mb_timer_man_t
Thinker K.F. Li <thinker@codemud.net>
parents:
990
diff
changeset
|
6 #include "mb_observer.h" |
1882700bb4b9
Adapt mb_tman_t to mb_timer_man_t
Thinker K.F. Li <thinker@codemud.net>
parents:
990
diff
changeset
|
7 #include "mb_img_ldr.h" |
1882700bb4b9
Adapt mb_tman_t to mb_timer_man_t
Thinker K.F. Li <thinker@codemud.net>
parents:
990
diff
changeset
|
8 |
985 | 9 #include "mb_config.h" |
10 | |
984
3fe8054457a8
Change interface of mb_backend_t for more concise
Thinker K.F. Li <thinker@codemud.net>
parents:
diff
changeset
|
11 #ifdef X_BACKEND |
3fe8054457a8
Change interface of mb_backend_t for more concise
Thinker K.F. Li <thinker@codemud.net>
parents:
diff
changeset
|
12 #include "mb_X_supp.h" |
3fe8054457a8
Change interface of mb_backend_t for more concise
Thinker K.F. Li <thinker@codemud.net>
parents:
diff
changeset
|
13 #endif |
3fe8054457a8
Change interface of mb_backend_t for more concise
Thinker K.F. Li <thinker@codemud.net>
parents:
diff
changeset
|
14 |
3fe8054457a8
Change interface of mb_backend_t for more concise
Thinker K.F. Li <thinker@codemud.net>
parents:
diff
changeset
|
15 #ifdef DFB_BACKEND |
3fe8054457a8
Change interface of mb_backend_t for more concise
Thinker K.F. Li <thinker@codemud.net>
parents:
diff
changeset
|
16 #inclde "mb_dfb_supp.h" |
3fe8054457a8
Change interface of mb_backend_t for more concise
Thinker K.F. Li <thinker@codemud.net>
parents:
diff
changeset
|
17 #endif |
3fe8054457a8
Change interface of mb_backend_t for more concise
Thinker K.F. Li <thinker@codemud.net>
parents:
diff
changeset
|
18 |
3fe8054457a8
Change interface of mb_backend_t for more concise
Thinker K.F. Li <thinker@codemud.net>
parents:
diff
changeset
|
19 typedef void mb_rt_t; |
3fe8054457a8
Change interface of mb_backend_t for more concise
Thinker K.F. Li <thinker@codemud.net>
parents:
diff
changeset
|
20 |
993
5b58e74988bc
Use mb_backend_t::new instead of mb_backend_t::init
Thinker K.F. Li <thinker@codemud.net>
parents:
991
diff
changeset
|
21 typedef struct _mb_timer_man mb_timer_man_t; |
5b58e74988bc
Use mb_backend_t::new instead of mb_backend_t::init
Thinker K.F. Li <thinker@codemud.net>
parents:
991
diff
changeset
|
22 typedef struct _mb_timer_factory mb_timer_factory_t; |
5b58e74988bc
Use mb_backend_t::new instead of mb_backend_t::init
Thinker K.F. Li <thinker@codemud.net>
parents:
991
diff
changeset
|
23 typedef struct _mb_IO_man mb_IO_man_t; |
5b58e74988bc
Use mb_backend_t::new instead of mb_backend_t::init
Thinker K.F. Li <thinker@codemud.net>
parents:
991
diff
changeset
|
24 typedef struct _mb_IO_factory mb_IO_factory_t; |
1009
595a06fc0157
Change X_MB_add/remove_event() to match new mb_backend_t
Thinker K.F. Li <thinker@codemud.net>
parents:
996
diff
changeset
|
25 typedef enum _MB_IO_TYPE MB_IO_TYPE; |
993
5b58e74988bc
Use mb_backend_t::new instead of mb_backend_t::init
Thinker K.F. Li <thinker@codemud.net>
parents:
991
diff
changeset
|
26 |
1011
02d52058d352
Make functions of X_supp.c static and fill fields of backend.
Thinker K.F. Li <thinker@codemud.net>
parents:
1009
diff
changeset
|
27 /*! \brief Function signature of callback functions for IO requests. |
02d52058d352
Make functions of X_supp.c static and fill fields of backend.
Thinker K.F. Li <thinker@codemud.net>
parents:
1009
diff
changeset
|
28 */ |
02d52058d352
Make functions of X_supp.c static and fill fields of backend.
Thinker K.F. Li <thinker@codemud.net>
parents:
1009
diff
changeset
|
29 typedef void (*mb_IO_cb_t)(int hdl, int fd, MB_IO_TYPE type, void *data); |
02d52058d352
Make functions of X_supp.c static and fill fields of backend.
Thinker K.F. Li <thinker@codemud.net>
parents:
1009
diff
changeset
|
30 |
984
3fe8054457a8
Change interface of mb_backend_t for more concise
Thinker K.F. Li <thinker@codemud.net>
parents:
diff
changeset
|
31 /*! \brief The backend engine mb_backend_t is used to define the |
3fe8054457a8
Change interface of mb_backend_t for more concise
Thinker K.F. Li <thinker@codemud.net>
parents:
diff
changeset
|
32 * interface to realize the MB. |
3fe8054457a8
Change interface of mb_backend_t for more concise
Thinker K.F. Li <thinker@codemud.net>
parents:
diff
changeset
|
33 * |
3fe8054457a8
Change interface of mb_backend_t for more concise
Thinker K.F. Li <thinker@codemud.net>
parents:
diff
changeset
|
34 * A backend is used to receive events from the system. The MB does |
3fe8054457a8
Change interface of mb_backend_t for more concise
Thinker K.F. Li <thinker@codemud.net>
parents:
diff
changeset
|
35 * not define the backend by itself. Instead, it define an interface |
3fe8054457a8
Change interface of mb_backend_t for more concise
Thinker K.F. Li <thinker@codemud.net>
parents:
diff
changeset
|
36 * which allow the lower layer to implement the event system. Each |
3fe8054457a8
Change interface of mb_backend_t for more concise
Thinker K.F. Li <thinker@codemud.net>
parents:
diff
changeset
|
37 * backend need to provides the following events. |
3fe8054457a8
Change interface of mb_backend_t for more concise
Thinker K.F. Li <thinker@codemud.net>
parents:
diff
changeset
|
38 * |
3fe8054457a8
Change interface of mb_backend_t for more concise
Thinker K.F. Li <thinker@codemud.net>
parents:
diff
changeset
|
39 * - keyboard event |
3fe8054457a8
Change interface of mb_backend_t for more concise
Thinker K.F. Li <thinker@codemud.net>
parents:
diff
changeset
|
40 * - timer event |
3fe8054457a8
Change interface of mb_backend_t for more concise
Thinker K.F. Li <thinker@codemud.net>
parents:
diff
changeset
|
41 * - image loader(?) |
3fe8054457a8
Change interface of mb_backend_t for more concise
Thinker K.F. Li <thinker@codemud.net>
parents:
diff
changeset
|
42 * - render manager(?) |
3fe8054457a8
Change interface of mb_backend_t for more concise
Thinker K.F. Li <thinker@codemud.net>
parents:
diff
changeset
|
43 */ |
3fe8054457a8
Change interface of mb_backend_t for more concise
Thinker K.F. Li <thinker@codemud.net>
parents:
diff
changeset
|
44 typedef struct { |
3fe8054457a8
Change interface of mb_backend_t for more concise
Thinker K.F. Li <thinker@codemud.net>
parents:
diff
changeset
|
45 mb_rt_t *(*new)(const char *display, int w,int h); |
1011
02d52058d352
Make functions of X_supp.c static and fill fields of backend.
Thinker K.F. Li <thinker@codemud.net>
parents:
1009
diff
changeset
|
46 mb_rt_t *(*new_with_win)(MB_DISPLAY display, MB_WINDOW win); |
984
3fe8054457a8
Change interface of mb_backend_t for more concise
Thinker K.F. Li <thinker@codemud.net>
parents:
diff
changeset
|
47 |
3fe8054457a8
Change interface of mb_backend_t for more concise
Thinker K.F. Li <thinker@codemud.net>
parents:
diff
changeset
|
48 void (*free)(mb_rt_t *rt); |
1013
d5b8853767e7
Add flush function to mb_backend_t
Thinker K.F. Li <thinker@codemud.net>
parents:
1011
diff
changeset
|
49 void (*free_keep_win)(mb_rt_t *rt); |
985 | 50 /*! \brief Request the backend to start monitoring a file descriptor. |
51 * | |
52 * This is used only when the backend is responsible for event loop. | |
53 */ | |
1009
595a06fc0157
Change X_MB_add/remove_event() to match new mb_backend_t
Thinker K.F. Li <thinker@codemud.net>
parents:
996
diff
changeset
|
54 int (*add_event)(mb_rt_t *rt, int fd, MB_IO_TYPE type, |
1011
02d52058d352
Make functions of X_supp.c static and fill fields of backend.
Thinker K.F. Li <thinker@codemud.net>
parents:
1009
diff
changeset
|
55 mb_IO_cb_t f,void *arg); |
985 | 56 /*! \brief Request the backend to stop monitoring a file descriptor. |
57 * | |
58 * This is used only when the backend is responsible for event loop. | |
59 */ | |
1009
595a06fc0157
Change X_MB_add/remove_event() to match new mb_backend_t
Thinker K.F. Li <thinker@codemud.net>
parents:
996
diff
changeset
|
60 void (*remove_event)(mb_rt_t *rt, int hdl); |
985 | 61 /*! \brief Event Loop |
62 * | |
63 * This is called when main application does not handle event | |
64 * loop. Or, it should register an IO factory (i.e \ref | |
65 * mb_IO_factory_t) with the backend. | |
66 */ | |
67 void (*event_loop)(mb_rt_t *rt); | |
1013
d5b8853767e7
Add flush function to mb_backend_t
Thinker K.F. Li <thinker@codemud.net>
parents:
1011
diff
changeset
|
68 |
d5b8853767e7
Add flush function to mb_backend_t
Thinker K.F. Li <thinker@codemud.net>
parents:
1011
diff
changeset
|
69 /*! \brief Flush requests to screen server if existed */ |
d5b8853767e7
Add flush function to mb_backend_t
Thinker K.F. Li <thinker@codemud.net>
parents:
1011
diff
changeset
|
70 int (*flush)(mb_rt_t *rt); |
984
3fe8054457a8
Change interface of mb_backend_t for more concise
Thinker K.F. Li <thinker@codemud.net>
parents:
diff
changeset
|
71 |
3fe8054457a8
Change interface of mb_backend_t for more concise
Thinker K.F. Li <thinker@codemud.net>
parents:
diff
changeset
|
72 subject_t *(*kbevents)(mb_rt_t *rt); |
3fe8054457a8
Change interface of mb_backend_t for more concise
Thinker K.F. Li <thinker@codemud.net>
parents:
diff
changeset
|
73 redraw_man_t *(*rdman)(mb_rt_t *rt); |
994
5d9def42df12
Rename mb_backend_t::tman() to mb_backend_t::timer_man()
Thinker K.F. Li <thinker@codemud.net>
parents:
993
diff
changeset
|
74 mb_timer_man_t *(*timer_man)(mb_rt_t *rt); |
984
3fe8054457a8
Change interface of mb_backend_t for more concise
Thinker K.F. Li <thinker@codemud.net>
parents:
diff
changeset
|
75 ob_factory_t *(*ob_factory)(mb_rt_t *rt); |
3fe8054457a8
Change interface of mb_backend_t for more concise
Thinker K.F. Li <thinker@codemud.net>
parents:
diff
changeset
|
76 mb_img_ldr_t *(*loader)(mb_rt_t *rt); |
3fe8054457a8
Change interface of mb_backend_t for more concise
Thinker K.F. Li <thinker@codemud.net>
parents:
diff
changeset
|
77 |
3fe8054457a8
Change interface of mb_backend_t for more concise
Thinker K.F. Li <thinker@codemud.net>
parents:
diff
changeset
|
78 /* |
3fe8054457a8
Change interface of mb_backend_t for more concise
Thinker K.F. Li <thinker@codemud.net>
parents:
diff
changeset
|
79 * Following two methods are used to integrate a backend to |
3fe8054457a8
Change interface of mb_backend_t for more concise
Thinker K.F. Li <thinker@codemud.net>
parents:
diff
changeset
|
80 * event loop of main application. |
3fe8054457a8
Change interface of mb_backend_t for more concise
Thinker K.F. Li <thinker@codemud.net>
parents:
diff
changeset
|
81 */ |
3fe8054457a8
Change interface of mb_backend_t for more concise
Thinker K.F. Li <thinker@codemud.net>
parents:
diff
changeset
|
82 void (*reg_IO_factory)(mb_IO_factory_t *evman); |
3fe8054457a8
Change interface of mb_backend_t for more concise
Thinker K.F. Li <thinker@codemud.net>
parents:
diff
changeset
|
83 void (*reg_timer_factory)(mb_timer_factory_t *evman); |
3fe8054457a8
Change interface of mb_backend_t for more concise
Thinker K.F. Li <thinker@codemud.net>
parents:
diff
changeset
|
84 } mb_backend_t; |
3fe8054457a8
Change interface of mb_backend_t for more concise
Thinker K.F. Li <thinker@codemud.net>
parents:
diff
changeset
|
85 |
3fe8054457a8
Change interface of mb_backend_t for more concise
Thinker K.F. Li <thinker@codemud.net>
parents:
diff
changeset
|
86 extern mb_backend_t backend; |
3fe8054457a8
Change interface of mb_backend_t for more concise
Thinker K.F. Li <thinker@codemud.net>
parents:
diff
changeset
|
87 |
3fe8054457a8
Change interface of mb_backend_t for more concise
Thinker K.F. Li <thinker@codemud.net>
parents:
diff
changeset
|
88 /*! \brief Type of IO that registered with an IO manager. |
3fe8054457a8
Change interface of mb_backend_t for more concise
Thinker K.F. Li <thinker@codemud.net>
parents:
diff
changeset
|
89 */ |
993
5b58e74988bc
Use mb_backend_t::new instead of mb_backend_t::init
Thinker K.F. Li <thinker@codemud.net>
parents:
991
diff
changeset
|
90 enum _MB_IO_TYPE {MB_IO_DUMMY, MB_IO_R, MB_IO_W, MB_IO_RW}; |
984
3fe8054457a8
Change interface of mb_backend_t for more concise
Thinker K.F. Li <thinker@codemud.net>
parents:
diff
changeset
|
91 |
3fe8054457a8
Change interface of mb_backend_t for more concise
Thinker K.F. Li <thinker@codemud.net>
parents:
diff
changeset
|
92 /*! \brief IO Manager |
3fe8054457a8
Change interface of mb_backend_t for more concise
Thinker K.F. Li <thinker@codemud.net>
parents:
diff
changeset
|
93 */ |
3fe8054457a8
Change interface of mb_backend_t for more concise
Thinker K.F. Li <thinker@codemud.net>
parents:
diff
changeset
|
94 struct _mb_IO_man { |
3fe8054457a8
Change interface of mb_backend_t for more concise
Thinker K.F. Li <thinker@codemud.net>
parents:
diff
changeset
|
95 int (*reg)(struct _mb_IO_man *io_man, |
3fe8054457a8
Change interface of mb_backend_t for more concise
Thinker K.F. Li <thinker@codemud.net>
parents:
diff
changeset
|
96 int fd, MB_IO_TYPE type, mb_IO_cb_t cb, void *data); |
993
5b58e74988bc
Use mb_backend_t::new instead of mb_backend_t::init
Thinker K.F. Li <thinker@codemud.net>
parents:
991
diff
changeset
|
97 void (*unreg)(struct _mb_IO_man *io_man, |
984
3fe8054457a8
Change interface of mb_backend_t for more concise
Thinker K.F. Li <thinker@codemud.net>
parents:
diff
changeset
|
98 int io_hdl); |
3fe8054457a8
Change interface of mb_backend_t for more concise
Thinker K.F. Li <thinker@codemud.net>
parents:
diff
changeset
|
99 }; |
3fe8054457a8
Change interface of mb_backend_t for more concise
Thinker K.F. Li <thinker@codemud.net>
parents:
diff
changeset
|
100 |
3fe8054457a8
Change interface of mb_backend_t for more concise
Thinker K.F. Li <thinker@codemud.net>
parents:
diff
changeset
|
101 /*! \brief Factory of IO managers. |
3fe8054457a8
Change interface of mb_backend_t for more concise
Thinker K.F. Li <thinker@codemud.net>
parents:
diff
changeset
|
102 */ |
3fe8054457a8
Change interface of mb_backend_t for more concise
Thinker K.F. Li <thinker@codemud.net>
parents:
diff
changeset
|
103 struct _mb_IO_factory { |
3fe8054457a8
Change interface of mb_backend_t for more concise
Thinker K.F. Li <thinker@codemud.net>
parents:
diff
changeset
|
104 mb_IO_man_t *(*new)(void); |
3fe8054457a8
Change interface of mb_backend_t for more concise
Thinker K.F. Li <thinker@codemud.net>
parents:
diff
changeset
|
105 void (*free)(mb_IO_man_t *io_man); |
3fe8054457a8
Change interface of mb_backend_t for more concise
Thinker K.F. Li <thinker@codemud.net>
parents:
diff
changeset
|
106 }; |
3fe8054457a8
Change interface of mb_backend_t for more concise
Thinker K.F. Li <thinker@codemud.net>
parents:
diff
changeset
|
107 |
3fe8054457a8
Change interface of mb_backend_t for more concise
Thinker K.F. Li <thinker@codemud.net>
parents:
diff
changeset
|
108 /*! \brief Function signature of callback functions for timers. |
3fe8054457a8
Change interface of mb_backend_t for more concise
Thinker K.F. Li <thinker@codemud.net>
parents:
diff
changeset
|
109 */ |
996
734ba9161be4
Change signature to make const for arguments of mb_timer_cb_t
Thinker K.F. Li <thinker@codemud.net>
parents:
994
diff
changeset
|
110 typedef void (*mb_timer_cb_t)(int hdl, |
734ba9161be4
Change signature to make const for arguments of mb_timer_cb_t
Thinker K.F. Li <thinker@codemud.net>
parents:
994
diff
changeset
|
111 const mb_timeval_t *tmo, |
734ba9161be4
Change signature to make const for arguments of mb_timer_cb_t
Thinker K.F. Li <thinker@codemud.net>
parents:
994
diff
changeset
|
112 const mb_timeval_t *now, |
991
1882700bb4b9
Adapt mb_tman_t to mb_timer_man_t
Thinker K.F. Li <thinker@codemud.net>
parents:
990
diff
changeset
|
113 void *data); |
984
3fe8054457a8
Change interface of mb_backend_t for more concise
Thinker K.F. Li <thinker@codemud.net>
parents:
diff
changeset
|
114 |
3fe8054457a8
Change interface of mb_backend_t for more concise
Thinker K.F. Li <thinker@codemud.net>
parents:
diff
changeset
|
115 /*! \brief Timer manager |
3fe8054457a8
Change interface of mb_backend_t for more concise
Thinker K.F. Li <thinker@codemud.net>
parents:
diff
changeset
|
116 */ |
3fe8054457a8
Change interface of mb_backend_t for more concise
Thinker K.F. Li <thinker@codemud.net>
parents:
diff
changeset
|
117 struct _mb_timer_man { |
1017
9b5d4839c5bb
Use mb_timer_man_t instead of mb_tman_t.
Thinker K.F. Li <thinker@codemud.net>
parents:
1013
diff
changeset
|
118 /*! \brief Setup a timeout callback. |
9b5d4839c5bb
Use mb_timer_man_t instead of mb_tman_t.
Thinker K.F. Li <thinker@codemud.net>
parents:
1013
diff
changeset
|
119 * |
9b5d4839c5bb
Use mb_timer_man_t instead of mb_tman_t.
Thinker K.F. Li <thinker@codemud.net>
parents:
1013
diff
changeset
|
120 * \return -1 for error. |
9b5d4839c5bb
Use mb_timer_man_t instead of mb_tman_t.
Thinker K.F. Li <thinker@codemud.net>
parents:
1013
diff
changeset
|
121 */ |
984
3fe8054457a8
Change interface of mb_backend_t for more concise
Thinker K.F. Li <thinker@codemud.net>
parents:
diff
changeset
|
122 int (*timeout)(struct _mb_timer_man *tm_man, |
991
1882700bb4b9
Adapt mb_tman_t to mb_timer_man_t
Thinker K.F. Li <thinker@codemud.net>
parents:
990
diff
changeset
|
123 mb_timeval_t *tmout, /* tiemout (wall time) */ |
1882700bb4b9
Adapt mb_tman_t to mb_timer_man_t
Thinker K.F. Li <thinker@codemud.net>
parents:
990
diff
changeset
|
124 mb_timer_cb_t cb, void *data); |
984
3fe8054457a8
Change interface of mb_backend_t for more concise
Thinker K.F. Li <thinker@codemud.net>
parents:
diff
changeset
|
125 /*! \brief Remove a timeout request. |
3fe8054457a8
Change interface of mb_backend_t for more concise
Thinker K.F. Li <thinker@codemud.net>
parents:
diff
changeset
|
126 * |
3fe8054457a8
Change interface of mb_backend_t for more concise
Thinker K.F. Li <thinker@codemud.net>
parents:
diff
changeset
|
127 * \param tm_hdl is the handle returned by _mb_timer_man::timeout. |
3fe8054457a8
Change interface of mb_backend_t for more concise
Thinker K.F. Li <thinker@codemud.net>
parents:
diff
changeset
|
128 */ |
3fe8054457a8
Change interface of mb_backend_t for more concise
Thinker K.F. Li <thinker@codemud.net>
parents:
diff
changeset
|
129 void (*remove)(struct _mb_timer_man *tm_man, int tm_hdl); |
993
5b58e74988bc
Use mb_backend_t::new instead of mb_backend_t::init
Thinker K.F. Li <thinker@codemud.net>
parents:
991
diff
changeset
|
130 }; |
984
3fe8054457a8
Change interface of mb_backend_t for more concise
Thinker K.F. Li <thinker@codemud.net>
parents:
diff
changeset
|
131 |
3fe8054457a8
Change interface of mb_backend_t for more concise
Thinker K.F. Li <thinker@codemud.net>
parents:
diff
changeset
|
132 /*! \brief Factory of timer manager. |
3fe8054457a8
Change interface of mb_backend_t for more concise
Thinker K.F. Li <thinker@codemud.net>
parents:
diff
changeset
|
133 */ |
3fe8054457a8
Change interface of mb_backend_t for more concise
Thinker K.F. Li <thinker@codemud.net>
parents:
diff
changeset
|
134 struct _mb_timer_factory { |
3fe8054457a8
Change interface of mb_backend_t for more concise
Thinker K.F. Li <thinker@codemud.net>
parents:
diff
changeset
|
135 mb_timer_man_t *(*new)(void); |
3fe8054457a8
Change interface of mb_backend_t for more concise
Thinker K.F. Li <thinker@codemud.net>
parents:
diff
changeset
|
136 void (*free)(mb_timer_man_t *timer_man); |
3fe8054457a8
Change interface of mb_backend_t for more concise
Thinker K.F. Li <thinker@codemud.net>
parents:
diff
changeset
|
137 }; |
3fe8054457a8
Change interface of mb_backend_t for more concise
Thinker K.F. Li <thinker@codemud.net>
parents:
diff
changeset
|
138 |
1017
9b5d4839c5bb
Use mb_timer_man_t instead of mb_tman_t.
Thinker K.F. Li <thinker@codemud.net>
parents:
1013
diff
changeset
|
139 #define mb_timer_man_timeout(tm_man, tmout, cb, data) \ |
9b5d4839c5bb
Use mb_timer_man_t instead of mb_tman_t.
Thinker K.F. Li <thinker@codemud.net>
parents:
1013
diff
changeset
|
140 (tm_man)->timeout((tm_man), (tmout), (cb), (data)) |
9b5d4839c5bb
Use mb_timer_man_t instead of mb_tman_t.
Thinker K.F. Li <thinker@codemud.net>
parents:
1013
diff
changeset
|
141 #define mb_timer_man_remove(tm_man, tm_hdl) \ |
9b5d4839c5bb
Use mb_timer_man_t instead of mb_tman_t.
Thinker K.F. Li <thinker@codemud.net>
parents:
1013
diff
changeset
|
142 (tm_man)->remove((tm_man), (tm_hdl)) |
1019
1a3cc22ee1bd
Fix testcase of animate.c for mb_timer_man_t
Thinker K.F. Li <thinker@codemud.net>
parents:
1017
diff
changeset
|
143 #define mb_timer_man_new(tm_fact) (tm_fact)->new() |
1a3cc22ee1bd
Fix testcase of animate.c for mb_timer_man_t
Thinker K.F. Li <thinker@codemud.net>
parents:
1017
diff
changeset
|
144 #define mb_timer_man_free(tm_fact, tm_man) (tm_fact)->free(tm_man) |
1017
9b5d4839c5bb
Use mb_timer_man_t instead of mb_tman_t.
Thinker K.F. Li <thinker@codemud.net>
parents:
1013
diff
changeset
|
145 |
984
3fe8054457a8
Change interface of mb_backend_t for more concise
Thinker K.F. Li <thinker@codemud.net>
parents:
diff
changeset
|
146 #endif /* __MB_BACKEND_H_ */ |