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
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:
320
Telegram/ThirdParty/xdg-desktop-portal/data/org.freedesktop.portal.Print.xml
vendored
Normal file
320
Telegram/ThirdParty/xdg-desktop-portal/data/org.freedesktop.portal.Print.xml
vendored
Normal 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>
|
||||
Reference in New Issue
Block a user