Re: gthreads and file operations



Nischal Rao wrote:
is there any way to listen to signals without calling gtk_main() (which
never returns) ? If so, then i ll be able to get rid of
threads(happily!!).... I am new to glib threads and gnome signals.. i
have just been following examples that i found on the net.

What kind of signals?
If they are file/socket events, use g_io_add_watch() to do so:
http://library.gnome.org/devel/glib/stable/glib-IO-Channels.html

the gtk mainloop will then call your callback whenever data is available.

regards,
        Olivier



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