56
58
struct _GConfValue {
57
59
GConfValueType type;
63
GConfSchema* schema_data;
75
#define gconf_value_get_string(x) ((const gchar*)((x)->d.string_data))
76
#define gconf_value_get_int(x) ((x)->d.int_data)
77
#define gconf_value_get_float(x) ((x)->d.float_data)
78
#define gconf_value_get_list_type(x) ((x)->d.list_data.type)
79
#define gconf_value_get_list(x) ((x)->d.list_data.list)
80
#define gconf_value_get_car(x) ((x)->d.pair_data.car)
81
#define gconf_value_get_cdr(x) ((x)->d.pair_data.cdr)
82
#define gconf_value_get_bool(x) ((x)->d.bool_data)
83
#define gconf_value_get_schema(x) ((x)->d.schema_data)
62
const char* gconf_value_get_string (const GConfValue *value);
63
int gconf_value_get_int (const GConfValue *value);
64
double gconf_value_get_float (const GConfValue *value);
65
GConfValueType gconf_value_get_list_type (const GConfValue *value);
66
GSList* gconf_value_get_list (const GConfValue *value);
67
GConfValue* gconf_value_get_car (const GConfValue *value);
68
GConfValue* gconf_value_get_cdr (const GConfValue *value);
69
gboolean gconf_value_get_bool (const GConfValue *value);
70
GConfSchema* gconf_value_get_schema (const GConfValue *value);
85
72
GConfValue* gconf_value_new (GConfValueType type);
87
GConfValue* gconf_value_copy (GConfValue* src);
74
/* doesn't work on complicated types (only string, int, bool, float) */
75
GConfValue* gconf_value_new_from_string (GConfValueType type,
79
GConfValue* gconf_value_copy (const GConfValue* src);
88
80
void gconf_value_free (GConfValue* value);
90
82
void gconf_value_set_int (GConfValue* value,
96
88
void gconf_value_set_bool (GConfValue* value,
97
89
gboolean the_bool);
98
90
void gconf_value_set_schema (GConfValue* value,
91
const GConfSchema* sc);
100
92
void gconf_value_set_schema_nocopy (GConfValue* value,
102
94
void gconf_value_set_car (GConfValue* value,
95
const GConfValue* car);
104
96
void gconf_value_set_car_nocopy (GConfValue* value,
106
98
void gconf_value_set_cdr (GConfValue* value,
99
const GConfValue* cdr);
108
100
void gconf_value_set_cdr_nocopy (GConfValue* value,
109
101
GConfValue* cdr);
110
102
/* Set a list of GConfValue, NOT lists or pairs */
115
107
void gconf_value_set_list (GConfValue* value,
118
gchar* gconf_value_to_string (GConfValue* value);
110
gchar* gconf_value_to_string (const GConfValue* value);
112
int gconf_value_compare (const GConfValue* value_a,
113
const GConfValue* value_b);
120
115
/* Meta-information about a key. Not the same as a schema; this is
121
116
* information stored on the key, the schema is a specification
122
117
* that may apply to this key.
120
/* FIXME GConfMetaInfo is basically deprecated in favor of stuffing this
121
* info into GConfEntry, though the transition isn't complete.
125
124
typedef struct _GConfMetaInfo GConfMetaInfo;
127
126
struct _GConfMetaInfo {
130
129
GTime mod_time; /* time of the modification */
133
#define gconf_meta_info_get_schema(x) ((const gchar*)(x)->schema)
134
#define gconf_meta_info_get_mod_user(x) ((x)->mod_user)
135
#define gconf_meta_info_mod_time(x) ((x)->mod_time)
137
GConfMetaInfo* gconf_meta_info_new (void);
138
void gconf_meta_info_free (GConfMetaInfo* gcmi);
139
void gconf_meta_info_set_schema (GConfMetaInfo* gcmi,
140
const gchar* schema_name);
141
void gconf_meta_info_set_mod_user(GConfMetaInfo* gcmi,
142
const gchar* mod_user);
143
void gconf_meta_info_set_mod_time(GConfMetaInfo* gcmi,
132
const char* gconf_meta_info_get_schema (GConfMetaInfo *gcmi);
133
const char* gconf_meta_info_get_mod_user (GConfMetaInfo *gcmi);
134
GTime gconf_meta_info_mod_time (GConfMetaInfo *gcmi);
136
GConfMetaInfo* gconf_meta_info_new (void);
137
void gconf_meta_info_free (GConfMetaInfo *gcmi);
138
void gconf_meta_info_set_schema (GConfMetaInfo *gcmi,
139
const gchar *schema_name);
140
void gconf_meta_info_set_mod_user (GConfMetaInfo *gcmi,
141
const gchar *mod_user);
142
void gconf_meta_info_set_mod_time (GConfMetaInfo *gcmi,
147
147
/* Key-value pairs; used to list the contents of
153
GCONF_UNSET_INCLUDING_SCHEMA_NAMES = 1 << 0
151
156
typedef struct _GConfEntry GConfEntry;
153
158
struct _GConfEntry {
157
guint is_default : 1;
158
guint is_writable : 1;
161
#define gconf_entry_get_key(x) ((const gchar*)(x)->key)
162
#define gconf_entry_get_value(x) ((x)->value)
163
#define gconf_entry_get_schema_name(x) ((const gchar*)(x)->schema_name)
164
#define gconf_entry_get_is_default(x) ((x)->is_default)
165
#define gconf_entry_get_is_writable(x) ((x)->is_writable)
163
const char* gconf_entry_get_key (const GConfEntry *entry);
164
GConfValue* gconf_entry_get_value (const GConfEntry *entry);
165
const char* gconf_entry_get_schema_name (const GConfEntry *entry);
166
gboolean gconf_entry_get_is_default (const GConfEntry *entry);
167
gboolean gconf_entry_get_is_writable (const GConfEntry *entry);
167
169
GConfEntry* gconf_entry_new (const gchar *key,
170
const GConfValue *val);
169
171
GConfEntry* gconf_entry_new_nocopy (gchar *key,
170
172
GConfValue *val);
174
GConfEntry* gconf_entry_copy (const GConfEntry *src);
175
#ifndef GCONF_DISABLE_DEPRECATED
171
176
void gconf_entry_free (GConfEntry *entry);
178
void gconf_entry_ref (GConfEntry *entry);
179
void gconf_entry_unref (GConfEntry *entry);
173
181
/* Transfer ownership of value to the caller. */
174
182
GConfValue* gconf_entry_steal_value (GConfEntry *entry);
175
183
void gconf_entry_set_value (GConfEntry *entry,
184
const GConfValue *val);
177
185
void gconf_entry_set_value_nocopy (GConfEntry *entry,
178
186
GConfValue *val);
179
187
void gconf_entry_set_schema_name (GConfEntry *entry,