Re: Bonobo Unique Application
- From: "Gustavo J. A. M. " Carneiro <gjc inescporto pt>
- To: Alexander Larsson <alexl redhat com>
- Cc: gnome-components-list gnome org, Michael Meeks <michael ximian com>, Mark McLoughlin <mark skynet ie>
- Subject: Re: Bonobo Unique Application
- Date: 11 Apr 2003 16:24:32 +0100
On Sex, 2003-04-11 at 13:09, Alexander Larsson wrote:
> On 9 Apr 2003, Gustavo J. A. M. Carneiro wrote:
>
> > The following patches implement "Unique Application" (TM) in
> > libbonobo. It is an attempt to automate/simplify the code that ensures
> > that only one application instance is running per display[1], as seen in
> > galeon and gnome-terminal, for example.
> >
> > Summary of bonobo-activation changes:
> > - There is a special flag in
> > Bonobo::ObjectDirectory::register_new to make it possible to
> > register a server without a corresponding .server file;
> > - Bonobo::ObjectDirectory::register_new also returns the
> > existing object, in case one has been registered earlier.
> >
> > Summary of libbonobo changes:
> > - A Bonobo::Application interface and BonoboApplication
> > implementation, which represents the unique application server.
> > - A BonoboAppClient which can send messages to the
> > Bonobo::Application. The relevant interface method is:
> >
> > + interface Application : Bonobo::Unknown {
> > + typedef sequence<any> ArgList;
> > + // Send a message to the application
> > + any message (in string msg, in ArgList args);
> > +
> > + };
> >
> > So, you can send any message you like. There is an application
> > API for sending messages, eg.
> >
> > retval = bonobo_app_client_msg_send (client, "msg",
> > G_TYPE_FLOAT, 1.0,
> > G_TYPE_INT, 2,
> > G_TYPE_NONE);
> > (retval is a GValue, the return value for the message)
> >
> > For receiving messages, connect the signal "message" on the
> > BonoboApplication object:
>
> You need to queue the signal emission in an idle, or you'll create lots of
> reentrancy bugs.
Reentrancy doesn't cause bugs in the library code, as far as I can
see. It could cause bugs in the application code, of course, in which
case the application programmer is responsible for them.
Do you still think I should queue the signal emission, to protect the
application programmer? I'm not completely convinced that I should, but
if you insist, I'm not completely against it either. :)
Thanks for your comment.
--
Gustavo Joćo Alves Marques Carneiro
<gjc inescporto pt> <gustavo users sourceforge net>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]