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,20 @@
#!/usr/bin/env bash
# File generated by pre-commit: https://pre-commit.com
# ID: 138fd403232d2ddd5efb44317e38bf03
# start templated
INSTALL_PYTHON=/usr/bin/python3
ARGS=(hook-impl --config=.pre-commit-config.yaml --hook-type=pre-commit)
# end templated
HERE="$(cd "$(dirname "$0")" && pwd)"
ARGS+=(--hook-dir "$HERE" -- "$@")
if [ -x "$INSTALL_PYTHON" ]; then
exec "$INSTALL_PYTHON" -mpre_commit "${ARGS[@]}"
elif command -v pre-commit > /dev/null; then
exec pre-commit "${ARGS[@]}"
else
echo '`pre-commit` not found. Did you forget to activate your virtualenv?' 1>&2
exit 1
fi

View File

@@ -0,0 +1 @@
open_collective: flatpak

View File

@@ -0,0 +1,103 @@
---
name: Bug Report
description: Report a bug or crash
labels: bug,
body:
- type: input
id: distribution
attributes:
label: "Operating System"
description: "Which operating system or Linux distribution are you using?"
placeholder: "e.g., Ubuntu 22.04, Arch Linux, FreeBSD"
validations:
required: true
- type: dropdown
id: version
attributes:
label: "XDG Desktop Portal version"
description: "What version of XDG Desktop Portal are you using?"
options:
- "1.18"
- "1.17"
- "1.16"
- Git
- Other
validations:
required: true
- type: input
id: version_other
attributes:
label: XDG Desktop Portal version (Other)
description: "If \"Other\" was selected above, what version of XDG Desktop Portal are you using?"
validations:
required: false
- type: dropdown
id: desktop_environment
attributes:
label: "Desktop Environment"
description: "which desktop environment are you using?"
options:
- Deepin
- Cinnamon / MATE / Xfce
- GNOME
- Plasma
- LXQt
- Pantheon (elementary OS)
- wlroots
- Other
validations:
required: true
- type: input
id: desktop_environment_other
attributes:
label: Desktop Environment (Other)
description: "If \"Other\" was selected above, which desktop environment are you using?"
validations:
required: false
- type: textarea
id: expected_behavior
attributes:
label: Expected Behavior
description: "What did you expect to happen?"
validations:
required: true
- type: textarea
id: current_behavior
attributes:
label: Current Behavior
description: "What actually happened?"
validations:
required: true
- type: textarea
id: steps_to_reproduce
attributes:
label: Steps to Reproduce
description: "How do you trigger this bug? Please walk us through it step by step."
placeholder: |
1.
2.
3.
...
value: |
1.
2.
3.
...
validations:
required: true
- type: textarea
id: additional_notes
attributes:
label: Anything else we should know?
validations:
required: false
---

View File

@@ -0,0 +1,5 @@
blank_issues_enabled: false
contact_links:
- name: Help/Support
url: https://matrix.to/#/#xdg-desktop-portals:matrix.org
about: Questions or issues about how to use and configure xdg-desktop-portal

View File

@@ -0,0 +1,69 @@
# This Containerfile builds the image that we use in all github workflows.
# When this file is changed, or one needs to rebuild the image for another
# reason, bump the `IMAGE_TAG` in the container.yml workflow.
FROM ubuntu:latest
RUN apt update
RUN apt upgrade -y
# Install dependencies
RUN apt install -y --no-install-recommends \
gcc clang \
ca-certificates \
desktop-file-utils \
fuse3 \
gettext \
git \
gnome-desktop-testing \
gtk-doc-tools \
jq \
libcap2-bin \
libflatpak-dev \
libfontconfig1-dev \
libfuse3-dev \
libgdk-pixbuf-2.0-dev \
librsvg2-2 \
librsvg2-common \
libgstreamer-plugins-base1.0-dev \
gstreamer1.0-plugins-good \
libgstreamer-plugins-good1.0-dev \
gstreamer1.0-tools \
libgeoclue-2-dev \
libglib2.0-dev \
libgudev-1.0-dev \
libjson-glib-dev \
libpipewire-0.3-dev \
libsystemd-dev \
libtool \
llvm \
libclang-rt-18-dev \
python3-gi \
shared-mime-info
# Install meson
RUN apt install -y --no-install-recommends meson
# Install pytest
RUN apt install -y --no-install-recommends \
python3-pytest \
python3-pytest-xdist \
python3-dbusmock \
python3-dbus \
libumockdev0 \
libumockdev-dev \
umockdev \
gir1.2-umockdev-1.0
# Install pip
RUN apt install -y --no-install-recommends python3-pip
# Install doc dependencies
RUN pip install --user --break-system-packages furo">=2024.04.27" \
sphinx-copybutton sphinxext-opengraph matplotlib
# Install pre-commit
RUN pip install --user --break-system-packages pre-commit
# Install qdbusxml2cpp
RUN apt install -y --no-install-recommends qt6-base-dev-tools

View File

