Re: GTK listening to files descriptors




Hugo Varotto <hvarotto@cs.pitt.edu> writes:

> If I don't remmeber bad, in Motif there was a way to attach a file
> descriptor or similar to a callback, so "if there's data in this fd,
> call this function()".
> 
> Is it posible to do something similar in GTK ? This way, I'll retain the
> interactive part of the fron-tend.  I haven't yet looked at all the
> documentation so it's possible that there's a function that I'm missing.

  gdk_input_add ()

(Or if you want a somewhat more full-featured interface, you can
 now directly use the glib main loop stuff and use g_io_add_watch())

Regards,
                                        Owen



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