Name
BonoboClientSite -- Container side object embedding server.
Description
The BonoboClientSite implements the
Bonobo::ClientSite CORBA interface. It acts
as the container-side contact for
BonoboEmbeddable objects.
For each object embedded in your application, you should create a
BonoboClientSite object.
Once you have a handle on a remote object that implements the
Bonobo::Embeddable interface (typically
returned by bonobo_object_activate() or
bonobo_get_object() or wrapper with
bonobo_object_client_from_corba()) of type
BonoboObjectClient), you will have to bind
this object to the BonoboClientSite using the
bonobo_client_site_bind_embeddable(). Once this is done, you will
be able to request a BonoboView on the BonoboClientSite.
The BonoboClientSite object also provides access to the remote
BonoboEmbeddable object's verb list.
Example 1. Sample usage
This demostrates the use of the BonoboClientSite object. This
launches the object specified, creates a BonoboClientSite,
then requests a new BonoboViewFrame and finally it returns the
widget that represents that component.
GtkWidget *
create_widget_from_component (BonoboContainer *container, const char *id)
{
BonoboObjectClient *server;
BonoboClientSite *client_site;
BonoboViewFrame *view_frame;
/*
* Launch the requested component
*/
server = bonobo_object_activate (id, 0);
if (!server){
printf ("Could not activate the server");
return NULL;
}
client_site = bonobo_client_site_new (app->container);
/*
* Add this client site to the container
*/
bonobo_container_add (container, BONOBO_OBJECT (client_site));
/*
* Bind the component to the client site
*/
bonobo_client_site_bind_embeddable (client_site, server);
/*
* Create a new BonoboView, and then get a GtkWidget
*/
view_frame = bonobo_client_site_embeddable_new_view (client_site);
/*
* Get the widget for this view.
*/
return bonobo_view_frame_get_wrapper (view_frame);
}
|
Details
BONOBO_CLIENT_SITE_TYPE
#define BONOBO_CLIENT_SITE_TYPE (bonobo_client_site_get_type ()) |
Returns the GtkType associated with the
BonoboClientSite object.
BONOBO_CLIENT_SITE()
#define BONOBO_CLIENT_SITE(o) (GTK_CHECK_CAST ((o), BONOBO_CLIENT_SITE_TYPE, BonoboClientSite)) |
BONOBO_CLIENT_SITE_CLASS()
#define BONOBO_CLIENT_SITE_CLASS(k) (GTK_CHECK_CLASS_CAST((k), BONOBO_CLIENT_SITE_TYPE, BonoboClientSiteClass)) |
BONOBO_IS_CLIENT_SITE()
#define BONOBO_IS_CLIENT_SITE(o) (GTK_CHECK_TYPE ((o), BONOBO_CLIENT_SITE_TYPE)) |
BONOBO_IS_CLIENT_SITE_CLASS()
#define BONOBO_IS_CLIENT_SITE_CLASS(k) (GTK_CHECK_CLASS_TYPE ((k), BONOBO_CLIENT_SITE_TYPE)) |
BonoboClientSiteClass
typedef struct {
BonoboObjectClass parent_class;
void (*show_window) (BonoboClientSite *, CORBA_boolean shown);
void (*queue_resize) (BonoboClientSite *);
void (*save_object) (BonoboClientSite *, Bonobo_Persist_Status *status);
} BonoboClientSiteClass; |
bonobo_client_site_corba_object_create ()
Bonobo_ClientSite bonobo_client_site_corba_object_create
(BonoboObject *object); |
bonobo_client_site_new ()
bonobo_client_site_construct ()
BonoboClientSite* bonobo_client_site_construct
(BonoboClientSite *client_site,
Bonobo_ClientSite corba_client_site,
BonoboItemContainer *container); |
bonobo_client_site_bind_embeddable ()
gboolean bonobo_client_site_bind_embeddable
(BonoboClientSite *client_site,
BonoboObjectClient *object); |
bonobo_client_site_get_embeddable ()
bonobo_client_site_get_container ()
bonobo_client_site_new_view_full ()
BonoboViewFrame* bonobo_client_site_new_view_full
(BonoboClientSite *client_site,
Bonobo_UIContainer uih,
gboolean visible_cover,
gboolean active_view); |
bonobo_client_site_new_view ()
BonoboViewFrame* bonobo_client_site_new_view
(BonoboClientSite *client_site,
Bonobo_UIContainer uih); |
bonobo_client_site_new_item ()
GnomeCanvasItem* bonobo_client_site_new_item
(BonoboClientSite *client_site,
GnomeCanvasGroup *group); |
bonobo_client_site_get_verbs ()
GList* bonobo_client_site_get_verbs (BonoboClientSite *client_site); |
bonobo_client_site_free_verbs ()
void bonobo_client_site_free_verbs (GList *verb_list); |
bonobo_client_site_get_epv ()
POA_Bonobo_ClientSite__epv* bonobo_client_site_get_epv
(void); |