f57b01582fc5ea8841e5d46e5cb9f0d1219ea1b4
[platform/upstream/glib.git] / gio / gsettingsschema.h
1 /*
2  * Copyright © 2010 Codethink Limited
3  *
4  * This library is free software; you can redistribute it and/or
5  * modify it under the terms of the GNU Lesser General Public
6  * License as published by the Free Software Foundation; either
7  * version 2 of the licence, or (at your option) any later version.
8  *
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  * Lesser General Public License for more details.
13  *
14  * You should have received a copy of the GNU Lesser 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.
18  */
19
20 #ifndef __G_SETTINGS_SCHEMA_H__
21 #define __G_SETTINGS_SCHEMA_H__
22
23 #include <glib-object.h>
24
25 G_BEGIN_DECLS
26
27 #define G_TYPE_SETTINGS_SCHEMA                              (g_settings_schema_get_type ())
28 #define G_SETTINGS_SCHEMA(inst)                             (G_TYPE_CHECK_INSTANCE_CAST ((inst),                     \
29                                                              G_TYPE_SETTINGS_SCHEMA, GSettingsSchema))
30 #define G_SETTINGS_SCHEMA_CLASS(class)                      (G_TYPE_CHECK_CLASS_CAST ((class),                       \
31                                                              G_TYPE_SETTINGS_SCHEMA, GSettingsSchemaClass))
32 #define G_IS_SETTINGS_SCHEMA(inst)                          (G_TYPE_CHECK_INSTANCE_TYPE ((inst),                     \
33                                                              G_TYPE_SETTINGS_SCHEMA))
34 #define G_IS_SETTINGS_SCHEMA_CLASS(class)                   (G_TYPE_CHECK_CLASS_TYPE ((class),                       \
35                                                              G_TYPE_SETTINGS_SCHEMA))
36 #define G_SETTINGS_SCHEMA_GET_CLASS(inst)                   (G_TYPE_INSTANCE_GET_CLASS ((inst),                      \
37                                                              G_TYPE_SETTINGS_SCHEMA, GSettingsSchemaClass))
38
39 typedef struct _GSettingsSchemaPrivate                      GSettingsSchemaPrivate;
40 typedef struct _GSettingsSchemaClass                        GSettingsSchemaClass;
41 typedef struct _GSettingsSchema                             GSettingsSchema;
42
43 struct _GSettingsSchemaClass
44 {
45   GObjectClass parent_class;
46 };
47
48 struct _GSettingsSchema
49 {
50   GObject parent_instance;
51
52   GSettingsSchemaPrivate *priv;
53 };
54
55 G_GNUC_INTERNAL
56 GType                   g_settings_schema_get_type                      (void);
57 G_GNUC_INTERNAL
58 GSettingsSchema *       g_settings_schema_new                           (const gchar      *name);
59 G_GNUC_INTERNAL
60 const gchar *           g_settings_schema_get_path                      (GSettingsSchema  *schema);
61 G_GNUC_INTERNAL
62 const gchar *           g_settings_schema_get_gettext_domain            (GSettingsSchema  *schema);
63 G_GNUC_INTERNAL
64 GVariant *              g_settings_schema_get_value                     (GSettingsSchema  *schema,
65                                                                          const gchar      *key,
66                                                                          GVariant        **options);
67 G_GNUC_INTERNAL
68 gboolean                g_settings_schema_has_key                       (GSettingsSchema  *schema,
69                                                                          const gchar      *key);
70 G_GNUC_INTERNAL
71 const GQuark *          g_settings_schema_list                          (GSettingsSchema  *schema,
72                                                                          gint             *n_items);
73
74 G_END_DECLS
75
76 #endif /* __G_SETTINGS_SCHEMA_H__ */