ext-workspace-v1.xml 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <protocol name="ext_workspace_v1">
  3. <copyright>
  4. Copyright © 2019 Christopher Billington
  5. Copyright © 2020 Ilia Bozhinov
  6. Copyright © 2022 Victoria Brekenfeld
  7. Permission to use, copy, modify, distribute, and sell this
  8. software and its documentation for any purpose is hereby granted
  9. without fee, provided that the above copyright notice appear in
  10. all copies and that both that copyright notice and this permission
  11. notice appear in supporting documentation, and that the name of
  12. the copyright holders not be used in advertising or publicity
  13. pertaining to distribution of the software without specific,
  14. written prior permission. The copyright holders make no
  15. representations about the suitability of this software for any
  16. purpose. It is provided "as is" without express or implied
  17. warranty.
  18. THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS
  19. SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
  20. FITNESS, IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY
  21. SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
  22. WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
  23. AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
  24. ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF
  25. THIS SOFTWARE.
  26. </copyright>
  27. <interface name="ext_workspace_manager_v1" version="1">
  28. <description summary="list and control workspaces">
  29. Workspaces, also called virtual desktops, are groups of surfaces. A
  30. compositor with a concept of workspaces may only show some such groups of
  31. surfaces (those of 'active' workspaces) at a time. 'Activating' a
  32. workspace is a request for the compositor to display that workspace's
  33. surfaces as normal, whereas the compositor may hide or otherwise
  34. de-emphasise surfaces that are associated only with 'inactive' workspaces.
  35. Workspaces are grouped by which sets of outputs they correspond to, and
  36. may contain surfaces only from those outputs. In this way, it is possible
  37. for each output to have its own set of workspaces, or for all outputs (or
  38. any other arbitrary grouping) to share workspaces. Compositors may
  39. optionally conceptually arrange each group of workspaces in an
  40. N-dimensional grid.
  41. The purpose of this protocol is to enable the creation of taskbars and
  42. docks by providing them with a list of workspaces and their properties,
  43. and allowing them to activate and deactivate workspaces.
  44. After a client binds the ext_workspace_manager_v1, each workspace will be
  45. sent via the workspace event.
  46. </description>
  47. <event name="workspace_group">
  48. <description summary="a workspace group has been created">
  49. This event is emitted whenever a new workspace group has been created.
  50. All initial details of the workspace group (outputs) will be
  51. sent immediately after this event via the corresponding events in
  52. ext_workspace_group_handle_v1 and ext_workspace_handle_v1.
  53. </description>
  54. <arg name="workspace_group" type="new_id" interface="ext_workspace_group_handle_v1"/>
  55. </event>
  56. <event name="workspace">
  57. <description summary="workspace has been created">
  58. This event is emitted whenever a new workspace has been created.
  59. All initial details of the workspace (name, coordinates, state) will
  60. be sent immediately after this event via the corresponding events in
  61. ext_workspace_handle_v1.
  62. Workspaces start off unassigned to any workspace group.
  63. </description>
  64. <arg name="workspace" type="new_id" interface="ext_workspace_handle_v1"/>
  65. </event>
  66. <request name="commit">
  67. <description summary="all requests about the workspaces have been sent">
  68. The client must send this request after it has finished sending other
  69. requests. The compositor must process a series of requests preceding a
  70. commit request atomically.
  71. This allows changes to the workspace properties to be seen as atomic,
  72. even if they happen via multiple events, and even if they involve
  73. multiple ext_workspace_handle_v1 objects, for example, deactivating one
  74. workspace and activating another.
  75. </description>
  76. </request>
  77. <event name="done">
  78. <description summary="all information about the workspaces and workspace groups has been sent">
  79. This event is sent after all changes in all workspaces and workspace groups have been
  80. sent.
  81. This allows changes to one or more ext_workspace_group_handle_v1
  82. properties and ext_workspace_handle_v1 properties
  83. to be seen as atomic, even if they happen via multiple events.
  84. In particular, an output moving from one workspace group to
  85. another sends an output_enter event and an output_leave event to the two
  86. ext_workspace_group_handle_v1 objects in question. The compositor sends
  87. the done event only after updating the output information in both
  88. workspace groups.
  89. </description>
  90. </event>
  91. <event name="finished" type="destructor">
  92. <description summary="the compositor has finished with the workspace_manager">
  93. This event indicates that the compositor is done sending events to the
  94. ext_workspace_manager_v1. The server will destroy the object
  95. immediately after sending this request.
  96. </description>
  97. </event>
  98. <request name="stop">
  99. <description summary="stop sending events">
  100. Indicates the client no longer wishes to receive events for new
  101. workspace groups. However the compositor may emit further workspace
  102. events, until the finished event is emitted. The compositor is expected
  103. to send the finished event eventually once the stop request has been processed.
  104. The client must not send any requests after this one, doing so will raise a wl_display
  105. invalid_object error.
  106. </description>
  107. </request>
  108. </interface>
  109. <interface name="ext_workspace_group_handle_v1" version="1">
  110. <description summary="a workspace group assigned to a set of outputs">
  111. A ext_workspace_group_handle_v1 object represents a workspace group
  112. that is assigned a set of outputs and contains a number of workspaces.
  113. The set of outputs assigned to the workspace group is conveyed to the client via
  114. output_enter and output_leave events, and its workspaces are conveyed with
  115. workspace events.
  116. For example, a compositor which has a set of workspaces for each output may
  117. advertise a workspace group (and its workspaces) per output, whereas a compositor
  118. where a workspace spans all outputs may advertise a single workspace group for all
  119. outputs.
  120. </description>
  121. <enum name="group_capabilities" bitfield="true">
  122. <entry name="create_workspace" value="1" summary="create_workspace request is available"/>
  123. </enum>
  124. <event name="capabilities">
  125. <description summary="compositor capabilities">
  126. This event advertises the capabilities supported by the compositor. If
  127. a capability isn't supported, clients should hide or disable the UI
  128. elements that expose this functionality. For instance, if the
  129. compositor doesn't advertise support for creating workspaces, a button
  130. triggering the create_workspace request should not be displayed.
  131. The compositor will ignore requests it doesn't support. For instance,
  132. a compositor which doesn't advertise support for creating workspaces will ignore
  133. create_workspace requests.
  134. Compositors must send this event once after creation of an
  135. ext_workspace_group_handle_v1. When the capabilities change, compositors
  136. must send this event again.
  137. </description>
  138. <arg name="capabilities" type="uint" summary="capabilities" enum="group_capabilities"/>
  139. </event>
  140. <event name="output_enter">
  141. <description summary="output assigned to workspace group">
  142. This event is emitted whenever an output is assigned to the workspace
  143. group or a new `wl_output` object is bound by the client, which was already
  144. assigned to this workspace_group.
  145. </description>
  146. <arg name="output" type="object" interface="wl_output"/>
  147. </event>
  148. <event name="output_leave">
  149. <description summary="output removed from workspace group">
  150. This event is emitted whenever an output is removed from the workspace
  151. group.
  152. </description>
  153. <arg name="output" type="object" interface="wl_output"/>
  154. </event>
  155. <event name="workspace_enter">
  156. <description summary="workspace added to workspace group">
  157. This event is emitted whenever a workspace is assigned to this group.
  158. A workspace may only ever be assigned to a single group at a single point
  159. in time, but can be re-assigned during its lifetime.
  160. </description>
  161. <arg name="workspace" type="object" interface="ext_workspace_handle_v1"/>
  162. </event>
  163. <event name="workspace_leave">
  164. <description summary="workspace removed from workspace group">
  165. This event is emitted whenever a workspace is removed from this group.
  166. </description>
  167. <arg name="workspace" type="object" interface="ext_workspace_handle_v1"/>
  168. </event>
  169. <event name="removed">
  170. <description summary="this workspace group has been removed">
  171. This event is send when the group associated with the ext_workspace_group_handle_v1
  172. has been removed. After sending this request the compositor will immediately consider
  173. the object inert. Any requests will be ignored except the destroy request.
  174. It is guaranteed there won't be any more events referencing this
  175. ext_workspace_group_handle_v1.
  176. The compositor must remove all workspaces belonging to a workspace group
  177. via a workspace_leave event before removing the workspace group.
  178. </description>
  179. </event>
  180. <request name="create_workspace">
  181. <description summary="create a new workspace">
  182. Request that the compositor create a new workspace with the given name
  183. and assign it to this group.
  184. There is no guarantee that the compositor will create a new workspace,
  185. or that the created workspace will have the provided name.
  186. </description>
  187. <arg name="workspace" type="string"/>
  188. </request>
  189. <request name="destroy" type="destructor">
  190. <description summary="destroy the ext_workspace_group_handle_v1 object">
  191. Destroys the ext_workspace_group_handle_v1 object.
  192. This request should be send either when the client does not want to
  193. use the workspace group object any more or after the removed event to finalize
  194. the destruction of the object.
  195. </description>
  196. </request>
  197. </interface>
  198. <interface name="ext_workspace_handle_v1" version="1">
  199. <description summary="a workspace handing a group of surfaces">
  200. A ext_workspace_handle_v1 object represents a workspace that handles a
  201. group of surfaces.
  202. Each workspace has:
  203. - a name, conveyed to the client with the name event
  204. - potentially an id conveyed with the id event
  205. - a list of states, conveyed to the client with the state event
  206. - and optionally a set of coordinates, conveyed to the client with the
  207. coordinates event
  208. The client may request that the compositor activate or deactivate the workspace.
  209. Each workspace can belong to only a single workspace group.
  210. Depending on the compositor policy, there might be workspaces with
  211. the same name in different workspace groups, but these workspaces are still
  212. separate (e.g. one of them might be active while the other is not).
  213. </description>
  214. <event name="id">
  215. <description summary="workspace id">
  216. If this event is emitted, it will be send immediately after the
  217. ext_workspace_handle_v1 is created or when an id is assigned to
  218. a workspace (at most once during its lifetime).
  219. An id will never change during the lifetime of the `ext_workspace_handle_v1`
  220. and is guaranteed to be unique during its lifetime.
  221. Ids are not human-readable and shouldn't be displayed, use `name` for that purpose.
  222. Compositors are expected to only send ids for workspaces likely stable across multiple
  223. sessions and can be used by clients to store preferences for workspaces. Workspaces without
  224. ids should be considered temporary and any data associated with them should be deleted once
  225. the respective object is lost.
  226. </description>
  227. <arg name="id" type="string"/>
  228. </event>
  229. <event name="name">
  230. <description summary="workspace name changed">
  231. This event is emitted immediately after the ext_workspace_handle_v1 is
  232. created and whenever the name of the workspace changes.
  233. A name is meant to be human-readable and can be displayed to a user.
  234. Unlike the id it is neither stable nor unique.
  235. </description>
  236. <arg name="name" type="string"/>
  237. </event>
  238. <event name="coordinates">
  239. <description summary="workspace coordinates changed">
  240. This event is used to organize workspaces into an N-dimensional grid
  241. within a workspace group, and if supported, is emitted immediately after
  242. the ext_workspace_handle_v1 is created and whenever the coordinates of
  243. the workspace change. Compositors may not send this event if they do not
  244. conceptually arrange workspaces in this way. If compositors simply
  245. number workspaces, without any geometric interpretation, they may send
  246. 1D coordinates, which clients should not interpret as implying any
  247. geometry. Sending an empty array means that the compositor no longer
  248. orders the workspace geometrically.
  249. Coordinates have an arbitrary number of dimensions N with an uint32
  250. position along each dimension. By convention if N > 1, the first
  251. dimension is X, the second Y, the third Z, and so on. The compositor may
  252. chose to utilize these events for a more novel workspace layout
  253. convention, however. No guarantee is made about the grid being filled or
  254. bounded; there may be a workspace at coordinate 1 and another at
  255. coordinate 1000 and none in between. Within a workspace group, however,
  256. workspaces must have unique coordinates of equal dimensionality.
  257. </description>
  258. <arg name="coordinates" type="array"/>
  259. </event>
  260. <enum name="state" bitfield="true">
  261. <description summary="types of states on the workspace">
  262. The different states that a workspace can have.
  263. </description>
  264. <entry name="active" value="1" summary="the workspace is active"/>
  265. <entry name="urgent" value="2" summary="the workspace requests attention"/>
  266. <entry name="hidden" value="4">
  267. <description summary="the workspace is not visible">
  268. The workspace is not visible in its workspace group, and clients
  269. attempting to visualize the compositor workspace state should not
  270. display such workspaces.
  271. </description>
  272. </entry>
  273. </enum>
  274. <event name="state">
  275. <description summary="the state of the workspace changed">
  276. This event is emitted immediately after the ext_workspace_handle_v1 is
  277. created and each time the workspace state changes, either because of a
  278. compositor action or because of a request in this protocol.
  279. Missing states convey the opposite meaning, e.g. an unset active bit
  280. means the workspace is currently inactive.
  281. </description>
  282. <arg name="state" type="uint" enum="state"/>
  283. </event>
  284. <enum name="workspace_capabilities" bitfield="true">
  285. <entry name="activate" value="1" summary="activate request is available"/>
  286. <entry name="deactivate" value="2" summary="deactivate request is available"/>
  287. <entry name="remove" value="4" summary="remove request is available"/>
  288. <entry name="assign" value="8" summary="assign request is available"/>
  289. </enum>
  290. <event name="capabilities">
  291. <description summary="compositor capabilities">
  292. This event advertises the capabilities supported by the compositor. If
  293. a capability isn't supported, clients should hide or disable the UI
  294. elements that expose this functionality. For instance, if the
  295. compositor doesn't advertise support for removing workspaces, a button
  296. triggering the remove request should not be displayed.
  297. The compositor will ignore requests it doesn't support. For instance,
  298. a compositor which doesn't advertise support for remove will ignore
  299. remove requests.
  300. Compositors must send this event once after creation of an
  301. ext_workspace_handle_v1 . When the capabilities change, compositors
  302. must send this event again.
  303. </description>
  304. <arg name="capabilities" type="uint" summary="capabilities" enum="workspace_capabilities"/>
  305. </event>
  306. <event name="removed">
  307. <description summary="this workspace has been removed">
  308. This event is send when the workspace associated with the ext_workspace_handle_v1
  309. has been removed. After sending this request, the compositor will immediately consider
  310. the object inert. Any requests will be ignored except the destroy request.
  311. It is guaranteed there won't be any more events referencing this
  312. ext_workspace_handle_v1.
  313. The compositor must only remove a workspaces not currently belonging to any
  314. workspace_group.
  315. </description>
  316. </event>
  317. <request name="destroy" type="destructor">
  318. <description summary="destroy the ext_workspace_handle_v1 object">
  319. Destroys the ext_workspace_handle_v1 object.
  320. This request should be made either when the client does not want to
  321. use the workspace object any more or after the remove event to finalize
  322. the destruction of the object.
  323. </description>
  324. </request>
  325. <request name="activate">
  326. <description summary="activate the workspace">
  327. Request that this workspace be activated.
  328. There is no guarantee the workspace will be actually activated, and
  329. behaviour may be compositor-dependent. For example, activating a
  330. workspace may or may not deactivate all other workspaces in the same
  331. group.
  332. </description>
  333. </request>
  334. <request name="deactivate">
  335. <description summary="deactivate the workspace">
  336. Request that this workspace be deactivated.
  337. There is no guarantee the workspace will be actually deactivated.
  338. </description>
  339. </request>
  340. <request name="assign">
  341. <description summary="assign workspace to group">
  342. Requests that this workspace is assigned to the given workspace group.
  343. There is no guarantee the workspace will be assigned.
  344. </description>
  345. <arg name="workspace_group" type="object" interface="ext_workspace_group_handle_v1"/>
  346. </request>
  347. <request name="remove">
  348. <description summary="remove the workspace">
  349. Request that this workspace be removed.
  350. There is no guarantee the workspace will be actually removed.
  351. </description>
  352. </request>
  353. </interface>
  354. </protocol>