Debian Codegraph @

data/org.freedesktop.impl.portal.AppChooser.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 xmlns:doc="http://www.freedesktop.org/dbus/1.0/doc.dtd" name="/">
23 <!--
24 org.freedesktop.impl.portal.AppChooser:
25 @short_description: Interface for choosing an application
26
27 This backend can be used by portal implementations that
28 need to choose an application from a list of applications.
29
30 This documentation describes version 2 of this interface.
31 -->
32 <interface name="org.freedesktop.impl.portal.AppChooser">
33 <!--
34 ChooseApplication:
35 @handle: Object path to export the Request object at
36 @app_id: App id of the application
37 @title: Title for the app chooser dialog
38 @parent_window: Identifier for the application window, see :doc:`window-identifiers`
39 @choices: App ids of applications to let the user choose from
40 @options: Vardict with optional further information
41 @response: Numeric response
42 @results: Vardict with the results of the call
43
44 Presents a list of applications to the user to choose one.
45
46 Supported keys in the @options vardict include:
47
48 * ``last_choice`` (``s``)
49
50 The app id that was selected the last time.
51
52 * ``modal`` (``b``)
53
54 Whether to make the dialog modal. Defaults to yes.
55
56 * ``content_type`` (``s``)
57
58 The content type to choose an application for.
59
60 * ``uri`` (``s``)
61
62 The uri to choose an application for.
63
64 * ``filename`` (``s``)
65
66 The filename to choose an application for. Note that this is just a
67 basename, without a path.
68
69 * ``activation_token`` (``s``)
70
71 A token that can be used to activate the application chooser.
72
73 The activation_token option was introduced in version 2 of the interface.
74
75 The following results get returned via the @results vardict:
76
77 * ``choice`` (``s``)
78
79 The app id that was selected.
80
81 * ``activation_token`` (``s``)
82
83 A token that can be used to activate the chosen application. If
84 the application selection has involved user interaction, a new
85 token should be generated by the portal implementation.
86 Otherwise, this token may be the same as the one passed in
87 @options.
88
89 The activation_token option was introduced in version 2 of the interface.
90 -->
91 <method name="ChooseApplication">
92 <arg type="o" name="handle" direction="in"/>
93 <arg type="s" name="app_id" direction="in"/>
94 <arg type="s" name="parent_window" direction="in"/>
95 <arg type="as" name="choices" direction="in"/>
96 <annotation name="org.qtproject.QtDBus.QtTypeName.In4" value="QVariantMap"/>
97 <arg type="a{sv}" name="options" direction="in"/>
98 <arg type="u" name="response" direction="out"/>
99 <annotation name="org.qtproject.QtDBus.QtTypeName.Out1" value="QVariantMap"/>
100 <arg type="a{sv}" name="results" direction="out"/>
101 </method>
102
103 <!--
104 UpdateChoices:
105 @handle: the request handle
106 @choices: App ids of applications to let the user choose from
107
108 This method can be called between the time of a ChooseApplication call
109 and receiving the Response signal, to update the list of applications
110 that are offered by the backend.
111 -->
112 <method name="UpdateChoices">
113 <arg type="o" name="handle" direction="in"/>
114 <arg type="as" name="choices" direction="in"/>
115 </method>
116 </interface>
117 </node>