ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/libev/ev.pod
(Generate patch)

Comparing libev/ev.pod (file contents):
Revision 1.74 by root, Sat Dec 8 14:12:08 2007 UTC vs.
Revision 1.75 by root, Sat Dec 8 14:27:39 2007 UTC

1844 1844
1845 myclass obj; 1845 myclass obj;
1846 ev::io iow; 1846 ev::io iow;
1847 iow.set <myclass, &myclass::io_cb> (&obj); 1847 iow.set <myclass, &myclass::io_cb> (&obj);
1848 1848
1849=item w->set (void (*function)(watcher &w, int), void *data = 0) 1849=item w->set<function> (void *data = 0)
1850 1850
1851Also sets a callback, but uses a static method or plain function as 1851Also sets a callback, but uses a static method or plain function as
1852callback. The optional C<data> argument will be stored in the watcher's 1852callback. The optional C<data> argument will be stored in the watcher's
1853C<data> member and is free for you to use. 1853C<data> member and is free for you to use.
1854 1854
1855The prototype of the C<function> must be C<void (*)(ev::TYPE &w, int)>.
1856
1855See the method-C<set> above for more details. 1857See the method-C<set> above for more details.
1858
1859Example:
1860
1861 static void io_cb (ev::io &w, int revents) { }
1862 iow.set <io_cb> ();
1856 1863
1857=item w->set (struct ev_loop *) 1864=item w->set (struct ev_loop *)
1858 1865
1859Associates a different C<struct ev_loop> with this watcher. You can only 1866Associates a different C<struct ev_loop> with this watcher. You can only
1860do this when the watcher is inactive (and not pending either). 1867do this when the watcher is inactive (and not pending either).

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines