Re: External event loop for glib?

Actually, it's rather easy to tie glib into an existing event-loop

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)

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 '' server are not actually up to date,
  if you do cvs update using the you sometimes get
  rather old sources, and sometimes the new sources. 

  I have currently hard coded the server to in my
  /etc/hosts. gives versions of glib and gtk from 990210, 12 days
  old code.

Per Hedbor                                    

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]