glibmm 2.80.0
|
Introspecting and controlling the loading of GSettings schemas. More...
#include <giomm/settingsschema.h>
Public Member Functions | |
void | reference () const |
Increment the reference count for this object. | |
void | unreference () const |
Decrement the reference count for this object. | |
GSettingsSchema * | gobj () |
Provides access to the underlying C instance. | |
const GSettingsSchema * | gobj () const |
Provides access to the underlying C instance. | |
GSettingsSchema * | gobj_copy () const |
Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs. | |
SettingsSchema ()=delete | |
SettingsSchema (const SettingsSchema &)=delete | |
SettingsSchema & | operator= (const SettingsSchema &)=delete |
Glib::ustring | get_id () const |
Get the ID of schema. | |
Glib::ustring | get_path () const |
Gets the path associated with schema, or nullptr . | |
Glib::RefPtr< SettingsSchemaKey > | get_key (const Glib::ustring & name) |
Gets the key named name from schema. | |
Glib::RefPtr< const SettingsSchemaKey > | get_key (const Glib::ustring & name) const |
Gets the key named name from schema. | |
bool | has_key (const Glib::ustring & name) const |
Checks if schema has a key named name. | |
std::vector< Glib::ustring > | list_keys () const |
Introspects the list of keys on schema. | |
std::vector< Glib::ustring > | list_children () const |
Gets the list of children in schema. | |
Static Public Member Functions | |
static GType | get_type () |
Get the GType for this class, for use with the underlying GObject type system. | |
Protected Member Functions | |
void | operator delete (void *, std::size_t) |
Related Symbols | |
(Note that these are not member symbols.) | |
Glib::RefPtr< Gio::SettingsSchema > | wrap (GSettingsSchema *object, bool take_copy=false) |
A Glib::wrap() method for this object. | |
Introspecting and controlling the loading of GSettings schemas.
The SettingsSchemaSource and SettingsSchema APIs provide a mechanism for advanced control over the loading of schemas and a mechanism for introspecting their content.
Plugin loading systems that wish to provide plugins a way to access settings face the problem of how to make the schemas for these settings visible to GSettings. Typically, a plugin will want to ship the schema along with itself and it won't be installed into the standard system directories for schemas.
SettingsSchemaSource provides a mechanism for dealing with this by allowing the creation of a new 'schema source' from which schemas can be acquired. This schema source can then become part of the metadata associated with the plugin and queried whenever the plugin requires access to some settings.
|
delete |
|
delete |
Glib::ustring Gio::SettingsSchema::get_id | ( | ) | const |
Get the ID of schema.
Glib::RefPtr< SettingsSchemaKey > Gio::SettingsSchema::get_key | ( | const Glib::ustring & | name | ) |
Gets the key named name from schema.
It is a programmer error to request a key that does not exist. See g_settings_schema_list_keys().
name | The name of a key. |
Glib::RefPtr< const SettingsSchemaKey > Gio::SettingsSchema::get_key | ( | const Glib::ustring & | name | ) | const |
Gets the key named name from schema.
It is a programmer error to request a key that does not exist. See g_settings_schema_list_keys().
name | The name of a key. |
Glib::ustring Gio::SettingsSchema::get_path | ( | ) | const |
Gets the path associated with schema, or nullptr
.
Schemas may be single-instance or relocatable. Single-instance schemas correspond to exactly one set of keys in the backend database: those located at the path returned by this function.
Relocatable schemas can be referenced by other schemas and can therefore describe multiple sets of keys at different locations. For relocatable schemas, this function will return nullptr
.
nullptr
. Get the GType for this class, for use with the underlying GObject type system.
GSettingsSchema * Gio::SettingsSchema::gobj | ( | ) |
Provides access to the underlying C instance.
const GSettingsSchema * Gio::SettingsSchema::gobj | ( | ) | const |
Provides access to the underlying C instance.
GSettingsSchema * Gio::SettingsSchema::gobj_copy | ( | ) | const |
Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs.
bool Gio::SettingsSchema::has_key | ( | const Glib::ustring & | name | ) | const |
Checks if schema has a key named name.
name | The name of a key. |
true
if such a key exists. std::vector< Glib::ustring > Gio::SettingsSchema::list_children | ( | ) | const |
Gets the list of children in schema.
std::vector< Glib::ustring > Gio::SettingsSchema::list_keys | ( | ) | const |
Introspects the list of keys on schema.
You should probably not be calling this function from "normal" code (since you should already know what keys are in your schema). This function is intended for introspection reasons.
|
delete |
void Gio::SettingsSchema::reference | ( | ) | const |
Increment the reference count for this object.
You should never need to do this manually - use the object via a RefPtr instead.
void Gio::SettingsSchema::unreference | ( | ) | const |
Decrement the reference count for this object.
You should never need to do this manually - use the object via a RefPtr instead.
|
related |
A Glib::wrap() method for this object.
object | The C instance. |
take_copy | False if the result should take ownership of the C instance. True if it should take a new copy or ref. |