Subversion Repositories

?revision_form?Rev ?revision_input??revision_submit??revision_endform?

Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | RSS feed

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html><head>
<title>liboop: oop_sys_new(), oop_sys_delete()</title>
<link rel="stylesheet" type="text/css" href="style.css">
</head><body>

<h2>oop_sys_new(), oop_sys_delete()</h2>

<pre>
#include &lt;oop.h&gt;

/* <em>Create and destroy a system event source.</em> */
oop_source_sys *oop_sys_new(void);
void oop_sys_delete(oop_source_sys *sys);
</pre>

<h3>Arguments.</h3>

<dl>
<dt><b>oop_source_sys *sys</b>
<dd>The event source to deallocate and destroy.
</dl>

<h3>Description.</h3>

<dl>
<dt><b>oop_sys_new</b>
<dd>Create a new system event source.  The system event source implements the
event source interface and manages a select() loop.  Once the system event
source is created, use <a href="oop_sys_source">oop_sys_source()</a> to
access the event source interface (which lets you register event sinks), and
<a href="oop_sys_run">oop_sys_run()</a> or
<a href="oop_sys_run">oop_sys_run_once()</a> to actually process events.
More than one system event source can exist, though it is rarely useful to do
so (since only one may be active at a time).<p>

If a malloc failure occurs creating the system event source, NULL is returned.
It is up to the caller to handle this failure.<p>

<dt><b>oop_sys_delete</b>
<dd>Destroy the system event source <em>sys</em>.  This frees all resources
associated with the event source.  The source cannot have any active callbacks
(event sinks) associated with it.<p>
</dl>

<hr><a href="ref">liboop reference</a></body></html>