ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/libev/ev.h
(Generate patch)

Comparing libev/ev.h (file contents):
Revision 1.49 by root, Sat Nov 10 21:19:30 2007 UTC vs.
Revision 1.51 by root, Sun Nov 11 04:13:42 2007 UTC

46 46
47#ifndef EV_MULTIPLICITY 47#ifndef EV_MULTIPLICITY
48# define EV_MULTIPLICITY 1 48# define EV_MULTIPLICITY 1
49#endif 49#endif
50 50
51#ifndef EV_PERIODICS
52# define EV_PERIODICS 1
53#endif
54
51/* support multiple event loops? */ 55/* support multiple event loops? */
52#if EV_MULTIPLICITY 56#if EV_MULTIPLICITY
53struct ev_loop; 57struct ev_loop;
54# define EV_P struct ev_loop *loop 58# define EV_P struct ev_loop *loop
55# define EV_P_ EV_P, 59# define EV_P_ EV_P,
67#endif 71#endif
68 72
69/* eventmask, revents, events... */ 73/* eventmask, revents, events... */
70#define EV_UNDEF -1 /* guaranteed to be invalid */ 74#define EV_UNDEF -1 /* guaranteed to be invalid */
71#define EV_NONE 0x00 75#define EV_NONE 0x00
72#define EV_READ 0x01 76#define EV_READ 0x01 /* io only */
73#define EV_WRITE 0x02 77#define EV_WRITE 0x02 /* io only */
74#define EV_TIMEOUT 0x000100 78#define EV_TIMEOUT 0x000100 /* timer only */
75#define EV_PERIODIC 0x000200 79#define EV_PERIODIC 0x000200 /* periodic timer only */
76#define EV_SIGNAL 0x000400 80#define EV_SIGNAL 0x000400 /* signal only */
77#define EV_IDLE 0x000800 81#define EV_IDLE 0x000800 /* idle only */
78#define EV_CHECK 0x001000 82#define EV_CHECK 0x001000 /* check only */
79#define EV_PREPARE 0x002000 83#define EV_PREPARE 0x002000 /* prepare only */
80#define EV_CHILD 0x004000 84#define EV_CHILD 0x004000 /* child/pid only */
81#define EV_ERROR 0x800000 /* sent when an error occurs */ 85#define EV_ERROR 0x800000 /* sent when an error occurs */
82 86
83/* can be used to add custom fields to all watchers */ 87/* can be used to add custom fields to all watchers, while losing binary compatibility */
84#ifndef EV_COMMON 88#ifndef EV_COMMON
85# define EV_COMMON void *data 89# define EV_COMMON void *data
86#endif 90#endif
87#ifndef EV_PROTOTYPES 91#ifndef EV_PROTOTYPES
88# define EV_PROTOTYPES 1 92# define EV_PROTOTYPES 1
368void ev_timer_start (EV_P_ struct ev_timer *w); 372void ev_timer_start (EV_P_ struct ev_timer *w);
369void ev_timer_stop (EV_P_ struct ev_timer *w); 373void ev_timer_stop (EV_P_ struct ev_timer *w);
370/* stops if active and no repeat, restarts if active and repeating, starts if inactive and repeating */ 374/* stops if active and no repeat, restarts if active and repeating, starts if inactive and repeating */
371void ev_timer_again (EV_P_ struct ev_timer *w); 375void ev_timer_again (EV_P_ struct ev_timer *w);
372 376
377#if EV_PERIODICS
373void ev_periodic_start (EV_P_ struct ev_periodic *w); 378void ev_periodic_start (EV_P_ struct ev_periodic *w);
374void ev_periodic_stop (EV_P_ struct ev_periodic *w); 379void ev_periodic_stop (EV_P_ struct ev_periodic *w);
375void ev_periodic_again (EV_P_ struct ev_periodic *w); 380void ev_periodic_again (EV_P_ struct ev_periodic *w);
381#endif
376 382
377void ev_idle_start (EV_P_ struct ev_idle *w); 383void ev_idle_start (EV_P_ struct ev_idle *w);
378void ev_idle_stop (EV_P_ struct ev_idle *w); 384void ev_idle_stop (EV_P_ struct ev_idle *w);
379 385
380void ev_prepare_start (EV_P_ struct ev_prepare *w); 386void ev_prepare_start (EV_P_ struct ev_prepare *w);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines