Debian Codegraph @

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

raw
1 <?xml version="1.0"?>
2 <!--
3 Copyright (C) 2022 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
21 <node name="/" xmlns:doc="http://www.freedesktop.org/dbus/1.0/doc.dtd">
22 <!--
23 org.freedesktop.impl.portal.InputCapture:
24 @short_description: Capture input portal backend interface
25
26 The Capture Input portal allows clients to capture input from local
27 devices. This portal is mostly a 1:1 mapping of the
28 :ref:`org.freedesktop.portal.InputCapture` portal, see that portal's
29 documentation for details on methods, signals and arguments.
30
31 This documentation describes version 1 of this interface.
32 -->
33 <interface name="org.freedesktop.impl.portal.InputCapture">
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 @parent_window: Identifier for the application window, see :doc:`window-identifiers`
40 @options: Vardict with optional further information
41 @response: Numeric response
42 @results: Vardict with the results of the call
43
44 Create a capture input session.
45
46 Supported keys in the @options vardict include:
47
48 * ``capabilities`` (``u``)
49
50 Bitmask of requested capabilities, see the
51 SupportedCapabilities property. This value is required.
52
53 The following results get returned in the @results vardict:
54
55 * ``session_id`` (``s``)
56
57 The session id. A string representing the created capture input session.
58
59 * ``capabilities`` (``u``)
60
61 The capabilities available to this session. This is always a
62 subset of the requested capabilities.
63 -->
64 <method name="CreateSession">
65 <arg type="o" name="handle" direction="in"/>
66 <arg type="o" name="session_handle" direction="in"/>
67 <arg type="s" name="app_id" direction="in"/>
68 <arg type="s" name="parent_window" direction="in"/>
69 <annotation name="org.qtproject.QtDBus.QtTypeName.In4" value="QVariantMap"/>
70 <arg type="a{sv}" name="options" direction="in"/>
71 <arg type="u" name="response" direction="out"/>
72 <annotation name="org.qtproject.QtDBus.QtTypeName.Out1" value="QVariantMap"/>
73 <arg type="a{sv}" name="results" direction="out"/>
74 </method>
75 <!--
76 GetZones:
77 @handle: Object path for the :ref:`org.freedesktop.impl.portal.Request` object representing this call
78 @session_handle: Object path for the :ref:`org.freedesktop.impl.portal.Session` object representing the session
79 @app_id: App id of the application
80 @options: Vardict with optional further information
81 @response: Numeric response
82 @results: Vardict with the results of the call
83
84 Return the current zones for this session.
85
86 The following results get returned in the @results vardict:
87
88 * ``zones`` (``a(uuii)``)
89
90 An array of zones with width, height, x-offset, y-offset.
91
92 * ``zone_set`` (``u``)
93
94 The zone_set ID required in
95 org.freedesktop.impl.portal.InputCapture.SetPointerBarriers().
96 -->
97 <method name="GetZones">
98 <arg type="o" name="handle" direction="in"/>
99 <arg type="o" name="session_handle" direction="in"/>
100 <arg type="s" name="app_id" direction="in"/>
101 <annotation name="org.qtproject.QtDBus.QtTypeName.In3" value="QVariantMap"/>
102 <arg type="a{sv}" name="options" direction="in"/>
103 <arg type="u" name="response" direction="out"/>
104 <annotation name="org.qtproject.QtDBus.QtTypeName.Out1" value="QVariantMap"/>
105 <arg type="a{sv}" name="results" direction="out"/>
106 </method>
107
108 <!--
109 SetPointerBarriers:
110 @handle: Object path for the :ref:`org.freedesktop.impl.portal.Request` object representing this call
111 @session_handle: Object path for the :ref:`org.freedesktop.impl.portal.Session` object representing the session
112 @app_id: App id of the application
113 @options: Vardict with optional further information
114 @barriers: An array of vardicts, each specifying one barrier
115 @zone_set: A unique ID referring to the zone set
116 @response: Numeric response
117 @results: Vardict with the results of the call
118
119 Set up zero or more pointer barriers.
120
121 Supported keys in the @barriers vardicts include:
122
123 * ``barrier_id`` (``u``)
124
125 The non-zero id of this barrier. This id is used in the
126 #org.freedesktop.portal.impl.InputCapture::Activated signal to inform
127 which barrier triggered input capture.
128
129 * ``position`` (``(iiii)``)
130
131 The x1/y1 x2/y2 position of the pointer barrier. A horizontal
132 pointer barrier must have y1 == y2, a vertical pointer barrier
133 must have x1 == x2. Diagonal pointer barriers are not supported.
134
135 The following results get returned in the @results vardict:
136
137 * ``failed_barriers`` (``au``)
138
139 An array of barrier_ids of pointer barriers that have been denied. The
140 id matches the barrier_id of the entries in the @barriers argument.
141 -->
142 <method name="SetPointerBarriers">
143 <arg type="o" name="handle" direction="in"/>
144 <arg type="o" name="session_handle" direction="in"/>
145 <arg type="s" name="app_id" direction="in"/>
146 <annotation name="org.qtproject.QtDBus.QtTypeName.In3" value="QVariantMap"/>
147 <arg type="a{sv}" name="options" direction="in"/>
148 <annotation name="org.qtproject.QtDBus.QtTypeName.In4" value="QList&lt;QVariantMap&gt;"/>
149 <arg type="aa{sv}" name="barriers" direction="in"/>
150 <arg type="u" name="zone_set" direction="in"/>
151 <arg type="u" name="response" direction="out"/>
152 <annotation name="org.qtproject.QtDBus.QtTypeName.Out1" value="QVariantMap"/>
153 <arg type="a{sv}" name="results" direction="out"/>
154 </method>
155
156 <!--
157 Enable:
158 @session_handle: Object path for the :ref:`org.freedesktop.impl.portal.Session` object representing the session
159 @app_id: App id of the application
160 @options: Vardict with optional further information
161
162 Enable input capturing.
163 -->
164 <method name="Enable">
165 <arg type="o" name="session_handle" direction="in"/>
166 <arg type="s" name="app_id" direction="in"/>
167 <annotation name="org.qtproject.QtDBus.QtTypeName.In2" value="QVariantMap"/>
168 <arg type="a{sv}" name="options" direction="in"/>
169 <arg type="u" name="response" direction="out"/>
170 <annotation name="org.qtproject.QtDBus.QtTypeName.Out1" value="QVariantMap"/>
171 <arg type="a{sv}" name="results" direction="out"/>
172 </method>
173
174 <!--
175 Disable:
176 @session_handle: Object path for the :ref:`org.freedesktop.impl.portal.Session` object representing the session
177 @app_id: App id of the application
178 @options: Vardict with optional further information
179
180 Disable input capturing.
181 -->
182 <method name="Disable">
183 <arg type="o" name="session_handle" direction="in"/>
184 <arg type="s" name="app_id" direction="in"/>
185 <annotation name="org.qtproject.QtDBus.QtTypeName.In2" value="QVariantMap"/>
186 <arg type="a{sv}" name="options" direction="in"/>
187 <arg type="u" name="response" direction="out"/>
188 <annotation name="org.qtproject.QtDBus.QtTypeName.Out1" value="QVariantMap"/>
189 <arg type="a{sv}" name="results" direction="out"/>
190 </method>
191
192 <!--
193 Release:
194 @session_handle: Object path for the :ref:`org.freedesktop.impl.portal.Session` object representing the session
195 @app_id: App id of the application
196 @options: Vardict with optional further information
197
198 Release ongoing input capturing.
199
200 Supported keys in the @options vardict include:
201
202 * ``activation_id`` (``u``)
203
204 The same activation_id number as in the
205 #org.freedesktop.impl.portal.InputCapture::Activated signal.
206
207 * ``cursor_position`` (``(dd)``)
208
209 The suggested cursor position within the Zones available in
210 this session.
211
212 This is a suggestion to the compositor to place the cursor in
213 the correct position to allow for fluent movement between virtual
214 screens. The compositor is not required to honor this suggestion.
215 -->
216 <method name="Release">
217 <arg type="o" name="session_handle" direction="in"/>
218 <arg type="s" name="app_id" direction="in"/>
219 <annotation name="org.qtproject.QtDBus.QtTypeName.In2" value="QVariantMap"/>
220 <arg type="a{sv}" name="options" direction="in"/>
221 <arg type="u" name="response" direction="out"/>
222 <annotation name="org.qtproject.QtDBus.QtTypeName.Out1" value="QVariantMap"/>
223 <arg type="a{sv}" name="results" direction="out"/>
224 </method>
225
226 <!--
227 ConnectToEIS:
228 @session_handle: Object path for the :ref:`org.freedesktop.portal.Session` object
229 @app_id: App id of the application
230 @options: Vardict with optional further information
231 @fd: A file descriptor to an EIS implementation that can be passed to a passive libei context
232
233 Set up the connection to an EIS implementation. Once input capturing starts,
234 input events are sent via the EI protocol between the compositor and the application.
235 This call must be invoked before :ref:`org.freedesktop.portal.InputCapture.Enable`.
236
237 A session only needs to set this up once, the EIS implementation is not affected by
238 calls to Disable() and :ref:`org.freedesktop.portal.InputCapture.Enable` -
239 the same context can be re-used until the session is closed.
240 -->
241 <method name="ConnectToEIS">
242 <annotation name="org.gtk.GDBus.C.UnixFD" value="true"/>
243 <arg type="o" name="session_handle" direction="in"/>
244 <arg type="s" name="app_id" direction="in"/>
245 <annotation name="org.qtproject.QtDBus.QtTypeName.In2" value="QVariantMap"/>
246 <arg type="a{sv}" name="options" direction="in"/>
247 <arg type="h" name="fd" direction="out"/>
248 </method>
249 <!--
250 Disabled:
251 @session_handle: Object path for the :ref:`org.freedesktop.impl.portal.Session` object representing the session
252 @options: Vardict with optional further information
253
254 The Disabled signal is emitted when the application will no longer
255 receive captured input. If input capturing is currently ongoing, the
256 #org.freedesktop.impl.portal.InputCapture::Deactivated signal is emitted
257 before this signal.
258 -->
259 <signal name="Disabled">
260 <arg type="o" name="session_handle" direction="out"/>
261 <annotation name="org.qtproject.QtDBus.QtTypeName.Out1" value="QVariantMap"/>
262 <arg type="a{sv}" name="options" direction="out"/>
263 </signal>
264
265 <!--
266 Activated:
267 @session_handle: Object path for the :ref:`org.freedesktop.impl.portal.Session` object representing the session
268 @options: Vardict with optional further information
269
270 The Activated signal is emitted when input capture starts and input events
271 are about to be sent to the application.
272
273 This signal is only emitted after a prior call
274 to org.freedesktop.impl.portal.InputCapture.Enable().
275
276 Supported keys in the @options vardict include:
277
278 * ``activation_id`` (``u``)
279
280 A number that can be used to synchronize with the
281 transport-layer. This number has no intrinsic meaning but
282 is guaranteed to increase by an unspecified amount on each call.
283
284 In particular: if the compositor sends an activation_id of N as
285 part of this request it will also set the sequence in EIS'
286 start_emulating event the same value N on the EIS connection
287 before the first event from a device is sent.
288 This allows an application to have a synchronization point and
289 attribute an event sequence to the portal interaction.
290
291 Applications must be able to handle the activation_id number wrapping
292 around. Implementations of this portal must to increase the
293 activation_id number by an sensible amount to allow for wrapping
294 detection.
295
296 * ``cursor_position`` (``(dd)``)
297
298 The current cursor position. Note that this position may be
299 outside the Zones available to this session - this indicates
300 movement larger than a single pixel.
301
302 For example, a fast movement against a barrier on the right edge
303 of a screen may logically put the cursor dozens of pixels into
304 the (non-existing) screen on the other side of the barrier.
305 It is the application's responsibility to adjust the cursor
306 position as necessary.
307
308 * ``barrier_id`` (``u``)
309
310 The barrier id of the barrier that triggered. If the value is
311 nonzero, it matches the barrier id as specified in
312 org.freedesktop.impl.portal.InputCapture.SetPointerBarriers().
313
314 If the id is zero, the pointer barrier could be determined.
315 If the id is missing, the input capture was not triggered by a
316 pointer barrier.
317
318 Where more than one pointer barrier are triggered by the same
319 movement it is up to the compositor to choose one barrier (or use
320 a barrier id of zero).
321 -->
322 <signal name="Activated">
323 <arg type="o" name="session_handle" direction="out"/>
324 <annotation name="org.qtproject.QtDBus.QtTypeName.Out1" value="QVariantMap"/>
325 <arg type="a{sv}" name="options" direction="out"/>
326 </signal>
327
328 <!--
329 Deactivated:
330 @session_handle: Object path for the :ref:`org.freedesktop.impl.portal.Session` object representing the session
331 @options: Vardict with optional further information
332
333 The Deactivated signal is emitted when input capture stopped and input events
334 are no longer sent to the application. To prevent future input
335 capture, an application must call :ref:`org.freedesktop.portal.InputCapture.Disable`.
336
337 Supported keys in the @options vardict include:
338
339 * ``activation_id`` (``u``)
340
341 The same activation_id as in the corresponding
342 #org.freedesktop.impl.portal.InputCapture::Activated signal.
343
344 * ``cursor_position`` (``(dd)``)
345
346 The current cursor position. Note that this position may be
347 outside the Zones available to this session - this indicates
348 movement larger than a single pixel.
349
350 For example, a fast movement against a barrier on the right edge
351 of a screen may logically put the cursor dozens of pixels into
352 the (non-existing) screen on the other side of the barrier.
353 It is the application's responsibility to adjust the cursor
354 position as necessary.
355 -->
356 <signal name="Deactivated">
357 <arg type="o" name="session_handle" direction="out"/>
358 <annotation name="org.qtproject.QtDBus.QtTypeName.Out1" value="QVariantMap"/>
359 <arg type="a{sv}" name="options" direction="out"/>
360 </signal>
361
362 <!--
363 ZonesChanged:
364 @session_handle: Object path for the :ref:`org.freedesktop.impl.portal.Session` object representing the session
365 @options: Vardict with optional further information
366
367 The ZonesChanged signal is emitted when one or more of the zones
368 available **to this session** change. An application should immediately call
369 :ref:`org.freedesktop.portal.InputCapture.GetZones` to update its state of the zones.
370 -->
371 <signal name="ZonesChanged">
372 <arg type="o" name="session_handle" direction="out"/>
373 <annotation name="org.qtproject.QtDBus.QtTypeName.Out1" value="QVariantMap"/>
374 <arg type="a{sv}" name="options" direction="out"/>
375 </signal>
376
377 <!--
378 SupportedCapabilities:
379
380 A bitmask of supported capabilities. This list is constant, it is not the list of
381 capabilities currently available but rather which capabilies are
382 implemented by the portal.
383
384 Applications must ignore unknown capabilities.
385
386 Currently defined types are:
387
388 - ``1``: KEYBOARD
389 - ``2``: POINTER
390 - ``4``: TOUCHSCREEN
391 -->
392 <property name="SupportedCapabilities" type="u" access="read"/>
393 <property name="version" type="u" access="read"/>
394 </interface>
395 </node>