EOG moniker stuff



Hi Miguel,

maybe you can help me a bit with some moniker stuff in
the EOG component.

Currently, the component implements the following interfaces:

        GNOME::EOG::Image

                This is the "model" and contains the image data, it
                supports the Persist interface to load/save stuff.

                It'll also have some parameters such as jpeg_quality etc.

        Bonobo::Control and Bonobo::Embeddable

                I want to do some "image caching" here - so you'll have a
                "read-only" parameter and when you open an image read-only
                it'll first look whether there is already a GNOME::EOG::Image
                with that image before it creates a new one.

So, what I want to have is a way to get a stringified representation of a
GNOME::EOG::Image and a way to use this stringified representation to get
back a Control/Embeddable which uses that GNOME::EOG::Image.

Currently, I have the following:

  Moniker                       resolve to              And I get

  file:myimage.jpg              GNOME::EOG::Image       GNOME::EOG::Image with
                                                        that image loaded in it
  file:myimage.jpg!control      Bonobo::Control         Control with that image
  file:myimage.jpg!embeddable   Bonobo::Embeddable      same for Embeddable

This is one in eog_image_get_object() (the "get_object" handler of the
GNOME::EOG::Image's BonoboItemContainer).

Is this correct this way or is there a better way to implement it ?

Ideally, I'd like to have some "moniker" or whatever of a GNOME::EOG::Image
(so something like `file:myimage.jpg#gnome-eog' which I can resolve to
GNOME::EOG::Image, Bonobo::Control and Bonobo::Embeddable and I'll get the
right thing.

Is something like this possible ?

-- 
Martin Baulig
martin gnome org (private)
baulig suse de (work)




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