… | |
… | |
207 | #define EV_VERSION_MAJOR 4 |
207 | #define EV_VERSION_MAJOR 4 |
208 | #define EV_VERSION_MINOR 11 |
208 | #define EV_VERSION_MINOR 11 |
209 | |
209 | |
210 | /* eventmask, revents, events... */ |
210 | /* eventmask, revents, events... */ |
211 | enum { |
211 | enum { |
212 | EV_UNDEF = 0xFFFFFFFF, /* guaranteed to be invalid */ |
212 | EV_UNDEF = (int)0xFFFFFFFF, /* guaranteed to be invalid */ |
213 | EV_NONE = 0x00, /* no events */ |
213 | EV_NONE = 0x00, /* no events */ |
214 | EV_READ = 0x01, /* ev_io detected read will not block */ |
214 | EV_READ = 0x01, /* ev_io detected read will not block */ |
215 | EV_WRITE = 0x02, /* ev_io detected write will not block */ |
215 | EV_WRITE = 0x02, /* ev_io detected write will not block */ |
216 | EV__IOFDSET = 0x80, /* internal use only */ |
216 | EV__IOFDSET = 0x80, /* internal use only */ |
217 | EV_IO = EV_READ, /* alias for type-detection */ |
217 | EV_IO = EV_READ, /* alias for type-detection */ |
218 | EV_TIMER = 0x00000100, /* timer timed out */ |
218 | EV_TIMER = 0x00000100, /* timer timed out */ |
219 | #if EV_COMPAT3 |
219 | #if EV_COMPAT3 |
220 | EV_TIMEOUT = EV_TIMER, /* pre 4.0 API compatibility */ |
220 | EV_TIMEOUT = EV_TIMER, /* pre 4.0 API compatibility */ |
221 | #endif |
221 | #endif |
222 | EV_PERIODIC = 0x00000200, /* periodic timer timed out */ |
222 | EV_PERIODIC = 0x00000200, /* periodic timer timed out */ |
223 | EV_SIGNAL = 0x00000400, /* signal was received */ |
223 | EV_SIGNAL = 0x00000400, /* signal was received */ |
224 | EV_CHILD = 0x00000800, /* child/pid had status change */ |
224 | EV_CHILD = 0x00000800, /* child/pid had status change */ |
225 | EV_STAT = 0x00001000, /* stat data changed */ |
225 | EV_STAT = 0x00001000, /* stat data changed */ |
226 | EV_IDLE = 0x00002000, /* event loop is idling */ |
226 | EV_IDLE = 0x00002000, /* event loop is idling */ |
227 | EV_PREPARE = 0x00004000, /* event loop about to poll */ |
227 | EV_PREPARE = 0x00004000, /* event loop about to poll */ |
228 | EV_CHECK = 0x00008000, /* event loop finished poll */ |
228 | EV_CHECK = 0x00008000, /* event loop finished poll */ |
229 | EV_EMBED = 0x00010000, /* embedded event loop needs sweep */ |
229 | EV_EMBED = 0x00010000, /* embedded event loop needs sweep */ |
230 | EV_FORK = 0x00020000, /* event loop resumed in child */ |
230 | EV_FORK = 0x00020000, /* event loop resumed in child */ |
231 | EV_CLEANUP = 0x00040000, /* event loop resumed in child */ |
231 | EV_CLEANUP = 0x00040000, /* event loop resumed in child */ |
232 | EV_ASYNC = 0x00080000, /* async intra-loop signal */ |
232 | EV_ASYNC = 0x00080000, /* async intra-loop signal */ |
233 | EV_CUSTOM = 0x01000000, /* for use by user code */ |
233 | EV_CUSTOM = 0x01000000, /* for use by user code */ |
234 | EV_ERROR = 0x80000000 /* sent when an error occurs */ |
234 | EV_ERROR = (int)0x80000000 /* sent when an error occurs */ |
235 | }; |
235 | }; |
236 | |
236 | |
237 | /* can be used to add custom fields to all watchers, while losing binary compatibility */ |
237 | /* can be used to add custom fields to all watchers, while losing binary compatibility */ |
238 | #ifndef EV_COMMON |
238 | #ifndef EV_COMMON |
239 | # define EV_COMMON void *data; |
239 | # define EV_COMMON void *data; |