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 The :ref:`org.freedesktop.portal.Print.Print` documentation has details about
71 the supported keys in settings and page-setup.
72 -->
73 <method name="PreparePrint">
74 <arg type="o" name="handle" direction="in"/>
75 <arg type="s" name="app_id" direction="in"/>
76 <arg type="s" name="parent_window" direction="in"/>
77 <arg type="s" name="title" direction="in"/>
78 <annotation name="org.qtproject.QtDBus.QtTypeName.In4" value="QVariantMap"/>
79 <arg type="a{sv}" name="settings" direction="in"/>
80 <annotation name="org.qtproject.QtDBus.QtTypeName.In5" value="QVariantMap"/>
81 <arg type="a{sv}" name="page_setup" direction="in"/>
82 <annotation name="org.qtproject.QtDBus.QtTypeName.In6" value="QVariantMap"/>
83 <arg type="a{sv}" name="options" direction="in"/>
84 <arg type="u" name="response" direction="out"/>
85 <annotation name="org.qtproject.QtDBus.QtTypeName.Out1" value="QVariantMap"/>
86 <arg type="a{sv}" name="results" direction="out"/>
87 </method>
88
89 <!--
90 Print:
91 @handle: Object path for the :ref:`org.freedesktop.impl.portal.Request` object representing this call
92 @app_id: App id of the application
93 @parent_window: Identifier for the application window, see :doc:`window-identifiers`
94 @title: Title for the print dialog
95 @fd: File descriptor from which to read the content to print
96 @options: Vardict with optional further information
97 @response: Numeric response
98 @results: Vardict with the results of the call
99
100 Prints a file.
101
102 The file is given in the form of a file descriptor open for reading.
103
104 If a valid token is present in the @options, then this call will print
105 with the settings from the Print call that the token refers to. If
106 no token is present, then a print dialog will be presented to the user.
107
108 Note that it is up to the portal implementation to determine how long
109 it considers tokens valid.
110
111 Supported keys in the @options vardict:
112
113 * ``modal`` (``b``)
114
115 Whether to make the dialog modal. Defaults to yes.
116
117 * ``token`` (``u``)
118
119 Token that was returned by a previous org.freedesktop.impl.portal.Print.PreparePrint() call.
120 -->
121 <method name="Print">
122 <annotation name="org.gtk.GDBus.C.UnixFD" value="true"/>
123 <arg type="o" name="handle" direction="in"/>
124 <arg type="s" name="app_id" direction="in"/>
125 <arg type="s" name="parent_window" direction="in"/>
126 <arg type="s" name="title" direction="in"/>
127 <arg type="h" name="fd" direction="in"/>
128 <annotation name="org.qtproject.QtDBus.QtTypeName.In5" value="QVariantMap"/>
129 <arg type="a{sv}" name="options" direction="in"/>
130 <arg type="u" name="response" direction="out"/>
131 <annotation name="org.qtproject.QtDBus.QtTypeName.Out1" value="QVariantMap"/>
132 <arg type="a{sv}" name="results" direction="out"/>
133 </method>
134 </interface>
135 </node>