… | |
… | |
127 | .\} |
127 | .\} |
128 | .rm #[ #] #H #V #F C |
128 | .rm #[ #] #H #V #F C |
129 | .\" ======================================================================== |
129 | .\" ======================================================================== |
130 | .\" |
130 | .\" |
131 | .IX Title "EV 1" |
131 | .IX Title "EV 1" |
132 | .TH EV 1 "2007-12-18" "perl v5.8.8" "User Contributed Perl Documentation" |
132 | .TH EV 1 "2007-12-19" "perl v5.8.8" "User Contributed Perl Documentation" |
133 | .SH "NAME" |
133 | .SH "NAME" |
134 | libev \- a high performance full\-featured event loop written in C |
134 | libev \- a high performance full\-featured event loop written in C |
135 | .SH "SYNOPSIS" |
135 | .SH "SYNOPSIS" |
136 | .IX Header "SYNOPSIS" |
136 | .IX Header "SYNOPSIS" |
137 | .Vb 1 |
137 | .Vb 1 |
… | |
… | |
2629 | and the way callbacks are invoked and set. Must expand to a struct member |
2629 | and the way callbacks are invoked and set. Must expand to a struct member |
2630 | definition and a statement, respectively. See the \fIev.v\fR header file for |
2630 | definition and a statement, respectively. See the \fIev.v\fR header file for |
2631 | their default definitions. One possible use for overriding these is to |
2631 | their default definitions. One possible use for overriding these is to |
2632 | avoid the \f(CW\*(C`struct ev_loop *\*(C'\fR as first argument in all cases, or to use |
2632 | avoid the \f(CW\*(C`struct ev_loop *\*(C'\fR as first argument in all cases, or to use |
2633 | method calls instead of plain function calls in \*(C+. |
2633 | method calls instead of plain function calls in \*(C+. |
|
|
2634 | .Sh "\s-1EXPORTED\s0 \s-1API\s0 \s-1SYMBOLS\s0" |
|
|
2635 | .IX Subsection "EXPORTED API SYMBOLS" |
|
|
2636 | If you need to re-export the \s-1API\s0 (e.g. via a dll) and you need a list of |
|
|
2637 | exported symbols, you can use the provided \fISymbol.*\fR files which list |
|
|
2638 | all public symbols, one per line: |
|
|
2639 | .Sp |
|
|
2640 | .Vb 2 |
|
|
2641 | \& Symbols.ev for libev proper |
|
|
2642 | \& Symbols.event for the libevent emulation |
|
|
2643 | .Ve |
|
|
2644 | .Sp |
|
|
2645 | This can also be used to rename all public symbols to avoid clashes with |
|
|
2646 | multiple versions of libev linked together (which is obviously bad in |
|
|
2647 | itself, but sometimes it is inconvinient to avoid this). |
|
|
2648 | .Sp |
|
|
2649 | A sed comamnd like this will create wrapper \f(CW\*(C`#define\*(C'\fR's that you need to |
|
|
2650 | include before including \fIev.h\fR: |
|
|
2651 | .Sp |
|
|
2652 | .Vb 1 |
|
|
2653 | \& <Symbols.ev sed -e "s/.*/#define & myprefix_&/" >wrap.h |
|
|
2654 | .Ve |
|
|
2655 | .Sp |
|
|
2656 | This would create a file \fIwrap.h\fR which essentially looks like this: |
|
|
2657 | .Sp |
|
|
2658 | .Vb 4 |
|
|
2659 | \& #define ev_backend myprefix_ev_backend |
|
|
2660 | \& #define ev_check_start myprefix_ev_check_start |
|
|
2661 | \& #define ev_check_stop myprefix_ev_check_stop |
|
|
2662 | \& ... |
|
|
2663 | .Ve |
2634 | .Sh "\s-1EXAMPLES\s0" |
2664 | .Sh "\s-1EXAMPLES\s0" |
2635 | .IX Subsection "EXAMPLES" |
2665 | .IX Subsection "EXAMPLES" |
2636 | For a real-world example of a program the includes libev |
2666 | For a real-world example of a program the includes libev |
2637 | verbatim, you can have a look at the \s-1EV\s0 perl module |
2667 | verbatim, you can have a look at the \s-1EV\s0 perl module |
2638 | (<http://software.schmorp.de/pkg/EV.html>). It has the libev files in |
2668 | (<http://software.schmorp.de/pkg/EV.html>). It has the libev files in |