Tizen 2.1 base
[platform/upstream/glib2.0.git] / gio / gsettingsschema-internal.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_INTERNAL_H__
21 #define __G_SETTINGS_SCHEMA_INTERNAL_H__
22
23 #include "gsettingsschema.h"
24
25 typedef struct
26 {
27   GSettingsSchema *schema;
28   const gchar *name;
29
30   guint is_flags : 1;
31   guint is_enum  : 1;
32
33   const guint32 *strinfo;
34   gsize strinfo_length;
35
36   const gchar *unparsed;
37   gchar lc_char;
38
39   const GVariantType *type;
40   GVariant *minimum, *maximum;
41   GVariant *default_value;
42 } GSettingsSchemaKey;
43
44 G_GNUC_INTERNAL
45 const gchar *           g_settings_schema_get_gettext_domain            (GSettingsSchema  *schema);
46 G_GNUC_INTERNAL
47 GVariantIter *          g_settings_schema_get_value                     (GSettingsSchema  *schema,
48                                                                          const gchar      *key);
49 G_GNUC_INTERNAL
50 gboolean                g_settings_schema_has_key                       (GSettingsSchema  *schema,
51                                                                          const gchar      *key);
52 G_GNUC_INTERNAL
53 const GQuark *          g_settings_schema_list                          (GSettingsSchema  *schema,
54                                                                          gint             *n_items);
55 G_GNUC_INTERNAL
56 const gchar *           g_settings_schema_get_string                    (GSettingsSchema  *schema,
57                                                                          const gchar      *key);
58
59 G_GNUC_INTERNAL
60 void                    g_settings_schema_key_init                      (GSettingsSchemaKey *key,
61                                                                          GSettingsSchema    *schema,
62                                                                          const gchar        *name);
63 G_GNUC_INTERNAL
64 void                    g_settings_schema_key_clear                     (GSettingsSchemaKey *key);
65 G_GNUC_INTERNAL
66 gboolean                g_settings_schema_key_type_check                (GSettingsSchemaKey *key,
67                                                                          GVariant           *value);
68 G_GNUC_INTERNAL
69 gboolean                g_settings_schema_key_range_check               (GSettingsSchemaKey *key,
70                                                                          GVariant           *value);
71 G_GNUC_INTERNAL
72 GVariant *              g_settings_schema_key_range_fixup               (GSettingsSchemaKey *key,
73                                                                          GVariant           *value);
74 G_GNUC_INTERNAL
75 GVariant *              g_settings_schema_key_get_translated_default    (GSettingsSchemaKey *key);
76
77 G_GNUC_INTERNAL
78 gint                    g_settings_schema_key_to_enum                   (GSettingsSchemaKey *key,
79                                                                          GVariant           *value);
80 G_GNUC_INTERNAL
81 GVariant *              g_settings_schema_key_from_enum                 (GSettingsSchemaKey *key,
82                                                                          gint                value);
83 G_GNUC_INTERNAL
84 guint                   g_settings_schema_key_to_flags                  (GSettingsSchemaKey *key,
85                                                                          GVariant           *value);
86 G_GNUC_INTERNAL
87 GVariant *              g_settings_schema_key_from_flags                (GSettingsSchemaKey *key,
88                                                                          guint               value);
89
90 #endif /* __G_SETTINGS_SCHEMA_INTERNAL_H__ */