1 | /* |
---|
2 | * bonobo-ui-util.h: Bonobo UI utility functions |
---|
3 | * |
---|
4 | * Author: |
---|
5 | * Michael Meeks (michael@helixcode.com) |
---|
6 | * |
---|
7 | * Copyright 2000 Helix Code, Inc. |
---|
8 | */ |
---|
9 | #ifndef _BONOBO_UI_XML_UTIL_H_ |
---|
10 | #define _BONOBO_UI_XML_UTIL_H_ |
---|
11 | |
---|
12 | #include <gtk/gtkwidget.h> |
---|
13 | #include <gdk-pixbuf/gdk-pixbuf.h> |
---|
14 | #include <bonobo/bonobo-ui-component.h> |
---|
15 | |
---|
16 | char *bonobo_ui_util_pixbuf_to_xml (GdkPixbuf *pixbuf); |
---|
17 | |
---|
18 | GdkPixbuf *bonobo_ui_util_xml_to_pixbuf (const char *xml); |
---|
19 | |
---|
20 | GdkPixbuf *bonobo_ui_util_xml_get_icon_pixbuf (BonoboUINode *node, gboolean prepend_menu); |
---|
21 | GtkWidget *bonobo_ui_util_xml_get_icon_pixmap_widget (BonoboUINode *node, gboolean prepend_menu); |
---|
22 | |
---|
23 | void bonobo_ui_util_xml_set_pixbuf (BonoboUINode *node, |
---|
24 | GdkPixbuf *pixbuf); |
---|
25 | void bonobo_ui_util_xml_set_pix_xpm (BonoboUINode *node, |
---|
26 | const char **xpm); |
---|
27 | void bonobo_ui_util_xml_set_pix_stock (BonoboUINode *node, |
---|
28 | const char *name); |
---|
29 | void bonobo_ui_util_xml_set_pix_fname (BonoboUINode *node, |
---|
30 | const char *name); |
---|
31 | |
---|
32 | void bonobo_ui_util_build_help_menu (BonoboUIComponent *listener, |
---|
33 | const char *app_prefix, |
---|
34 | const char *app_name, |
---|
35 | BonoboUINode *parent); |
---|
36 | |
---|
37 | BonoboUINode *bonobo_ui_util_build_accel (guint accelerator_key, |
---|
38 | GdkModifierType accelerator_mods, |
---|
39 | const char *verb); |
---|
40 | |
---|
41 | BonoboUINode *bonobo_ui_util_new_menu (gboolean submenu, |
---|
42 | const char *name, |
---|
43 | const char *label, |
---|
44 | const char *tip, |
---|
45 | const char *verb); |
---|
46 | |
---|
47 | BonoboUINode *bonobo_ui_util_new_placeholder (const char *name, |
---|
48 | gboolean top, |
---|
49 | gboolean bottom); |
---|
50 | |
---|
51 | void bonobo_ui_util_set_radiogroup (BonoboUINode *node, |
---|
52 | const char *group_name); |
---|
53 | |
---|
54 | void bonobo_ui_util_set_toggle (BonoboUINode *node, |
---|
55 | const char *id, |
---|
56 | const char *init_state); |
---|
57 | |
---|
58 | BonoboUINode *bonobo_ui_util_new_std_toolbar (const char *name, |
---|
59 | const char *label, |
---|
60 | const char *tip, |
---|
61 | const char *verb); |
---|
62 | |
---|
63 | BonoboUINode *bonobo_ui_util_new_toggle_toolbar(const char *name, |
---|
64 | const char *label, |
---|
65 | const char *tip, |
---|
66 | const char *id); |
---|
67 | |
---|
68 | char *bonobo_ui_util_get_ui_fname (const char *component_prefix, |
---|
69 | const char *file_name); |
---|
70 | |
---|
71 | void bonobo_ui_util_translate_ui (BonoboUINode *node); |
---|
72 | |
---|
73 | void bonobo_ui_util_fixup_help (BonoboUIComponent *component, |
---|
74 | BonoboUINode *node, |
---|
75 | const char *app_prefix, |
---|
76 | const char *app_name); |
---|
77 | |
---|
78 | void bonobo_ui_util_fixup_icons (BonoboUINode *node); |
---|
79 | |
---|
80 | |
---|
81 | /* |
---|
82 | * Does all the translation & other grunt. |
---|
83 | */ |
---|
84 | BonoboUINode *bonobo_ui_util_new_ui (BonoboUIComponent *component, |
---|
85 | const char *fname, |
---|
86 | const char *app_prefix, |
---|
87 | const char *app_name); |
---|
88 | |
---|
89 | void bonobo_ui_util_set_ui (BonoboUIComponent *component, |
---|
90 | const char *app_prefix, |
---|
91 | const char *file_name, |
---|
92 | const char *app_name); |
---|
93 | |
---|
94 | void bonobo_ui_util_set_pixbuf (BonoboUIComponent *component, |
---|
95 | const char *path, |
---|
96 | GdkPixbuf *pixbuf); |
---|
97 | |
---|
98 | gchar *bonobo_ui_util_accel_name (guint accelerator_key, |
---|
99 | GdkModifierType accelerator_mods); |
---|
100 | |
---|
101 | void bonobo_ui_util_accel_parse (char *name, |
---|
102 | guint *accelerator_key, |
---|
103 | GdkModifierType *accelerator_mods); |
---|
104 | |
---|
105 | char *bonobo_ui_util_decode_str (const char *str, gboolean *err); |
---|
106 | |
---|
107 | char *bonobo_ui_util_encode_str (const char *str); |
---|
108 | |
---|
109 | #endif /* _BONOBO_UI_XML_UTIL_H_ */ |
---|