sheet-object-bonobo.h 2.38 KB
Newer Older
1 2 3
#ifndef GNUMERIC_SHEET_OBJECT_BONOBO_H
#define GNUMERIC_SHEET_OBJECT_BONOBO_H

4
#include "sheet-object-impl.h"
5
#include <bonobo/bonobo-stream.h>
Jody Goldberg's avatar
Jody Goldberg committed
6
#include <bonobo/bonobo-control-frame.h>
7 8 9 10

/*
 * SheetObjectBonobo:
 *
11
 * SheetObject *abstract* class for embedding Bonobo components.
12 13 14 15
 *    The sheet-object-container implements a window-based Gnome::View embedder
 *    The sheet-object-item implements a canvas-based Gnome::Canvas
 */
#define SHEET_OBJECT_BONOBO_TYPE     (sheet_object_bonobo_get_type ())
Jody Goldberg's avatar
Jody Goldberg committed
16 17 18
#define SHEET_OBJECT_BONOBO(obj)     (G_TYPE_CHECK_INSTANCE_CAST((obj), SHEET_OBJECT_BONOBO_TYPE, SheetObjectBonobo))
#define SHEET_OBJECT_BONOBO_CLASS(k) (G_TYPE_CHECK_CLASS_CAST ((k),	SHEET_OBJECT_BONOBO_TYPE, SheetObjectBonoboClass))
#define IS_SHEET_OBJECT_BONOBO(o)    (G_TYPE_CHECK_INSTANCE_TYPE((o),	SHEET_OBJECT_BONOBO_TYPE))
19 20

typedef struct {
21
	SheetObject         parent_object;
22

Jody Goldberg's avatar
Jody Goldberg committed
23
	/* The ControlFrame for the bonobo object
24 25 26 27
	 *
	 * If this is NULL the object has not yet been
	 * activated/bound to this site
	 */
Jody Goldberg's avatar
Jody Goldberg committed
28
	BonoboControlFrame   *client_site;
29
	char *object_id;
30

31 32 33
	Bonobo_Unknown        object_server;
	Bonobo_ControlFactory factory;

34 35
	gboolean has_persist_file;
	gboolean has_persist_stream;
36 37 38 39 40 41
} SheetObjectBonobo;

typedef struct {
	SheetObjectClass parent_class;
} SheetObjectBonoboClass;

Jody Goldberg's avatar
Jody Goldberg committed
42
GType              sheet_object_bonobo_get_type  (void);
43
SheetObjectBonobo *sheet_object_bonobo_construct (SheetObjectBonobo	 *sob,
Jody Goldberg's avatar
Jody Goldberg committed
44
						  Bonobo_UIContainer	 *container,
45
						  char const		 *object_id);
46
char const *sheet_object_bonobo_get_object_iid	(SheetObjectBonobo const *sob);
47 48
gboolean    sheet_object_bonobo_set_object_iid	(SheetObjectBonobo	 *sob,
						 char const	   	 *object_id);
49
gboolean    sheet_object_bonobo_set_server	(SheetObjectBonobo	 *sob,
50
						 Bonobo_Unknown           object_server);
51 52

void sheet_object_bonobo_load_file           (SheetObjectBonobo *sob,
53
					      char const        *fname,
54 55 56 57 58 59 60 61 62 63
					      CORBA_Environment *ev);
void sheet_object_bonobo_load_persist_file   (SheetObjectBonobo *sob,
					      char const        *fname,
					      CORBA_Environment *ev);
void sheet_object_bonobo_load_persist_stream (SheetObjectBonobo *sob,
					      BonoboStream      *stream,
					      CORBA_Environment *ev);
void sheet_object_bonobo_save_persist_stream (SheetObjectBonobo const *sob,
					      BonoboStream      *stream,
					      CORBA_Environment *ev);
64 65

#endif /* GNUMERIC_SHEET_OBJECT_ITEM_H */