Debian Codegraph @

data/org.freedesktop.portal.RemoteDesktop.xml

raw
1 <?xml version="1.0"?>
2 <!--
3 Copyright (C) 2017-2018 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.portal.RemoteDesktop:
24 @short_description: Remote desktop portal
25
26 The Remote desktop portal allows to create remote desktop sessions.
27
28 This documentation describes version 2 of this interface.
29 -->
30 <interface name="org.freedesktop.portal.RemoteDesktop">
31 <!--
32 CreateSession:
33 @options: Vardict with optional further information
34 @handle: Object path for the :ref:`org.freedesktop.portal.Request` object representing this call
35
36 Create a remote desktop session.
37
38 A remote desktop session is used to allow remote controlling a desktop
39 session.
40
41 A remote desktop session may only be started and stopped with this interface,
42 but you can use the :ref:`org.freedesktop.portal.Session` object created with this
43 method together with certain methods on the :ref:`org.freedesktop.portal.ScreenCast` and
44 :ref:`org.freedesktop.portal.Clipboard` interfaces. Specifically, you can call
45 :ref:`org.freedesktop.portal.ScreenCast.SelectSources` to also get screen content,
46 and :ref:`org.freedesktop.portal.ScreenCast.OpenPipeWireRemote` to acquire a file
47 descriptor for a PipeWire remote. See :ref:`org.freedesktop.portal.ScreenCast` for
48 more information on how to use those methods. To capture clipboard content,
49 you can call :ref:`org.freedesktop.portal.Clipboard.RequestClipboard`. See
50 :ref:`org.freedesktop.portal.Clipboard` for more information on the clipboard
51 integration.
52
53 Supported keys in the @options vardict include:
54
55 * ``handle_token`` (``s``)
56
57 A string that will be used as the last element of the @handle. Must be a valid
58 object path element. See the :ref:`org.freedesktop.portal.Request` documentation for
59 more information about the @handle.
60
61 * ``session_handle_token`` (``s``)
62
63 A string that will be used as the last element of the session handle. Must be a valid
64 object path element. See the :ref:`org.freedesktop.portal.Session` documentation for
65 more information about the session handle.
66
67
68 The following results get returned via the :ref:`org.freedesktop.portal.Request::Response` signal:
69
70 * ``session_handle`` (``s``)
71
72 The session handle. An object path for the
73 :ref:`org.freedesktop.portal.Session` object representing the created
74 session.
75
76 .. note::
77 The ``session_handle`` is an object path that was erroneously implemented
78 as ``s``. For backwards compatibility it will remain this type.
79 -->
80 <method name="CreateSession">
81 <annotation name="org.qtproject.QtDBus.QtTypeName.In0" value="QVariantMap"/>
82 <arg type="a{sv}" name="options" direction="in"/>
83 <arg type="o" name="handle" direction="out"/>
84 </method>
85 <!--
86 SelectDevices:
87 @session_handle: Object path for the :ref:`org.freedesktop.portal.Session` object
88 @options: Vardict with optional further information
89 @handle: Object path for the :ref:`org.freedesktop.portal.Request` object representing this call
90
91 Select input devices to remote control.
92
93 Supported keys in the @options vardict include:
94
95 * ``handle_token`` (``s``)
96
97 A string that will be used as the last element of the @handle. Must be a valid
98 object path element. See the :ref:`org.freedesktop.portal.Request` documentation for
99 more information about the @handle.
100
101 * ``types`` (``u``)
102
103 Bitmask of what device types to request remote controlling of.
104 Default is all.
105
106 * ``restore_token`` (``s``)
107
108 The token to restore a previous session.
109
110 If the stored session cannot be restored, this value is ignored
111 and the user will be prompted normally. This may happen when, for
112 example, the session contains a monitor or a window that is not
113 available anymore, or when the stored permissions are withdrawn.
114
115 The restore token is invalidated after using it once. To restore
116 the same session again, use the new restore token sent in response
117 to starting this session.
118
119 This option was added in version 2 of this interface.
120
121 * ``persist_mode`` (``u``)
122
123 How this session should persist. Default is 0. Accepted values are:
124
125 - ``0``: Do not persist (default)
126 - ``1``: Permissions persist as long as the application is running
127 - ``2``: Permissions persist until explicitly revoked
128
129 If the permission for the session to persist is granted, a restore token will
130 be returned via the :ref:`org.freedesktop.portal.Request::Response` signal of the
131 start method used to start the session.
132
133 This option was added in version 2 of this interface.
134
135 For available device types, see the AvailableDeviceTypes property.
136 -->
137 <method name="SelectDevices">
138 <arg type="o" name="session_handle" direction="in"/>
139 <annotation name="org.qtproject.QtDBus.QtTypeName.In1" value="QVariantMap"/>
140 <arg type="a{sv}" name="options" direction="in"/>
141 <arg type="o" name="handle" direction="out"/>
142 </method>
143 <!--
144 Start:
145 @session_handle: Object path for the :ref:`org.freedesktop.portal.Session` object
146 @parent_window: Identifier for the application window, see :doc:`window-identifiers`
147 @options: Vardict with optional further information
148 @handle: Object path for the :ref:`org.freedesktop.portal.Request` object representing this call
149
150 Start the remote desktop session. This will typically result in the portal
151 presenting a dialog letting the user select what to share, including
152 devices and optionally screen content if screen cast sources was
153 selected.
154
155 Supported keys in the @options vardict include:
156
157 * ``handle_token`` (``s``)
158
159 A string that will be used as the last element of the @handle. Must be a valid
160 object path element. See the :ref:`org.freedesktop.portal.Request` documentation for
161 more information about the @handle.
162
163 The following results get returned via the
164 :ref:`org.freedesktop.portal.Request::Response` signal:
165
166 * ``devices`` (``u``)
167
168 A bitmask of the devices selected by the user.
169
170 * ``clipboard_enabled`` (``b``)
171
172 A boolean for whether the clipboard was enabled ('true') or not ('false').
173 See the :ref:`org.freedesktop.portal.Clipboard` documentation for more information.
174 Since version 2.
175
176 * ``restore_token`` (``s``)
177
178 The restore token. This token is a single use token that can later
179 be used to restore a session. See
180 org.freedesktop.portal.RemoteDesktop.SelectDevices() for details.
181
182 This response option was added in version 2 of this interface.
183
184 If a screen cast source was selected, the results of the
185 :ref:`org.freedesktop.portal.ScreenCast.Start` response signal may be
186 included.
187 -->
188 <method name="Start">
189 <arg type="o" name="session_handle" direction="in"/>
190 <arg type="s" name="parent_window" direction="in"/>
191 <annotation name="org.qtproject.QtDBus.QtTypeName.In2" value="QVariantMap"/>
192 <arg type="a{sv}" name="options" direction="in"/>
193 <arg type="o" name="handle" direction="out"/>
194 </method>
195 <!--
196 NotifyPointerMotion:
197 @session_handle: Object path for the :ref:`org.freedesktop.portal.Session` object
198 @options: Vardict with optional further information
199 @dx: Relative movement on the x axis
200 @dy: Relative movement on the y axis
201
202 Notify about a new relative pointer motion event. The (dx, dy) vector
203 represents the new pointer position in the streams logical coordinate
204 space.
205 -->
206 <method name="NotifyPointerMotion">
207 <arg type="o" name="session_handle" direction="in"/>
208 <annotation name="org.qtproject.QtDBus.QtTypeName.In1" value="QVariantMap"/>
209 <arg type="a{sv}" name="options" direction="in"/>
210 <arg type="d" name="dx" direction="in"/>
211 <arg type="d" name="dy" direction="in"/>
212 </method>
213 <!--
214 NotifyPointerMotionAbsolute:
215 @session_handle: Object path for the :ref:`org.freedesktop.portal.Session` object
216 @options: Vardict with optional further information
217 @stream: The PipeWire stream node the coordinate is relative to
218 @x: Pointer motion x coordinate
219 @y: Pointer motion y coordinate
220
221 Notify about a new absolute pointer motion event. The (x, y) position
222 represents the new pointer position in the streams logical coordinate
223 space (see the logical_size stream property in
224 :ref:`org.freedesktop.portal.ScreenCast`).
225 -->
226 <method name="NotifyPointerMotionAbsolute">
227 <arg type="o" name="session_handle" direction="in"/>
228 <annotation name="org.qtproject.QtDBus.QtTypeName.In1" value="QVariantMap"/>
229 <arg type="a{sv}" name="options" direction="in"/>
230 <arg type="u" name="stream" direction="in"/>
231 <arg type="d" name="x" direction="in"/>
232 <arg type="d" name="y" direction="in"/>
233 </method>
234 <!--
235 NotifyPointerButton:
236 @session_handle: Object path for the :ref:`org.freedesktop.portal.Session` object
237 @options: Vardict with optional further information
238 @button: The pointer button was pressed or released
239 @state: The new state of the button
240
241 The pointer button is encoded according to Linux Evdev button codes.
242
243 May only be called if POINTER access was provided after starting the
244 session.
245
246 Available button states:
247
248 - ``0``: Released
249 - ``1``: Pressed
250 -->
251 <method name="NotifyPointerButton">
252 <arg type="o" name="session_handle" direction="in"/>
253 <annotation name="org.qtproject.QtDBus.QtTypeName.In1" value="QVariantMap"/>
254 <arg type="a{sv}" name="options" direction="in"/>
255 <arg type="i" name="button" direction="in"/>
256 <arg type="u" name="state" direction="in"/>
257 </method>
258 <!--
259 NotifyPointerAxis:
260 @session_handle: Object path for the :ref:`org.freedesktop.portal.Session` object
261 @options: Vardict with optional further information
262 @dx: Relative axis movement on the x axis
263 @dy: Relative axis movement on the y axis
264
265 The axis movement from a 'smooth scroll' device, such as a touchpad.
266 When applicable, the size of the motion delta should be equivalent to
267 the motion vector of a pointer motion done using the same advice.
268
269 May only be called if POINTER access was provided after starting the
270 session.
271
272 Supported keys in the @options vardict include:
273
274 * ``finish`` (``b``)
275
276 If set to true, this is the last axis event in a series, for
277 example as a result of the fingers being lifted from a touchpad
278 after a two-finger scroll. Default is false.
279 -->
280 <method name="NotifyPointerAxis">
281 <arg type="o" name="session_handle" direction="in"/>
282 <annotation name="org.qtproject.QtDBus.QtTypeName.In1" value="QVariantMap"/>
283 <arg type="a{sv}" name="options" direction="in"/>
284 <arg type="d" name="dx" direction="in"/>
285 <arg type="d" name="dy" direction="in"/>
286 </method>
287 <!--
288 NotifyPointerAxisDiscrete:
289 @session_handle: Object path for the :ref:`org.freedesktop.portal.Session` object
290 @options: Vardict with optional further information
291 @axis: The axis that was scrolled
292 @steps: The number of steps scrolled
293
294 May only be called if POINTER access was provided after starting the
295 session.
296
297 Available axes:
298
299 - ``0``: Vertical scroll
300 - ``1``: Horizontal scroll
301
302 -->
303 <method name="NotifyPointerAxisDiscrete">
304 <arg type="o" name="session_handle" direction="in"/>
305 <annotation name="org.qtproject.QtDBus.QtTypeName.In1" value="QVariantMap"/>
306 <arg type="a{sv}" name="options" direction="in"/>
307 <arg type="u" name="axis" direction="in"/>
308 <arg type="i" name="steps" direction="in"/>
309 </method>
310 <!--
311 NotifyKeyboardKeycode:
312 @session_handle: Object path for the :ref:`org.freedesktop.portal.Session` object
313 @options: Vardict with optional further information
314 @keycode: Keyboard code that was pressed or released
315 @state: New state of keyboard keycode
316
317 May only be called if KEYBOARD access was provided after starting the
318 session.
319
320 Available keyboard keycode states:
321
322 - ``0``: Released
323 - ``1``: Pressed
324 -->
325 <method name="NotifyKeyboardKeycode">
326 <arg type="o" name="session_handle" direction="in"/>
327 <annotation name="org.qtproject.QtDBus.QtTypeName.In1" value="QVariantMap"/>
328 <arg type="a{sv}" name="options" direction="in"/>
329 <arg type="i" name="keycode" direction="in"/>
330 <arg type="u" name="state" direction="in"/>
331 </method>
332 <!--
333 NotifyKeyboardKeysym:
334 @session_handle: Object path for the :ref:`org.freedesktop.portal.Session` object
335 @options: Vardict with optional further information
336 @keysym: Keyboard symbol that was pressed or released
337 @state: New state of keyboard keysym
338
339 May only be called if KEYBOARD access was provided after starting the
340 session.
341
342 Available keyboard keysym states:
343
344 - ``0``: Released
345 - ``1``: Pressed
346 -->
347 <method name="NotifyKeyboardKeysym">
348 <arg type="o" name="session_handle" direction="in"/>
349 <annotation name="org.qtproject.QtDBus.QtTypeName.In1" value="QVariantMap"/>
350 <arg type="a{sv}" name="options" direction="in"/>
351 <arg type="i" name="keysym" direction="in"/>
352 <arg type="u" name="state" direction="in"/>
353 </method>
354 <!--
355 NotifyTouchDown:
356 @session_handle: Object path for the :ref:`org.freedesktop.portal.Session` object
357 @options: Vardict with optional further information
358 @stream: The PipeWire stream node the coordinate is relative to
359 @slot: Touch slot where touch point appeared
360 @x: Touch down x coordinate
361 @y: Touch down y coordinate
362
363 May only be called if TOUCHSCREEN access was provided after starting the
364 session.
365
366 Notify about a new touch down event. The (x, y) position
367 represents the new touch point position in the streams logical
368 coordinate space (see the logical_size stream property in
369 :ref:`org.freedesktop.portal.ScreenCast`).
370 -->
371 <method name="NotifyTouchDown">
372 <arg type="o" name="session_handle" direction="in"/>
373 <annotation name="org.qtproject.QtDBus.QtTypeName.In1" value="QVariantMap"/>
374 <arg type="a{sv}" name="options" direction="in"/>
375 <arg type="u" name="stream" direction="in"/>
376 <arg type="u" name="slot" direction="in"/>
377 <arg type="d" name="x" direction="in"/>
378 <arg type="d" name="y" direction="in"/>
379 </method>
380 <!--
381 NotifyTouchMotion:
382 @session_handle: Object path for the :ref:`org.freedesktop.portal.Session` object
383 @options: Vardict with optional further information
384 @stream: The PipeWire stream node the coordinate is relative to
385 @slot: Touch slot where touch point appeared
386 @x: Touch motion x coordinate
387 @y: Touch motion y coordinate
388
389 May only be called if TOUCHSCREEN access was provided after starting the
390 session.
391
392 Notify about a new touch motion event. The (x, y) position
393 represents where the touch point position in the streams logical
394 coordinate space moved (see the logical_size stream property in
395 :ref:`org.freedesktop.portal.ScreenCast`).
396 -->
397 <method name="NotifyTouchMotion">
398 <arg type="o" name="session_handle" direction="in"/>
399 <annotation name="org.qtproject.QtDBus.QtTypeName.In1" value="QVariantMap"/>
400 <arg type="a{sv}" name="options" direction="in"/>
401 <arg type="u" name="stream" direction="in"/>
402 <arg type="u" name="slot" direction="in"/>
403 <arg type="d" name="x" direction="in"/>
404 <arg type="d" name="y" direction="in"/>
405 </method>
406 <!--
407 NotifyTouchUp:
408 @session_handle: Object path for the :ref:`org.freedesktop.portal.Session` object
409 @options: Vardict with optional further information
410 @slot: Touch slot where touch point appeared
411
412 May only be called if TOUCHSCREEN access was provided after starting the
413 session.
414
415 Notify about a new touch up event.
416 -->
417 <method name="NotifyTouchUp">
418 <arg type="o" name="session_handle" direction="in"/>
419 <annotation name="org.qtproject.QtDBus.QtTypeName.In1" value="QVariantMap"/>
420 <arg type="a{sv}" name="options" direction="in"/>
421 <arg type="u" name="slot" direction="in"/>
422 </method>
423
424 <!--
425 ConnectToEIS:
426 @session_handle: Object path for the :ref:`org.freedesktop.portal.Session` object
427 @options: Vardict with optional further information
428 @fd: A file descriptor to an EIS implementation that can be passed to a libei sender context
429
430 Request a connection to an EIS implementation. The returned handle can
431 be passed to ei_setup_backend_fd() for a libei sender context to
432 complete the connection. All information about available devices and the
433 event flow is subject to libei. Please see the libei documentation for details.
434
435 This method may only be called once per session, where the EIS
436 implementation disconnects the session should be closed.
437
438 This method must be called after org.freedesktop.portal.RemoteDesktop.Start()
439
440 Once an EIS connection is established, input events must be sent exclusively via
441 the EIS connection. Any events submitted via NotifyPointerMotion,
442 NotifyKeyboardKeycode and other Notify* methods will return an error.
443
444 To see how to pair a PipeWire stream with a libei device region, see the
445 documentation for the ``mapping_id`` stream property in
446 :ref:`org.freedesktop.portal.ScreenCast.Start`.
447
448 This method was added in version 2 of this interface.
449 -->
450 <method name="ConnectToEIS">
451 <annotation name="org.gtk.GDBus.C.Name" value="connect_to_eis"/>
452 <annotation name="org.gtk.GDBus.C.UnixFD" value="true"/>
453 <arg type="o" name="session_handle" direction="in"/>
454 <annotation name="org.qtproject.QtDBus.QtTypeName.In1" value="QVariantMap"/>
455 <arg type="a{sv}" name="options" direction="in"/>
456 <arg type="h" name="fd" direction="out"/>
457 </method>
458
459 <!--
460 AvailableDeviceTypes:
461
462 A bitmask of available source types. Currently defined types are:
463
464 - ``1``: KEYBOARD
465 - ``2``: POINTER
466 - ``4``: TOUCHSCREEN
467 -->
468 <property name="AvailableDeviceTypes" type="u" access="read"/>
469 <property name="version" type="u" access="read"/>
470 </interface>
471 </node>