BonoboImageFactory (was Re: Bonobo UI stuff)
- From: Martin Baulig <martin home-of-linux org>
- To: Michael Meeks <michael ximian com>
- Cc: Sander Vesik <Sander Vesik Sun COM>, Seth Nickell <snickell stanford edu>, gnome-components-list gnome org
- Subject: BonoboImageFactory (was Re: Bonobo UI stuff)
- Date: 13 Jul 2001 11:57:50 +0200
Michael Meeks <michael ximian com> writes:
> I think now that the general public understand the issue - they
> might share my lack of abhorence for images being stringified for
> transport and internal storage. I really don't think the API is that
> broken currently.
>
> Furthermore, the image transport is one of the slower parts of the
> UI handler, and it currently involves no round trips. If we start
> introducing stream IO / bi-directional CORBA comms simply to load a
> single small image - I suspect we will achieve over design and
> extraordinary application paralysis in double quick time.
>
> Thus I think while the factory solution was the best suggestion
> made, and has a 'correct' design in a way that mangling URLs into the
> stream doesn't - I don't think it is either neccessary or useful.
Hi Michael,
well, basically we already have something like it - GtkImageFactory - but
this doesn't work with Bonobo. I think we can also integrate this image
factory nicely with the GtkImageFactory and the stock system.
Currently, we already have `pixtype="stock"' - but we need to serialize all
the stock images and send them over the wire since GtkStock/GtkImageFactory
is local to the current component ([1]).
We don't really need a highly sophisticated API for the image factory;
something like the following should be enough:
typedef sequence<octet> ImageData;
typedef struct {
string name;
ImageData data;
} Image;
typedef sequence<Image> ImageSet;
interface ImageFactory {
ImageSet getImages ();
/* maybe, but not really required: */
boolean hasImage (in string name);
Image getImage (in string name);
};
This can be hydrated with a Bonobo::EventSource to get notifications on
changes, but not really necessary; normally you set up your GtkIconFactory
only once.
I think we should implement this in a way that BonoboImageFactory is just
a wrapper around GtkIconFactory ([2]- so that we can register the image
factory as a GtkIconFactory in the container and then reference images in
the XML like "normal" GTK stock icons.
How does this sound ?
[1] If we aren't doing this yet, then I'd call this a bug - you can for
instance register your own GtkImageFactory in your component - and the
container won't know anything about your image unless it's in-proc.
[2] Hmm, maybe we need to add the size/state stuff as well.
--
Martin Baulig
martin gnome org (private)
baulig suse de (work)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]