GLib 2.39.0
[glib.git] / gio / gsettingsschema-internal.h
blob7b002c2be6f3297a74f2120a0521bbcd82b62ca5
1 /*
2 * Copyright © 2010 Codethink Limited
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.
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.
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.
20 #ifndef __G_SETTINGS_SCHEMA_INTERNAL_H__
21 #define __G_SETTINGS_SCHEMA_INTERNAL_H__
23 #include "gsettingsschema.h"
25 typedef struct
27 GSettingsSchema *schema;
28 const gchar *name;
30 guint is_flags : 1;
31 guint is_enum : 1;
33 const guint32 *strinfo;
34 gsize strinfo_length;
36 const gchar *unparsed;
37 gchar lc_char;
39 const GVariantType *type;
40 GVariant *minimum, *maximum;
41 GVariant *default_value;
42 } GSettingsSchemaKey;
44 const gchar * g_settings_schema_get_gettext_domain (GSettingsSchema *schema);
45 GVariantIter * g_settings_schema_get_value (GSettingsSchema *schema,
46 const gchar *key);
47 gboolean g_settings_schema_has_key (GSettingsSchema *schema,
48 const gchar *key);
49 const GQuark * g_settings_schema_list (GSettingsSchema *schema,
50 gint *n_items);
51 const gchar * g_settings_schema_get_string (GSettingsSchema *schema,
52 const gchar *key);
54 void g_settings_schema_key_init (GSettingsSchemaKey *key,
55 GSettingsSchema *schema,
56 const gchar *name);
57 void g_settings_schema_key_clear (GSettingsSchemaKey *key);
58 gboolean g_settings_schema_key_type_check (GSettingsSchemaKey *key,
59 GVariant *value);
60 gboolean g_settings_schema_key_range_check (GSettingsSchemaKey *key,
61 GVariant *value);
62 GVariant * g_settings_schema_key_range_fixup (GSettingsSchemaKey *key,
63 GVariant *value);
64 GVariant * g_settings_schema_key_get_translated_default (GSettingsSchemaKey *key);
66 gint g_settings_schema_key_to_enum (GSettingsSchemaKey *key,
67 GVariant *value);
68 GVariant * g_settings_schema_key_from_enum (GSettingsSchemaKey *key,
69 gint value);
70 guint g_settings_schema_key_to_flags (GSettingsSchemaKey *key,
71 GVariant *value);
72 GVariant * g_settings_schema_key_from_flags (GSettingsSchemaKey *key,
73 guint value);
75 #endif /* __G_SETTINGS_SCHEMA_INTERNAL_H__ */