+</div>
+<h2 id="SUMMARY_OF_GENERIC_WATCHER_FUNCTIONS">SUMMARY OF GENERIC WATCHER FUNCTIONS</h2>
+<div id="SUMMARY_OF_GENERIC_WATCHER_FUNCTIONS-2">
+<p>In the following description, <code>TYPE</code> stands for the watcher type,
+e.g. <code>timer</code> for <code>ev_timer</code> watchers and <code>io</code> for <code>ev_io</code> watchers.</p>
+<dl>
+ <dt><code>ev_init</code> (ev_TYPE *watcher, callback)</dt>
+ <dd>
+ <p>This macro initialises the generic portion of a watcher. The contents
+of the watcher object can be arbitrary (so <code>malloc</code> will do). Only
+the generic parts of the watcher are initialised, you <i>need</i> to call
+the type-specific <code>ev_TYPE_set</code> macro afterwards to initialise the
+type-specific parts. For each type there is also a <code>ev_TYPE_init</code> macro
+which rolls both calls into one.</p>
+ <p>You can reinitialise a watcher at any time as long as it has been stopped
+(or never started) and there are no pending events outstanding.</p>
+ <p>The callbakc is always of type <code>void (*)(ev_loop *loop, ev_TYPE *watcher,
+int revents)</code>.</p>
+ </dd>
+ <dt><code>ev_TYPE_set</code> (ev_TYPE *, [args])</dt>
+ <dd>
+ <p>This macro initialises the type-specific parts of a watcher. You need to
+call <code>ev_init</code> at least once before you call this macro, but you can
+call <code>ev_TYPE_set</code> any number of times. You must not, however, call this
+macro on a watcher that is active (it can be pending, however, which is a
+difference to the <code>ev_init</code> macro).</p>
+ <p>Although some watcher types do not have type-specific arguments
+(e.g. <code>ev_prepare</code>) you still need to call its <code>set</code> macro.</p>
+ </dd>
+ <dt><code>ev_TYPE_init</code> (ev_TYPE *watcher, callback, [args])</dt>
+ <dd>
+ <p>This convinience macro rolls both <code>ev_init</code> and <code>ev_TYPE_set</code> macro
+calls into a single call. This is the most convinient method to initialise
+a watcher. The same limitations apply, of course.</p>
+ </dd>
+ <dt><code>ev_TYPE_start</code> (loop *, ev_TYPE *watcher)</dt>
+ <dd>
+ <p>Starts (activates) the given watcher. Only active watchers will receive
+events. If the watcher is already active nothing will happen.</p>
+ </dd>
+ <dt><code>ev_TYPE_stop</code> (loop *, ev_TYPE *watcher)</dt>
+ <dd>
+ <p>Stops the given watcher again (if active) and clears the pending
+status. It is possible that stopped watchers are pending (for example,
+non-repeating timers are being stopped when they become pending), but
+<code>ev_TYPE_stop</code> ensures that the watcher is neither active nor pending. If
+you want to free or reuse the memory used by the watcher it is therefore a
+good idea to always call its <code>ev_TYPE_stop</code> function.</p>
+ </dd>
+ <dt>bool ev_is_active (ev_TYPE *watcher)</dt>
+ <dd>
+ <p>Returns a true value iff the watcher is active (i.e. it has been started
+and not yet been stopped). As long as a watcher is active you must not modify
+it.</p>
+ </dd>
+ <dt>bool ev_is_pending (ev_TYPE *watcher)</dt>
+ <dd>
+ <p>Returns a true value iff the watcher is pending, (i.e. it has outstanding
+events but its callback has not yet been invoked). As long as a watcher
+is pending (but not active) you must not call an init function on it (but
+<code>ev_TYPE_set</code> is safe) and you must make sure the watcher is available to
+libev (e.g. you cnanot <code>free ()</code> it).</p>
+ </dd>
+ <dt>callback = ev_cb (ev_TYPE *watcher)</dt>
+ <dd>
+ <p>Returns the callback currently set on the watcher.</p>
+ </dd>
+ <dt>ev_cb_set (ev_TYPE *watcher, callback)</dt>
+ <dd>
+ <p>Change the callback. You can change the callback at virtually any time
+(modulo threads).</p>
+ </dd>
+</dl>
+
+
+
+
+