Re: External event loop for glib?
- From: Per Hedbor <per idonex se>
- To: gtk-devel-list redhat com
- Subject: Re: External event loop for glib?
- Date: 23 Mar 1999 15:40:16 +0100
Actually, it's rather easy to tie glib into an existing event-loop
already.
My only problem right now is the NT version. I guess I'll have to code
something that uses threads for that.
This code is from the pike GTK module (Unix code), similar code should
work with your own back-end:
static void backend_callback()
{
while(g_main_iteration( 0 ));
}
void socket_ready_callback(int fd, void *f)
{
g_main_iteration(1);
}
void init_gtk_backend_callbacks()
{
add_backend_callback( backend_callback, 0, 0);
set_read_callback( ConnectionNumber(GDK_DISPLAY())
socket_ready_callback, NULL );
}
Now for something totally different:
Some of the 'anoncvs.gnome.org' server are not actually up to date,
if you do cvs update using the anoncvs.gnome.org you sometimes get
rather old sources, and sometimes the new sources.
I have currently hard coded the server to 130.239.18.155 in my
/etc/hosts.
130.239.18.151 gives versions of glib and gtk from 990210, 12 days
old code.
--
Per Hedbor http://per.hedbor.org/
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]