Re: Bonobo Unique Application

Alexander Larsson <[email protected]>
Newsgroups gmane.comp.gnome.components
Message-ID <Pine.LNX.4.44.0304110808110.30054-100000@devserv.devel.redhat.com>
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.

-- 
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
 Alexander Larsson                                            Red Hat, Inc 
                   [email protected]    [email protected] 
He's an obese gay matador living undercover at Ringling Bros. Circus. She's a 
hard-bitten cigar-chomping college professor with the power to bend men's 
minds. They fight crime!
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.