Rev 3 | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
3 | magnus | 1 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> |
2 | <html><head> |
||
3 | <title>liboop: oop_sys_new(), oop_sys_delete()</title> |
||
4 | <link rel="stylesheet" type="text/css" href="style.css"> |
||
5 | </head><body> |
||
6 | |||
7 | <h2>oop_sys_new(), oop_sys_delete()</h2> |
||
8 | |||
9 | <pre> |
||
10 | #include <oop.h> |
||
11 | |||
12 | /* <em>Create and destroy a system event source.</em> */ |
||
13 | oop_source_sys *oop_sys_new(void); |
||
14 | void oop_sys_delete(oop_source_sys *sys); |
||
15 | </pre> |
||
16 | |||
17 | <h3>Arguments.</h3> |
||
18 | |||
19 | <dl> |
||
20 | <dt><b>oop_source_sys *sys</b> |
||
21 | <dd>The event source to deallocate and destroy. |
||
22 | </dl> |
||
23 | |||
24 | <h3>Description.</h3> |
||
25 | |||
26 | <dl> |
||
27 | <dt><b>oop_sys_new</b> |
||
28 | <dd>Create a new system event source. The system event source implements the |
||
29 | event source interface and manages a select() loop. Once the system event |
||
12 | magnus | 30 | source is created, use <a href="oop_sys_source.html">oop_sys_source()</a> to |
3 | magnus | 31 | access the event source interface (which lets you register event sinks), and |
12 | magnus | 32 | <a href="oop_sys_run.html">oop_sys_run()</a> or |
33 | <a href="oop_sys_run.html">oop_sys_run_once()</a> to actually process events. |
||
3 | magnus | 34 | More than one system event source can exist, though it is rarely useful to do |
35 | so (since only one may be active at a time).<p> |
||
36 | |||
37 | If a malloc failure occurs creating the system event source, NULL is returned. |
||
38 | It is up to the caller to handle this failure.<p> |
||
39 | |||
40 | <dt><b>oop_sys_delete</b> |
||
41 | <dd>Destroy the system event source <em>sys</em>. This frees all resources |
||
42 | associated with the event source. The source cannot have any active callbacks |
||
43 | (event sinks) associated with it.<p> |
||
44 | </dl> |
||
45 | |||
12 | magnus | 46 | <hr><a href="ref.html">liboop reference</a></body></html> |