cleanup
[platform/upstream/glib.git] / gio / gsettingsschema.h
1 /*
2  * Copyright © 2010 Codethink Limited
3  * Copyright © 2011 Canonical Limited
4  *
5  * This library is free software; you can redistribute it and/or
6  * modify it under the terms of the GNU Lesser General Public
7  * License as published by the Free Software Foundation; either
8  * version 2 of the licence, or (at your option) any later version.
9  *
10  * This library is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
13  * Lesser General Public License for more details.
14  *
15  * You should have received a copy of the GNU Lesser General Public
16  * License along with this library; if not, see <http://www.gnu.org/licenses/>.
17  */
18
19 #ifndef __G_SETTINGS_SCHEMA_H__
20 #define __G_SETTINGS_SCHEMA_H__
21
22 #include <glib-object.h>
23
24 G_BEGIN_DECLS
25
26 typedef struct _GSettingsSchemaSource                       GSettingsSchemaSource;
27 typedef struct _GSettingsSchema                             GSettingsSchema;
28 typedef struct _GSettingsSchemaKey                          GSettingsSchemaKey;
29
30 #define                 G_TYPE_SETTINGS_SCHEMA_SOURCE                   (g_settings_schema_source_get_type ())
31 GLIB_AVAILABLE_IN_2_32
32 GType                   g_settings_schema_source_get_type               (void) G_GNUC_CONST;
33
34 GLIB_AVAILABLE_IN_2_32
35 GSettingsSchemaSource * g_settings_schema_source_get_default            (void);
36 GLIB_AVAILABLE_IN_2_32
37 GSettingsSchemaSource * g_settings_schema_source_ref                    (GSettingsSchemaSource  *source);
38 GLIB_AVAILABLE_IN_2_32
39 void                    g_settings_schema_source_unref                  (GSettingsSchemaSource  *source);
40
41 GLIB_AVAILABLE_IN_2_32
42 GSettingsSchemaSource * g_settings_schema_source_new_from_directory     (const gchar            *directory,
43                                                                          GSettingsSchemaSource  *parent,
44                                                                          gboolean                trusted,
45                                                                          GError                **error);
46
47 GLIB_AVAILABLE_IN_2_32
48 GSettingsSchema *       g_settings_schema_source_lookup                 (GSettingsSchemaSource  *source,
49                                                                          const gchar            *schema_id,
50                                                                          gboolean                recursive);
51
52 GLIB_AVAILABLE_IN_2_40
53 void                    g_settings_schema_source_list_schemas           (GSettingsSchemaSource   *source,
54                                                                          gboolean                 recursive,
55                                                                          gchar                 ***non_relocatable,
56                                                                          gchar                 ***relocatable);
57
58 #define                 G_TYPE_SETTINGS_SCHEMA                          (g_settings_schema_get_type ())
59 GLIB_AVAILABLE_IN_2_32
60 GType                   g_settings_schema_get_type                      (void) G_GNUC_CONST;
61
62 GLIB_AVAILABLE_IN_2_32
63 GSettingsSchema *       g_settings_schema_ref                           (GSettingsSchema        *schema);
64 GLIB_AVAILABLE_IN_2_32
65 void                    g_settings_schema_unref                         (GSettingsSchema        *schema);
66
67 GLIB_AVAILABLE_IN_2_32
68 const gchar *           g_settings_schema_get_id                        (GSettingsSchema        *schema);
69 GLIB_AVAILABLE_IN_2_32
70 const gchar *           g_settings_schema_get_path                      (GSettingsSchema        *schema);
71 GLIB_AVAILABLE_IN_2_40
72 GSettingsSchemaKey *    g_settings_schema_get_key                       (GSettingsSchema        *schema,
73                                                                          const gchar            *name);
74 GLIB_AVAILABLE_IN_2_40
75 gboolean                g_settings_schema_has_key                       (GSettingsSchema        *schema,
76                                                                          const gchar            *name);
77
78 #define                 G_TYPE_SETTINGS_SCHEMA_KEY                      (g_settings_schema_key_get_type ())
79 GLIB_AVAILABLE_IN_2_40
80 GType                   g_settings_schema_key_get_type                  (void) G_GNUC_CONST;
81
82 GLIB_AVAILABLE_IN_2_40
83 GSettingsSchemaKey *    g_settings_schema_key_ref                       (GSettingsSchemaKey     *key);
84 GLIB_AVAILABLE_IN_2_40
85 void                    g_settings_schema_key_unref                     (GSettingsSchemaKey     *key);
86
87 GLIB_AVAILABLE_IN_2_40
88 const GVariantType *    g_settings_schema_key_get_value_type            (GSettingsSchemaKey     *key);
89 GLIB_AVAILABLE_IN_2_40
90 GVariant *              g_settings_schema_key_get_default_value         (GSettingsSchemaKey     *key);
91 GLIB_AVAILABLE_IN_2_40
92 GVariant *              g_settings_schema_key_get_range                 (GSettingsSchemaKey     *key);
93 GLIB_AVAILABLE_IN_2_40
94 gboolean                g_settings_schema_key_range_check               (GSettingsSchemaKey     *key,
95                                                                          GVariant               *value);
96
97 GLIB_AVAILABLE_IN_2_40
98 const gchar *           g_settings_schema_key_get_summary               (GSettingsSchemaKey     *key);
99 GLIB_AVAILABLE_IN_2_40
100 const gchar *           g_settings_schema_key_get_description           (GSettingsSchemaKey     *key);
101
102 G_END_DECLS
103
104 #endif /* __G_SETTINGS_SCHEMA_H__ */