1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
|
/*
* (C) 2005 OpenedHand Ltd.
*
* Author: Jorn Baayen <jorn@openedhand.com>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with this library; if not, write to the
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
*/
#ifndef __GCONF_BRIDGE_H__
#define __GCONF_BRIDGE_H__
#include <gconf/gconf-client.h>
#include <gtk/gtk.h>
G_BEGIN_DECLS
void gconf_bridge_install_default_error_handler (void);
typedef struct _GConfBridge GConfBridge;
GConfBridge *gconf_bridge_get (void);
GConfClient *gconf_bridge_get_client (GConfBridge *bridge);
guint gconf_bridge_bind_property_full (GConfBridge *bridge,
const char *key,
GObject *object,
const char *prop,
gboolean delayed_sync);
/**
* gconf_bridge_bind_property
* @bridge: A #GConfBridge
* @key: A GConf key to be bound
* @object: A #GObject
* @prop: The property of @object to be bound
*
* Binds @key to @prop without delays, causing them to have the same value at all times. See
* #gconf_bridge_bind_property_full for more details.
*
**/
#define gconf_bridge_bind_property(bridge, key, object, prop) \
gconf_bridge_bind_property_full ((bridge), (key), \
(object), (prop), FALSE)
/**
* gconf_bridge_bind_property_delayed
* @bridge: A #GConfBridge
* @key: A GConf key to be bound
* @object: A #GObject
* @prop: The property of @object to be bound
*
* Binds @key to @prop with a delay, causing them to have the same value at all
* times. See #gconf_bridge_bind_property_full for more details.
**/
#define gconf_bridge_bind_property_delayed(bridge, key, object, prop) \
gconf_bridge_bind_property_full ((bridge), (key), \
(object), (prop), TRUE)
guint gconf_bridge_bind_window (GConfBridge *bridge,
const char *key_prefix,
GtkWindow *window,
gboolean bind_size,
gboolean bind_pos);
/**
* gconf_bridge_bind_window_size
* @bridge: A #GConfBridge
* @key_prefix: The prefix of the GConf keys
* @window: A #GtkWindow
*
* On calling this function @window will be resized to the values specified by
* "@key_prefix<!-- -->_width" and "@key_prefix<!-- -->_height". The respective
* GConf values will be updated when the window is resized. See
* #gconf_bridge_bind_window for more details.
**/
#define gconf_bridge_bind_window_size(bridge, key_prefix, window) \
gconf_bridge_bind_window ((bridge), (key_prefix), (window), TRUE, FALSE)
/**
* gconf_bridge_bind_window_pos
* @bridge: A #GConfBridge
* @key_prefix: The prefix of the GConf keys
* @window: A #GtkWindow
*
* On calling this function @window will be moved to the values specified by
* "@key_prefix<!-- -->_x" and "@key_prefix<!-- -->_y". The respective GConf
* values will be updated when the window is moved. See
* #gconf_bridge_bind_window for more details.
**/
#define gconf_bridge_bind_window_pos(bridge, key_prefix, window) \
gconf_bridge_bind_window ((bridge), (key_prefix), (window), FALSE, TRUE)
guint gconf_bridge_bind_string_list_store (GConfBridge *bridge,
const char *key,
GtkListStore *list_store);
void gconf_bridge_unbind (GConfBridge *bridge,
guint binding_id);
G_END_DECLS
#endif /* __GCONF_BRIDGE_H__ */
|