@@ -0,0 +1,88 @@
env:
TESTS_TIMEOUT: 10 # in minutes
on:
workflow_call:
inputs:
image:
required: true
type: string
image_options:
required: true
type: string
jobs:
build-and-test:
name: Build and Test
runs-on: ubuntu-latest
strategy:
matrix:
compiler: ['gcc', 'clang']
sanitizer: ['address']
container:
image: ${{ inputs.image }}
env:
CFLAGS: -Wp,-D_FORTIFY_SOURCE=2
CC: ${{ matrix.compiler }}
XDP_TEST_IN_CI: 1
G_MESSAGES_DEBUG: all
options: ${{ inputs.image_options }}
steps:
- name: Configure environment
run: |
git config --global --add safe.directory $GITHUB_WORKSPACE
echo XDG_DATA_DIRS=$GITHUB_WORKSPACE/tests/share:/usr/local/share:/usr/share | tee -a $GITHUB_ENV
- name: Check out xdg-desktop-portal
uses: actions/checkout@v4
- name: Run pre-commit hooks
run: |
export PYTHONPATH="/root/.local/lib/python$(python3 -c 'import sys; print("{}.{}".format(*sys.version_info))')/site-packages:$PYTHONPATH"
export PATH="/root/.local/bin:$PATH"
pre-commit run --show-diff-on-failure --color=always --all-files
- name: Check POTFILES.in
run: .github/workflows/check-potfiles.sh
- name: Build xdg-desktop-portal
run: |
meson setup _build \
-Dinstalled-tests=true \
-Dtests=enabled \
-Db_sanitize=${{ matrix.sanitizer }} \
-Db_lundef=false
meson compile -C _build
- name: Run xdg-desktop-portal tests
run: timeout --signal=KILL -v ${TESTS_TIMEOUT}m meson test -C _build
- name: Install xdg-desktop-portal
run: meson install -C _build
- name: Run xdg-desktop-portal installed-tests
run: |
test -n "$(gnome-desktop-testing-runner -l xdg-desktop-portal)"
gnome-desktop-testing-runner --report-directory installed-test-logs/ \
-t $((TESTS_TIMEOUT * 60)) xdg-desktop-portal
- name: Check Qt annotations
run: find -name "*.xml" | xargs -n1 /usr/lib/qt6/bin/qdbusxml2cpp
- name: Create dist tarball
run: |
ls -la
timeout --signal=KILL -v ${TESTS_TIMEOUT}m meson dist -C _build
- name: Upload test logs
uses: actions/upload-artifact@v4
if: success() || failure()
with:
name: test logs (${{ matrix.compiler }}, ${{ matrix.sanitizer }})
path: |
tests/*.log
test-*.log
installed-test-logs/
_build/meson-logs/testlog.txt

View File

@@ -0,0 +1,92 @@
#!/usr/bin/env bash
# FIXME stolen from gnome-control-center, GPLv2
# This project is LGPLv2
# https://gitlab.gnome.org/GNOME/gnome-control-center/-/merge_requests/2269#note_2079291
srcdirs="src document-portal"
uidirs=$srcdirs
desktopdirs=$srcdirs
policydirs=$srcdirs
xmldirs=$srcdirs
# find source files that contain gettext functions with literal or GETTEXT_PACKAGE argument
files=$(grep -lRs --include='*.c' 'gettext *(\("\|GETTEXT_PACKAGE,\)' $srcdirs)
# find source files that contain gettext macros
files="$files "$(grep -lRs --include='*.c' --include='*.h' '[^I_)]_(' $srcdirs)
# find ui files that contain translatable string
files="$files "$(grep -lRis --include='*.ui' 'translatable="[ty1]' $uidirs)
# find .desktop files
files="$files "$(find $desktopdirs -name '*.desktop*')
# find .policy files
files="$files "$(find $policydirs -name '*.policy*')
# find .xml.in and .gschema.xml files
files="$files "$(find $xmldirs -not -name '*.gresource.xml*' \
-name '*.xml.in*' -o \
-name '*.gschema.xml')
# filter out excluded files
if [ -f po/POTFILES.skip ]; then
files=$(for f in $files; do
! grep -q "^$f" po/POTFILES.skip && echo "$f"
done)
fi
# find those that aren't listed in POTFILES.in
missing=$(for f in $files; do
! grep -q "^$f" po/POTFILES.in && echo "$f"
done)
# find those that are listed in POTFILES.in but do not contain translatable strings
invalid=$(while IFS= read -r f; do
! grep -q "$f" <<< "$files" && echo "$f"
done < <(grep '^[^#]' po/POTFILES.in))
# find out if POTFILES.in is sorted correctly, ignoring empty lines
sorted=$(grep '^[^#]' po/POTFILES.in | \
LC_ALL=en_US.UTF-8 sort -cu 2>&1 >/dev/null | \
awk -F ': *' '{print $5}')
if [ ${#missing} -eq 0 ] && [ ${#invalid} -eq 0 ] && [ ${#sorted} -eq 0 ]; then
exit 0
fi
if [ ${#missing} -ne 0 ]; then
cat >&2 << EOT
The following files are missing from po/POTFILES.in or po/POTFILES.skip:
EOT
for f in $missing; do
echo " $f" >&2
done
fi
if [ ${#invalid} -ne 0 ]; then
cat >&2 << EOT
The following files are in po/POTFILES.in but are missing or not translatable:
EOT
for f in $invalid; do
echo " $f" >&2
done
fi
if [ ${#sorted} -ne 0 ]; then
cat >&2 << EOT
The following file is not sorted properly in po/POTFILES.in:
EOT
echo " $sorted" >&2
fi
echo >&2
exit 1

View File

@@ -0,0 +1,59 @@
env:
IMAGE_TAG: 20250213-1
on:
workflow_call:
outputs:
image:
description: "The build image"
value: ${{ jobs.build-container.outputs.image }}
image_options:
description: "The options to use with the image"
value: --device /dev/fuse --cap-add SYS_ADMIN --security-opt apparmor:unconfined --privileged
jobs:
build-container:
name: Create build container
runs-on: ubuntu-latest
outputs:
image: ${{ steps.check.outputs.image }}
steps:
- name: Login to GHCR
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ github.token }}
- name: Check if image already exists on GHCR
id: check
run: |
ACTOR="${{ github.actor }}"
OWNER="${{ github.repository_owner }}"
image_actor="ghcr.io/${ACTOR,,}/xdg-desktop-portal:${{ env.IMAGE_TAG }}"
image_owner="ghcr.io/${OWNER,,}/xdg-desktop-portal:${{ env.IMAGE_TAG }}"
if docker manifest inspect "${image_owner}" >/dev/null ; then
echo "exists=true" >> "$GITHUB_OUTPUT"
echo "image=${image_owner}" >> "$GITHUB_OUTPUT"
exit 0
fi
if docker manifest inspect "${image_actor}" >/dev/null ; then
echo "exists=true" >> "$GITHUB_OUTPUT"
echo "image=${image_actor}" >> "$GITHUB_OUTPUT"
exit 0
fi
echo "exists=false" >> "$GITHUB_OUTPUT"
echo "image=${image_owner}" >> "$GITHUB_OUTPUT"
- name: Build and push
if: ${{ steps.check.outputs.exists == 'false' }}
uses: docker/build-push-action@v5
with:
push: true
file: .github/workflows/Containerfile
tags: ${{ steps.check.outputs.image }}

View File

@@ -0,0 +1,30 @@
name: CI
on: [push, pull_request]
jobs:
build-container:
name: Container
uses: ./.github/workflows/container.yml
permissions:
packages: write
build-and-test:
name: Build and Test
uses: ./.github/workflows/build-and-test.yml
needs: build-container
with:
image: ${{ needs.build-container.outputs.image }}
image_options: ${{ needs.build-container.outputs.image_options }}
pages:
name: Documentation & Website
uses: ./.github/workflows/pages.yml
needs: build-container
permissions:
contents: read
pages: write
id-token: write
with:
image: ${{ needs.build-container.outputs.image }}
image_options: ${{ needs.build-container.outputs.image_options }}

View File

@@ -0,0 +1,64 @@
on:
workflow_call:
inputs:
image:
required: true
type: string
image_options:
required: true
type: string
concurrency:
group: "pages"
cancel-in-progress: false
jobs:
build:
name: Build docs and website
runs-on: ubuntu-latest
container:
image: ${{ inputs.image }}
options: ${{ inputs.image_options }}
steps:
- name: Check out xdg-desktop-portal
uses: actions/checkout@v4
- name: Build docs
run: |
export PYTHONPATH="/root/.local/lib/python$(python3 -c 'import sys; print("{}.{}".format(*sys.version_info))')/site-packages:$PYTHONPATH"
export PATH="/root/.local/bin:$PATH"
meson setup _build \
-Ddocumentation=enabled \
-Dwerror=true
ninja -C _build doc/html
- name: Build website
uses: actions/jekyll-build-pages@v1
with:
source: ./doc/website
destination: ./_site
- name: Prepare docs
working-directory: _build/doc
run: |
mv ./html ../../_site/docs
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
# Deployment job
deploy:
name: Deploy
runs-on: ubuntu-latest
needs: build
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
if: ${{ (github.event_name == 'push' && github.ref == 'refs/heads/main') }}
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4

View File

@@ -0,0 +1,74 @@
name: Release new version
on:
push:
tags:
- '[0-9]+.[0-9]+.[0-9]+'
jobs:
build-container:
name: Container
uses: ./.github/workflows/container.yml
permissions:
packages: write
release:
name: Build and publish a release
runs-on: ubuntu-latest
needs: build-container
permissions:
contents: write
container:
image: ${{ needs.build-container.outputs.image }}
options: ${{ needs.build-container.outputs.image_options }}
env:
XDP_TEST_IN_CI: 1
steps:
- name: Configure environment
run: |
git config --global --add safe.directory $GITHUB_WORKSPACE
- name: Checkout the repository
uses: actions/checkout@v4
- name: Build xdg-desktop-portal
run: |
meson setup . _build
meson dist -C _build
- name: Extract release information
run: |
# Extract the release version
releaseVersion=`meson introspect --projectinfo _build/ | jq -r .version`
echo "releaseVersion=$releaseVersion" | tee -a $GITHUB_ENV
echo $releaseVersion
# Extract the changelog
{
echo "releaseChangelog<<EOF"
perl -0777nE 'print $& if /(?<=\n\n).*?(?=\nChanges in)/sg' NEWS.md
echo "\nEOF"
} | tee -a $GITHUB_ENV
echo $releaseChangelog
# Check if version is a pre-release
preRelease=$((`echo $releaseVersion | cut -d '.' -f2` % 2))
{
echo -n "preRelease="
if [ $preRelease = 1 ] || [ $preRelease = "true" ]; then
echo "true";
else
echo "false";
fi
} | tee -a $GITHUB_ENV
echo $preRelease
- name: Create release
uses: ncipollo/release-action@v1.15.0
with:
tag: ${{ env.releaseVersion }}
body: ${{ env.releaseChangelog }}
prerelease: ${{ env.preRelease }}
artifacts: _build/meson-dist/*

View File

@@ -0,0 +1 @@
__pycache__

View File

@@ -0,0 +1,10 @@
[mypy]
warn_unused_configs = True
check_untyped_defs=True
[mypy-gi.*]
ignore_missing_imports = True
[mypy-dbus.*]
ignore_missing_imports = True
[mypy-dbusmock.*]
ignore_missing_imports = True

View File

@@ -0,0 +1,16 @@
repos:
- repo: https://github.com/astral-sh/ruff-pre-commit
# Ruff version.
rev: v0.7.0
hooks:
# Run the linter.
- id: ruff
# Run the formatter.
- id: ruff-format
args: [ --check ]
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.14.1
hooks:
- id: mypy
additional_dependencies:
- pytest

View File

@@ -0,0 +1,4 @@
# XDG Desktop Portal - Contributing Guide
The contribution guidelines have been moved to the online documentation:
https://flatpak.github.io/xdg-desktop-portal/docs/for-contributors.html

View File

@@ -0,0 +1,502 @@
GNU LESSER GENERAL PUBLIC LICENSE
Version 2.1, February 1999
Copyright (C) 1991, 1999 Free Software Foundation, Inc.
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
[This is the first released version of the Lesser GPL. It also counts
as the successor of the GNU Library Public License, version 2, hence
the version number 2.1.]
Preamble
The licenses for most software are designed to take away your
freedom to share and change it. By contrast, the GNU General Public
Licenses are intended to guarantee your freedom to share and change
free software--to make sure the software is free for all its users.
This license, the Lesser General Public License, applies to some
specially designated software packages--typically libraries--of the
Free Software Foundation and other authors who decide to use it. You
can use it too, but we suggest you first think carefully about whether
this license or the ordinary General Public License is the better
strategy to use in any particular case, based on the explanations below.
When we speak of free software, we are referring to freedom of use,
not price. Our General Public Licenses are designed to make sure that
you have the freedom to distribute copies of free software (and charge
for this service if you wish); that you receive source code or can get
it if you want it; that you can change the software and use pieces of
it in new free programs; and that you are informed that you can do
these things.
To protect your rights, we need to make restrictions that forbid
distributors to deny you these rights or to ask you to surrender these
rights. These restrictions translate to certain responsibilities for
you if you distribute copies of the library or if you modify it.
For example, if you distribute copies of the library, whether gratis
or for a fee, you must give the recipients all the rights that we gave
you. You must make sure that they, too, receive or can get the source
code. If you link other code with the library, you must provide
complete object files to the recipients, so that they can relink them
with the library after making changes to the library and recompiling
it. And you must show them these terms so they know their rights.
We protect your rights with a two-step method: (1) we copyright the
library, and (2) we offer you this license, which gives you legal
permission to copy, distribute and/or modify the library.
To protect each distributor, we want to make it very clear that
there is no warranty for the free library. Also, if the library is
modified by someone else and passed on, the recipients should know
that what they have is not the original version, so that the original
author's reputation will not be affected by problems that might be
introduced by others.
Finally, software patents pose a constant threat to the existence of
any free program. We wish to make sure that a company cannot
effectively restrict the users of a free program by obtaining a
restrictive license from a patent holder. Therefore, we insist that
any patent license obtained for a version of the library must be
consistent with the full freedom of use specified in this license.
Most GNU software, including some libraries, is covered by the
ordinary GNU General Public License. This license, the GNU Lesser
General Public License, applies to certain designated libraries, and
is quite different from the ordinary General Public License. We use
this license for certain libraries in order to permit linking those
libraries into non-free programs.
When a program is linked with a library, whether statically or using
a shared library, the combination of the two is legally speaking a
combined work, a derivative of the original library. The ordinary
General Public License therefore permits such linking only if the
entire combination fits its criteria of freedom. The Lesser General
Public License permits more lax criteria for linking other code with
the library.
We call this license the "Lesser" General Public License because it
does Less to protect the user's freedom than the ordinary General
Public License. It also provides other free software developers Less
of an advantage over competing non-free programs. These disadvantages
are the reason we use the ordinary General Public License for many
libraries. However, the Lesser license provides advantages in certain
special circumstances.
For example, on rare occasions, there may be a special need to
encourage the widest possible use of a certain library, so that it becomes
a de-facto standard. To achieve this, non-free programs must be
allowed to use the library. A more frequent case is that a free
library does the same job as widely used non-free libraries. In this
case, there is little to gain by limiting the free library to free
software only, so we use the Lesser General Public License.
In other cases, permission to use a particular library in non-free
programs enables a greater number of people to use a large body of
free software. For example, permission to use the GNU C Library in
non-free programs enables many more people to use the whole GNU
operating system, as well as its variant, the GNU/Linux operating
system.
Although the Lesser General Public License is Less protective of the
users' freedom, it does ensure that the user of a program that is
linked with the Library has the freedom and the wherewithal to run
that program using a modified version of the Library.
The precise terms and conditions for copying, distribution and
modification follow. Pay close attention to the difference between a
"work based on the library" and a "work that uses the library". The
former contains code derived from the library, whereas the latter must
be combined with the library in order to run.
GNU LESSER GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. This License Agreement applies to any software library or other
program which contains a notice placed by the copyright holder or
other authorized party saying it may be distributed under the terms of
this Lesser General Public License (also called "this License").
Each licensee is addressed as "you".
A "library" means a collection of software functions and/or data
prepared so as to be conveniently linked with application programs
(which use some of those functions and data) to form executables.
The "Library", below, refers to any such software library or work
which has been distributed under these terms. A "work based on the
Library" means either the Library or any derivative work under
copyright law: that is to say, a work containing the Library or a
portion of it, either verbatim or with modifications and/or translated
straightforwardly into another language. (Hereinafter, translation is
included without limitation in the term "modification".)
"Source code" for a work means the preferred form of the work for
making modifications to it. For a library, complete source code means
all the source code for all modules it contains, plus any associated
interface definition files, plus the scripts used to control compilation
and installation of the library.
Activities other than copying, distribution and modification are not
covered by this License; they are outside its scope. The act of
running a program using the Library is not restricted, and output from
such a program is covered only if its contents constitute a work based
on the Library (independent of the use of the Library in a tool for
writing it). Whether that is true depends on what the Library does
and what the program that uses the Library does.
1. You may copy and distribute verbatim copies of the Library's
complete source code as you receive it, in any medium, provided that
you conspicuously and appropriately publish on each copy an
appropriate copyright notice and disclaimer of warranty; keep intact
all the notices that refer to this License and to the absence of any
warranty; and distribute a copy of this License along with the
Library.
You may charge a fee for the physical act of transferring a copy,
and you may at your option offer warranty protection in exchange for a
fee.
2. You may modify your copy or copies of the Library or any portion
of it, thus forming a work based on the Library, and copy and
distribute such modifications or work under the terms of Section 1
above, provided that you also meet all of these conditions:
a) The modified work must itself be a software library.
b) You must cause the files modified to carry prominent notices
stating that you changed the files and the date of any change.
c) You must cause the whole of the work to be licensed at no
charge to all third parties under the terms of this License.
d) If a facility in the modified Library refers to a function or a
table of data to be supplied by an application program that uses
the facility, other than as an argument passed when the facility
is invoked, then you must make a good faith effort to ensure that,
in the event an application does not supply such function or
table, the facility still operates, and performs whatever part of
its purpose remains meaningful.
(For example, a function in a library to compute square roots has
a purpose that is entirely well-defined independent of the
application. Therefore, Subsection 2d requires that any
application-supplied function or table used by this function must
be optional: if the application does not supply it, the square
root function must still compute square roots.)
These requirements apply to the modified work as a whole. If
identifiable sections of that work are not derived from the Library,
and can be reasonably considered independent and separate works in
themselves, then this License, and its terms, do not apply to those
sections when you distribute them as separate works. But when you
distribute the same sections as part of a whole which is a work based
on the Library, the distribution of the whole must be on the terms of
this License, whose permissions for other licensees extend to the
entire whole, and thus to each and every part regardless of who wrote
it.
Thus, it is not the intent of this section to claim rights or contest
your rights to work written entirely by you; rather, the intent is to
exercise the right to control the distribution of derivative or
collective works based on the Library.
In addition, mere aggregation of another work not based on the Library
with the Library (or with a work based on the Library) on a volume of
a storage or distribution medium does not bring the other work under
the scope of this License.
3. You may opt to apply the terms of the ordinary GNU General Public
License instead of this License to a given copy of the Library. To do
this, you must alter all the notices that refer to this License, so
that they refer to the ordinary GNU General Public License, version 2,
instead of to this License. (If a newer version than version 2 of the
ordinary GNU General Public License has appeared, then you can specify
that version instead if you wish.) Do not make any other change in
these notices.
Once this change is made in a given copy, it is irreversible for
that copy, so the ordinary GNU General Public License applies to all
subsequent copies and derivative works made from that copy.
This option is useful when you wish to copy part of the code of
the Library into a program that is not a library.
4. You may copy and distribute the Library (or a portion or
derivative of it, under Section 2) in object code or executable form
under the terms of Sections 1 and 2 above provided that you accompany
it with the complete corresponding machine-readable source code, which
must be distributed under the terms of Sections 1 and 2 above on a
medium customarily used for software interchange.
If distribution of object code is made by offering access to copy
from a designated place, then offering equivalent access to copy the
source code from the same place satisfies the requirement to
distribute the source code, even though third parties are not
compelled to copy the source along with the object code.
5. A program that contains no derivative of any portion of the
Library, but is designed to work with the Library by being compiled or
linked with it, is called a "work that uses the Library". Such a
work, in isolation, is not a derivative work of the Library, and
therefore falls outside the scope of this License.
However, linking a "work that uses the Library" with the Library
creates an executable that is a derivative of the Library (because it
contains portions of the Library), rather than a "work that uses the
library". The executable is therefore covered by this License.
Section 6 states terms for distribution of such executables.
When a "work that uses the Library" uses material from a header file
that is part of the Library, the object code for the work may be a
derivative work of the Library even though the source code is not.
Whether this is true is especially significant if the work can be
linked without the Library, or if the work is itself a library. The
threshold for this to be true is not precisely defined by law.
If such an object file uses only numerical parameters, data
structure layouts and accessors, and small macros and small inline
functions (ten lines or less in length), then the use of the object
file is unrestricted, regardless of whether it is legally a derivative
work. (Executables containing this object code plus portions of the
Library will still fall under Section 6.)
Otherwise, if the work is a derivative of the Library, you may
distribute the object code for the work under the terms of Section 6.
Any executables containing that work also fall under Section 6,
whether or not they are linked directly with the Library itself.
6. As an exception to the Sections above, you may also combine or
link a "work that uses the Library" with the Library to produce a
work containing portions of the Library, and distribute that work
under terms of your choice, provided that the terms permit
modification of the work for the customer's own use and reverse
engineering for debugging such modifications.
You must give prominent notice with each copy of the work that the
Library is used in it and that the Library and its use are covered by
this License. You must supply a copy of this License. If the work
during execution displays copyright notices, you must include the
copyright notice for the Library among them, as well as a reference
directing the user to the copy of this License. Also, you must do one
of these things:
a) Accompany the work with the complete corresponding
machine-readable source code for the Library including whatever
changes were used in the work (which must be distributed under
Sections 1 and 2 above); and, if the work is an executable linked
with the Library, with the complete machine-readable "work that
uses the Library", as object code and/or source code, so that the
user can modify the Library and then relink to produce a modified
executable containing the modified Library. (It is understood
that the user who changes the contents of definitions files in the
Library will not necessarily be able to recompile the application
to use the modified definitions.)
b) Use a suitable shared library mechanism for linking with the
Library. A suitable mechanism is one that (1) uses at run time a
copy of the library already present on the user's computer system,
rather than copying library functions into the executable, and (2)
will operate properly with a modified version of the library, if
the user installs one, as long as the modified version is
interface-compatible with the version that the work was made with.
c) Accompany the work with a written offer, valid for at
least three years, to give the same user the materials
specified in Subsection 6a, above, for a charge no more
than the cost of performing this distribution.
d) If distribution of the work is made by offering access to copy
from a designated place, offer equivalent access to copy the above
specified materials from the same place.
e) Verify that the user has already received a copy of these
materials or that you have already sent this user a copy.
For an executable, the required form of the "work that uses the
Library" must include any data and utility programs needed for
reproducing the executable from it. However, as a special exception,
the materials to be distributed need not include anything that is
normally distributed (in either source or binary form) with the major
components (compiler, kernel, and so on) of the operating system on
which the executable runs, unless that component itself accompanies
the executable.
It may happen that this requirement contradicts the license
restrictions of other proprietary libraries that do not normally
accompany the operating system. Such a contradiction means you cannot
use both them and the Library together in an executable that you
distribute.
7. You may place library facilities that are a work based on the
Library side-by-side in a single library together with other library
facilities not covered by this License, and distribute such a combined
library, provided that the separate distribution of the work based on
the Library and of the other library facilities is otherwise
permitted, and provided that you do these two things:
a) Accompany the combined library with a copy of the same work
based on the Library, uncombined with any other library
facilities. This must be distributed under the terms of the
Sections above.
b) Give prominent notice with the combined library of the fact
that part of it is a work based on the Library, and explaining
where to find the accompanying uncombined form of the same work.
8. You may not copy, modify, sublicense, link with, or distribute
the Library except as expressly provided under this License. Any
attempt otherwise to copy, modify, sublicense, link with, or
distribute the Library is void, and will automatically terminate your
rights under this License. However, parties who have received copies,
or rights, from you under this License will not have their licenses
terminated so long as such parties remain in full compliance.
9. You are not required to accept this License, since you have not
signed it. However, nothing else grants you permission to modify or
distribute the Library or its derivative works. These actions are
prohibited by law if you do not accept this License. Therefore, by
modifying or distributing the Library (or any work based on the
Library), you indicate your acceptance of this License to do so, and
all its terms and conditions for copying, distributing or modifying
the Library or works based on it.
10. Each time you redistribute the Library (or any work based on the
Library), the recipient automatically receives a license from the
original licensor to copy, distribute, link with or modify the Library
subject to these terms and conditions. You may not impose any further
restrictions on the recipients' exercise of the rights granted herein.
You are not responsible for enforcing compliance by third parties with
this License.
11. If, as a consequence of a court judgment or allegation of patent
infringement or for any other reason (not limited to patent issues),
conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot
distribute so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you
may not distribute the Library at all. For example, if a patent
license would not permit royalty-free redistribution of the Library by
all those who receive copies directly or indirectly through you, then
the only way you could satisfy both it and this License would be to
refrain entirely from distribution of the Library.
If any portion of this section is held invalid or unenforceable under any
particular circumstance, the balance of the section is intended to apply,
and the section as a whole is intended to apply in other circumstances.
It is not the purpose of this section to induce you to infringe any
patents or other property right claims or to contest validity of any
such claims; this section has the sole purpose of protecting the
integrity of the free software distribution system which is
implemented by public license practices. Many people have made
generous contributions to the wide range of software distributed
through that system in reliance on consistent application of that
system; it is up to the author/donor to decide if he or she is willing
to distribute software through any other system and a licensee cannot
impose that choice.
This section is intended to make thoroughly clear what is believed to
be a consequence of the rest of this License.
12. If the distribution and/or use of the Library is restricted in
certain countries either by patents or by copyrighted interfaces, the
original copyright holder who places the Library under this License may add
an explicit geographical distribution limitation excluding those countries,
so that distribution is permitted only in or among countries not thus
excluded. In such case, this License incorporates the limitation as if
written in the body of this License.
13. The Free Software Foundation may publish revised and/or new
versions of the Lesser General Public License from time to time.
Such new versions will be similar in spirit to the present version,
but may differ in detail to address new problems or concerns.
Each version is given a distinguishing version number. If the Library
specifies a version number of this License which applies to it and
"any later version", you have the option of following the terms and
conditions either of that version or of any later version published by
the Free Software Foundation. If the Library does not specify a
license version number, you may choose any version ever published by
the Free Software Foundation.
14. If you wish to incorporate parts of the Library into other free
programs whose distribution conditions are incompatible with these,
write to the author to ask for permission. For software which is
copyrighted by the Free Software Foundation, write to the Free
Software Foundation; we sometimes make exceptions for this. Our
decision will be guided by the two goals of preserving the free status
of all derivatives of our free software and of promoting the sharing
and reuse of software generally.
NO WARRANTY
15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
DAMAGES.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Libraries
If you develop a new library, and you want it to be of the greatest
possible use to the public, we recommend making it free software that
everyone can redistribute and change. You can do so by permitting
redistribution under these terms (or, alternatively, under the terms of the
ordinary General Public License).
To apply these terms, attach the following notices to the library. It is
safest to attach them to the start of each source file to most effectively
convey the exclusion of warranty; and each file should have at least the
"copyright" line and a pointer to where the full notice is found.
<one line to give the library's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
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
Also add information on how to contact you by electronic and paper mail.
You should also get your employer (if you work as a programmer) or your
school, if any, to sign a "copyright disclaimer" for the library, if
necessary. Here is a sample; alter the names:
Yoyodyne, Inc., hereby disclaims all copyright interest in the
library `Frob' (a library for tweaking knobs) written by James Random Hacker.
<signature of Ty Coon>, 1 April 1990
Ty Coon, President of Vice
That's all there is to it!

View File

@@ -0,0 +1,762 @@
Changes in 1.20.3
=================
Released: 2025-05-20
Bug Fixes:
- Add a fallback code path for GLib older than 2.76 (#1728)
- Don't require a .desktop file for Flatpak and Snap apps (#1729)
Changes in 1.20.2
=================
Released: 2025-05-19
Bug Fixes:
- Fix a crash when loading information from Flatpak apps
- Fix fd handling to prevent EBADF errors
Changes in 1.20.1
=================
Released: 2025-05-15
Enhancements:
- Code cleanups and improvements to app info tracking
- Include PID/TID in realtime portal error messages
- Search for portal backends in $XDG_DATA_DIRS (#603)
- Prioritize user portal configs over system ones
Bug Fixes:
- Fix race condition in the host registry portal
- Avoid spurious warnings when dbus.service stops
- Documentation fixes (#1663)
- Fix running tests from /tmp
- Fix installing dynamic launcher (#1674)
- Improve error reporting in the document portal
- Fix incorrect state tracking in input capture portal
Changes in 1.20.0
=================
Released: 2025-02-19
Enhancements:
- Document how the test suite works.
- Improve the test runner script.
Changes in 1.19.4
=================
Released: 2025-02-15
New Features:
- Introduce the host app registry. This interface allows host system apps
(i.e. apps not running under a sandboxing mechanism like Flatpak) register
themselves with XDG Desktop Portal. This allows XDG Desktop Portal to use
a proper app id, and desktop file, improving the interaction with portal
backends.
Enhancements:
- Use a new internal script to simplify running tests.
Bug Fixes:
- Properly escape notification body in the Notification portal.
- Fix various documentation links in the USB portal documentation page.
Changes in 1.19.3
=================
Released: 2025-02-12
Bug Fixes:
- Fix documentation links in the USB portal page.
- Make the Document portal track open files, and release them when shutting
down. This should fix some harmless leak reports.
- Fix a memory leak, a crash, and improve robustness against non-existing
folders in the Dynamic Launcher portal.
- Fix build with PipeWire 1.3.82
Enhancements:
- Make the host path xattr more useful by removing the trailing end character,
and also reporting the xattr of files inside folders added to the document
store.
- Remove libportal-based integrated tests. This should remove the cyclic
dependency between libportal, and xdg-desktop-portal. All tests are now based
on the Python testing framework.
Changes in 1.19.2
=================
Released: 2025-01-20
Bug Fixes:
- Fix permission check for host system apps in the Camera portal.
- Do not expose the Settings portal if there are no backends available.
- Disable sounds-related notification tests if the project is built without
wavparse.
Enhancements:
- Start porting the test suite to Python tests. Once finished, this should
break the cyclic dependency between xdg-desktop-portal and libportal.
- Install Python-based tests. This is mostly useful for distributions to run
tests as part of their packaging process.
Changes in 1.19.1
=================
Released: 2024-12-21
Dependencies:
- XDG Desktop Portal now requires GLib 2.72 or higher.
New Features:
- Introduce the Notification v2 portal. This updated version of the Notification
portal supports a plethora of new fields for notifications, such as sounds,
categories, purpose, and more.
- Introduce the USB portal. This portal allows apps with relevant permissions
to enumerate and acquire access to specific USB devices.
- Introduce a new `SchemeSupported` method to the OpenURI portal. This new
method allows apps to know ahead of time if the host system is able to deal
with a particular scheme.
Enhancements:
- Continued the move towards Python-based tests. This should simplify the
test setup in the project quite significantly, and also will allow removing
the cyclic dependency between libportal and XDG Desktop Portal.
- Introduce umockdev-based tests.
- Improve the icon validator so it can deal with memfd-based icons.
- Clarify behavior of the Settings portal for non-standardized keys.
- In the Global Shortcuts portal, clarify that the result the `BindShortcuts`
of may be a subset of all requested shortcuts.
- Add a documentation page about icon validation requirements.
Bug Fixes:
- Fix memory leaks in the Background, Email, and Global Shortcuts portals.
- Fix a general file descriptor & memory leak.
- Fix a regression in the Settings portal.
- New and updated translations.
Changes in 1.19.0
=================
Released: 2024-10-09
- Completely rework and restructure the documentation website. Documentation is
now segmented by target audience (app developers, desktop developers, and
contributors). It also documents how the Document portal operates, the FUSE
filesystem, and custom file attributes. This is available in the following
address: https://flatpak.github.io/xdg-desktop-portal/docs/index.html
- The portals.conf parser is now able to handle fallback backends better, and
respects the order of backends in the config file.
- Try to use the xdg-desktop-portal-gtk backend as a last resort backend, if
everything else fails.
- Implement getlk and setlk, and honour O_NOFOLLOW, in the Document portal's
FUSE filesystem.
- Neutralize the Devices portal. Originally the Devices portal was introduced
so that services like PulseAudio or PipeWire could request access to
microphones and cameras on the behalf of apps. It was not meant to be used by
sandboxed apps directly, which is unusual for a portal. Practically, however,
it didn't take off.
- Implement PID/TID mapping for host system apps.
- Add a new "supported_output_file_formats" option to the Print portal. This
can be used by apps like browsers to limit the output file formats presented
by the Print portal backend. For example, an app can limit file printing to
PDF files.
- Add a new "GetHostPaths" method to the Document portal, which allows mapping
file descriptors to paths on the host system. This can be used by apps to
show more meaningful file paths in the user interface.
- Like the new method above, the Document portal sets the
"user.document-portal.host-path" xattr on files, pointing to the the host
system file path. The use case is similar to "GetHostPaths".
- Make the Background portal more robust when validating autostart files.
- Clarify behavior of the File Chooser portal in the documentation pages.
- Improve robustness against deleted o_path fds in the Document portal.
- Fix a warning in some systems while trying to load Request D-Bus object
properties.
- Fix a physical inode leak in the Document portal.
- Various improvements to the test suite. Python-based tests now run in parallel
and are more careful when setting up the mock D-Bus server. Tests also start
dbus-monitor if necessary now. FUSE tests of the Document portal have been
made more TAP-alike now.
- Memory leak fixes in a variety of portals and services, including the
permissions database, the Document portal, the File Transfer portal, the
Location portal, the Background portal, tests, and the icon validator. And
more. There's a lot of memory leak fixes everywhere, really.
- Major refactorings of the icon validator. Icons are now limited to 4MB files.
- Update XML specification specifying session handle type to match current
actual ABI in GlobalShortcuts, Inhibit, RemoteDesktop, and ScreenCast portals.
- New and updated translations.
Changes in 1.18.1
=================
Released: 2023-10-26
- Communicate better when the Background portal kills an app
- Properly quote Flatpak command in the Background portal
- Improve documentation of the "cursor_mode" propery of the ScreenCast
backend D-Bus interface
- Fix ScreenCast portal removing transient restore permissions too early.
This fixes screen sharing dialogs on Chromium asking for the screen multiple
times.
- Only send the Closed session signal to the sender
- Add Meson options to disable building with Bubblewrap, and without the
Flatpak portal documentation. Disabling Bubblewrap is **highly** discouraged,
and only meant to be used on platforms that do not currently support it. By
disabling Bubblewrap, bitmap validation happens without a sandbox, which is
highly insecure since image parsing is a common source of exploits. Really,
just do not disable Bubblewrap please.
- Improve the manpage of portals.conf
- Various spelling fixes to the Document portal
- Add a new website! We don't have a fancy domain yet, but the website can be
accessed at https://flatpak.github.io/xdg-desktop-portal/
- Improve pid mapping for host system apps. This should get rid of some rare,
unnecessary warnings.
- Adjust documentation of Global Shortcuts portal's timestamps to millisecond
granularity
- Bump minimum Meson version to 0.58
Changes in 1.18.0
=================
Released: 2023-09-18
- Bump interface version of the Printer portal to 2
- Validate addresses following the HTML specs in the Email portal
Changes in 1.17.2
=================
Released: 2023-09-01
- Document minimum version of the new ReadOne() method of the Settings portal
- Add a mapping id property to the ScreenCast portal
- Add activation token parameter to the Email portal
- Test tarball generation in CI
Changes in 1.17.1
=================
Released: 2023-08-27
- Document xdg-desktop-portal versioning scheme
- Fix various issues in the OpenURI portal
- Introduce the ReadOne() method in the Settings portal. This method is now
preferred over the Read() method, as Read() mistakenly returned a variant
inside a variant. The Read() method will continue to exist for compatibility
with existing apps, but its usage is deprecated. We recommend apps to port
to the ReadOne() method. Apps can decide whether to use ReadOne() or Read()
by looking at the version of the Settings portal.
- Improvements to the new config-based portal matching mechanism. Config files
are now searched in standard paths, in a way that is compatible to other
system components (e.g. MIME types).
- Various small visual tweaks to the generated documentation
- Document a new 'accent-color' key in the Settings portal. This key represents
an arbitrary color in sRGB colorspace. How implementations of the portal
provide this key is entirely dependent on their internal policies and design.
- Translation updates
Changes in 1.17.0
=================
Released: 2023-08-04
- Drop the Autotools build. Meson is now the only supported build system.
- Rework how portal implementations are loaded. This new, more robust system
allows selecting specific backends for specific portals, and layering them
when necessary. Platforms that provide portals implementation are encouraged
to provide a suitable configuration file.
- Introduce a new Clipboard portal. This portal extends the Remote Desktop
portal by adding support for sharing clipboard between remote machines.
- Introduce a new Input Capture portal. This portal adds mechanisms for taking
control of input devices. The primary usage model is centered around the
InputLeap and Synergy use cases, where local devices are used to control
remote displays.
- Stop using the deprecated GTimeVal struct
- Bump GLib dependency to 2.66
- Add an "accept-label" option the the Print portal. This lets apps suggest a
proper label to the print operation.
- Various fixes to the Global Shortcuts portal
- Support restoring remote desktop sessions
- Improve robustness of the OpenURI portal by validating more URIs
- The PipeWire dependency is now mandatory
- Various improvements for the test suite
- Translation updates
Changes in 1.16.0
=================
Released: 2022-12-12
- Introduce a new background monitoring service. This allows desktop
environments to list applications that are running in background, that is,
sandboxed applications running without a visible window. Desktop environments
can display these background running applications in their interfaces, and
allow users to control their execution.
- Introduce the Global Shortcuts portal. This portal allows applications to
register and receive keyboard shortcuts even when they're not focused. This
was a highly requested feature, especially on Wayland desktops. There are
improvements to come, but portal backends can now implement this new portal.
- Various CI improvements
- Translation updates
Changes in 1.15.0
=================
Released: 2022-08-11
- Add Meson build files. For now, both Autotools and Meson are available
in the source tree. Starting from next release, tarballs will be generated
using Meson. There is no set date to delete Autotools files, but it will
happen at some point in the future. The removal of Autotools will be
communicated in advance.
- Make the Screenshot portal request permission to take screenshots. Frontends
that implement the version 2 of org.freedesktop.portal.impl.Screenshot portal
can now be aware that the screenshot permission was granted through the new
'permission_store_checked' option, and skip any kind of dialog when that is
the case.
- Stop sending the app id quoted in the Background portal
- Fix a bug in cgroup name parsing
- Various fixes to the Realtime portal
- Various CI improvements
- Translation updates
Changes in 1.14.1
=================
Released: 2022-03-18
- Fix an issue in 1.14.0 where xdg-desktop-portal.service starting before
graphical-session-pre.target would cause the GNOME session to deadlock by
moving code to a new libexec binary which handles deleting or migrating
.desktop files (and icons) from the dynamic launcher portal for apps which
have been uninstalled or renamed.
- Fix some bugs in the aforementioned launcher migration implementation,
"xdg-desktop-portal-rewrite-launchers".
- Fix build without libsystemd
Changes in 1.14.0
=================
Released: 2022-03-17
- Add a new "dynamic launcher" portal, which can install .desktop files and
accompanying icons after user confirmation.
- Rework handling of empty app IDs: In case an empty string app ID is stored in
the permission store, this permission is now shared only by apps whose app ID
couldn't be determined, rather than all unsandboxed apps.
- Use libsystemd (when available) to try to determine the app ID of unsandboxed
processes. This is useful since some portals otherwise can't be used by host
apps.
- Make x-d-p start on session start, which is needed for the dynamic launcher
portal to handle rewriting launchers for apps that have been renamed.
- Bring back the copy of Flatpak's icon-validator, which was dropped many
releases ago.
- Icon validation is now required for the notification and dynamic launcher
portals (previously it was only done if the "flatpak-validate-icon" binary
could be found).
- document-portal: Move to the libfuse3 API
- document-portal: Use renameat2 sys call
- document-portal: Use mutex to fix concurrency bug
- realtime: Fix error code paths
- realtime: Fix MakeThreadHighPriorityWithPID method
- screencast: Fix an error when restoring streams
- ci: Various improvements
- Documentation improvements
- New translations: pt, ro
Changes in 1.12.1
=================
Released: 2021-12-22
- Fix a crash in the device portal
Changes in 1.12.0
=================
Released: 2021-12-21
- Place portals in the systemd session.slice
- settings: Add color-scheme key
- open-uri: Avoid a sync call to org.freedesktop.FileManager
- screncast: Allow restoring previous sessions
- Add a portal for requesting realtime permissions
- ci: Many improvements
- Publish the docs from a ci job
- Translation updates
Changes in 1.10.0
=================
- Remap /run/flatpak/app, for Flatpak 1.11.x
- Remap /var/config and /var/data
- permission-store: Avoid a crash
- permissions-store: Add GetPermission
- screencast: Add 'virtual' source type
- openuri: Use real path for OpenDirectory
- location: Fix accuracy levels
- Add power profile monitor implementation
- Translation updates
Changes in 1.8.1
================
- openuri: Fix an fd leak
- filechooser: Fix directory support
- build: Drop a fontconfig dependency
- snap: Use cgroups to identify confined apps
- documents: Add snap support
- wallpaper: Fix a crash
- build: Factor out a fuse check
- Translation updates
Changes in 1.8.0
================
- openuri: Allow skipping the chooser for more URL tyles
- openuri: Robustness fixes
- filechooser: Return the current filter
- camera: Make the client node visible
- camera: Don't leak pipewire proxy
- Fix file descriptor leaks
- Testsuite improvements
- Translation updates
Changes in 1.7.2
================
- document: Reduce the use of open fds
- document: Add more tests and fix issues they found
- Fix the build with musl
Changes in 1.7.1
================
- filechooser: Add a "directory" option
- filechooser: Document the "writable" option
- document: Expose directories with their proper name
Changes in 1.7.0
================
- testsuite improvements
- background: Avoid a segfault
- screencast: Require pipewire 0.3
- document: Support exporting directories
- document: New fuse implementation
- better support for snap and toolbox
- Translation updates
Changes in 1.6.0
================
- tests: Adapt to libportal api changes
Changes in 1.5.4
================
- background: Add a signal to the impl api
- background: Rewrite the monitoring to better track when apps disappear
- permissions: Fix SetValue handling of GVariant wrapping. This is an api change
- openuri: Add a per-type always-ask option
- openuri: Show the app chooser dialog less often
- memorymonitor: A new portal to let apps receive low memory warnings
- filetransfer: A new portal to rewrite file paths between sandboxes
Changes in 1.5.3
================
* Add more tests
* Translation updates
* location: Various fixes
* document portal: Monitor fuse mount
* openuri: Only ask 3 times to use the same app
* openuri: Add an 'ask' option
* Fix build from git
* email: Allow multiple addresses, cc and bcc
* filechooser: Allow saving multiple files
Changes in 1.5.2
================
* Add many more tests, using libportal
* gamemode: Add a pidfd-based api
* inhibit: Send a Response signal
* openuri: Add an OpenDirectory api
* Translation updates
Changes in 1.5.1
================
* Add a portal for setting desktop backgrounds
* Add tests
* Optionally use libportal (for tests)
Changes in 1.5.0
================
* Add a secret portal that is meant be used via
libsecret inside the sandbox. One backend for
this will live in gnome-keyring, others are
possible
* Fix a file descriptor leak
* Reduce log spam
* Translation updates
Changes in 1.4.2
================
* Build fixes
Changes in 1.4.0
================
* Add a background&autostart portal
* Add a gamemode portal
* Add a camera portal
* Require pipewire 0.2.6
* inhibit: Track session state
* documents: Fix a ref-counting bug
* screencast: Add cursor modes
* screencast: Memory leak fixes
* Translation updates
Changes in 1.2.0
================
* notification: Use icon validator from flatpak
* notification: Don't leave temp files around
* email: Validate options better
* inhibit: Validate options better
* file chooser: Add support for setting the current filter
* Translation updates
Changes in 1.1.1
================
* Validate icons in notifications
* Respect lockdown settings
* Write back permissions for notifications to indicate portal use
* Set st_nlink in the documents portal
* Add infrastructure for validating options
* Validate email addresses
* Translation updates
Changes in 1.1.0
================
This is the first release in the new unstable 1.1.x series, leading up to 1.2
which is expected around the end of the year.
* Add a location portal, this requires geoclue 2.5.2
* Add a settings portal, for desktop-wide settings like XSettings or kdeglobals
* Allow locking down printing, save-to-disk and opening uris
* Monitor application changes in the open uri portal
* Add more tests
xdg-desktop-portal 1.0.3
========================
* Fix an option name in the remote desktop portal
* document-portal: Validate permissions and report errors
* Fix life-cycle issues with inodes in the document portal
* Improve the test coverage of the documents portal
* Add a 'coverage' make target
xdg-desktop-portal 1.0.2
========================
* networkmonitor: Fix several issues
* inhibit: Add session state monitoring
xdg-desktop-portal 1.0.1
========================
* networkmonitor: Add GetStatus and CanReach methods
* Unset GTK_USE_PORTAL
* Add a portal for moving files to the trash
* Fix an inode leak in the document portal
xdg-desktop-portal 1.0
======================
* screenshot: Add a color picker api
* screencast: Bump the pipewire dependency to 0.2.1
* Improve --help output
* Small documentation improvements
xdg-desktop-portal 0.99
=======================
* The NetworkMonitor portal API has been changed to allow access control
* The Proxy and NetworkMonitor portals only respond to requests from
sandboxes with network access
* The flatpak portal is now documented
xdg-desktop-portal 0.11
=======================
* Add initial support for Snap packages.
* Fix memory leaks when ownership of bus names changes.
* Include docs for the session, remote desktop and screencast portals.
* document-portal: Be more flexible validating apps' IDs.
* document-portal: Be more strict when checking & granting file access.
* file-chooser: Fix crash with unitialized data in the save dialog.
* open-uri: Don't ever skip showing the dialog if a threshold is set.
* open-uri: Don't register http: URIs for sandboxed handlers.
* remote-desktop: Use the correct device type values.
* screencast: Fix synchronization issue with PipeWire.
* Translation updates
Chinese (Taiwan)
Spanish
xdg-desktop-portal 0.10
=======================
This version of xdg-desktop-portal contains the xdg-document-portal
that used to be shipped by flatpak. The code was moved to
xdg-desktop-portal as a first step towards being used by
snappy. Additionally having the two related portals delivered together
makes it easier to implement new features that rely on changes to
both portals.
The two versions of the document portal are fully compatible, but the
package files will conflict with older versions of flatpak, so
packagers will have to pick one version. Following this there will be
a new release of unstable flatpak with the document portal removed,
and a release of the stable branch (0.10) that has a configure
option to disable the document portal.
Additionally, this release contains a new screencast and remote
desktop portal based on PipeWire.
Major changes in this versions:
* Import permission store from flatpak
* Import document portal from flatpak
* Add remote desktop portal
* Add screencast portal
* Add "interactive" mode to screenshot portal
* file-chooser: Don't return document paths for paths the application has direct access to
* Handle newer version of bubblewrap
* New abstraction for application info, supporting multiple sandbox technologies
* Add basic test suite
xdg-desktop-portal 0.9
======================
* Install pkg-config files into datadir
* Avoid a race in the portal APIs
* Change the email portal to take fds
* Translation updates
Galicican
Indonesian
Turkish
xdg-desktop-portal 0.8
======================
* Update po files
xdg-desktop-portal 0.7
======================
* In the OpenURI portal, send the content-type and filename to the appchooser
* Stop handling file: uris in the OpenURI method of the OpenURI portal
* Add an OpenFile method for local files to the OpenURI portal
* Bug fixes in the notification portal
* Translation updates:
Czech
Italian
xdg-desktop-portal 0.6
======================
* A portal for sending email has been added
* The OpenURI portal has be made a bit more permissive.
It will now directly use the system default for "safe"
schemes such as http, and local directories.
* Translation updates:
French
xdg-desktop-portal 0.5
======================
* The notification portal now supports non-exported actions
* An Account portal for basic user information has been added
* All portal interface now have a version property. Currently,
all interfaces are at version 1
* The file chooser portal was forgetting to make files created
for SaveFile writable. This has been fixed
* Translation updates:
Czech
Polish
Swedish
xdg-desktop-portal 0.4
======================
* No longer rely on cgroups to find the app id
* Fix handling of mime type filters in the file chooser portal
* Translation updates:
Chinese
Czech
German
Serbian
xdg-desktop-portal 0.3
======================
* open-uri: Allow configuring threshold
* open-uri: Use fallback applications when needed
* Translation updates:
Brazilian Portuguese
Hungarian
Slovak
Ukrainian
xdg-desktop-portal 0.2
======================
* Add internationalization support
* Add Qt annotations
* New portal APIs:
- org.freedesktop.portal.Device
* Translation updates:
Polish
Initial release 0.1
===================
Included portal APIs:
* org.freedesktop.portal.FileChooser
* org.freedesktop.portal.Print
* org.freedesktop.portal.OpenURI
* org.freedesktop.portal.Screenshot
* org.freedesktop.portal.Inhibit
* org.freedesktop.portal.Notification
* org.freedesktop.portal.NetworkMonitor
* org.freedesktop.portal.ProxyResolver

View File

@@ -0,0 +1,19 @@
[![Portals](doc/website/assets/readme.png)](https://flatpak.github.io/xdg-desktop-portal/)
# [XDG Desktop Portal](https://flatpak.github.io/xdg-desktop-portal/)
A portal frontend service for [Flatpak](https://flatpak.org) and other
desktop containment frameworks.
xdg-desktop-portal works by exposing a series of D-Bus interfaces known as
_portals_ under a well-known name (`org.freedesktop.portal.Desktop`) and object
path (`/org/freedesktop/portal/desktop`).
The portal interfaces include APIs for file access, opening URIs, printing
and others.
Documentation about the Common Conventions, as well as documentation for
App Developers, Desktop Developers and Contributors can be found
[here](https://flatpak.github.io/xdg-desktop-portal/docs/).

View File

@@ -0,0 +1,60 @@
# Steps for doing a xdg-desktop-portal release
### Prepare the release
- Make sure the version in `meson.build` is correct
- Create a branch
```sh
$ git checkout -b release-${version}
```
- Update translations
```sh
$ ninja -C ${builddir} xdg-desktop-portal-update-po
$ git add po/
$ git commit -m "Update translations"
```
- Add your changelog to the `NEWS.md` file
```sh
$ git add NEWS.md
$ git commit -m ${version}
```
- Push your branch
```sh
$ git push -u ${fork} release-${version}
```
- Open a pull request
### Create a Signed Tag
**NOTE**: Only project maintainers can create a tag.
Make sure that:
- You're on the `main` branch, or a stable branch;
- The tip of the branch is a release commit (e.g. `1.19.4`)
- The version in `meson.build` is correct
Then create the tag:
```sh
$ git evtag sign ${version}
$ git push -u origin ${version}
```
### Post-Release
- Update version number in `meson.build` to the next release version
- Start a new section in `NEWS.md`
```md
Changes in ${nextVersion}
=================
Released: Not yet
...
```
### Post-Branching
After creating a stable branch:
- Update version number in `meson.build` to the next unstable release version
- Update `SECURITY.md`
- Update `.github/ISSUE_TEMPLATE/bug-report.yml`

View File

@@ -0,0 +1,16 @@
# Security policy for xdg-desktop-portal
See the [Flatpak security policy](https://github.com/flatpak/flatpak/blob/main/SECURITY.md)
## Supported Versions
In stable branches and released packages, this table is likely to be outdated;
please check
[the latest version](https://github.com/flatpak/xdg-desktop-portal/blob/main/SECURITY.md).
| Version | Supported | Status
| -------- | ------------------ | ------------------------------------------------------------- |
| 1.21.x | :white_check_mark: | Development branch, releases may include non-security changes |
| 1.20.x | :white_check_mark: | Stable branch, recommended for use in distributions |
| 1.18.x | :white_check_mark: | Old stable branch, still maintained |
| <= 1.16.x | :x: | Older branches, no longer supported |

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>

View File

@@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" height="16" width="16"><path d="M6.662 4.586a1.143 1.143 0 00-.838.334l-.531.531c-.458.458-.442 1.21.037 1.69l2.873 2.87-2.873 2.874c-.479.479-.495 1.231-.037 1.69l.531.53c.458.458 1.213.442 1.692-.037l4.068-4.07a1.22 1.22 0 00.348-.986 1.22 1.22 0 00-.348-.985l-4.068-4.07a1.249 1.249 0 00-.854-.371z" fill="#9a9996"/></svg>

After

Width:  |  Height:  |  Size: 365 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 37 KiB

Binary file not shown.

View File

@@ -0,0 +1,39 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
height="16"
width="16"
version="1.1"
id="svg4"
sodipodi:docname="toc_bullet.svg"
inkscape:version="1.1-beta1 (77e7b44db3, 2021-03-28)"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg">
<defs
id="defs8" />
<sodipodi:namedview
id="namedview6"
pagecolor="#505050"
bordercolor="#ffffff"
borderopacity="1"
objecttolerance="10.0"
gridtolerance="10.0"
guidetolerance="10.0"
inkscape:pageshadow="0"
inkscape:pageopacity="0"
inkscape:pagecheckerboard="1"
showgrid="true"
inkscape:current-layer="svg4">
<inkscape:grid
type="xygrid"
id="grid49" />
</sodipodi:namedview>
<path
id="path2"
sodipodi:type="inkscape:offset"
inkscape:radius="-0.81220347"
inkscape:original="M 6.6621094 4.5859375 A 1.143 1.143 0 0 0 5.8242188 4.9199219 L 5.2929688 5.4511719 C 4.8349687 5.9091719 4.8510781 6.660625 5.3300781 7.140625 L 8.203125 10.011719 L 5.3300781 12.884766 C 4.8510781 13.363766 4.8349688 14.115219 5.2929688 14.574219 L 5.8242188 15.105469 C 6.2822188 15.563469 7.036625 15.547359 7.515625 15.068359 L 11.583984 10.998047 A 1.22 1.22 0 0 0 11.931641 10.011719 A 1.22 1.22 0 0 0 11.583984 9.0273438 L 7.515625 4.9570312 A 1.249 1.249 0 0 0 6.6621094 4.5859375 z "
d="m 6.6386719,5.3984375 c -0.088798,-0.00181 -0.1773948,0.032925 -0.2402344,0.095703 l -0.53125,0.53125 C 5.7300188,6.1625593 5.7182537,6.3799747 5.9042969,6.5664062 L 8.7773438,9.4375 a 0.81228469,0.81228469 0 0 1 0,1.148438 L 5.9042969,13.458984 C 5.719186,13.644095 5.7289844,13.861495 5.8671875,14 l 0.53125,0.53125 c 0.135934,0.135934 0.3590378,0.146822 0.5429687,-0.03711 l 4.0664058,-4.06836 0.002,-0.002 c 0.08366,-0.0854 0.125702,-0.209206 0.113281,-0.328125 a 0.81228469,0.81228469 0 0 1 0,-0.1679686 c 0.01222,-0.1187076 -0.0298,-0.2409206 -0.113281,-0.3261719 l -0.002,-0.00195 L 6.9414062,5.53125 A 0.81228469,0.81228469 0 0 1 6.9375,5.5273438 C 6.8598316,5.4486568 6.7511214,5.4020564 6.640625,5.3984375 Z"
style="fill:#deddda" />
</svg>

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.7 KiB

View File

@@ -0,0 +1,452 @@
/* XDG CSS theme for Sphinx + Furo
https://www.sphinx-doc.org
https://pypi.org/project/furo/
*/
/* FONTS */
@font-face {
font-family: "Inter var";
font-weight: 100 900;
font-display: swap;
font-style: normal;
font-named-instance: "Regular";
src: url("inter.woff2") format("woff2");
}
:root {
--rounded-corner: 12px;
--blue1: rgb(153,193,241);
--blue2: rgb(98,160,234);
--blue3: rgb(53,132,228);
--blue4: rgb(28,113,216);
--blue5: rgb(26,95,180);
--green1: rgb(143,240,164);
--green2: rgb(87,227,137);
--green3: rgb(51,209,122);
--green4: rgb(46,194,126);
--green5: rgb(38,162,105);
--yellow1: rgb(249,240,107);
--yellow2: rgb(248,228,92);
--yellow3: rgb(246,211,45);
--yellow4: rgb(245,194,17);
--yellow5: rgb(229,165,10);
--orange1: rgb(255,190,111);
--orange2: rgb(255,163,72);
--orange3: rgb(255,120,0);
--orange4: rgb(230,97,0);
--orange5: rgb(198,70,0);
--red1: rgb(246,97,81);
--red2: rgb(237,51,59);
--red3: rgb(224,27,36);
--red4: rgb(192,28,40);
--red5: rgb(165,29,45);
--purple1: rgb(220,138,221);
--purple2: rgb(192,97,203);
--purple3: rgb(145,65,172);
--purple4: rgb(129,61,156);
--purple5: rgb(97,53,131);
--brown1: rgb(205,171,143);
--brown2: rgb(181,131,90);
--brown3: rgb(152,106,68);
--brown4: rgb(134,94,60);
--brown5: rgb(99,69,44);
--light1: rgb(255,255,255);
--light2: rgb(246,245,244);
--light3: rgb(222,221,218);
--light4: rgb(192,191,188);
--light5: rgb(154,153,150);
--dark1: rgb(119,118,123);
--dark2: rgb(94,92,100);
--dark3: rgb(61,56,70);
--dark4: rgb(36,31,49);
--dark5: rgb(0,0,0);
--text: #f6f5f4;
--tocbg: var(--light2);
--tocfg: var(--dark3);
--borders: var(--light3);
--link: var(--blue5);
--link-underline: var(--blue1);
}
::selection {
background-color: rgba(153,193,241,0.5);
}
@media (prefers-color-scheme: dark) {
:root {
--tocbg: var(--dark5);
--tocfg: var(--light5);
--borders: var(--dark3);
--link: var(--blue1);
--link-underline: var(--blue5);
}
::selection {
background-color: rgba(26,95,180,0.4);
}
}
* {
-moz-box-sizing: border-box;
-webkit-box-sizing: border-box;
box-sizing: border-box;
}
html, body {
margin: 0;
padding: 0;
font-size: 16px;
font-family: "Inter var", sans-serif;
font-weight: 400;
line-height: 1.6;
}
@media (min-width: 700px) {
html, body {
font-size: 18px;
}
}
a {
color: var(--link);
text-decoration-color: var(--link-underline);
}
p strong {
font-weight: 600;
opacity: 0.9;
}
h1 {
font-weight: 500;
font-size: 2rem;
margin-top: '0';
margin-bottom: 1.5rem;
font-family: "Inter var", sans-serif;
}
h2 {
font-weight: 800;
font-size: 1.7rem;
margin-top: 2.5rem;
margin-bottom: 1.2rem;
font-family: "Inter var", sans-serif;
}
h3 {
font-weight: 800;
font-size: 1.3rem;
margin-top: 2.2rem;
margin-bottom: 1rem;
font-family: "Inter var", sans-serif;
}
h4 {
font-weight: 700;
font-size: 1.1rem;
margin-top: 1rem;
margin-bottom: 1rem;
font-family: "Inter var", sans-serif;
}
h5 {
font-weight: 700;
font-size: 1rem;
margin-top: 1rem;
margin-bottom: 1rem;
font-family: "Inter var", sans-serif;
}
h2,h3,h4,h5 { opacity: 0.7; }
ul.simple {
margin: 1rem 1rem 3rem;
}
ul.simple li {
list-style-image: url(bullet.svg);
margin-inline-end: 1ch;
margin-bottom: 1rem;
}
ul.simple li:hover::marker { }
.related-pages {
font-size: 10pt;
font-weight: 800;
display: flex;
flex-direction: row-reverse;
align-items: stretch;
justify-content: space-between;
}
.related-pages a .title {
color: var(--dark1);
}
.related-pages a svg {
width: 32px; height: 32px;
}
.prev-page {
border-radius: 8px;
padding: 8px 24px 8px 8px;
}
.next-page {
border-radius: 8px;
padding: 8px 8px 8px 24px;
}
.related-pages a.prev-page,
.related-pages a.next-page {
float: none;
max-width: inherit; /* cancel furo's 50% */
}
.related-pages a.prev-page:hover, .related-pages a.next-page:hover {
background-color: var(--tocbg);
}
@media (min-width: 700px) {
.related-pages {
font-size: 14pt;
}
.prev-page {
padding: 16px 48px 16px 16px;
border-radius: 24px;
}
.next-page {
padding: 16px 16px 16px 48px;
border-radius: 24px;
}
}
.related-pages a.prev-page:only-child,
.related-pages a.next-page:only-child,
.page-info {
/* align-self: flex-end; i wish */
width: 100%; /* big buttons instead */
}
.toctree-wrapper ul {
margin: 0; padding: 0;
}
.toctree-wrapper li {
list-style: none;
margin: 0 0 1rem 0;
}
.toctree-wrapper li.toctree-l1 {
font-size: 14pt;
font-weight: 600;
}
.toctree-wrapper li.toctree-l1 > a { color: var(--tocfg); }
.toctree-wrapper li.toctree-l2 {
list-style-image: url(toc_bullet.svg);
margin: 0;
font-size: 12pt;
font-weight: 400;
padding: 0.2rem;
}
.toctree-wrapper > ul ul {
margin-top: 1rem;
display: grid;
grid-template-columns: repeat(auto-fill, minmax(12rem, 1fr));
gap: .2rem;
}
.toctree-wrapper > ul ul a {
background-color: transparent;
}
/* tiled TOC with images */
ul.tiled-toc {
display: grid;
gap: 1rem;
grid-auto-flow: row;
margin: 1rem 0; padding: 0;
text-align: center;
margin-top: 2rem;
grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
}
ul.tiled-toc li {
display: block;
list-style: none;
}
ul.tiled-toc li img {
display: block;
width: 100%;
image-rendering: crisp-edges;
image-rendering: pixelated;
}
ul.tiled-toc li img::after {
content: "";
}
ul.tiled-toc a {
color: black;
text-decoration: none;
font-weight: 600;
}
@media (prefers-color-scheme: dark) {
ul.tiled-toc a { color: white; }
}
table.docutils {
font-size: 90%;
box-shadow: none;
border-collapse: collapse;
border-spacing: 0;
border-radius: 0;
text-align: left;
border-width: 0;
box-sizing: border-box;
}
/* reset crazy */
table.docutils th, table.docutils tr, table.docutils td {
background-color: transparent;
text-align: left;
}
table.docutils td, table.docutils th {
border-width: 0;
padding: .25rem;
}
table.docutils tr {
border-width: 0;
border-bottom: 1px solid var(--borders);
}
table.docutils thead tr {
font-weight: 800;
border-width: 0;
box-sizing: inherit;
border-bottom: 2px solid var(--borders);
}
.hig-palette-table.align-default {
display: table;
width: 100%;
}
img.hig-palette-swatch {
display: block;
width: 42px;
aspect-ratio: 1 / 1;
border-radius: 50%;
}
.hig-palette-table colgroup { display: none; }
.hig-palette-table .stub,
.hig-palette-table .head.stub {
width: 50px;
}
video {
width: 100%;
height: auto;
}
footer {
margin-bottom: 3rem;
}
.sidebar-drawer {
}
.sidebar-brand-text {
font-family: Cantarell, -apple-system, BlinkMacSystemFont, "Helvetica", sans-serif;
font-size: 14pt;
font-weight: 800;
}
.sidebar-search-container,
.sidebar-search {
border-radius: 99999px;
border: none;
}
.sidebar-search-container {
margin: 0 var(--sidebar-item-spacing-horizontal);
transition: background-color 0.2s linear;
background-color: rgba(0,0,0,0.06);
}
.sidebar-search-container:hover {
background-color: rgba(0,0,0,0.09);
}
.sidebar-search-container:focus-within {
background-color: rgba(0,0,0,0.12);
}
@media (prefers-color-scheme: dark) {
.sidebar-search-container {
background-color: rgba(255,255,255,0.06);
}
.sidebar-search-container:hover {
background-color: rgba(255,255,255,0.09);
}
.sidebar-search-container:focus-within {
background-color: rgba(255,255,255,0.12);
}
}
.sidebar-tree .toctree-l1,
.sidebar-tree .toctree-l2 {
margin: 1px 12px;
border-radius: 6px;
color: var(--link);
}
.sidebar-tree .toctree-l1 > .reference {
color: var(--link);
}
.sidebar-tree .toctree-l2 {
margin: 1px 0;
font-size: 90%;
text-wrap: balance;
overflow-wrap: break-word;
hyphens: manual;
}
.sidebar-tree li > ul {
margin-left: 0;
}
.sidebar-tree li > ul .reference {
padding-left: calc(1.5*var(--sidebar-item-spacing-horizontal));
}
.sidebar-tree label[for^="toctree-checkbox"] {
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
}
.sidebar-tree li.toctree-l3 a {
margin: 1px 0;
padding: var(--sidebar-item-spacing-vertical) var(--sidebar-item-spacing-horizontal)
var(--sidebar-item-spacing-vertical) calc(2*var(--sidebar-item-spacing-horizontal)) ; /* extra indentation */
}
.sidebar-tree .reference {
background: rgba(0,0,0,0);
transition: background 0.2s linear;
border-radius: 6px;
padding: var(--sidebar-item-spacing-vertical) calc(0.75*var(--sidebar-item-spacing-horizontal));
}
.sidebar-tree .reference:hover,
.sidebar-tree .current > .reference:hover {
/* background: var(--color-background-hover); */
background: rgba(0,0,0,0.03);
}
.sidebar-tree .reference.current {
background: rgba(0,0,0,0.06);
}
.sidebar-tree .reference.current:hover {
background: rgba(0,0,0,0.09);
}
.sidebar-tree .current-page > .reference {
font-weight: 600;
}
.theme-toggle {
display: none; /* just go with auto */
}

View File

@@ -0,0 +1,69 @@
API Reference
=============
Portal interfaces are available to sandboxed applications with the default
filtered session bus access of Flatpak.
Desktop portals appear under the bus name ``org.freedesktop.portal.Desktop``
and the object path ``/org/freedesktop/portal/desktop`` on the session bus,
unless specified otherwise.
Apps running on the host system have access to a special interface for
registering themselves with XDG Desktop Portal. Registering a host app with
XDG Desktop Portal overwrites the automatic detection based on the
`XDG cgroup pathname standardization for applications
<https://systemd.io/DESKTOP_ENVIRONMENTS/#xdg-standardization-for-applications>`_.
This might improve the user experience when the host app was launched in a way
that doesn't follow the standard. See
:doc:`org.freedesktop.host.portal.Registry <doc-org.freedesktop.host.portal.Registry>`
Disclaimer: The host app registry is expected to eventually be deprecated and
may be removed. Applications should gracefully handle interface or method no
longer being available to be forward compatible. App launchers, or apps
themselves, should place the app in a cgroup named according to specific naming
conventions. When the host app registry becomes deprecated, the details of the
replacement will be documented in :doc:`org.freedesktop.host.portal.Registry
<doc-org.freedesktop.host.portal.Registry>`.
.. toctree::
:hidden:
doc-org.freedesktop.host.portal.Registry.rst
All apps have access to the portals below:
.. toctree::
:maxdepth: 1
doc-org.freedesktop.portal.Account.rst
doc-org.freedesktop.portal.Background.rst
doc-org.freedesktop.portal.Camera.rst
doc-org.freedesktop.portal.Clipboard.rst
doc-org.freedesktop.portal.Documents.rst
doc-org.freedesktop.portal.DynamicLauncher.rst
doc-org.freedesktop.portal.Email.rst
doc-org.freedesktop.portal.FileChooser.rst
doc-org.freedesktop.portal.FileTransfer.rst
doc-org.freedesktop.portal.GameMode.rst
doc-org.freedesktop.portal.GlobalShortcuts.rst
doc-org.freedesktop.portal.Inhibit.rst
doc-org.freedesktop.portal.InputCapture.rst
doc-org.freedesktop.portal.Location.rst
doc-org.freedesktop.portal.MemoryMonitor.rst
doc-org.freedesktop.portal.NetworkMonitor.rst
doc-org.freedesktop.portal.Notification.rst
doc-org.freedesktop.portal.OpenURI.rst
doc-org.freedesktop.portal.PowerProfileMonitor.rst
doc-org.freedesktop.portal.Print.rst
doc-org.freedesktop.portal.ProxyResolver.rst
doc-org.freedesktop.portal.Realtime.rst
doc-org.freedesktop.portal.RemoteDesktop.rst
doc-org.freedesktop.portal.Request.rst
doc-org.freedesktop.portal.ScreenCast.rst
doc-org.freedesktop.portal.Screenshot.rst
doc-org.freedesktop.portal.Secret.rst
doc-org.freedesktop.portal.Session.rst
doc-org.freedesktop.portal.Settings.rst
doc-org.freedesktop.portal.Trash.rst
doc-org.freedesktop.portal.Usb.rst
doc-org.freedesktop.portal.Wallpaper.rst

