2
* Copyright (C) 1999, 2000 Red Hat Inc.
4
* This library is free software; you can redistribute it and/or
5
* modify it under the terms of the GNU Library General Public
6
* License as published by the Free Software Foundation; either
7
* version 2 of the License, or (at your option) any later version.
9
* This library is distributed in the hope that it will be useful,
10
* but WITHOUT ANY WARRANTY; without even the implied warranty of
11
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12
* Library General Public License for more details.
14
* You should have received a copy of the GNU Library General Public
15
* License along with this library; if not, write to the
16
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
17
* Boston, MA 02111-1307, USA.
20
#ifndef GCONF_GCONF_CHANGESET_H
21
#define GCONF_GCONF_CHANGESET_H
23
#include <gconf/gconf.h>
27
#endif /* __cplusplus */
30
* A GConfChangeSet is basically a hash from keys to "changes in value,"
31
* where a change in a value is either a new value or "unset this value."
33
* You can use this to collect changes then "commit" them as a group to
37
typedef struct _GConfChangeSet GConfChangeSet;
39
typedef void (* GConfChangeSetForeachFunc) (GConfChangeSet* cs,
44
gboolean gconf_engine_commit_change_set (GConfEngine* conf,
50
gboolean remove_committed,
53
/* Create a change set that would revert the given change set
54
for the given GConfEngine */
55
GConfChangeSet* gconf_engine_reverse_change_set (GConfEngine* conf,
59
/* Create a change set that would restore the current state of all the keys
60
in the NULL-terminated array "keys" */
61
GConfChangeSet* gconf_engine_change_set_from_currentv (GConfEngine* conf,
65
GConfChangeSet* gconf_engine_change_set_from_current (GConfEngine* conf,
67
const gchar* first_key,
71
GConfChangeSet* gconf_change_set_new (void);
72
void gconf_change_set_ref (GConfChangeSet* cs);
74
void gconf_change_set_unref (GConfChangeSet* cs);
76
void gconf_change_set_clear (GConfChangeSet* cs);
78
guint gconf_change_set_size (GConfChangeSet* cs);
80
void gconf_change_set_remove (GConfChangeSet* cs,
83
void gconf_change_set_foreach (GConfChangeSet* cs,
84
GConfChangeSetForeachFunc func,
87
/* Returns TRUE if the change set contains the given key; if the key
88
is in the set, either NULL (for unset) or a GConfValue is placed in
89
*value_retloc; the value is not a copy and should not be
90
freed. value_retloc can be NULL if you just want to check for a value,
91
and don't care what it is. */
92
gboolean gconf_change_set_check_value (GConfChangeSet* cs, const gchar* key,
93
GConfValue** value_retloc);
95
void gconf_change_set_set (GConfChangeSet* cs, const gchar* key,
98
void gconf_change_set_set_nocopy (GConfChangeSet* cs, const gchar* key,
101
void gconf_change_set_unset (GConfChangeSet* cs, const gchar* key);
103
void gconf_change_set_set_float (GConfChangeSet* cs, const gchar* key,
106
void gconf_change_set_set_int (GConfChangeSet* cs, const gchar* key,
109
void gconf_change_set_set_string (GConfChangeSet* cs, const gchar* key,
112
void gconf_change_set_set_bool (GConfChangeSet* cs, const gchar* key,
115
void gconf_change_set_set_schema (GConfChangeSet* cs, const gchar* key,
118
void gconf_change_set_set_list (GConfChangeSet* cs, const gchar* key,
119
GConfValueType list_type,
122
void gconf_change_set_set_pair (GConfChangeSet* cs, const gchar* key,
123
GConfValueType car_type, GConfValueType cdr_type,
124
gconstpointer address_of_car,
125
gconstpointer address_of_cdr);
128
/* For use by language bindings only */
129
void gconf_change_set_set_user_data (GConfChangeSet *cs,
131
GDestroyNotify dnotify);
132
gpointer gconf_change_set_get_user_data (GConfChangeSet *cs);
138
#endif /* __cplusplus */