… | |
… | |
1997 | .el .IP "\f(CWEV_DEFAULT\fR, \f(CWEV_DEFAULT_\fR" 4 |
1997 | .el .IP "\f(CWEV_DEFAULT\fR, \f(CWEV_DEFAULT_\fR" 4 |
1998 | .IX Item "EV_DEFAULT, EV_DEFAULT_" |
1998 | .IX Item "EV_DEFAULT, EV_DEFAULT_" |
1999 | Similar to the other two macros, this gives you the value of the default |
1999 | Similar to the other two macros, this gives you the value of the default |
2000 | loop, if multiple loops are supported (\*(L"ev loop default\*(R"). |
2000 | loop, if multiple loops are supported (\*(L"ev loop default\*(R"). |
2001 | .PP |
2001 | .PP |
2002 | Example: Declare and initialise a check watcher, working regardless of |
2002 | Example: Declare and initialise a check watcher, utilising the above |
2003 | wether multiple loops are supported or not. |
2003 | macros so it will work regardless of wether multiple loops are supported |
|
|
2004 | or not. |
2004 | .PP |
2005 | .PP |
2005 | .Vb 5 |
2006 | .Vb 5 |
2006 | \& static void |
2007 | \& static void |
2007 | \& check_cb (EV_P_ ev_timer *w, int revents) |
2008 | \& check_cb (EV_P_ ev_timer *w, int revents) |
2008 | \& { |
2009 | \& { |
… | |
… | |
2071 | .Vb 1 |
2072 | .Vb 1 |
2072 | \& ev_win32.c required on win32 platforms only |
2073 | \& ev_win32.c required on win32 platforms only |
2073 | .Ve |
2074 | .Ve |
2074 | .PP |
2075 | .PP |
2075 | .Vb 5 |
2076 | .Vb 5 |
2076 | \& ev_select.c only when select backend is enabled (which is by default) |
2077 | \& ev_select.c only when select backend is enabled (which is enabled by default) |
2077 | \& ev_poll.c only when poll backend is enabled (disabled by default) |
2078 | \& ev_poll.c only when poll backend is enabled (disabled by default) |
2078 | \& ev_epoll.c only when the epoll backend is enabled (disabled by default) |
2079 | \& ev_epoll.c only when the epoll backend is enabled (disabled by default) |
2079 | \& ev_kqueue.c only when the kqueue backend is enabled (disabled by default) |
2080 | \& ev_kqueue.c only when the kqueue backend is enabled (disabled by default) |
2080 | \& ev_port.c only when the solaris port backend is enabled (disabled by default) |
2081 | \& ev_port.c only when the solaris port backend is enabled (disabled by default) |
2081 | .Ve |
2082 | .Ve |
… | |
… | |
2308 | interface) and \fI\s-1EV\s0.xs\fR (implementation) files. Only the \fI\s-1EV\s0.xs\fR file |
2309 | interface) and \fI\s-1EV\s0.xs\fR (implementation) files. Only the \fI\s-1EV\s0.xs\fR file |
2309 | will be compiled. It is pretty complex because it provides its own header |
2310 | will be compiled. It is pretty complex because it provides its own header |
2310 | file. |
2311 | file. |
2311 | .Sp |
2312 | .Sp |
2312 | The usage in rxvt-unicode is simpler. It has a \fIev_cpp.h\fR header file |
2313 | The usage in rxvt-unicode is simpler. It has a \fIev_cpp.h\fR header file |
2313 | that everybody includes and which overrides some autoconf choices: |
2314 | that everybody includes and which overrides some configure choices: |
2314 | .Sp |
2315 | .Sp |
2315 | .Vb 4 |
2316 | .Vb 9 |
|
|
2317 | \& #define EV_MINIMAL 1 |
2316 | \& #define EV_USE_POLL 0 |
2318 | \& #define EV_USE_POLL 0 |
2317 | \& #define EV_MULTIPLICITY 0 |
2319 | \& #define EV_MULTIPLICITY 0 |
2318 | \& #define EV_PERIODICS 0 |
2320 | \& #define EV_PERIODIC_ENABLE 0 |
|
|
2321 | \& #define EV_STAT_ENABLE 0 |
|
|
2322 | \& #define EV_FORK_ENABLE 0 |
2319 | \& #define EV_CONFIG_H <config.h> |
2323 | \& #define EV_CONFIG_H <config.h> |
|
|
2324 | \& #define EV_MINPRI 0 |
|
|
2325 | \& #define EV_MAXPRI 0 |
2320 | .Ve |
2326 | .Ve |
2321 | .Sp |
2327 | .Sp |
2322 | .Vb 1 |
2328 | .Vb 1 |
2323 | \& #include "ev++.h" |
2329 | \& #include "ev++.h" |
2324 | .Ve |
2330 | .Ve |