View File

@@ -0,0 +1,10 @@
Architecture
============
The pages under this section document the internal architecture of various parts
of XDG Desktop Portal.
.. toctree::
:maxdepth: 1
documents-and-fuse

View File

@@ -0,0 +1,89 @@
Building & Running
==================
Normally, XDG Desktop Portal runs as a user session service, initialized on
demand through D-Bus activation. It usually starts with the session though,
as many desktop environments try to talk to XDG Desktop Portal on startup.
XDG Desktop Portal initializes specific backends through D-Bus activation
as well.
Building
--------
To build XDG Desktop Portal, first make sure you have the build dependencies
installed through your distribution's package manager. With them installed,
run:
.. code-block:: shell
meson setup . _build
meson compile -C _build
Some distributions install portal configuration files in ``/usr``, while Meson
defaults to the prefix ``/usr/local``. If the portal configuration files in your
distribution are in ``/usr/share/xdg-desktop-portal/portals``, re-configure
Meson using ``meson setup --reconfigure . _build --prefix /usr`` and compile
again.
Running
-------
XDG Desktop Portal needs to own the D-Bus name and replace the user session
service that might already be running. To do so, run:
.. code-block:: shell
_build/src/xdg-desktop-portal --replace
If you are developing inside a ``toolbox`` container, you must use
``flatpak-spawn`` from ``flatpak-xdg-utils`` to run the service:
.. code-block:: shell
flatpak-spawn --host _build/src/xdg-desktop-portal --replace
You may need to restart backends after replacing XDG Desktop Portal (please
replace ``[name]`` with the backend name, e.g. ``gnome`` or ``kde`` or ``wlr``):
.. code-block:: shell
systemctl --user restart xdg-desktop-portal-[name].service
Testing
-------
To execute the test suite present in XDG Desktop Portal, run:
.. code-block:: shell
meson test -C _build
Enable the pre-commit hooks to catch issues early:
.. code-block:: shell
git config --local core.hooksPath .githooks/
When a branch is pushed to github, CI will also run tests in a few more
configurations.
Documentation
-------------
These instructions are for Fedora, where you will need these packages:
.. code-block::
sudo dnf install json-glib-devel fuse3-devel gdk-pixbuf2-devel pipewire-devel python3-sphinx flatpak-devel python3-furo python-sphinxext-opengraph python-sphinx-copybutton
Then you can build the website with:
.. code-block:: shell
meson setup . _build -Ddocumentation=enabled
ninja -C _build
Then just load the build website into a browser of your choice from
``_build/doc/html/index.html``

View File

@@ -0,0 +1,58 @@
Common Conventions
==================
XDG Desktop Portal uses D-Bus in a slightly uncommon way, due to the potentially
long-running nature of some of its requests. These different usage patterns are
documented in the pages below:
.. toctree::
:hidden:
terminology
requests
sessions
window-identifiers
icons
.. cssclass:: tiled-toc
* .. image:: _static/img/tiles/Terminology-l.png
:target: terminology.html
:class: only-light
.. image:: _static/img/tiles/Terminology-d.png
:target: terminology.html
:class: only-dark
:doc:`Terminology </terminology>`
* .. image:: _static/img/tiles/Request-l.png
:target: requests.html
:class: only-light
.. image:: _static/img/tiles/Request-d.png
:target: requests.html
:class: only-dark
:doc:`Requests </requests>`
* .. image:: _static/img/tiles/Sessions-l.png
:target: sessions.html
:class: only-light
.. image:: _static/img/tiles/Sessions-d.png
:target: sessions.html
:class: only-dark
:doc:`Sessions </sessions>`
* .. image:: _static/img/tiles/Window-ids-l.png
:target: window-identifiers.html
:class: only-light
.. image:: _static/img/tiles/Window-ids-d.png
:target: window-identifiers.html
:class: only-dark
:doc:`Window Identifiers </window-identifiers>`
* .. image:: _static/img/tiles/Icons-l.png
:target: icons.html
:class: only-light
.. image:: _static/img/tiles/Icons-d.png
:target: icons.html
:class: only-dark
:doc:`Icons </icons>`

View File

@@ -0,0 +1,39 @@
# Configuration file for the Sphinx documentation builder.
#
# For the full list of built-in configuration values, see the documentation:
# https://www.sphinx-doc.org/en/master/usage/configuration.html
# -- Project information -----------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information
project = "XDG Desktop Portal"
copyright = "2023-2025, XDG Desktop Portal authors"
author = "XDG Desktop Portal authors"
# -- General configuration ---------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration
html_favicon = "favicon.ico"
extensions = [
"sphinxext.opengraph",
"sphinx_copybutton",
]
templates_path = ["_templates"]
exclude_patterns = ["_build", "Thumbs.db", ".DS_Store"]
# -- Options for HTML output -------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output
html_theme = "furo"
# add custom files that are stored in _static
html_css_files = ["xdg.css"]
html_static_path = ["_static"]
# -- Options for OpenGraph ---------------------------------------------------
ogp_site_url = "https://flatpak.github.io/xdg-desktop-portal/docs/"
ogp_image = "_static/card.png"
html_permalinks_icon = "🔗"

View File

@@ -0,0 +1,38 @@
Configuration File
==================
Portal backends are selected and can be configured by using one or more
configuration files.
Desktop systems may have multiple desktop environments and portal backends
installed in parallel, and automatically picking portal backends in this
situation has proven to be a challenge.
For this reason, XDG Desktop Portal uses a config-based matching system.
Usually, the configuration files are provided by the desktop environments
themselves, so that e.g. the GNOME-specific portal backends are picked in
GNOME sessions. No end user intervention is necessary in this case.
Here's an example of a config file distributed by GNOME:
.. code-block::
[preferred]
default=gnome;gtk;
org.freedesktop.impl.portal.Access=gnome-shell;gtk;
org.freedesktop.impl.portal.Secret=gnome-keyring;
This file specifies that, by default, the ``gnome`` and ``gtk`` portal backends
must be used. However, specifically for :doc:`org.freedesktop.impl.portal.Access
<doc-org.freedesktop.impl.portal.Access>`, the ``gnome-shell`` and ``gtk``
portal backends must be used; and for :doc:`org.freedesktop.impl.portal.Secret
<doc-org.freedesktop.impl.portal.Secret>`, the ``gnome-keyring`` portal
backend must be used.
You can read more about the config file syntax, install locations, and more, in
the portals.conf man page:
.. toctree::
:maxdepth: 1
portals.conf

View File

@@ -0,0 +1,19 @@
Convenience Libraries
=====================
Using the XDG Portals D-Bus APIs directly is often difficult and error-prone.
Fortunately, there are convenience libraries available that significantly ease
the development of apps:
* `ASHPD <https://bilelmoussaoui.github.io/ashpd/ashpd/>`_: a **Rust** crate that
provides the APIs to interact with portals in idiomatic Rust. It has support for
GTK4, direct X11 windows, and direct Wayland surfaces.
* `libportal <https://github.com/flatpak/libportal/>`_: small **C** library that
provides a GObject API to interact with portals. It provides language bindings
to a variety of other languages, such as **Python**, **JavaScript**, **Vala**,
and more. It has support for GTK3, GTK4, Qt 5, and Qt 6.
* `portal <https://github.com/rymdport/portal>`_: a **Go** module that provides
native APIs for interacting with portals from idiomatic Go code.
It aims to be both toolkit agnostic and easy to use.
* `xdg_desktop_portal <https://pub.dev/packages/xdg_desktop_portal>`_: a native
**Dart** package to interact with portals in **Dart** and **Flutter**.

View File

@@ -0,0 +1,14 @@
#!/usr/bin/env python3
import os
import sys
import shutil
subdir = os.environ["MESON_SUBDIR"]
input_path = os.path.join(os.environ["MESON_SOURCE_ROOT"], subdir, sys.argv[1])
output_path = os.path.join(os.environ["MESON_BUILD_ROOT"], subdir, sys.argv[2])
os.makedirs(os.path.dirname(output_path), exist_ok=True)
shutil.copyfile(input_path, output_path)

