… | |
… | |
3944 | watchers in the constructor. |
3944 | watchers in the constructor. |
3945 | |
3945 | |
3946 | class myclass |
3946 | class myclass |
3947 | { |
3947 | { |
3948 | ev::io io ; void io_cb (ev::io &w, int revents); |
3948 | ev::io io ; void io_cb (ev::io &w, int revents); |
3949 | ev::io2 io2 ; void io2_cb (ev::io &w, int revents); |
3949 | ev::io io2 ; void io2_cb (ev::io &w, int revents); |
3950 | ev::idle idle; void idle_cb (ev::idle &w, int revents); |
3950 | ev::idle idle; void idle_cb (ev::idle &w, int revents); |
3951 | |
3951 | |
3952 | myclass (int fd) |
3952 | myclass (int fd) |
3953 | { |
3953 | { |
3954 | io .set <myclass, &myclass::io_cb > (this); |
3954 | io .set <myclass, &myclass::io_cb > (this); |
… | |
… | |
4005 | L<http://hackage.haskell.org/cgi-bin/hackage-scripts/package/hlibev>. |
4005 | L<http://hackage.haskell.org/cgi-bin/hackage-scripts/package/hlibev>. |
4006 | |
4006 | |
4007 | =item D |
4007 | =item D |
4008 | |
4008 | |
4009 | Leandro Lucarella has written a D language binding (F<ev.d>) for libev, to |
4009 | Leandro Lucarella has written a D language binding (F<ev.d>) for libev, to |
4010 | be found at L<http://proj.llucax.com.ar/wiki/evd>. |
4010 | be found at L<http://www.llucax.com.ar/proj/ev.d/index.html>. |
4011 | |
4011 | |
4012 | =item Ocaml |
4012 | =item Ocaml |
4013 | |
4013 | |
4014 | Erkki Seppala has written Ocaml bindings for libev, to be found at |
4014 | Erkki Seppala has written Ocaml bindings for libev, to be found at |
4015 | L<http://modeemi.cs.tut.fi/~flux/software/ocaml-ev/>. |
4015 | L<http://modeemi.cs.tut.fi/~flux/software/ocaml-ev/>. |
… | |
… | |
4063 | suitable for use with C<EV_A>. |
4063 | suitable for use with C<EV_A>. |
4064 | |
4064 | |
4065 | =item C<EV_DEFAULT>, C<EV_DEFAULT_> |
4065 | =item C<EV_DEFAULT>, C<EV_DEFAULT_> |
4066 | |
4066 | |
4067 | Similar to the other two macros, this gives you the value of the default |
4067 | Similar to the other two macros, this gives you the value of the default |
4068 | loop, if multiple loops are supported ("ev loop default"). |
4068 | loop, if multiple loops are supported ("ev loop default"). The default loop |
|
|
4069 | will be initialised if it isn't already initialised. |
|
|
4070 | |
|
|
4071 | For non-multiplicity builds, these macros do nothing, so you always have |
|
|
4072 | to initialise the loop somewhere. |
4069 | |
4073 | |
4070 | =item C<EV_DEFAULT_UC>, C<EV_DEFAULT_UC_> |
4074 | =item C<EV_DEFAULT_UC>, C<EV_DEFAULT_UC_> |
4071 | |
4075 | |
4072 | Usage identical to C<EV_DEFAULT> and C<EV_DEFAULT_>, but requires that the |
4076 | Usage identical to C<EV_DEFAULT> and C<EV_DEFAULT_>, but requires that the |
4073 | default loop has been initialised (C<UC> == unchecked). Their behaviour |
4077 | default loop has been initialised (C<UC> == unchecked). Their behaviour |
… | |
… | |
4376 | provide your own type that you know is safe for your purposes. It is used |
4380 | provide your own type that you know is safe for your purposes. It is used |
4377 | both for signal handler "locking" as well as for signal and thread safety |
4381 | both for signal handler "locking" as well as for signal and thread safety |
4378 | in C<ev_async> watchers. |
4382 | in C<ev_async> watchers. |
4379 | |
4383 | |
4380 | In the absence of this define, libev will use C<sig_atomic_t volatile> |
4384 | In the absence of this define, libev will use C<sig_atomic_t volatile> |
4381 | (from F<signal.h>), which is usually good enough on most platforms. |
4385 | (from F<signal.h>), which is usually good enough on most platforms, |
|
|
4386 | although strictly speaking using a type that also implies a memory fence |
|
|
4387 | is required. |
4382 | |
4388 | |
4383 | =item EV_H (h) |
4389 | =item EV_H (h) |
4384 | |
4390 | |
4385 | The name of the F<ev.h> header file used to include it. The default if |
4391 | The name of the F<ev.h> header file used to include it. The default if |
4386 | undefined is C<"ev.h"> in F<event.h>, F<ev.c> and F<ev++.h>. This can be |
4392 | undefined is C<"ev.h"> in F<event.h>, F<ev.c> and F<ev++.h>. This can be |
… | |
… | |
4409 | If undefined or defined to C<1>, then all event-loop-specific functions |
4415 | If undefined or defined to C<1>, then all event-loop-specific functions |
4410 | will have the C<struct ev_loop *> as first argument, and you can create |
4416 | will have the C<struct ev_loop *> as first argument, and you can create |
4411 | additional independent event loops. Otherwise there will be no support |
4417 | additional independent event loops. Otherwise there will be no support |
4412 | for multiple event loops and there is no first event loop pointer |
4418 | for multiple event loops and there is no first event loop pointer |
4413 | argument. Instead, all functions act on the single default loop. |
4419 | argument. Instead, all functions act on the single default loop. |
|
|
4420 | |
|
|
4421 | Note that C<EV_DEFAULT> and C<EV_DEFAULT_> will no longer provide a |
|
|
4422 | default loop when multiplicity is switched off - you always have to |
|
|
4423 | initialise the loop manually in this case. |
4414 | |
4424 | |
4415 | =item EV_MINPRI |
4425 | =item EV_MINPRI |
4416 | |
4426 | |
4417 | =item EV_MAXPRI |
4427 | =item EV_MAXPRI |
4418 | |
4428 | |