init
Some checks failed
Docker. / Ubuntu (push) Has been cancelled
User-agent updater. / User-agent (push) Failing after 15s
Lock Threads / lock (push) Failing after 10s
Waiting for answer. / waiting-for-answer (push) Failing after 22s
Needs user action. / needs-user-action (push) Failing after 8s
Can't reproduce. / cant-reproduce (push) Failing after 8s
Close stale issues and PRs / stale (push) Has been cancelled

This commit is contained in:
allhaileris
2026-02-16 15:50:16 +03:00
commit afb81b8278
13816 changed files with 3689732 additions and 0 deletions

View File

@@ -0,0 +1,79 @@
# This file is built into the GDbus sources but does not get installed by us
flatpak_intf_sources = []
if flatpak_intf_dir != ''
flatpak_intf_sources = files(flatpak_intf_dir / 'org.freedesktop.portal.Flatpak.xml')
endif
portal_sources = files(
'org.freedesktop.portal.Account.xml',
'org.freedesktop.portal.Background.xml',
'org.freedesktop.portal.Camera.xml',
'org.freedesktop.portal.Clipboard.xml',
'org.freedesktop.portal.Documents.xml',
'org.freedesktop.portal.DynamicLauncher.xml',
'org.freedesktop.portal.Email.xml',
'org.freedesktop.portal.FileChooser.xml',
'org.freedesktop.portal.FileTransfer.xml',
'org.freedesktop.portal.GameMode.xml',
'org.freedesktop.portal.GlobalShortcuts.xml',
'org.freedesktop.portal.Inhibit.xml',
'org.freedesktop.portal.InputCapture.xml',
'org.freedesktop.portal.Location.xml',
'org.freedesktop.portal.MemoryMonitor.xml',
'org.freedesktop.portal.NetworkMonitor.xml',
'org.freedesktop.portal.Notification.xml',
'org.freedesktop.portal.OpenURI.xml',
'org.freedesktop.portal.PowerProfileMonitor.xml',
'org.freedesktop.portal.Print.xml',
'org.freedesktop.portal.ProxyResolver.xml',
'org.freedesktop.portal.Realtime.xml',
'org.freedesktop.portal.RemoteDesktop.xml',
'org.freedesktop.portal.Request.xml',
'org.freedesktop.portal.ScreenCast.xml',
'org.freedesktop.portal.Screenshot.xml',
'org.freedesktop.portal.Secret.xml',
'org.freedesktop.portal.Session.xml',
'org.freedesktop.portal.Settings.xml',
'org.freedesktop.portal.Trash.xml',
'org.freedesktop.portal.Usb.xml',
'org.freedesktop.portal.Wallpaper.xml',
)
portal_host_sources = files(
'org.freedesktop.host.portal.Registry.xml',
)
portal_impl_sources = files(
'org.freedesktop.impl.portal.Access.xml',
'org.freedesktop.impl.portal.Account.xml',
'org.freedesktop.impl.portal.AppChooser.xml',
'org.freedesktop.impl.portal.Background.xml',
'org.freedesktop.impl.portal.Clipboard.xml',
'org.freedesktop.impl.portal.DynamicLauncher.xml',
'org.freedesktop.impl.portal.Email.xml',
'org.freedesktop.impl.portal.FileChooser.xml',
'org.freedesktop.impl.portal.GlobalShortcuts.xml',
'org.freedesktop.impl.portal.Inhibit.xml',
'org.freedesktop.impl.portal.InputCapture.xml',
'org.freedesktop.impl.portal.Lockdown.xml',
'org.freedesktop.impl.portal.Notification.xml',
'org.freedesktop.impl.portal.PermissionStore.xml',
'org.freedesktop.impl.portal.Print.xml',
'org.freedesktop.impl.portal.RemoteDesktop.xml',
'org.freedesktop.impl.portal.Request.xml',
'org.freedesktop.impl.portal.ScreenCast.xml',
'org.freedesktop.impl.portal.Screenshot.xml',
'org.freedesktop.impl.portal.Secret.xml',
'org.freedesktop.impl.portal.Session.xml',
'org.freedesktop.impl.portal.Settings.xml',
'org.freedesktop.impl.portal.Usb.xml',
'org.freedesktop.impl.portal.Wallpaper.xml',
)
background_monitor_sources = files(
'org.freedesktop.background.Monitor.xml',
)
install_data([portal_sources, portal_host_sources, portal_impl_sources],
install_dir: datadir / 'dbus-1' / 'interfaces',
)

View File

@@ -0,0 +1,59 @@
<?xml version="1.0"?>
<!--
Copyright (C) 2022 Endless OS Foundation, LLC
SPDX-License-Identifier: LGPL-2.1-or-later
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library. If not, see <http://www.gnu.org/licenses/>.
Author: Georges Basile Stavracas Neto <georges@endlessos.org>
-->
<node name="/" xmlns:doc="http://www.freedesktop.org/dbus/1.0/doc.dtd">
<!--
org.freedesktop.background.Monitor:
@short_description: Background applications monitor
This interface provides APIs related to applications
that are running in the background.
This documentation describes version 1 of this interface.
-->
<interface name="org.freedesktop.background.Monitor">
<!--
BackgroundApps:
The list of applications that are considered to be running in
background. The following keys are supported:
* ``app_id`` (``s``)
App id of the application.
* ``instance`` (``s``)
The Flatpak instance of the application.
* ``message`` (``s``)
Status message reported by the application. Optional.
-->
<property name="BackgroundApps" type="aa{sv}" access="read">
<annotation name="org.qtproject.QtDBus.QtTypeName" value="QList&lt;QVariantMap&gt;"/>
</property>
<property name="version" type="u" access="read"/>
</interface>
</node>

View File

@@ -0,0 +1,66 @@
<?xml version="1.0"?>
<!--
Copyright (C) 2024 Red Hat, Inc.
SPDX-License-Identifier: LGPL-2.1-or-later
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library. If not, see <http://www.gnu.org/licenses/>.
Author: Jonas Ådahl <jadahl@redhat.com>
-->
<node name="/" xmlns:doc="http://www.freedesktop.org/dbus/1.0/doc.dtd">
<!--
org.freedesktop.host.portal.Registry:
@short_description: Interface to associate D-Bus peers with application ids
This simple interface lets unsandboxed applications register their
D-Bus connections and associate it with an application ID that will be
used in portals.
This interface will not work with applications xdg-desktop-portal
identifies as sandboxed.
This documentation describes version 1 of this interface.
-->
<interface name="org.freedesktop.host.portal.Registry">
<!--
Register:
@app_id: Application identifier
@options: Vardict with optional further information
Register a D-Bus peer and associate it with an application ID. The
application ID must be able to match the basename of a .desktop file
that describes the application.
The application ID will be used in org.freedesktop.portal APIs to
associate a portal action with an application.
Registering can only done at most once; any subsequent call will result
in an error.
Registering must be done before any portal method call; registering
after such a call will result in an error.
Applications should ideally listen for name appeared D-Bus signalling to
re-register the peer if the portal service is restarted.
-->
<method name="Register">
<arg type="s" name="app_id" direction="in"/>
<annotation name="org.qtproject.QtDBus.QtTypeName.In1" value="QVariantMap"/>
<arg type="a{sv}" name="options" direction="in"/>
</method>
<property name="version" type="u" access="read"/>
</interface>
</node>

View File

@@ -0,0 +1,91 @@
<?xml version="1.0"?>
<!--
Copyright (C) 2016 Red Hat, Inc.
SPDX-License-Identifier: LGPL-2.1-or-later
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library. If not, see <http://www.gnu.org/licenses/>.
Author: Matthias Clasen <mclasen@redhat.com>
-->
<node name="/" xmlns:doc="http://www.freedesktop.org/dbus/1.0/doc.dtd">
<!--
org.freedesktop.impl.portal.Access:
@short_description: Interface for presenting an access dialog
This backend can be used by portal implementations that
need to ask a direct access question, such as "May xyz
use the microphone?"
-->
<interface name="org.freedesktop.impl.portal.Access">
<!--
AccessDialog:
@handle: Object path to export the Request object at
@app_id: App id of the application
@parent_window: Identifier for the application window, see :doc:`window-identifiers`
@title: Title for the dialog
@subtitle: Subtitle for the dialog
@body: Body text, may be ""
@options: Vardict with optional further information
@response: Numeric response. The values allowed match the values allowed for :ref:`org.freedesktop.portal.Request::Response` signal.
@results: Vardict with the results of the call
Presents a "deny/grant" question to the user.
Supported keys in the @options include:
* ``modal`` (``b``)
Whether to make the dialog modal. Defaults to true.
* ``deny_label`` (``s``)
Label for the Deny button.
* ``grant_label`` (``s``)
Label for the Grant button.
* ``icon`` (``s``)
Icon name for an icon to show in the dialog. This should be a symbolic icon name.
* ``choices`` (``a(ssa(ss)s)``)
List of serialized choices.
See :ref:`org.freedesktop.portal.FileChooser.OpenFile` for details.
The following results get returned via the @results vardict:
* ``choices`` (``a(ss)``)
An array of pairs of strings, corresponding to the passed-in choices.
See :ref:`org.freedesktop.portal.FileChooser.OpenFile` for details.
-->
<method name="AccessDialog">
<arg type="o" name="handle" direction="in"/>
<arg type="s" name="app_id" direction="in"/>
<arg type="s" name="parent_window" direction="in"/>
<arg type="s" name="title" direction="in"/>
<arg type="s" name="subtitle" direction="in"/>
<arg type="s" name="body" direction="in"/>
<annotation name="org.qtproject.QtDBus.QtTypeName.In6" value="QVariantMap"/>
<arg type="a{sv}" name="options" direction="in"/>
<arg type="u" name="response" direction="out"/>
<annotation name="org.qtproject.QtDBus.QtTypeName.Out1" value="QVariantMap"/>
<arg type="a{sv}" name="results" direction="out"/>
</method>
</interface>
</node>

View File

@@ -0,0 +1,79 @@
<?xml version="1.0"?>
<!--
Copyright (C) 2016 Red Hat, Inc.
SPDX-License-Identifier: LGPL-2.1-or-later
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library. If not, see <http://www.gnu.org/licenses/>.
Author: Matthias Clasen <mclasen@redhat.com>
-->
<node name="/" xmlns:doc="http://www.freedesktop.org/dbus/1.0/doc.dtd">
<!--
org.freedesktop.impl.portal.Account:
@short_description: Backend for the portal for obtaining user information
This Account portal lets sandboxed applications query basic
information about the user, like their name and avatar photo.
The portal backend will present the user with a dialog to confirm
which (if any) information to share.
-->
<interface name="org.freedesktop.impl.portal.Account">
<!--
GetUserInformation:
@handle: Object path for the :ref:`org.freedesktop.portal.Request` object representing this call
@app_id: App id of the application
@window: Identifier for the application window, see :doc:`window-identifiers`
@options: Vardict with optional further information
@response: Numeric response
@results: Vardict with the results of the call
Gets information about the user.
Supported keys in the @options vardict include:
* ``reason`` (``s``)
A string that can be shown in the dialog to expain why the information is needed.
This should be a complete sentence that explains what the application will do with
the returned information, for example: Allows your personal information to be included
with recipes you share with your friends.
The following results get returned via the @results vardict:
* ``id`` (``s``)
The user id.
* ``name`` (``s``)
The users real name.
* ``image`` (``s``)
The URI of an image file for the users avatar photo.
-->
<method name="GetUserInformation">
<arg type="o" name="handle" direction="in"/>
<arg type="s" name="app_id" direction="in"/>
<arg type="s" name="window" direction="in"/>
<annotation name="org.qtproject.QtDBus.QtTypeName.In3" value="QVariantMap"/>
<arg type="a{sv}" name="options" direction="in"/>
<arg type="u" name="response" direction="out"/>
<annotation name="org.qtproject.QtDBus.QtTypeName.Out1" value="QVariantMap"/>
<arg type="a{sv}" name="results" direction="out"/>
</method>
</interface>
</node>

View File

@@ -0,0 +1,117 @@
<?xml version="1.0"?>
<!--
Copyright (C) 2016 Red Hat, Inc.
SPDX-License-Identifier: LGPL-2.1-or-later
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library. If not, see <http://www.gnu.org/licenses/>.
Author: Matthias Clasen <mclasen@redhat.com>
-->
<node xmlns:doc="http://www.freedesktop.org/dbus/1.0/doc.dtd" name="/">
<!--
org.freedesktop.impl.portal.AppChooser:
@short_description: Interface for choosing an application
This backend can be used by portal implementations that
need to choose an application from a list of applications.
This documentation describes version 2 of this interface.
-->
<interface name="org.freedesktop.impl.portal.AppChooser">
<!--
ChooseApplication:
@handle: Object path to export the Request object at
@app_id: App id of the application
@title: Title for the app chooser dialog
@parent_window: Identifier for the application window, see :doc:`window-identifiers`
@choices: App ids of applications to let the user choose from
@options: Vardict with optional further information
@response: Numeric response
@results: Vardict with the results of the call
Presents a list of applications to the user to choose one.
Supported keys in the @options vardict include:
* ``last_choice`` (``s``)
The app id that was selected the last time.
* ``modal`` (``b``)
Whether to make the dialog modal. Defaults to yes.
* ``content_type`` (``s``)
The content type to choose an application for.
* ``uri`` (``s``)
The uri to choose an application for.
* ``filename`` (``s``)
The filename to choose an application for. Note that this is just a
basename, without a path.
* ``activation_token`` (``s``)
A token that can be used to activate the application chooser.
The activation_token option was introduced in version 2 of the interface.
The following results get returned via the @results vardict:
* ``choice`` (``s``)
The app id that was selected.
* ``activation_token`` (``s``)
A token that can be used to activate the chosen application. If
the application selection has involved user interaction, a new
token should be generated by the portal implementation.
Otherwise, this token may be the same as the one passed in
@options.
The activation_token option was introduced in version 2 of the interface.
-->
<method name="ChooseApplication">
<arg type="o" name="handle" direction="in"/>
<arg type="s" name="app_id" direction="in"/>
<arg type="s" name="parent_window" direction="in"/>
<arg type="as" name="choices" direction="in"/>
<annotation name="org.qtproject.QtDBus.QtTypeName.In4" value="QVariantMap"/>
<arg type="a{sv}" name="options" direction="in"/>
<arg type="u" name="response" direction="out"/>
<annotation name="org.qtproject.QtDBus.QtTypeName.Out1" value="QVariantMap"/>
<arg type="a{sv}" name="results" direction="out"/>
</method>
<!--
UpdateChoices:
@handle: the request handle
@choices: App ids of applications to let the user choose from
This method can be called between the time of a ChooseApplication call
and receiving the Response signal, to update the list of applications
that are offered by the backend.
-->
<method name="UpdateChoices">
<arg type="o" name="handle" direction="in"/>
<arg type="as" name="choices" direction="in"/>
</method>
</interface>
</node>

View File

@@ -0,0 +1,114 @@
<?xml version="1.0"?>
<!--
Copyright (C) 2019 Red Hat, Inc
SPDX-License-Identifier: LGPL-2.1-or-later
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library. If not, see <http://www.gnu.org/licenses/>.
Author: Matthias Clasen <mclasen@redhat.com>
-->
<node name="/" xmlns:doc="http://www.freedesktop.org/dbus/1.0/doc.dtd">
<!--
org.freedesktop.impl.portal.Background:
@short_description: Background portal backend interface
This interface provides APIs related to applications
that are running in the background.
-->
<interface name="org.freedesktop.impl.portal.Background">
<!--
GetAppState:
@apps: an array with information about running apps
Gets information about running apps. Each entry has
an application ID as key. The returned values are of
type u and have the following meaning:
- ``0``: Background (no open window)
- ``1``: Running (at least one open window)
- ``2``: Active (in the foreground)
-->
<method name="GetAppState">
<annotation name="org.qtproject.QtDBus.QtTypeName.Out0" value="QVariantMap"/>
<arg type="a{sv}" name="apps" direction="out"/>
</method>
<!--
NotifyBackground:
@handle: Object path for the :ref:`org.freedesktop.impl.portal.Request` object representing this call
@app_id: App id of the application
@name: A display name for the application
@response: Numeric response, not used
@results: Vardict with results of the call
Notifies the user that an application is running in the background.
The following results get returned via the @results vardict:
* ``result`` (``u``)
The choice that the user made regarding the background
activity:
- ``0``: Forbid background activity by this app
- ``1``: Allow background activity by this app
- ``2``: Allow this instance of background activity
-->
<method name="NotifyBackground">
<arg type="o" name="handle" direction="in"/>
<arg type="s" name="app_id" direction="in"/>
<arg type="s" name="name" direction="in"/>
<arg type="u" name="response" direction="out"/>
<annotation name="org.qtproject.QtDBus.QtTypeName.Out1" value="QVariantMap"/>
<arg type="a{sv}" name="results" direction="out"/>
</method>
<!--
EnableAutostart:
@app_id: App id of the application
@enable: TRUE to enable autostart, FALSE to disable it
@commandline: The commandline to use in the autostart file
@flags: Flags influencing the details of the autostarting
@result: TRUE if autostart was enabled, FALSE otherwise
This is deprecated! New versions of xdg-desktop-portal will not
call this method.
Enables or disables autostart for an application.
The following flags are understood:
- ``1``: Use D-Bus activation
-->
<method name="EnableAutostart">
<arg type="s" name="app_id" direction="in"/>
<arg type="b" name="enable" direction="in"/>
<arg type="as" name="commandline" direction="in"/>
<arg type="u" name="flags" direction="in"/>
<arg type="b" name="result" direction="out"/>
</method>
<!--
RunningApplicationsChanged:
This signal gets emitted when applications change their state
and it is worth calling GetAppState again.
-->
<signal name="RunningApplicationsChanged">
</signal>
</interface>
</node>

View File

