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 5 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 The array will contain a single stream if 'multiple' (see
152 SelectSources) was set to 'false', or at least one stream if
153 'multiple' was set to 'true' as part of the SelectSources method.
154
155 Each stream contains the following properties:
156
157 * ``position`` (``(ii)``)
158
159 A tuple consisting of the position (x, y) in the compositor
160 coordinate space. Note that the position may not be equivalent to a
161 position in a pixel coordinate space. Only available for monitor
162 streams.
163
164 * ``size`` (``(ii)``)
165
166 A tuple consisting of (width, height). The size represents the size
167 of the stream as it is displayed in the compositor coordinate
168 space. Note that this size may not be equivalent to a size in a
169 pixel coordinate space. The size may differ from the size of the
170 stream.
171
172 * ``source_type`` (``u``)
173
174 The type of the content which is being screen casted.
175 For available source types, see the AvailableSourceTypes property.
176
177 This property was added in version 3 of this interface.
178
179 * ``mapping_id`` (``s``)
180
181 An optional identifier used to map different aspects of the
182 resource this stream corresponds to.
183
184 When used in a remote desktop session, the mapping_id can be used to
185 match a libei region of absolute libei devices. There may be
186 multiple absolute libei devices, and each device may have multiple
187 regions, but a mapping_id will only match one of these regions per
188 device.
189
190 This property was added in version 5 of this interface.
191
192 * ``persist_mode`` (``u``)
193
194 Portal implementations can optionally offer ways to "reduce" the
195 persist mode, for example by explicitly asking the user. See the
196 'persist_mode' option of SelectSources for a list of possible
197 values.
198
199 If no persist mode is returned by the Start request, it is assumed
200 to be the same persist mode received during SelectSources.
201
202 This option was added in version 4 of this interface.
203
204 * ``restore_data`` (``(suv)``)
205
206 The data to be restored. This is the data that a portal
207 implementation sent in reaction to transient or persistent
208 modes.
209
210 This data will be stored in the permission store if the effective
211 persist mode is 2, and may be passed in the future as part of the
212 SelectSources() method call. The portal backend should store enough
213 information in 'restore_data' to be able to restore the session
214 later. The portal backend can deal with unavailable sources however
215 they see fit.
216
217 Data generated by a portal implementation must be consumable by
218 the same portal implementation, but not necessarily by others.
219 Thus, it is important to properly handle 'restore_data' not being
220 in a valid format. This may happen when, e.g., the user switched
221 to another desktop environment, or is using a different portal
222 implementation.
223
224 This response option was added in version 4 of this interface.
225 -->
226 <method name="Start">
227 <arg type="o" name="handle" direction="in"/>
228 <arg type="o" name="session_handle" direction="in"/>
229 <arg type="s" name="app_id" direction="in"/>
230 <arg type="s" name="parent_window" direction="in"/>
231 <annotation name="org.qtproject.QtDBus.QtTypeName.In4" value="QVariantMap"/>
232 <arg type="a{sv}" name="options" direction="in"/>
233 <arg type="u" name="response" direction="out"/>
234 <annotation name="org.qtproject.QtDBus.QtTypeName.Out1" value="QVariantMap"/>
235 <arg type="a{sv}" name="results" direction="out"/>
236 </method>
237 <!--
238 AvailableSourceTypes:
239
240 A bitmask of available source types. Currently defined types are:
241
242 - ``1``: MONITOR: Share existing monitors
243 - ``2``: WINDOW: Share application windows
244 - ``4``: VIRTUAL: Extend with new virtual monitor
245 -->
246 <property name="AvailableSourceTypes" type="u" access="read"/>
247 <!--
248 AvailableCursorModes:
249
250 Available cursor mode values:
251
252 - ``1``: Hidden. The cursor is not part of the screen cast stream.
253 - ``2``: Embedded: The cursor is embedded as part of the stream buffers.
254 - ``4``: Metadata: The cursor is not part of the screen cast stream, but sent as PipeWire stream metadata.
255 -->
256 <property name="AvailableCursorModes" type="u" access="read"/>
257 <property name="version" type="u" access="read"/>
258 </interface>
259 </node>