Combining GTK_MAIN_LOOP with another event loop

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

 



I have implemented a separate networking application with libevent and also a GTK Gui. I'm struggling to understand how to integrate the event loops of the two technologies. When my clients connect to the server the server will return a list of entries to be added to a gtkliststore on the client end. What I need to know is how to combine both a libevent event loop,i.e. event_base_loop(base, 0); , with a gtk loop, gtk_main() so that I'm watching events from both technologies.  All attempts I've made thus far tax the cpu:
/*Bad CODE*/
while(1) {
   gtk_main_iteration_do (FALSE);
   event_base_loop(base, 1);
}
_______________________________________________
gtk-list mailing list
gtk-list@xxxxxxxxx
http://mail.gnome.org/mailman/listinfo/gtk-list

[Index of Archives]     [Touch Screen Library]     [GIMP Users]     [Gnome]     [KDE]     [Yosemite News]     [Steve's Art]

  Powered by Linux