Xdp.Settings

g GObject.Object GObject.Object Xdp.Settings Xdp.Settings GObject.Object->Xdp.Settings

Subclasses:

None

Methods

Inherited:

GObject.Object (37)

Structs:

GObject.ObjectClass (5)

read_all_values (namespaces, cancellable)

read_string (namespace, key, cancellable)

read_uint (namespace, key, cancellable)

read_value (namespace, key, cancellable)

Virtual Methods

Inherited:

GObject.Object (7)

Properties

None

Signals

Inherited:

GObject.Object (1)

Name

Short Description

changed

Emitted when a setting value is changed externally.

Fields

Inherited:

GObject.Object (1)

Class Details

class Xdp.Settings(**kwargs)
Bases:

GObject.Object

Abstract:

No

Structure:

Xdp.SettingsClass

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:
Raises:

GLib.Error

Returns:

a value containing all the values, or None if not found. If error is not None, then the error is returned.

Return type:

GLib.Variant

Read all the setting values within namespace.

read_string(namespace, key, cancellable)
Parameters:
Raises:

GLib.Error

Returns:

the stringint value, or None if not found or not the right type. If error is not None, then the error is returned.

Return type:

str

Read a setting value as unsigned int within namespace, with key.

read_uint(namespace, key, cancellable)
Parameters:
Raises:

GLib.Error

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:

int

Read a setting value as unsigned int within namespace, with key.

read_value(namespace, key, cancellable)
Parameters:
Raises:

GLib.Error

Returns:

the value, or None if not found. If error is not None, then the error is returned.

Return type:

GLib.Variant

Read a setting value within namespace, with key.

Signal Details

Xdp.Settings.signals.changed(settings, namespace, key, value)
Signal Name:

changed

Flags:

RUN_FIRST

Parameters:
  • settings (Xdp.Settings) – The object which received the signal

  • namespace (str) – the value namespace

  • key (str) – the value key

  • value (GLib.Variant) – the value

Emitted when a setting value is changed externally.