Re: [gtk-list] Re: gtk_main() and foreign event loops



On Wed, 26 Jan 2000 12:25:05 +0300 (MSK), Alexander Taranov wrote:
> Owen Taylor writes:
>  > Alexander Taranov <tay@jet.msk.su> writes:
>  > > I want to use GTK in CORBA based server (Orbix or ORBACUS)
>  > > Both ORB's have a mechanism to incorporte
>  > > Xt event loop. 

[snip]

>  > That is, in some way, the ORB has a call to register a function
>  > to watch a file descriptor, and then you can implement
>  > that function in terms of g_io_add_watch().
> 
> Yes, both Orbix & ORBACUS have a feature to add fd to watch.
> But I'm pretty new to GTK. what is g_io_add_watch() ? of what
> fd's shoud i whatch??

g_io_add_watch() allows you to watch the status of certain fd's. Here is
some documentation:

  http://developer.gnome.org/doc/API/glib/glib-io-channels.html

(looks to me like the underlying mechanism for gdk_input_add())

Now if Orbix/ORBACUS is able to tell which socket they're using to listen
to incoming requests, you could set a watch on that socket. So if you add
a watch on the condition G_IO_IN, your function will be called as soon as
there is incoming data available. In your function you just process a
couple of steps of the Orbix/ORBACUS event loop.


Erik

-- 
J.A.K. (Erik) Mouw, Information and Communication Theory Group, Department
of Electrical Engineering, Faculty of Information Technology and Systems,
Delft University of Technology, PO BOX 5031,  2600 GA Delft, The Netherlands
Phone: +31-15-2785859  Fax: +31-15-2781843  Email J.A.K.Mouw@its.tudelft.nl
WWW: http://www-ict.its.tudelft.nl/~erik/





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