This is an opaque structure type. You may not access it directly.
<group>GIO</group> <gtkada_demo>create_settings.adb</gtkada_demo>
function From_Object (Object : System.Address) return Gsettings_Schema_Source
function From_Object_Free (B : access Gsettings_Schema_Source'Class) return Gsettings_Schema_Source
procedure G_New_From_Directory
(Self : out Gsettings_Schema_Source;
Directory : UTF8_String;
Parent : Gsettings_Schema_Source;
Trusted : Boolean;
Error : out Glib.Error.GError)
Attempts to create a new schema source corresponding to the contents of the given directory. This function is not required for normal uses of Glib.Settings.Gsettings but it may be useful to authors of plugin management systems. The directory should contain a file called gschemas.compiled as produced by the [glib-compile-schemas][glib-compile-schemas] tool. If Trusted is True then gschemas.compiled is trusted not to be corrupted. This assumption has a performance advantage, but can result in crashes or inconsistent behaviour in the case of a corrupted file. Generally, you should set Trusted to True for files installed by the system and to False for files in the home directory. In either case, an empty file or some types of corruption in the file will result in Glib.Error_Enums.G_File_Error_Inval being returned. If Parent is non-null then there are two effects. First, if Glib.Settings_Schema_Source.Lookup is called with the Recursive flag set to True and the schema can not be found in the source, the lookup will recurse to the parent. Second, any references to other schemas specified within this source (ie: child or extends) references may be resolved from the Parent. For this second reason, except in very unusual situations, the Parent should probably be given as the default schema source, as returned by Glib.Settings_Schema_Source.Get_Default. Since: gtk+ 2.32
the filename of a directory
a Glib.Settings_Schema_Source.Gsettings_Schema_Source, or null
True, if the directory is trusted
the return location for a recoverable error
function Get_Default return Gsettings_Schema_Source
Gets the default system schema source. This function is not required for normal uses of Glib.Settings.Gsettings but it may be useful to authors of plugin management systems or to those who want to introspect the content of schemas. If no schemas are installed, null will be returned. The returned source may actually consist of multiple schema sources from different directories, depending on which directories were given in XDG_DATA_DIRS and GSETTINGS_SCHEMA_DIR. For this reason, all lookups performed against the default source should probably be done recursively. Since: gtk+ 2.32
the default schema source. Has transfer-ownership='none'.
function Get_Type return Glib.GType
type Gsettings_Schema_Source is new Glib.C_Boxed with null record;
function Gsettings_Schema_Source_New_From_Directory
(Directory : UTF8_String;
Parent : Gsettings_Schema_Source;
Trusted : Boolean;
Error : out Glib.Error.GError) return Gsettings_Schema_Source
Attempts to create a new schema source corresponding to the contents of the given directory. This function is not required for normal uses of Glib.Settings.Gsettings but it may be useful to authors of plugin management systems. The directory should contain a file called gschemas.compiled as produced by the [glib-compile-schemas][glib-compile-schemas] tool. If Trusted is True then gschemas.compiled is trusted not to be corrupted. This assumption has a performance advantage, but can result in crashes or inconsistent behaviour in the case of a corrupted file. Generally, you should set Trusted to True for files installed by the system and to False for files in the home directory. In either case, an empty file or some types of corruption in the file will result in Glib.Error_Enums.G_File_Error_Inval being returned. If Parent is non-null then there are two effects. First, if Glib.Settings_Schema_Source.Lookup is called with the Recursive flag set to True and the schema can not be found in the source, the lookup will recurse to the parent. Second, any references to other schemas specified within this source (ie: child or extends) references may be resolved from the Parent. For this second reason, except in very unusual situations, the Parent should probably be given as the default schema source, as returned by Glib.Settings_Schema_Source.Get_Default. Since: gtk+ 2.32
the filename of a directory
a Glib.Settings_Schema_Source.Gsettings_Schema_Source, or null
True, if the directory is trusted
the return location for a recoverable error
procedure List_Schemas
(Self : Gsettings_Schema_Source;
Recursive : Boolean;
Non_Relocatable : out GNAT.Strings.String_List_Access;
Relocatable : out GNAT.Strings.String_List_Access)
Lists the schemas in a given source. If Recursive is True then include parent sources. If False then only include the schemas from one source (ie: one directory). You probably want True. Non-relocatable schemas are those for which you can call Glib.Settings.G_New. Relocatable schemas are those for which you must use Glib.Settings.G_New_With_Path. Do not call this function from normal programs. This is designed for use by database editors, commandline tools, etc. Since: gtk+ 2.40
if we should recurse
the list of non-relocatable schemas, in no defined order
the list of relocatable schemas, in no defined order
function Lookup
(Self : Gsettings_Schema_Source;
Schema_Id : UTF8_String;
Recursive : Boolean) return Glib.Settings_Schema.Gsettings_Schema
Looks up a schema with the identifier Schema_Id in Source. This function is not required for normal uses of Glib.Settings.Gsettings but it may be useful to authors of plugin management systems or to those who want to introspect the content of schemas. If the schema isn't found directly in Source and Recursive is True then the parent sources will also be checked. If the schema isn't found, null is returned. Since: gtk+ 2.32
a schema ID
True if the lookup should be recursive
a new Glib.Settings_Schema.Gsettings_Schema. Has transfer-ownership='full'.
Null_Gsettings_Schema_Source : constant Gsettings_Schema_Source;
function Ref
(Self : Gsettings_Schema_Source) return Gsettings_Schema_Source
Increase the reference count of Source, returning a new reference. Since: gtk+ 2.32
a new reference to Source. Has transfer-ownership='full'.
procedure Unref (Self : Gsettings_Schema_Source)
Decrease the reference count of Source, possibly freeing it. Since: gtk+ 2.32