Package-level declarations

Types

Link copied to clipboard
class DesktopPortal(connection: DBusConnection) : AutoCloseable

Main entry point for accessing XDG Desktop Portal interfaces. Manages the D-Bus connection and provides access to individual portals.

Link copied to clipboard

Represents how a portal session should persist. Used by RemoteDesktop and ScreenCast portals.

Properties

Link copied to clipboard
const val BUS_NAME: String

D-Bus bus name for the desktop portal.

Link copied to clipboard
val EMPTY_OPTIONS: Map<String, Variant<*>>

Empty D-Bus options map, reusable across portals.

Link copied to clipboard
const val OBJECT_PATH: String

D-Bus object path for the desktop portal.

Link copied to clipboard

Option key for the request handle token. Used to identify the request object path.

Link copied to clipboard

Option key for persist mode. Controls how long permissions persist.

Link copied to clipboard

Option key for restore token. Used to restore a previous session.

Link copied to clipboard

Option key for the session handle token. Used in portal CreateSession methods.

Link copied to clipboard
const val OPTION_TYPES: String

Option key for types bitmask (device types, source types, etc.). Used in SelectDevices, SelectSources, and similar portal methods.

Link copied to clipboard

Result key for restore token returned in Start response.

Link copied to clipboard

Result key for the session handle returned in responses.

Link copied to clipboard
const val TOKEN_PREFIX: String

Prefix used for all portal request tokens.

Functions

Link copied to clipboard

Generates a unique token for portal request handles. The token is used as the last element of a handle path: /org/freedesktop/portal/desktop/request/SENDER/TOKEN Reference: https://flatpak.github.io/xdg-desktop-portal/docs/doc-org.freedesktop.portal.Request.html

Link copied to clipboard

Whether the application is running inside a Flatpak sandbox. https://docs.flatpak.org/en/latest/flatpak-command-reference.html

Link copied to clipboard

Whether the application is running inside any sandbox (Snap or Flatpak). This is a somewhat naive detection. Is there a more reliable method?

Link copied to clipboard

Whether the application is running inside a Snap package. https://snapcraft.io/docs/reference/development/environment-variables/