Debian Codegraph @

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

raw
1 <?xml version="1.0"?>
2 <!--
3 Copyright (C) 2017 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.ScreenCast:
24 @short_description: Screen cast portal backend interface
25
26 The Screen cast portal allows to create screen cast sessions.
27
28 This documentation describes version 6 of this interface.
29 -->
30 <interface name="org.freedesktop.impl.portal.ScreenCast">
31 <!--
32 CreateSession:
33 @handle: Object path for the :ref:`org.freedesktop.impl.portal.Request` object representing this call
34 @session_handle: Object path for the :ref:`org.freedesktop.impl.portal.Session` object representing the session being created
35 @app_id: App id of the application
36 @options: Vardict with optional further information
37 @response: Numeric response
38 @results: Vardict with the results of the call
39
40 Create a screen cast session.
41
42 The following results get returned in the @results vardict:
43
44 * ``session_id`` (``s``)
45
46 The session id. A string representing the created screen cast session.
47 -->
48 <method name="CreateSession">
49 <arg type="o" name="handle" direction="in"/>
50 <arg type="o" name="session_handle" direction="in"/>
51 <arg type="s" name="app_id" direction="in"/>
52 <annotation name="org.qtproject.QtDBus.QtTypeName.In3" value="QVariantMap"/>
53 <arg type="a{sv}" name="options" direction="in"/>
54 <arg type="u" name="response" direction="out"/>
55 <annotation name="org.qtproject.QtDBus.QtTypeName.Out1" value="QVariantMap"/>
56 <arg type="a{sv}" name="results" direction="out"/>
57 </method>
58 <!--
59 SelectSources:
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 @app_id: App id of the application
63 @options: Vardict with optional further information
64 @response: Numeric response
65 @results: Vardict with the results of the call
66
67 Configure what the screen cast session should record.
68
69 Supported keys in the @options vardict include:
70
71 * ``types`` (``u``)
72
73 Bitmask of what type of content to record. Default is MONITOR.
74
75 * ``multiple`` (``b``)
76
77 Whether to allow selecting multiple sources. Default is no.
78
79 * ``cursor_mode`` (``u``)
80
81 Determines how the cursor will be drawn in the screen cast stream. It must be
82 one of the cursor modes advertised in
83 #org.freedesktop.portal.impl.ScreenCast.AvailableCursorModes. Setting a cursor
84 mode not advertised will cause the screen cast session to be closed. The default
85 cursor mode is 'Hidden'.
86
87 This option was added in version 2 of this interface.
88
89 * ``restore_data`` (``(suv)``)
90
91 The data to restore from a previous session.
92
93 If the stored session cannot be restored, this value is ignored
94 and the user will be prompted normally. This may happen when, for
95 example, the session contains a monitor or a window that is not
96 available anymore, or when the stored permissions are withdrawn.
97
98 The restore data is composed of the vendor name (e.g. "GNOME" or
99 "KDE"), the version of the implementation-specific private data,
100 and the implementation-specific private data itself.
101
102 This option was added in version 4 of this interface.
103
104 * ``persist_mode`` (``u``)
105
106 How this session should persist. Default is 0. Accepted values are:
107
108 - ``0``: Do not persist (default)
109 - ``1``: Permissions persist as long as the application is running
110 - ``2``: Permissions persist until explicitly revoked
111
112 If the permission for the session to persist is granted,
113 "persist_mode" will be returned in the results of the
114 org.freedesktop.impl.portal.ScreenCast.Start() method.
115
116 This option was added in version 4 of this interface.
117
118 For available source types, see the AvailableSourceTypes property.
119 -->
120 <method name="SelectSources">
121 <arg type="o" name="handle" direction="in"/>
122 <arg type="o" name="session_handle" direction="in"/>
123 <arg type="s" name="app_id" direction="in"/>
124 <annotation name="org.qtproject.QtDBus.QtTypeName.In3" value="QVariantMap"/>
125 <arg type="a{sv}" name="options" direction="in"/>
126 <arg type="u" name="response" direction="out"/>
127 <annotation name="org.qtproject.QtDBus.QtTypeName.Out1" value="QVariantMap"/>
128 <arg type="a{sv}" name="results" direction="out"/>
129 </method>
130 <!--
131 Start:
132 @handle: Object path for the :ref:`org.freedesktop.impl.portal.Request` object representing this call
133 @session_handle: Object path for the :ref:`org.freedesktop.impl.portal.Session` object representing the session
134 @app_id: App id of the application
135 @parent_window: Identifier for the application window, see :doc:`window-identifiers`
136 @options: Vardict with optional further information
137 @response: Numeric response
138 @results: Vardict with the results of the call
139
140 Start the screen cast session. This will typically result the portal presenting
141 a dialog letting the user do the selection set up by SelectSources.
142
143 The following results get returned in the @results vardict:
144
145 * ``streams`` (``a(ua{sv})``)
146
147 An array of PipeWire streams. Each stream consists of a PipeWire
148 node ID (the first element in the tuple, and a Vardict of
149 properties.
150
151 Since version 6 of this interface, the node ID in the stream
152 tuple is deprecated for stream targeting. PipeWire node IDs can
153 be reused after node destruction; consumers should prefer the
154 ``pipewire-serial`` property from the stream properties dict
155 and ``PW_KEY_TARGET_OBJECT`` for connecting to streams.
156
157 The array will contain a single stream if 'multiple' (see
158 SelectSources) was set to 'false', or at least one stream if
159 'multiple' was set to 'true' as part of the SelectSources method.
160
161 Each stream contains the following properties:
162
163 * ``position`` (``(ii)``)
164
165 A tuple consisting of the position (x, y) in the compositor
166 coordinate space. Note that the position may not be equivalent to a
167 position in a pixel coordinate space. Only available for monitor
168 streams.
169
170 * ``size`` (``(ii)``)
171
172 A tuple consisting of (width, height). The size represents the size
173 of the stream as it is displayed in the compositor coordinate
174 space. Note that this size may not be equivalent to a size in a
175 pixel coordinate space. The size may differ from the size of the
176 stream.
177
178 * ``source_type`` (``u``)
179
180 The type of the content which is being screen casted.
181 For available source types, see the AvailableSourceTypes property.
182
183 This property was added in version 3 of this interface.
184
185 * ``mapping_id`` (``s``)
186
187 An optional identifier used to map different aspects of the
188 resource this stream corresponds to.
189
190 When used in a remote desktop session, the mapping_id can be used to
191 match a libei region of absolute libei devices. There may be
192 multiple absolute libei devices, and each device may have multiple
193 regions, but a mapping_id will only match one of these regions per
194 device.
195
196 This property was added in version 5 of this interface.
197
198 * ``pipewire-serial`` (``t``)
199
200 The PipeWire ``object.serial`` for this stream's node. Unlike the
201 node ID in the stream tuple (which can be reused after node
202 destruction), the serial is a monotonically increasing 64-bit
203 identifier that is never reused. Consumers should prefer the serial
204 for stream targeting via ``PW_KEY_TARGET_OBJECT`` when available.
205
206 This property was added in version 6 of this interface.
207
208 * ``persist_mode`` (``u``)
209
210 Portal implementations can optionally offer ways to "reduce" the
211 persist mode, for example by explicitly asking the user. See the
212 'persist_mode' option of SelectSources for a list of possible
213 values.
214
215 If no persist mode is returned by the Start request, it is assumed
216 to be the same persist mode received during SelectSources.
217
218 This option was added in version 4 of this interface.
219
220 * ``restore_data`` (``(suv)``)
221
222 The data to be restored. This is the data that a portal
223 implementation sent in reaction to transient or persistent
224 modes.
225
226 This data will be stored in the permission store if the effective
227 persist mode is 2, and may be passed in the future as part of the
228 SelectSources() method call. The portal backend should store enough
229 information in 'restore_data' to be able to restore the session
230 later. The portal backend can deal with unavailable sources however
231 they see fit.
232
233 Data generated by a portal implementation must be consumable by
234 the same portal implementation, but not necessarily by others.
235 Thus, it is important to properly handle 'restore_data' not being
236 in a valid format. This may happen when, e.g., the user switched
237 to another desktop environment, or is using a different portal
238 implementation.
239
240 This response option was added in version 4 of this interface.
241 -->
242 <method name="Start">
243 <arg type="o" name="handle" direction="in"/>
244 <arg type="o" name="session_handle" direction="in"/>
245 <arg type="s" name="app_id" direction="in"/>
246 <arg type="s" name="parent_window" direction="in"/>
247 <annotation name="org.qtproject.QtDBus.QtTypeName.In4" value="QVariantMap"/>
248 <arg type="a{sv}" name="options" direction="in"/>
249 <arg type="u" name="response" direction="out"/>
250 <annotation name="org.qtproject.QtDBus.QtTypeName.Out1" value="QVariantMap"/>
251 <arg type="a{sv}" name="results" direction="out"/>
252 </method>
253 <!--
254 AvailableSourceTypes:
255
256 A bitmask of available source types. Currently defined types are:
257
258 - ``1``: MONITOR: Share existing monitors
259 - ``2``: WINDOW: Share application windows
260 - ``4``: VIRTUAL: Extend with new virtual monitor
261 -->
262 <property name="AvailableSourceTypes" type="u" access="read"/>
263 <!--
264 AvailableCursorModes:
265
266 Available cursor mode values:
267
268 - ``1``: Hidden. The cursor is not part of the screen cast stream.
269 - ``2``: Embedded: The cursor is embedded as part of the stream buffers.
270 - ``4``: Metadata: The cursor is not part of the screen cast stream, but sent as PipeWire stream metadata.
271 -->
272 <property name="AvailableCursorModes" type="u" access="read"/>
273 <property name="version" type="u" access="read"/>
274 </interface>
275 </node>