1 | /* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ |
---|
2 | /* |
---|
3 | * bonobo-win.c: The Bonobo Window implementation. |
---|
4 | * |
---|
5 | * Author: |
---|
6 | * Michael Meeks (michael@helixcode.com) |
---|
7 | * |
---|
8 | * Copyright 2000 Helix Code, Inc. |
---|
9 | */ |
---|
10 | #ifndef _BONOBO_WINDOW_H_ |
---|
11 | #define _BONOBO_WINDOW_H_ |
---|
12 | |
---|
13 | #include <gtk/gtkmenu.h> |
---|
14 | #include <gtk/gtkwindow.h> |
---|
15 | #include <bonobo/bonobo-object.h> |
---|
16 | #include <bonobo/bonobo-ui-engine.h> |
---|
17 | |
---|
18 | #define BONOBO_TYPE_WINDOW (bonobo_window_get_type ()) |
---|
19 | #define BONOBO_WINDOW(o) (GTK_CHECK_CAST ((o), BONOBO_TYPE_WINDOW, BonoboWindow)) |
---|
20 | #define BONOBO_WINDOW_CLASS(k) (GTK_CHECK_CLASS_CAST((k), BONOBO_TYPE_WINDOW, BonoboWindowClass)) |
---|
21 | #define BONOBO_IS_WINDOW(o) (GTK_CHECK_TYPE ((o), BONOBO_TYPE_WINDOW)) |
---|
22 | #define BONOBO_IS_WINDOW_CLASS(k) (GTK_CHECK_CLASS_TYPE ((k), BONOBO_TYPE_WINDOW)) |
---|
23 | |
---|
24 | typedef struct _BonoboWindowPrivate BonoboWindowPrivate; |
---|
25 | |
---|
26 | typedef struct { |
---|
27 | GtkWindow parent; |
---|
28 | |
---|
29 | BonoboWindowPrivate *priv; |
---|
30 | } BonoboWindow; |
---|
31 | |
---|
32 | typedef struct { |
---|
33 | GtkWindowClass parent_class; |
---|
34 | } BonoboWindowClass; |
---|
35 | |
---|
36 | GtkType bonobo_window_get_type (void); |
---|
37 | |
---|
38 | GtkWidget *bonobo_window_construct (BonoboWindow *win, |
---|
39 | const char *win_name, |
---|
40 | const char *title); |
---|
41 | |
---|
42 | GtkWidget *bonobo_window_new (const char *win_name, |
---|
43 | const char *title); |
---|
44 | |
---|
45 | void bonobo_window_set_contents (BonoboWindow *win, |
---|
46 | GtkWidget *contents); |
---|
47 | GtkWidget *bonobo_window_get_contents (BonoboWindow *win); |
---|
48 | |
---|
49 | |
---|
50 | BonoboUIEngine *bonobo_window_get_ui_engine (BonoboWindow *win); |
---|
51 | |
---|
52 | void bonobo_window_set_name (BonoboWindow *win, |
---|
53 | const char *win_name); |
---|
54 | |
---|
55 | char *bonobo_window_get_name (BonoboWindow *win); |
---|
56 | |
---|
57 | GtkAccelGroup *bonobo_window_get_accel_group (BonoboWindow *win); |
---|
58 | |
---|
59 | /* Mostly deprecated API; see bonobo-ui-engine.h */ |
---|
60 | void bonobo_window_freeze (BonoboWindow *win); |
---|
61 | |
---|
62 | void bonobo_window_thaw (BonoboWindow *win); |
---|
63 | |
---|
64 | BonoboUIError bonobo_window_xml_merge (BonoboWindow *win, |
---|
65 | const char *path, |
---|
66 | const char *xml, |
---|
67 | const char *component); |
---|
68 | |
---|
69 | BonoboUIError bonobo_window_xml_merge_tree (BonoboWindow *win, |
---|
70 | const char *path, |
---|
71 | BonoboUINode *tree, |
---|
72 | const char *component); |
---|
73 | |
---|
74 | char *bonobo_window_xml_get (BonoboWindow *win, |
---|
75 | const char *path, |
---|
76 | gboolean node_only); |
---|
77 | |
---|
78 | gboolean bonobo_window_xml_node_exists (BonoboWindow *win, |
---|
79 | const char *path); |
---|
80 | |
---|
81 | BonoboUIError bonobo_window_xml_rm (BonoboWindow *win, |
---|
82 | const char *path, |
---|
83 | const char *by_component); |
---|
84 | |
---|
85 | BonoboUIError bonobo_window_object_set (BonoboWindow *win, |
---|
86 | const char *path, |
---|
87 | Bonobo_Unknown object, |
---|
88 | CORBA_Environment *ev); |
---|
89 | |
---|
90 | BonoboUIError bonobo_window_object_get (BonoboWindow *win, |
---|
91 | const char *path, |
---|
92 | Bonobo_Unknown *object, |
---|
93 | CORBA_Environment *ev); |
---|
94 | |
---|
95 | void bonobo_window_dump (BonoboWindow *win, |
---|
96 | const char *msg); |
---|
97 | |
---|
98 | void bonobo_window_register_component (BonoboWindow *win, |
---|
99 | const char *name, |
---|
100 | Bonobo_Unknown component); |
---|
101 | |
---|
102 | void bonobo_window_deregister_component (BonoboWindow *win, |
---|
103 | const char *name); |
---|
104 | |
---|
105 | void bonobo_window_deregister_component_by_ref (BonoboWindow *win, |
---|
106 | Bonobo_Unknown component); |
---|
107 | |
---|
108 | void bonobo_window_deregister_dead_components (BonoboWindow *win); |
---|
109 | |
---|
110 | GList *bonobo_window_deregister_get_component_names (BonoboWindow *win); |
---|
111 | |
---|
112 | Bonobo_Unknown bonobo_window_component_get (BonoboWindow *win, |
---|
113 | const char *name); |
---|
114 | |
---|
115 | void bonobo_window_add_popup (BonoboWindow *win, |
---|
116 | GtkMenu *popup, |
---|
117 | const char *path); |
---|
118 | |
---|
119 | void bonobo_window_set_ui_container (BonoboWindow *win, |
---|
120 | BonoboObject *container); |
---|
121 | |
---|
122 | /* |
---|
123 | * NB. popups are automaticaly removed on destroy, you probably don't |
---|
124 | * want to use this. |
---|
125 | */ |
---|
126 | void bonobo_window_remove_popup (BonoboWindow *win, |
---|
127 | const char *path); |
---|
128 | |
---|
129 | #endif /* _BONOBO_WINDOW_H_ */ |
---|