… | |
… | |
1654 | |
1654 | |
1655 | #define EV_COMMON \ |
1655 | #define EV_COMMON \ |
1656 | SV *self; /* contains this struct */ \ |
1656 | SV *self; /* contains this struct */ \ |
1657 | SV *cb_sv, *fh /* note no trailing ";" */ |
1657 | SV *cb_sv, *fh /* note no trailing ";" */ |
1658 | |
1658 | |
1659 | =item EV_CB_DECLARE(type) |
1659 | =item EV_CB_DECLARE (type) |
1660 | |
1660 | |
1661 | =item EV_CB_INVOKE(watcher,revents) |
1661 | =item EV_CB_INVOKE (watcher, revents) |
1662 | |
1662 | |
1663 | =item ev_set_cb(ev,cb) |
1663 | =item ev_set_cb (ev, cb) |
1664 | |
1664 | |
1665 | Can be used to change the callback member declaration in each watcher, |
1665 | Can be used to change the callback member declaration in each watcher, |
1666 | and the way callbacks are invoked and set. Must expand to a struct member |
1666 | and the way callbacks are invoked and set. Must expand to a struct member |
1667 | definition and a statement, respectively. See the F<ev.v> header file for |
1667 | definition and a statement, respectively. See the F<ev.v> header file for |
1668 | their default definitions. One possible use for overriding these is to |
1668 | their default definitions. One possible use for overriding these is to |
1669 | avoid the ev_loop pointer as first argument in all cases, or to use method |
1669 | avoid the C<struct ev_loop *> as first argument in all cases, or to use |
1670 | calls instead of plain function calls in C++. |
1670 | method calls instead of plain function calls in C++. |
1671 | |
1671 | |
1672 | =head2 EXAMPLES |
1672 | =head2 EXAMPLES |
1673 | |
1673 | |
1674 | For a real-world example of a program the includes libev |
1674 | For a real-world example of a program the includes libev |
1675 | verbatim, you can have a look at the EV perl module |
1675 | verbatim, you can have a look at the EV perl module |