Xdp.Settings¶
- Subclasses:
None
Methods¶
- Inherited:
- Structs:
|
|
|
|
|
|
|
Virtual Methods¶
- Inherited:
Properties¶
None
Signals¶
- Inherited:
Name |
Short Description |
---|---|
Emitted when a setting value is changed externally. |
Fields¶
- Inherited:
Class Details¶
- class Xdp.Settings(**kwargs)¶
- Bases:
- Abstract:
No
- Structure:
A representation of the settings exposed by the portal.
The [class`Settings`] object is used to access and observe the settings exposed by xdg-desktop-portal.
It is obtained from [method`Portal`.get_settings]. Call [method`Settings`.read_value] to read a settings value. Connect to [signal`Settings`:py:func:::changed<Xdp.Settings.signals.changed>] to observe value changes.
- read_all_values(namespaces, cancellable)¶
- Parameters:
namespaces (
str
) – List of namespaces to filter results by, supports simple globbing explained below.cancellable (
Gio.Cancellable
orNone
) – aGio.Cancellable
orNone
.
- Raises:
- Returns:
a value containing all the values, or
None
if not found. If error is notNone
, then the error is returned.- Return type:
Read all the setting values within namespace.
- read_string(namespace, key, cancellable)¶
- Parameters:
namespace (
str
) – the namespace of the value.key (
str
) – the key of the value.cancellable (
Gio.Cancellable
orNone
) – aGio.Cancellable
orNone
.
- Raises:
- Returns:
the stringint value, or
None
if not found or not the right type. If error is notNone
, then the error is returned.- Return type:
Read a setting value as unsigned int within namespace, with key.
- read_uint(namespace, key, cancellable)¶
- Parameters:
namespace (
str
) – the namespace of the value.key (
str
) – the key of the value.cancellable (
Gio.Cancellable
orNone
) – aGio.Cancellable
orNone
.
- Raises:
- Returns:
the uint value, or 0 if not found or not the right type. If error is not
None
, then the error is returned.- Return type:
Read a setting value as unsigned int within namespace, with key.
- read_value(namespace, key, cancellable)¶
- Parameters:
namespace (
str
) – the namespace of the value.key (
str
) – the key of the value.cancellable (
Gio.Cancellable
orNone
) – aGio.Cancellable
orNone
.
- Raises:
- Returns:
the value, or
None
if not found. If error is notNone
, then the error is returned.- Return type:
Read a setting value within namespace, with key.
Signal Details¶
- Xdp.Settings.signals.changed(settings, namespace, key, value)¶
- Signal Name:
changed
- Flags:
- Parameters:
settings (
Xdp.Settings
) – The object which received the signalnamespace (
str
) – the value namespacekey (
str
) – the value keyvalue (
GLib.Variant
) – the value
Emitted when a setting value is changed externally.