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

Comparing libev/ev.pod (file contents):
Revision 1.73 by root, Sat Dec 8 03:53:36 2007 UTC vs.
Revision 1.75 by root, Sat Dec 8 14:27:39 2007 UTC

777 777
778Setting a priority outside the range of C<EV_MINPRI> to C<EV_MAXPRI> is 778Setting a priority outside the range of C<EV_MINPRI> to C<EV_MAXPRI> is
779fine, as long as you do not mind that the priority value you query might 779fine, as long as you do not mind that the priority value you query might
780or might not have been adjusted to be within valid range. 780or might not have been adjusted to be within valid range.
781 781
782=item ev_invoke (loop, ev_TYPE *watcher, int revents)
783
784Invoke the C<watcher> with the given C<loop> and C<revents>. Neither
785C<loop> nor C<revents> need to be valid as long as the watcher callback
786can deal with that fact.
787
788=item int ev_clear_pending (loop, ev_TYPE *watcher)
789
790If the watcher is pending, this function returns clears its pending status
791and returns its C<revents> bitset (as if its callback was invoked). If the
792watcher isn't pending it does nothing and returns C<0>.
793
782=back 794=back
783 795
784 796
785=head2 ASSOCIATING CUSTOM DATA WITH A WATCHER 797=head2 ASSOCIATING CUSTOM DATA WITH A WATCHER
786 798
1832 1844
1833 myclass obj; 1845 myclass obj;
1834 ev::io iow; 1846 ev::io iow;
1835 iow.set <myclass, &myclass::io_cb> (&obj); 1847 iow.set <myclass, &myclass::io_cb> (&obj);
1836 1848
1837=item w->set (void (*function)(watcher &w, int), void *data = 0) 1849=item w->set<function> (void *data = 0)
1838 1850
1839Also 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
1840callback. 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
1841C<data> member and is free for you to use. 1853C<data> member and is free for you to use.
1842 1854
1855The prototype of the C<function> must be C<void (*)(ev::TYPE &w, int)>.
1856
1843See 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> ();
1844 1863
1845=item w->set (struct ev_loop *) 1864=item w->set (struct ev_loop *)
1846 1865
1847Associates 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
1848do 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