Debian Codegraph @

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

raw
1 <?xml version="1.0"?>
2 <!--
3 Copyright (C) 2022 Aleix Pol Gonzalez <[email protected]>
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: Aleix Pol Gonzalez <[email protected]>
21 -->
22
23 <node name="/" xmlns:doc="http://www.freedesktop.org/dbus/1.0/doc.dtd">
24 <!--
25 org.freedesktop.impl.portal.GlobalShortcuts:
26 @short_description: GlobalShortcuts portal backend interface
27
28 This portal lets applications register global shortcuts so they can
29 act regardless of the system state upon an input event.
30
31 This documentation describes version 2 of this interface.
32 -->
33 <interface name="org.freedesktop.impl.portal.GlobalShortcuts">
34 <!--
35 CreateSession:
36 @handle: Object path for the :ref:`org.freedesktop.impl.portal.Request` object representing this call
37 @session_handle: Object path for the ref:`org.freedesktop.impl.portal.Session` object representing the session being created
38 @app_id: App id of the application
39 @options: Vardict with optional further information. See :ref:`org.freedesktop.portal.GlobalShortcuts.CreateSession`
40 @response: Numeric Request response
41 @results: Vardict with the results of the call
42
43 Create a global shortcuts session.
44
45 There are currently no supported keys in the @results vardict.
46 -->
47 <method name="CreateSession">
48 <arg type="o" name="handle" direction="in"/>
49 <arg type="o" name="session_handle" direction="in"/>
50 <arg type="s" name="app_id" direction="in"/>
51 <annotation name="org.qtproject.QtDBus.QtTypeName.In3" value="QVariantMap"/>
52 <arg type="a{sv}" name="options" direction="in"/>
53 <arg type="u" name="response" direction="out"/>
54 <annotation name="org.qtproject.QtDBus.QtTypeName.Out1" value="QVariantMap"/>
55 <arg type="a{sv}" name="results" direction="out"/>
56 </method>
57
58 <!--
59 BindShortcuts:
60 @handle: Object path for the :ref:`org.freedesktop.impl.portal.Request` object representing this call
61 @session_handle: Object path for the :ref:`org.freedesktop.impl.portal.Session` object representing the session
62 @shortcuts: The list of shortcuts to bind. See :ref:`org.freedesktop.portal.GlobalShortcuts.BindShortcuts`
63 @parent_window: Identifier for the application window, see :doc:`window-identifiers`
64 @shortcuts: The identifier of the shortcuts we intend to register, empty for all shortcuts
65 @results: Vardict with the results of the call
66
67 Bind the shortcuts of this session. This will typically result the portal
68 presenting a dialog letting the user configure shortcut triggers.
69 Backends might want to only show such a dialog if `shortcuts` includes shortcuts that were not
70 bound in previous sessions by the application or only include shortcuts in such a dialog that
71 were not used in previous `BindShortcuts` requests by the application.
72 -->
73 <method name="BindShortcuts">
74 <arg type="o" name="handle" direction="in"/>
75 <arg type="o" name="session_handle" direction="in"/>
76 <annotation name="org.qtproject.QtDBus.QtTypeName.In2" value="QList&lt;QPair&lt;QString,QVariantMap&gt;&gt;"/>
77 <arg type="a(sa{sv})" name="shortcuts" direction="in"/>
78 <arg type="s" name="parent_window" direction="in"/>
79 <annotation name="org.qtproject.QtDBus.QtTypeName.In3" value="QVariantMap"/>
80 <arg type="a{sv}" name="options" direction="in"/>
81 <annotation name="org.qtproject.QtDBus.QtTypeName.In4" value="QVariantMap"/>
82 <arg type="u" name="response" direction="out"/>
83 <arg type="a{sv}" name="results" direction="out"/>
84 <annotation name="org.qtproject.QtDBus.QtTypeName.Out1" value="QVariantMap"/>
85 </method>
86
87 <!--
88 ListShortcuts:
89 @handle: Object path for the :ref:`org.freedesktop.impl.portal.Request` object representing this call
90 @session_handle: Object path for the :ref:`org.freedesktop.impl.portal.Session` object representing the session
91 @results: Vardict with the results of the call
92
93 Lists shortcuts of a session.
94
95 If `BindShortcuts` was called for `session` all active shortcuts for `session` are returned.
96 Otherwise returns the shortcuts that were sucessfully bound in a previous session by the application.
97
98 The following results get returned in the @results vardict:
99
100 * ``shortcuts`` (``a(sa{sv})``)
101
102 A list of shortcuts.
103
104 See the :ref:`org.freedesktop.portal.GlobalShortcuts.BindShortcuts` method for
105 the list of supported properties of shortcuts.
106 -->
107 <method name="ListShortcuts">
108 <arg type="o" name="handle" direction="in"/>
109 <arg type="o" name="session_handle" direction="in"/>
110 <arg type="u" name="response" direction="out"/>
111 <annotation name="org.qtproject.QtDBus.QtTypeName.Out1" value="QVariantMap"/>
112 <arg type="a{sv}" name="results" direction="out"/>
113 </method>
114
115 <!--
116 ConfigureShortcuts:
117 @session_handle: Object path for the :ref:`org.freedesktop.portal.Session` object representing the session
118 @parent_window: Identifier for the application window, see :doc:`window-identifiers`
119 @options: Vardict with optional further information
120
121 Request showing a configuration UI so the user is able to configure all shortcuts of this session.
122
123 Supported keys in the @options vardict include:
124
125 * ``activation_token`` (``s``)
126
127 A token that can be used to activate the configuration window.
128
129 This method was added in version 2 of this interface.
130 -->
131 <method name="ConfigureShortcuts">
132 <arg type="o" name="session_handle" direction="in"/>
133 <arg type="s" name="parent_window" direction="in" />
134 <annotation name="org.qtproject.QtDBus.QtTypeName.In2" value="QVariantMap"/>
135 <arg type="a{sv}" name="options" direction="in"/>
136 </method>
137 <!--
138 Activated:
139 @session_handle: Session that requested the shortcut
140 @shortcut_id: the application-provided ID for the notification
141 @timestamp: the time of activation with millisecond granularity, with an undefined base.
142 @options: Vardict with optional further information
143
144 Emitted when a shortcut is activated.
145
146 Supported keys in the @options vardict include:
147
148 * ``activation_token`` (``s``)
149
150 A token that can be used to activate a window in response to the
151 shortcut getting activated.
152 -->
153 <signal name="Activated">
154 <arg type="o" name="session_handle" direction="out"/>
155 <arg type="s" name="shortcut_id" direction="out"/>
156 <arg type="t" name="timestamp" direction="out"/>
157 <annotation name="org.qtproject.QtDBus.QtTypeName.Out3" value="QVariantMap"/>
158 <arg type="a{sv}" name="options" direction="out"/>
159 </signal>
160
161 <!--
162 Deactivated:
163 @session_handle: Session that requested the shortcut
164 @shortcut_id: the application-provided ID for the notification
165 @timestamp: the time of deactivation with millisecond granularity, with an undefined base.
166 @options: Vardict with optional further information
167
168 Emitted when a shortcut is deactivated.
169
170 Supported keys in the @options vardict include:
171
172 * ``activation_token`` (``s``)
173
174 A token that can be used to activate a window in response to the
175 shortcut getting deactivated.
176 -->
177 <signal name="Deactivated">
178 <arg type="o" name="session_handle" direction="out"/>
179 <arg type="s" name="shortcut_id" direction="out"/>
180 <arg type="t" name="timestamp" direction="out"/>
181 <annotation name="org.qtproject.QtDBus.QtTypeName.Out3" value="QVariantMap"/>
182 <arg type="a{sv}" name="options" direction="out"/>
183 </signal>
184
185 <!--
186 ShortcutsChanged:
187 @session_handle: Session that requested the shortcut
188 @shortcuts: The list of changed shortcuts
189
190 Emitted when shortcuts are changed.
191
192 The results get returned via the :ref:`org.freedesktop.portal.Request::Response`
193 signal. See :ref:`org.freedesktop.portal.GlobalShortcuts.BindShortcuts` for the
194 list of supported properties of shortcuts.
195 -->
196 <signal name="ShortcutsChanged">
197 <arg type="o" name="session_handle" direction="out"/>
198 <annotation name="org.qtproject.QtDBus.QtTypeName.Out1" value="QList&lt;QPair&lt;QString,QVariantMap&gt;&gt;"/>
199 <arg type="a(sa{sv})" name="shortcuts" direction="out"/>
200 </signal>
201
202 <property name="version" type="u" access="read"/>
203 </interface>
204 </node>