Details | 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_glib_new(), oop_glib_delete(), oop_glib_return()</title> |
||
4 | <link rel="stylesheet" type="text/css" href="style.css"> |
||
5 | </head><body> |
||
6 | |||
7 | <h2>oop_glib_new(), oop_glib_delete(), oop_glib_return()</h2> |
||
8 | |||
9 | <pre> |
||
10 | #include <oop.h> |
||
11 | #include <glib.h> |
||
12 | #include <oop-glib.h> |
||
13 | |||
14 | oop_source *oop_glib_new(); |
||
15 | void oop_glib_delete(); |
||
16 | void *oop_glib_return(); |
||
17 | </pre> |
||
18 | |||
19 | <h3>Description.</h3> |
||
20 | |||
21 | <dl> |
||
22 | <dt><b>oop_glib_new</b> |
||
23 | <dd>Create a liboop source which uses the |
||
24 | <a href="http://www.gtk.org/rdp/glib/glib-the-main-event-loop.html">GLib |
||
25 | Main Event Loop</a> for events. There is only one such event loop (the |
||
26 | GMainLoop structure really represents a loop context, not a fully independent |
||
27 | event loop), so this function is global. You may call it multiple times; it |
||
28 | will return the same event source, but keep count of the number of users.<p> |
||
29 | |||
30 | Events will be dispatched when the GLib event loop is run, either directly |
||
31 | via g_main_run() or indirectly via gtk_main().<p> |
||
32 | |||
33 | <dt><b>oop_glib_delete</b> |
||
34 | <dd>Delete the liboop source created with oop_glib_new(). This decrements the |
||
35 | count of users; when oop_glib_delete has been called as many times as |
||
36 | oop_glib_new, the event source is removed.<p> |
||
37 | |||
38 | <dt><b>oop_glib_return</b> |
||
39 | <dd>Since the event source is run by GLib, the main program has no direct way |
||
40 | of retrieving a value returned by an event handler. Instead, when the loop is |
||
41 | terminated, the GLib event loop should return, and the caller can use this |
||
42 | function to request the specific termination code.<p> |
||
43 | |||
44 | This function isn't commonly used. <b>Furthermore, GLib event loop termination |
||
45 | does not currently work.</b> In other words, ignore this for now. |
||
46 | </dl> |
||
47 | |||
48 | <hr><a href="ref">liboop reference</a></body></html> |