Re: Bonobo Unique Application
- From: Alexander Larsson <alexl redhat com>
- To: "Gustavo J. A. M. Carneiro" <gjc inescporto pt>
- Cc: gnome-components-list gnome org, Michael Meeks <michael ximian com>, Mark McLoughlin <mark skynet ie>
- Subject: Re: Bonobo Unique Application
- Date: Fri, 11 Apr 2003 08:09:44 -0400 (EDT)
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
alexl redhat com alla lysator liu se
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!
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]