View File

@@ -0,0 +1,14 @@
#!/usr/bin/env python3
import os
import sys
import shutil
subdir = os.environ["MESON_SUBDIR"]
input_path = os.path.join(os.environ["MESON_SOURCE_ROOT"], subdir, sys.argv[1])
output_path = os.path.join(os.environ["MESON_BUILD_ROOT"], subdir, sys.argv[2])
os.makedirs(os.path.dirname(output_path), exist_ok=True)
shutil.copytree(input_path, output_path)

View File

@@ -0,0 +1,87 @@
Documents & FUSE
================
The Document portal exposes files (filesystem entries) to applications through
FUSE.
Files are scoped in a domain operations are restricted with a domain. The FUSE
filesystem will proxy the file access by referencing the inodes and presenting
the files in a virtual filesystem.
Much like with xdg-desktop-portal, to run the development version of
the Document portal, do:
.. code-block:: shell
_build/document-portal/xdg-document-portal --replace
FUSE
----
The Document portal is a separate executable, ``xdg-document-portal``, and it
implements the virtual filesystem using FUSE. The filesystem is mounted in the
user runtime ``doc`` directory. It usually is ``/run/user/[UID]/doc``, where
``[UID]`` is the user id on the system.
Inside the Flatpak sandbox, files for which the app has permission to access are
available at ``/run/flatpak/doc``.
Like any FUSE filesystem, it exposes inodes through the FUSE API.
Domains
"""""""
Domains specify the scope of an inode and organize the documents into
a hierarchy. It helps compartimentalize which documents the
applications have access to.
- ``XDP_DOMAIN_ROOT``: root domain.
- ``XDP_DOMAIN_BY_APP``: used to find app domains by app id.
- ``XDP_DOMAIN_APP``: contains the documents allowed for the app.
- ``XDP_DOMAIN_DOCUMENT``: a physical file or directory is a document
in the ``XDP_DOMAIN_DOCUMENT``.
The first three are considered to be virtual, which mean they are not
backed by a physical inode.
The Document portal defines a few globals to hold the inodes:
- ``root_inode`` is an inode that holds the root domain.
- ``by_app_inode`` is the inode for the by app domain.
- ``physical_inodes`` is a hash table for the physical inodes, the key
is ``devino``.
- ``all_inodes`` is a hash table for all the inodes, the key is the
inode number.
The domains are used to create the filesystem hierarchy presented by
the document portal through the FUSE filesystem. It looks like this:
.. code-block::
/
├─ by-app
│ ├─ org.foo.Bar
│ │ ├─ doc1
│ │ └─ doc3
│ └─ org.bar.Foo
│ ├─ doc2
│ └─ doc3
├─ doc1
├─ doc2
└─ doc3
``/`` is the root domain. ``by-app`` is the ``XDP_DOMAIN_BY_APP`` domain.
``org.foo.Bar`` and ``org.bar.Foo`` are application ids.
``doc1``, ``doc2``, ``doc3`` are unique identifiers for the documents. As
mentioned, they can be shared across apps.
Document identifiers are unique. They are created using the inode number of the
physical file or directory.
Custom xattrs
-------------
Files and folders mounted through the Document portal have a custom attribute
with the host system path: ``user.document-portal.host-path``. This attribute
is read-only and any attempt to modify it will result in an error.

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

View File

@@ -0,0 +1,63 @@
#!/usr/bin/env python3
# This script massages the reStructuredText files generated by
# gdbus-codegen into something that's slightly more suitable for
# the online documentation of XDG Desktop Portal. It's not a
# general purpose script.
import os
import sys
output_dir = sys.argv[1]
filename_prefix = sys.argv[2]
inputs = sys.argv[3:]
def adjust_title(lines):
title = lines[3].strip()
if title.startswith("org.freedesktop.portal."):
adjusted_title = title.replace("org.freedesktop.portal.", "")
elif title.startswith("org.freedesktop.impl.portal"):
adjusted_title = title.replace("org.freedesktop.impl.portal.", "")
elif title.startswith("org.freedesktop.host.portal"):
adjusted_title = title.replace("org.freedesktop.host.portal.", "")
elif title.startswith("org.freedesktop.background.Monitor"):
adjusted_title = title.replace(
"org.freedesktop.background.Monitor", "Background Apps Monitor"
)
else:
adjusted_title = title
# CamelCase → Camel Case
if adjusted_title not in ["OpenURI", "ScreenCast"]:
adjusted_title = "".join(
map(lambda x: x if x.islower() else f" {x}", adjusted_title)
)
lines[3] = f"{adjusted_title}\n"
# Temporary fix for '.. {title}:' strings in the generated files. Should be
# removed after GLib 2.78.4 hits the CI images.
#
# See: https://gitlab.gnome.org/GNOME/glib/-/merge_requests/3751
def fix_title_template_string(lines):
for index, line in enumerate(lines):
if line.strip() == ".. _{title}:":
next_title = lines[index + 2].strip()
lines[index] = f".. _{next_title}:\n"
for file in inputs:
basename = os.path.basename(file)
fullpath = os.path.join(output_dir, f"{filename_prefix}-{basename}")
with open(fullpath) as f:
lines = f.readlines()
adjust_title(lines)
fix_title_template_string(lines)
with open(fullpath, "w") as f:
f.writelines(lines)

View File

@@ -0,0 +1,50 @@
For App Developers
==================
XDG Desktop Portal is a session service that provides D-Bus interfaces for apps
to interact with the desktop.
Portal interfaces can be used by sandboxed and unsandboxed apps alike, but
sandboxed apps benefit the most since they don't need special permissions to use
portal APIs. XDG Desktop Portal safeguards many resources and features with a
user-controlled permission system.
The primary goal of portals is to expose common functionality and integration
with the desktop without requiring apps to write desktop-specific code, or
loosen their sandbox restrictions.
.. toctree::
:hidden:
reasons-to-use-portals
convenience-libraries
api-reference
.. cssclass:: tiled-toc
* .. image:: _static/img/tiles/Reasons-l.png
:target: reasons-to-use-portals.html
:class: only-light
.. image:: _static/img/tiles/Reasons-d.png
:target: reasons-to-use-portals.html
:class: only-dark
:doc:`Reasons to Use Portals </reasons-to-use-portals>`
* .. image:: _static/img/tiles/Libraries-l.png
:target: convenience-libraries.html
:class: only-light
.. image:: _static/img/tiles/Libraries-d.png
:target: convenience-libraries.html
:class: only-dark
:doc:`Convenience Libraries </convenience-libraries>`
* .. image:: _static/img/tiles/APIs-l.png
:target: api-reference.html
:class: only-light
.. image:: _static/img/tiles/APIs-d.png
:target: api-reference.html
:class: only-dark
:doc:`API Reference </api-reference>`

View File

@@ -0,0 +1,48 @@
For Contributors
================
Thanks for your interest in contributing to XDG Desktop Portal!
XDG Desktop Portal is a D-Bus oriented, security-sensitive service,
as it mediates the interactions between sandboxed apps and the host
system.
In the sections below you will find information about how to start
contributing to XDG Desktop Portal, the expected coding and code
submission practices, as well as internal documentation about
more complex parts of XDG Desktop Portal.
.. toctree::
:hidden:
building-and-running
pull-requests
architecture
.. cssclass:: tiled-toc
* .. image:: _static/img/tiles/Building-running-l.png
:target: building-and-running.html
:class: only-light
.. image:: _static/img/tiles/Building-running-d.png
:target: building-and-running.html
:class: only-dark
:doc:`Building and Running </building-and-running>`
* .. image:: _static/img/tiles/Pull-request-l.png
:target: pull-requests.html
:class: only-light
.. image:: _static/img/tiles/Pull-request-d.png
:target: pull-requests.html
:class: only-dark
:doc:`Pull Requests </pull-requests>`
* .. image:: _static/img/tiles/Architecture-l.png
:target: architecture.html
:class: only-light
.. image:: _static/img/tiles/Architecture-d.png
:target: architecture.html
:class: only-dark
:doc:`Architecture </architecture>`

Some files were not shown because too many files have changed in this diff Show More