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">GLibMain Event Loop</a> for events. There is only one such event loop (theGMainLoop structure really represents a loop context, not a fully independentevent loop), so this function is global. You may call it multiple times; itwill 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 directlyvia 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 thecount of users; when oop_glib_delete has been called as many times asoop_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 wayof retrieving a value returned by an event handler. Instead, when the loop isterminated, the GLib event loop should return, and the caller can use thisfunction to request the specific termination code.<p>This function isn't commonly used. <b>Furthermore, GLib event loop terminationdoes not currently work.</b> In other words, ignore this for now.</dl><hr><a href="ref">liboop reference</a></body></html>