BonoboClientSite

Name

BonoboClientSite -- Container side object embedding server.

Synopsis



#define     BONOBO_CLIENT_SITE_TYPE
#define     BONOBO_CLIENT_SITE              (o)
#define     BONOBO_CLIENT_SITE_CLASS        (k)
#define     BONOBO_IS_CLIENT_SITE           (o)
#define     BONOBO_IS_CLIENT_SITE_CLASS     (k)
struct      BonoboClientSite;
typedef     BonoboClientSiteClass;
Bonobo_ClientSite bonobo_client_site_corba_object_create
                                            (BonoboObject *object);
BonoboClientSite* bonobo_client_site_new    (BonoboItemContainer *container);
BonoboClientSite* bonobo_client_site_construct
                                            (BonoboClientSite *client_site,
                                             Bonobo_ClientSite corba_client_site,
                                             BonoboItemContainer *container);
gboolean    bonobo_client_site_bind_embeddable
                                            (BonoboClientSite *client_site,
                                             BonoboObjectClient *object);
BonoboObjectClient* bonobo_client_site_get_embeddable
                                            (BonoboClientSite *client_site);
BonoboItemContainer* bonobo_client_site_get_container
                                            (BonoboClientSite *client_site);
BonoboViewFrame* bonobo_client_site_new_view_full
                                            (BonoboClientSite *client_site,
                                             Bonobo_UIContainer uih,
                                             gboolean visible_cover,
                                             gboolean active_view);
BonoboViewFrame* bonobo_client_site_new_view
                                            (BonoboClientSite *client_site,
                                             Bonobo_UIContainer uih);
GnomeCanvasItem* bonobo_client_site_new_item
                                            (BonoboClientSite *client_site,
                                             GnomeCanvasGroup *group);
GList*      bonobo_client_site_get_verbs    (BonoboClientSite *client_site);
void        bonobo_client_site_free_verbs   (GList *verb_list);
POA_Bonobo_ClientSite__epv* bonobo_client_site_get_epv
                                            (void);

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))

o : 


BONOBO_CLIENT_SITE_CLASS()

#define BONOBO_CLIENT_SITE_CLASS(k)    (GTK_CHECK_CLASS_CAST((k), BONOBO_CLIENT_SITE_TYPE, BonoboClientSiteClass))

k : 


BONOBO_IS_CLIENT_SITE()

#define BONOBO_IS_CLIENT_SITE(o)       (GTK_CHECK_TYPE ((o), BONOBO_CLIENT_SITE_TYPE))

o : 


BONOBO_IS_CLIENT_SITE_CLASS()

#define BONOBO_IS_CLIENT_SITE_CLASS(k) (GTK_CHECK_CLASS_TYPE ((k), BONOBO_CLIENT_SITE_TYPE))

k : 


struct BonoboClientSite

struct BonoboClientSite;


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);

object : 
Returns : 


bonobo_client_site_new ()

BonoboClientSite* bonobo_client_site_new    (BonoboItemContainer *container);

container : 
Returns : 


bonobo_client_site_construct ()

BonoboClientSite* bonobo_client_site_construct
                                            (BonoboClientSite *client_site,
                                             Bonobo_ClientSite corba_client_site,
                                             BonoboItemContainer *container);

client_site : 
corba_client_site : 
container : 
Returns : 


bonobo_client_site_bind_embeddable ()

gboolean    bonobo_client_site_bind_embeddable
                                            (BonoboClientSite *client_site,
                                             BonoboObjectClient *object);

client_site : 
object : 
Returns : 


bonobo_client_site_get_embeddable ()

BonoboObjectClient* bonobo_client_site_get_embeddable
                                            (BonoboClientSite *client_site);

client_site : 
Returns : 


bonobo_client_site_get_container ()

BonoboItemContainer* bonobo_client_site_get_container
                                            (BonoboClientSite *client_site);

client_site : 
Returns : 


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);

client_site : 
uih : 
visible_cover : 
active_view : 
Returns : 


bonobo_client_site_new_view ()

BonoboViewFrame* bonobo_client_site_new_view
                                            (BonoboClientSite *client_site,
                                             Bonobo_UIContainer uih);

client_site : 
uih : 
Returns : 


bonobo_client_site_new_item ()

GnomeCanvasItem* bonobo_client_site_new_item
                                            (BonoboClientSite *client_site,
                                             GnomeCanvasGroup *group);

client_site : 
group : 
Returns : 


bonobo_client_site_get_verbs ()

GList*      bonobo_client_site_get_verbs    (BonoboClientSite *client_site);

client_site : 
Returns : 


bonobo_client_site_free_verbs ()

void        bonobo_client_site_free_verbs   (GList *verb_list);

verb_list : 


bonobo_client_site_get_epv ()

POA_Bonobo_ClientSite__epv* bonobo_client_site_get_epv
                                            (void);

Returns : 

See Also

BonoboEmbeddable, BonoboContainer, BonoboObjectClient, BonoboViewFrame