… | |
… | |
147 | EV_EVENT_H |
147 | EV_EVENT_H |
148 | |
148 | |
149 | Similarly to EV_H, this macro cna be used to override event.c's idea |
149 | Similarly to EV_H, this macro cna be used to override event.c's idea |
150 | of how the event.h header can be found. |
150 | of how the event.h header can be found. |
151 | |
151 | |
|
|
152 | EV_PROTOTYPES |
|
|
153 | |
|
|
154 | If defined to be "0", then "ev.h" will not define any function |
|
|
155 | prototypes, but still define all the structs and other |
|
|
156 | symbols. This is occasionally useful. |
|
|
157 | |
|
|
158 | EV_MULTIPLICITY |
|
|
159 | |
|
|
160 | If undefined or defined to "1", then all event-loop-specific |
|
|
161 | functions will have the "struct ev_loop *" as first argument, and |
|
|
162 | you can create additional independent event loops. Otherwise there |
|
|
163 | will be no support for multiple event loops and there is no first |
|
|
164 | event loop pointer argument. Instead, all functions act on the |
|
|
165 | single default loop. |
|
|
166 | |
|
|
167 | EV_PERIODICS |
|
|
168 | |
|
|
169 | If undefined or defined to be "1", then periodic timers are |
|
|
170 | supported, otherwise not. This saves a few kb of code. |
|
|
171 | |
152 | EV_COMMON |
172 | EV_COMMON |
153 | |
173 | |
154 | By default, all watchers have a "void *data" member. By redefining |
174 | By default, all watchers have a "void *data" member. By redefining |
155 | this macro to a something else you can include more and other types |
175 | this macro to a something else you can include more and other types |
156 | of members. You have to define it each time you include one of the |
176 | of members. You have to define it each time you include one of the |
… | |
… | |
159 | For example, the perl EV module uses this: |
179 | For example, the perl EV module uses this: |
160 | |
180 | |
161 | #define EV_COMMON \ |
181 | #define EV_COMMON \ |
162 | SV *self; /* contains this struct */ \ |
182 | SV *self; /* contains this struct */ \ |
163 | SV *cb_sv, *fh /* note no trailing ";" */ |
183 | SV *cb_sv, *fh /* note no trailing ";" */ |
164 | |
|
|
165 | EV_PROTOTYPES |
|
|
166 | |
|
|
167 | If defined to be "0", then "ev.h" will not define any function |
|
|
168 | prototypes, but still define all the structs and other |
|
|
169 | symbols. This is occasionally useful. |
|
|
170 | |
|
|
171 | EV_MULTIPLICITY |
|
|
172 | |
|
|
173 | If undefined or defined to "1", then all event-loop-specific |
|
|
174 | functions will have the "struct ev_loop *" as first argument, and |
|
|
175 | you can create additional independent event loops. Otherwise there |
|
|
176 | will be no support for multiple event loops and there is no first |
|
|
177 | event loop pointer argument. Instead, all functions act on the |
|
|
178 | single default loop. |
|
|
179 | |
184 | |
180 | EV_CB_DECLARE(type) |
185 | EV_CB_DECLARE(type) |
181 | EV_CB_INVOKE(watcher,revents) |
186 | EV_CB_INVOKE(watcher,revents) |
182 | ev_set_cb(ev,cb) |
187 | ev_set_cb(ev,cb) |
183 | |
188 | |