The interfaces

GNOME::EmbeddableFactory

The main interface for components is GNOME::Embeddable. Objects implementing it should be created with a GNOME::EmbeddableFactory, which is a factory for Embeddable objects. Such a factory should be declared with the standard .gnorba files we studied in chapter 5.

module GNOME {

  typedef sequence<string> stringlist;

  interface GenericFactory {
    exception CannotActivate { };
    boolean supports(in string obj_goad_id);

    Object create_object(in string goad_id, in stringlist params)
           raises(CannotActivate);
  };

  interface EmbeddableFactory : GNOME::GenericFactory {
    Embeddable create_path (in string path);
  };
};

GNOME::Embeddable

Here is the GNOME::embeddable interface:

module GNOME {
  interface Embeddable : GNOME::Unknown {

    void set_client_site (in ClientSite client_site);

    ClientSite get_client_site ();

    void set_host_name (in string name, in string appname);

    void set_uri (in string uri);

    exception UserCancelledSave {};
    enum CloseMode {
      SAVE_IF_DIRTY,
      NO_SAVE,
      PROMPT_SAVE
    };
    void close (in CloseMode mode)
          raises (UserCancelledSave);

    struct GnomeVerb {
      string name;
      string label;
      string hint;
    };
    typedef sequence<GnomeVerb> verb_list;
    verb_list get_verb_list ();

    void advise (in AdviseSink advise);

    void unadvise ();

    long get_misc_status (in long type);

    exception MultiViewNotSupported {};
    View new_view (in ViewFrame frame) 
         raises (MultiViewNotSupported);
  };
};

This interface is a big, but fortunately easily understandable.

GNOME::View

Here is this famous GNOME::View interface.

module GNOME {

  interface View : GNOME::Unknown {

    void size_allocate (in short width, in short height);

    void size_query (out short desired_width, out short desired_height);

    typedef unsigned long windowid;
    void set_window (in windowid id);

    void activate (in boolean activated);

    void reactivate_and_undo ();

    void do_verb (in string verb_name);
  
    void set_zoom_factor (in double zoom);
  };
};