settings

package
v0.4.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 8, 2025 License: Apache-2.0 Imports: 2 Imported by: 6

Documentation

Overview

Package settings provides read-only access to a small number of host settings required for toolkits similar to XSettings. It is not for general purpose settings. Upstream API documentation can be found at https://flatpak.github.io/xdg-desktop-portal/docs/doc-org.freedesktop.portal.Settings.html.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func OnSignalSettingChanged added in v0.2.0

func OnSignalSettingChanged(callback func(changed Changed)) error

OnSignalSettingChanged listens for the SettingChanged signal. This signal is emitted when a setting changes.

func ReadAll added in v0.2.0

func ReadAll(namespaces []string) (map[string](map[string]dbus.Variant), error)

ReadAll returns all values for the corresponding namespaces passed. If namespaces is an empty array or contains an empty string it matches all. Globbing is supported but only for trailing sections, e.g. “org.example.*”.

func ReadOne added in v0.2.0

func ReadOne(namespace, key string) (any, error)

ReadOne reads a single value which may be any valid DBus type. Returns an error on any unknown namespace or key.

Types

type Changed added in v0.2.0

type Changed struct {
	Namespace string // Namespace of changed setting.
	Key       string // The key of changed setting.
	Value     any    // The new value.
}

Changed is the result given when a setting changes its value.

Directories

Path Synopsis
Package appearance is a helper package for reading appearance settings.
Package appearance is a helper package for reading appearance settings.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL