gsettingsschema.h 5.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104
  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. #ifndef __G_SETTINGS_SCHEMA_H__
  19. #define __G_SETTINGS_SCHEMA_H__
  20. #include <glib-object.h>
  21. G_BEGIN_DECLS
  22. typedef struct _GSettingsSchemaSource GSettingsSchemaSource;
  23. typedef struct _GSettingsSchema GSettingsSchema;
  24. typedef struct _GSettingsSchemaKey GSettingsSchemaKey;
  25. #define G_TYPE_SETTINGS_SCHEMA_SOURCE (g_settings_schema_source_get_type ())
  26. GLIB_AVAILABLE_IN_2_32
  27. GType g_settings_schema_source_get_type (void) G_GNUC_CONST;
  28. GLIB_AVAILABLE_IN_2_32
  29. GSettingsSchemaSource * g_settings_schema_source_get_default (void);
  30. GLIB_AVAILABLE_IN_2_32
  31. GSettingsSchemaSource * g_settings_schema_source_ref (GSettingsSchemaSource *source);
  32. GLIB_AVAILABLE_IN_2_32
  33. void g_settings_schema_source_unref (GSettingsSchemaSource *source);
  34. GLIB_AVAILABLE_IN_2_32
  35. GSettingsSchemaSource * g_settings_schema_source_new_from_directory (const gchar *directory,
  36. GSettingsSchemaSource *parent,
  37. gboolean trusted,
  38. GError **error);
  39. GLIB_AVAILABLE_IN_2_32
  40. GSettingsSchema * g_settings_schema_source_lookup (GSettingsSchemaSource *source,
  41. const gchar *schema_id,
  42. gboolean recursive);
  43. GLIB_AVAILABLE_IN_2_40
  44. void g_settings_schema_source_list_schemas (GSettingsSchemaSource *source,
  45. gboolean recursive,
  46. gchar ***non_relocatable,
  47. gchar ***relocatable);
  48. #define G_TYPE_SETTINGS_SCHEMA (g_settings_schema_get_type ())
  49. GLIB_AVAILABLE_IN_2_32
  50. GType g_settings_schema_get_type (void) G_GNUC_CONST;
  51. GLIB_AVAILABLE_IN_2_32
  52. GSettingsSchema * g_settings_schema_ref (GSettingsSchema *schema);
  53. GLIB_AVAILABLE_IN_2_32
  54. void g_settings_schema_unref (GSettingsSchema *schema);
  55. GLIB_AVAILABLE_IN_2_32
  56. const gchar * g_settings_schema_get_id (GSettingsSchema *schema);
  57. GLIB_AVAILABLE_IN_2_32
  58. const gchar * g_settings_schema_get_path (GSettingsSchema *schema);
  59. GLIB_AVAILABLE_IN_2_40
  60. GSettingsSchemaKey * g_settings_schema_get_key (GSettingsSchema *schema,
  61. const gchar *name);
  62. GLIB_AVAILABLE_IN_2_40
  63. gboolean g_settings_schema_has_key (GSettingsSchema *schema,
  64. const gchar *name);
  65. #define G_TYPE_SETTINGS_SCHEMA_KEY (g_settings_schema_key_get_type ())
  66. GLIB_AVAILABLE_IN_2_40
  67. GType g_settings_schema_key_get_type (void) G_GNUC_CONST;
  68. GLIB_AVAILABLE_IN_2_40
  69. GSettingsSchemaKey * g_settings_schema_key_ref (GSettingsSchemaKey *key);
  70. GLIB_AVAILABLE_IN_2_40
  71. void g_settings_schema_key_unref (GSettingsSchemaKey *key);
  72. GLIB_AVAILABLE_IN_2_40
  73. const GVariantType * g_settings_schema_key_get_value_type (GSettingsSchemaKey *key);
  74. GLIB_AVAILABLE_IN_2_40
  75. GVariant * g_settings_schema_key_get_default_value (GSettingsSchemaKey *key);
  76. GLIB_AVAILABLE_IN_2_40
  77. GVariant * g_settings_schema_key_get_range (GSettingsSchemaKey *key);
  78. GLIB_AVAILABLE_IN_2_40
  79. gboolean g_settings_schema_key_range_check (GSettingsSchemaKey *key,
  80. GVariant *value);
  81. GLIB_AVAILABLE_IN_2_40
  82. const gchar * g_settings_schema_key_get_summary (GSettingsSchemaKey *key);
  83. GLIB_AVAILABLE_IN_2_40
  84. const gchar * g_settings_schema_key_get_description (GSettingsSchemaKey *key);
  85. G_END_DECLS
  86. #endif /* __G_SETTINGS_SCHEMA_H__ */