Blame | 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_glib_new(), oop_glib_delete(), oop_glib_return()</title>
<link rel="stylesheet" type="text/css" href="style.css">
</head><body>
<h2>oop_glib_new(), oop_glib_delete(), oop_glib_return()</h2>
<pre>
#include <oop.h>
#include <glib.h>
#include <oop-glib.h>
oop_source *oop_glib_new();
void oop_glib_delete();
void *oop_glib_return();
</pre>
<h3>Description.</h3>
<dl>
<dt><b>oop_glib_new</b>
<dd>Create a liboop source which uses the
<a href="http://www.gtk.org/rdp/glib/glib-the-main-event-loop.html">GLib
Main Event Loop</a> for events. There is only one such event loop (the
GMainLoop structure really represents a loop context, not a fully independent
event loop), so this function is global. You may call it multiple times; it
will return the same event source, but keep count of the number of users.<p>
Events will be dispatched when the GLib event loop is run, either directly
via g_main_run() or indirectly via gtk_main().<p>
<dt><b>oop_glib_delete</b>
<dd>Delete the liboop source created with oop_glib_new(). This decrements the
count of users; when oop_glib_delete has been called as many times as
oop_glib_new, the event source is removed.<p>
<dt><b>oop_glib_return</b>
<dd>Since the event source is run by GLib, the main program has no direct way
of retrieving a value returned by an event handler. Instead, when the loop is
terminated, the GLib event loop should return, and the caller can use this
function to request the specific termination code.<p>
This function isn't commonly used. <b>Furthermore, GLib event loop termination
does not currently work.</b> In other words, ignore this for now.
</dl>
<hr><a href="ref">liboop reference</a></body></html>