Debian Codegraph @

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

raw
1 <?xml version="1.0"?>
2 <!--
3 Copyright (C) 2022 Matthew Leeds
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: Matthew Leeds <[email protected]>
21 -->
22
23 <node name="/" xmlns:doc="http://www.freedesktop.org/dbus/1.0/doc.dtd">
24 <!--
25 org.freedesktop.impl.portal.DynamicLauncher:
26 @short_description: Dynamic launcher portal backend interface
27
28 This documentation describes version 1 of this interface.
29 -->
30 <interface name="org.freedesktop.impl.portal.DynamicLauncher">
31 <!--
32 PrepareInstall:
33 @handle: Object path for the :ref:`org.freedesktop.impl.portal.Request` object representing this call
34 @app_id: App id of the application
35 @parent_window: Identifier for the application window, see :doc:`window-identifiers`
36 @name: The default name for the launcher
37 @icon_v: A #GBytesIcon as returned by g_icon_serialize()
38 @options: Vardict with optional further information
39 @response: Numeric response (0 == success)
40 @results: Vardict with the results of the call
41
42 Presents a dialog to the user to allow them to see the icon, potentially
43 change the name, and confirm installation of the launcher.
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 * ``launcher_type`` (``u``)
52
53 The type of launcher being created. For supported values see the
54 SupportedLauncherTypes property. Defaults to "Application".
55
56 * ``target`` (``s``)
57
58 For a launcher of type "Webapp", this is the URL of the web app
59 being installed. This is displayed in the user-facing dialog.
60 For other launcher types, this is not needed.
61
62 * ``editable_name`` (``b``)
63
64 If true, the user will be able to edit the name of the launcher.
65 Defaults to true.
66
67 * ``editable_icon`` (``b``)
68
69 If true, the user will be able to edit the icon of the launcher,
70 if the implementation supports this. Defaults to false.
71
72 The following results get returned via the @results vardict:
73
74 * ``name`` (``s``)
75
76 The name chosen by the user for the launcher (or the default if
77 the editable_name option was false).
78
79 * ``icon`` (``v``)
80
81 The icon chosen by the user for the launcher (or the default if
82 the ``editable_icon`` option was false).
83 -->
84 <method name="PrepareInstall">
85 <arg type="o" name="handle" direction="in"/>
86 <arg type="s" name="app_id" direction="in"/>
87 <arg type="s" name="parent_window" direction="in"/>
88 <arg type="s" name="name" direction="in"/>
89 <arg type="v" name="icon_v" direction="in"/>
90 <annotation name="org.qtproject.QtDBus.QtTypeName.In5" value="QVariantMap"/>
91 <arg type="a{sv}" name="options" direction="in"/>
92 <arg type="u" name="response" direction="out"/>
93 <annotation name="org.qtproject.QtDBus.QtTypeName.Out1" value="QVariantMap"/>
94 <arg type="a{sv}" name="results" direction="out"/>
95 </method>
96 <!--
97 RequestInstallToken:
98 @app_id: App id of the application
99 @options: Vardict with optional further information
100 @response: 0 if the caller should be allowed to do non-interactive launcher installation, a nonzero number otherwise
101
102 The @response returned by this method is used to determine whether to
103 give an install token to the caller, which can be used to avoid the need
104 for a confirmation dialog; the token can be passed to the
105 :ref:`org.freedesktop.portal.DynamicLauncher.Install` method just as if it
106 were acquired via the
107 :ref:`org.freedesktop.portal.DynamicLauncher.PrepareInstall` method.
108
109 It is up to the portal implementation to decide whether this method is
110 allowed based on the @app_id of the caller.
111
112 The @options vardict currently has no supported entries.
113 -->
114 <method name="RequestInstallToken">
115 <arg type="s" name="app_id" direction="in"/>
116 <annotation name="org.qtproject.QtDBus.QtTypeName.In1" value="QVariantMap"/>
117 <arg type="a{sv}" name="options" direction="in"/>
118 <arg type="u" name="response" direction="out"/>
119 </method>
120 <!--
121 SupportedLauncherTypes:
122
123 A bitmask of available launcher types. Currently defined types are:
124
125 - ``1``: Application. A launcher that represents an application.
126 - ``2``: Webapp. A launcher that represents a web app.
127 -->
128 <property name="SupportedLauncherTypes" type="u" access="read"/>
129 <property name="version" type="u" access="read"/>
130 </interface>
131 </node>