* Author: Ryan Lortie <desrt@desrt.ca>
*/
+#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION)
+#error "Only <gio/gio.h> can be included directly."
+#endif
+
#ifndef __G_SETTINGS_H__
#define __G_SETTINGS_H__
-#include <glib-object.h>
+#include <gio/giotypes.h>
G_BEGIN_DECLS
typedef struct _GSettingsPrivate GSettingsPrivate;
typedef struct _GSettingsClass GSettingsClass;
-typedef struct _GSettings GSettings;
struct _GSettingsClass
{
GSettings * g_settings_new (const gchar *schema);
GSettings * g_settings_new_with_path (const gchar *schema,
const gchar *path);
-gboolean g_settings_supports_context (const gchar *context);
-GSettings * g_settings_new_with_context (const gchar *schema,
- const gchar *context);
-GSettings * g_settings_new_with_context_and_path (const gchar *schema,
- const gchar *context,
+GSettings * g_settings_new_with_backend (const gchar *schema,
+ GSettingsBackend *backend);
+GSettings * g_settings_new_with_backend_and_path (const gchar *schema,
+ GSettingsBackend *backend,
const gchar *path);
gboolean g_settings_set_value (GSettings *settings,
const gchar *key,
gdouble value);
gchar ** g_settings_get_strv (GSettings *settings,
- const gchar *key,
- gsize *length);
+ const gchar *key);
gboolean g_settings_set_strv (GSettings *settings,
const gchar *key,
- const gchar *const *value,
- gssize length);
-
+ const gchar *const *value);
+gint g_settings_get_enum (GSettings *settings,
+ const gchar *key);
+gboolean g_settings_set_enum (GSettings *settings,
+ const gchar *key,
+ gint value);
GSettings * g_settings_get_child (GSettings *settings,
const gchar *name);
void g_settings_apply (GSettings *settings);
void g_settings_revert (GSettings *settings);
gboolean g_settings_get_has_unapplied (GSettings *settings);
+void g_settings_sync (void);
/**
* GSettingsBindSetMapping:
/**
* GSettingsBindFlags:
* @G_SETTINGS_BIND_DEFAULT: Equivalent to <literal>G_SETTINGS_BIND_GET|G_SETTINGS_BIND_SET</literal>
- * @G_SETTINGS_BIND_GET: Update the #GObject property when the #GSettings key changes
- * @G_SETTINGS_BIND_SET: Update the #GSettings key when the #GObject property changes
- * @G_SETTINGS_BIND_NO_SENSITIVITY: Do not try to bind a "sensitivity" property to #GSettings writability
+ * @G_SETTINGS_BIND_GET: Update the #GObject property when the setting changes.
+ * It is an error to use this flag if the property is not writable.
+ * @G_SETTINGS_BIND_SET: Update the setting when the #GObject property changes.
+ * It is an error to use this flag if the property is not readable.
+ * @G_SETTINGS_BIND_NO_SENSITIVITY: Do not try to bind a "sensitivity" property to the writability of the setting
+ * @G_SETTINGS_BIND_GET_NO_CHANGES: When set in addition to #G_SETTINGS_BIND_GET, set the #GObject property
+ * value initially from the setting, but do not listen for changes of the setting
*
* Flags used when creating a binding. These flags determine in which
* direction the binding works. The default is to synchronize in both
GSettingsBindSetMapping set_mapping,
gpointer user_data,
GDestroyNotify destroy);
+void g_settings_bind_writable (GSettings *settings,
+ const gchar *key,
+ gpointer object,
+ const gchar *property,
+ gboolean inverted);
void g_settings_unbind (gpointer object,
const gchar *property);