Changeset View
Changeset View
Standalone View
Standalone View
krfb/dbus/xdp_dbus_screencast_interface.xml
- This file was added.
1 | <?xml version="1.0"?> | ||||
---|---|---|---|---|---|
2 | <!-- | ||||
3 | Copyright (C) 2017-2018 Red Hat, Inc. | ||||
4 | | ||||
5 | This library is free software; you can redistribute it and/or | ||||
6 | modify it under the terms of the GNU Lesser General Public | ||||
7 | License as published by the Free Software Foundation; either | ||||
8 | version 2 of the License, or (at your option) any later version. | ||||
9 | | ||||
10 | This library is distributed in the hope that it will be useful, | ||||
11 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||
12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||||
13 | Lesser General Public License for more details. | ||||
14 | | ||||
15 | You should have received a copy of the GNU Lesser General Public | ||||
16 | License along with this library. If not, see <http://www.gnu.org/licenses/>. | ||||
17 | --> | ||||
18 | | ||||
19 | <node name="/" xmlns:doc="http://www.freedesktop.org/dbus/1.0/doc.dtd"> | ||||
20 | <!-- | ||||
21 | org.freedesktop.portal.ScreenCast: | ||||
22 | @short_description: Screen cast portal | ||||
23 | --> | ||||
24 | <interface name="org.freedesktop.portal.ScreenCast"> | ||||
25 | <!-- | ||||
26 | CreateSession: | ||||
27 | @options: Vardict with optional further information | ||||
28 | @handle: Object path for the #org.freedesktop.portal.Request object representing this call | ||||
29 | | ||||
30 | Create a screen cast session. A successfully created session can at | ||||
31 | any time be closed using org.freedesktop.portal.Session::Close, or may | ||||
32 | at any time be closed by the portal implementation, which will be | ||||
33 | signalled via org.freedesktop.portal.Session::Closed. | ||||
34 | | ||||
35 | The following results get returned via the #org.freedesktop.portal.Request::Response signal: | ||||
36 | <variablelist> | ||||
37 | <varlistentry> | ||||
38 | <term>session_handle o</term> | ||||
39 | <listitem><para> | ||||
40 | The session handle. An object path for the | ||||
41 | #org.freedesktop.portal.Session object representing the created | ||||
42 | session. | ||||
43 | </para></listitem> | ||||
44 | </varlistentry> | ||||
45 | </variablelist> | ||||
46 | --> | ||||
47 | <method name="CreateSession"> | ||||
48 | <arg type="a{sv}" name="options" direction="in"/> | ||||
49 | <annotation name="org.qtproject.QtDBus.QtTypeName.In0" value="QVariantMap"/> | ||||
50 | <arg type="o" name="handle" direction="out"/> | ||||
51 | </method> | ||||
52 | <!-- | ||||
53 | SelectSources: | ||||
54 | @session_handle: Object path for the #org.freedesktop.portal.Session object | ||||
55 | @options: Vardict with optional further information | ||||
56 | @handle: Object path for the #org.freedesktop.portal.Request object representing this call | ||||
57 | | ||||
58 | Configure what the screen cast session should record. This method must | ||||
59 | be called before starting the session. | ||||
60 | | ||||
61 | Passing invalid input to this method will cause the session to be | ||||
62 | closed. An application may only attempt to select sources once per | ||||
63 | session. | ||||
64 | | ||||
65 | Supported keys in the @options vardict include: | ||||
66 | <variablelist> | ||||
67 | <varlistentry> | ||||
68 | <term>types u</term> | ||||
69 | <listitem><para> | ||||
70 | Bitmask of what types of content to record. Default is MONITOR. | ||||
71 | </para></listitem> | ||||
72 | </varlistentry> | ||||
73 | <varlistentry> | ||||
74 | <term>multiple b</term> | ||||
75 | <listitem><para> | ||||
76 | Whether to allow selecting multiple sources. Default is no. | ||||
77 | </para></listitem> | ||||
78 | </varlistentry> | ||||
79 | </variablelist> | ||||
80 | | ||||
81 | For available source types, see the AvailableSourceTypes property. | ||||
82 | --> | ||||
83 | <method name="SelectSources"> | ||||
84 | <arg type="o" name="session_handle" direction="in"/> | ||||
85 | <arg type="a{sv}" name="options" direction="in"/> | ||||
86 | <annotation name="org.qtproject.QtDBus.QtTypeName.In1" value="QVariantMap"/> | ||||
87 | <arg type="o" name="handle" direction="out"/> | ||||
88 | </method> | ||||
89 | <!-- | ||||
90 | Start: | ||||
91 | @session_handle: Object path for the #org.freedesktop.portal.Session object | ||||
92 | @parent_window: Identifier for the application window | ||||
93 | @options: Vardict with optional further information | ||||
94 | @handle: Object path for the #org.freedesktop.portal.Request object representing this call | ||||
95 | | ||||
96 | Start the screen cast session. This will typically result the portal | ||||
97 | presenting a dialog letting the user do the selection set up by | ||||
98 | SelectSources. An application can only attempt start a session once. | ||||
99 | | ||||
100 | A screen cast session may only be started after having selected sources | ||||
101 | using org.freedesktop.portal.ScreenCast::SelectSources. | ||||
102 | | ||||
103 | The @parent_window identifier must be of the form "x11:$XID" for an X11 | ||||
104 | window. Support for other window systems may be added in the future. | ||||
105 | | ||||
106 | The following results get returned via the | ||||
107 | #org.freedesktop.portal.Request::Response signal: | ||||
108 | <variablelist> | ||||
109 | <varlistentry> | ||||
110 | <term>streams a(ua{sv})</term> | ||||
111 | <listitem><para> | ||||
112 | An array of PipeWire streams. Each stream consists of a PipeWire | ||||
113 | node ID (the first element in the tuple, and a Vardict of | ||||
114 | properties. | ||||
115 | | ||||
116 | The array will contain a single stream if 'multiple' (see | ||||
117 | SelectSources) was set to 'false', or at least one stream if | ||||
118 | 'multiple' was set to 'true' as part of the SelectSources method. | ||||
119 | </para></listitem> | ||||
120 | </varlistentry> | ||||
121 | </variablelist> | ||||
122 | | ||||
123 | Stream properties include: | ||||
124 | <variablelist> | ||||
125 | <varlistentry> | ||||
126 | <term>position (ii)</term> | ||||
127 | <listitem><para> | ||||
128 | A tuple consisting of the position (x, y) in the compositor | ||||
129 | coordinate space. Note that the position may not be equivalent to a | ||||
130 | position in a pixel coordinate space. Only available for monitor | ||||
131 | streams. | ||||
132 | </para></listitem> | ||||
133 | </varlistentry> | ||||
134 | <varlistentry> | ||||
135 | <term>size (ii)</term> | ||||
136 | <listitem><para> | ||||
137 | A tuple consisting of (width, height). The size represents the size | ||||
138 | of the stream as it is displayed in the compositor coordinate | ||||
139 | space. Note that this size may not be equivalent to a size in a | ||||
140 | pixel coordinate space. The size may differ from the size of the | ||||
141 | stream. | ||||
142 | </para></listitem> | ||||
143 | </varlistentry> | ||||
144 | </variablelist> | ||||
145 | --> | ||||
146 | <method name="Start"> | ||||
147 | <arg type="o" name="session_handle" direction="in"/> | ||||
148 | <arg type="s" name="parent_window" direction="in"/> | ||||
149 | <arg type="a{sv}" name="options" direction="in"/> | ||||
150 | <annotation name="org.qtproject.QtDBus.QtTypeName.In2" value="QVariantMap"/> | ||||
151 | <arg type="o" name="handle" direction="out"/> | ||||
152 | </method> | ||||
153 | <!-- | ||||
154 | OpenPipeWireRemote: | ||||
155 | @session_handle: Object path for the #org.freedesktop.portal.Session object | ||||
156 | @options: Vardict with optional further information | ||||
157 | @fd: File descriptor of an open PipeWire remote. | ||||
158 | | ||||
159 | Open a file descriptor to the PipeWire remote where the screen cast | ||||
160 | streams are available. The file descriptor should be used to create a | ||||
161 | <classname>pw_remote</classname> object, by using | ||||
162 | <function>pw_remote_connect_fd</function>. Only the screen cast stream | ||||
163 | nodes will be available from this PipeWire node. | ||||
164 | --> | ||||
165 | <method name="OpenPipeWireRemote"> | ||||
166 | <annotation name="org.gtk.GDBus.C.Name" value="open_pipewire_remote"/> | ||||
167 | <annotation name="org.gtk.GDBus.C.UnixFD" value="true"/> | ||||
168 | <arg type="o" name="session_handle" direction="in"/> | ||||
169 | <arg type="a{sv}" name="options" direction="in"/> | ||||
170 | <annotation name="org.qtproject.QtDBus.QtTypeName.In1" value="QVariantMap"/> | ||||
171 | <arg type="h" name="fd" direction="out"/> | ||||
172 | </method> | ||||
173 | <!-- | ||||
174 | AvailableSourceTypes: | ||||
175 | | ||||
176 | A bitmask of available source types. Currently defined types are: | ||||
177 | | ||||
178 | <simplelist> | ||||
179 | <member>1: MONITOR</member> | ||||
180 | <member>2: WINDOW</member> | ||||
181 | </simplelist> | ||||
182 | --> | ||||
183 | <property name="AvailableSourceTypes" type="u" access="read"/> | ||||
184 | <property name="version" type="u" access="read"/> | ||||
185 | </interface> | ||||
186 | </node> |