Debian Codegraph @

data/org.freedesktop.impl.portal.Print.xml

raw
1 <?xml version="1.0"?>
2 <!--
3 Copyright (C) 2016 Red Hat, Inc.
4
5 SPDX-License-Identifier: LGPL-2.1-or-later
6
7 This library is free software; you can redistribute it and/or
8 modify it under the terms of the GNU Lesser General Public
9 License as published by the Free Software Foundation; either
10 version 2.1 of the License, or (at your option) any later version.
11
12 This library is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 Lesser General Public License for more details.
16
17 You should have received a copy of the GNU Lesser General Public
18 License along with this library. If not, see <http://www.gnu.org/licenses/>.
19
20 Author: Matthias Clasen <[email protected]>
21 -->
22 <node name="/" xmlns:doc="http://www.freedesktop.org/dbus/1.0/doc.dtd">
23 <!--
24 org.freedesktop.impl.portal.Print:
25 @short_description: Print portal backend interface
26
27 The Print portal allows sandboxed applications to print.
28 -->
29 <interface name="org.freedesktop.impl.portal.Print">
30 <!--
31 PreparePrint:
32 @handle: Object path for the :ref:`org.freedesktop.impl.portal.Request` object representing this call
33 @app_id: App id of the application
34 @parent_window: Identifier for the application window, see :doc:`window-identifiers`
35 @title: Title for the print dialog
36 @settings: Serialized print settings
37 @page_setup: Serialized page setup
38 @options: Vardict with optional further information
39 @response: Numeric response
40 @results: Vardict with the results of the call
41
42 Presents a print dialog to the user and returns print settings
43 and page setup.
44
45 Supported keys in the @options vardict:
46
47 * ``modal`` (``b``)
48
49 Whether to make the dialog modal. Defaults to yes.
50
51 * ``accept_label`` (``s``)
52
53 Label for the accept button. Mnemonic underlines are allowed.
54
55 The following results get returned via the @results vardict:
56
57 * ``settings`` (``a{sv}``)
58
59 Print settings as set up by the user in the print dialog.
60
61 * ``page-setup`` (``a{sv}``)
62
63 Page setup as set up by the user in the print dialog.
64
65 * ``token`` (``u``)
66
67 Token that can be passed to a subsequent org.freedesktop.impl.portal.Print.Print() call to
68 bypass the print dialog.
69
70 * ``supported_output_file_formats`` (``as``)
71
72 File formats supported by the app to use for print-to-file. If not set, all formats
73 are assumed to be supported. The following values are allowed: "pdf", "ps", and "svg".
74
75 * ``has_current_page`` (``b``)
76
77 Whether it makes sense to return "current" for the ``print-pages`` setting.
78
79 * ``has_selected_pages`` (``b``)
80
81 Whether it makes sense to return "selection" for the ``print-pages`` setting.
82
83 The :ref:`org.freedesktop.portal.Print.PreparePrint` documentation has details about
84 the supported keys in settings and page-setup.
85 -->
86 <method name="PreparePrint">
87 <arg type="o" name="handle" direction="in"/>
88 <arg type="s" name="app_id" direction="in"/>
89 <arg type="s" name="parent_window" direction="in"/>
90 <arg type="s" name="title" direction="in"/>
91 <annotation name="org.qtproject.QtDBus.QtTypeName.In4" value="QVariantMap"/>
92 <arg type="a{sv}" name="settings" direction="in"/>
93 <annotation name="org.qtproject.QtDBus.QtTypeName.In5" value="QVariantMap"/>
94 <arg type="a{sv}" name="page_setup" direction="in"/>
95 <annotation name="org.qtproject.QtDBus.QtTypeName.In6" value="QVariantMap"/>
96 <arg type="a{sv}" name="options" direction="in"/>
97 <arg type="u" name="response" direction="out"/>
98 <annotation name="org.qtproject.QtDBus.QtTypeName.Out1" value="QVariantMap"/>
99 <arg type="a{sv}" name="results" direction="out"/>
100 </method>
101
102 <!--
103 Print:
104 @handle: Object path for the :ref:`org.freedesktop.impl.portal.Request` object representing this call
105 @app_id: App id of the application
106 @parent_window: Identifier for the application window, see :doc:`window-identifiers`
107 @title: Title for the print dialog
108 @fd: File descriptor from which to read the content to print
109 @options: Vardict with optional further information
110 @response: Numeric response
111 @results: Vardict with the results of the call
112
113 Prints a file.
114
115 The file is given in the form of a file descriptor open for reading.
116
117 If a valid token is present in the @options, then this call will print
118 with the settings from the Print call that the token refers to. If
119 no token is present, then a print dialog will be presented to the user.
120
121 Note that it is up to the portal implementation to determine how long
122 it considers tokens valid.
123
124 Supported keys in the @options vardict:
125
126 * ``modal`` (``b``)
127
128 Whether to make the dialog modal. Defaults to yes.
129
130 * ``token`` (``u``)
131
132 Token that was returned by a previous org.freedesktop.impl.portal.Print.PreparePrint() call.
133
134 * ``supported_output_file_formats`` (``as``)
135
136 File formats supported by the app to use for print-to-file. If not set, all formats
137 are assumed to be supported. The following values are allowed: "pdf", "ps", and "svg".
138 -->
139 <method name="Print">
140 <annotation name="org.gtk.GDBus.C.UnixFD" value="true"/>
141 <arg type="o" name="handle" direction="in"/>
142 <arg type="s" name="app_id" direction="in"/>
143 <arg type="s" name="parent_window" direction="in"/>
144 <arg type="s" name="title" direction="in"/>
145 <arg type="h" name="fd" direction="in"/>
146 <annotation name="org.qtproject.QtDBus.QtTypeName.In5" value="QVariantMap"/>
147 <arg type="a{sv}" name="options" direction="in"/>
148 <arg type="u" name="response" direction="out"/>
149 <annotation name="org.qtproject.QtDBus.QtTypeName.Out1" value="QVariantMap"/>
150 <arg type="a{sv}" name="results" direction="out"/>
151 </method>
152 </interface>
153 </node>