| Bonobo API Reference Manual | |||
|---|---|---|---|
| <<< Previous Page | Home | Up | Next Page >>> |
struct BonoboClientSite; typedef BonoboClientSiteClass; |
"show-window" void user_function ( |
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
The
Example 1. Sample usage
This demostrates the use of the
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);
}
|
typedef struct {
BonoboXObjectClass parent_class;
POA_Bonobo_ClientSite__epv epv;
void (*show_window) (BonoboClientSite *, CORBA_boolean shown);
void (*queue_resize) (BonoboClientSite *);
void (*save_object) (BonoboClientSite *, Bonobo_Persist_Status *status);
} BonoboClientSiteClass; |
|
Container programs should provide a BonoboClientSite GTK object (ie, a Bonobo::ClientSite CORBA server) for each Embeddable which they embed. This is the contact end point for the remote Bonobo::Embeddable object.
This routine creates a new BonoboClientSite.
| container : | The container to which this client_site belongs. |
| Returns : | The activated BonoboClientSite object bound to the container container. |
|
This initializes an object of type BonoboClientSite. See the description for bonobo_client_site_new() for more details.
| client_site : | The BonoboClientSite object to initialize |
| container : | a BonoboContainer to bind to. |
| Returns : | the constructed BonoboClientSite client_site. |
|
This routine binds a remote Embeddable object to a local BonoboClientSite object. The idea is that there is always a one-to-one mapping between BonoboClientSites and BonoboEmbeddables. The Embeddable uses its BonoboClientSite to communicate with the container in which it is embedded.
| client_site : | the client site to which the remote Embeddable object will be bound. |
| object : | The remote object which supports the Bonobo::Embeddable interface. |
| Returns : | TRUE if object was successfully bound to client_site client_site. |
BonoboObjectClient* bonobo_client_site_get_embeddable ( |
| client_site : | A BonoboClientSite object which is bound to a remote BonoboObject server. |
| Returns : | The BonoboObjectClient object which corresponds to the remote BonoboObject to which client_site is bound. |
BonoboItemContainer* bonobo_client_site_get_container ( |
| client_site : | A BonoboClientSite object which is bound to a remote BonoboObject server. |
| Returns : | The BonoboObjectClient object which corresponds to the remote BonoboObject to which client_site is bound. |
|
Creates a ViewFrame and asks the remote server_object (which must support the Bonobo::Embeddable interface) to provide a new view of its data. The remote server_object will construct a BonoboView object which corresponds to the new BonoboViewFrame returned by this function.
| client_site : | the client site that contains a remote Embeddable object. |
| uic : | The CORBA object for the container's UIContainer server. |
| visible_cover : | TRUE if the cover should draw a border when it is active. |
| active_view : | TRUE if the view should be uncovered when it is created. |
| Returns : | A BonoboViewFrame object that contains the view frame for the new view of server_object. |
|
The same as bonobo_client_site_new_view_full() with an inactive, visible cover.
| client_site : | the client site that contains a remote Embeddable object. |
| uic : | The UIContainer object. |
| Returns : | A BonoboViewFrame object that contains the view frame for the new view of server_object. |
|
| client_site : | The client site that contains a remote Embeddable object |
| uic : | The UI container for the item. |
| group : | The Canvas group that will be the parent for the new item. |
| Returns : | A GnomeCanvasItem that wraps the remote Canvas Item. |
|
| client_site : | |
| Returns : |
|
void user_function ( |
| bonoboclientsite : | the object which received the signal. |
| arg1 : | |
| user_data : | user data set when the signal handler was connected. |
void user_function ( |
| bonoboclientsite : | the object which received the signal. |
| arg1 : | |
| user_data : | user data set when the signal handler was connected. |