Re: multiple bonobo controls from one executable



sön 2002-03-03 klockan 02.08 skrev Jorn Baayen:
> Hi,
> 
> Hadess and me are writing a bonobo component which wraps gstreamer. This component
> has a stream interface, with basic stuff like loading files, playing, stopping, pausing
> etc. But, we will need to add two controls at some point - a video widget, for
> video playback, and a vumeter widget. We cannot use multiple executables since
> they all need the same GStreamer pipeline. So we wondered whether it is possible
> to have multiple controls in one component, or at least in the same executable?
> 
> If not we'll probably have to de-bonoboize it and move it directly into our
> app.
Sure.

Just create a factory with multiple components, your .server file should
look something like this:

<oaf_server iid="OAFIID:FooFactory" ...>
   ...
</oaf_server>

<oaf_server iid="OAFIID:FooComponent"
            location="OAFIID:FooFactory" ...>
  ...
</oaf_server>

...

And in your source, just check what the iid in your
BonoboFactoryCallback is, and activate the right component:

foo_factory (factory, iid)
{
    if iid == OAFIID:FooComponent
       Create component 1
    else if iid == OAFIID:FooComponentN
       Create component n

}
                          

> 
> Cheers
> Jorn
> _______________________________________________
> desktop-devel-list mailing list
> desktop-devel-list gnome org
> http://mail.gnome.org/mailman/listinfo/desktop-devel-list





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