Re: integrating CORBA services from a GTK_MODULE



>Date: Mon, 13 Aug 2001 14:35:12 -0400 (EDT)
>From: Michael Meeks <michael ximian com>
>To: Bill Haneman <bill haneman sun com>
>cc: <gnome-components-list gnome org>
>Subject: Re: integrating CORBA services from a GTK_MODULE
>
>
>Hi Bill,
>
>On Mon, 13 Aug 2001, Bill Haneman wrote:
>> So far so good... except that the registration call really should
>> initiate a callback, and at the moment the GTK_MODULE does not
>> initiate a CORBA event loop.  What I'd like to do is somehow hook into
>> g_main/gtk_main so that when the main event loop is started by the
>> target program, the CORBA event loop is integrated with it (in the
>> manner of bonobo_main()).
>
>        I don't quite understand what you want. All CORBA calls currently
>listen in two mainloops - and if you are in either you process calls. All
>are added by default to the global g_mainloop which Gtk+ also uses to
>handle X requests. If you are inside a CORBA method, then you use the
>linc_mainloop to stop X / timeouts re-entering during the CORBA method.

OK, I admittedly do not understand the above paragraph.  But my experience is 
that in order to be a CORBA server you must either start the CORBA event loop 
via one of the CORBA_* calls, or by calling one of the calls that starts the 
GTK event loop with integrated CORBA support, for instance bonobo_main().

But in my case I cannot call bonobo_main() (at least not directly) since my 
code is inside a gtk_module_init() call.  The code I am writing must return 
control to GTK.

If the GTK application that has loaded my code as a GTK_MODULE calls the 
regular gtk_main() loop, it does not service incoming CORBA requests.  But I 
cannot modify the application since this is an optional module.

At the moment I am working around this by calling "bonobo_main()" inside the 
method which is passed to the g_idle_add() call - which works, but seems 
somehow wrong.

Do you understand my goal a bit better now?

It is complicated a bit by the fact that the "register_application" call which 
precedes my call to bonobo_main() results in a callback.  At the moment I am 
coping with this by making register_application() a oneway method, but this is 
not really correct.  So perhaps I need a second g_idle_add() call inside the 
method passed to my first g_idle_add()...

-Bill

>        If you are writing your own mainloop, then probably you want to
>iterate the linc_mainloop occasionaly to ensure that CORBA things are
>processed.
>
>        I hope that helps, but I still don't understand the question.
>
>        Regards,
>
>                Michael.
>
>-- 
> mmeeks gnu org  <><, Pseudo Engineer, itinerant idiot
>

------
Bill Haneman x19279
Gnome Accessibility / Batik SVG Toolkit
Sun Microsystems Ireland 





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