[gtkmm] 2 mainloops in 2 different threads?



Hi everyone!

Is it possible to have 2 different Glib::MainLoops in 2 different threads?
I think, that this should be possible with glib, but I am not so sure
about glibmm. I may be mistaken, but I assume, that the static
member functions in some of the glibmm mainloop classes will not like this
setup. Is this correct?

The other thing I am not so sure about is the relationship between the
gtkmm mainloop and the glibmm mainloop. In gtk+ it is possible to
substitute a call to gtk_main() with the glib mainloop. The mainloops in
gtkmm and glibmm wrap the C mainloops in gtk+ and glib. Is it also
possible to do such a substitution in this case? (general idea (may not be
the best): calling Glib::MainLoop::run() when the main loop is a
Gtk::Main) I am trying to write a library, that needs to recursivly call
the mainloop to wait for certain hardware events and should work with and
without gtk.

	thanks al lot!


		Stephan Puchegger









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