+.IP "w\->set<class, &class::method> (object *)" 4
+.IX Item "w->set<class, &class::method> (object *)"
+This method sets the callback method to call. The method has to have a
+signature of \f(CW\*(C`void (*)(ev_TYPE &, int)\*(C'\fR, it receives the watcher as
+first argument and the \f(CW\*(C`revents\*(C'\fR as second. The object must be given as
+parameter and is stored in the \f(CW\*(C`data\*(C'\fR member of the watcher.
+.Sp
+This method synthesizes efficient thunking code to call your method from
+the C callback that libev requires. If your compiler can inline your
+callback (i.e. it is visible to it at the place of the \f(CW\*(C`set\*(C'\fR call and
+your compiler is good :), then the method will be fully inlined into the
+thunking function, making it as fast as a direct C callback.
+.Sp
+Example: simple class declaration and watcher initialisation
+.Sp
+.Vb 4
+\& struct myclass
+\& {
+\& void io_cb (ev::io &w, int revents) { }
+\& }
+.Ve
+.Sp
+.Vb 3
+\& myclass obj;
+\& ev::io iow;
+\& iow.set <myclass, &myclass::io_cb> (&obj);
+.Ve
+.IP "w\->set (void (*function)(watcher &w, int), void *data = 0)" 4
+.IX Item "w->set (void (*function)(watcher &w, int), void *data = 0)"
+Also sets a callback, but uses a static method or plain function as
+callback. The optional \f(CW\*(C`data\*(C'\fR argument will be stored in the watcher's
+\&\f(CW\*(C`data\*(C'\fR member and is free for you to use.
+.Sp
+See the method\-\f(CW\*(C`set\*(C'\fR above for more details.