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 * ``streams`` (``a(ua{sv})``)
177
178 An array of PipeWire streams. Each stream consists of a PipeWire
179 node ID (the first element in the tuple, and a Vardict of
180 properties. See :ref:`org.freedesktop.portal.ScreenCast.Start` for details.
181
182 * ``restore_token`` (``s``)
183
184 The restore token. This token is a single use token that can later
185 be used to restore a session. See
186 org.freedesktop.portal.RemoteDesktop.SelectDevices() for details.
187
188 This response option was added in version 2 of this interface.
189
190 If a screen cast source was selected, the results of the
191 :ref:`org.freedesktop.portal.ScreenCast.Start` response signal may be
192 included.
193 -->
194 <method name="Start">
195 <arg type="o" name="session_handle" direction="in"/>
196 <arg type="s" name="parent_window" direction="in"/>
197 <annotation name="org.qtproject.QtDBus.QtTypeName.In2" value="QVariantMap"/>
198 <arg type="a{sv}" name="options" direction="in"/>
199 <arg type="o" name="handle" direction="out"/>
200 </method>
201 <!--
202 NotifyPointerMotion:
203 @session_handle: Object path for the :ref:`org.freedesktop.portal.Session` object
204 @options: Vardict with optional further information
205 @dx: Relative movement on the x axis
206 @dy: Relative movement on the y axis
207
208 Notify about a new relative pointer motion event. The (dx, dy) vector
209 represents the new pointer position in the streams logical coordinate
210 space.
211 -->
212 <method name="NotifyPointerMotion">
213 <arg type="o" name="session_handle" direction="in"/>
214 <annotation name="org.qtproject.QtDBus.QtTypeName.In1" value="QVariantMap"/>
215 <arg type="a{sv}" name="options" direction="in"/>
216 <arg type="d" name="dx" direction="in"/>
217 <arg type="d" name="dy" direction="in"/>
218 </method>
219 <!--
220 NotifyPointerMotionAbsolute:
221 @session_handle: Object path for the :ref:`org.freedesktop.portal.Session` object
222 @options: Vardict with optional further information
223 @stream: The PipeWire stream node the coordinate is relative to
224 @x: Pointer motion x coordinate
225 @y: Pointer motion y coordinate
226
227 Notify about a new absolute pointer motion event. The (x, y) position
228 represents the new pointer position in the streams logical coordinate
229 space (see the logical_size stream property in
230 :ref:`org.freedesktop.portal.ScreenCast`).
231 -->
232 <method name="NotifyPointerMotionAbsolute">
233 <arg type="o" name="session_handle" direction="in"/>
234 <annotation name="org.qtproject.QtDBus.QtTypeName.In1" value="QVariantMap"/>
235 <arg type="a{sv}" name="options" direction="in"/>
236 <arg type="u" name="stream" direction="in"/>
237 <arg type="d" name="x" direction="in"/>
238 <arg type="d" name="y" direction="in"/>
239 </method>
240 <!--
241 NotifyPointerButton:
242 @session_handle: Object path for the :ref:`org.freedesktop.portal.Session` object
243 @options: Vardict with optional further information
244 @button: The pointer button was pressed or released
245 @state: The new state of the button
246
247 The pointer button is encoded according to Linux Evdev button codes.
248
249 May only be called if POINTER access was provided after starting the
250 session.
251
252 Available button states:
253
254 - ``0``: Released
255 - ``1``: Pressed
256 -->
257 <method name="NotifyPointerButton">
258 <arg type="o" name="session_handle" direction="in"/>
259 <annotation name="org.qtproject.QtDBus.QtTypeName.In1" value="QVariantMap"/>
260 <arg type="a{sv}" name="options" direction="in"/>
261 <arg type="i" name="button" direction="in"/>
262 <arg type="u" name="state" direction="in"/>
263 </method>
264 <!--
265 NotifyPointerAxis:
266 @session_handle: Object path for the :ref:`org.freedesktop.portal.Session` object
267 @options: Vardict with optional further information
268 @dx: Relative axis movement on the x axis
269 @dy: Relative axis movement on the y axis
270
271 The axis movement from a 'smooth scroll' device, such as a touchpad.
272 When applicable, the size of the motion delta should be equivalent to
273 the motion vector of a pointer motion done using the same advice.
274
275 May only be called if POINTER access was provided after starting the
276 session.
277
278 Supported keys in the @options vardict include:
279
280 * ``finish`` (``b``)
281
282 If set to true, this is the last axis event in a series, for
283 example as a result of the fingers being lifted from a touchpad
284 after a two-finger scroll. Default is false.
285 -->
286 <method name="NotifyPointerAxis">
287 <arg type="o" name="session_handle" direction="in"/>
288 <annotation name="org.qtproject.QtDBus.QtTypeName.In1" value="QVariantMap"/>
289 <arg type="a{sv}" name="options" direction="in"/>
290 <arg type="d" name="dx" direction="in"/>
291 <arg type="d" name="dy" direction="in"/>
292 </method>
293 <!--
294 NotifyPointerAxisDiscrete:
295 @session_handle: Object path for the :ref:`org.freedesktop.portal.Session` object
296 @options: Vardict with optional further information
297 @axis: The axis that was scrolled
298 @steps: The number of steps scrolled
299
300 May only be called if POINTER access was provided after starting the
301 session.
302
303 Available axes:
304
305 - ``0``: Vertical scroll
306 - ``1``: Horizontal scroll
307
308 -->
309 <method name="NotifyPointerAxisDiscrete">
310 <arg type="o" name="session_handle" direction="in"/>
311 <annotation name="org.qtproject.QtDBus.QtTypeName.In1" value="QVariantMap"/>
312 <arg type="a{sv}" name="options" direction="in"/>
313 <arg type="u" name="axis" direction="in"/>
314 <arg type="i" name="steps" direction="in"/>
315 </method>
316 <!--
317 NotifyKeyboardKeycode:
318 @session_handle: Object path for the :ref:`org.freedesktop.portal.Session` object
319 @options: Vardict with optional further information
320 @keycode: Keyboard code that was pressed or released
321 @state: New state of keyboard keycode
322
323 May only be called if KEYBOARD access was provided after starting the
324 session.
325
326 Available keyboard keycode states:
327
328 - ``0``: Released
329 - ``1``: Pressed
330 -->
331 <method name="NotifyKeyboardKeycode">
332 <arg type="o" name="session_handle" direction="in"/>
333 <annotation name="org.qtproject.QtDBus.QtTypeName.In1" value="QVariantMap"/>
334 <arg type="a{sv}" name="options" direction="in"/>
335 <arg type="i" name="keycode" direction="in"/>
336 <arg type="u" name="state" direction="in"/>
337 </method>
338 <!--
339 NotifyKeyboardKeysym:
340 @session_handle: Object path for the :ref:`org.freedesktop.portal.Session` object
341 @options: Vardict with optional further information
342 @keysym: Keyboard symbol that was pressed or released
343 @state: New state of keyboard keysym
344
345 May only be called if KEYBOARD access was provided after starting the
346 session.
347
348 Available keyboard keysym states:
349
350 - ``0``: Released
351 - ``1``: Pressed
352 -->
353 <method name="NotifyKeyboardKeysym">
354 <arg type="o" name="session_handle" direction="in"/>
355 <annotation name="org.qtproject.QtDBus.QtTypeName.In1" value="QVariantMap"/>
356 <arg type="a{sv}" name="options" direction="in"/>
357 <arg type="i" name="keysym" direction="in"/>
358 <arg type="u" name="state" direction="in"/>
359 </method>
360 <!--
361 NotifyTouchDown:
362 @session_handle: Object path for the :ref:`org.freedesktop.portal.Session` object
363 @options: Vardict with optional further information
364 @stream: The PipeWire stream node the coordinate is relative to
365 @slot: Touch slot where touch point appeared
366 @x: Touch down x coordinate
367 @y: Touch down y coordinate
368
369 May only be called if TOUCHSCREEN access was provided after starting the
370 session.
371
372 Notify about a new touch down event. The (x, y) position
373 represents the new touch point position in the streams logical
374 coordinate space (see the logical_size stream property in
375 :ref:`org.freedesktop.portal.ScreenCast`).
376 -->
377 <method name="NotifyTouchDown">
378 <arg type="o" name="session_handle" direction="in"/>
379 <annotation name="org.qtproject.QtDBus.QtTypeName.In1" value="QVariantMap"/>
380 <arg type="a{sv}" name="options" direction="in"/>
381 <arg type="u" name="stream" direction="in"/>
382 <arg type="u" name="slot" direction="in"/>
383 <arg type="d" name="x" direction="in"/>
384 <arg type="d" name="y" direction="in"/>
385 </method>
386 <!--
387 NotifyTouchMotion:
388 @session_handle: Object path for the :ref:`org.freedesktop.portal.Session` object
389 @options: Vardict with optional further information
390 @stream: The PipeWire stream node the coordinate is relative to
391 @slot: Touch slot where touch point appeared
392 @x: Touch motion x coordinate
393 @y: Touch motion y coordinate
394
395 May only be called if TOUCHSCREEN access was provided after starting the
396 session.
397
398 Notify about a new touch motion event. The (x, y) position
399 represents where the touch point position in the streams logical
400 coordinate space moved (see the logical_size stream property in
401 :ref:`org.freedesktop.portal.ScreenCast`).
402 -->
403 <method name="NotifyTouchMotion">
404 <arg type="o" name="session_handle" direction="in"/>
405 <annotation name="org.qtproject.QtDBus.QtTypeName.In1" value="QVariantMap"/>
406 <arg type="a{sv}" name="options" direction="in"/>
407 <arg type="u" name="stream" direction="in"/>
408 <arg type="u" name="slot" direction="in"/>
409 <arg type="d" name="x" direction="in"/>
410 <arg type="d" name="y" direction="in"/>
411 </method>
412 <!--
413 NotifyTouchUp:
414 @session_handle: Object path for the :ref:`org.freedesktop.portal.Session` object
415 @options: Vardict with optional further information
416 @slot: Touch slot where touch point appeared
417
418 May only be called if TOUCHSCREEN access was provided after starting the
419 session.
420
421 Notify about a new touch up event.
422 -->
423 <method name="NotifyTouchUp">
424 <arg type="o" name="session_handle" direction="in"/>
425 <annotation name="org.qtproject.QtDBus.QtTypeName.In1" value="QVariantMap"/>
426 <arg type="a{sv}" name="options" direction="in"/>
427 <arg type="u" name="slot" direction="in"/>
428 </method>
429
430 <!--
431 ConnectToEIS:
432 @session_handle: Object path for the :ref:`org.freedesktop.portal.Session` object
433 @options: Vardict with optional further information
434 @fd: A file descriptor to an EIS implementation that can be passed to a libei sender context
435
436 Request a connection to an EIS implementation. The returned handle can
437 be passed to ei_setup_backend_fd() for a libei sender context to
438 complete the connection. All information about available devices and the
439 event flow is subject to libei. Please see the libei documentation for details.
440
441 This method may only be called once per session, where the EIS
442 implementation disconnects the session should be closed.
443
444 This method must be called after org.freedesktop.portal.RemoteDesktop.Start()
445
446 Once an EIS connection is established, input events must be sent exclusively via
447 the EIS connection. Any events submitted via NotifyPointerMotion,
448 NotifyKeyboardKeycode and other Notify* methods will return an error.
449
450 To see how to pair a PipeWire stream with a libei device region, see the
451 documentation for the ``mapping_id`` stream property in
452 :ref:`org.freedesktop.portal.ScreenCast.Start`.
453
454 This method was added in version 2 of this interface.
455 -->
456 <method name="ConnectToEIS">
457 <annotation name="org.gtk.GDBus.C.Name" value="connect_to_eis"/>
458 <annotation name="org.gtk.GDBus.C.UnixFD" value="true"/>
459 <arg type="o" name="session_handle" direction="in"/>
460 <annotation name="org.qtproject.QtDBus.QtTypeName.In1" value="QVariantMap"/>
461 <arg type="a{sv}" name="options" direction="in"/>
462 <arg type="h" name="fd" direction="out"/>
463 </method>
464
465 <!--
466 AvailableDeviceTypes:
467
468 A bitmask of available source types. Currently defined types are:
469
470 - ``1``: KEYBOARD
471 - ``2``: POINTER
472 - ``4``: TOUCHSCREEN
473 -->
474 <property name="AvailableDeviceTypes" type="u" access="read"/>
475 <property name="version" type="u" access="read"/>
476 </interface>
477 </node>