gsettingsschema.h 5.8 KB

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