Warning, /system/xwaylandvideobridge/src/org.freedesktop.portal.ScreenCast.xml is written in an unsupported language. File is not indexed.

0001 <?xml version="1.0"?>
0002 <!--
0003 # SPDX-License-Identifier: LGPL-2.0-or-later
0004 # SPDX-FileCopyrightText: 2017-2018 Red Hat, Inc.
0005 -->
0006 
0007 <node name="/" xmlns:doc="http://www.freedesktop.org/dbus/1.0/doc.dtd">
0008   <!--
0009       org.freedesktop.portal.ScreenCast:
0010       @short_description: Screen cast portal
0011 
0012       The Screen cast portal allows to create screen cast sessions.
0013 
0014       This documentation describes version 4 of this interface.
0015   -->
0016   <interface name="org.freedesktop.portal.ScreenCast">
0017     <!--
0018         CreateSession:
0019         @options: Vardict with optional further information
0020         @handle: Object path for the #org.freedesktop.portal.Request object representing this call
0021 
0022         Create a screen cast session. A successfully created session can at
0023         any time be closed using org.freedesktop.portal.Session.Close(), or may
0024         at any time be closed by the portal implementation, which will be
0025         signalled via #org.freedesktop.portal.Session::Closed.
0026 
0027         Supported keys in the @options vardict include:
0028         <variablelist>
0029           <varlistentry>
0030             <term>handle_token s</term>
0031             <listitem><para>
0032               A string that will be used as the last element of the @handle. Must be a valid
0033               object path element. See the #org.freedesktop.portal.Request documentation for
0034               more information about the @handle.
0035             </para></listitem>
0036           </varlistentry>
0037           <varlistentry>
0038             <term>session_handle_token s</term>
0039             <listitem><para>
0040               A string that will be used as the last element of the session handle. Must be a valid
0041               object path element. See the #org.freedesktop.portal.Session documentation for
0042               more information about the session handle.
0043             </para></listitem>
0044           </varlistentry>
0045         </variablelist>
0046 
0047         The following results get returned via the #org.freedesktop.portal.Request::Response signal:
0048         <variablelist>
0049           <varlistentry>
0050             <term>session_handle o</term>
0051             <listitem><para>
0052               The session handle. An object path for the
0053               #org.freedesktop.portal.Session object representing the created
0054               session.
0055             </para></listitem>
0056           </varlistentry>
0057         </variablelist>
0058     -->
0059     <method name="CreateSession">
0060       <arg type="a{sv}" name="options" direction="in"/>
0061       <arg type="o" name="handle" direction="out"/>
0062       <annotation name="org.qtproject.QtDBus.QtTypeName.In0" value="QVariantMap"/>
0063     </method>
0064     <!--
0065         SelectSources:
0066         @session_handle: Object path for the #org.freedesktop.portal.Session object
0067         @options: Vardict with optional further information
0068         @handle: Object path for the #org.freedesktop.portal.Request object representing this call
0069 
0070         Configure what the screen cast session should record. This method must
0071         be called before starting the session.
0072 
0073         Passing invalid input to this method will cause the session to be
0074         closed. An application may only attempt to select sources once per
0075         session.
0076 
0077         Supported keys in the @options vardict include:
0078         <variablelist>
0079           <varlistentry>
0080             <term>handle_token s</term>
0081             <listitem><para>
0082               A string that will be used as the last element of the @handle. Must be a valid
0083               object path element. See the #org.freedesktop.portal.Request documentation for
0084               more information about the @handle.
0085             </para></listitem>
0086           </varlistentry>
0087           <varlistentry>
0088             <term>types u</term>
0089             <listitem><para>
0090               Bitmask of what types of content to record. Default is MONITOR.
0091             </para></listitem>
0092           </varlistentry>
0093           <varlistentry>
0094             <term>multiple b</term>
0095             <listitem><para>
0096               Whether to allow selecting multiple sources. Default is no.
0097             </para></listitem>
0098           </varlistentry>
0099           <varlistentry>
0100             <term>cursor_mode u</term>
0101             <listitem><para>
0102               Determines how the cursor will be drawn in the screen cast stream. It must be
0103               one of the cursor modes advertised in
0104               #org.freedesktop.portal.ScreenCast.AvailableCursorModes. Setting a cursor mode
0105               not advertised will cause the screen cast session to be closed. The default
0106               cursor mode is 'Hidden'.
0107 
0108               This option was added in version 2 of this interface.
0109             </para></listitem>
0110           </varlistentry>
0111           <varlistentry>
0112             <term>restore_token s</term>
0113             <listitem><para>
0114               The token to restore a previous session.
0115 
0116               If the stored session cannot be restored, this value is ignored
0117               and the user will be prompted normally. This may happen when, for
0118               example, the session contains a monitor or a window that is not
0119               available anymore, or when the stored permissions are withdrawn.
0120 
0121               The restore token is invalidated after using it once. To restore
0122               the same session again, use the new restore token sent in response
0123               to starting this session.
0124 
0125               This option was added in version 4 of this interface.
0126             </para></listitem>
0127           </varlistentry>
0128           <varlistentry>
0129             <term>persist_mode u</term>
0130             <listitem><para>
0131               How this session should persist. Default is 0. Accepted values are:
0132 
0133               <simplelist>
0134                 <member>0: Do not persist (default)</member>
0135                 <member>1: Permissions persist as long as the application is running</member>
0136                 <member>2: Permissions persist until explicitly revoked</member>
0137               </simplelist>
0138 
0139               Remote desktop screen cast sessions cannot persist. The only allowed
0140               persist_mode for remote desktop sessions is 0.
0141 
0142               If the permission for the session to persist is granted, a restore token will
0143               be returned via the #org.freedesktop.portal.Request::Response signal of the
0144               #org.freedesktop.portal.ScreenCast.Start method.
0145 
0146               This option was added in version 4 of this interface.
0147             </para></listitem>
0148           </varlistentry>
0149         </variablelist>
0150 
0151         For available source types, see the AvailableSourceTypes property.
0152     -->
0153     <method name="SelectSources">
0154       <arg type="o" name="session_handle" direction="in"/>
0155       <arg type="a{sv}" name="options" direction="in"/>
0156       <annotation name="org.qtproject.QtDBus.QtTypeName.In1" value="QVariantMap"/>
0157       <arg type="o" name="handle" direction="out"/>
0158     </method>
0159     <!--
0160         Start:
0161         @session_handle: Object path for the #org.freedesktop.portal.Session object
0162         @parent_window: Identifier for the application window, see <link linkend="parent_window">Common Conventions</link>
0163         @options: Vardict with optional further information
0164         @handle: Object path for the #org.freedesktop.portal.Request object representing this call
0165 
0166         Start the screen cast session. This will typically result the portal
0167         presenting a dialog letting the user do the selection set up by
0168         org.freedesktop.portal.ScreenCast.SelectSources(). An application can
0169         only attempt start a session once.
0170 
0171         A screen cast session may only be started after having selected sources
0172         using org.freedesktop.portal.ScreenCast.SelectSources().
0173 
0174         Supported keys in the @options vardict include:
0175         <variablelist>
0176           <varlistentry>
0177             <term>handle_token s</term>
0178             <listitem><para>
0179               A string that will be used as the last element of the @handle. Must be a valid
0180               object path element. See the #org.freedesktop.portal.Request documentation for
0181               more information about the @handle.
0182             </para></listitem>
0183           </varlistentry>
0184         </variablelist>
0185 
0186         The following results get returned via the
0187         #org.freedesktop.portal.Request::Response signal:
0188         <variablelist>
0189           <varlistentry>
0190             <term>streams a(ua{sv})</term>
0191             <listitem><para>
0192               An array of PipeWire streams. Each stream consists of a PipeWire
0193               node ID (the first element in the tuple, and a Vardict of
0194               properties.
0195 
0196               The array will contain a single stream if 'multiple' (see
0197               org.freedesktop.portal.ScreenCast.SelectSources())
0198               was set to 'false', or at least one stream if
0199               'multiple' was set to 'true' as part of the
0200               org.freedesktop.portal.ScreenCast.SelectSources() method.
0201             </para></listitem>
0202           </varlistentry>
0203           <varlistentry>
0204             <term>restore_token s</term>
0205             <listitem><para>
0206               The restore token. This token is a single use token that can later
0207               be used to restore a session. See
0208               org.freedesktop.portal.ScreenCast.SelectSources() for details.
0209 
0210               This response option was added in version 4 of this interface.
0211             </para></listitem>
0212           </varlistentry>
0213         </variablelist>
0214 
0215         Stream properties include:
0216         <variablelist>
0217           <varlistentry>
0218             <term>id s</term>
0219             <listitem><para>
0220               Opaque identifier. Will be unique for this stream and local to this
0221               session. Will persist with future sessions, if they are restored
0222               using a restore token. This property was added in version 4 of this
0223               interface. Optional.
0224             </para></listitem>
0225           </varlistentry>
0226           <varlistentry>
0227             <term>position (ii)</term>
0228             <listitem><para>
0229               A tuple consisting of the position (x, y) in the compositor
0230               coordinate space. Note that the position may not be equivalent to a
0231               position in a pixel coordinate space. Only available for monitor
0232               streams. Optional.
0233             </para></listitem>
0234           </varlistentry>
0235           <varlistentry>
0236             <term>size (ii)</term>
0237             <listitem><para>
0238               A tuple consisting of (width, height). The size represents the size
0239               of the stream as it is displayed in the compositor coordinate
0240               space. Note that this size may not be equivalent to a size in a
0241               pixel coordinate space. The size may differ from the size of the
0242               stream. Optional.
0243             </para></listitem>
0244           </varlistentry>
0245           <varlistentry>
0246             <term>source_type u</term>
0247             <listitem><para>
0248               The type of the content which is being screen casted.
0249               For available source types, see the AvailableSourceTypes property.
0250               This property was added in version 3 of this interface.
0251             </para></listitem>
0252           </varlistentry>
0253         </variablelist>
0254     -->
0255     <method name="Start">
0256       <arg type="o" name="session_handle" direction="in"/>
0257       <arg type="s" name="parent_window" direction="in"/>
0258       <arg type="a{sv}" name="options" direction="in"/>
0259       <annotation name="org.qtproject.QtDBus.QtTypeName.In2" value="QVariantMap"/>
0260       <arg type="o" name="handle" direction="out"/>
0261     </method>
0262     <!--
0263         OpenPipeWireRemote:
0264         @session_handle: Object path for the #org.freedesktop.portal.Session object
0265         @options: Vardict with optional further information
0266         @fd: File descriptor of an open PipeWire remote.
0267 
0268         Open a file descriptor to the PipeWire remote where the screen cast
0269         streams are available. The file descriptor should be used to create a
0270         <classname>pw_core</classname> object, by using
0271         <function>pw_context_connect_fd</function>. Only the screen cast stream
0272         nodes will be available from this PipeWire node.
0273     -->
0274     <method name="OpenPipeWireRemote">
0275       <annotation name="org.gtk.GDBus.C.Name" value="open_pipewire_remote"/>
0276       <annotation name="org.gtk.GDBus.C.UnixFD" value="true"/>
0277       <arg type="o" name="session_handle" direction="in"/>
0278       <arg type="a{sv}" name="options" direction="in"/>
0279       <annotation name="org.qtproject.QtDBus.QtTypeName.In1" value="QVariantMap"/>
0280       <arg type="h" name="fd" direction="out"/>
0281     </method>
0282     <!--
0283         AvailableSourceTypes:
0284 
0285         A bitmask of available source types. Currently defined types are:
0286 
0287         <simplelist>
0288           <member>1: MONITOR</member>
0289           <member>2: WINDOW</member>
0290           <member>4: VIRTUAL</member>
0291         </simplelist>
0292     -->
0293     <property name="AvailableSourceTypes" type="u" access="read"/>
0294     <!--
0295         AvailableCursorModes:
0296 
0297         A bitmask of available cursor modes.
0298 
0299         Available cursor mode values:
0300         <simplelist>
0301           <member>1: Hidden. The cursor is not part of the screen cast stream.</member>
0302           <member>2: Embedded: The cursor is embedded as part of the stream buffers.</member>
0303           <member>4: Metadata: The cursor is not part of the screen cast stream, but sent as PipeWire stream metadata.</member>
0304         </simplelist>
0305 
0306         This property was added in version 2 of this interface.
0307     -->
0308     <property name="AvailableCursorModes" type="u" access="read"/>
0309     <property name="version" type="u" access="read"/>
0310   </interface>
0311 </node>