@@ -0,0 +1,175 @@
<?xml version="1.0"?>
<!--
Copyright 2022 Google LLC
SPDX-License-Identifier: LGPL-2.1-or-later
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library. If not, see <http://www.gnu.org/licenses/>.
-->
<node name="/"
xmlns:doc="http://www.freedesktop.org/dbus/1.0/doc.dtd">
<!--
org.freedesktop.impl.portal.Clipboard
@short_description: Clipboard portal backend interface
The Clipboard portal allows sessions to access the clipboard.
-->
<interface name="org.freedesktop.impl.portal.Clipboard">
<!--
RequestClipboard:
@session_handle: Object path for the :ref:`org.freedesktop.portal.Session` object
@options: Vardict with optional further information
Requests clipboard access for the given portal session. This request
must be made before the session starts.
This portal does NOT create it's own session. Instead, it offers existing sessions
created from other portals the option to integrate with the clipboard. For whether
this interface is supported for a given session, refer to that portal's documentation.
See :ref:`org.freedesktop.portal.RemoteDesktop` to integrate clipboard with the
remote desktop session.
-->
<method name="RequestClipboard">
<arg type="o" name="session_handle" direction="in"/>
<annotation name="org.qtproject.QtDBus.QtTypeName.In1" value="QVariantMap"/>
<arg type="a{sv}" name="options" direction="in"/>
</method>
<!--
SetSelection:
@session_handle: Object path for the :ref:`org.freedesktop.portal.Session` object
@options: Vardict with optional further information
Sets the owner of the clipboard formats in 'mime_types' in @options to
the session, i.e. this session has data for the advertised clipboard formats.
See :ref:`org.freedesktop.portal.FileTransfer` to transfer files using the
'application/vnd.portal.filetransfer' mimetype.
May only be called if clipboard access was given after starting the session.
Supported keys in the @options vardict include:
* ``mime_types`` (``as``)
A list of mime types that the session has clipboard content for.
-->
<method name="SetSelection">
<arg type="o" name="session_handle" direction="in"/>
<annotation name="org.qtproject.QtDBus.QtTypeName.In1" value="QVariantMap"/>
<arg type="a{sv}" name="options" direction="in"/>
</method>
<!--
SelectionWrite:
@session_handle: Object path for the :ref:`org.freedesktop.portal.Session` object
@serial: The serial of the request where this answer is directed towards
@fd: A UnixFD handle to the contents of the selection being written to
Answer to 'SelectionTransfer' signal. Transfers the clipboard content for
the given serial to the method callee via a file descriptor.
It is the Callee that creates the file descriptor.
May only be called if clipboard access was given after starting the session.
-->
<method name="SelectionWrite">
<annotation name="org.gtk.GDBus.C.UnixFD" value="true"/>
<arg type="o" name="session_handle" direction="in"/>
<arg type="u" name="serial" direction="in"/>
<arg type="h" name="fd" direction="out"/>
</method>
<!--
SelectionWriteDone:
@session_handle: Object path for the :ref:`org.freedesktop.portal.Session` object
@serial: The serial of the request where this answer is directed to
@success: A boolean which indicates whether the transfer of the clipboard data was successful (true') or not ('false')
Notifies that the transfer of the clipboard data has either completed
successfully, or failed.
May only be called if clipboard access was given after starting the session.
-->
<method name="SelectionWriteDone">
<arg type="o" name="session_handle" direction="in"/>
<arg type="u" name="serial" direction="in"/>
<arg type="b" name="success" direction="in"/>
</method>
<!--
SelectionRead:
@session_handle: Object path for the :ref:`org.freedesktop.portal.Session` object
@mime_type: The mime-type string of the requested format
@fd: A UnixFD handle to the contents of the selection being read
Transfer the clipboard content given the specified mime type to the
method caller via a file descriptor.
It is the callee that creates the file descriptor.
May only be called if clipboard access was given after starting the session.
-->
<method name="SelectionRead">
<annotation name="org.gtk.GDBus.C.UnixFD" value="true"/>
<arg type="o" name="session_handle" direction="in"/>
<arg type="s" name="mime_type" direction="in"/>
<arg type="h" name="fd" direction="out"/>
</method>
<!--
SelectionOwnerChanged:
@session_handle: Object path for the :ref:`org.freedesktop.portal.Session` object
@options: Vardict with optional further information
Notifies the session that the clipboard selection has changed.
Caller will only be notified if clipboard access was given after starting the session.
Supported keys in the @options vardict include:
* ``mime_types`` (``as``)
A list of mime types that the the new clipboard selection has content for.
* ``session_is_owner`` (``b``)
A boolean for whether the session is the owner of the clipboard selection
(``true``) or not (``false``).
-->
<signal name="SelectionOwnerChanged">
<arg type="o" name="session_handle" direction="out"/>
<annotation name="org.qtproject.QtDBus.QtTypeName.Out1" value="QVariantMap"/>
<arg type="a{sv}" name="options" direction="out"/>
</signal>
<!--
SelectionTransfer:
@session_handle: Object path for the :ref:`org.freedesktop.portal.Session` object
@mime_type: The mime-type string of the requested format
@serial: The serial used to track this transfer, to which the answer of this request must use
Notifies the session of a request for clipboard content of the given mime type. The
callee provides a serial to track the request, which any
:ref:`org.freedesktop.portal.Clipboard.SelectionWrite` responses must use.
Once the caller is done handling the 'SelectionTransfer' request, they must call
:ref:`org.freedesktop.portal.Clipboard.SelectionWriteDone` with the corresponding request's serial
and whether the request completed successfully. If the request is not handled, the caller should
respond by setting 'success' to 'false'.
Caller will only be notified if clipboard access was given after starting the session.
-->
<signal name="SelectionTransfer">
<arg type="o" name="session_handle" direction="out"/>
<arg type="s" name="mime_type" direction="out"/>
<arg type="u" name="serial" direction="out"/>
</signal>
<property name="version" type="u" access="read"/>
</interface>
</node>

View File

@@ -0,0 +1,131 @@
<?xml version="1.0"?>
<!--
Copyright (C) 2022 Matthew Leeds
SPDX-License-Identifier: LGPL-2.1-or-later
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library. If not, see <http://www.gnu.org/licenses/>.
Author: Matthew Leeds <mwleeds@protonmail.com>
-->
<node name="/" xmlns:doc="http://www.freedesktop.org/dbus/1.0/doc.dtd">
<!--
org.freedesktop.impl.portal.DynamicLauncher:
@short_description: Dynamic launcher portal backend interface
This documentation describes version 1 of this interface.
-->
<interface name="org.freedesktop.impl.portal.DynamicLauncher">
<!--
PrepareInstall:
@handle: Object path for the :ref:`org.freedesktop.impl.portal.Request` object representing this call
@app_id: App id of the application
@parent_window: Identifier for the application window, see :doc:`window-identifiers`
@name: The default name for the launcher
@icon_v: A #GBytesIcon as returned by g_icon_serialize()
@options: Vardict with optional further information
@response: Numeric response (0 == success)
@results: Vardict with the results of the call
Presents a dialog to the user to allow them to see the icon, potentially
change the name, and confirm installation of the launcher.
Supported keys in the @options vardict:
* ``modal`` (``b``)
Whether to make the dialog modal. Defaults to yes.
* ``launcher_type`` (``u``)
The type of launcher being created. For supported values see the
SupportedLauncherTypes property. Defaults to "Application".
* ``target`` (``s``)
For a launcher of type "Webapp", this is the URL of the web app
being installed. This is displayed in the user-facing dialog.
For other launcher types, this is not needed.
* ``editable_name`` (``b``)
If true, the user will be able to edit the name of the launcher.
Defaults to true.
* ``editable_icon`` (``b``)
If true, the user will be able to edit the icon of the launcher,
if the implementation supports this. Defaults to false.
The following results get returned via the @results vardict:
* ``name`` (``s``)
The name chosen by the user for the launcher (or the default if
the editable_name option was false).
* ``icon`` (``v``)
The icon chosen by the user for the launcher (or the default if
the ``editable_icon`` option was false).
-->
<method name="PrepareInstall">
<arg type="o" name="handle" direction="in"/>
<arg type="s" name="app_id" direction="in"/>
<arg type="s" name="parent_window" direction="in"/>
<arg type="s" name="name" direction="in"/>
<arg type="v" name="icon_v" direction="in"/>
<annotation name="org.qtproject.QtDBus.QtTypeName.In5" value="QVariantMap"/>
<arg type="a{sv}" name="options" direction="in"/>
<arg type="u" name="response" direction="out"/>
<annotation name="org.qtproject.QtDBus.QtTypeName.Out1" value="QVariantMap"/>
<arg type="a{sv}" name="results" direction="out"/>
</method>
<!--
RequestInstallToken:
@app_id: App id of the application
@options: Vardict with optional further information
@response: 0 if the caller should be allowed to do non-interactive launcher installation, a nonzero number otherwise
The @response returned by this method is used to determine whether to
give an install token to the caller, which can be used to avoid the need
for a confirmation dialog; the token can be passed to the
:ref:`org.freedesktop.portal.DynamicLauncher.Install` method just as if it
were acquired via the
:ref:`org.freedesktop.portal.DynamicLauncher.PrepareInstall` method.
It is up to the portal implementation to decide whether this method is
allowed based on the @app_id of the caller.
The @options vardict currently has no supported entries.
-->
<method name="RequestInstallToken">
<arg type="s" name="app_id" direction="in"/>
<annotation name="org.qtproject.QtDBus.QtTypeName.In1" value="QVariantMap"/>
<arg type="a{sv}" name="options" direction="in"/>
<arg type="u" name="response" direction="out"/>
</method>
<!--
SupportedLauncherTypes:
A bitmask of available launcher types. Currently defined types are:
- ``1``: Application. A launcher that represents an application.
- ``2``: Webapp. A launcher that represents a web app.
-->
<property name="SupportedLauncherTypes" type="u" access="read"/>
<property name="version" type="u" access="read"/>
</interface>
</node>

View File

@@ -0,0 +1,87 @@
<?xml version="1.0"?>
<!--
Copyright (C) 2017 Red Hat, Inc.
SPDX-License-Identifier: LGPL-2.1-or-later
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library. If not, see <http://www.gnu.org/licenses/>.
Author: Matthias Clasen <mclasen@redhat.com>
-->
<node name="/" xmlns:doc="http://www.freedesktop.org/dbus/1.0/doc.dtd">
<!--
org.freedesktop.impl.portal.Email:
@short_description: Email portal backend interface
This Email portal lets sandboxed applications request sending an email.
-->
<interface name="org.freedesktop.impl.portal.Email">
<!--
ComposeEmail:
@handle: Object path for the :ref:`org.freedesktop.impl.portal.Request` object representing this call
@app_id: App id of the application
@parent_window: Identifier for the application window, see :doc:`window-identifiers`
@options: Vardict with optional further information
@response: Numeric response
@results: Vardict with the results of the call
Lets the user compose an email.
Supported keys in the @options vardict include:
* ``address`` (``s``)
The email address to send to.
* ``addresses`` (``as``)
Email addresses to send to.
* ``cc`` (``as``)
Email addresses to cc.
* ``bcc`` (``as``)
Email addresses to bcc.
* ``subject`` (``s``)
The subject for the email.
* ``body`` (``s``)
The body for the email.
* ``attachments`` (``as``)
The uris for files to attach.
* ``activation_token`` (``s``)
A token that can be used to activate the chosen application.
-->
<method name="ComposeEmail">
<arg type="o" name="handle" direction="in"/>
<arg type="s" name="app_id" direction="in"/>
<arg type="s" name="parent_window" direction="in"/>
<annotation name="org.qtproject.QtDBus.QtTypeName.In3" value="QVariantMap"/>
<arg type="a{sv}" name="options" direction="in"/>
<arg type="u" name="response" direction="out"/>
<annotation name="org.qtproject.QtDBus.QtTypeName.Out1" value="QVariantMap"/>
<arg type="a{sv}" name="results" direction="out"/>
</method>
</interface>
</node>

View File

@@ -0,0 +1,269 @@
<?xml version="1.0"?>
<!--
Copyright (C) 2015 Red Hat, Inc.
SPDX-License-Identifier: LGPL-2.1-or-later
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library. If not, see <http://www.gnu.org/licenses/>.
Author: Alexander Larsson <alexl@redhat.com>
-->
<node xmlns:doc="http://www.freedesktop.org/dbus/1.0/doc.dtd" name="/">
<!--
org.freedesktop.impl.portal.FileChooser:
@short_description: File chooser portal backend interface
The FileChooser portal allows sandboxed applications to ask
the user for access to files outside the sandbox. The portal
backend will present the user with a file chooser dialog.
Backends must normalize URIs of locations selected by the
user into "file://" URIs. URIs that cannot be normalized
should be discarded.
-->
<interface name="org.freedesktop.impl.portal.FileChooser">
<!--
OpenFile:
@handle: Object path for the :ref:`org.freedesktop.impl.portal.Request` object representing this call
@app_id: App id of the application
@parent_window: Identifier for the application window, see :doc:`window-identifiers`
@title: Title for the file chooser dialog
@options: Vardict with optional further information
@response: Numeric response
@results: Vardict with the results of the call
Presents a file chooser dialog to the user to open one or more files.
Supported keys in the @options vardict include:
* ``accept_label`` (``s``)
The label for the accept button. Mnemonic underlines are allowed.
* ``modal`` (``b``)
Whether to make the dialog modal. Default is yes.
* ``multiple`` (``b``)
Whether to allow selection of multiple files. Default is no.
* ``directory`` (``b``)
Whether to select for folders instead of files. Default is to select files.
* ``filters`` (``a(sa(us))``)
A list of serialized file filters.
See :ref:`org.freedesktop.portal.FileChooser.OpenFile` for details.
* ``current_filter`` (``(sa(us))``)
Request that this filter be set by default at dialog creation.
See :ref:`org.freedesktop.portal.FileChooser.OpenFile` for details.
* ``choices`` (``a(ssa(ss)s)``)
A list of serialized combo boxes.
See :ref:`org.freedesktop.portal.FileChooser.OpenFile` for details.
* ``current_folder`` (``ay``)
A suggested folder to open the files from.
See :ref:`org.freedesktop.portal.FileChooser.OpenFile` for details.
The following results get returned via the @results vardict:
* ``uris`` (``as``)
An array of strings containing the uris of the selected files. All
URIs must have the ``file://`` scheme.
* ``choices`` (``a(ss)``)
An array of pairs of strings, corresponding to the passed-in choices.
See :ref:`org.freedesktop.portal.FileChooser.OpenFile` for details.
* ``current_filter`` (``(sa(us))``)
The filter that was selected.
See :ref:`org.freedesktop.portal.FileChooser.OpenFile` for details.
* ``writable`` (``b``)
Whether the file is opened with write access. Default is ``false``.
-->
<method name="OpenFile">
<arg type="o" name="handle" direction="in"/>
<arg type="s" name="app_id" direction="in"/>
<arg type="s" name="parent_window" direction="in"/>
<arg type="s" name="title" direction="in"/>
<annotation name="org.qtproject.QtDBus.QtTypeName.In4" value="QVariantMap"/>
<arg type="a{sv}" name="options" direction="in"/>
<arg type="u" name="response" direction="out"/>
<annotation name="org.qtproject.QtDBus.QtTypeName.Out1" value="QVariantMap"/>
<arg type="a{sv}" name="results" direction="out"/>
</method>
<!--
SaveFile:
@handle: Object path for the :ref:`org.freedesktop.impl.portal.Request` object representing this call
@app_id: App id of the application
@parent_window: Identifier for the application window, see :doc:`window-identifiers`
@title: Title for the file chooser dialog
@options: Vardict with optional further information
@response: Numeric response
@results: Vardict with the results of the call
Presents a file chooser dialog to the user to save a file.
Supported keys in the @options vardict include:
* ``accept_label`` (``s``)
The label for the accept button. Mnemonic underlines are allowed.
* ``modal`` (``b``)
Whether to make the dialog modal. Default is yes.
* ``multiple`` (``b``)
Whether to allow selection of multiple files. Default is no.
* ``filters`` (``a(sa(us))``)
A list of serialized file filters.
See :ref:`org.freedesktop.portal.FileChooser.OpenFile` for details.
* ``current_filter`` (``(sa(us))``)
Request that this filter be set by default at dialog creation.
See :ref:`org.freedesktop.portal.FileChooser.OpenFile` for details.
* ``choices`` (``a(ssa(ss)s)``)
A list of serialized combo boxes.
See :ref:`org.freedesktop.portal.FileChooser.OpenFile` for details.
* ``current_name`` (``s``)
A suggested filename.
* ``current_folder`` (``ay``)
A suggested folder to save the file in.
* ``current_file`` (``ay``)
The current file (when saving an existing file).
The following results get returned via the @results vardict:
* ``uris`` (``as``)
An array of strings containing the uri of the selected file. All
URIs must have the "file://" scheme.
* ``choices`` (``a(ss)``)
An array of pairs of strings, corresponding to the passed-in choices.
See :ref:`org.freedesktop.portal.FileChooser.OpenFile` for details.
* ``current_filter`` (``(sa(us))``)
The filter that was selected.
See :ref:`org.freedesktop.portal.FileChooser.OpenFile` for details.
-->
<method name="SaveFile">
<arg type="o" name="handle" direction="in"/>
<arg type="s" name="app_id" direction="in"/>
<arg type="s" name="parent_window" direction="in"/>
<arg type="s" name="title" direction="in"/>
<annotation name="org.qtproject.QtDBus.QtTypeName.In4" value="QVariantMap"/>
<arg type="a{sv}" name="options" direction="in"/>
<arg type="u" name="response" direction="out"/>
<annotation name="org.qtproject.QtDBus.QtTypeName.Out1" value="QVariantMap"/>
<arg type="a{sv}" name="results" direction="out"/>
</method>
<!--
SaveFiles:
@parent_window: Identifier for the application window, see :doc:`window-identifiers`
@title: Title for the file chooser dialog
@options: Vardict with optional further information
@handle: Object path for the :ref:`org.freedesktop.portal.Request` object representing this call
@response: Numeric response
@results: Vardict with the results of the call
Asks for a folder as a location to save one or more files. The
names of the files will be used as-is and appended to the
selected folder's path in the list of returned files. If the
selected folder already contains a file with one of the given
names, the portal may prompt or take some other action to
construct a unique file name and return that instead.
Supported keys in the @options vardict include:
* ``accept_label`` (``s``)
Label for the accept button. Mnemonic underlines are allowed.
* ``modal`` (``b``)
Whether the dialog should be modal. Default is yes.
* ``choices`` (``a(ssa(ss)s)``)
List of serialized combo boxes.
See :ref:`org.freedesktop.portal.FileChooser.OpenFile` for details.
* ``current_folder`` (``ay``)
Suggested folder to save the files in. The byte array is
expected to be null-terminated.
* ``files`` (``aay``)
An array of file names to be saved. The array and byte
arrays are expected to be null-terminated.
The following results get returned via the
:ref:`org.freedesktop.portal.Request::Response` signal:
* ``uris`` (``as``)
An array of strings containing the uri corresponding to
each file given by @options, in the same order. Note that
the file names may have changed, for example if a file
with the same name in the selected folder already exists.
All URIs must have the "file://" scheme.
* ``choices`` (``a(ss)``)
An array of pairs of strings, corresponding to the passed-in choices.
See :ref:`org.freedesktop.portal.FileChooser.OpenFile` for details.
-->
<method name="SaveFiles">
<arg type="o" name="handle" direction="in"/>
<arg type="s" name="app_id" direction="in"/>
<arg type="s" name="parent_window" direction="in"/>
<arg type="s" name="title" direction="in"/>
<annotation name="org.qtproject.QtDBus.QtTypeName.In4" value="QVariantMap"/>
<arg type="a{sv}" name="options" direction="in"/>
<arg type="u" name="response" direction="out"/>
<annotation name="org.qtproject.QtDBus.QtTypeName.Out1" value="QVariantMap"/>
<arg type="a{sv}" name="results" direction="out"/>
</method>
</interface>
</node>

View File

@@ -0,0 +1,162 @@
<?xml version="1.0"?>
<!--
Copyright (C) 2022 Aleix Pol Gonzalez <aleixpol@kde.org>
SPDX-License-Identifier: LGPL-2.1-or-later
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library. If not, see <http://www.gnu.org/licenses/>.
Author: Aleix Pol Gonzalez <aleixpol@kde.org>
-->
<node name="/" xmlns:doc="http://www.freedesktop.org/dbus/1.0/doc.dtd">
<!--
org.freedesktop.impl.portal.GlobalShortcuts:
@short_description: GlobalShortcuts portal backend interface
This portal lets applications register global shortcuts so they can
act regardless of the system state upon an input event.
This documentation describes version 1 of this interface.
-->
<interface name="org.freedesktop.impl.portal.GlobalShortcuts">
<!--
CreateSession:
@handle: Object path for the :ref:`org.freedesktop.impl.portal.Request` object representing this call
@session_handle: Object path for the ref:`org.freedesktop.impl.portal.Session` object representing the session being created
@app_id: App id of the application
@options: Vardict with optional further information. See :ref:`org.freedesktop.portal.GlobalShortcuts.CreateSession`
@response: Numeric Request response
@results: Vardict with the results of the call
Create a global shortcuts session.
There are currently no supported keys in the @results vardict.
-->
<method name="CreateSession">
<arg type="o" name="handle" direction="in"/>
<arg type="o" name="session_handle" direction="in"/>
<arg type="s" name="app_id" direction="in"/>
<annotation name="org.qtproject.QtDBus.QtTypeName.In3" value="QVariantMap"/>
<arg type="a{sv}" name="options" direction="in"/>
<arg type="u" name="response" direction="out"/>
<annotation name="org.qtproject.QtDBus.QtTypeName.Out1" value="QVariantMap"/>
<arg type="a{sv}" name="results" direction="out"/>
</method>
<!--
BindShortcuts:
@handle: Object path for the :ref:`org.freedesktop.impl.portal.Request` object representing this call
@session_handle: Object path for the :ref:`org.freedesktop.impl.portal.Session` object representing the session
@shortcuts: The list of shortcuts to bind. See :ref:`org.freedesktop.portal.GlobalShortcuts.BindShortcuts`
@parent_window: Identifier for the application window, see :doc:`window-identifiers`
@shortcuts: The identifier of the shortcuts we intend to register, empty for all shortcuts
@results: Vardict with the results of the call
Bind the shortcuts of this session. This will typically result the portal
presenting a dialog letting the user configure shortcut triggers.
-->
<method name="BindShortcuts">
<arg type="o" name="handle" direction="in"/>
<arg type="o" name="session_handle" direction="in"/>
<annotation name="org.qtproject.QtDBus.QtTypeName.In2" value="QList&lt;QPair&lt;QString,QVariantMap&gt;&gt;"/>
<arg type="a(sa{sv})" name="shortcuts" direction="in"/>
<arg type="s" name="parent_window" direction="in"/>
<annotation name="org.qtproject.QtDBus.QtTypeName.In3" value="QVariantMap"/>
<arg type="a{sv}" name="options" direction="in"/>
<annotation name="org.qtproject.QtDBus.QtTypeName.In4" value="QVariantMap"/>
<arg type="u" name="response" direction="out"/>
<arg type="a{sv}" name="results" direction="out"/>
<annotation name="org.qtproject.QtDBus.QtTypeName.Out1" value="QVariantMap"/>
</method>
<!--
ListShortcuts:
@handle: Object path for the :ref:`org.freedesktop.impl.portal.Request` object representing this call
@session_handle: Object path for the :ref:`org.freedesktop.impl.portal.Session` object representing the session
@results: Vardict with the results of the call
List shortcuts registered in the global shortcuts session.
The following results get returned in the @results vardict:
* ``shortcuts`` (``a(sa{sv})``)
A list of shortcuts.
See the :ref:`org.freedesktop.portal.GlobalShortcuts.BindShortcuts` method for
the list of supported properties of shortcuts.
-->
<method name="ListShortcuts">
<arg type="o" name="handle" direction="in"/>
<arg type="o" name="session_handle" direction="in"/>
<arg type="u" name="response" direction="out"/>
<annotation name="org.qtproject.QtDBus.QtTypeName.Out1" value="QVariantMap"/>
<arg type="a{sv}" name="results" direction="out"/>
</method>
<!--
Activated:
@session_handle: Session that requested the shortcut
@shortcut_id: the application-provided ID for the notification
@timestamp: the time of activation with millisecond granularity, with an undefined base.
@options: Vardict with optional further information
Emitted when a shortcut is activated.
-->
<signal name="Activated">
<arg type="o" name="session_handle" direction="out"/>
<arg type="s" name="shortcut_id" direction="out"/>
<arg type="t" name="timestamp" direction="out"/>
<annotation name="org.qtproject.QtDBus.QtTypeName.Out3" value="QVariantMap"/>
<arg type="a{sv}" name="options" direction="out"/>
</signal>
<!--
Deactivated:
@session_handle: Session that requested the shortcut
@shortcut_id: the application-provided ID for the notification
@timestamp: the time of deactivation with millisecond granularity, with an undefined base.
@options: Vardict with optional further information
Emitted when a shortcut is deactivated.
-->
<signal name="Deactivated">
<arg type="o" name="session_handle" direction="out"/>
<arg type="s" name="shortcut_id" direction="out"/>
<arg type="t" name="timestamp" direction="out"/>
<annotation name="org.qtproject.QtDBus.QtTypeName.Out3" value="QVariantMap"/>
<arg type="a{sv}" name="options" direction="out"/>
</signal>
<!--
ShortcutsChanged:
@session_handle: Session that requested the shortcut
@shortcuts: The list of changed shortcuts
Emitted when shortcuts are changed.
The results get returned via the :ref:`org.freedesktop.portal.Request::Response`
signal. See :ref:`org.freedesktop.portal.GlobalShortcuts.BindShortcuts` for the
list of supported properties of shortcuts.
-->
<signal name="ShortcutsChanged">
<arg type="o" name="session_handle" direction="out"/>
<annotation name="org.qtproject.QtDBus.QtTypeName.Out1" value="QList&lt;QPair&lt;QString,QVariantMap&gt;&gt;"/>
<arg type="a(sa{sv})" name="shortcuts" direction="out"/>
</signal>
<property name="version" type="u" access="read"/>
</interface>
</node>

View File

@@ -0,0 +1,133 @@
<?xml version="1.0"?>
<!--
Copyright (C) 2016 Red Hat, Inc.
SPDX-License-Identifier: LGPL-2.1-or-later
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library. If not, see <http://www.gnu.org/licenses/>.
Author: Matthias Clasen <mclasen@redhat.com>
-->
<node name="/" xmlns:doc="http://www.freedesktop.org/dbus/1.0/doc.dtd">
<!--
org.freedesktop.impl.portal.Inhibit:
@short_description: Inhibit portal backend interface
The inhibit portal lets sandboxed applications inhibit the user
session from ending, suspending, idling or getting switched away.
-->
<interface name="org.freedesktop.impl.portal.Inhibit">
<!--
Inhibit:
@handle: Object path for the :ref:`org.freedesktop.impl.portal.Request` object representing this call
@app_id: Application id
@window: Identifier for the window
@flags: Flags identifying what is inhibited
@options: Vardict with optional further information
Inhibits session status changes. As a side-effect of this call,
a :ref:`org.freedesktop.impl.portal.Request` object is exported on the
object path @handle. To end the inhibition, call
:ref:`org.freedesktop.impl.portal.Request.Close` on that object.
The flags determine what changes are inhibited:
- ``1``: Logout
- ``2``: User Switch
- ``4``: Suspend
- ``8``: Idle
Supported keys in the @options vardict include:
* ``reason`` (``s``)
User-visible reason for the inhibition.
-->
<method name="Inhibit">
<arg type="o" name="handle" direction="in"/>
<arg type="s" name="app_id" direction="in"/>
<arg type="s" name="window" direction="in"/>
<arg type="u" name="flags" direction="in"/>
<annotation name="org.qtproject.QtDBus.QtTypeName.In4" value="QVariantMap"/>
<arg type="a{sv}" name="options" direction="in"/>
</method>
<!--
CreateMonitor:
@handle: Object path for the :ref:`org.freedesktop.impl.portal.Request` object representing this call
@session_handle: Object path for the created :ref:`org.freedesktop.impl.portal.Session` object
@app_id: App id of the application
@window: the parent window
@response: the result of the operation (0 == success)
Creates a monitoring session. While this session is
active, the caller will receive StateChanged signals
with updates on the session state.
-->
<method name="CreateMonitor">
<arg type="o" name="handle" direction="in"/>
<arg type="o" name="session_handle" direction="in"/>
<arg type="s" name="app_id" direction="in"/>
<arg type="s" name="window" direction="in"/>
<arg type="u" name="response" direction="out"/>
</method>
<!--
StateChanged:
@session_handle: Object path for the :ref:`org.freedesktop.portal.Session` object
@state: Vardict with information about the session state
The StateChanged signal is sent to active monitoring sessions when
the session state changes.
When the session state changes to 'Query End', clients with active monitoring
sessions are expected to respond by calling
org.freedesktop.impl.portal.Inhibit.QueryEndResponse() within a second
of receiving the StateChanged signal.
The following information may get returned in the @state vardict:
* ``screensaver-active`` (``b``)
Whether the screensaver is active.
* ``session-state`` (``u``)
The state of the session.
- ``1``: Running
- ``2``: Query End
- ``3``: Ending
-->
<signal name="StateChanged">
<arg type="o" name="session_handle" direction="out"/>
<annotation name="org.qtproject.QtDBus.QtTypeName.Out1" value="QVariantMap"/>
<arg type="a{sv}" name="state" direction="out"/>
</signal>
<!--
QueryEndResponse:
@session_handle: Object path for the :ref:`org.freedesktop.impl.portal.Session` object
Acknowledges that the caller received the :ref:`org.freedesktop.impl.portal.Inhibit::StateChanged`
signal. This method should be called within one second or receiving a StateChanged
signal with the 'Query End' state.
-->
<method name="QueryEndResponse">
<arg type="o" name="session_handle" direction="in"/>
</method>
</interface>
</node>

View File

@@ -0,0 +1,395 @@
<?xml version="1.0"?>
<!--
Copyright (C) 2022 Red Hat, Inc.
SPDX-License-Identifier: LGPL-2.1-or-later
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library. If not, see <http://www.gnu.org/licenses/>.
-->
<node name="/" xmlns:doc="http://www.freedesktop.org/dbus/1.0/doc.dtd">
<!--
org.freedesktop.impl.portal.InputCapture:
@short_description: Capture input portal backend interface
The Capture Input portal allows clients to capture input from local
devices. This portal is mostly a 1:1 mapping of the
:ref:`org.freedesktop.portal.InputCapture` portal, see that portal's
documentation for details on methods, signals and arguments.
This documentation describes version 1 of this interface.
-->
<interface name="org.freedesktop.impl.portal.InputCapture">
<!--
CreateSession:
@handle: Object path for the :ref:`org.freedesktop.impl.portal.Request` object representing this call
@session_handle: Object path for the :ref:`org.freedesktop.impl.portal.Session` object representing the session being created
@app_id: App id of the application
@parent_window: Identifier for the application window, see :doc:`window-identifiers`
@options: Vardict with optional further information
@response: Numeric response
@results: Vardict with the results of the call
Create a capture input session.
Supported keys in the @options vardict include:
* ``capabilities`` (``u``)
Bitmask of requested capabilities, see the
SupportedCapabilities property. This value is required.
The following results get returned in the @results vardict:
* ``session_id`` (``s``)
The session id. A string representing the created capture input session.
* ``capabilities`` (``u``)
The capabilities available to this session. This is always a
subset of the requested capabilities.
-->
<method name="CreateSession">
<arg type="o" name="handle" direction="in"/>
<arg type="o" name="session_handle" direction="in"/>
<arg type="s" name="app_id" direction="in"/>
<arg type="s" name="parent_window" direction="in"/>
<annotation name="org.qtproject.QtDBus.QtTypeName.In4" value="QVariantMap"/>
<arg type="a{sv}" name="options" direction="in"/>
<arg type="u" name="response" direction="out"/>
<annotation name="org.qtproject.QtDBus.QtTypeName.Out1" value="QVariantMap"/>
<arg type="a{sv}" name="results" direction="out"/>
</method>
<!--
GetZones:
@handle: Object path for the :ref:`org.freedesktop.impl.portal.Request` object representing this call
@session_handle: Object path for the :ref:`org.freedesktop.impl.portal.Session` object representing the session
@app_id: App id of the application
@options: Vardict with optional further information
@response: Numeric response
@results: Vardict with the results of the call
Return the current zones for this session.
The following results get returned in the @results vardict:
* ``zones`` (``a(uuii)``)
An array of zones with width, height, x-offset, y-offset.
* ``zone_set`` (``u``)
The zone_set ID required in
org.freedesktop.impl.portal.InputCapture.SetPointerBarriers().
-->
<method name="GetZones">
<arg type="o" name="handle" direction="in"/>
<arg type="o" name="session_handle" direction="in"/>
<arg type="s" name="app_id" direction="in"/>
<annotation name="org.qtproject.QtDBus.QtTypeName.In3" value="QVariantMap"/>
<arg type="a{sv}" name="options" direction="in"/>
<arg type="u" name="response" direction="out"/>
<annotation name="org.qtproject.QtDBus.QtTypeName.Out1" value="QVariantMap"/>
<arg type="a{sv}" name="results" direction="out"/>
</method>
<!--
SetPointerBarriers:
@handle: Object path for the :ref:`org.freedesktop.impl.portal.Request` object representing this call
@session_handle: Object path for the :ref:`org.freedesktop.impl.portal.Session` object representing the session
@app_id: App id of the application
@options: Vardict with optional further information
@barriers: An array of vardicts, each specifying one barrier
@zone_set: A unique ID referring to the zone set
@response: Numeric response
@results: Vardict with the results of the call
Set up zero or more pointer barriers.
Supported keys in the @barriers vardicts include:
* ``barrier_id`` (``u``)
The non-zero id of this barrier. This id is used in the
#org.freedesktop.portal.impl.InputCapture::Activated signal to inform
which barrier triggered input capture.
* ``position`` (``(iiii)``)
The x1/y1 x2/y2 position of the pointer barrier. A horizontal
pointer barrier must have y1 == y2, a vertical pointer barrier
must have x1 == x2. Diagonal pointer barriers are not supported.
The following results get returned in the @results vardict:
* ``failed_barriers`` (``au``)
An array of barrier_ids of pointer barriers that have been denied. The
id matches the barrier_id of the entries in the @barriers argument.
-->
<method name="SetPointerBarriers">
<arg type="o" name="handle" direction="in"/>
<arg type="o" name="session_handle" direction="in"/>
<arg type="s" name="app_id" direction="in"/>
<annotation name="org.qtproject.QtDBus.QtTypeName.In3" value="QVariantMap"/>
<arg type="a{sv}" name="options" direction="in"/>
<annotation name="org.qtproject.QtDBus.QtTypeName.In4" value="QList&lt;QVariantMap&gt;"/>
<arg type="aa{sv}" name="barriers" direction="in"/>
<arg type="u" name="zone_set" direction="in"/>
<arg type="u" name="response" direction="out"/>
<annotation name="org.qtproject.QtDBus.QtTypeName.Out1" value="QVariantMap"/>
<arg type="a{sv}" name="results" direction="out"/>
</method>
<!--
Enable:
@session_handle: Object path for the :ref:`org.freedesktop.impl.portal.Session` object representing the session
@app_id: App id of the application
@options: Vardict with optional further information
Enable input capturing.
-->
<method name="Enable">
<arg type="o" name="session_handle" direction="in"/>
<arg type="s" name="app_id" direction="in"/>
<annotation name="org.qtproject.QtDBus.QtTypeName.In2" value="QVariantMap"/>
<arg type="a{sv}" name="options" direction="in"/>
<arg type="u" name="response" direction="out"/>
<annotation name="org.qtproject.QtDBus.QtTypeName.Out1" value="QVariantMap"/>
<arg type="a{sv}" name="results" direction="out"/>
</method>
<!--
Disable:
@session_handle: Object path for the :ref:`org.freedesktop.impl.portal.Session` object representing the session
@app_id: App id of the application
@options: Vardict with optional further information
Disable input capturing.
-->
<method name="Disable">
<arg type="o" name="session_handle" direction="in"/>
<arg type="s" name="app_id" direction="in"/>
<annotation name="org.qtproject.QtDBus.QtTypeName.In2" value="QVariantMap"/>
<arg type="a{sv}" name="options" direction="in"/>
<arg type="u" name="response" direction="out"/>
<annotation name="org.qtproject.QtDBus.QtTypeName.Out1" value="QVariantMap"/>
<arg type="a{sv}" name="results" direction="out"/>
</method>
<!--
Release:
@session_handle: Object path for the :ref:`org.freedesktop.impl.portal.Session` object representing the session
@app_id: App id of the application
@options: Vardict with optional further information
Release ongoing input capturing.
Supported keys in the @options vardict include:
* ``activation_id`` (``u``)
The same activation_id number as in the
#org.freedesktop.impl.portal.InputCapture::Activated signal.
* ``cursor_position`` (``(dd)``)
The suggested cursor position within the Zones available in
this session.
This is a suggestion to the compositor to place the cursor in
the correct position to allow for fluent movement between virtual
screens. The compositor is not required to honor this suggestion.
-->
<method name="Release">
<arg type="o" name="session_handle" direction="in"/>
<arg type="s" name="app_id" direction="in"/>
<annotation name="org.qtproject.QtDBus.QtTypeName.In2" value="QVariantMap"/>
<arg type="a{sv}" name="options" direction="in"/>
<arg type="u" name="response" direction="out"/>
<annotation name="org.qtproject.QtDBus.QtTypeName.Out1" value="QVariantMap"/>
<arg type="a{sv}" name="results" direction="out"/>
</method>
<!--
ConnectToEIS:
@session_handle: Object path for the :ref:`org.freedesktop.portal.Session` object
@app_id: App id of the application
@options: Vardict with optional further information
@fd: A file descriptor to an EIS implementation that can be passed to a passive libei context
Set up the connection to an EIS implementation. Once input capturing starts,
input events are sent via the EI protocol between the compositor and the application.
This call must be invoked before :ref:`org.freedesktop.portal.InputCapture.Enable`.
A session only needs to set this up once, the EIS implementation is not affected by
calls to Disable() and :ref:`org.freedesktop.portal.InputCapture.Enable` -
the same context can be re-used until the session is closed.
-->
<method name="ConnectToEIS">
<annotation name="org.gtk.GDBus.C.UnixFD" value="true"/>
<arg type="o" name="session_handle" direction="in"/>
<arg type="s" name="app_id" direction="in"/>
<annotation name="org.qtproject.QtDBus.QtTypeName.In2" value="QVariantMap"/>
<arg type="a{sv}" name="options" direction="in"/>
<arg type="h" name="fd" direction="out"/>
</method>
<!--
Disabled:
@session_handle: Object path for the :ref:`org.freedesktop.impl.portal.Session` object representing the session
@options: Vardict with optional further information
The Disabled signal is emitted when the application will no longer
receive captured input. If input capturing is currently ongoing, the
#org.freedesktop.impl.portal.InputCapture::Deactivated signal is emitted
before this signal.
-->
<signal name="Disabled">
<arg type="o" name="session_handle" direction="out"/>
<annotation name="org.qtproject.QtDBus.QtTypeName.Out1" value="QVariantMap"/>
<arg type="a{sv}" name="options" direction="out"/>
</signal>
<!--
Activated:
@session_handle: Object path for the :ref:`org.freedesktop.impl.portal.Session` object representing the session
@options: Vardict with optional further information
The Activated signal is emitted when input capture starts and input events
are about to be sent to the application.
This signal is only emitted after a prior call
to org.freedesktop.impl.portal.InputCapture.Enable().
Supported keys in the @options vardict include:
* ``activation_id`` (``u``)
A number that can be used to synchronize with the
transport-layer. This number has no intrinsic meaning but
is guaranteed to increase by an unspecified amount on each call.
In particular: if the compositor sends an activation_id of N as
part of this request it will also set the sequence in EIS'
start_emulating event the same value N on the EIS connection
before the first event from a device is sent.
This allows an application to have a synchronization point and
attribute an event sequence to the portal interaction.
Applications must be able to handle the activation_id number wrapping
around. Implementations of this portal must to increase the
activation_id number by an sensible amount to allow for wrapping
detection.
* ``cursor_position`` (``(dd)``)
The current cursor position. Note that this position may be
outside the Zones available to this session - this indicates
movement larger than a single pixel.
For example, a fast movement against a barrier on the right edge
of a screen may logically put the cursor dozens of pixels into
the (non-existing) screen on the other side of the barrier.
It is the application's responsibility to adjust the cursor
position as necessary.
* ``barrier_id`` (``u``)
The barrier id of the barrier that triggered. If the value is
nonzero, it matches the barrier id as specified in
org.freedesktop.impl.portal.InputCapture.SetPointerBarriers().
If the id is zero, the pointer barrier could be determined.
If the id is missing, the input capture was not triggered by a
pointer barrier.
Where more than one pointer barrier are triggered by the same
movement it is up to the compositor to choose one barrier (or use
a barrier id of zero).
-->
<signal name="Activated">
<arg type="o" name="session_handle" direction="out"/>
<annotation name="org.qtproject.QtDBus.QtTypeName.Out1" value="QVariantMap"/>
<arg type="a{sv}" name="options" direction="out"/>
</signal>
<!--
Deactivated:
@session_handle: Object path for the :ref:`org.freedesktop.impl.portal.Session` object representing the session
@options: Vardict with optional further information
The Deactivated signal is emitted when input capture stopped and input events
are no longer sent to the application. To prevent future input
capture, an application must call :ref:`org.freedesktop.portal.InputCapture.Disable`.
Supported keys in the @options vardict include:
* ``activation_id`` (``u``)
The same activation_id as in the corresponding
#org.freedesktop.impl.portal.InputCapture::Activated signal.
* ``cursor_position`` (``(dd)``)
The current cursor position. Note that this position may be
outside the Zones available to this session - this indicates
movement larger than a single pixel.
For example, a fast movement against a barrier on the right edge
of a screen may logically put the cursor dozens of pixels into
the (non-existing) screen on the other side of the barrier.
It is the application's responsibility to adjust the cursor
position as necessary.
-->
<signal name="Deactivated">
<arg type="o" name="session_handle" direction="out"/>
<annotation name="org.qtproject.QtDBus.QtTypeName.Out1" value="QVariantMap"/>
<arg type="a{sv}" name="options" direction="out"/>
</signal>
<!--
ZonesChanged:
@session_handle: Object path for the :ref:`org.freedesktop.impl.portal.Session` object representing the session
@options: Vardict with optional further information
The ZonesChanged signal is emitted when one or more of the zones
available **to this session** change. An application should immediately call
:ref:`org.freedesktop.portal.InputCapture.GetZones` to update its state of the zones.
-->
<signal name="ZonesChanged">
<arg type="o" name="session_handle" direction="out"/>
<annotation name="org.qtproject.QtDBus.QtTypeName.Out1" value="QVariantMap"/>
<arg type="a{sv}" name="options" direction="out"/>
</signal>
<!--
SupportedCapabilities:
A bitmask of supported capabilities. This list is constant, it is not the list of
capabilities currently available but rather which capabilies are
implemented by the portal.
Applications must ignore unknown capabilities.
Currently defined types are:
- ``1``: KEYBOARD
- ``2``: POINTER
- ``4``: TOUCHSCREEN
-->
<property name="SupportedCapabilities" type="u" access="read"/>
<property name="version" type="u" access="read"/>
</interface>
</node>

View File

@@ -0,0 +1,44 @@
<?xml version="1.0"?>
<!--
Copyright (C) 2018 Red Hat, Inc.
SPDX-License-Identifier: LGPL-2.1-or-later
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library. If not, see <http://www.gnu.org/licenses/>.
Author: Matthias Clasen <mclasen@redhat.com>
-->
<node name="/" xmlns:doc="http://www.freedesktop.org/dbus/1.0/doc.dtd">
<!--
org.freedesktop.impl.portal.Lockdown:
@short_description: Lockdown backend interface
This interface provides access to high-level desktop lockdown
settings that can disable entire portals, such as disabling
printing or location services.
This is meant to be used by different portal frontends.
-->
<interface name="org.freedesktop.impl.portal.Lockdown">
<property name="disable-printing" type="b" access="readwrite"/>
<property name="disable-save-to-disk" type="b" access="readwrite"/>
<property name="disable-application-handlers" type="b" access="readwrite"/>
<property name="disable-location" type="b" access="readwrite"/>
<property name="disable-camera" type="b" access="readwrite"/>
<property name="disable-microphone" type="b" access="readwrite"/>
<property name="disable-sound-output" type="b" access="readwrite"/>
</interface>
</node>

View File

@@ -0,0 +1,112 @@
<?xml version="1.0"?>
<!--
Copyright (C) 2016 Red Hat, Inc.
SPDX-License-Identifier: LGPL-2.1-or-later
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library. If not, see <http://www.gnu.org/licenses/>.
Author: Matthias Clasen <mclasen@redhat.com>
-->
<node name="/" xmlns:doc="http://www.freedesktop.org/dbus/1.0/doc.dtd">
<!--
org.freedesktop.impl.portal.Notification:
@short_description: Notification portal backend interface
This notification interface lets sandboxed applications
send and withdraw notifications.
This documentation describes version 2 of this interface.
-->
<interface name="org.freedesktop.impl.portal.Notification">
<!--
AddNotification:
@app_id: App id of the application
@id: Application-provided ID for this notification
@notification: Vardict with the serialized notification
Sends a notification.
The ID can be used to later withdraw the notification.
If the application reuses the same ID without withdrawing,
the notification is updated with the new one. It's possible
to set ``show-as-new`` hint in the ``display-hint`` property
to animate replacing the notification instead of updating it.
The format of the @notification is the same as for
:ref:`org.freedesktop.portal.Notification.AddNotification`.
Since version 2, the icon property never uses the ``bytes`` option.
-->
<method name="AddNotification">
<annotation name="org.gtk.GDBus.C.UnixFD" value="true"/>
<arg type="s" name="app_id" direction="in"/>
<arg type="s" name="id" direction="in"/>
<annotation name="org.qtproject.QtDBus.QtTypeName.In2" value="QVariantMap"/>
<arg type="a{sv}" name="notification" direction="in"/>
</method>
<!--
RemoveNotification:
@app_id: App id of the application
@id: Application-provided ID for this notification
Withdraws a notification.
-->
<method name="RemoveNotification">
<arg type="s" name="app_id" direction="in"/>
<arg type="s" name="id" direction="in"/>
</method>
<!--
SupportedOptions:
Some properties in :ref:`org.freedesktop.impl.portal.Notification.AddNotification`
may have options advertised by the notification server.
The format is the same as for ``SupportedOptions`` property of
:ref:`org.freedesktop.portal.Notification`.
-->
<property name="SupportedOptions" type="a{sv}" access="read">
<annotation name="org.qtproject.QtDBus.QtTypeName" value="QVariantMap"/>
</property>
<!--
ActionInvoked:
@app_id: App id of the application
@id: the application-provided ID for the notification
@action: the name of the action
@parameter: an array containing additional information
Send to the application when a non-exported action is
activated.
The @parameter contains the following values in order:
#. The `target` for the action, if one was specified.
#. The `platform-data` as vardict containing an ``activation-token`` (``s``) for
`XDG Activation
<https://gitlab.freedesktop.org/wayland/wayland-protocols/-/blob/main/staging/xdg-activation/xdg-activation-v1.xml>`_
-->
<signal name="ActionInvoked">
<arg type="s" name="app_id"/>
<arg type="s" name="id"/>
<arg type="s" name="action"/>
<arg type="av" name="parameter"/>
</signal>
<property name="version" type="u" access="read"/>
</interface>
</node>

View File

@@ -0,0 +1,204 @@
<!DOCTYPE node PUBLIC
"-//freedesktop//DTD D-BUS Object Introspection 1.0//EN"
"http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd">
<!--
Copyright (C) 2015 Red Hat, Inc.
SPDX-License-Identifier: LGPL-2.1-or-later
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General
Public License along with this library; if not, write to the
Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA.
Author: Alexander Larsson <alexl@redhat.com>
-->
<node name="/" xmlns:doc="http://www.freedesktop.org/dbus/1.0/doc.dtd">
<!--
org.freedesktop.impl.portal.PermissionStore:
@short_description: Database to store permissions
The permission store can be used by portals to store permissions
that sandboxed applications have to various resources, such as
files outside the sandbox.
Since the resources managed by portals can be varied, the permission
store is fairly free-form: there can be multiple tables; resources are
identified by an ID, as are applications, and permissions are stored as
string arrays. None of these strings are interpreted by the permission
store in any way.
In addition, the permission store allows to associate extra data
(in the form of a GVariant) with each resource.
This document describes version 2 of the permission store interface.
-->
<interface name="org.freedesktop.impl.portal.PermissionStore">
<property name="version" type="u" access="read"/>
<!--
Lookup:
@table: the name of the table to use
@id: the resource ID to look up
@permissions: map from application ID to permissions
@data: data that is associated with the resource
Looks up the entry for a resource in one of the tables and returns
all associated application permissions and data.
-->
<method name="Lookup">
<arg name="table" type="s" direction="in"/>
<arg name="id" type="s" direction="in"/>
<annotation name="org.qtproject.QtDBus.QtTypeName.Out0" value="QMap&lt;QString,QStringList&gt;"/>
<arg name="permissions" type="a{sas}" direction="out"/>
<arg name="data" type="v" direction="out"/>
</method>
<!--
Set:
@table: the name of the table to use
@create: whether to create the table if it does not exist
@id: the resource ID to modify
@app_permissions: map from application ID to permissions
@data: data to associate with the resource
Writes the entry for a resource in the given table.
-->
<method name="Set">
<arg name="table" type="s" direction="in"/>
<arg name="create" type="b" direction="in"/>
<arg name="id" type="s" direction="in"/>
<annotation name="org.qtproject.QtDBus.QtTypeName.In3" value="QMap&lt;QString,QStringList&gt;"/>
<arg name="app_permissions" type="a{sas}" direction="in"/>
<arg name="data" type="v" direction="in"/>
</method>
<!--
Delete:
@table: the name of the table to use
@id: the resource ID to delete
Removes the entry for a resource in the given table.
-->
<method name="Delete">
<arg name="table" type="s" direction="in"/>
<arg name="id" type="s" direction="in"/>
</method>
<!--
SetValue:
@table: the name of the table to use
@create: whether to create the table if it does not exist
@id: the resource ID to modify
@data: data to associate with the resource
Sets just the data for a resource in the given table.
-->
<method name="SetValue">
<arg name="table" type="s" direction="in"/>
<arg name="create" type="b" direction="in"/>
<arg name="id" type="s" direction="in"/>
<arg name="data" type="v" direction="in"/>
</method>
<!--
SetPermission:
@table: the name of the table to use
@create: whether to create the table if it does not exist
@id: the resource ID to modify
@app: the application ID to modify
@permissions: permissions to set
Sets the permissions for an application and a resource
in the given table.
-->
<method name="SetPermission">
<arg name="table" type="s" direction="in"/>
<arg name="create" type="b" direction="in"/>
<arg name="id" type="s" direction="in"/>
<arg name="app" type="s" direction="in"/>
<arg name="permissions" type="as" direction="in"/>
</method>
<!--
DeletePermission:
@table: the name of the table to use
@id: the resource ID to modify
@app: the application ID to modify
Removes the entry for an application and a resource
in the given table.
This method was added in version 2.
-->
<method name="DeletePermission">
<arg name="table" type="s" direction="in"/>
<arg name="id" type="s" direction="in"/>
<arg name="app" type="s" direction="in"/>
</method>
<!--
GetPermission:
@table: the name of the table to use
@id: the resource ID to modify
@app: the application ID to modify
@permissions: permissions to get
Gets the entry for an application and a resource
in the given table.
-->
<method name="GetPermission">
<arg name="table" type="s" direction="in"/>
<arg name="id" type="s" direction="in"/>
<arg name="app" type="s" direction="in"/>
<arg name="permissions" type="as" direction="out"/>
</method>
<!--
List:
@table: the name of the table to use
@ids: IDs of all resources that are present in the table
Returns all the resources that are present in the table.
-->
<method name="List">
<arg name="table" type="s" direction="in"/>
<arg name="ids" type="as" direction="out"/>
</method>
<!--
Changed:
@table: the name of the table
@ids: IDs of the changed resource
@deleted: whether the resource was deleted
@data: the data that is associated the resource
@permissions: the permissions that are associated with the resource
The Changed signal is emitted when the entry for a resource
is modified or deleted. If the entry was deleted, then @data
and @permissions contain the last values that were found in the
database. If the entry was modified, they contain the new values.
-->
<signal name="Changed">
<arg name="table" type="s" direction="out"/>
<arg name="id" type="s" direction="out"/>
<arg name="deleted" type="b" direction="out"/>
<arg name="data" type="v" direction="out"/>
<annotation name="org.qtproject.QtDBus.QtTypeName.Out4" value="QMap&lt;QString,QStringList&gt;"/>
<arg name="permissions" type="a{sas}" direction="out"/>
</signal>
</interface>
</node>

View File

@@ -0,0 +1,135 @@
<?xml version="1.0"?>
<!--
Copyright (C) 2016 Red Hat, Inc.
SPDX-License-Identifier: LGPL-2.1-or-later
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library. If not, see <http://www.gnu.org/licenses/>.
Author: Matthias Clasen <mclasen@redhat.com>
-->
<node name="/" xmlns:doc="http://www.freedesktop.org/dbus/1.0/doc.dtd">
<!--
org.freedesktop.impl.portal.Print:
@short_description: Print portal backend interface
The Print portal allows sandboxed applications to print.
-->
<interface name="org.freedesktop.impl.portal.Print">
<!--
PreparePrint:
@handle: Object path for the :ref:`org.freedesktop.impl.portal.Request` object representing this call
@app_id: App id of the application
@parent_window: Identifier for the application window, see :doc:`window-identifiers`
@title: Title for the print dialog
@settings: Serialized print settings
@page_setup: Serialized page setup
@options: Vardict with optional further information
@response: Numeric response
@results: Vardict with the results of the call
Presents a print dialog to the user and returns print settings
and page setup.
Supported keys in the @options vardict:
* ``modal`` (``b``)
Whether to make the dialog modal. Defaults to yes.
* ``accept_label`` (``s``)
Label for the accept button. Mnemonic underlines are allowed.
The following results get returned via the @results vardict:
* ``settings`` (``a{sv}``)
Print settings as set up by the user in the print dialog.
* ``page-setup`` (``a{sv}``)
Page setup as set up by the user in the print dialog.
* ``token`` (``u``)
Token that can be passed to a subsequent org.freedesktop.impl.portal.Print.Print() call to
bypass the print dialog.
The :ref:`org.freedesktop.portal.Print.Print` documentation has details about
the supported keys in settings and page-setup.
-->
<method name="PreparePrint">
<arg type="o" name="handle" direction="in"/>
<arg type="s" name="app_id" direction="in"/>
<arg type="s" name="parent_window" direction="in"/>
<arg type="s" name="title" direction="in"/>
<annotation name="org.qtproject.QtDBus.QtTypeName.In4" value="QVariantMap"/>
<arg type="a{sv}" name="settings" direction="in"/>
<annotation name="org.qtproject.QtDBus.QtTypeName.In5" value="QVariantMap"/>
<arg type="a{sv}" name="page_setup" direction="in"/>
<annotation name="org.qtproject.QtDBus.QtTypeName.In6" value="QVariantMap"/>
<arg type="a{sv}" name="options" direction="in"/>
<arg type="u" name="response" direction="out"/>
<annotation name="org.qtproject.QtDBus.QtTypeName.Out1" value="QVariantMap"/>
<arg type="a{sv}" name="results" direction="out"/>
</method>
<!--
Print:
@handle: Object path for the :ref:`org.freedesktop.impl.portal.Request` object representing this call
@app_id: App id of the application
@parent_window: Identifier for the application window, see :doc:`window-identifiers`
@title: Title for the print dialog
@fd: File descriptor from which to read the content to print
@options: Vardict with optional further information
@response: Numeric response
@results: Vardict with the results of the call
Prints a file.
The file is given in the form of a file descriptor open for reading.
If a valid token is present in the @options, then this call will print
with the settings from the Print call that the token refers to. If
no token is present, then a print dialog will be presented to the user.
Note that it is up to the portal implementation to determine how long
it considers tokens valid.
Supported keys in the @options vardict:
* ``modal`` (``b``)
Whether to make the dialog modal. Defaults to yes.
* ``token`` (``u``)
Token that was returned by a previous org.freedesktop.impl.portal.Print.PreparePrint() call.
-->
<method name="Print">
<annotation name="org.gtk.GDBus.C.UnixFD" value="true"/>
<arg type="o" name="handle" direction="in"/>
<arg type="s" name="app_id" direction="in"/>
<arg type="s" name="parent_window" direction="in"/>
<arg type="s" name="title" direction="in"/>
<arg type="h" name="fd" direction="in"/>
<annotation name="org.qtproject.QtDBus.QtTypeName.In5" value="QVariantMap"/>
<arg type="a{sv}" name="options" direction="in"/>
<arg type="u" name="response" direction="out"/>
<annotation name="org.qtproject.QtDBus.QtTypeName.Out1" value="QVariantMap"/>
<arg type="a{sv}" name="results" direction="out"/>
</method>
</interface>
</node>

View File

@@ -0,0 +1,436 @@
<?xml version="1.0"?>
<!--
Copyright (C) 2017-2018 Red Hat, Inc.
SPDX-License-Identifier: LGPL-2.1-or-later
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library. If not, see <http://www.gnu.org/licenses/>.
-->
<node name="/" xmlns:doc="http://www.freedesktop.org/dbus/1.0/doc.dtd">
<!--
org.freedesktop.impl.portal.RemoteDesktop:
@short_description: Remote desktop portal backend interface
The Remote desktop portal allows to create remote desktop sessions.
This documentation describes version 2 of this interface.
-->
<interface name="org.freedesktop.impl.portal.RemoteDesktop">
<!--
CreateSession:
@handle: Object path for the :ref:`org.freedesktop.impl.portal.Request` object representing this call
@app_id: App id of the application
@options: Vardict with optional further information
@response: Numeric response
@results: Vardict with the results of the call
Create a remote desktop session.
A remote desktop session is used to allow remote controlling a desktop
session. It can also be used together with a screen cast session (see
org.freedesktop.portal.ScreenCast), but may only be started and stopped
with this interface.
The following results get returned in the @results vardict:
* ``session`` (``s``)
The session id. A string representing the created screen cast session.
-->
<method name="CreateSession">
<arg type="o" name="handle" direction="in"/>
<arg type="o" name="session_handle" direction="in"/>
<arg type="s" name="app_id" direction="in"/>
<annotation name="org.qtproject.QtDBus.QtTypeName.In3" value="QVariantMap"/>
<arg type="a{sv}" name="options" direction="in"/>
<arg type="u" name="response" direction="out"/>
<annotation name="org.qtproject.QtDBus.QtTypeName.Out1" value="QVariantMap"/>
<arg type="a{sv}" name="results" direction="out"/>
</method>
<!--
SelectDevices:
@handle: Object path for the :ref:`org.freedesktop.impl.portal.Request` object representing this call
@session_handle: Object path for the :ref:`org.freedesktop.impl.portal.Session` object representing the session
@app_id: App id of the application
@options: Vardict with optional further information
@response: Numeric response
@results: Vardict with the results of the call
Configure what the devices remote desktop session should expose.
Supported keys in the @options vardict include:
* ``types`` (``u``)
Bitmask of what device types to request remote controlling of.
Default is all.
* ``restore_data`` (``(suv)``)
The data to restore from a previous session.
If the stored session cannot be restored, this value is ignored
and the user will be prompted normally. This may happen when, for
example, the session contains a monitor or a window that is not
available anymore, or when the stored permissions are withdrawn.
The restore data is composed of the vendor name (e.g. "GNOME" or
"KDE"), the version of the implementation-specific private data,
and the implementation-specific private data itself.
This option was added in version 2 of this interface.
* ``persist_mode`` (``u``)
How this session should persist. Default is 0. Accepted values are:
- ``0``: Do not persist (default)
- ``1``: Permissions persist as long as the application is running
- ``2``: Permissions persist until explicitly revoked
If the permission for the session to persist is granted, ``restore_data``
will be returned in the results of the
#org.freedesktop.impl.portal.RemoteDesktop.Start method.
This option was added in version 2 of this interface.
For available device types, see the AvailableDeviceTypes property.
-->
<method name="SelectDevices">
<arg type="o" name="handle" direction="in"/>
<arg type="o" name="session_handle" direction="in"/>
<arg type="s" name="app_id" direction="in"/>
<annotation name="org.qtproject.QtDBus.QtTypeName.In3" value="QVariantMap"/>
<arg type="a{sv}" name="options" direction="in"/>
<arg type="u" name="response" direction="out"/>
<annotation name="org.qtproject.QtDBus.QtTypeName.Out1" value="QVariantMap"/>
<arg type="a{sv}" name="results" direction="out"/>
</method>
<!--
Start:
@handle: Object path for the :ref:`org.freedesktop.impl.portal.Request` object representing this call
@app_id: App id of the application
@parent_window: Identifier for the application window, see :doc:`window-identifiers`
@session_handle: Identifier for the remote desktop session
@parent_window: Identifier for the application window
@options: Vardict with optional further information
@response: Numeric response
@results: Vardict with the results of the call
Start the remote desktop session. This will typically result the portal
presenting a dialog.
Supported keys in the @options vardict include:
* ``handle_token`` (``s``)
A string that will be used as the last element of the @handle. Must be a valid
object path element. See the :ref:`org.freedesktop.portal.Request` documentation for
more information about the @handle.
The following results get returned in the @results vardict:
* ``devices`` (``u``)
A bitmask of the devices selected by the user.
* ``clipboard_enabled`` (``b``)
A boolean for whether the clipboard was enabled ('true') or not ('false').
See the :ref:`org.freedesktop.portal.Clipboard` documentation for more information.
Since version 2.
* ``streams`` (``a(ua{sv})``)
Equivalent to the streams entry documented in
:ref:`org.freedesktop.impl.portal.ScreenCast.Start`.
* ``devices`` (``u``)
The device types that can be used for remote control. See the
AvailableDeviceTypes property.
-->
<method name="Start">
<arg type="o" name="handle" direction="in"/>
<arg type="o" name="session_handle" direction="in"/>
<arg type="s" name="app_id" direction="in"/>
<arg type="s" name="parent_window" direction="in"/>
<annotation name="org.qtproject.QtDBus.QtTypeName.In4" value="QVariantMap"/>
<arg type="a{sv}" name="options" direction="in"/>
<arg type="u" name="response" direction="out"/>
<annotation name="org.qtproject.QtDBus.QtTypeName.Out1" value="QVariantMap"/>
<arg type="a{sv}" name="results" direction="out"/>
</method>
<!--
NotifyPointerMotion:
@session_handle: Object path for the :ref:`org.freedesktop.portal.Session` object
@options: Vardict with optional further information
@dx: Relative movement on the x axis
@dy: Relative movement on the y axis
Notify about a new relative pointer motion event. The (dx, dy) vector
represents the new pointer position in the streams logical coordinate
space.
-->
<method name="NotifyPointerMotion">
<arg type="o" name="session_handle" direction="in"/>
<annotation name="org.qtproject.QtDBus.QtTypeName.In1" value="QVariantMap"/>
<arg type="a{sv}" name="options" direction="in"/>
<arg type="d" name="dx" direction="in"/>
<arg type="d" name="dy" direction="in"/>
</method>
<!--
NotifyPointerMotionAbsolute:
@session_handle: Object path for the :ref:`org.freedesktop.portal.Session` object
@options: Vardict with optional further information
@stream: The PipeWire stream node the coordinate is relative to
@x: Pointer motion x coordinate
@y: Pointer motion y coordinate
Notify about a new absolute pointer motion event. The (x, y) position
represents the new pointer position in the streams logical coordinate
space (see the logical_size stream property in
:ref:`org.freedesktop.portal.ScreenCast`).
-->
<method name="NotifyPointerMotionAbsolute">
<arg type="o" name="session_handle" direction="in"/>
<annotation name="org.qtproject.QtDBus.QtTypeName.In1" value="QVariantMap"/>
<arg type="a{sv}" name="options" direction="in"/>
<arg type="u" name="stream" direction="in"/>
<arg type="d" name="x" direction="in"/>
<arg type="d" name="y" direction="in"/>
</method>
<!--
NotifyPointerButton:
@session_handle: Object path for the :ref:`org.freedesktop.portal.Session` object
@options: Vardict with optional further information
@button: The pointer button was pressed or released
@state: The new state of the button
The pointer button is encoded according to Linux Evdev button codes.
May only be called if POINTER access was provided after starting the
session.
Available button states:
- ``0``: Released
- ``1``: Pressed
-->
<method name="NotifyPointerButton">
<arg type="o" name="session_handle" direction="in"/>
<annotation name="org.qtproject.QtDBus.QtTypeName.In1" value="QVariantMap"/>
<arg type="a{sv}" name="options" direction="in"/>
<arg type="i" name="button" direction="in"/>
<arg type="u" name="state" direction="in"/>
</method>
<!--
NotifyPointerAxis:
@session_handle: Object path for the :ref:`org.freedesktop.portal.Session` object
@options: Vardict with optional further information
@dx: Relative axis movement on the x axis
@dy: Relative axis movement on the y axis
The axis movement from a 'smooth scroll' device, such as a touchpad.
When applicable, the size of the motion delta should be equivalent to
the motion vector of a pointer motion done using the same advice.
May only be called if POINTER access was provided after starting the
session.
Supported keys in the @options vardict include:
* ``finish`` (``b``)
If set to true, this is the last axis event in a series, for
example as a result of the fingers being lifted from a touchpad
after a two-finger scroll. Default is false.
-->
<method name="NotifyPointerAxis">
<arg type="o" name="session_handle" direction="in"/>
<annotation name="org.qtproject.QtDBus.QtTypeName.In1" value="QVariantMap"/>
<arg type="a{sv}" name="options" direction="in"/>
<arg type="d" name="dx" direction="in"/>
<arg type="d" name="dy" direction="in"/>
</method>
<!--
NotifyPointerAxisDiscrete:
@session_handle: Object path for the :ref:`org.freedesktop.portal.Session` object
@options: Vardict with optional further information
@axis: The axis that was scrolled
@steps: The number of steps scrolled
May only be called if POINTER access was provided after starting the
session.
Available axes:
- ``0``: Vertical scroll
- ``1``: Horizontal scroll
-->
<method name="NotifyPointerAxisDiscrete">
<arg type="o" name="session_handle" direction="in"/>
<annotation name="org.qtproject.QtDBus.QtTypeName.In1" value="QVariantMap"/>
<arg type="a{sv}" name="options" direction="in"/>
<arg type="u" name="axis" direction="in"/>
<arg type="i" name="steps" direction="in"/>
</method>
<!--
NotifyKeyboardKeycode:
@session_handle: Object path for the :ref:`org.freedesktop.portal.Session` object
@options: Vardict with optional further information
@keycode: Keyboard code that was pressed or released
@state: New state of keyboard keysym
May only be called if KEYBOARD access was provided after starting the
session.
Available keyboard keysym states:
- ``0``: Released
- ``1``: Pressed
-->
<method name="NotifyKeyboardKeycode">
<arg type="o" name="session_handle" direction="in"/>
<annotation name="org.qtproject.QtDBus.QtTypeName.In1" value="QVariantMap"/>
<arg type="a{sv}" name="options" direction="in"/>
<arg type="i" name="keycode" direction="in"/>
<arg type="u" name="state" direction="in"/>
</method>
<!--
NotifyKeyboardKeysym:
@session_handle: Object path for the :ref:`org.freedesktop.portal.Session` object
@options: Vardict with optional further information
@keysym: Keyboard symbol that was pressed or released
@state: New state of keyboard keysym
May only be called if KEYBOARD access was provided after starting the
session.
Available keyboard keysym states:
- ``0``: Released
- ``1``: Pressed
-->
<method name="NotifyKeyboardKeysym">
<arg type="o" name="session_handle" direction="in"/>
<annotation name="org.qtproject.QtDBus.QtTypeName.In1" value="QVariantMap"/>
<arg type="a{sv}" name="options" direction="in"/>
<arg type="i" name="keysym" direction="in"/>
<arg type="u" name="state" direction="in"/>
</method>
<!--
NotifyTouchDown:
@session_handle: Object path for the :ref:`org.freedesktop.portal.Session` object
@options: Vardict with optional further information
@stream: The PipeWire stream node the coordinate is relative to
@slot: Touch slot where touch point appeared
@x: Touch down x coordinate
@y: Touch down y coordinate
May only be called if TOUCHSCREEN access was provided after starting the
session.
Notify about a new touch down event. The (x, y) position
represents the new touch point position in the streams logical
coordinate space (see the ``logical_size`` stream property in
:ref:`org.freedesktop.portal.ScreenCast`).
-->
<method name="NotifyTouchDown">
<arg type="o" name="session_handle" direction="in"/>
<annotation name="org.qtproject.QtDBus.QtTypeName.In1" value="QVariantMap"/>
<arg type="a{sv}" name="options" direction="in"/>
<arg type="u" name="stream" direction="in"/>
<arg type="u" name="slot" direction="in"/>
<arg type="d" name="x" direction="in"/>
<arg type="d" name="y" direction="in"/>
</method>
<!--
NotifyTouchMotion:
@session_handle: Object path for the :ref:`org.freedesktop.portal.Session` object
@options: Vardict with optional further information
@stream: The PipeWire stream node the coordinate is relative to
@slot: Touch slot where touch point appeared
@x: Touch motion x coordinate
@y: Touch motion y coordinate
May only be called if TOUCHSCREEN access was provided after starting the
session.
Notify about a new touch motion event. The (x, y) position
represents where the touch point position in the streams logical
coordinate space moved (see the ``logical_size`` stream property in
:ref:`org.freedesktop.portal.ScreenCast`).
-->
<method name="NotifyTouchMotion">
<arg type="o" name="session_handle" direction="in"/>
<annotation name="org.qtproject.QtDBus.QtTypeName.In1" value="QVariantMap"/>
<arg type="a{sv}" name="options" direction="in"/>
<arg type="u" name="stream" direction="in"/>
<arg type="u" name="slot" direction="in"/>
<arg type="d" name="x" direction="in"/>
<arg type="d" name="y" direction="in"/>
</method>
<!--
NotifyTouchUp:
@session_handle: Object path for the :ref:`org.freedesktop.portal.Session` object
@options: Vardict with optional further information
@slot: Touch slot where touch point appeared
May only be called if TOUCHSCREEN access was provided after starting the
session.
Notify about a new touch up event.
-->
<method name="NotifyTouchUp">
<arg type="o" name="session_handle" direction="in"/>
<annotation name="org.qtproject.QtDBus.QtTypeName.In1" value="QVariantMap"/>
<arg type="a{sv}" name="options" direction="in"/>
<arg type="u" name="slot" direction="in"/>
</method>
<!--
ConnectToEIS:
@session_handle: Object path for the :ref:`org.freedesktop.portal.Session` object
@app_id: App id of the application
@options: Vardict with optional further information
@fd: A file descriptor to an EIS implementation that can be passed to a
sender libei context
Request a connection to an EIS implementation.
This method is available in version 2 of this interface.
-->
<method name="ConnectToEIS">
<annotation name="org.gtk.GDBus.C.UnixFD" value="true"/>
<arg type="o" name="session_handle" direction="in"/>
<arg type="s" name="app_id" direction="in"/>
<annotation name="org.qtproject.QtDBus.QtTypeName.In2" value="QVariantMap"/>
<arg type="a{sv}" name="options" direction="in"/>
<arg type="h" name="fd" direction="out"/>
</method>
<!--
AvailableDeviceTypes:
A bitmask of available source types. Currently defined types are:
- ``1``: KEYBOARD
- ``2``: POINTER
- ``4``: TOUCHSCREEN
-->
<property name="AvailableDeviceTypes" type="u" access="read"/>
<property name="version" type="u" access="read"/>
</interface>
</node>

View File

@@ -0,0 +1,49 @@
<?xml version="1.0"?>
<!--
Copyright (C) 2016 Red Hat, Inc.
SPDX-License-Identifier: LGPL-2.1-or-later
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library. If not, see <http://www.gnu.org/licenses/>.
Author: Alexander Larsson <alexl@redhat.com>
Matthias Clasen <mclasen@redhat.com>
-->
<node name="/" xmlns:doc="http://www.freedesktop.org/dbus/1.0/doc.dtd">
<!--
org.freedesktop.impl.portal.Request:
@short_description: Shared request interface
The Request interface is shared by all portal backend interfaces.
When a backend method is called, the backend exports a Request object
on the object path that was sent with the method call. The Request
will stay alive for the duration of the user interaction related to
the method call.
The portal can abort the interaction calling
org.freedesktop.impl.portal.Request.Close() on the Request object.
-->
<interface name="org.freedesktop.impl.portal.Request">
<!--
Close:
Ends the user interaction to which this object refers.
Dialogs and other UIs related to the request should be closed.
-->
<method name="Close">
</method>
</interface>
</node>

View File

@@ -0,0 +1,259 @@
<?xml version="1.0"?>
<!--
Copyright (C) 2017 Red Hat, Inc.
SPDX-License-Identifier: LGPL-2.1-or-later
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library. If not, see <http://www.gnu.org/licenses/>.
-->
<node name="/" xmlns:doc="http://www.freedesktop.org/dbus/1.0/doc.dtd">
<!--
org.freedesktop.impl.portal.ScreenCast:
@short_description: Screen cast portal backend interface
The Screen cast portal allows to create screen cast sessions.
This documentation describes version 5 of this interface.
-->
<interface name="org.freedesktop.impl.portal.ScreenCast">
<!--
CreateSession:
@handle: Object path for the :ref:`org.freedesktop.impl.portal.Request` object representing this call
@session_handle: Object path for the :ref:`org.freedesktop.impl.portal.Session` object representing the session being created
@app_id: App id of the application
@options: Vardict with optional further information
@response: Numeric response
@results: Vardict with the results of the call
Create a screen cast session.
The following results get returned in the @results vardict:
* ``session_id`` (``s``)
The session id. A string representing the created screen cast session.
-->
<method name="CreateSession">
<arg type="o" name="handle" direction="in"/>
<arg type="o" name="session_handle" direction="in"/>
<arg type="s" name="app_id" direction="in"/>
<annotation name="org.qtproject.QtDBus.QtTypeName.In3" value="QVariantMap"/>
<arg type="a{sv}" name="options" direction="in"/>
<arg type="u" name="response" direction="out"/>
<annotation name="org.qtproject.QtDBus.QtTypeName.Out1" value="QVariantMap"/>
<arg type="a{sv}" name="results" direction="out"/>
</method>
<!--
SelectSources:
@handle: Object path for the :ref:`org.freedesktop.impl.portal.Request` object representing this call
@session_handle: Object path for the :ref:`org.freedesktop.impl.portal.Session` object representing the session
@app_id: App id of the application
@options: Vardict with optional further information
@response: Numeric response
@results: Vardict with the results of the call
Configure what the screen cast session should record.
Supported keys in the @options vardict include:
* ``types`` (``u``)
Bitmask of what type of content to record. Default is MONITOR.
* ``multiple`` (``b``)
Whether to allow selecting multiple sources. Default is no.
* ``cursor_mode`` (``u``)
Determines how the cursor will be drawn in the screen cast stream. It must be
one of the cursor modes advertised in
#org.freedesktop.portal.impl.ScreenCast.AvailableCursorModes. Setting a cursor
mode not advertised will cause the screen cast session to be closed. The default
cursor mode is 'Hidden'.
This option was added in version 2 of this interface.
* ``restore_data`` (``(suv)``)
The data to restore from a previous session.
If the stored session cannot be restored, this value is ignored
and the user will be prompted normally. This may happen when, for
example, the session contains a monitor or a window that is not
available anymore, or when the stored permissions are withdrawn.
The restore data is composed of the vendor name (e.g. "GNOME" or
"KDE"), the version of the implementation-specific private data,
and the implementation-specific private data itself.
This option was added in version 4 of this interface.
* ``persist_mode`` (``u``)
How this session should persist. Default is 0. Accepted values are:
- ``0``: Do not persist (default)
- ``1``: Permissions persist as long as the application is running
- ``2``: Permissions persist until explicitly revoked
If the permission for the session to persist is granted,
"persist_mode" will be returned in the results of the
org.freedesktop.impl.portal.ScreenCast.Start() method.
This option was added in version 4 of this interface.
For available source types, see the AvailableSourceTypes property.
-->
<method name="SelectSources">
<arg type="o" name="handle" direction="in"/>
<arg type="o" name="session_handle" direction="in"/>
<arg type="s" name="app_id" direction="in"/>
<annotation name="org.qtproject.QtDBus.QtTypeName.In3" value="QVariantMap"/>
<arg type="a{sv}" name="options" direction="in"/>
<arg type="u" name="response" direction="out"/>
<annotation name="org.qtproject.QtDBus.QtTypeName.Out1" value="QVariantMap"/>
<arg type="a{sv}" name="results" direction="out"/>
</method>
<!--
Start:
@handle: Object path for the :ref:`org.freedesktop.impl.portal.Request` object representing this call
@session_handle: Object path for the :ref:`org.freedesktop.impl.portal.Session` object representing the session
@app_id: App id of the application
@parent_window: Identifier for the application window, see :doc:`window-identifiers`
@options: Vardict with optional further information
@response: Numeric response
@results: Vardict with the results of the call
Start the screen cast session. This will typically result the portal presenting
a dialog letting the user do the selection set up by SelectSources.
The following results get returned in the @results vardict:
* ``streams`` (``a(ua{sv})``)
An array of PipeWire streams. Each stream consists of a PipeWire
node ID (the first element in the tuple, and a Vardict of
properties.
The array will contain a single stream if 'multiple' (see
SelectSources) was set to 'false', or at least one stream if
'multiple' was set to 'true' as part of the SelectSources method.
Each stream contains the following properties:
* ``position`` (``(ii)``)
A tuple consisting of the position (x, y) in the compositor
coordinate space. Note that the position may not be equivalent to a
position in a pixel coordinate space. Only available for monitor
streams.
* ``size`` (``(ii)``)
A tuple consisting of (width, height). The size represents the size
of the stream as it is displayed in the compositor coordinate
space. Note that this size may not be equivalent to a size in a
pixel coordinate space. The size may differ from the size of the
stream.
* ``source_type`` (``u``)
The type of the content which is being screen casted.
For available source types, see the AvailableSourceTypes property.
This property was added in version 3 of this interface.
* ``mapping_id`` (``s``)
An optional identifier used to map different aspects of the
resource this stream corresponds to.
When used in a remote desktop session, the mapping_id can be used to
match a libei region of absolute libei devices. There may be
multiple absolute libei devices, and each device may have multiple
regions, but a mapping_id will only match one of these regions per
device.
This property was added in version 5 of this interface.
* ``persist_mode`` (``u``)
Portal implementations can optionally offer ways to "reduce" the
persist mode, for example by explicitly asking the user. See the
'persist_mode' option of SelectSources for a list of possible
values.
If no persist mode is returned by the Start request, it is assumed
to be the same persist mode received during SelectSources.
This option was added in version 4 of this interface.
* ``restore_data`` (``(suv)``)
The data to be restored. This is the data that a portal
implementation sent in reaction to transient or persistent
modes.
This data will be stored in the permission store if the effective
persist mode is 2, and may be passed in the future as part of the
SelectSources() method call. The portal backend should store enough
information in 'restore_data' to be able to restore the session
later. The portal backend can deal with unavailable sources however
they see fit.
Data generated by a portal implementation must be consumable by
the same portal implementation, but not necessarily by others.
Thus, it is important to properly handle 'restore_data' not being
in a valid format. This may happen when, e.g., the user switched
to another desktop environment, or is using a different portal
implementation.
This response option was added in version 4 of this interface.
-->
<method name="Start">
<arg type="o" name="handle" direction="in"/>
<arg type="o" name="session_handle" direction="in"/>
<arg type="s" name="app_id" direction="in"/>
<arg type="s" name="parent_window" direction="in"/>
<annotation name="org.qtproject.QtDBus.QtTypeName.In4" value="QVariantMap"/>
<arg type="a{sv}" name="options" direction="in"/>
<arg type="u" name="response" direction="out"/>
<annotation name="org.qtproject.QtDBus.QtTypeName.Out1" value="QVariantMap"/>
<arg type="a{sv}" name="results" direction="out"/>
</method>
<!--
AvailableSourceTypes:
A bitmask of available source types. Currently defined types are:
- ``1``: MONITOR: Share existing monitors
- ``2``: WINDOW: Share application windows
- ``4``: VIRTUAL: Extend with new virtual monitor
-->
<property name="AvailableSourceTypes" type="u" access="read"/>
<!--
AvailableCursorModes:
Available cursor mode values:
- ``1``: Hidden. The cursor is not part of the screen cast stream.
- ``2``: Embedded: The cursor is embedded as part of the stream buffers.
- ``4``: Metadata: The cursor is not part of the screen cast stream, but sent as PipeWire stream metadata.
-->
<property name="AvailableCursorModes" type="u" access="read"/>
<property name="version" type="u" access="read"/>
</interface>
</node>

View File

@@ -0,0 +1,109 @@
<?xml version="1.0"?>
<!--
Copyright (C) 2016 Red Hat, Inc.
SPDX-License-Identifier: LGPL-2.1-or-later
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library. If not, see <http://www.gnu.org/licenses/>.
Author: Matthias Clasen <mclasen@redhat.com>
-->
<node name="/" xmlns:doc="http://www.freedesktop.org/dbus/1.0/doc.dtd">
<!--
org.freedesktop.impl.portal.Screenshot:
@short_description: Screenshot portal backend interface
This screenshot portal lets sandboxed applications request a screenshot.
This documentation describes version 2 of this interface.
-->
<interface name="org.freedesktop.impl.portal.Screenshot">
<!--
Screenshot:
@handle: Object path for the :ref:`org.freedesktop.impl.portal.Request` object representing this call
@app_id: App id of the application
@parent_window: Identifier for the application window, see :doc:`window-identifiers`
@options: Vardict with optional further information
@response: Numeric response
@results: Vardict with the results of the call
Takes a screenshot.
Supported keys in the @options vardict include:
* ``modal`` (``b``)
Whether the dialog should be modal. Defaults to yes.
* ``interactive`` (``b``)
Hint whether the dialog should offer customization before taking a screenshot.
Defaults to no.
* ``permission_store_checked`` (``b``)
Hint whether the screenshot portal has checked the 'screenshot' permission for
the requesting app. Defaults to no.
This option was added in version 2 of this interface.
The following results get returned via the @results vardict:
* ``uri`` (``s``)
A string containing the URI of the screenshot.
-->
<method name="Screenshot">
<arg type="o" name="handle" direction="in"/>
<arg type="s" name="app_id" direction="in"/>
<arg type="s" name="parent_window" direction="in"/>
<annotation name="org.qtproject.QtDBus.QtTypeName.In3" value="QVariantMap"/>
<arg type="a{sv}" name="options" direction="in"/>
<arg type="u" name="response" direction="out"/>
<annotation name="org.qtproject.QtDBus.QtTypeName.Out1" value="QVariantMap"/>
<arg type="a{sv}" name="results" direction="out"/>
</method>
<!--
PickColor:
@handle: Object path for the :ref:`org.freedesktop.impl.portal.Request` object representing this call
@app_id: App id of the application
@parent_window: Identifier for the application window, see :doc:`window-identifiers`
@options: Vardict with optional further information
@response: Numeric response
@results: Vardict with the results of the call
Obtains the value of a pixel.
The following results get returned via the @results vardict:
* ``color``` (``(ddd)``)
The color, RGB values in the range [0,1].
-->
<method name="PickColor">
<arg type="o" name="handle" direction="in"/>
<arg type="s" name="app_id" direction="in"/>
<arg type="s" name="parent_window" direction="in"/>
<annotation name="org.qtproject.QtDBus.QtTypeName.In3" value="QVariantMap"/>
<arg type="a{sv}" name="options" direction="in"/>
<arg type="u" name="response" direction="out"/>
<annotation name="org.qtproject.QtDBus.QtTypeName.Out1" value="QVariantMap"/>
<arg type="a{sv}" name="results" direction="out"/>
</method>
<property name="version" type="u" access="read"/>
</interface>
</node>

View File

@@ -0,0 +1,64 @@
<?xml version="1.0"?>
<!--
Copyright (C) 2019 Red Hat, Inc.
SPDX-License-Identifier: LGPL-2.1-or-later
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library. If not, see <http://www.gnu.org/licenses/>.
Author: Daiki Ueno <dueno@redhat.com>
-->
<node name="/" xmlns:doc="http://www.freedesktop.org/dbus/1.0/doc.dtd">
<!--
org.freedesktop.impl.portal.Secret:
@short_description: Secret portal backend interface
The Secret portal allows sandboxed applications to retrieve a
per-application master secret.
-->
<interface name="org.freedesktop.impl.portal.Secret">
<!--
RetrieveSecret:
@handle: Object path for the :ref:`org.freedesktop.impl.portal.Request` object representing this call
@app_id: App id of the application
@fd: Writable file descriptor for transporting the secret
@options: Vardict with optional further information
@response: Numeric response
@results: Vardict with the results of the call
Retrieves a master secret for a sandboxed application.
Supported keys in the @options vardict include:
* ``token`` (``s``)
An opaque string associated with the retrieve secret.
-->
<method name="RetrieveSecret">
<annotation name="org.gtk.GDBus.C.Name" value="retrieve_secret"/>
<annotation name="org.gtk.GDBus.C.UnixFD" value="true"/>
<arg type="o" name="handle" direction="in"/>
<arg type="s" name="app_id" direction="in"/>
<arg type="h" name="fd" direction="in"/>
<annotation name="org.qtproject.QtDBus.QtTypeName.In3" value="QVariantMap"/>
<arg type="a{sv}" name="options" direction="in"/>
<arg type="u" name="response" direction="out"/>
<annotation name="org.qtproject.QtDBus.QtTypeName.Out1" value="QVariantMap"/>
<arg type="a{sv}" name="results" direction="out"/>
</method>
<property name="version" type="u" access="read"/>
</interface>
</node>

View File

@@ -0,0 +1,55 @@
<?xml version="1.0"?>
<!--
Copyright (C) 2017 Red Hat, Inc.
SPDX-License-Identifier: LGPL-2.1-or-later
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library. If not, see <http://www.gnu.org/licenses/>.
Author: Jonas Ådahl <jadahl@redhat.com>
-->
<node name="/" xmlns:doc="http://www.freedesktop.org/dbus/1.0/doc.dtd">
<!--
org.freedesktop.impl.portal.Session:
@short_description: Shared session interface
The Session interface is shared by all portal interfaces that involve
long lived sessions. When a method that creates a session is called, the
reply will include a session handle (i.e. object path) for a Session
object, which will stay alive for the duration of the session.
The portal can abort the interaction by calling
org.freedesktop.impl.portal.Session.Close() on the Session object.
-->
<interface name="org.freedesktop.impl.portal.Session">
<!--
Close:
Close the session.
-->
<method name="Close">
</method>
<!--
Closed:
The session was closed by the portal implementation.
-->
<signal name="Closed">
</signal>
<property name="version" type="u" access="read"/>
</interface>
</node>

View File

@@ -0,0 +1,114 @@
<?xml version="1.0"?>
<!--
Copyright (C) 2018 Igalia S.L.
SPDX-License-Identifier: LGPL-2.1-or-later
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library. If not, see <http://www.gnu.org/licenses/>.
Author: Patrick Griffis <pgriffis@igalia.com>
-->
<node name="/" xmlns:doc="http://www.freedesktop.org/dbus/1.0/doc.dtd">
<!--
org.freedesktop.impl.portal.Settings:
@short_description: Settings portal backend interface
This interface provides read-only access to a small number
of host settings required for toolkits similar to XSettings.
It is not for general purpose settings.
Currently the interface provides the following keys:
* ``org.freedesktop.appearance`` ``color-scheme`` (``u``)
Indicates the system's preferred color scheme.
Supported values are:
- ``0``: No preference
- ``1``: Prefer dark appearance
- ``2``: Prefer light appearance
Unknown values should be treated as 0 (no preference).
* ``org.freedesktop.appearance`` ``accent-color`` (``(ddd)``)
Indicates the system's preferred accent color as a tuple of RGB values
in the sRGB color space, in the range [0,1].
Out-of-range RGB values should be treated as an unset accent color.
* ``org.freedesktop.appearance`` ``contrast`` (``u``)
Indicates the system's preferred contrast level.
Supported values are:
- ``0``: No preference (normal contrast)
- ``1``: Higher contrast
Unknown values should be treated as 0 (no preference).
Implementations can provide other keys; they are entirely
implementation details that are undocumented. If you are a
toolkit and want to use this please open an issue.
Note that the Settings portal can operate without this backend,
implementing it is optional.
-->
<interface name="org.freedesktop.impl.portal.Settings">
<!--
ReadAll:
@namespaces: List of namespaces to filter results by, supports simple globbing explained below.
@value: Dictionary of namespaces to its keys and values.
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.*".
-->
<method name="ReadAll">
<arg type="as" name="namespaces" direction="in"/>
<annotation name="org.qtproject.QtDBus.QtTypeName.Out0" value="QMap&lt;QString,QVariantMap&gt;"/>
<arg type="a{sa{sv}}" name="value" direction="out"/>
</method>
<!--
Read:
@namespace: Namespace to look up @key in.
@key: The key to get.
@value: The value @key is set to.
Reads a single value. Returns an error on any unknown namespace or key.
-->
<method name="Read">
<arg type="s" name="namespace" direction="in"/>
<arg type="s" name="key" direction="in"/>
<arg type="v" name="value" direction="out"/>
</method>
<!--
SettingChanged:
@namespace: Namespace of changed setting.
@key: The key of changed setting.
@value: The new value.
Emitted when a setting changes.
-->
<signal name="SettingChanged">
<arg type="s" name="namespace" direction="out"/>
<arg type="s" name="key" direction="out"/>
<arg type="v" name="value" direction="out"/>
</signal>
<property name="version" type="u" access="read"/>
</interface>
</node>

View File

@@ -0,0 +1,85 @@
<?xml version="1.0"?>
<!--
Copyright (C) 2023-2024 GNOME Foundation Inc.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library. If not, see <http://www.gnu.org/licenses/>.
Author: Georges Basile Stavracas Neto <georges.stavracas@gmail.com>
-->
<node name="/" xmlns:doc="http://www.freedesktop.org/dbus/1.0/doc.dtd">
<!--
org.freedesktop.impl.portal.Usb:
@short_description: USB portal backend interface
This interface lets sandboxed applications monitor and request
access to connected USB devices.
The implementation side allows requesting permission from the user
to access USB devices with a GUI.
This documentation describes version 1 of this interface.
-->
<interface name="org.freedesktop.impl.portal.Usb">
<!--
AcquireDevices:
@handle: Object path for the :ref:`org.freedesktop.impl.portal.Request` object representing this call
@parent_window: Identifier for the application window, see :doc:`window-identifiers`
@app_id: App id of the application
@devices: Array of identifier, device information, and access options for each device
@options: Vardict with optional further information
@response: Numeric Request response
@results: Vardict with the results of the call
Selects the devices to open.
Each element of the @devices array contains the ID, information and
access options for each device the app wants to acquire.
The supported keys in the information vardict are the same as the
keys in the @devices vardict of
:ref:`org.freedesktop.portal.Usb.EnumerateDevices`.
The supported keys in the access options vardict are:
* ``writable`` (``b``)
Whether the device will be opened in read-write or read-only mode.
Default: False
There are no supported keys in the @options vardict.
The following results get returned via the @results vardict:
* ``devices`` (``a(sa{sv})``)
An array of identifier and access options which is a subset of
what was passed in via @devices.
-->
<method name="AcquireDevices">
<arg type="o" name="handle" direction="in"/>
<arg type="s" name="parent_window" direction="in"/>
<arg type="s" name="app_id" direction="in"/>
<annotation name="org.qtproject.QtDBus.QtTypeName.In3" value="QList&lt;std::tuple&lt;QString,QVariantMap,QVariantMap&gt;&gt;"/>
<arg type="a(sa{sv}a{sv})" name="devices" direction="in"/>
<annotation name="org.qtproject.QtDBus.QtTypeName.In4" value="QVariantMap"/>
<arg type="a{sv}" name="options" direction="in"/>
<arg type="u" name="response" direction="out"/>
<annotation name="org.qtproject.QtDBus.QtTypeName.Out1" value="QVariantMap"/>
<arg type="a{sv}" name="results" direction="out"/>
</method>
<property name="version" type="u" access="read"/>
</interface>
</node>

View File

@@ -0,0 +1,65 @@
<?xml version="1.0"?>
<!--
Copyright (C) 2019 Red Hat, Inc.
SPDX-License-Identifier: LGPL-2.1-or-later
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library. If not, see <http://www.gnu.org/licenses/>.
Author: Felipe Borges <feborges@redhat.com>
-->
<node name="/" xmlns:doc="http://www.freedesktop.org/dbus/1.0/doc.dtd">
<!--
org.freedesktop.impl.portal.Wallpaper:
@short_description: Portal for setting the desktop's Wallpaper
This simple interface lets sandboxed applications set the user's
desktop background picture.
-->
<interface name="org.freedesktop.impl.portal.Wallpaper">
<!--
SetWallpaperURI:
@handle: Object path to export the Request object at
@app_id: App id of the application
@parent_window: Identifier for the application window, see :doc:`window-identifiers`
@uri: The picture file URI
@options: Options that influence the behavior of the portal
@response: Numberic response
Asks to set a given picture as the desktop background picture.
The following options are supported:
* ``show-preview`` (``b``)
Whether to show a preview of the picture. Note that the portal may
decide to show a preview even if this option is not set
* ``set-on`` (``s``)
Where to set the wallpaper. Possible values are `background`,
`lockscreen` or `both`.
-->
<method name="SetWallpaperURI">
<arg type="o" name="handle" direction="in"/>
<arg type="s" name="app_id" direction="in"/>
<arg type="s" name="parent_window" direction="in"/>
<arg type="s" name="uri" direction="in"/>
<annotation name="org.qtproject.QtDBus.QtTypeName.In4" value="QVariantMap"/>
<arg type="a{sv}" name="options" direction="in"/>
<arg type="u" name="response" direction="out"/>
</method>
</interface>
</node>

View File

@@ -0,0 +1,80 @@
<?xml version="1.0"?>
<!--
Copyright (C) 2016 Red Hat, Inc.
SPDX-License-Identifier: LGPL-2.1-or-later
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library. If not, see <http://www.gnu.org/licenses/>.
Author: Matthias Clasen <mclasen@redhat.com>
-->
<node name="/" xmlns:doc="http://www.freedesktop.org/dbus/1.0/doc.dtd">
<!--
org.freedesktop.portal.Account:
@short_description: Portal for obtaining information about the user
This simple interface lets sandboxed applications query basic
information about the user, like their name and avatar photo.
This documentation describes version 1 of this interface.
-->
<interface name="org.freedesktop.portal.Account">
<!--
GetUserInformation:
@window: Identifier for the window
@options: Vardict with optional further information
@handle: Object path for the :ref:`org.freedesktop.portal.Request` object representing this call
Gets information about the user.
Supported keys in the @options vardict include:
* ``handle_token`` (``s``)
A string that will be used as the last element of the @handle. Must be a valid
object path element. See the :ref:`org.freedesktop.portal.Request` documentation for
more information about the @handle.
* ``reason`` (``s``)
A string that can be shown in the dialog to explain why the information is
needed. This should be a complete sentence that explains what the application
will do with the returned information, for example: "Allows your personal
information to be included with recipes you share with your friends".
The following results get returned via the :ref:`org.freedesktop.portal.Request::Response` signal:
* ``id`` (``s``)
The user id.
* ``name`` (``s``)
The user's real name.
* ``image`` (``s``)
The URI of an image file for the user's avatar photo.
-->
<method name="GetUserInformation">
<arg type="s" name="window" direction="in"/>
<annotation name="org.qtproject.QtDBus.QtTypeName.In1" value="QVariantMap"/>
<arg type="a{sv}" name="options" direction="in"/>
<arg type="o" name="handle" direction="out"/>
</method>
<property name="version" type="u" access="read"/>
</interface>
</node>

View File

@@ -0,0 +1,111 @@
<?xml version="1.0"?>
<!--
Copyright (C) 2019 Red Hat, Inc.
SPDX-License-Identifier: LGPL-2.1-or-later
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library. If not, see <http://www.gnu.org/licenses/>.
Author: Matthias Clasen <mclasen@redhat.com>
-->
<node name="/" xmlns:doc="http://www.freedesktop.org/dbus/1.0/doc.dtd">
<!--
org.freedesktop.portal.Background:
@short_description: Portal for requesting autostart and background activity
This simple interface lets sandboxed applications request that
the application is allowed to run in the background or started
automatically when the user logs in.
This documentation describes version 2 of this interface.
-->
<interface name="org.freedesktop.portal.Background">
<!--
RequestBackground:
@parent_window: Identifier for the application window, see :doc:`window-identifiers`
@options: Vardict with optional further information
@handle: Object path for the :ref:`org.freedesktop.portal.Request` object representing this call
Requests that the application is allowed to run in the background.
Supported keys in the @options vardict include:
* ``handle_token`` (``s``)
A string that will be used as the last element of the @handle.
Must be a valid object path element. See the
:ref:`org.freedesktop.portal.Request` documentation for more
information about the @handle.
* ``reason`` (``s``)
User-visible reason for the request.
* ``autostart`` (``b``)
true if the app also wants to be started automatically at login.
* ``commandline`` (``as``)
Commandline to use add when autostarting at login. If this is not
specified, the ``Exec`` key from the desktop file will be used.
* ``dbus-activatable`` (``b``)
true to use D-Bus activation for autostart.
The following results get returned via the :ref:`org.freedesktop.portal.Request::Response` signal:
* ``background`` (``b``)
true if the application is allowed to run in the background.
* ``autostart`` (``b``)
true if the application will be autostarted.
-->
<method name="RequestBackground">
<arg type="s" name="parent_window" direction="in"/>
<annotation name="org.qtproject.QtDBus.QtTypeName.In1" value="QVariantMap"/>
<arg type="a{sv}" name="options" direction="in"/>
<arg type="o" name="handle" direction="out"/>
</method>
<!--
SetStatus:
@options: Vardict with optional further information
This method was added in version 2 of this interface.
Sets the status of the application running in background.
Supported keys in the @options vardict include:
* ``message`` (``s``)
A string that will be used as the status message of the application.
This should be a single line that can be presented to the user in a
list, not a full sentence or paragraph. Must be shorter than 96
characters.
-->
<method name="SetStatus">
<annotation name="org.qtproject.QtDBus.QtTypeName.In0" value="QVariantMap"/>
<arg type="a{sv}" name="options" direction="in"/>
</method>
<property name="version" type="u" access="read"/>
</interface>
</node>

View File

@@ -0,0 +1,82 @@
<?xml version="1.0"?>
<!--
Copyright (C) 2018 Red Hat, Inc.
SPDX-License-Identifier: LGPL-2.1-or-later
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library. If not, see <http://www.gnu.org/licenses/>.
-->
<node name="/" xmlns:doc="http://www.freedesktop.org/dbus/1.0/doc.dtd">
<!--
org.freedesktop.portal.Camera:
@short_description: Camera portal
The camera portal enables applications to access camera devices, such as
web cams.
-->
<interface name="org.freedesktop.portal.Camera">
<!--
AccessCamera:
@options: Vardict with optional further information
@handle: Object path for the :ref:`org.freedesktop.portal.Request` object representing this call
Request to gain access to the camera.
Supported keys in the @options vardict include:
* ``handle_token`` (``s``)
A string that will be used as the last element of the @handle. Must be a valid
object path element. See the :ref:`org.freedesktop.portal.Request` documentation for
more information about the @handle.
Following the :ref:`org.freedesktop.portal.Request::Response` signal, if
granted, org.freedesktop.portal.Camera.OpenPipeWireRemote() can be used to
open a PipeWire remote.
-->
<method name="AccessCamera">
<annotation name="org.qtproject.QtDBus.QtTypeName.In0" value="QVariantMap"/>
<arg type="a{sv}" name="options" direction="in"/>
<arg type="o" name="handle" direction="out"/>
</method>
<!--
OpenPipeWireRemote:
@options: Vardict with optional further information
@fd: File descriptor of an open PipeWire remote.
Open a file descriptor to the PipeWire remote where the camera nodes
are available. The file descriptor should be used to create a
``pw_core`` object, by using ``pw_context_connect_fd()``.
This method will only succeed if the application already has permission
to access camera devices.
There are currently no supported keys in the @options vardict.
-->
<method name="OpenPipeWireRemote">
<annotation name="org.gtk.GDBus.C.Name" value="open_pipewire_remote"/>
<annotation name="org.gtk.GDBus.C.UnixFD" value="true"/>
<annotation name="org.qtproject.QtDBus.QtTypeName.In0" value="QVariantMap"/>
<arg type="a{sv}" name="options" direction="in"/>
<arg type="h" name="fd" direction="out"/>
</method>
<!--
IsCameraPresent:
A boolean stating whether there is any cameras available.
-->
<property name="IsCameraPresent" type="b" access="read"/>
<property name="version" type="u" access="read"/>
</interface>
</node>

View File

@@ -0,0 +1,177 @@
<?xml version="1.0"?>
<!--
Copyright 2022 Google LLC
SPDX-License-Identifier: LGPL-2.1-or-later
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library. If not, see <http://www.gnu.org/licenses/>.
-->
<node name="/"
xmlns:doc="http://www.freedesktop.org/dbus/1.0/doc.dtd">
<!--
org.freedesktop.portal.Clipboard
@short_description: Clipboard portal
The Clipboard portal allows sessions to access the clipboard.
This documentation describes version 1 of this interface.
-->
<interface name="org.freedesktop.portal.Clipboard">
<!--
RequestClipboard:
@session_handle: Object path for the :ref:`org.freedesktop.portal.Session` object
@options: Vardict with optional further information
Requests clipboard access for the given portal session. This request
must be made before the session starts.
This portal does NOT create it's own session. Instead, it offers existing sessions
created from other portals the option to integrate with the clipboard. For whether
this interface is supported for a given session, refer to that portal's documentation.
See :ref:`org.freedesktop.portal.RemoteDesktop` to integrate clipboard with the
remote desktop session.
-->
<method name="RequestClipboard">
<arg type="o" name="session_handle" direction="in"/>
<annotation name="org.qtproject.QtDBus.QtTypeName.In1" value="QVariantMap"/>
<arg type="a{sv}" name="options" direction="in"/>
</method>
<!--
SetSelection:
@session_handle: Object path for the :ref:`org.freedesktop.portal.Session` object
@options: Vardict with optional further information
Sets the owner of the clipboard formats in ``mime_types`` in @options to
the session, i.e. this session has data for the advertised clipboard formats.
See :ref:`org.freedesktop.portal.FileTransfer` to transfer files using the
``application/vnd.portal.filetransfer`` mimetype.
May only be called if clipboard access was given after starting the session.
Supported keys in the @options vardict include:
* ``mime_types`` (``as``)
A list of mime types that the session has clipboard content for.
-->
<method name="SetSelection">
<arg type="o" name="session_handle" direction="in"/>
<annotation name="org.qtproject.QtDBus.QtTypeName.In1" value="QVariantMap"/>
<arg type="a{sv}" name="options" direction="in"/>
</method>
<!--
SelectionWrite:
@session_handle: Object path for the :ref:`org.freedesktop.portal.Session` object
@serial: The serial of the request where this answer is directed towards
@fd: A UnixFD handle to the contents of the selection being written to
Answer to 'SelectionTransfer' signal. Transfers the clipboard content for
the given serial to the method callee via a file descriptor.
It is the Callee that creates the file descriptor.
May only be called if clipboard access was given after starting the session.
-->
<method name="SelectionWrite">
<annotation name="org.gtk.GDBus.C.UnixFD" value="true"/>
<arg type="o" name="session_handle" direction="in"/>
<arg type="u" name="serial" direction="in"/>
<arg type="h" name="fd" direction="out"/>
</method>
<!--
SelectionWriteDone:
@session_handle: Object path for the :ref:`org.freedesktop.portal.Session` object
@serial: The serial of the request where this answer is directed to
@success: A boolean which indicates whether the transfer of the clipboard data was successful (``true``) or not (``false``)
Notifies that the transfer of the clipboard data has either completed
successfully, or failed.
May only be called if clipboard access was given after starting the session.
-->
<method name="SelectionWriteDone">
<arg type="o" name="session_handle" direction="in"/>
<arg type="u" name="serial" direction="in"/>
<arg type="b" name="success" direction="in"/>
</method>
<!--
SelectionRead:
@session_handle: Object path for the :ref:`org.freedesktop.portal.Session` object
@mime_type: The MIME type string of the requested format
@fd: A UnixFD handle to the contents of the selection being read
Transfer the clipboard content given the specified mime type to the
method caller via a file descriptor.
The creation of the file descriptor is the responsibility of the callee.
May only be called if clipboard access was given after starting the session.
-->
<method name="SelectionRead">
<annotation name="org.gtk.GDBus.C.UnixFD" value="true"/>
<arg type="o" name="session_handle" direction="in"/>
<arg type="s" name="mime_type" direction="in"/>
<arg type="h" name="fd" direction="out"/>
</method>
<!--
SelectionOwnerChanged:
@session_handle: Object path for the :ref:`org.freedesktop.portal.Session` object
@options: Vardict with optional further information
Notifies the session that the clipboard selection has changed.
Caller will only be notified if clipboard access was given after starting the session.
Supported keys in the @options vardict include:
* ``mime_types`` (``as``)
A list of MIME types for which the new clipboard selection has content
* ``session_is_owner`` (``b``)
A boolean for whether the session is the owner of the clipboard selection ('true') or not ('false')
-->
<signal name="SelectionOwnerChanged">
<arg type="o" name="session_handle" direction="out"/>
<annotation name="org.qtproject.QtDBus.QtTypeName.Out1" value="QVariantMap"/>
<arg type="a{sv}" name="options" direction="out"/>
</signal>
<!--
SelectionTransfer:
@session_handle: Object path for the :ref:`org.freedesktop.portal.Session` object
@mime_type: The mime-type string of the requested format
@serial: The serial used to track this transfer, to which the answer of this request must use
Notifies the session of a request for clipboard content of the given mime type. The
callee provides a serial to track the request, which any
org.freedesktop.portal.Clipboard.SelectionWrite() responses must use.
Once the caller is done handling the 'SelectionTransfer' request, they must call
org.freedesktop.portal.Clipboard.SelectionWriteDone() with the corresponding request's serial
and whether the request completed successfully. If the request is not handled, the caller should
respond by setting 'success' to 'false'.
Caller will only be notified if clipboard access was given after starting the session.
-->
<signal name="SelectionTransfer">
<arg type="o" name="session_handle" direction="out"/>
<arg type="s" name="mime_type" direction="out"/>
<arg type="u" name="serial" direction="out"/>
</signal>
<property name="version" type="u" access="read"/>
</interface>
</node>

View File

@@ -0,0 +1,304 @@
<?xml version="1.0"?>
<!--
Copyright (C) 2015 Red Hat, Inc.
SPDX-License-Identifier: LGPL-2.1-or-later
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General
Public License along with this library; if not, write to the
Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA.
Author: Alexander Larsson <alexl@redhat.com>
-->
<node name="/" xmlns:doc="http://www.freedesktop.org/dbus/1.0/doc.dtd">
<!--
org.freedesktop.portal.Documents:
@short_description: Document portal
The document portal allows to make files from the outside world
available to sandboxed applications in a controlled way.
Exported files will be made accessible to the application via
a fuse filesystem that gets mounted at ``/run/user/$UID/doc/``. The
filesystem gets mounted both outside and inside the sandbox, but
the view inside the sandbox is restricted to just those files
that the application is allowed to access.
Individual files will appear at ``/run/user/$UID/doc/$DOC_ID/filename``,
where $DOC_ID is the ID of the file in the document store. It is
returned by the org.freedesktop.portal.Documents.Add() and
org.freedesktop.portal.Documents.AddNamed() calls.
The permissions that the application has for a document store entry
(see org.freedesktop.portal.Documents.GrantPermissions()) are reflected
in the POSIX mode bits in the fuse filesystem.
The D-Bus interface for the document portal is available under the
bus name org.freedesktop.portal.Documents and the object path
/org/freedesktop/portal/documents.
This documentation describes version 5 of this interface.
-->
<interface name="org.freedesktop.portal.Documents">
<property name="version" type="u" access="read"/>
<!--
GetMountPoint:
@path: the path at which the fuse filesystem is mounted
Returns the path at which the document store fuse filesystem
is mounted. This will typically be ``/run/user/$UID/doc/``.
-->
<method name="GetMountPoint">
<arg type="ay" name="path" direction="out"/>
</method>
<!--
Add:
@o_path_fd: open file descriptor for the file to add
@reuse_existing: whether to reuse an existing document store entry for the file
@persistent: whether to add the file only for this session or permanently
@doc_id: the ID of the file in the document store
Adds a file to the document store. The file is passed in the
form of an open file descriptor to prove that the caller has
access to the file.
-->
<method name="Add">
<annotation name="org.gtk.GDBus.C.UnixFD" value="true"/>
<arg type="h" name="o_path_fd" direction="in"/>
<arg type="b" name="reuse_existing" direction="in"/>
<arg type="b" name="persistent" direction="in"/>
<arg type="s" name="doc_id" direction="out"/>
</method>
<!--
AddNamed:
@o_path_parent_fd: open file descriptor for the parent directory
@filename: the basename for the file
@reuse_existing: whether to reuse an existing document store entry for the file
@persistent: whether to add the file only for this session or permanently
@doc_id: the ID of the file in the document store
Creates an entry in the document store for writing a new file.
-->
<method name="AddNamed">
<annotation name="org.gtk.GDBus.C.UnixFD" value="true"/>
<arg type="h" name="o_path_parent_fd" direction="in"/>
<annotation name="org.qtproject.QtDBus.QtTypeName.In1" value="QByteArray"/>
<arg type="ay" name="filename" direction="in"/>
<arg type="b" name="reuse_existing" direction="in"/>
<arg type="b" name="persistent" direction="in"/>
<arg type="s" name="doc_id" direction="out"/>
</method>
<!--
AddFull:
@o_path_fds: open file descriptors for the files to export
@flags: flags, 1 == ``reuse_existing``, 2 == ``persistent``, 4 == ``as-needed-by-app``, 8 = ``export-directory``
@app_id: an application ID, or empty string
@permissions: the permissions to grant, possible values are 'read', 'write', 'grant-permissions' and 'delete'
@doc_ids: the IDs of the files in the document store
@extra_info: Extra info returned
Adds multiple files to the document store. The file is passed in the
form of an open file descriptor to prove that the caller has
access to the file.
If the ``as-needed-by-app`` flag is given, files will only be added to
the document store if the application does not already have access to them.
For files that are not added to the document store, the @doc_ids array will
contain an empty string.
Additionally, if @app_id is specified, it will be given the permissions
listed in org.freedesktop.portal.Documents.GrantPermissions().
The method also returns some extra info that can be used to avoid
multiple roundtrips. For now it only contains as "mountpoint", the
fuse mountpoint of the document portal.
This method was added in version 2 of this interface.
Support for exporting directories was added in version 4 of this interface.
-->
<method name="AddFull">
<annotation name="org.gtk.GDBus.C.UnixFD" value="true"/>
<annotation name="org.qtproject.QtDBus.QtTypeName.In0" value="QList&lt;QDBusUnixFileDescriptor&gt;"/>
<arg type="ah" name="o_path_fds" direction="in"/>
<arg type="u" name="flags" direction="in"/>
<arg type="s" name="app_id" direction="in"/>
<arg type="as" name="permissions" direction="in"/>
<arg type="as" name="doc_ids" direction="out"/>
<annotation name="org.qtproject.QtDBus.QtTypeName.Out1" value="QVariantMap"/>
<arg type="a{sv}" name="extra_out" direction="out"/>
</method>
<!--
AddNamedFull:
@o_path_fds: open file descriptor for the parent directory
@filename: the basename for the file
@flags: flags, 1 == ``reuse_existing``, 2 == ``persistent``, 4 == ``as-needed-by-app``
@app_id: an application ID, or empty string
@permissions: the permissions to grant, possible values are 'read', 'write', 'grant-permissions' and 'delete'
@doc_id: the ID of the file in the document store
@extra_info: Extra info returned
Creates an entry in the document store for writing a new file.
If the ``as-needed-by-app`` flag is given, file will only be added to
the document store if the application does not already have access to it.
For file that is not added to the document store, the @doc_id will
contain an empty string.
Additionally, if @app_id is specified, it will be given the permissions
listed in org.freedesktop.portal.Documents.GrantPermissions().
The method also returns some extra info that can be used to avoid
multiple roundtrips. For now it only contains as "mountpoint", the
fuse mountpoint of the document portal.
This method was added in version 3 of this interface.
-->
<method name="AddNamedFull">
<annotation name="org.gtk.GDBus.C.UnixFD" value="true"/>
<arg type="h" name="o_path_fd" direction="in"/>
<arg type="ay" name="filename" direction="in"/>
<arg type="u" name="flags" direction="in"/>
<arg type="s" name="app_id" direction="in"/>
<arg type="as" name="permissions" direction="in"/>
<arg type="s" name="doc_id" direction="out"/>
<annotation name="org.qtproject.QtDBus.QtTypeName.Out1" value="QVariantMap"/>
<arg type="a{sv}" name="extra_out" direction="out"/>
</method>
<!--
GrantPermissions:
@doc_id: the ID of the file in the document store
@app_id: the ID of the application to which permissions are granted
@permissions: the permissions to grant, possible values are ``read``, ``write``, ``grant-permissions`` and ``delete``
Grants access permissions for a file in the document store
to an application.
This call is available inside the sandbox if the application
has the ``grant-permissions`` permission for the document.
-->
<method name="GrantPermissions">
<arg type="s" name="doc_id" direction="in"/>
<arg type="s" name="app_id" direction="in"/>
<arg type="as" name="permissions" direction="in"/>
</method>
<!--
RevokePermissions:
@doc_id: the ID of the file in the document store
@app_id: the ID of the application from which permissions are revoked
@permissions: the permissions to revoke, possible values are 'read', 'write', 'grant-permissions' and 'delete'
Revokes access permissions for a file in the document store
from an application.
This call is available inside the sandbox if the application
has the ``grant-permissions`` permission for the document.
-->
<method name="RevokePermissions">
<arg type="s" name="doc_id" direction="in"/>
<arg type="s" name="app_id" direction="in"/>
<arg type="as" name="permissions" direction="in"/>
</method>
<!--
Delete:
@doc_id: the ID of the file in the document store
Removes an entry from the document store. The file itself is
not deleted.
This call is available inside the sandbox if the application
has the ``delete`` permission for the document.
-->
<method name="Delete">
<arg type="s" name="doc_id" direction="in"/>
</method>
<!--
Lookup:
@filename: a path in the host filesystem
@doc_id: the ID of the file in the document store, or '' if the file is not in the document store
Looks up the document ID for a file.
This call is not available inside the sandbox.
-->
<method name="Lookup">
<arg type="ay" name="filename" direction="in"/>
<arg type="s" name="doc_id" direction="out"/>
</method>
<!--
Info:
@doc_id: the ID of the file in the document store
@path: the path for the file in the host filesystem
@apps: a dictionary mapping application IDs to the permissions for that application
Gets the filesystem path and application permissions for a document store
entry.
This call is not available inside the sandbox.
-->
<method name="Info">
<arg type="s" name="doc_id" direction="in"/>
<arg type="ay" name="path" direction="out"/>
<annotation name="org.qtproject.QtDBus.QtTypeName.Out1" value="QMap&lt;QString,QStringList&gt;"/>
<arg type="a{sas}" name="apps" direction="out"/>
</method>
<!--
List:
@app_id: an application ID, or '' to list all documents
@docs: a dictionary mapping document IDs to their filesystem path
Lists documents in the document store for an application (or for
all applications).
This call is not available inside the sandbox.
-->
<method name="List">
<arg type="s" name="app_id" direction="in"/>
<annotation name="org.qtproject.QtDBus.QtTypeName.Out0" value="QMap&lt;QString,QByteArray&gt;"/>
<arg type="a{say}" name="docs" direction="out"/>
</method>
<!--
GetHostPaths:
@doc_ids: the list of IDs of the files in the document store
@paths: a dictionary mapping document IDs to the paths in the host filesystem
Gets the host filesystem paths for document store entries.
The host filesystem path is also available in the ``user.document-portal.host-path`` extended file attribute.
This call is available inside the sandbox, if the application has the ``read`` permission for the documents.
This method was added in version 5 of this interface.
-->
<method name="GetHostPaths">
<arg type="as" name="doc_ids" direction="in"/>
<annotation name="org.qtproject.QtDBus.QtTypeName.Out0" value="QMap&lt;QString,QByteArray&gt;"/>
<arg type="a{say}" name="paths" direction="out"/>
</method>
</interface>
</node>

View File

@@ -0,0 +1,312 @@
<?xml version="1.0"?>
<!--
Copyright (C) 2021 Matthew Leeds
SPDX-License-Identifier: LGPL-2.1-or-later
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library. If not, see <http://www.gnu.org/licenses/>.
Author: Matthew Leeds <mwleeds@protonmail.com>
-->
<node name="/" xmlns:doc="http://www.freedesktop.org/dbus/1.0/doc.dtd">
<!--
org.freedesktop.portal.DynamicLauncher:
@short_description: Portal for installing application launchers
The DynamicLauncher portal allows sandboxed (or unsandboxed) applications
to install launchers (.desktop files) which have an icon associated with them
and which execute a command in the application. The desktop environment
would display the launcher to the user in its menu of installed applications.
For example this can be used by a sandboxed browser to install web app
launchers. The portal also allows apps to uninstall the launchers, launch
them, and read the desktop file and icon data for them.
The standard way to install a launcher is to use the
org.freedesktop.portal.DynamicLauncher.PrepareInstall() method
which results in a dialog being presented to the user so they can confirm
they want to install the launcher. Then, the token returned by
org.freedesktop.portal.DynamicLauncher.PrepareInstall()
would be passed to the org.freedesktop.portal.DynamicLauncher.Install()
method to complete the installation.
However, in the rare circumstance that an unsandboxed process such as a
system component needs to install a launcher without user interaction, this
can be accomplished by using the org.freedesktop.portal.DynamicLauncher.RequestInstallToken()
method and passing the acquired token to org.freedesktop.portal.DynamicLauncher.Install().
This documentation describes version 1 of this interface.
-->
<interface name="org.freedesktop.portal.DynamicLauncher">
<!--
Install:
@token: Token proving authorization of the installation
@desktop_file_id: The ``.desktop`` file name to be used
@desktop_entry: The text of the Desktop Entry file to be installed, see below
@options: Vardict with optional further information
Installs a .desktop launcher and icon into appropriate directories to
allow the desktop environment to find them. Please note that this method
overwrites any existing launcher with the same id. If you want to
present the user with a confirmation dialog in that case, you can check
for it using the org.freedesktop.portal.DynamicLauncher.GetDesktopEntry()
method and clean up any state from the previous launcher if you want.
@token must be a token that was returned by a previous
org.freedesktop.portal.DynamicLauncher.PrepareInstall() or
org.freedesktop.portal.DynamicLauncher.RequestInstallToken() call.
The token can only be used once and is valid for up to five minutes.
The icon and name used for the launcher will be the ones from the previous
org.freedesktop.portal.DynamicLauncher.PrepareInstall() or
org.freedesktop.portal.DynamicLauncher.RequestInstallToken() call.
The @desktop_file_id must have ".desktop" as a suffix. Except in the
special case when the calling process has no associated app ID,
@desktop_file_id must have the app ID followed by a period as a prefix,
regardless of whether the calling process is sandboxed or unsandboxed.
The @desktop_entry should be a valid desktop entry file beginning with
``[Desktop Entry]``, except it should not include ``Name=`` or ``Icon=`` entries
(if present, these will be overwritten by the portal implementation).
The ``Exec=`` entry will be rewritten to call the sandboxed application e.g.
via "flatpak run", if the application is sandboxed.
It is recommended to include a ``TryExec=`` line with either a binary name
or an absolute path. The launcher will be deleted if the ``TryExec`` binary
cannot be found on session start.
The @options vardict currently has no supported entries.
-->
<method name="Install">
<arg type="s" name="token" direction="in"/>
<arg type="s" name="desktop_file_id" direction="in"/>
<arg type="s" name="desktop_entry" direction="in"/>
<annotation name="org.qtproject.QtDBus.QtTypeName.In3" value="QVariantMap"/>
<arg type="a{sv}" name="options" direction="in"/>
</method>
<!--
PrepareInstall:
@parent_window: Identifier for the application window, see :doc:`window-identifiers`
@name: The default name for the launcher
@icon_v: A ``GBytesIcon`` icon as returned by ``g_icon_serialize()``. Must be a png or jpeg no larger than 512x512, or an svg
@options: Vardict with optional further information
@handle: Object path for the :ref:`org.freedesktop.portal.Request` object representing this call
Presents a dialog to the user to allow them to see the icon, potentially
change the name, and confirm installation of the launcher.
Supported keys in the @options vardict:
* ``handle_token`` (``s``)
A string that will be used as the last element of the @handle. Must be a valid
object path element. See the :ref:`org.freedesktop.portal.Request` documentation for
more information about the @handle.
* ``modal`` (``b``)
Whether to make the dialog modal. Defaults to true.
* ``launcher_type`` (``u``)
The type of launcher being created. For supported values see the
#org.freedesktop.portal.DynamicLauncher:SupportedLauncherTypes property.
Defaults to "Application".
* ``target`` (``s``)
For a launcher of type "Webapp", this is the URL of the web app
being installed. This is displayed in the user-facing dialog.
For other launcher types, this is not needed.
* ``editable_name`` (``b``)
If true, the user will be able to edit the name of the launcher.
Defaults to true.
* ``editable_icon`` (``b``)
If true, the user will be able to edit the icon of the launcher,
if the implementation supports this. Defaults to false.
The following results get returned via the :ref:`org.freedesktop.portal.Request::Response` signal:
* ``name`` (``s``)
The name chosen by the user for the launcher.
* ``token`` (``s``)
Token that can be passed to a subsequent org.freedesktop.portal.DynamicLauncher.Install() call to
complete the installation without another dialog.
-->
<method name="PrepareInstall">
<arg type="s" name="parent_window" direction="in"/>
<arg type="s" name="name" direction="in"/>
<arg type="v" name="icon_v" direction="in"/>
<annotation name="org.qtproject.QtDBus.QtTypeName.In3" value="QVariantMap"/>
<arg type="a{sv}" name="options" direction="in"/>
<arg type="o" name="handle" direction="out"/>
</method>
<!--
RequestInstallToken:
@name: The name that will be used in the desktop file
@icon_v: A ``GBytesIcon`` icon as returned by ``g_icon_serialize()``. Must be a png or jpeg no larger than 512x512, or an svg
@options: Vardict with optional further information
@token: the token to be used with the org.freedesktop.portal.DynamicLauncher.Install() method
This method is intended for use only by specific components that
have their application ID allowlisted in the portal backend (e.g. GNOME
Software and KDE Discover). It is otherwise not guaranteed to work.
The token returned by this method can be used to avoid the need for a
confirmation dialog; the token can be passed to the Install() method
just as if it were acquired via the PrepareInstall() method.
The @options vardict currently has no supported entries.
-->
<method name="RequestInstallToken">
<arg type="s" name="name" direction="in"/>
<arg type="v" name="icon_v" direction="in"/>
<annotation name="org.qtproject.QtDBus.QtTypeName.In2" value="QVariantMap"/>
<arg type="a{sv}" name="options" direction="in"/>
<arg type="s" name="token" direction="out"/>
</method>
<!--
Uninstall:
@desktop_file_id: The .desktop file name
@options: Vardict with optional further information
This method deletes the desktop file and corresponding icon from the
appropriate directories to remove the launcher referred to by
@desktop_file_id.
The @desktop_file_id must have ``.desktop`` as a suffix. Except in the
special case when the calling process has no associated app ID,
@desktop_file_id must have the app ID followed by a period as a prefix,
regardless of whether the calling process is sandboxed or unsandboxed.
For example, Epiphany, which has the app ID "org.gnome.Epiphany"
in stable builds, might use a @desktop_file_id like
``org.gnome.Epiphany.WebApp_e9d0e1e4b0a10856aa3b38d9eb4375de4070d043.desktop``
In that example the desktop file would exist at the path
``~/.local/share/xdg-desktop-portal/applications/org.gnome.Epiphany.WebApp_e9d0e1e4b0a10856aa3b38d9eb4375de4070d043.desktop``
with a sym link in ``~/.local/share/applications/``.
The checksum at the end of the file name is an implementation detail in
Epiphany and not required by the portal.
This method is intended to be called by the application that created the
launcher, e.g. a web browser, so it can clean up associated data as part
of the uninstallation. Consequently, the proper way for a software center
to remove a launcher is by using the APIs provided by the application
that installed it. For example, for GNOME Software to remove web
launchers created by Epiphany, it would use the
``org.gnome.Epiphany.WebAppProvider`` D-Bus interface.
Please note that this method call will fail if the specified launcher
already does not exist.
The @options vardict currently has no supported entries.
-->
<method name="Uninstall">
<arg type="s" name="desktop_file_id" direction="in"/>
<annotation name="org.qtproject.QtDBus.QtTypeName.In1" value="QVariantMap"/>
<arg type="a{sv}" name="options" direction="in"/>
</method>
<!--
GetDesktopEntry:
@desktop_file_id: The .desktop file name
@contents: the contents of the named .desktop file
This function returns the contents of a desktop file with the name
@desktop_file_id in @contents.
The @desktop_file_id must have ".desktop" as a suffix. Except in the
special case when the calling process has no associated app ID,
@desktop_file_id must have the app ID followed by a period as a prefix.
This method only works for desktop files that were created by the
dynamic launcher portal.
-->
<method name="GetDesktopEntry">
<arg type="s" name="desktop_file_id" direction="in"/>
<arg type="s" name="contents" direction="out"/>
</method>
<!--
GetIcon:
@desktop_file_id: The .desktop file name
@icon_v: the icon as a serialized #GBytesIcon
@icon_format: one of "png", "jpeg", "svg"
@icon_size: the width and height in pixels of the icon
This function returns the contents of the icon specified in the "Icon"
key of the desktop file with the name @desktop_file_id in @icon_v. The
icon #GVariant can be passed to g_icon_deserialize() to reconstruct the
#GIcon.
The @desktop_file_id must have ".desktop" as a suffix. Except in the
special case when the calling process has no associated app ID,
@desktop_file_id must have the app ID followed by a period as a prefix.
The format and size of the icon are returned in @icon_format and
@icon_size. For svg icons, @icon_size is currently always set to 4096,
but don't depend on that as it may change in the future.
This method only works for desktop files that were created by the
dynamic launcher portal.
-->
<method name="GetIcon">
<arg type="s" name="desktop_file_id" direction="in"/>
<arg type="v" name="icon_v" direction="out"/>
<arg type="s" name="icon_format" direction="out"/>
<arg type="u" name="icon_size" direction="out"/>
</method>
<!--
Launch:
@desktop_file_id: The .desktop file name
@options: Vardict with optional further information
This function launches the app specified by @desktop_file_id.
The @desktop_file_id must have ".desktop" as a suffix. Except in the
special case when the calling process has no associated app ID,
@desktop_file_id must have the app ID followed by a period as a prefix.
This method only works for desktop files that were created by the
dynamic launcher portal.
Supported keys in the @options vardict include:
* ``activation_token`` (``s``)
A token that can be used to activate the chosen application.
-->
<method name="Launch">
<arg type="s" name="desktop_file_id" direction="in"/>
<annotation name="org.qtproject.QtDBus.QtTypeName.In1" value="QVariantMap"/>
<arg type="a{sv}" name="options" direction="in"/>
</method>
<!--
SupportedLauncherTypes:
A bitmask of available launcher types. Currently defined types are:
- 1: Application. A launcher that represents an application.
- 2: Webapp. A launcher that represents a web app.
-->
<property name="SupportedLauncherTypes" type="u" access="read"/>
<property name="version" type="u" access="read"/>
</interface>
</node>

View File

@@ -0,0 +1,122 @@
<?xml version="1.0"?>
<!--
Copyright (C) 2017 Red Hat, Inc.
SPDX-License-Identifier: LGPL-2.1-or-later
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library. If not, see <http://www.gnu.org/licenses/>.
Author: Matthias Clasen <mclasen@redhat.com>
-->
<node name="/" xmlns:doc="http://www.freedesktop.org/dbus/1.0/doc.dtd">
<!--
org.freedesktop.portal.Email:
@short_description: Portal for sending email
This simple portal lets sandboxed applications request to send an email,
optionally providing an address, subject, body and attachments.
This documentation describes version 4 of this interface.
-->
<interface name="org.freedesktop.portal.Email">
<!--
ComposeEmail:
@parent_window: Identifier for the application window, see :doc:`window-identifiers`
@options: Vardict with optional further information
@handle: Object path for the :ref:`org.freedesktop.portal.Request` object representing this call
Presents a window that lets the user compose an email.
Note that the default email client for the host will need to support mailto: URIs
following `RFC 2368 <https://tools.ietf.org/html/rfc2368>`_, with
"cc", "bcc", "subject" and "body" query keys each corresponding to the email
header of the same name, and with each attachment being passed as a ``file://``
URI as a value in an "attachment" query key.
For example:
::
mailto:foo@bar.com,baz@bar.com?cc=ceo@bar.com&amp;subject=Test%20e-mail%20subject&amp;attachment=file://path/to/full/file.txt
would send a mail to "foo@bar.com", "baz@bar.com", with a CC:
to "ceo@bar.com", with the subject "Test e-mail subject"
and the file pointed by URI ``file://path/to/full/file.txt`` as
an attachment.
Supported keys in the @options vardict include:
* ``handle_token`` (``s``)
A string that will be used as the last element of the @handle. Must be a valid
object path element. See the :ref:`org.freedesktop.portal.Request` documentation for
more information about the @handle.
* ``address`` (``s``)
The email address to send to. Must conform to the HTML5 definition of a
`valid email address <https://html.spec.whatwg.org/multipage/input.html#valid-e-mail-address>`_.
* ``addresses`` (``as``)
Email addresses to send to. This will be used in addition to address and must
pass the same validation.
This option was introduced in version 3 of the interface.
* ``cc`` (``as``)
Email addresses to cc.
This option was introduced in version 3 of the interface.
* ``bcc`` (``as``)
Email addresses to bcc.
This option was introduced in version 3 of the interface.
* ``subject`` (``s``)
The subject for the email.
* ``body`` (``s``)
The body for the email.
* ``attachment_fds`` (``ah``)
File descriptors for files to attach.
* ``activation_token`` (``s``)
A token that can be used to activate the chosen application.
This option was introduced in version 4 of the interface.
All the keys in the @options vardict are optional.
-->
<method name="ComposeEmail">
<annotation name="org.gtk.GDBus.C.UnixFD" value="true"/>
<arg type="s" name="parent_window" direction="in"/>
<annotation name="org.qtproject.QtDBus.QtTypeName.In1" value="QVariantMap"/>
<arg type="a{sv}" name="options" direction="in"/>
<arg type="o" name="handle" direction="out"/>
</method>
<property name="version" type="u" access="read"/>
</interface>
</node>

View File

@@ -0,0 +1,331 @@
<?xml version="1.0"?>
<!--
Copyright (C) 2015 Red Hat, Inc.
SPDX-License-Identifier: LGPL-2.1-or-later
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library. If not, see <http://www.gnu.org/licenses/>.
Author: Alexander Larsson <alexl@redhat.com>
-->
<node name="/" xmlns:doc="http://www.freedesktop.org/dbus/1.0/doc.dtd">
<!--
org.freedesktop.portal.FileChooser:
@short_description: File chooser portal
The FileChooser portal allows sandboxed applications to ask
the user for access to files outside the sandbox. The portal
backend will present the user with a file chooser dialog.
The selected files will be made accessible to the application
(which may involve adding it to the :ref:`Documents
portal<org.freedesktop.portal.Documents>`).
This documentation describes version 4 of this interface.
-->
<interface name="org.freedesktop.portal.FileChooser">
<!--
OpenFile:
@parent_window: Identifier for the application window, see :doc:`window-identifiers`
@title: Title for the file chooser dialog
@options: Vardict with optional further information
@handle: Object path for the :ref:`org.freedesktop.portal.Request` object representing this call
Asks to open one or more files.
Supported keys in the @options vardict include:
* ``handle_token`` (``s``)
A string that will be used as the last element of the @handle. Must be a valid
object path element. See the :ref:`org.freedesktop.portal.Request` documentation for
more information about the @handle.
* ``accept_label`` (``s``)
Label for the accept button. Mnemonic underlines are allowed.
* ``modal`` (``b``)
Whether the dialog should be modal. Default is true.
* ``multiple`` (``b``)
Whether multiple files can be selected or not. Default is single-selection.
* ``directory`` (``b``)
Whether to select for folders instead of files. Default is to select files.
This option was added in version 3.
* ``filters`` (``a(sa(us))``)
List of serialized file filters.
Each item in the array specifies a single filter to offer to the user.
The first string is a user-visible name for the filter. The ``a(us)``
specifies a list of filter strings, which can be either a glob-style
pattern (indicated by 0) or a MIME type (indicated by 1). Patterns are
case-sensitive.
To match different capitalizations of, e.g. ``'*.ico'``, use a pattern
like: ``'*.[iI][cC][oO]'``.
Example: ``[('Images', [(0, '*.ico'), (1, 'image/png')]), ('Text', [(0, '*.txt')])]``
Note that filters are purely there to aid the user in making a useful
selection. The portal may still allow the user to select files that
don't match any filter criteria, and applications must be prepared to
handle that.
* ``current_filter`` (``(sa(us))``)
Request that this filter be set by default at dialog creation. If
the filters list is nonempty, it should match a filter in the
list to set the default filter from the list. Alternatively, it
may be specified when the list is empty to apply the filter
unconditionally.
* ``choices`` (``a(ssa(ss)s)``)
List of serialized combo boxes to add to the file chooser.
For each element, the first string is an ID that will be returned
with the response, the second string is a user-visible label. The
``a(ss)`` is the list of choices, each being an ID and a
user-visible label. The final string is the initial selection,
or "", to let the portal decide which choice will be initially selected.
None of the strings, except for the initial selection, should be empty.
As a special case, passing an empty array for the list of choices
indicates a boolean choice that is typically displayed as a check
button, using "true" and "false" as the choices.
Example: ``[('encoding', 'Encoding', [('utf8', 'Unicode (UTF-8)'), ('latin15', 'Western')], 'latin15'), ('reencode', 'Reencode', [], 'false')]``
* ``current_folder`` (``ay``)
Suggested folder from which the files should be opened.
The byte array contains a path in the same encoding as the file
system, and it's expected to be terminated by a nul byte.
If the path points to a location in the document storage, it will be
replaced with the path to the location on the host.
The portal implementation is free to ignore this option.
The following results get returned via the :ref:`org.freedesktop.portal.Request::Response` signal:
* ``uris`` (``as``)
An array of strings containing the uris of the selected files. All URIs
have the ``file://`` scheme.
* ``choices`` (``a(ss)``)
An array of pairs of strings, the first string being the ID of a
combobox that was passed into this call, the second string being
the selected option.
Example: ``[('encoding', 'utf8'), ('reencode', 'true')]``
* ``current_filter`` (``(sa(us))``)
The filter that was selected. This may match a filter in the
filter list or another filter that was applied unconditionally.
-->
<method name="OpenFile">
<arg type="s" name="parent_window" direction="in"/>
<arg type="s" name="title" direction="in"/>
<annotation name="org.qtproject.QtDBus.QtTypeName.In2" value="QVariantMap"/>
<arg type="a{sv}" name="options" direction="in"/>
<arg type="o" name="handle" direction="out"/>
</method>
<!--
SaveFile:
@parent_window: Identifier for the application window, see :doc:`window-identifiers`
@title: Title for the file chooser dialog
@options: Vardict with optional further information
@handle: Object path for the :ref:`org.freedesktop.portal.Request` object representing this call
Asks for a location to save a file.
Supported keys in the @options vardict include:
* ``handle_token`` (``s``)
A string that will be used as the last element of the @handle. Must be a valid
object path element. See the :ref:`org.freedesktop.portal.Request` documentation for
more information about the @handle.
* ``accept_label`` (``s``)
Label for the accept button. Mnemonic underlines are allowed.
* ``modal`` (``b``)
Whether the dialog should be modal. Default is yes.
* ``filters`` (``a(sa(us))``)
List of serialized file filters.
See org.freedesktop.portal.FileChooser.OpenFile() for details.
* ``current_filter`` (``(sa(us))``)
Request that this filter be set by default at dialog creation.
See org.freedesktop.portal.FileChooser.OpenFile() for details.
* ``choices`` (``a(ssa(ss)s)``)
List of serialized combo boxes.
See org.freedesktop.portal.FileChooser.OpenFile() for details.
* ``current_name`` (``s``)
Suggested name of the file.
* ``current_folder`` (``ay``)
Suggested folder in which the file should be saved. The byte array
contains a path in the same encoding as the file system, and it's
expected to be terminated by a nul byte.
If the path points to a location in the document storage, it will be
replaced with the path to the location on the host.
The portal implementation is free to ignore this option.
* ``current_file`` (``ay``)
The current file (when saving an existing file), in the same encoding as the file
system. The byte array is expected to be terminated by a nul byte.
The following results get returned via the :ref:`org.freedesktop.portal.Request::Response` signal:
* ``uris`` (``as``)
An array of strings containing the uri of the selected file. All URIs
have the ``file://`` scheme.
* ``choices`` (``a(ss)``)
An array of pairs of strings, corresponding to the passed-in choices.
See org.freedesktop.portal.FileChooser.OpenFile() for details.
* ``current_filter`` (``(sa(us))``)
The filter that was selected.
See org.freedesktop.portal.FileChooser.OpenFile() for details.
-->
<method name="SaveFile">
<arg type="s" name="parent_window" direction="in"/>
<arg type="s" name="title" direction="in"/>
<annotation name="org.qtproject.QtDBus.QtTypeName.In2" value="QVariantMap"/>
<arg type="a{sv}" name="options" direction="in"/>
<arg type="o" name="handle" direction="out"/>
</method>
<!--
SaveFiles:
@parent_window: Identifier for the application window, see :doc:`window-identifiers`
@title: Title for the file chooser dialog
@options: Vardict with optional further information
@handle: Object path for the :ref:`org.freedesktop.portal.Request` object representing this call
Asks for a folder as a location to save one or more files. The
names of the files will be used as-is and appended to the
selected folder's path in the list of returned files. If the
selected folder already contains a file with one of the given
names, the portal may prompt or take some other action to
construct a unique file name and return that instead.
Supported keys in the @options vardict include:
* ``handle_token`` (``s``)
A string that will be used as the last element of the
@handle. Must be a valid object path element. See the
:ref:`org.freedesktop.portal.Request` documentation for more
information about the @handle.
* ``accept_label`` (``s``)
Label for the accept button. Mnemonic underlines are allowed.
* ``modal`` (``b``)
Whether the dialog should be modal. Default is yes.
* ``choices`` (``a(ssa(ss)s)``)
List of serialized combo boxes.
See org.freedesktop.portal.FileChooser.OpenFile() for details.
* ``current_folder`` (``ay``)
Suggested folder in which the files should be saved. The byte array
contains a path in the same encoding as the file system, and it's
expected to be terminated by a nul byte.
If the path points to a location in the document storage, it will be
replaced with the path to the location on the host.
The portal implementation is free to ignore this option.
* ``files`` (``aay``)
An array of file names, using the same encoding as the file system,
to be saved. Each byte array is expected to be terminated by a nul
The following results get returned via the
:ref:`org.freedesktop.portal.Request::Response` signal:
* ``uris`` (``as``)
An array of strings containing the uri corresponding to
each file given by @options, in the same order. Note that
the file names may have changed, for example if a file
with the same name in the selected folder already exists.
All URIs have the ``file://`` scheme.
* ``choices`` (``a(ss)``)
An array of pairs of strings, corresponding to the passed-in choices.
See org.freedesktop.portal.FileChooser.OpenFile() for details.
-->
<method name="SaveFiles">
<arg type="s" name="parent_window" direction="in"/>
<arg type="s" name="title" direction="in"/>
<annotation name="org.qtproject.QtDBus.QtTypeName.In2" value="QVariantMap"/>
<arg type="a{sv}" name="options" direction="in"/>
<arg type="o" name="handle" direction="out"/>
</method>
<property name="version" type="u" access="read"/>
</interface>
</node>

View File

@@ -0,0 +1,162 @@
<?xml version="1.0"?>
<!--
Copyright (C) 2018 Red Hat, Inc.
SPDX-License-Identifier: LGPL-2.1-or-later
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library. If not, see <http://www.gnu.org/licenses/>.
Author: Matthias Clasen <mclasen@redhat.com>
-->
<node name="/" xmlns:doc="http://www.freedesktop.org/dbus/1.0/doc.dtd">
<!--
org.freedesktop.portal.FileTransfer:
@short_description: Portal for transferring files between apps
The #org.freedesktop.portal.FileTransfer portal operates as a middle-man
between apps when transferring files via drag-and-drop or copy-paste,
taking care of the necessary exporting of files in the document portal.
Toolkits are expected to use the application/vnd.portal.filetransfer
mimetype when using this mechanism for file exchange via copy-paste
or drag-and-drop.
The data that is transmitted with this mimetype should be the key
returned by the org.freedesktop.portal.FileTransfer.StartTransfer()
method. Upon receiving this mimetype, the target should call
org.freedesktop.portal.FileTransfer.RetrieveFiles() with the key,
to obtain the list of files. The portal will take care of exporting
files in the document store as necessary to make them accessible to the
target.
The D-Bus interface for the this portal is available under the
bus name org.freedesktop.portal.Documents and the object path
``/org/freedesktop/portal/documents``.
This documentation describes version 1 of this interface.
-->
<interface name="org.freedesktop.portal.FileTransfer">
<!--
StartTransfer:
@options: Vardict with optional further information
@key: a key that needs to be passed to org.freedesktop.portal.FileTransfer.RetrieveFiles() to obtain the files
Starts a session for a file transfer.
The caller should call org.freedesktop.portal.FileTransfer.AddFiles()
at least once, to add files to this session.
Another application can then call
org.freedesktop.portal.FileTransfer.RetrieveFiles() to obtain them, if
it has the @key.
Supported keys in the @options vardict include:
* ``writable`` (``b``)
Whether to allow the chosen application to write to the files.
This key only takes effect for files that need to be exported
in the document portal for the receiving app. But it does require
the passed-in file descriptors to be writable.
Default: False
* ``autostop`` (``b``)
Whether to stop the transfer automatically after the first
org.freedesktop.portal.FileTransfer.RetrieveFiles() call.
Default: True
-->
<method name="StartTransfer">
<annotation name="org.qtproject.QtDBus.QtTypeName.In0" value="QVariantMap"/>
<arg type="a{sv}" name="options" direction="in"/>
<arg type="s" name="key" direction="out"/>
</method>
<!--
AddFiles:
@key: A key returned by org.freedesktop.portal.FileTransfer.StartTransfer()
@fds: File descriptors for the files or directories to register
@options: Vardict with optional further information
Adds files or directories to a session. This method can be called multiple
times on a given session. Either regular files or directories can
be added.
Note that the session bus often has a low limit of file descriptors per
message (typically, 16), so you may have to send large lists with
multiple org.freedesktop.portal.FileTransfer.AddFiles() calls.
The @options vardict currently has no supported entries.
-->
<method name="AddFiles">
<annotation name="org.gtk.GDBus.C.UnixFD" value="true"/>
<arg type="s" name="key" direction="in"/>
<annotation name="org.qtproject.QtDBus.QtTypeName.In1" value="QList&lt;QDBusUnixFileDescriptor&gt;"/>
<arg type="ah" name="fds" direction="in"/>
<annotation name="org.qtproject.QtDBus.QtTypeName.In2" value="QVariantMap"/>
<arg type="a{sv}" name="options" direction="in"/>
</method>
<!--
RetrieveFiles:
@key: A key returned by org.freedesktop.portal.FileTransfer.StartTransfer()
@options: Vardict with optional further information
@files: list of paths
Retrieves files or directories that were previously added to the session with
org.freedesktop.portal.FileTransfer.AddFiles(). The files or directories
will be exported in the document portal as-needed for the caller, and they
will be writable if the owner of the session allowed it.
After the first org.freedesktop.portal.FileTransfer.RetrieveFiles() call,
the session will be closed by the portal, unless @autostop has been set to False.
The @options vardict currently has no supported entries.
-->
<method name="RetrieveFiles">
<arg type="s" name="key" direction="in"/>
<annotation name="org.qtproject.QtDBus.QtTypeName.In1" value="QVariantMap"/>
<arg type="a{sv}" name="options" direction="in"/>
<arg type="as" name="files" direction="out"/>
</method>
<!--
StopTransfer:
@key: A key returned by org.freedesktop.portal.FileTransfer.StartTransfer()
Ends the transfer. Further calls to org.freedesktop.portal.FileTransfer.AddFiles()
or org.freedesktop.portal.FileTransfer.RetrieveFiles() for this key will return an error.
-->
<method name="StopTransfer">
<arg type="s" name="key" direction="in"/>
</method>
<!--
TransferClosed:
@key: key returned by StartTransfer
The TransferClosed signal is emitted to the caller of StartTransfer
when the transfer is closed.
-->
<signal name="TransferClosed">
<arg type="s" name="key"/>
</signal>
<property name="version" type="u" access="read"/>
</interface>
</node>

View File

@@ -0,0 +1,239 @@
<?xml version="1.0"?>
<!--
Copyright (C) 2019 Red Hat, Inc.
SPDX-License-Identifier: LGPL-2.1-or-later
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library. If not, see <http://www.gnu.org/licenses/>.
Author: Christian J. Kellner <christian@kellner.me>
-->
<node name="/" xmlns:doc="http://www.freedesktop.org/dbus/1.0/doc.dtd">
<!--
org.freedesktop.portal.GameMode:
@short_description: Portal for accessing GameMode
Interface for accessing GameMode from within the sandbox. It
is analogous to the com.feralinteractive.GameMode interface
and will proxy request there, but with additional permission
checking and pid mapping. The latter is necessary in the case
that sandbox has pid namespace isolation enabled. See the man
page for pid_namespaces(7) for more details, but briefly, it
means that the sandbox has its own process id namespace which
is separated from the one on the host. Thus there will be two
separate process ids (PID) within two different namespaces
that both identify same process. One id from the PID namespace
inside the sandbox and one id from the host PID namespace.
Since org.freedesktop.portal.GameMode expects pids from the host
PID namespace but programs inside the sandbox can only know PID
from the sandbox namespace, process ids need to be translated from
the portal to the host namespace. The portal will do that transparently
for all calls where this is necessary.
Note: #org.freedesktop.portal.GameMode will monitor active clients,
i.e. games and other programs that have successfully called
org.freedesktop.portal.GameMode.RegisterGame().
In the event that a client terminates without a call to the
org.freedesktop.portal.GameMode.UnregisterGame() method, GameMode will
automatically un-register the client. This might happen with a (small)
delay.
This documentation describes version 4 of this interface.
-->
<interface name="org.freedesktop.portal.GameMode">
<!--
QueryStatus:
@pid: Process id to query the GameMode status of
@result: The GameMode status for @pid
Query the GameMode status for a process.
If the caller is running inside a sandbox with PID namespace
isolation, the @pid will be translated to the respective host PID.
See the general introduction for details.
The @result will be one of:
- `0` if GameMode is inactive
- `1` if GameMode is active
- `2` if GameMode is active and @pid is registered
- `-1` if the query failed inside GameMode
-->
<method name="QueryStatus">
<arg type="i" name="pid" direction="in"/>
<arg type="i" name="result" direction="out"/>
</method>
<!--
RegisterGame:
@pid: Process id of the game to register
@result: Status of the request: 0 for success, -1 indicates an error
Register a game with GameMode and thus request GameMode to
be activated.
If the caller is running inside a sandbox with PID namespace
isolation, the @pid will be translated to the respective host PID.
See the general introduction for details.
If the GameMode has already been requested for @pid before,
this call will fail, i.e. result will be -1.
The @result will be one of:
- `0` if the game with @pid was successfully registered
- `-1` if the request was rejected by GameMode
-->
<method name="RegisterGame">
<arg type="i" name="pid" direction="in"/>
<arg type="i" name="result" direction="out"/>
</method>
<!--
UnregisterGame:
@pid: Process id of the game to un-register
@result: Status of the request: 0 for success, -1 indicates an error
Un-register a game from GameMode.
If the call is successful and there are no other games or clients
registered, GameMode will be deactivated.
If the caller is running inside a sandbox with PID namespace
isolation, the @pid will be translated to the respective host PID.
The @result will be one of:
- `0` if the game with @pid was successfully un-registered
- `-1` if the request was rejected by GameMode
-->
<method name="UnregisterGame">
<arg type="i" name="pid" direction="in"/>
<arg type="i" name="result" direction="out"/>
</method>
<!--
QueryStatusByPid:
@target: Process id to query the GameMode status of
@requester: Process id of the process requesting the information
@result: The GameMode status for @target
Query the GameMode status for a process.
Like org.freedesktop.portal.GameMode.QueryStatus() but @requester
acting on behalf of @target.
-->
<method name="QueryStatusByPid">
<arg type="i" name="target" direction="in"/>
<arg type="i" name="requester" direction="in"/>
<arg type="i" name="result" direction="out"/>
</method>
<!--
RegisterGameByPid:
@target: Process id of the game to register
@requester: Process id of the process requesting the registration
@result: Status of the request: 0 for success, -1 indicates an error
Register a game with GameMode.
Like org.freedesktop.portal.GameMode.RegisterGame() but @requester
acting on behalf of @target.
-->
<method name="RegisterGameByPid">
<arg type="i" name="target" direction="in"/>
<arg type="i" name="requester" direction="in"/>
<arg type="i" name="result" direction="out"/>
</method>
<!--
UnregisterGameByPid:
@target: Process id of the game to un-register
@requester: Process id of the process requesting the un-registration
@result: Status of the request: 0 for success, -1 indicates an error
Un-register a game with GameMode.
Like org.freedesktop.portal.GameMode.UnregisterGame() but @requester
acting on behalf of @target.
-->
<method name="UnregisterGameByPid">
<arg type="i" name="target" direction="in"/>
<arg type="i" name="requester" direction="in"/>
<arg type="i" name="result" direction="out"/>
</method>
<!-- PidFd based APIs -->
<!--
QueryStatusByPIDFd:
@target: Pidfd to query the GameMode status of
@requester: Pidfd of the process requesting the information
@result: The GameMode status for @target
Query the GameMode status for a process.
Like org.freedesktop.portal.GameMode.QueryStatusByPid() but @requester
and @target are pidfds representing the processes.
-->
<method name="QueryStatusByPIDFd">
<annotation name="org.gtk.GDBus.C.UnixFD" value="true"/>
<arg type="h" name="target" direction="in"/>
<arg type="h" name="requester" direction="in"/>
<arg type="i" name="result" direction="out"/>
</method>
<!--
RegisterGameByPIDFd:
@target: Pidfd of the game to register
@requester: Pidfd of the process requesting the registration
@result: Status of the request: 0 for success, -1 indicates an error
Register a game with GameMode.
Like org.freedesktop.portal.GameMode.RegisterGameByPid() but @requester
and @target are pidfds representing the processes.
-->
<method name="RegisterGameByPIDFd">
<annotation name="org.gtk.GDBus.C.UnixFD" value="true"/>
<arg type="h" name="target" direction="in"/>
<arg type="h" name="requester" direction="in"/>
<arg type="i" name="result" direction="out"/>
</method>
<!--
UnregisterGameByPIDFd:
@target: Pidfd of the game to un-register
@requester: Pidfd of the process requesting the un-registration
@result: Status of the request: 0 for success, -1 indicates an error
Un-register a game with GameMode.
Like org.freedesktop.portal.GameMode.UnregisterGameByPid() but @requester
and @target are pidfds representing the processes.
-->
<method name="UnregisterGameByPIDFd">
<annotation name="org.gtk.GDBus.C.UnixFD" value="true"/>
<arg type="h" name="target" direction="in"/>
<arg type="h" name="requester" direction="in"/>
<arg type="i" name="result" direction="out"/>
</method>
<!--
Active:
Whether any pid on the system has enabled Game Mode.
-->
<property name="Active" type="b" access="read"/>
<property name="version" type="u" access="read"/>
</interface>
</node>

View File

@@ -0,0 +1,239 @@
<?xml version="1.0"?>
<!--
Copyright (C) 2022 Aleix Pol Gonzalez <aleixpol@kde.org>
SPDX-License-Identifier: LGPL-2.1-or-later
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library. If not, see <http://www.gnu.org/licenses/>.
Author: Aleix Pol Gonzalez <aleixpol@kde.org>
-->
<node name="/" xmlns:doc="http://www.freedesktop.org/dbus/1.0/doc.dtd">
<!--
org.freedesktop.portal.GlobalShortcuts:
@short_description: Portal for managing global shortcuts
This portal lets applications create global shortcuts sessions, and
register shortcuts to them. These shortcuts are activated regardless of
the focused state of the application window.
To use this portal, applications have to create a session under which its
actions will be collected. Then shortcuts can be bound (see
org.freedesktop.portal.GlobalShortcuts.Bind), and listed (see
org.freedesktop.portal.GlobalShortcuts.ListShortcuts).
All global shortcuts are bound to a session, and all sessions are bound to
the application that created them.
The #org.freedesktop.portal.GlobalShortcuts::Activated and
#org.freedesktop.portal.GlobalShortcuts::Deactivated signals are emitted,
respecitvely, whenever a shortcut is activated and deactivated.
This documentation describes version 1 of this interface.
-->
<interface name="org.freedesktop.portal.GlobalShortcuts">
<!--
CreateSession:
@options: Vardict with optional further information
@handle: Object path for the :ref:`org.freedesktop.portal.Request` object representing this call
Creates a global shortcuts session.
Supported keys in the @options vardict include:
* ``handle_token`` (``s``)
A string that will be used as the last element of the @handle. Must be a valid
object path element. See the org.freedesktop.portal.Request documentation for
more information about the @handle.
* ``session_handle_token`` (``s``)
A string that will be used as the last element of the session handle. Must be a valid
object path element. See the org.freedesktop.portal.Session documentation for
more information about the session handle.
The following results get returned via the :ref:`org.freedesktop.portal.Request::Response` signal:
* ``session_handle`` (``s``)
The session handle. An object path for the
org.freedesktop.portal.Session object representing the created
session.
.. note::
The ``session_handle`` is an object path that was erroneously implemented
as ``s``. For backwards compatibility it will remain this type.
-->
<method name="CreateSession">
<annotation name="org.qtproject.QtDBus.QtTypeName.In0" value="QVariantMap"/>
<arg type="a{sv}" name="options" direction="in"/>
<arg type="o" name="handle" direction="out"/>
</method>
<!--
BindShortcuts:
@session_handle: Object path for the :ref:`org.freedesktop.portal.Session` object representing the session
@shortcuts: The list of shortcuts to bind
@parent_window: Identifier for the application window, see :doc:`window-identifiers`
@options: Vardict with optional further information
@request_handle: Object path for the :ref:`org.freedesktop.portal.Request` object representing this call
Bind the shortcuts. This will typically result the portal presenting a
dialog showing the shortcuts and allowing users to configure the shortcuts.
An application can only attempt bind shortcuts of a session once.
Each element of the @shortcuts array is a tuple composed of a shortcut id,
and a vardict with the following keys:
* ``description`` (``s``)
User-readable text describing what the shortcut does.
* ``preferred_trigger`` (``s``)
The preferred shortcut trigger, defined as described by the
`shortcuts XDG specification <https://specifications.freedesktop.org/shortcuts-spec/latest/>`__.
Optional.
Supported keys in the @options vardict include:
* ``handle_token`` (``s``)
A string that will be used as the last element of the
@handle. Must be a valid object path element. See the
:ref:`org.freedesktop.portal.Request` documentation for more
information about the @handle.
The following results get returned via the ref::`org.freedesktop.portal.Request::Response` signal:
* ``shortcuts`` (``a(sa{sv})``)
The list of shortcuts which were bound. This is a subset of the
shortcuts which were passed in from the @shortcuts variable of this
method (this includes the set of all shortcuts and the empty set).
The keys they may contain are described below, and are different from
the keys in the @shortcuts variable of this method.
Each element of the @shortcuts array returned by the
:ref:`org.freedesktop.portal.Request::Response` signal is a tuple composed of
a shortcut id, and a vardict with the following keys:
* ``description`` (``s``)
User-readable text describing what the shortcut does.
* ``trigger_description`` (``s``)
User-readable text describing how to trigger the shortcut for the
client to render.
-->
<method name="BindShortcuts">
<arg type="o" name="session_handle" direction="in"/>
<annotation name="org.qtproject.QtDBus.QtTypeName.In1" value="QList&lt;QPair&lt;QString,QVariantMap&gt;&gt;"/>
<arg type="a(sa{sv})" name="shortcuts" direction="in"/>
<arg type="s" name="parent_window" direction="in"/>
<annotation name="org.qtproject.QtDBus.QtTypeName.In3" value="QVariantMap"/>
<arg type="a{sv}" name="options" direction="in"/>
<arg type="o" name="request_handle" direction="out"/>
</method>
<!--
ListShortcuts:
@session_handle: Object path for the :ref:`org.freedesktop.portal.Session` object representing the session
@options: Vardict with optional further information
Lists all shortcuts.
Supported keys in the @options vardict include:
* ``handle_token`` (``s``)
A string that will be used as the last element of the
@handle. Must be a valid object path element. See the
:ref:`org.freedesktop.portal.Request` documentation for more
information about the @handle.
The following results get returned via the :ref:`org.freedesktop.portal.Request::Response` signal:
* ``shortcuts`` (``a(sa{sv})``)
A list of shortcuts.
See the :ref:`org.freedesktop.portal.Request::Response` signal of the
org.freedesktop.portal.GlobalShortcuts.BindShortcuts() method for
the list of supported properties of shortcuts.
-->
<method name="ListShortcuts">
<arg type="o" name="session_handle" direction="in"/>
<annotation name="org.qtproject.QtDBus.QtTypeName.In1" value="QVariantMap"/>
<arg type="a{sv}" name="options" direction="in"/>
<arg type="o" name="request_handle" direction="out"/>
</method>
<!--
Activated:
@session_handle: Session that requested the shortcut
@shortcut_id: the application-provided ID for the notification
@timestamp: the time of activation with millisecond granularity, with an undefined base.
@options: Vardict with optional further information
Notifies about a shortcut becoming active.
-->
<signal name="Activated">
<arg type="o" name="session_handle" direction="out"/>
<arg type="s" name="shortcut_id" direction="out"/>
<arg type="t" name="timestamp" direction="out"/>
<annotation name="org.qtproject.QtDBus.QtTypeName.Out3" value="QVariantMap"/>
<arg type="a{sv}" name="options" direction="out"/>
</signal>
<!--
Deactivated:
@session_handle: Session that requested the shortcut
@shortcut_id: the application-provided ID for the notification
@timestamp: the time of deactivation with millisecond granularity, with an undefined base.
@options: Vardict with optional further information
Notifies that a shortcut is not active anymore.
-->
<signal name="Deactivated">
<arg type="o" name="session_handle" direction="out"/>
<arg type="s" name="shortcut_id" direction="out"/>
<arg type="t" name="timestamp" direction="out"/>
<annotation name="org.qtproject.QtDBus.QtTypeName.Out3" value="QVariantMap"/>
<arg type="a{sv}" name="options" direction="out"/>
</signal>
<!--
ShortcutsChanged:
@session_handle: Session that requested the shortcut
@shortcuts: The different shortcuts that have been registered. See org.freedesktop.portal.GlobalShortcuts.
Indicates that the information associated with some of the shortcuts has changed.
See the :ref:`org.freedesktop.portal.Request::Response` signal of the
org.freedesktop.portal.GlobalShortcuts.BindShortcuts() method for the
list of supported properties of shortcuts.
-->
<signal name="ShortcutsChanged">
<arg type="o" name="session_handle" direction="out"/>
<annotation name="org.qtproject.QtDBus.QtTypeName.Out1" value="QList&lt;QPair&lt;QString,QVariantMap&gt;&gt;"/>
<arg type="a(sa{sv})" name="shortcuts" direction="out"/>
</signal>
<property name="version" type="u" access="read"/>
</interface>
</node>

View File

@@ -0,0 +1,173 @@
<?xml version="1.0"?>
<!--
Copyright (C) 2016 Red Hat, Inc.
SPDX-License-Identifier: LGPL-2.1-or-later
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library. If not, see <http://www.gnu.org/licenses/>.
Author: Matthias Clasen <mclasen@redhat.com>
-->
<node name="/" xmlns:doc="http://www.freedesktop.org/dbus/1.0/doc.dtd">
<!--
org.freedesktop.portal.Inhibit:
@short_description: Portal for inhibiting session transitions
This simple interface lets sandboxed applications inhibit the user
session from ending, suspending, idling or getting switched away.
This documentation describes version 3 of this interface.
-->
<interface name="org.freedesktop.portal.Inhibit">
<!--
Inhibit:
@window: Identifier for the window
@flags: Flags identifying what is inhibited
@options: Vardict with optional further information
@handle: Object path for the :ref:`org.freedesktop.portal.Request` object representing this call
Inhibits a session status changes. To remove the inhibition,
call :ref:`org.freedesktop.portal.Request.Close` on the returned
handle.
The flags determine what changes are inhibited:
- ``1``: Logout
- ``2``: User Switch
- ``4``: Suspend
- ``8``: Idle
Supported keys in the @options vardict include:
* ``handle_token`` (``s``)
A string that will be used as the last element of the @handle. Must be a valid
object path element. See the :ref:`org.freedesktop.portal.Request` documentation for
more information about the @handle.
* ``reason`` (``s``)
User-visible reason for the inhibition.
-->
<method name="Inhibit">
<arg type="s" name="window" direction="in"/>
<arg type="u" name="flags" direction="in"/>
<annotation name="org.qtproject.QtDBus.QtTypeName.In2" value="QVariantMap"/>
<arg type="a{sv}" name="options" direction="in"/>
<arg type="o" name="handle" direction="out"/>
</method>
<!--
CreateMonitor:
@window: the parent window
@options: Vardict with optional further information
@handle: Object path for the :ref:`org.freedesktop.portal.Request` object representing this call
Creates a monitoring session. While this session is
active, the caller will receive StateChanged signals
with updates on the session state.
A successfully created session can at any time be closed using
org.freedesktop.portal.Session::Close, or may at any time be closed
by the portal implementation, which will be signalled via
:ref:`org.freedesktop.portal.Session::Closed`.
Supported keys in the @options vardict include:
* ``handle_token`` (``s``)
A string that will be used as the last element of the @handle. Must be a valid
object path element. See the :ref:`org.freedesktop.portal.Request` documentation for
more information about the @handle.
* ``session_handle_token`` (``s``)
A string that will be used as the last element of the session handle. Must be a valid
object path element. See the :ref:`org.freedesktop.portal.Session` documentation for
more information about the session handle.
The following results get returned via the :ref:`org.freedesktop.portal.Request::Response` signal:
* ``session_handle`` (``s``)
The session handle. An object path for the
:ref:`org.freedesktop.portal.Session` object representing the created
session.
.. note::
The ``session_handle`` is an object path that was erroneously implemented
as ``s``. For backwards compatibility it will remain this type.
This method was added in version 2 of this interface.
-->
<method name="CreateMonitor">
<arg type="s" name="window" direction="in"/>
<annotation name="org.qtproject.QtDBus.QtTypeName.In1" value="QVariantMap"/>
<arg type="a{sv}" name="options" direction="in"/>
<arg type="o" name="handle" direction="out"/>
</method>
<!--
StateChanged:
@session_handle: Object path for the :ref:`org.freedesktop.portal.Session` object
@state: Vardict with information about the session state
The StateChanged signal is sent to active monitoring sessions when
the session state changes.
When the session state changes to 'Query End', clients with active monitoring
sessions are expected to respond by calling
org.freedesktop.portal.Inhibit.QueryEndResponse() within a second
of receiving the StateChanged signal. They may call org.freedesktop.portal.Inhibit.Inhibit()
first to inhibit logout, to prevent the session from proceeding to the Ending state.
The following information may get returned in the @state vardict:
* ``screensaver-active`` (``b``)
Whether the screensaver is active.
* ``session-state`` (``u``)
The state of the session. This member is new in version 3.
- ``1``: Running
- ``2``: Query End
- ``3``: Ending
-->
<signal name="StateChanged">
<arg type="o" name="session_handle" direction="out"/>
<annotation name="org.qtproject.QtDBus.QtTypeName.Out1" value="QVariantMap"/>
<arg type="a{sv}" name="state" direction="out"/>
</signal>
<!--
QueryEndResponse:
@session_handle: Object path for the :ref:`org.freedesktop.portal.Session` object
Acknowledges that the caller received the #org.freedesktop.portal.Inhibit::StateChanged
signal. This method should be called within one second or receiving a StateChanged
signal with the 'Query End' state.
Since version 3.
-->
<method name="QueryEndResponse">
<arg type="o" name="session_handle" direction="in"/>
</method>
<property name="version" type="u" access="read"/>
</interface>
</node>

View File

@@ -0,0 +1,532 @@
<?xml version="1.0"?>
<!--
Copyright (C) 2022 Red Hat, Inc.
SPDX-License-Identifier: LGPL-2.1-or-later
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library. If not, see <http://www.gnu.org/licenses/>.
Author: Matthias Clasen <mclasen@redhat.com>
-->
<node name="/" xmlns:doc="http://www.freedesktop.org/dbus/1.0/doc.dtd">
<!--
org.freedesktop.portal.InputCapture:
@short_description: Portal for permitting input capture
The InputCapture portal allows capture input events from connected
physical or logical devices. Capturing input has two distinct states:
"enabled" where an application has requested that input should be captured
once certain conditions are met (but no input events are being delivered
yet) and "active", when input events are being delivered to the application.
An application can only control the "enabled" state, the compositor decides
when to switch into the "active" state - and which devices to capture.
Once the compositor activates input capturing, events from physical or
logical devices are sent directly to the application instead of using
those events to update the pointer position on-screen. The compositor
is in control of the input capturing and may filter events and/or stop
capturing at any time.
Input capturing is an asynchronous operation using "triggers". An
application sets up a number of triggers but it is the compositor who
decides when the trigger conditions are met. Currently, the only defined
trigger are pointer barriers: horizontal or vertical "lines" on the screen
that should trigger when the cursor moves across those lines.
See org.freedesktop.portal.InputCapture.SetPointerBarriers().
There is currently no way for an application to activate immediate input
capture.
The InputCapture portal merely *manages* the logic when input should be
captured. The transport of actual input events is delegated to a
transport layer, specifically libei. See org.freedesktop.portal.InputCapture.ConnectToEIS().
This documentation describes version 1 of this interface.
-->
<interface name="org.freedesktop.portal.InputCapture">
<!--
CreateSession:
@parent_window: Identifier for the application window, see :doc:`window-identifiers`
@options: Vardict with optional further information
@handle: Object path for the :ref:`org.freedesktop.portal.Request` object representing this call
Create a capture input session. A successfully created session can at
any time be closed using :ref:`org.freedesktop.portal.Session.Close`, or may
at any time be closed by the portal implementation, which will be
signalled via :ref:`org.freedesktop.portal.Session::Closed`.
Supported keys in the @options vardict include:
* ``handle_token`` (``s``)
A string that will be used as the last element of the @handle. Must be a valid
object path element. See the :ref:`org.freedesktop.portal.Request` documentation for
more information about the @handle.
* ``session_handle_token`` (``s``)
A string that will be used as the last element of the session handle. Must be a valid
object path element. See the :ref:`org.freedesktop.portal.Session` documentation for
more information about the session handle.
* ``capabilities`` (``u``)
Bitmask of requested capabilities, see the SupportedCapabilities property.
This value is required and must not be zero.
The following results get returned via the :ref:`org.freedesktop.portal.Request::Response` signal:
* ``session_handle`` (``o``)
The session handle. An object path for the
:ref:`org.freedesktop.portal.Session` object representing the created
session.
* ``capabilities`` (``u``)
The capabilities available to this session. This is always a
subset of the requested capabilities.
See the SupportedCapabilities property for details. Note that
while a capability may be available to a session, there is no
guarantee a device with that capability is currently available
or if one does become available that it will trigger input capture.
It is best to view this set as a negative confirmation - a
capability that was requested but is missing is an indication that
this application may not capture events of that capability.
-->
<method name="CreateSession">
<arg type="s" name="parent_window" direction="in"/>
<annotation name="org.qtproject.QtDBus.QtTypeName.In1" value="QVariantMap"/>
<arg type="a{sv}" name="options" direction="in"/>
<arg type="o" name="handle" direction="out"/>
</method>
<!--
GetZones:
@session_handle: Object path for the :ref:`org.freedesktop.portal.Session` object
@options: Vardict with optional further information
@handle: Object path for the :ref:`org.freedesktop.portal.Request` object representing this call
Retrieve the set of currently available input zones for this session.
The zones may not be continuous and may be a logical representation
of the physical screens (e.g. a 4k screen may be represented as
low-resolution screen instead). A set of zones is identified by a unique
zone_set ID.
The name "Zone" was chosen to provide distinction with the libei
"Region".
If the zones change (e.g. a monitor is unplugged), the
#org.freedesktop.portal.InputCapture::ZonesChanged signal is emitted
and the application should re-request the current zones to update its
internal state.
Note that zones are session-specific, there is no guarantee that two
applications see the same screen zones. An empty zone list implies
that no pointer barriers can be set.
Whenever the application calls GetZones, the current
zone_set ID is returned that references the current set of zones. To
establish a pointer barrier, the application must pass this ID to
org.freedesktop.portal.InputCapture.SetPointerBarriers(). A mismatch of
zone_set IDs implies the application is not using the current zone set and
pointer barriers will fail.
The zone_set ID increases by an unspecified amount with each change to
the set of zones. Applications must be able to handle the zone_set ID
wrapping around. Implementations of this portal must to increase
the zone_set ID by a sensible amount to allow for
wrapping detection.
The following results get returned via the :ref:`org.freedesktop.portal.Request::Response` signal:
* ``zones`` (``a(uuii)``)
An array of regions, each specifying that zone's width, height,
x/y offset.
* ``zone_set`` (``u``)
A unique ID to be used in the
org.freedesktop.portal.InputCapture.SetPointerBarriers() method to refer to
this set of zones. This id increases by an unspecified
amount whenever the zones change and pointer barriers can only be set up
if the zone_set matches the most recent returned zone_set.
-->
<method name="GetZones">
<arg type="o" name="session_handle" direction="in"/>
<annotation name="org.qtproject.QtDBus.QtTypeName.In1" value="QVariantMap"/>
<arg type="a{sv}" name="options" direction="in"/>
<arg type="o" name="handle" direction="out"/>
</method>
<!--
SetPointerBarriers:
@session_handle: Object path for the :ref:`org.freedesktop.portal.Session` object
@options: Vardict with optional further information
@barriers: An array of vardicts, each specifying one barrier
@zone_set: A unique zone_set ID referring to the zone set
@handle: Object path for the :ref:`org.freedesktop.portal.Request` object representing this call
Set up zero or more pointer barriers. Pointer barriers are horizontal
or vertical "lines" that should trigger the start of input capture when the cursor moves
across the pointer barrier. After a successful
org.freedesktop.portal.InputCapture.Enable() call and when the
compositor has deemed the pointer barrier to be crossed, input events
(from compositor-determined input devices) are sent to the application
via the transport layer.
Pointer barriers are situated on the top (for horizontal barriers) or left
(for vertical barriers) edge of their respective pixels and their width or height
is inclusive each pixel's width or height. In other words, a barrier spanning
x1=0, x2=1 is exactly two pixels wide. A pointer barrier must be situated at the
outside boundary of the union of all zones.
A pointer barrier must be fully contained within one zone.
For example, consider two zones of size 1920x1080 with offsets
0,0 and 1920,0, respectively. (i.e. a left-right dual-monitor setup).
The following pointer barriers are permitted:
- top edge of left screen: `x1=0, y1=0, x2=1919, y1=0`
- bottom edge of left screen: `x1=0, y1=1080, x2=1919, y1=1080`
- top edge of right screen: `x1=1920, y1=0, x2=3839, y1=0`
- bottom edge of right screen: `x1=1920, y1=1080, x2=3839, y1=1080`
- left edge of left screen: `x1=0, y1=0, x2=0, y1=1079`
- right edge of right screen: `x1=3840, y1=0, x2=3840, y1=1079`
A pointer barrier is considered triggered when the pointer would
logically move off that zone, even if the actual cusor movement is
clipped to the zone.
A zero-sized array of pointer barriers removes all existing pointer barriers
for this session. Setting pointer barriers immediately suspends the
current session and the application must call org.freedesktop.portal.InputCapture.Enable()
after this method.
The @zone_set must be equivalent to the last returned zone_set of the
org.freedesktop.portal.InputCapture.GetZones() method. A mismatch of ids
implies the application is not using the current zone set and
pointer barriers will fail.
Supported keys in the @options vardict include:
* ``handle_token`` (``s``)
A string that will be used as the last element of the @handle. Must be a valid
object path element. See the :ref:`org.freedesktop.portal.Request` documentation for
more information about the @handle.
Supported keys in the @barriers vardicts include:
* ``barrier_id`` (``u``)
The non-zero id of this barrier. This id is used in the
#org.freedesktop.portal.InputCapture::Activated signal to inform
which barrier triggered input capture.
* ``position`` (``(iiii)``)
The x1/y1 x2/y2 position of the pointer barrier. A horizontal
pointer barrier must have y1 == y2, a vertical pointer barrier
must have x1 == x2. Diagonal pointer barriers are not supported.
The following results get returned via the :ref:`org.freedesktop.portal.Request::Response` signal:
* ``failed_barriers`` (``au``)
An array of barrier_ids of pointer barriers that have been denied. The
id matches the barrier_id of the entries in the @barriers argument.
-->
<method name="SetPointerBarriers">
<arg type="o" name="session_handle" direction="in"/>
<annotation name="org.qtproject.QtDBus.QtTypeName.In1" value="QVariantMap"/>
<arg type="a{sv}" name="options" direction="in"/>
<annotation name="org.qtproject.QtDBus.QtTypeName.In2" value="QList&lt;QVariantMap&gt;"/>
<arg type="aa{sv}" name="barriers" direction="in"/>
<arg type="u" name="zone_set" direction="in"/>
<arg type="o" name="handle" direction="out"/>
</method>
<!--
Enable:
@session_handle: Object path for the :ref:`org.freedesktop.portal.Session` object
@options: Vardict with optional further information
Enable input capturing. This does not immediately trigger capture, it
merely enables the capturing to be triggered at some future point
(e.g. by the cursor moving across a barrier). If and when that happens,
the #org.freedesktop.portal.InputCapture::Activated signal is emitted.
-->
<method name="Enable">
<arg type="o" name="session_handle" direction="in"/>
<annotation name="org.qtproject.QtDBus.QtTypeName.In1" value="QVariantMap"/>
<arg type="a{sv}" name="options" direction="in"/>
</method>
<!--
Disable:
@session_handle: Object path for the :ref:`org.freedesktop.portal.Session` object
@options: Vardict with optional further information
Disable input capturing. No
#org.freedesktop.portal.InputCapture::Disabled signal will be emitted.
If input capturing is currently ongoing, no
#org.freedesktop.portal.InputCapture::Deactivated signal will be
emitted.
Due to the asynchronous nature of this protocol,
#org.freedesktop.portal.InputCapture::Deactivated
and/or #org.freedesktop.portal.InputCapture::Deactivated signals may
nevertheless be received by the application after a call to
org.freedesktop.portal.InputCapture.Enable().
Input events will not be captured until a subsequent
org.freedesktop.portal.InputCapture.Enable() call.
-->
<method name="Disable">
<arg type="o" name="session_handle" direction="in"/>
<annotation name="org.qtproject.QtDBus.QtTypeName.In1" value="QVariantMap"/>
<arg type="a{sv}" name="options" direction="in"/>
</method>
<!--
Release:
@session_handle: Object path for the :ref:`org.freedesktop.portal.Session` object
@options: Vardict with optional further information
Release any ongoing input capture. No
#org.freedesktop.portal.InputCapture::Deactivated signal will be emitted.
Due to the asynchronous nature of this protocol, a
#org.freedesktop.portal.InputCapture::Deactivated
signal may
nevertheless be received by the application after a call to
org.freedesktop.portal.InputCapture.Release().
The activation_id provided in the @options vardict specifies which
currently ongoing input capture should be terminated. The asynchronous
nature of this portal allows for an input capture to be Deactivated and
a new input capture to be Activated before the client requests the
Release for the previous input capture.
A compositor should ignore a
org.freedesktop.portal.InputCapture.Release() request for a no longer active
activation_id.
Supported keys in the @options vardict include:
* ``activation_id`` (``u``)
The same activation_id number as in the
#org.freedesktop.portal.InputCapture::Activated signal.
* ``cursor_position`` (``(dd)``)
The suggested cursor position within the Zones available in
this session.
This is a suggestion to the compositor to place the cursor in
the correct position to allow for fluent movement between virtual
screens. The compositor is not required to honor this suggestion.
-->
<method name="Release">
<arg type="o" name="session_handle" direction="in"/>
<annotation name="org.qtproject.QtDBus.QtTypeName.In1" value="QVariantMap"/>
<arg type="a{sv}" name="options" direction="in"/>
</method>
<!--
ConnectToEIS:
@session_handle: Object path for the :ref:`org.freedesktop.portal.Session` object
@options: Vardict with optional further information
@fd: A file descriptor to an active EIS implementation that can be passed to a passive libei context
Set up the connection to an active EIS implementation. Once input capturing starts,
input events are sent via the EI protocol between the compositor and the application.
This call must be invoked before org.freedesktop.portal.InputCapture.Enable().
A session only needs to set this up once, the EIS implementation is not affected by
calls to org.freedesktop.portal.InputCapture.Disable() and org.freedesktop.portal.InputCapture.Enable() -
the same connection can be re-used until the session is closed.
-->
<method name="ConnectToEIS">
<annotation name="org.gtk.GDBus.C.Name" value="connect_to_eis"/>
<annotation name="org.gtk.GDBus.C.UnixFD" value="true"/>
<arg type="o" name="session_handle" direction="in"/>
<annotation name="org.qtproject.QtDBus.QtTypeName.In1" value="QVariantMap"/>
<arg type="a{sv}" name="options" direction="in"/>
<arg type="h" name="fd" direction="out"/>
</method>
<!--
Disabled:
@session_handle: Object path for the :ref:`org.freedesktop.portal.Session` object
@options: Vardict with optional further information
The Disabled signal is emitted when the application will no longer
receive captured input. If input capturing is currently ongoing, the
#org.freedesktop.portal.InputCapture::Deactivated signal is emitted
before this signal.
Applications must call org.freedesktop.portal.InputCapture.Enable() to
request future input capturing for this session.
-->
<signal name="Disabled">
<arg type="o" name="session_handle" direction="out"/>
<annotation name="org.qtproject.QtDBus.QtTypeName.Out1" value="QVariantMap"/>
<arg type="a{sv}" name="options" direction="out"/>
</signal>
<!--
Activated:
@session_handle: Object path for the :ref:`org.freedesktop.portal.Session` object
@options: Vardict with optional further information
The Activated signal is emitted when input capture starts and input events
are about to be sent to the application.
This signal is only emitted after a prior call
to org.freedesktop.portal.InputCapture.Enable().
Supported keys in the @options vardict include:
* ``activation_id`` (``u``)
A number that can be used to synchronize with the
transport-layer. This number has no intrinsic meaning but
is guaranteed to increase by an unspecified amount on each call.
In particular: if the compositor sends a activation_id of N as
part of this request it will also set the sequence in EIS'
start_emulating event the same value N on the EIS connection
before the first event from a device is sent.
This allows an application to have a synchronization point and
attribute an event sequence to the portal interaction.
Applications must be able to handle the activation_id number
wrapping around. Implementations of this portal must increase
the activation_id number by a sensible amount to allow for
wrapping detection.
* ``cursor_position`` (``(dd)``)
The current cursor position in the same coordinate space as
the Zones. Note that this position is usually outside the Zones
available to this session as all PointerBarriers are at the edge
of their respective Zones.
For example, a fast movement against a barrier on the right edge
of a screen may logically put the cursor dozens of pixels into
the (non-existing) screen on the other side of the barrier.
It is the application's responsibility to calculate and adjust the
cursor position as necessary.
* ``barrier_id`` (``u``)
The barrier id of the barrier that triggered. If the value is
nonzero, it matches the barrier id as specified in
org.freedesktop.portal.InputCapture.SetPointerBarriers().
If the id is zero, the pointer barrier could not be determined.
If the id is missing, the input capture was not triggered by a
pointer barrier.
Where more than one pointer barrier are triggered by the same
movement it is up to the compositor to choose one barrier (or use
a barrier id of zero).
-->
<signal name="Activated">
<arg type="o" name="session_handle" direction="out"/>
<annotation name="org.qtproject.QtDBus.QtTypeName.Out1" value="QVariantMap"/>
<arg type="a{sv}" name="options" direction="out"/>
</signal>
<!--
Deactivated:
@session_handle: Object path for the :ref:`org.freedesktop.portal.Session` object
@options: Vardict with optional further information
The Deactivated signal is emitted when input capture stopped and input events
are no longer sent to the application. To prevent future input
capture, an application must call org.freedesktop.portal.InputCapture.Disable().
Supported keys in the @options vardict include:
* ``activation_id`` (``u``)
The same activation_id number as in the corresponding
#org.freedesktop.portal.InputCapture::Activated signal.
-->
<signal name="Deactivated">
<arg type="o" name="session_handle" direction="out"/>
<annotation name="org.qtproject.QtDBus.QtTypeName.Out1" value="QVariantMap"/>
<arg type="a{sv}" name="options" direction="out"/>
</signal>
<!--
ZonesChanged:
@session_handle: Object path for the :ref:`org.freedesktop.portal.Session` object
@options: Vardict with optional further information
The ZonesChanged signal is emitted when the set of zones
available **to this session** change. An application should immediately
call org.freedesktop.portal.InputCapture.GetZones() to update its state
of the zones followed by
org.freedesktop.portal.InputCapture.SetPointerBarriers() to re-establish
the pointer barriers.
The ZonesChanged signal includes the zone_set ID of the set of zones
invalidated, see #org.freedesktop.portal.InputCapture.GetZones().
Due to the asynchronous nature of this protocol, the zone_set ID may
identify a set of zones that the application has never (or not yet) seen.
Applications must be able to handle unknown zone_set IDs. In particular,
because the zone_set ID is guaranteed to increment, an application holding
a zone_set ID higher than the ID in this signal can usually simply
discard the signal.
Supported keys in the @options vardict include:
* ``zone_set`` (``u``)
The zone_set ID of the invalidated zone set as described in
org.freedesktop.portal.InputCapture.GetZones()
-->
<signal name="ZonesChanged">
<arg type="o" name="session_handle" direction="out"/>
<annotation name="org.qtproject.QtDBus.QtTypeName.Out1" value="QVariantMap"/>
<arg type="a{sv}" name="options" direction="out"/>
</signal>
<!--
SupportedCapabilities:
A bitmask of supported capabilities. This list is constant, it is not the list of
capabilities currently available but rather which capabilies are
implemented by the portal.
Applications must ignore unknown capabilities.
Currently defined types are:
- ``1``: KEYBOARD
- ``2``: POINTER
- ``4``: TOUCHSCREEN
-->
<property name="SupportedCapabilities" type="u" access="read"/>
<property name="version" type="u" access="read"/>
</interface>
</node>

View File

@@ -0,0 +1,149 @@
<?xml version="1.0"?>
<!--
Copyright (C) 2018 Red Hat, Inc.
SPDX-License-Identifier: LGPL-2.1-or-later
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library. If not, see <http://www.gnu.org/licenses/>.
Author: Matthias Clasen <mclasen@redhat.com>
-->
<node name="/" xmlns:doc="http://www.freedesktop.org/dbus/1.0/doc.dtd">
<!--
org.freedesktop.portal.Location:
@short_description: Portal for obtaining information about the location
This simple interface lets sandboxed applications query basic
information about the location.
This documentation describes version 1 of this interface.
-->
<interface name="org.freedesktop.portal.Location">
<!--
CreateSession:
@options: Vardict with optional further information
@handle: Object path for the created :ref:`org.freedesktop.portal.Session` object
Create a location session. A successfully created session can at
any time be closed using :ref:`org.freedesktop.portal.Session.Close`, or may
at any time be closed by the portal implementation, which will be
signalled via :ref:`org.freedesktop.portal.Session::Closed`.
Supported keys in the @options vardict include:
* ``session_handle_token`` (``s``)
A string that will be used as the last element of the session handle. Must be a valid
object path element. See the :ref:`org.freedesktop.portal.Session` documentation for
more information about the session handle.
* ``distance-threshold`` (``u``)
Distance threshold in meters. Default is 0.
* ``time-threshold`` (``u``)
Time threshold in seconds. Default is 0.
* ``accuracy`` (``u``)
Requested accuracy. Default is ``EXACT``. Supported values:
- ``NONE``: 0
- ``COUNTRY``: 1
- ``CITY``: 2
- ``NEIGHBORHOOD``: 3
- ``STREET``: 4
- ``EXACT``: 5
-->
<method name="CreateSession">
<annotation name="org.qtproject.QtDBus.QtTypeName.In0" value="QVariantMap"/>
<arg type="a{sv}" name="options" direction="in"/>
<arg type="o" name="handle" direction="out"/>
</method>
<!--
Start:
@session_handle: Object path for the :ref:`org.freedesktop.portal.Session` object
@parent_window: Identifier for the application window, see :doc:`window-identifiers`
@options: Vardict with optional further information
@handle: Object path for the :ref:`org.freedesktop.portal.Request` object representing this call
Start the location session.
An application can only attempt start a session once.
Supported keys in the @options vardict include:
* ``handle_token`` (``s``)
A string that will be used as the last element of the @handle. Must be a valid
object path element. See the :ref:`org.freedesktop.portal.Request` documentation for
more information about the @handle.
-->
<method name="Start">
<arg type="o" name="session_handle" direction="in"/>
<arg type="s" name="parent_window" direction="in"/>
<annotation name="org.qtproject.QtDBus.QtTypeName.In2" value="QVariantMap"/>
<arg type="a{sv}" name="options" direction="in"/>
<arg type="o" name="handle" direction="out"/>
</method>
<!--
LocationUpdated:
@session_handle: Object path for the :ref:`org.freedesktop.portal.Session` object
@location: Vardict with the current location data
The LocationUpdated signal is emitted when the location has changed, as well
as when the initial location has been determined.
The following results may get returned via the @location:
* ``Latitude`` (``d``)
The latitude, in degrees.
* ``Longitude`` (``d``)
The longitude, in degrees.
* ``Altitude`` (``d``)
The altitude, in meters.
* ``Accuracy`` (``d``)
The accuracy, in meters.
* ``Speed`` (``d``)
The speed, in meters per second.
* ``Heading`` (``d``)
The heading, in degrees, going clockwise. North 0, East 90, South 180, West 270.
* ``Timestamp`` (``(tt)``)
The timestamp, as seconds and microseconds since the Unix epoch.
-->
<signal name="LocationUpdated">
<arg type="o" name="session_handle" direction="out"/>
<annotation name="org.qtproject.QtDBus.QtTypeName.Out1" value="QVariantMap"/>
<arg type="a{sv}" name="location" direction="out"/>
</signal>
<property name="version" type="u" access="read"/>
</interface>
</node>

View File

@@ -0,0 +1,52 @@
<?xml version="1.0"?>
<!--
Copyright (C) 2016, 2019 Red Hat, Inc.
SPDX-License-Identifier: LGPL-2.1-or-later
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library. If not, see <http://www.gnu.org/licenses/>.
Authors: Matthias Clasen <mclasen@redhat.com>
Bastien Nocera <hadess@hadess.net>
-->
<node name="/" xmlns:doc="http://www.freedesktop.org/dbus/1.0/doc.dtd">
<!--
org.freedesktop.portal.MemoryMonitor:
@short_description: Memory monitoring portal
The Memory Monitor interface provides information about low system
memory to sandboxed applications. It is not a portal in the strict
sense, since it does not involve user interaction. Applications are
expected to use this interface indirectly, via a library API
such as the GLib GMemoryMonitor interface.
This documentation describes version 1 of this interface.
-->
<interface name="org.freedesktop.portal.MemoryMonitor">
<!--
LowMemoryWarning:
@level: An integer representing the level of low memory warning.
Signal emitted when a particular low memory situation happens with 0 being the lowest
level of memory availability warning, and 255 being the highest. Those levels are defined
and documented in `Low Memory Monitor's documentation
<https://hadess.pages.freedesktop.org/low-memory-monitor/>`_.
-->
<signal name="LowMemoryWarning">
<arg name="level" type="y"/>
</signal>
<property name="version" type="u" access="read"/>
</interface>
</node>

View File

@@ -0,0 +1,133 @@
<?xml version="1.0"?>
<!--
Copyright (C) 2016 Red Hat, Inc.
SPDX-License-Identifier: LGPL-2.1-or-later
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library. If not, see <http://www.gnu.org/licenses/>.
Author: Matthias Clasen <mclasen@redhat.com>
-->
<node name="/" xmlns:doc="http://www.freedesktop.org/dbus/1.0/doc.dtd">
<!--
org.freedesktop.portal.NetworkMonitor:
@short_description: Network monitoring portal
The NetworkMonitor interface provides network status information
to sandboxed applications. It is not a portal in the strict sense,
since it does not involve user interaction. Applications are
expected to use this interface indirectly, via a library API
such as the GLib GNetworkMonitor interface.
This documentation describes version 3 of this interface.
-->
<interface name="org.freedesktop.portal.NetworkMonitor">
<!--
changed:
Emitted when the network configuration changes.
-->
<signal name="changed"/>
<!--
GetAvailable:
@available: whether the network is available
Returns whether the network is considered available.
That is, whether the system as a default route for
at least one of IPv4 or IPv6.
This method was added in version 2 to replace
the available property.
-->
<method name="GetAvailable">
<arg type="b" name="available" direction="out"/>
</method>
<!--
GetMetered:
@metered: whether the network is metered
Returns whether the network is considered metered.
That is, whether the system as traffic flowing through
the default connection that is subject ot limitations
by service providers.
This method was added in version 2 to replace
the metered property.
-->
<method name="GetMetered">
<arg type="b" name="metered" direction="out"/>
</method>
<!--
GetConnectivity:
@connectivity: the level of connectivity
Returns more detailed information about the host's network
connectivity. The meaning of the value is:
- ``1``: Local only. The host is not configured with a route to the internet.
- ``2``: Limited connectivity. The host is connected to a network, but can't reach the full internet.
- ``3``: Captive portal. The host is behind a captive portal and cannot reach the full internet.
- ``4``: Full network. The host connected to a network, and can reach the full internet.
This method was added in version 2 to replace
the connectivity property.
-->
<method name="GetConnectivity">
<arg type="u" name="connectivity" direction="out"/>
</method>
<!--
GetStatus:
@status: a dictionary with the current values
Returns the three values all at once.
The following results get returned via @status:
* ``available`` (``b``)
Whether the network is available.
* ``metered`` (``b``)
Whether the network is metered.
* ``connectivity`` (``u``)
The level of connectivity.
This method was added in version 3 to avoid multiple round-trips.
-->
<method name="GetStatus">
<annotation name="org.qtproject.QtDBus.QtTypeName.Out0" value="QVariantMap"/>
<arg type="a{sv}" name="status" direction="out"/>
</method>
<!--
CanReach:
@hostname: the hostname to reach
@port: the port to reach
@reachable: Whether the hostname:port was reachable
Returns whether the given hostname is believed to be reachable.
This method was added in version 3.
-->
<method name="CanReach">
<arg type="s" name="hostname" direction="in"/>
<arg type="u" name="port" direction="in"/>
<arg type="b" name="reachable" direction="out"/>
</method>
<property name="version" type="u" access="read"/>
</interface>
</node>

View File

@@ -0,0 +1,428 @@
<?xml version="1.0"?>
<!--
Copyright (C) 2016 Red Hat, Inc.
SPDX-License-Identifier: LGPL-2.1-or-later
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library. If not, see <http://www.gnu.org/licenses/>.
Author: Matthias Clasen <mclasen@redhat.com>
-->
<node name="/" xmlns:doc="http://www.freedesktop.org/dbus/1.0/doc.dtd">
<!--
org.freedesktop.portal.Notification:
@short_description: Portal for sending notifications
This simple interface lets sandboxed applications send and withdraw
notifications. It is not possible for the application to learn
if the notification was actually presented to the user. Not a
portal in the strict sense, since there is no user interaction.
Note that in contrast to most other portal requests, notifications
are expected to outlast the running application. If a user clicks
on a notification after the application has exited, it will get
activated again.
Notifications can specify actions that can be activated by the
user. Actions whose name starts with 'app.' are assumed to be
exported (without the 'app.' prefix) and will be activated via
`D-Bus Activation
<https://specifications.freedesktop.org/desktop-entry-spec/latest/ar01s08.html>`_
using ``ActivateAction()`` method in the
``org.freedesktop.Application`` interface. An `activation-token` for
`XDG Activation
<https://gitlab.freedesktop.org/wayland/wayland-protocols/-/blob/main/staging/xdg-activation/xdg-activation-v1.xml>`_
and an application-defined `target` is passed when activating the action.
Other actions are activated by sending the
#org.freedesktop.portal.Notification::ActionInvoked signal
to the application.
This documentation describes version 2 of this interface.
-->
<interface name="org.freedesktop.portal.Notification">
<!--
AddNotification:
@id: Application-provided ID for this notification
@notification: Vardict with the serialized notification
Sends a notification.
The ID can be used to later withdraw the notification.
If the application reuses the same ID without withdrawing,
the notification is updated with the new one. It's possible
to set ``show-as-new`` hint in the ``display-hint`` property
to animate replacing the notification instead of updating it.
The format of the serialized notification is a vardict, with
the following supported keys, all of which are optional:
* ``title`` (``s``)
User-visible string to display as the title.
This should be a short string, if it doesn't fit the UI it may
be truncated to fit on a single line.
* ``body`` (``s``)
User-visible string to display as the body.
This can be a long string but if it doesn't fit the UI it may
be wrapped or/and truncated.
* ``markup-body`` (``s``)
The same as ``body`` but with support for markup formatting.
The markup is XML-based and supports a small subset of HTML
``<b>...</b>``, ``<i>...</i>`` and ``<a href="...">...</a>``.
Any markup not supported, e.g. new lines, will be removed from
the string. In the future, the set of supported markup may be extended.
This can be a long string but if it doesn't fit the UI it may
be wrapped or/and truncated.
* ``icon`` (``v``)
A serialized icon to add to the notification. The icon must pass
`icon validation <icons.html>`_ in order to be used. The format for
serialized icon is a tuple (sv) with the following supported keys:
* ``themed`` (``as``)
A themed icon containing an array of strings with the icon names.
This is the same format as a serialized `GThemedIcon
<https://docs.gtk.org/gio/class.ThemedIcon.html>`_ at the moment,
but this interoperability may change in the future.
* ``bytes`` (``ay``)
Since version 2, this is deprecated and should not be used.
Please use the `themed` or `file-descriptor` option to set an icon.
This is the same format as a serialized `GBytesIcon
<https://docs.gtk.org/gio/class.BytesIcon.html>`_ at the moment,
but this interoperability may change in the future.
* ``file-descriptor`` (``h``)
A file descriptor to an image file in png, jpeg or svg form.
The file-descriptor used needs to be sealable, currently this is only
possible for file descriptors created with ``memfd_create()`` with
the ``MFD_ALLOW_SEALING`` flag set.
For historical reasons, it is also possible to send a simple string
for themed icons with a single icon name.
There may be further restrictions on the supported kinds of icons.
* ``sound`` (``v``)
A serialized sound to add to the notification.
Supported sound formats are ogg/opus, ogg/vorbis and wav/pcm.
The format for
serialized sound is a tuple (sv) with the following supported keys:
* ``file-descriptor`` (``h``)
A file descriptor to a sound file.
The file-descriptor used needs to be sealable, currently this is only
possible for file descriptors created with ``memfd_create()`` with
the ``MFD_ALLOW_SEALING`` flag set.
To play the default sound the string ``default`` can be passed.
To play no sound at all the string ``silent`` can be passed.
If this property isn't specified the notification server can decide
whether to play a sound.
There may be further restrictions on the supported kinds of sounds.
* ``priority`` (``s``)
The priority for the notification. Supported values:
- ``low``
- ``normal``
- ``high``
- ``urgent``
* ``default-action`` (``s``)
Name of an action that is exported by the application. This
action will be activated when the user clicks on the notification.
* ``default-action-target`` (``v``)
Target parameter to send along when activating the default action.
* ``buttons`` (``aa{sv}``)
Array of serialized buttons to add to the notification. The format for
serialized buttons is a vardict with the following supported keys:
* ``label`` (``s``)
User-visible label for the button. Mandatory, if no purpose
is specified. It is strongly recommended to always provide
sensible label. Buttons without a ``label`` are ignored
by the server when it doesn't understand the ``purpose`` or
is needed to display the button.
* ``action`` (``s``)
Name of an action that is exported by the application. The action
will be activated when the user clicks on the button. Mandatory.
* ``target`` (``v``)
Target parameter to send along when activating the action.
* ``purpose`` (``s``)
The ``purpose`` of the button. This information may be used by the
notification server to treat the button specially.
Depending on the ``purpose`` other fields of the button may be ignored.
If the server doesn't understand the ``purpose`` it will be
ignored and the button will be shown as a normal button.
Most standardized hints are defined as part of a ``category``.
Additional purposes may be defined by notification servers using
``x-vendor`` prefix e.g. ``x-gnome.class.specific``
The following purposes are defined outside of a ``category``:
* ``system.custom-alert``:
Not a button in a strict sense. This action may be called,
depending on system policies, automatically by the notification
server whenever the notification is shown.
This allows apps to use custom methods for notifying the user,
for example, to play audio from a special
source like a streaming service or a radio station.
No ``label`` should be given when this purpose is used, so that
the server can ignore the button if it doesn't understand the purpose.
* ``display-hint`` (``as``)
An array of ways to display the notification. If none are set, or the notification server has its own policy, it is
free to decide how and where to display the notification.
* ``transient``
The notification is displayed only as a banner and won't be kept
by the server in a tray.
It's a programmer error to specify ``tray`` at the same time.
* ``tray``
No banner for the notification will be displayed and
the notification is placed in the tray.
It's a programmer error to specify ``transient`` at the same time.
* ``persistent``
Make the notification persistent in the notification tray.
The user cant dismiss it using the usual close button or gesture.
Apps are only allowed to display persistent notifications
as long as they have a window. Once the last window of an app
is closed the persistent notification will be removed.
* ``hide-on-lockscreen``
Don't show the notification on the lockscreen.
* ``hide-content-on-lockscreen``
All content of the notification will be hidden on the lockscreen.
* ``show-as-new``
If a notification with the same ``id`` of the app exists already
replace the previous notification, by removing the old notification
(including animation, etc) and adding a new notification.
If this hint isn't specified the notification's content is updated
without any flickering.
* ``category`` (``s``)
The ``category`` describes the content of a notification.
A notification server may use this information to display the
notification specially. Some categories also include
button purposes that can be set for a button so that the notification
can know the purpose of the button.
Additional categories and button purposes may be defined by notification servers
using ``x-vendor`` prefix e.g. ``x-gnome.class.specific``
The following categories are standarized so far:
* ``im.received``
Intended for instant messaging apps displaying notifications for new messages.
This category has the following button purposes:
* ``im.reply-with-text``:
Inline replies for instant messaging.
The user-provided text will be added to the response.
The user response (``s``) will be placed as the second value
in the parameter array of exported actions.
For non-exported actions it will be placed as the third value
in the parameter array of #org.freedesktop.portal.Notification::ActionInvoked.
* ``alarm.ringing``
Intended for alarm clock apps
* ``call.incoming``
Intended for call apps to notify the user about an incoming call.
This category has the following button purposes:
* ``call.accept``:
Accept the incoming call.
* ``call.decline``:
Decline the incoming call.
* ``call.ongoing``
Intended for call apps while a call is ongoing.
This type has the following button purposes:
* ``call.hang-up``:
Hang up the ongoing call.
* ``call.enable-speakerphone``:
Enable the speakerphone for the ongoing call.
* ``call.disable-speakerphone``:
Disable the speakerphone for the ongoing call.
* ``call.unanswered``
Intended to be used by call apps when a call was missed.
* ``weather.warning.extreme``
Intended to be used to display an extreme weather warning.
* ``cellbroadcast.danger.extreme``
Intended to be used to display extreme danger warnings broadcasted by the cell network.
* ``cellbroadcast.danger.severe``
Intended to be used to display severe danger warnings broadcasted by the cell network.
* ``cellbroadcast.amber-alert``
Intended to be used to display amber alerts broadcasted by the cell network.
* ``cellbroadcast.test``
Intended to be used to display tests broadcasted by the cell network.
* ``os.battery.low``
Intended to be used to indicate that the system is low on battery.
* ``browser.web-notification``
Intended to be used by browsers to mark notifications send by websites via
the `Notifications API <https://developer.mozilla.org/en-US/docs/Web/API/Notifications_API>`_.
-->
<method name="AddNotification">
<annotation name="org.gtk.GDBus.C.UnixFD" value="true"/>
<arg type="s" name="id" direction="in"/>
<annotation name="org.qtproject.QtDBus.QtTypeName.In1" value="QVariantMap"/>
<arg type="a{sv}" name="notification" direction="in"/>
</method>
<!--
RemoveNotification:
@id: Application-provided ID for this notification
Withdraws a notification.
-->
<method name="RemoveNotification">
<arg type="s" name="id" direction="in"/>
</method>
<!--
SupportedOptions:
Some properties in :ref:`org.freedesktop.portal.Notification.AddNotification`
may have options advertised by the server.
Currently there are the following options the notification server can advertise:
* ``category`` (``as``)
Categories that the notification server understands and supports.
* ``button-purpose`` (``as``)
Button purposes that the notification server understands and supports.
This is the list of options that can be used as `purpose` for `buttons`.
-->
<property name="SupportedOptions" type="a{sv}" access="read">
<annotation name="org.qtproject.QtDBus.QtTypeName" value="QVariantMap"/>
</property>
<!--
ActionInvoked:
@id: the application-provided ID for the notification
@action: the name of the action
@parameter: an array containing additional information
Send to the application when a non-exported action is
activated.
The @parameter contains the following values in order:
#. The `target` for the action, if one was specified.
#. The `platform-data` as vardict (``a{sv}``) containing an ``activation-token`` (``s``) for
`XDG Activation
<https://gitlab.freedesktop.org/wayland/wayland-protocols/-/blob/main/staging/xdg-activation/xdg-activation-v1.xml>`_
#. The user `response` for an action based on the purpose if applicable.
-->
<signal name="ActionInvoked">
<arg type="s" name="id"/>
<arg type="s" name="action"/>
<arg type="av" name="parameter"/>
</signal>
<property name="version" type="u" access="read"/>
</interface>
</node>

View File

@@ -0,0 +1,190 @@
<?xml version="1.0"?>
<!--
Copyright (C) 2016 Red Hat, Inc.
SPDX-License-Identifier: LGPL-2.1-or-later
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library. If not, see <http://www.gnu.org/licenses/>.
Author: Matthias Clasen <mclasen@redhat.com>
-->
<node name="/" xmlns:doc="http://www.freedesktop.org/dbus/1.0/doc.dtd">
<!--
org.freedesktop.portal.OpenURI:
@short_description: Portal for opening URIs
The OpenURI portal allows sandboxed applications to open
URIs (e.g. a http: link to the applications homepage)
under the control of the user.
This documentation describes version 5 of this interface.
-->
<interface name="org.freedesktop.portal.OpenURI">
<!--
OpenURI:
@parent_window: Identifier for the application window, see :doc:`window-identifiers`
@uri: The uri to open
@options: Vardict with optional further information
@handle: Object path for the :ref:`org.freedesktop.portal.Request` object representing this call
Asks to open a URI.
Note that ``file://`` URIs are explicitly not supported by this method.
To request opening local files, use org.freedesktop.portal.OpenURI.OpenFile().
Supported keys in the @options vardict include:
* ``handle_token`` (``s``)
A string that will be used as the last element of the @handle. Must be a valid
object path element. See the :ref:`org.freedesktop.portal.Request` documentation for
more information about the @handle.
* ``writable`` (``b``)
Whether to allow the chosen application to write to the file.
This key only takes effect the uri points to a local file that
is exported in the document portal, and the chosen application
is sandboxed itself.
* ``ask`` (``b``)
Whether to ask the user to choose an app. If this is not passed, or false,
the portal may use a default or pick the last choice.
The ask option was introduced in version 3 of the interface.
* ``activation_token`` (``s``)
A token that can be used to activate the chosen application.
The activation_token option was introduced in version 4 of the interface.
-->
<method name="OpenURI">
<arg type="s" name="parent_window" direction="in"/>
<arg type="s" name="uri" direction="in"/>
<annotation name="org.qtproject.QtDBus.QtTypeName.In2" value="QVariantMap"/>
<arg type="a{sv}" name="options" direction="in"/>
<arg type="o" name="handle" direction="out"/>
</method>
<!--
OpenFile:
@parent_window: Identifier for the application window, see :doc:`window-identifiers`
@fd: File descriptor for the file to open
@options: Vardict with optional further information
@handle: Object path for the :ref:`org.freedesktop.portal.Request` object representing this call
Asks to open a local file.
Supported keys in the @options vardict include:
* ``handle_token`` (``s``)
A string that will be used as the last element of the @handle. Must be a valid
object path element. See the :ref:`org.freedesktop.portal.Request` documentation for
more information about the @handle.
* ``writable`` (``b``)
Whether to allow the chosen application to write to the file.
This key only takes effect the uri points to a local file that is
exported in the document portal, and the chosen application is
sandboxed itself.
* ``ask`` (``b``)
Whether to ask the user to choose an app. If this is not passed, or false,
the portal may use a default or pick the last choice.
The ask option was introduced in version 3 of the interface.
* ``activation_token`` (``s``)
A token that can be used to activate the chosen application.
The activation_token option was introduced in version 4 of the interface.
The OpenFile method was introduced in version 2 of the OpenURI portal API.
-->
<method name="OpenFile">
<annotation name="org.gtk.GDBus.C.UnixFD" value="true"/>
<arg type="s" name="parent_window" direction="in"/>
<arg type="h" name="fd" direction="in"/>
<annotation name="org.qtproject.QtDBus.QtTypeName.In2" value="QVariantMap"/>
<arg type="a{sv}" name="options" direction="in"/>
<arg type="o" name="handle" direction="out"/>
</method>
<!--
OpenDirectory:
@parent_window: Identifier for the application window, see :doc:`window-identifiers`
@fd: File descriptor for a file
@options: Vardict with optional further information
@handle: Object path for the :ref:`org.freedesktop.portal.Request` object representing this call
Asks to open the directory containing a local file in the file browser. This is implemented using
the ``org.freedesktop.FileManager1.ShowItems()`` D-Bus API and if that service doesn't exist falls back
to the ``OpenURI`` method on the directory of the file.
Supported keys in the @options vardict include:
* ``handle_token`` (``s``)
A string that will be used as the last element of the @handle. Must be a valid
object path element. See the :ref:`org.freedesktop.portal.Request` documentation for
more information about the @handle.
* ``activation_token`` (``s``)
A token that can be used to activate the chosen application.
The activation_token option was introduced in version 4 of the interface.
The OpenDirectory method was introduced in version 3 of the OpenURI portal API.
-->
<method name="OpenDirectory">
<annotation name="org.gtk.GDBus.C.UnixFD" value="true"/>
<arg type="s" name="parent_window" direction="in"/>
<arg type="h" name="fd" direction="in"/>
<annotation name="org.qtproject.QtDBus.QtTypeName.In2" value="QVariantMap"/>
<arg type="a{sv}" name="options" direction="in"/>
<arg type="o" name="handle" direction="out"/>
</method>
<!--
SchemeSupported:
@scheme: The URI protocol scheme to check
@options: Vardict with optional further information
@supported: True if the URI scheme is supported
Checks if OpenURI supports the protocol scheme @scheme.
The @options vardict currently has no supported entries.
The SchemeSupported method was introduced in version 5 of the OpenURI portal API.
-->
<method name="SchemeSupported">
<arg type="s" name="scheme" direction="in"/>
<annotation name="org.qtproject.QtDBus.QtTypeName.In1" value="QVariantMap"/>
<arg type="a{sv}" name="options" direction="in"/>
<arg type="b" name="supported" direction="out"/>
</method>
<property name="version" type="u" access="read"/>
</interface>
</node>

View File

@@ -0,0 +1,45 @@
<?xml version="1.0"?>
<!--
Copyright (C) 2021 Red Hat, Inc.
SPDX-License-Identifier: LGPL-2.1-or-later
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library. If not, see <http://www.gnu.org/licenses/>.
Authors: Bastien Nocera <hadess@hadess.net>
-->
<node name="/" xmlns:doc="http://www.freedesktop.org/dbus/1.0/doc.dtd">
<!--
org.freedesktop.portal.PowerProfileMonitor:
@short_description: Power Profile monitoring portal
The Power Profile Monitor interface provides information about the
user-selected system-wide power profile, to sandboxed applications.
It is not a portal in the strict sense, since it does not involve
user interaction. Applications are expected to use this interface
indirectly, via a library API such as the GLib GPowerProfileMonitor interface.
This documentation describes version 1 of this interface.
-->
<interface name="org.freedesktop.portal.PowerProfileMonitor">
<!--
power-saver-enabled:
Whether “Power Saver” mode is enabled on the system.
-->
<property name="power-saver-enabled" type="b" access="read"/>
<property name="version" type="u" access="read"/>
</interface>
</node>

View File

@@ -0,0 +1,320 @@
<?xml version="1.0"?>
<!--
Copyright (C) 2016 Red Hat, Inc.
SPDX-License-Identifier: LGPL-2.1-or-later
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library. If not, see <http://www.gnu.org/licenses/>.
Author: Matthias Clasen <mclasen@redhat.com>
-->
<node name="/" xmlns:doc="http://www.freedesktop.org/dbus/1.0/doc.dtd">
<!--
org.freedesktop.portal.Print:
@short_description: Portal for printing
The Print portal allows sandboxed applications to print.
Due to the way in which printing requires bi-directional communication,
using this portal will often require applications to make multiple requests.
First, use org.freedesktop.portal.Print.PreparePrint() to obtain print settings,
use them to format your output, then use org.freedesktop.portal.Print.Print()
to print the formatted document. It is expected that high-level toolkit
APIs such as GtkPrintOperation will hide most of this complexity.
This documentation describes version 3 of this interface.
-->
<interface name="org.freedesktop.portal.Print">
<!--
PreparePrint:
@parent_window: Identifier for the application window, see :doc:`window-identifiers`
@title: Title for the print dialog
@settings: Serialized print settings
@page_setup: Serialized page setup
@options: Vardict with optional further information
@handle: Object path for the :ref:`org.freedesktop.portal.Request` object representing this call
Presents a print dialog to the user and returns print settings
and page setup.
Supported keys in the @options vardict:
* ``handle_token`` (``s``)
A string that will be used as the last element of the @handle. Must be a valid
object path element. See the :ref:`org.freedesktop.portal.Request` documentation for
more information about the @handle.
* ``modal`` (``b``)
Whether to make the dialog modal. Defaults to yes.
* ``accept_label`` (``s``)
Label for the accept button. Mnemonic underlines are allowed.
This option was added in version 2.
* ``supported_output_file_formats`` (``as``)
File formats supported by the app to use for print-to-file. If not set, all formats
are assumed to be supported. The following values are allowed: "pdf", "ps", and "svg".
This option was added in version 3.
The following results get returned via the :ref:`org.freedesktop.portal.Request::Response` signal:
* ``settings`` (``a{sv}``)
Print settings as set up by the user in the print dialog.
The following keys are supported in the print settings vardict:
* ``orientation`` (``s``)
One of ``landscape``, ``portrait``, ``reverse_landscape`` or ``reverse_portrait``.
* ``paper-format`` (``s``)
A paper name according to `PWG 5101.1-2002 <ftp://ftp.pwg.org/pub/pwg/candidates/cs-pwgmsn10-20020226-5101.1.pdf>`_.
* ``paper-width`` (``s``)
Paper width, in millimeters.
* ``paper-height`` (``s``)
Paper height, in millimeters.
* ``n-copies`` (``s``)
The number of copies to print.
* ``default-source`` (``s``)
The default paper source.
* ``quality`` (``s``)
Print quality, one of normal, high, low or draft.
* ``resolution`` (``s``)
The resolution, sets both resolution-x and resolution-y.
* ``use-color`` (``s``)
Whether to use color, one of true or false.
* ``duplex`` (``s``)
Duplex printing mode, one of simplex, horizontal or vertical.
* ``collate`` (``s``)
Whether to collate copies, one of true or false.
* ``reverse`` (``s``)
Whether to reverse the order of printed pages, one of true or false.
* ``media-type`` (``s``)
A media type according to `PWG 5101.1-2002 <ftp://ftp.pwg.org/pub/pwg/candidates/cs-pwgmsn10-20020226-5101.1.pdf>`_.
* ``dither`` (``s``)
The dithering to use, one of ``fine``, ``none``, ``coarse``,
``lineart``, ``grayscale`` or ``error-diffusion``.
* ``scale`` (``s``)
The scale in percent.
* ``print-pages`` (``s``)
What pages to print, one of all, selection, current or ranges.
* ``page-ranges`` (``s``)
A list of page ranges, formatted like this: `0-2,4,9-11`.
.. note::
Page ranges are 0-based, even if the are displayed as 1-based when presented to the user.
* ``page-set`` (``s``)
What pages to print, one of all, even or odd.
* ``finishings`` (``s``)
Finishings.
* ``number-up`` (``s``)
The number of pages per sheet.
* ``number-up-layout`` (``s``)
One of ``lrtb``, ``lrbt``, ``rltb``, ``rlbt``, ``tblr``, ``tbrl``,
``btlr``, ``btrl``.
* ``output-bin`` (``s``)
* ``resolution-x`` (``s``)
The horizontal resolution in dpi.
* ``resolution-y`` (``s``)
The vertical resolution in dpi.
* ``printer-lpi`` (``s``)
The resolution in lpi (lines per inch).
* ``output-basename`` (``s``)
Basename to use for print-to-file.
* ``output-file-format`` (``s``)
Format to use for print-to-file, one of PDF, PS, SVG.
* ``output-uri`` (``s``)
The uri used for print-to-file.
* ``page-setup`` (``a{sv}``)
Page setup as set up by the user in the print dialog.
The following keys are supported in the page setup vardict:
* ``PPDName`` (``s``)
The PPD name.
* ``Name`` (``s``)
The name of the page setup.
* ``DisplayName`` (``s``)
User-visible name for the page setup.
* ``Width`` (``d``)
Paper width in millimeters.
* ``Height`` (``d``)
Paper height in millimeters.
* ``MarginTop`` (``d``)
Top margin in millimeters.
* ``MarginBottom`` (``d``)
Bottom margin in millimeters.
* ``MarginLeft`` (``d``)
Left margin in millimeters.
* ``MarginRight`` (``d``)
Right margin in millimeters.
* ``Orientation`` (``s``)
Orientation, one of portrait, landscape, reverse-portrait or reverse-landscape.
* ``token`` (``u``)
Token that can be passed to a subsequent org.freedesktop.portal.Print.Print() call to
bypass the print dialog.
-->
<method name="PreparePrint">
<arg type="s" name="parent_window" direction="in"/>
<arg type="s" name="title" direction="in"/>
<annotation name="org.qtproject.QtDBus.QtTypeName.In2" value="QVariantMap"/>
<arg type="a{sv}" name="settings" direction="in"/>
<annotation name="org.qtproject.QtDBus.QtTypeName.In3" value="QVariantMap"/>
<arg type="a{sv}" name="page_setup" direction="in"/>
<annotation name="org.qtproject.QtDBus.QtTypeName.In4" value="QVariantMap"/>
<arg type="a{sv}" name="options" direction="in"/>
<arg type="o" name="handle" direction="out"/>
</method>
<!--
Print:
@parent_window: Identifier for the application window, see :doc:`window-identifiers`
@title: Title for the print dialog
@fd: File descriptor for reading the content to print
@options: Vardict with optional further information
@handle: Object path for the :ref:`org.freedesktop.portal.Request` object representing this call
Asks to print a file.
The file must be passed in the form of a file descriptor open for reading.
This ensures that sandboxed applications only print files that they have
access to.
If a valid token is present in the @options, then this call will print
with the settings from the Print call that the token refers to. If
no token is present, then a print dialog will be presented to the user.
Note that it is up to the portal implementation to determine how long
it considers tokens valid.
Supported keys in the @options vardict:
* ``handle_token`` (``s``)
A string that will be used as the last element of the @handle. Must be a valid
object path element. See the :ref:`org.freedesktop.portal.Request` documentation for
more information about the @handle.
* ``modal`` (``b``)
Whether to make the dialog modal. Defaults to yes.
* ``token`` (``u``)
Token that was returned by a previous org.freedesktop.portal.Print.PreparePrint() call.
* ``supported_output_file_formats`` (``as``)
File formats supported by the app to use for print-to-file. If not set, all formats
are assumed to be supported. The following values are allowed: "pdf", "ps", and "svg".
This option was added in version 3.
-->
<method name="Print">
<annotation name="org.gtk.GDBus.C.UnixFD" value="true"/>
<arg type="s" name="parent_window" direction="in"/>
<arg type="s" name="title" direction="in"/>
<arg type="h" name="fd" direction="in"/>
<annotation name="org.qtproject.QtDBus.QtTypeName.In3" value="QVariantMap"/>
<arg type="a{sv}" name="options" direction="in"/>
<arg type="o" name="handle" direction="out"/>
</method>
<property name="version" type="u" access="read"/>
</interface>
</node>

View File

@@ -0,0 +1,51 @@
<?xml version="1.0"?>
<!--
Copyright (C) 2016 Red Hat, Inc.
SPDX-License-Identifier: LGPL-2.1-or-later
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library. If not, see <http://www.gnu.org/licenses/>.
Author: Matthias Clasen <mclasen@redhat.com>
-->
<node name="/" xmlns:doc="http://www.freedesktop.org/dbus/1.0/doc.dtd">
<!--
org.freedesktop.portal.ProxyResolver:
@short_description: Proxy information
The ProxyResolver interface provides network proxy information to sandboxed
applications. It is not a portal in the strict sense, since it does not involve
user interaction. Applications are expected to use this interface indirectly,
via a library API such as the GLib GProxyResolver interface.
This documentation describes version 1 of this interface.
-->
<interface name="org.freedesktop.portal.ProxyResolver">
<!--
Lookup:
@uri: Destination to connect to
@proxies: List of proxy uris
Looks up which proxy to use to connect to @uri. The returned
proxy uri are of the form ``protocol://[user[:password] AT host:port``.
The protocol can be ``http``, ``rtsp``, ``socks`` or another proxying
protocol. ``direct://`` is used when no proxy is needed.
-->
<method name="Lookup">
<arg type="s" name="uri" direction="in"/>
<arg type="as" name="proxies" direction="out"/>
</method>
<property name="version" type="u" access="read"/>
</interface>
</node>

View File

@@ -0,0 +1,67 @@
<?xml version="1.0"?>
<!--
Copyright (C) 2021 Igalia S.L.
SPDX-License-Identifier: LGPL-2.1-or-later
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library. If not, see <http://www.gnu.org/licenses/>.
-->
<node name="/" xmlns:doc="http://www.freedesktop.org/dbus/1.0/doc.dtd">
<!--
org.freedesktop.portal.Realtime:
@short_description: Portal for setting threads to realtime
Interface for setting a thread to realtime from within the
sandbox. It is analogous to the org.freedesktop.RealtimeKit1
interface and will proxy requests there but with pid mapping.
The latter is necessary in the case that sandbox has pid namespace
isolation enabled.
Note that this proxy does not bypass any limitations that
RealtimeKit imposes on processes which are documented here:
https://git.0pointer.net/rtkit.git/tree/README
This documentation describes version 1 of this interface.
-->
<interface name="org.freedesktop.portal.Realtime">
<!--
MakeThreadRealtimeWithPID:
@process: Process id
@thread: Thread id
@priority: Priority
-->
<method name="MakeThreadRealtimeWithPID">
<arg type="t" name="process" direction="in"/>
<arg type="t" name="thread" direction="in"/>
<arg type="u" name="priority" direction="in"/>
</method>
<!--
MakeThreadHighPriorityWithPID:
@process: Process id
@thread: Thread id
@priority: Priority
-->
<method name="MakeThreadHighPriorityWithPID">
<arg type="t" name="process" direction="in"/>
<arg type="t" name="thread" direction="in"/>
<arg type="i" name="priority" direction="in"/>
</method>
<property name="MaxRealtimePriority" type="i" access="read"/>
<property name="MinNiceLevel" type="i" access="read"/>
<property name="RTTimeUSecMax" type="x" access="read"/>
<property name="version" type="u" access="read"/>
</interface>
</node>

View File

@@ -0,0 +1,471 @@
<?xml version="1.0"?>
<!--
Copyright (C) 2017-2018 Red Hat, Inc.
SPDX-License-Identifier: LGPL-2.1-or-later
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library. If not, see <http://www.gnu.org/licenses/>.
-->
<node name="/" xmlns:doc="http://www.freedesktop.org/dbus/1.0/doc.dtd">
<!--
org.freedesktop.portal.RemoteDesktop:
@short_description: Remote desktop portal
The Remote desktop portal allows to create remote desktop sessions.
This documentation describes version 2 of this interface.
-->
<interface name="org.freedesktop.portal.RemoteDesktop">
<!--
CreateSession:
@options: Vardict with optional further information
@handle: Object path for the :ref:`org.freedesktop.portal.Request` object representing this call
Create a remote desktop session.
A remote desktop session is used to allow remote controlling a desktop
session.
A remote desktop session may only be started and stopped with this interface,
but you can use the :ref:`org.freedesktop.portal.Session` object created with this
method together with certain methods on the :ref:`org.freedesktop.portal.ScreenCast` and
:ref:`org.freedesktop.portal.Clipboard` interfaces. Specifically, you can call
:ref:`org.freedesktop.portal.ScreenCast.SelectSources` to also get screen content,
and :ref:`org.freedesktop.portal.ScreenCast.OpenPipeWireRemote` to acquire a file
descriptor for a PipeWire remote. See :ref:`org.freedesktop.portal.ScreenCast` for
more information on how to use those methods. To capture clipboard content,
you can call :ref:`org.freedesktop.portal.Clipboard.RequestClipboard`. See
:ref:`org.freedesktop.portal.Clipboard` for more information on the clipboard
integration.
Supported keys in the @options vardict include:
* ``handle_token`` (``s``)
A string that will be used as the last element of the @handle. Must be a valid
object path element. See the :ref:`org.freedesktop.portal.Request` documentation for
more information about the @handle.
* ``session_handle_token`` (``s``)
A string that will be used as the last element of the session handle. Must be a valid
object path element. See the :ref:`org.freedesktop.portal.Session` documentation for
more information about the session handle.
The following results get returned via the :ref:`org.freedesktop.portal.Request::Response` signal:
* ``session_handle`` (``s``)
The session handle. An object path for the
:ref:`org.freedesktop.portal.Session` object representing the created
session.
.. note::
The ``session_handle`` is an object path that was erroneously implemented
as ``s``. For backwards compatibility it will remain this type.
-->
<method name="CreateSession">
<annotation name="org.qtproject.QtDBus.QtTypeName.In0" value="QVariantMap"/>
<arg type="a{sv}" name="options" direction="in"/>
<arg type="o" name="handle" direction="out"/>
</method>
<!--
SelectDevices:
@session_handle: Object path for the :ref:`org.freedesktop.portal.Session` object
@options: Vardict with optional further information
@handle: Object path for the :ref:`org.freedesktop.portal.Request` object representing this call
Select input devices to remote control.
Supported keys in the @options vardict include:
* ``handle_token`` (``s``)
A string that will be used as the last element of the @handle. Must be a valid
object path element. See the :ref:`org.freedesktop.portal.Request` documentation for
more information about the @handle.
* ``types`` (``u``)
Bitmask of what device types to request remote controlling of.
Default is all.
* ``restore_token`` (``s``)
The token to restore a previous session.
If the stored session cannot be restored, this value is ignored
and the user will be prompted normally. This may happen when, for
example, the session contains a monitor or a window that is not
available anymore, or when the stored permissions are withdrawn.
The restore token is invalidated after using it once. To restore
the same session again, use the new restore token sent in response
to starting this session.
This option was added in version 2 of this interface.
* ``persist_mode`` (``u``)
How this session should persist. Default is 0. Accepted values are:
- ``0``: Do not persist (default)
- ``1``: Permissions persist as long as the application is running
- ``2``: Permissions persist until explicitly revoked
If the permission for the session to persist is granted, a restore token will
be returned via the :ref:`org.freedesktop.portal.Request::Response` signal of the
start method used to start the session.
This option was added in version 2 of this interface.
For available device types, see the AvailableDeviceTypes property.
-->
<method name="SelectDevices">
<arg type="o" name="session_handle" direction="in"/>
<annotation name="org.qtproject.QtDBus.QtTypeName.In1" value="QVariantMap"/>
<arg type="a{sv}" name="options" direction="in"/>
<arg type="o" name="handle" direction="out"/>
</method>
<!--
Start:
@session_handle: Object path for the :ref:`org.freedesktop.portal.Session` object
@parent_window: Identifier for the application window, see :doc:`window-identifiers`
@options: Vardict with optional further information
@handle: Object path for the :ref:`org.freedesktop.portal.Request` object representing this call
Start the remote desktop session. This will typically result in the portal
presenting a dialog letting the user select what to share, including
devices and optionally screen content if screen cast sources was
selected.
Supported keys in the @options vardict include:
* ``handle_token`` (``s``)
A string that will be used as the last element of the @handle. Must be a valid
object path element. See the :ref:`org.freedesktop.portal.Request` documentation for
more information about the @handle.
The following results get returned via the
:ref:`org.freedesktop.portal.Request::Response` signal:
* ``devices`` (``u``)
A bitmask of the devices selected by the user.
* ``clipboard_enabled`` (``b``)
A boolean for whether the clipboard was enabled ('true') or not ('false').
See the :ref:`org.freedesktop.portal.Clipboard` documentation for more information.
Since version 2.
* ``restore_token`` (``s``)
The restore token. This token is a single use token that can later
be used to restore a session. See
org.freedesktop.portal.RemoteDesktop.SelectDevices() for details.
This response option was added in version 2 of this interface.
If a screen cast source was selected, the results of the
:ref:`org.freedesktop.portal.ScreenCast.Start` response signal may be
included.
-->
<method name="Start">
<arg type="o" name="session_handle" direction="in"/>
<arg type="s" name="parent_window" direction="in"/>
<annotation name="org.qtproject.QtDBus.QtTypeName.In2" value="QVariantMap"/>
<arg type="a{sv}" name="options" direction="in"/>
<arg type="o" name="handle" direction="out"/>
</method>
<!--
NotifyPointerMotion:
@session_handle: Object path for the :ref:`org.freedesktop.portal.Session` object
@options: Vardict with optional further information
@dx: Relative movement on the x axis
@dy: Relative movement on the y axis
Notify about a new relative pointer motion event. The (dx, dy) vector
represents the new pointer position in the streams logical coordinate
space.
-->
<method name="NotifyPointerMotion">
<arg type="o" name="session_handle" direction="in"/>
<annotation name="org.qtproject.QtDBus.QtTypeName.In1" value="QVariantMap"/>
<arg type="a{sv}" name="options" direction="in"/>
<arg type="d" name="dx" direction="in"/>
<arg type="d" name="dy" direction="in"/>
</method>
<!--
NotifyPointerMotionAbsolute:
@session_handle: Object path for the :ref:`org.freedesktop.portal.Session` object
@options: Vardict with optional further information
@stream: The PipeWire stream node the coordinate is relative to
@x: Pointer motion x coordinate
@y: Pointer motion y coordinate
Notify about a new absolute pointer motion event. The (x, y) position
represents the new pointer position in the streams logical coordinate
space (see the logical_size stream property in
:ref:`org.freedesktop.portal.ScreenCast`).
-->
<method name="NotifyPointerMotionAbsolute">
<arg type="o" name="session_handle" direction="in"/>
<annotation name="org.qtproject.QtDBus.QtTypeName.In1" value="QVariantMap"/>
<arg type="a{sv}" name="options" direction="in"/>
<arg type="u" name="stream" direction="in"/>
<arg type="d" name="x" direction="in"/>
<arg type="d" name="y" direction="in"/>
</method>
<!--
NotifyPointerButton:
@session_handle: Object path for the :ref:`org.freedesktop.portal.Session` object
@options: Vardict with optional further information
@button: The pointer button was pressed or released
@state: The new state of the button
The pointer button is encoded according to Linux Evdev button codes.
May only be called if POINTER access was provided after starting the
session.
Available button states:
- ``0``: Released
- ``1``: Pressed
-->
<method name="NotifyPointerButton">
<arg type="o" name="session_handle" direction="in"/>
<annotation name="org.qtproject.QtDBus.QtTypeName.In1" value="QVariantMap"/>
<arg type="a{sv}" name="options" direction="in"/>
<arg type="i" name="button" direction="in"/>
<arg type="u" name="state" direction="in"/>
</method>
<!--
NotifyPointerAxis:
@session_handle: Object path for the :ref:`org.freedesktop.portal.Session` object
@options: Vardict with optional further information
@dx: Relative axis movement on the x axis
@dy: Relative axis movement on the y axis
The axis movement from a 'smooth scroll' device, such as a touchpad.
When applicable, the size of the motion delta should be equivalent to
the motion vector of a pointer motion done using the same advice.
May only be called if POINTER access was provided after starting the
session.
Supported keys in the @options vardict include:
* ``finish`` (``b``)
If set to true, this is the last axis event in a series, for
example as a result of the fingers being lifted from a touchpad
after a two-finger scroll. Default is false.
-->
<method name="NotifyPointerAxis">
<arg type="o" name="session_handle" direction="in"/>
<annotation name="org.qtproject.QtDBus.QtTypeName.In1" value="QVariantMap"/>
<arg type="a{sv}" name="options" direction="in"/>
<arg type="d" name="dx" direction="in"/>
<arg type="d" name="dy" direction="in"/>
</method>
<!--
NotifyPointerAxisDiscrete:
@session_handle: Object path for the :ref:`org.freedesktop.portal.Session` object
@options: Vardict with optional further information
@axis: The axis that was scrolled
@steps: The number of steps scrolled
May only be called if POINTER access was provided after starting the
session.
Available axes:
- ``0``: Vertical scroll
- ``1``: Horizontal scroll
-->
<method name="NotifyPointerAxisDiscrete">
<arg type="o" name="session_handle" direction="in"/>
<annotation name="org.qtproject.QtDBus.QtTypeName.In1" value="QVariantMap"/>
<arg type="a{sv}" name="options" direction="in"/>
<arg type="u" name="axis" direction="in"/>
<arg type="i" name="steps" direction="in"/>
</method>
<!--
NotifyKeyboardKeycode:
@session_handle: Object path for the :ref:`org.freedesktop.portal.Session` object
@options: Vardict with optional further information
@keycode: Keyboard code that was pressed or released
@state: New state of keyboard keycode
May only be called if KEYBOARD access was provided after starting the
session.
Available keyboard keycode states:
- ``0``: Released
- ``1``: Pressed
-->
<method name="NotifyKeyboardKeycode">
<arg type="o" name="session_handle" direction="in"/>
<annotation name="org.qtproject.QtDBus.QtTypeName.In1" value="QVariantMap"/>
<arg type="a{sv}" name="options" direction="in"/>
<arg type="i" name="keycode" direction="in"/>
<arg type="u" name="state" direction="in"/>
</method>
<!--
NotifyKeyboardKeysym:
@session_handle: Object path for the :ref:`org.freedesktop.portal.Session` object
@options: Vardict with optional further information
@keysym: Keyboard symbol that was pressed or released
@state: New state of keyboard keysym
May only be called if KEYBOARD access was provided after starting the
session.
Available keyboard keysym states:
- ``0``: Released
- ``1``: Pressed
-->
<method name="NotifyKeyboardKeysym">
<arg type="o" name="session_handle" direction="in"/>
<annotation name="org.qtproject.QtDBus.QtTypeName.In1" value="QVariantMap"/>
<arg type="a{sv}" name="options" direction="in"/>
<arg type="i" name="keysym" direction="in"/>
<arg type="u" name="state" direction="in"/>
</method>
<!--
NotifyTouchDown:
@session_handle: Object path for the :ref:`org.freedesktop.portal.Session` object
@options: Vardict with optional further information
@stream: The PipeWire stream node the coordinate is relative to
@slot: Touch slot where touch point appeared
@x: Touch down x coordinate
@y: Touch down y coordinate
May only be called if TOUCHSCREEN access was provided after starting the
session.
Notify about a new touch down event. The (x, y) position
represents the new touch point position in the streams logical
coordinate space (see the logical_size stream property in
:ref:`org.freedesktop.portal.ScreenCast`).
-->
<method name="NotifyTouchDown">
<arg type="o" name="session_handle" direction="in"/>
<annotation name="org.qtproject.QtDBus.QtTypeName.In1" value="QVariantMap"/>
<arg type="a{sv}" name="options" direction="in"/>
<arg type="u" name="stream" direction="in"/>
<arg type="u" name="slot" direction="in"/>
<arg type="d" name="x" direction="in"/>
<arg type="d" name="y" direction="in"/>
</method>
<!--
NotifyTouchMotion:
@session_handle: Object path for the :ref:`org.freedesktop.portal.Session` object
@options: Vardict with optional further information
@stream: The PipeWire stream node the coordinate is relative to
@slot: Touch slot where touch point appeared
@x: Touch motion x coordinate
@y: Touch motion y coordinate
May only be called if TOUCHSCREEN access was provided after starting the
session.
Notify about a new touch motion event. The (x, y) position
represents where the touch point position in the streams logical
coordinate space moved (see the logical_size stream property in
:ref:`org.freedesktop.portal.ScreenCast`).
-->
<method name="NotifyTouchMotion">
<arg type="o" name="session_handle" direction="in"/>
<annotation name="org.qtproject.QtDBus.QtTypeName.In1" value="QVariantMap"/>
<arg type="a{sv}" name="options" direction="in"/>
<arg type="u" name="stream" direction="in"/>
<arg type="u" name="slot" direction="in"/>
<arg type="d" name="x" direction="in"/>
<arg type="d" name="y" direction="in"/>
</method>
<!--
NotifyTouchUp:
@session_handle: Object path for the :ref:`org.freedesktop.portal.Session` object
@options: Vardict with optional further information
@slot: Touch slot where touch point appeared
May only be called if TOUCHSCREEN access was provided after starting the
session.
Notify about a new touch up event.
-->
<method name="NotifyTouchUp">
<arg type="o" name="session_handle" direction="in"/>
<annotation name="org.qtproject.QtDBus.QtTypeName.In1" value="QVariantMap"/>
<arg type="a{sv}" name="options" direction="in"/>
<arg type="u" name="slot" direction="in"/>
</method>
<!--
ConnectToEIS:
@session_handle: Object path for the :ref:`org.freedesktop.portal.Session` object
@options: Vardict with optional further information
@fd: A file descriptor to an EIS implementation that can be passed to a libei sender context
Request a connection to an EIS implementation. The returned handle can
be passed to ei_setup_backend_fd() for a libei sender context to
complete the connection. All information about available devices and the
event flow is subject to libei. Please see the libei documentation for details.
This method may only be called once per session, where the EIS
implementation disconnects the session should be closed.
This method must be called after org.freedesktop.portal.RemoteDesktop.Start()
Once an EIS connection is established, input events must be sent exclusively via
the EIS connection. Any events submitted via NotifyPointerMotion,
NotifyKeyboardKeycode and other Notify* methods will return an error.
To see how to pair a PipeWire stream with a libei device region, see the
documentation for the ``mapping_id`` stream property in
:ref:`org.freedesktop.portal.ScreenCast.Start`.
This method was added in version 2 of this interface.
-->
<method name="ConnectToEIS">
<annotation name="org.gtk.GDBus.C.Name" value="connect_to_eis"/>
<annotation name="org.gtk.GDBus.C.UnixFD" value="true"/>
<arg type="o" name="session_handle" direction="in"/>
<annotation name="org.qtproject.QtDBus.QtTypeName.In1" value="QVariantMap"/>
<arg type="a{sv}" name="options" direction="in"/>
<arg type="h" name="fd" direction="out"/>
</method>
<!--
AvailableDeviceTypes:
A bitmask of available source types. Currently defined types are:
- ``1``: KEYBOARD
- ``2``: POINTER
- ``4``: TOUCHSCREEN
-->
<property name="AvailableDeviceTypes" type="u" access="read"/>
<property name="version" type="u" access="read"/>
</interface>
</node>

View File

@@ -0,0 +1,93 @@
<?xml version="1.0"?>
<!--
Copyright (C) 2015 Red Hat, Inc.
SPDX-License-Identifier: LGPL-2.1-or-later
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library. If not, see <http://www.gnu.org/licenses/>.
Author: Alexander Larsson <alexl@redhat.com>
-->
<node name="/" xmlns:doc="http://www.freedesktop.org/dbus/1.0/doc.dtd">
<!--
org.freedesktop.portal.Request:
@short_description: Shared request interface
The Request interface is shared by all portal interfaces. When a
portal method is called, the reply includes a handle (i.e. object path)
for a Request object, which will stay alive for the duration of the
user interaction related to the method call.
The portal indicates that a portal request interaction is over by
emitting the #org.freedesktop.portal.Request::Response signal on the
Request object.
The application can abort the interaction calling
org.freedesktop.portal.Request.Close() on the Request object.
Since version 0.9 of xdg-desktop-portal, the handle will be of the form
::
/org/freedesktop/portal/desktop/request/SENDER/TOKEN
where ``SENDER`` is the callers unique name, with the initial ``':'`` removed and
all ``'.'`` replaced by ``'_'``, and ``TOKEN`` is a unique token that the caller provided
with the handle_token key in the options vardict.
This change was made to let applications subscribe to the Response signal before
making the initial portal call, thereby avoiding a race condition. It is recommended
that the caller should verify that the returned handle is what it expected, and update
its signal subscription if it isn't. This ensures that applications will work with both
old and new versions of xdg-desktop-portal.
The token that the caller provides should be unique and not guessable. To avoid clashes
with calls made from unrelated libraries, it is a good idea to use a per-library prefix
combined with a random number.
-->
<interface name="org.freedesktop.portal.Request">
<!--
Close:
Closes the portal request to which this object refers and ends all
related user interaction (dialogs, etc).
A Response signal will not be emitted in this case.
-->
<method name="Close">
</method>
<!--
Response:
@response: Numeric response
@results: Vardict with results. The keys and values in the vardict depend on the request.
Emitted when the user interaction for a portal request is over.
The @response indicates how the user interaction ended:
- 0: Success, the request is carried out
- 1: The user cancelled the interaction
- 2: The user interaction was ended in some other way
-->
<signal name="Response">
<arg type="u" name="response"/>
<annotation name="org.qtproject.QtDBus.QtTypeName.Out1" value="QVariantMap"/>
<arg type="a{sv}" name="results"/>
</signal>
</interface>
</node>

View File

@@ -0,0 +1,298 @@
<?xml version="1.0"?>
<!--
Copyright (C) 2017-2018 Red Hat, Inc.
SPDX-License-Identifier: LGPL-2.1-or-later
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library. If not, see <http://www.gnu.org/licenses/>.
-->
<node name="/" xmlns:doc="http://www.freedesktop.org/dbus/1.0/doc.dtd">
<!--
org.freedesktop.portal.ScreenCast:
@short_description: Screen cast portal
The Screen cast portal allows to create screen cast sessions.
This documentation describes version 5 of this interface.
-->
<interface name="org.freedesktop.portal.ScreenCast">
<!--
CreateSession:
@options: Vardict with optional further information
@handle: Object path for the :ref:`org.freedesktop.portal.Request` object representing this call
Create a screen cast session. A successfully created session can at
any time be closed using :ref:`org.freedesktop.portal.Session.Close`, or may
at any time be closed by the portal implementation, which will be
signalled via :ref:`org.freedesktop.portal.Session::Closed`.
Supported keys in the @options vardict include:
* ``handle_token`` (``s``)
A string that will be used as the last element of the @handle. Must be a valid
object path element. See the :ref:`org.freedesktop.portal.Request` documentation for
more information about the @handle.
* ``session_handle_token`` (``s``)
A string that will be used as the last element of the session handle. Must be a valid
object path element. See the :ref:`org.freedesktop.portal.Session` documentation for
more information about the session handle.
The following results get returned via the :ref:`org.freedesktop.portal.Request::Response` signal:
* ``session_handle`` (``s``)
The session handle. An object path for the
:ref:`org.freedesktop.portal.Session` object representing the created
session.
.. note::
The ``session_handle`` is an object path that was erroneously implemented
as ``s``. For backwards compatibility it will remain this type.
-->
<method name="CreateSession">
<annotation name="org.qtproject.QtDBus.QtTypeName.In0" value="QVariantMap"/>
<arg type="a{sv}" name="options" direction="in"/>
<arg type="o" name="handle" direction="out"/>
</method>
<!--
SelectSources:
@session_handle: Object path for the :ref:`org.freedesktop.portal.Session` object
@options: Vardict with optional further information
@handle: Object path for the :ref:`org.freedesktop.portal.Request` object representing this call
Configure what the screen cast session should record. This method must
be called before starting the session.
Passing invalid input to this method will cause the session to be
closed. An application may only attempt to select sources once per
session.
Supported keys in the @options vardict include:
* ``handle_token`` (``s``)
A string that will be used as the last element of the @handle. Must be a valid
object path element. See the :ref:`org.freedesktop.portal.Request` documentation for
more information about the @handle.
* ``types`` (``u``)
Bitmask of what types of content to record. Default is MONITOR.
* ``multiple`` (``b``)
Whether to allow selecting multiple sources. Default is no.
* ``cursor_mode`` (``u``)
Determines how the cursor will be drawn in the screen cast stream. It must be
one of the cursor modes advertised in
:ref:`org.freedesktop.portal.ScreenCast:AvailableCursorModes`. Setting a cursor mode
not advertised will cause the screen cast session to be closed. The default
cursor mode is 'Hidden'.
This option was added in version 2 of this interface.
* ``restore_token`` (``s``)
The token to restore a previous session.
If the stored session cannot be restored, this value is ignored
and the user will be prompted normally. This may happen when, for
example, the session contains a monitor or a window that is not
available anymore, or when the stored permissions are withdrawn.
The restore token is invalidated after using it once. To restore
the same session again, use the new restore token sent in response
to starting this session.
Setting a restore_token is only allowed for screen cast sessions.
Persistent remote desktop screen cast sessions can only be handled
via the :ref:`org.freedesktop.portal.RemoteDesktop` interface.
This option was added in version 4 of this interface.
* ``persist_mode`` (``u``)
How this session should persist. Default is 0. Accepted values are:
- ``0``: Do not persist (default)
- ``1``: Permissions persist as long as the application is running
- ``2``: Permissions persist until explicitly revoked
Setting persist_mode is only allowed for screen cast sessions. Persistent
remote desktop screen cast sessions can only be handled via the
:ref:`org.freedesktop.portal.RemoteDesktop` interface.
If the permission for the session to persist is granted, a restore token will
be returned via the :ref:`org.freedesktop.portal.Request::Response` signal of the
:ref:`org.freedesktop.portal.ScreenCast.Start` method.
This option was added in version 4 of this interface.
For available source types, see the AvailableSourceTypes property.
-->
<method name="SelectSources">
<arg type="o" name="session_handle" direction="in"/>
<annotation name="org.qtproject.QtDBus.QtTypeName.In1" value="QVariantMap"/>
<arg type="a{sv}" name="options" direction="in"/>
<arg type="o" name="handle" direction="out"/>
</method>
<!--
Start:
@session_handle: Object path for the :ref:`org.freedesktop.portal.Session` object
@parent_window: Identifier for the application window, see :doc:`window-identifiers`
@options: Vardict with optional further information
@handle: Object path for the :ref:`org.freedesktop.portal.Request` object representing this call
Start the screen cast session. This will typically result the portal
presenting a dialog letting the user do the selection set up by
org.freedesktop.portal.ScreenCast.SelectSources(). An application can
only attempt start a session once.
A screen cast session may only be started after having selected sources
using org.freedesktop.portal.ScreenCast.SelectSources().
Supported keys in the @options vardict include:
* ``handle_token`` (``s``)
A string that will be used as the last element of the @handle. Must be a valid
object path element. See the :ref:`org.freedesktop.portal.Request` documentation for
more information about the @handle.
The following results get returned via the
:ref:`org.freedesktop.portal.Request::Response` signal:
* ``streams`` (``a(ua{sv})``)
An array of PipeWire streams. Each stream consists of a PipeWire
node ID (the first element in the tuple, and a Vardict of
properties.
The array will contain a single stream if 'multiple' (see
org.freedesktop.portal.ScreenCast.SelectSources())
was set to 'false', or at least one stream if
'multiple' was set to 'true' as part of the
org.freedesktop.portal.ScreenCast.SelectSources() method.
Each stream contains the following properties:
* ``id`` (``s``)
Opaque identifier. Will be unique for this stream and local to this
session. Will persist with future sessions, if they are restored
using a restore token. This property was added in version 4 of this
interface. Optional.
* ``position`` (``(ii)``)
A tuple consisting of the position (x, y) in the compositor
coordinate space. Note that the position may not be equivalent to a
position in a pixel coordinate space. Only available for monitor
streams. Optional.
* ``size`` (``(ii)``)
A tuple consisting of (width, height). The size represents the size
of the stream as it is displayed in the compositor coordinate
space. Note that this size may not be equivalent to a size in a
pixel coordinate space. The size may differ from the size of the
stream. Optional.
* ``source_type`` (``u``)
The type of the content which is being screen casted.
For available source types, see the AvailableSourceTypes property.
This property was added in version 3 of this interface.
* ``mapping_id`` (``s``)
An optional identifier used to map different aspects of the
resource this stream corresponds to.
When used in a remote desktop session, the mapping_id can be used to
match a libei region of absolute libei devices. There may be
multiple absolute libei devices, and each device may have multiple
regions, but a mapping_id will only match one of these regions per
device.
This property was added in version 5 of this interface.
* ``restore_token`` (``s``)
The restore token. This token is a single use token that can later
be used to restore a session. See
org.freedesktop.portal.ScreenCast.SelectSources() for details.
This response option was added in version 4 of this interface.
-->
<method name="Start">
<arg type="o" name="session_handle" direction="in"/>
<arg type="s" name="parent_window" direction="in"/>
<annotation name="org.qtproject.QtDBus.QtTypeName.In2" value="QVariantMap"/>
<arg type="a{sv}" name="options" direction="in"/>
<arg type="o" name="handle" direction="out"/>
</method>
<!--
OpenPipeWireRemote:
@session_handle: Object path for the :ref:`org.freedesktop.portal.Session` object
@options: Vardict with optional further information
@fd: File descriptor of an open PipeWire remote.
Open a file descriptor to the PipeWire remote where the screen cast
streams are available. The file descriptor should be used to create a
<classname>pw_core</classname> object, by using
<function>pw_context_connect_fd</function>. Only the screen cast stream
nodes will be available from this PipeWire node.
-->
<method name="OpenPipeWireRemote">
<annotation name="org.gtk.GDBus.C.Name" value="open_pipewire_remote"/>
<annotation name="org.gtk.GDBus.C.UnixFD" value="true"/>
<arg type="o" name="session_handle" direction="in"/>
<annotation name="org.qtproject.QtDBus.QtTypeName.In1" value="QVariantMap"/>
<arg type="a{sv}" name="options" direction="in"/>
<arg type="h" name="fd" direction="out"/>
</method>
<!--
AvailableSourceTypes:
A bitmask of available source types. Currently defined types are:
- ``1``: MONITOR: Share existing monitors
- ``2``: WINDOW: Share application windows
- ``4``: VIRTUAL: Extend with new virtual monitor
-->
<property name="AvailableSourceTypes" type="u" access="read"/>
<!--
AvailableCursorModes:
A bitmask of available cursor modes.
Available cursor mode values:
- ``1``: Hidden. The cursor is not part of the screen cast stream.
- ``2``: Embedded: The cursor is embedded as part of the stream buffers.
- ``4``: Metadata: The cursor is not part of the screen cast stream, but sent as PipeWire stream metadata.
This property was added in version 2 of this interface.
-->
<property name="AvailableCursorModes" type="u" access="read"/>
<property name="version" type="u" access="read"/>
</interface>
</node>

View File

@@ -0,0 +1,105 @@
<?xml version="1.0"?>
<!--
Copyright (C) 2016 Red Hat, Inc.
SPDX-License-Identifier: LGPL-2.1-or-later
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library. If not, see <http://www.gnu.org/licenses/>.
Author: Matthias Clasen <mclasen@redhat.com>
-->
<node name="/" xmlns:doc="http://www.freedesktop.org/dbus/1.0/doc.dtd">
<!--
org.freedesktop.portal.Screenshot:
@short_description: Portal for taking screenshots
This simple portal lets sandboxed applications request a screenshot.
The screenshot will be made accessible to the application (which
may involve adding it to the :ref:`Documents
portal<org.freedesktop.portal.Documents>`).
This documentation describes **version 2** of this interface.
-->
<interface name="org.freedesktop.portal.Screenshot">
<!--
Screenshot:
@parent_window: Identifier for the application window, see :doc:`window-identifiers`
@options: Vardict with optional further information
@handle: Object path for the :ref:`org.freedesktop.portal.Request` object representing this call
Takes a screenshot.
Supported keys in the @options vardict include:
* ``handle_token`` (``s``)
A string that will be used as the last element of the @handle. Must be a valid
object path element. See the :ref:`org.freedesktop.portal.Request` documentation for
more information about the @handle.
* ``modal`` (``b``)
Whether the dialog should be modal. Default is yes.
* ``interactive`` (``b``)
Hint whether the dialog should offer customization before taking a screenshot.
Default is no. **Since version 2.**
The following results get returned via the :ref:`org.freedesktop.portal.Request::Response`
signal:
* ``uri`` (``s``)
String containing the uri of the screenshot.
-->
<method name="Screenshot">
<arg type="s" name="parent_window" direction="in"/>
<annotation name="org.qtproject.QtDBus.QtTypeName.In1" value="QVariantMap"/>
<arg type="a{sv}" name="options" direction="in"/>
<arg type="o" name="handle" direction="out"/>
</method>
<!--
PickColor:
@parent_window: Identifier for the application window, see :doc:`window-identifiers`
@options: Vardict with optional further information
@handle: Object path for the :ref:`org.freedesktop.portal.Request` object representing this call
Obtains the color of a single pixel.
Supported keys in the @options vardict include:
* ``handle_token`` (``s``)
A string that will be used as the last element of the @handle. Must be a valid
object path element. See the :ref:`org.freedesktop.portal.Request` documentation for
more information about the @handle.
The following results get returned via the :ref:`org.freedesktop.portal.Request::Response` signal:
* ``color`` (``(ddd)``)
The color, RGB values in the range [0,1], in the sRGB color space.
-->
<method name="PickColor">
<arg type="s" name="parent_window" direction="in"/>
<annotation name="org.qtproject.QtDBus.QtTypeName.In1" value="QVariantMap"/>
<arg type="a{sv}" name="options" direction="in"/>
<arg type="o" name="handle" direction="out"/>
</method>
<property name="version" type="u" access="read"/>
</interface>
</node>

View File

@@ -0,0 +1,85 @@
<?xml version="1.0"?>
<!--
Copyright (C) 2019 Red Hat, Inc.
SPDX-License-Identifier: LGPL-2.1-or-later
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library. If not, see <http://www.gnu.org/licenses/>.
Author: Daiki Ueno <dueno@redhat.com>
-->
<node name="/" xmlns:doc="http://www.freedesktop.org/dbus/1.0/doc.dtd">
<!--
org.freedesktop.portal.Secret:
@short_description: Portal for retrieving application secret
The Secret portal allows sandboxed applications to retrieve a
per-application secret. The secret can then be used for
encrypting confidential data inside the sandbox.
This documentation describes version 1 of this interface.
-->
<interface name="org.freedesktop.portal.Secret">
<!--
RetrieveSecret:
@fd: Writable file descriptor for transporting the secret
@options: Vardict with optional further information
@handle: Object path for the :ref:`org.freedesktop.portal.Request` object representing this call
Retrieves a master secret for a sandboxed application.
The master secret is unique per application and does not
change as long as the application is installed (once it has
been created). In a typical backend implementation, it is
stored in the user's keyring, under the application ID as a
key.
While the master secret can be used for encrypting any
confidential data in the sandbox, the format is opaque to the
application. In particular, the length of the secret might not
be sufficient for the use with certain encryption
algorithm. In that case, the application is supposed to expand
it using a KDF algorithm.
The portal may return an additional identifier associated with
the secret in the results vardict of
:ref:`org.freedesktop.portal.Request::Response` signal. In the next
call of this method, the application shall indicate it through
a token element in @options.
Supported keys in the @options vardict include:
* ``handle_token`` (``s``)
A string that will be used as the last element of the @handle. Must be a valid
object path element. See the :ref:`org.freedesktop.portal.Request` documentation for
more information about the @handle.
* ``token`` (``s``)
An opaque string returned by a previous org.freedesktop.portal.Secret.RetrieveSecret() call.
-->
<method name="RetrieveSecret">
<annotation name="org.gtk.GDBus.C.Name" value="retrieve_secret"/>
<annotation name="org.gtk.GDBus.C.UnixFD" value="true"/>
<arg type="h" name="fd" direction="in"/>
<annotation name="org.qtproject.QtDBus.QtTypeName.In1" value="QVariantMap"/>
<arg type="a{sv}" name="options" direction="in"/>
<arg type="o" name="handle" direction="out"/>
</method>
<property name="version" type="u" access="read"/>
</interface>
</node>

View File

@@ -0,0 +1,78 @@
<?xml version="1.0"?>
<!--
Copyright (C) 2017 Red Hat, Inc.
SPDX-License-Identifier: LGPL-2.1-or-later
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library. If not, see <http://www.gnu.org/licenses/>.
Author: Jonas Ådahl <jadahl@redhat.com>
-->
<node name="/" xmlns:doc="http://www.freedesktop.org/dbus/1.0/doc.dtd">
<!--
org.freedesktop.portal.Session:
@short_description: Shared session interface
The Session interface is shared by all portal interfaces that involve
long lived sessions. When a method that creates a session is called, if
successful, the reply will include a session handle (i.e. object path) for
a Session object, which will stay alive for the duration of the session.
The duration of the session is defined by the interface that creates it.
For convenience, the interface contains a method
org.freedesktop.portal.Session.Close(), and a signal
#org.freedesktop.portal.Session::Closed. Whether it is allowed to directly
call org.freedesktop.portal.Session.Close() depends on the interface.
The handle of a session will be of the form
``/org/freedesktop/portal/desktop/session/SENDER/TOKEN``, where ``SENDER``
is the caller's unique name, with the initial ``:`` removed and all ``.``
replaced by ``_``, and ``TOKEN`` is a unique token that the caller
provided with the ``session_handle_token`` key in the options vardict of
the method creating the session.
The token that the caller provides should be unique and not guessable. To
avoid clashes with calls made from unrelated libraries, it is a good idea
to use a per-library prefix combined with a random number.
A client who started a session vanishing from the D-Bus is equivalent to
closing all active sessions made by said client.
-->
<interface name="org.freedesktop.portal.Session">
<!--
Close:
Closes the portal session to which this object refers and ends all
related user interaction (dialogs, etc).
-->
<method name="Close">
</method>
<!--
Closed:
@details: A key value Vardict with details about the closed session.
Emitted when a session is closed.
The content of @details is specified by the interface creating the session.
-->
<signal name="Closed">
<annotation name="org.qtproject.QtDBus.QtTypeName.Out0" value="QVariantMap"/>
<arg type="a{sv}" name="details"/>
</signal>
<property name="version" type="u" access="read"/>
</interface>
</node>

View File

@@ -0,0 +1,136 @@
<?xml version="1.0"?>
<!--
Copyright (C) 2018 Igalia S.L.
SPDX-License-Identifier: LGPL-2.1-or-later
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library. If not, see <http://www.gnu.org/licenses/>.
Author: Patrick Griffis <pgriffis@igalia.com>
-->
<node name="/" xmlns:doc="http://www.freedesktop.org/dbus/1.0/doc.dtd">
<!--
org.freedesktop.portal.Settings:
@short_description: Settings interface
This interface provides read-only access to a small number of standardized
host settings required for toolkits similar to XSettings. It is not for
general purpose settings.
Implementations can provide keys not listed below; they are entirely
implementation details that are undocumented. If you are a toolkit and want
to use this please open an issue.
Currently the interface provides the following standardized keys:
* ``org.freedesktop.appearance`` ``color-scheme`` (``u``)
Indicates the system's preferred color scheme.
Supported values are:
* ``0``: No preference
* ``1``: Prefer dark appearance
* ``2``: Prefer light appearance
Unknown values should be treated as ``0`` (no preference).
* ``org.freedesktop.appearance`` ``accent-color`` (``(ddd)``)
Indicates the system's preferred accent color as a tuple of RGB values in
the sRGB color space, in the range [0,1]. Out-of-range RGB values should
be treated as an unset accent color.
* ``org.freedesktop.appearance`` ``contrast`` (``u``)
Indicates the system's preferred contrast level.
Supported values are:
* ``0``: No preference (normal contrast)
* ``1``: Higher contrast
Unknown values should be treated as ``0`` (no preference).
This documentation describes version 2 of this interface.
-->
<interface name="org.freedesktop.portal.Settings">
<!--
ReadAll:
@namespaces: List of namespaces to filter results by, supports simple globbing explained below.
@value: Dictionary of namespaces to its keys and values.
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.*".
-->
<method name="ReadAll">
<arg type="as" name="namespaces" direction="in"/>
<annotation name="org.qtproject.QtDBus.QtTypeName.Out0" value="QMap&lt;QString,QVariantMap&gt;"/>
<arg type="a{sa{sv}}" name="value" direction="out"/>
</method>
<!--
Read:
@namespace: Namespace to look up @key in.
@key: The key to get.
@value: The value @key is set to.
Reads a single value. Returns an error on any unknown namespace or key.
Deprecated, use ReadOne instead. The value argument was intended to have
the value inside one layer of variant as it is in ReadOne, for example
`&lt;string "hello"&gt;` in GVariant text notation; but it is actually
returned inside two layers of variant, for example
`&lt;&lt;string "hello"&gt;&gt;`.
-->
<method name="Read">
<annotation name="org.freedesktop.DBus.Deprecated" value="true"/>
<arg type="s" name="namespace" direction="in"/>
<arg type="s" name="key" direction="in"/>
<arg type="v" name="value" direction="out"/>
</method>
<!--
ReadOne:
@namespace: Namespace to look up @key in.
@key: The key to get.
@value: The value @key is set to.
Reads a single value which may be any valid DBus type. Returns an error on any unknown namespace or key.
This method was added in version 2.
-->
<method name="ReadOne">
<arg type="s" name="namespace" direction="in"/>
<arg type="s" name="key" direction="in"/>
<arg type="v" name="value" direction="out"/>
</method>
<!--
SettingChanged:
@namespace: Namespace of changed setting.
@key: The key of changed setting.
@value: The new value.
Emitted when a setting changes.
-->
<signal name="SettingChanged">
<arg type="s" name="namespace" direction="out"/>
<arg type="s" name="key" direction="out"/>
<arg type="v" name="value" direction="out"/>
</signal>
<property name="version" type="u" access="read"/>
</interface>
</node>

View File

@@ -0,0 +1,50 @@
<?xml version="1.0"?>
<!--
Copyright (C) 2016 Red Hat, Inc.
SPDX-License-Identifier: LGPL-2.1-or-later
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library. If not, see <http://www.gnu.org/licenses/>.
Author: Matthias Clasen <mclasen@redhat.com>
-->
<node name="/" xmlns:doc="http://www.freedesktop.org/dbus/1.0/doc.dtd">
<!--
org.freedesktop.portal.Trash:
@short_description: Portal for trashing files
This simple interface lets sandboxed applications send files to
the trashcan.
This documentation describes version 1 of this interface.
-->
<interface name="org.freedesktop.portal.Trash">
<!--
TrashFile:
@fd: file descriptor for the file to trash
@result: the result. 0 if trashing failed, 1 if trashing succeeded, other values may be returned in the future
Sends a file to the trashcan. Applications are allowed to
trash a file if they can open it in r/w mode.
-->
<method name="TrashFile">
<annotation name="org.gtk.GDBus.C.UnixFD" value="true"/>
<arg type="h" name="fd" direction="in"/>
<arg type="u" name="result" direction="out"/>
</method>
<property name="version" type="u" access="read"/>
</interface>
</node>

View File

@@ -0,0 +1,252 @@
<?xml version="1.0"?>
<!--
Copyright (C) 2020 Endless OS Foundation LLC
2023-2024 GNOME Foundation Inc.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library. If not, see <http://www.gnu.org/licenses/>.
Author: Georges Basile Stavracas Neto <georges.stavracas@gmail.com>
Ryan Gonzalez <rymg19+github@gmail.com>
-->
<node name="/" xmlns:doc="http://www.freedesktop.org/dbus/1.0/doc.dtd">
<!--
org.freedesktop.portal.Usb:
@short_description: Portal for USB device access
This interface lets sandboxed applications monitor and request
access to connected USB devices.
Applications should prefer specialized portals for specific
device types, such as the Camera portal for cameras.
This documentation describes version 1 of this interface.
-->
<interface name="org.freedesktop.portal.Usb">
<!--
CreateSession:
@options: Vardict with optional further information
@session_handle: Object path for the session.
Creates an USB monitoring session. This is only necessary to
receive device events, like device being plugged or unplugged.
Supported keys in the @options vardict include:
* ``session_handle_token`` (``s``)
A string that will be used as the last element of the session handle. Must be a valid
object path element. See the :ref:`org.freedesktop.portal.Session` documentation for
more information about the session handle.
-->
<method name="CreateSession">
<annotation name="org.qtproject.QtDBus.QtTypeName.In0" value="QVariantMap"/>
<arg type="a{sv}" name="options" direction="in"/>
<arg type="o" name="session_handle" direction="out"/>
</method>
<!--
EnumerateDevices:
@options: Vardict with optional further information. There is currently
no option supported.
Enumerates all connected USB devices that this application has permission
to see.
The following results are returned in the @device vardict:
* ``id`` (``s``)
Each element of the @devices array contains the device ID, and a
device information vardict with the following keys:
* ``parent`` (``s``)
Device ID of the parent device.
* ``readable`` (``b``)
Whether the device can be opened for reading with
org.freedesktop.portal.Usb.AcquireDevices(). If not present, then
it should be assumed to be false.
* ``writable`` (``b``)
Whether the device can be opened for writing with
org.freedesktop.portal.Usb.AcquireDevices(). If not present, then
it should be assumed to be false.
* ``device-file`` (``s``)
A string path to the device node inside the /dev filesystem.
* ``properties`` (``a{sv}``)
A list of udev properties that this device has. These properties
are not parsed in any way by the portal, it is up to apps to parse
them.
-->
<method name="EnumerateDevices">
<annotation name="org.qtproject.QtDBus.QtTypeName.In0" value="QVariantMap"/>
<arg type="a{sv}" name="options" direction="in"/>
<annotation name="org.qtproject.QtDBus.QtTypeName.Out0" value="QList&lt;QPair&lt;QString,QVariantMap&gt;&gt;"/>
<arg type="a(sa{sv})" name="devices" direction="out"/>
</method>
<!--
AcquireDevices:
@parent_window: Identifier for the application window, see :doc:`window-identifiers`
@devices: Array of device identifiers and access options
@options: Vardict with optional further information
@handle: Object path for the :ref:`org.freedesktop.portal.Request` object representing this call
Request to acquires (i.e. open) the given device nodes. The
process of acquiring is finished by calling
`FinishAcquireDevices` after the request emitted a `Success`
response.
Each element of the @devices array contains the device ID, and an
access option vardict with the following keys:
* ``writable`` (``b``)
Whether the device will be opened in read-write or read-only mode.
Default: False
Supported keys in the @options vardict include:
* ``handle_token`` (``s``)
A string that will be used as the last element of the @handle. Must be a valid
object path element. See the :ref:`org.freedesktop.portal.Request` documentation
for more information about the @handle.
The :ref:`org.freedesktop.portal.Request::Response` signal is emitted
without any extra information.
-->
<method name="AcquireDevices">
<arg type="s" name="parent_window" direction="in"/>
<annotation name="org.qtproject.QtDBus.QtTypeName.In1" value="QList&lt;QPair&lt;QString,QVariantMap&gt;&gt;"/>
<arg type="a(sa{sv})" name="devices" direction="in"/>
<annotation name="org.qtproject.QtDBus.QtTypeName.In2" value="QVariantMap"/>
<arg type="a{sv}" name="options" direction="in"/>
<arg type="o" name="handle" direction="out"/>
</method>
<!--
FinishAcquireDevices:
@handle: The request object path for the acquisition to finish
@options: Vardict with optional further information
@results: Array of device ids, and the result of the access
@finished: Whether all device results were reported
Retrieves the file descriptors of the devices requested during
org.freedesktop.portal.Usb.AcquireDevices(). The file
descriptors remain usable until the underlying device is
removed, they are released with `ReleaseDevices`, the D-Bus
connections is closed, or the portal revokes the file
descriptor which can happen at any point. Devices which are
not needed anymore should be passed to `ReleaseDevices`.
If not all devices could be send, @finished will be false and
org.freedesktop.portal.Usb.FinishAcquireDevices must be called again
until @finished is true, before calling
org.freedesktop.portal.Usb.AcquireDevices again.
This method can only be called once for a given token, and only
after calling org.freedesktop.portal.Usb.AcquireDevices().
Each element of the @results array contains the device ID, and
a vardict with the following keys:
* ``success`` (``b``)
Whether the device access was successful or not.
* ``fd`` (``h``)
The file descriptor representing the device. The file
descriptor is meant to be passed on to the USB library.
Only present if this was a successful device access.
* ``error`` (``s``)
Error message describing why accessing the device was not
successful. Only present if this was an failed device access.
There are no supported keys in the @options vardict.
-->
<method name="FinishAcquireDevices">
<arg type="o" name="handle" direction="in"/>
<annotation name="org.qtproject.QtDBus.QtTypeName.In1" value="QVariantMap"/>
<arg type="a{sv}" name="options" direction="in"/>
<annotation name="org.qtproject.QtDBus.QtTypeName.Out0" value="QList&lt;QPair&lt;QString,QVariantMap&gt;&gt;"/>
<arg type="a(sa{sv})" name="results" direction="out"/>
<arg type="b" name="finished" direction="out"/>
</method>
<!--
ReleaseDevices:
@devices: Array of device identifiers
@options: Vardict with optional further information
Releases previously acquired devices. The file descriptors of
thoses devices might become unusable as a result of this.
Each element of the @devices array contains the device ID of the device.
There are no supported keys in the @options vardict.
-->
<method name="ReleaseDevices">
<arg type="as" name="devices" direction="in"/>
<annotation name="org.qtproject.QtDBus.QtTypeName.In1" value="QVariantMap"/>
<arg type="a{sv}" name="options" direction="in"/>
</method>
<!--
DeviceEvents:
@session_handle: Object path for the :ref:`org.freedesktop.portal.Session` object
@events: A list of events which occured.
The DeviceEvents signal is emitted when one or more USB devices have
been added, changed, or removed. This signal is only emitted for active
sessions created with org.freedesktop.portal.Usb.CreateSession().
Each element of the @events array is composed of the following fields:
* ``action`` (``s``)
Type of event that occurred. One of "add", "change", or "remove".
* ``id`` (``s``)
Device ID that the event occurred on.
* ``device`` (``a{sv}``)
Device properties attached to the ID. See
org.freedesktop.portal.Usb.EnumerateDevices() for a list of all
the properties that may be present in the vardict.
-->
<signal name="DeviceEvents">
<arg type="o" name="session_handle" direction="out"/>
<annotation name="org.qtproject.QtDBus.QtTypeName.Out1" value="QList&lt;std::tuple&lt;QString,QString,QVariantMap&gt;&gt;"/>
<arg type="a(ssa{sv})" name="events" direction="out"/>
</signal>
<property name="version" type="u" access="read"/>
</interface>
</node>

View File

@@ -0,0 +1,98 @@
<?xml version="1.0"?>
<!--
Copyright (C) 2019 Red Hat, Inc.
SPDX-License-Identifier: LGPL-2.1-or-later
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library. If not, see <http://www.gnu.org/licenses/>.
Author: Felipe Borges <feborges@redhat.com>
-->
<node name="/" xmlns:doc="http://www.freedesktop.org/dbus/1.0/doc.dtd">
<!--
org.freedesktop.portal.Wallpaper:
@short_description: Portal for setting the desktop's Wallpaper
This simple interface lets sandboxed applications set the user's
desktop background picture.
This documentation describes version 1 of this interface.
-->
<interface name="org.freedesktop.portal.Wallpaper">
<!--
SetWallpaperURI:
@parent_window: Identifier for the application window, see :doc:`window-identifiers`
@uri: The picture file uri
@options: Options that influence the behavior of the portal
@handle: Object path for the :ref:`org.freedesktop.portal.Request` object representing this call
Asks to set a given picture as the desktop background picture.
Note that file: uris are explicitly not supported here. To use a local image file as
background, use the org.freedesktop.portal.Wallpaper.SetWallpaperFile() method.
Supported keys in the @options vardict include:
* ``show-preview`` (``b``)
Whether to show a preview of the picture. Note that the portal may
decide to show a preview even if this option is not set.
* ``set-on`` (``s``)
Where to set the wallpaper. Possible values are ``background``,
``lockscreen``, or ``both``.
-->
<method name="SetWallpaperURI">
<arg type="s" name="parent_window" direction="in"/>
<arg type="s" name="uri" direction="in"/>
<annotation name="org.qtproject.QtDBus.QtTypeName.In2" value="QVariantMap"/>
<arg type="a{sv}" name="options" direction="in"/>
<arg type="o" name="handle" direction="out"/>
</method>
<!--
SetWallpaperFile:
@parent_window: Identifier for the application window, see :doc:`window-identifiers`
@fd: File descriptor for the file to open
@options: Options that influence the behavior of the portal
@handle: Object path for the :ref:`org.freedesktop.portal.Request` object representing this call
Asks to set a given local file as the desktop background picture.
Supported keys in the @options vardict include:
* ``show-preview`` (``b``)
Whether to show a preview of the picture. Note that the portal may
decide to show a preview even if this option is not set.
* ``set-on`` (``s``)
Where to set the wallpaper. Possible values are ``background``,
``lockscreen``, or ``both``.
-->
<method name="SetWallpaperFile">
<annotation name="org.gtk.GDBus.C.UnixFD" value="true"/>
<arg type="s" name="parent_window" direction="in"/>
<arg type="h" name="fd" direction="in"/>
<annotation name="org.qtproject.QtDBus.QtTypeName.In2" value="QVariantMap"/>
<arg type="a{sv}" name="options" direction="in"/>
<arg type="o" name="handle" direction="out"/>
</method>
<property name="version" type="u" access="read"/>
</interface>
</node>