cosmic-workspace-unstable-v1.xml 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <protocol name="cosmic_workspace_unstable_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="zcosmic_workspace_manager_v1" version="2">
  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 zcosmic_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 (workspaces, outputs) will be
  51. sent immediately after this event via the corresponding events in
  52. zcosmic_workspace_group_handle_v1.
  53. </description>
  54. <arg name="workspace_group" type="new_id" interface="zcosmic_workspace_group_handle_v1"/>
  55. </event>
  56. <request name="commit">
  57. <description summary="all requests about the workspaces have been sent">
  58. The client must send this request after it has finished sending other
  59. requests. The compositor must process a series of requests preceding a
  60. commit request atomically.
  61. This allows changes to the workspace properties to be seen as atomic,
  62. even if they happen via multiple events, and even if they involve
  63. multiple zcosmic_workspace_handle_v1 objects, for example, deactivating one
  64. workspace and activating another.
  65. </description>
  66. </request>
  67. <event name="done">
  68. <description summary="all information about the workspace groups has been sent">
  69. This event is sent after all changes in all workspace groups have been
  70. sent.
  71. This allows changes to one or more zcosmic_workspace_group_handle_v1
  72. properties and zcosmic_workspace_handle_v1 properties to be seen as atomic,
  73. even if they happen via multiple events.
  74. In particular, an output moving from one workspace group to
  75. another sends an output_enter event and an output_leave event to the two
  76. zcosmic_workspace_group_handle_v1 objects in question. The compositor sends
  77. the done event only after updating the output information in both
  78. workspace groups.
  79. </description>
  80. </event>
  81. <event name="finished">
  82. <description summary="the compositor has finished with the workspace_manager">
  83. This event indicates that the compositor is done sending events to the
  84. zcosmic_workspace_manager_v1. The server will destroy the object
  85. immediately after sending this request, so it will become invalid and
  86. the client should free any resources associated with it.
  87. </description>
  88. </event>
  89. <request name="stop">
  90. <description summary="stop sending events">
  91. Indicates the client no longer wishes to receive events for new
  92. workspace groups. However the compositor may emit further workspace
  93. events, until the finished event is emitted.
  94. The client must not send any more requests after this one.
  95. </description>
  96. </request>
  97. </interface>
  98. <interface name="zcosmic_workspace_group_handle_v1" version="2">
  99. <description summary="a workspace group assigned to a set of outputs">
  100. A zcosmic_workspace_group_handle_v1 object represents a a workspace group
  101. that is assigned a set of outputs and contains a number of workspaces.
  102. The set of outputs assigned to the workspace group is conveyed to the client via
  103. output_enter and output_leave events, and its workspaces are conveyed with
  104. workspace events.
  105. For example, a compositor which has a set of workspaces for each output may
  106. advertise a workspace group (and its workspaces) per output, whereas a compositor
  107. where a workspace spans all outputs may advertise a single workspace group for all
  108. outputs.
  109. </description>
  110. <enum name="zcosmic_workspace_group_capabilities_v1">
  111. <entry name="create_workspace" value="1" summary="create_workspace request is available"/>
  112. </enum>
  113. <event name="capabilities">
  114. <description summary="compositor capabilities">
  115. This event advertises the capabilities supported by the compositor. If
  116. a capability isn't supported, clients should hide or disable the UI
  117. elements that expose this functionality. For instance, if the
  118. compositor doesn't advertise support for creating workspaces, a button
  119. triggering the create_workspace request should not be displayed.
  120. The compositor will ignore requests it doesn't support. For instance,
  121. a compositor which doesn't advertise support for creating workspaces will ignore
  122. create_workspace requests.
  123. Compositors must send this event once after creation of an
  124. zcosmic_workspace_group_handle_v1 . When the capabilities change, compositors
  125. must send this event again.
  126. The capabilities are sent as an array of 32-bit unsigned integers in
  127. native endianness.
  128. </description>
  129. <arg name="capabilities" type="array" summary="array of 32-bit capabilities"/>
  130. </event>
  131. <event name="output_enter">
  132. <description summary="output assigned to workspace group">
  133. This event is emitted whenever an output is assigned to the workspace
  134. group.
  135. </description>
  136. <arg name="output" type="object" interface="wl_output"/>
  137. </event>
  138. <event name="output_leave">
  139. <description summary="output removed from workspace group">
  140. This event is emitted whenever an output is removed from the workspace
  141. group.
  142. </description>
  143. <arg name="output" type="object" interface="wl_output"/>
  144. </event>
  145. <event name="workspace">
  146. <description summary="workspace added to workspace group">
  147. This event is emitted whenever a new workspace has been created.
  148. A workspace can only be a member of a single workspace group and cannot
  149. be re-assigned.
  150. All initial details of the workspace (name, coordinates, state) will
  151. be sent immediately after this event via the corresponding events in
  152. zcosmic_workspace_handle_v1.
  153. </description>
  154. <arg name="workspace" type="new_id" interface="zcosmic_workspace_handle_v1"/>
  155. </event>
  156. <event name="remove">
  157. <description summary="this workspace group has been destroyed">
  158. This event means the zcosmic_workspace_group_handle_v1 has been destroyed.
  159. It is guaranteed there won't be any more events for this
  160. zcosmic_workspace_group_handle_v1. The zext_workspace_group_handle_v1 becomes
  161. inert so any requests will be ignored except the destroy request.
  162. The compositor must remove all workspaces belonging to a workspace group
  163. before removing the workspace group.
  164. </description>
  165. </event>
  166. <request name="create_workspace">
  167. <description summary="create a new workspace">
  168. Request that the compositor create a new workspace with the given name.
  169. There is no guarantee that the compositor will create a new workspace,
  170. or that the created workspace will have the provided name.
  171. </description>
  172. <arg name="workspace" type="string"/>
  173. </request>
  174. <request name="destroy" type="destructor">
  175. <description summary="destroy the zcosmic_workspace_group_handle_v1 object">
  176. Destroys the zcosmic_workspace_group_handle_v1 object.
  177. This request should be called either when the client does not want to
  178. use the workspace object any more or after the remove event to finalize
  179. the destruction of the object.
  180. </description>
  181. </request>
  182. </interface>
  183. <interface name="zcosmic_workspace_handle_v1" version="2">
  184. <description summary="a workspace handing a group of surfaces">
  185. A zcosmic_workspace_handle_v1 object represents a a workspace that handles a
  186. group of surfaces.
  187. Each workspace has a name, conveyed to the client with the name event; a
  188. list of states, conveyed to the client with the state event; and
  189. optionally a set of coordinates, conveyed to the client with the
  190. coordinates event. The client may request that the compositor activate or
  191. deactivate the workspace.
  192. Each workspace can belong to only a single workspace group.
  193. Depepending on the compositor policy, there might be workspaces with
  194. the same name in different workspace groups, but these workspaces are still
  195. separate (e.g. one of them might be active while the other is not).
  196. </description>
  197. <event name="name">
  198. <description summary="workspace name changed">
  199. This event is emitted immediately after the zcosmic_workspace_handle_v1 is
  200. created and whenever the name of the workspace changes.
  201. </description>
  202. <arg name="name" type="string"/>
  203. </event>
  204. <event name="coordinates">
  205. <description summary="workspace coordinates changed">
  206. This event is used to organize workspaces into an N-dimensional grid
  207. within a workspace group, and if supported, is emitted immediately after
  208. the zcosmic_workspace_handle_v1 is created and whenever the coordinates of
  209. the workspace change. Compositors may not send this event if they do not
  210. conceptually arrange workspaces in this way. If compositors simply
  211. number workspaces, without any geometric interpretation, they may send
  212. 1D coordinates, which clients should not interpret as implying any
  213. geometry. Sending an empty array means that the compositor no longer
  214. orders the workspace geometrically.
  215. Coordinates have an arbitrary number of dimensions N with an uint32
  216. position along each dimension. By convention if N > 1, the first
  217. dimension is X, the second Y, the third Z, and so on. The compositor may
  218. chose to utilize these events for a more novel workspace layout
  219. convention, however. No guarantee is made about the grid being filled or
  220. bounded; there may be a workspace at coordinate 1 and another at
  221. coordinate 1000 and none in between. Within a workspace group, however,
  222. workspaces must have unique coordinates of equal dimensionality.
  223. </description>
  224. <arg name="coordinates" type="array"/>
  225. </event>
  226. <event name="state">
  227. <description summary="the state of the workspace changed">
  228. This event is emitted immediately after the zcosmic_workspace_handle_v1 is
  229. created and each time the workspace state changes, either because of a
  230. compositor action or because of a request in this protocol.
  231. </description>
  232. <arg name="state" type="array"/>
  233. </event>
  234. <enum name="state">
  235. <description summary="types of states on the workspace">
  236. The different states that a workspace can have.
  237. </description>
  238. <entry name="active" value="0" summary="the workspace is active"/>
  239. <entry name="urgent" value="1" summary="the workspace requests attention"/>
  240. <entry name="hidden" value="2">
  241. <description summary="the workspace is not visible">
  242. The workspace is not visible in its workspace group, and clients
  243. attempting to visualize the compositor workspace state should not
  244. display such workspaces.
  245. </description>
  246. </entry>
  247. </enum>
  248. <enum name="zcosmic_workspace_capabilities_v1">
  249. <entry name="activate" value="1" summary="activate request is available"/>
  250. <entry name="deactivate" value="2" summary="deactivate request is available"/>
  251. <entry name="remove" value="3" summary="remove request is available"/>
  252. <entry name="rename" value="4" since="2" summary="rename request is available"/>
  253. <entry name="set_tiling_state" value="5" since="2" summary="set_tiling_state request is available"/>
  254. </enum>
  255. <event name="capabilities">
  256. <description summary="compositor capabilities">
  257. This event advertises the capabilities supported by the compositor. If
  258. a capability isn't supported, clients should hide or disable the UI
  259. elements that expose this functionality. For instance, if the
  260. compositor doesn't advertise support for removing workspaces, a button
  261. triggering the remove request should not be displayed.
  262. The compositor will ignore requests it doesn't support. For instance,
  263. a compositor which doesn't advertise support for remove will ignore
  264. remove requests.
  265. Compositors must send this event once after creation of an
  266. zcosmic_workspace_handle_v1 . When the capabilities change, compositors
  267. must send this event again.
  268. The capabilities are sent as an array of 32-bit unsigned integers in
  269. native endianness.
  270. </description>
  271. <arg name="capabilities" type="array" summary="array of 32-bit capabilities"/>
  272. </event>
  273. <event name="remove">
  274. <description summary="this workspace has been destroyed">
  275. This event means the zcosmic_workspace_handle_v1 has been destroyed. It is
  276. guaranteed there won't be any more events for this
  277. zcosmic_workspace_handle_v1. The zext_workspace_handle_v1 becomes inert so
  278. any requests will be ignored except the destroy request.
  279. </description>
  280. </event>
  281. <request name="destroy" type="destructor">
  282. <description summary="destroy the zcosmic_workspace_handle_v1 object">
  283. Destroys the zcosmic_workspace_handle_v1 object.
  284. This request should be called either when the client does not want to
  285. use the workspace object any more or after the remove event to finalize
  286. the destruction of the object.
  287. </description>
  288. </request>
  289. <request name="activate">
  290. <description summary="activate the workspace">
  291. Request that this workspace be activated.
  292. There is no guarantee the workspace will be actually activated, and
  293. behaviour may be compositor-dependent. For example, activating a
  294. workspace may or may not deactivate all other workspaces in the same
  295. group.
  296. </description>
  297. </request>
  298. <request name="deactivate">
  299. <description summary="activate the workspace">
  300. Request that this workspace be deactivated.
  301. There is no guarantee the workspace will be actually deactivated.
  302. </description>
  303. </request>
  304. <request name="remove">
  305. <description summary="remove the workspace">
  306. Request that this workspace be removed.
  307. There is no guarantee the workspace will be actually removed.
  308. </description>
  309. </request>
  310. <event name="tiling_state" since="2">
  311. <description summary="indicates if tiling behavior is enabled for this workspace">
  312. This event is emitted immediately after the zcosmic_workspace_handle_v1 is created
  313. and each time the workspace tiling state changes, either because of a
  314. compositor action or because of a request in this protocol.
  315. </description>
  316. <arg name="state" type="uint" enum="tiling_state"/>
  317. </event>
  318. <enum name="tiling_state" since="2">
  319. <description summary="types of tiling state a workspace may have"/>
  320. <entry name="floating_only" value="0" summary="The workspace has no active tiling properties"/>
  321. <entry name="tiling_enabled" value="1" summary="Tiling behavior is enabled for the workspace"/>
  322. </enum>
  323. <request name="rename" since="2">
  324. <description summary="rename this workspace">
  325. Request that this workspace is renamed.
  326. There is no guarantee the workspace will actually be renamed.
  327. </description>
  328. <arg name="name" type="string" summary="new name of the workspace"/>
  329. </request>
  330. <request name="set_tiling_state" since="2">
  331. <description summary="change the tiling state of this workspace">
  332. Request that this workspace's tiling state is changed.
  333. There is no guarantee the workspace will actually change it's tiling state.
  334. </description>
  335. <arg name="state" type="uint" enum="tiling_state" summary="the new tiling state of the workspace"/>
  336. </request>
  337. </interface>
  338. </protocol>