cosmic-toplevel-info-unstable-v1.xml 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <protocol name="cosmic_toplevel_info_unstable_v1">
  3. <copyright>
  4. Copyright © 2018 Ilia Bozhinov
  5. Copyright © 2020 Isaac Freund
  6. Copyright © 2024 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_toplevel_info_v1" version="3">
  28. <description summary="list toplevels and properties thereof">
  29. The purpose of this protocol is to enable clients such as taskbars
  30. or docks to access a list of opened applications and basic properties
  31. thereof.
  32. It thus extends ext_foreign_toplevel_v1 to provide more information
  33. and actions on foreign toplevels.
  34. </description>
  35. <event name="toplevel" deprecated-since="2">
  36. <description summary="a toplevel has been created">
  37. This event is never emitted for clients binding version 2
  38. of this protocol, they should use `get_cosmic_toplevel` instead.
  39. This event is emitted for clients binding version 1 whenever a
  40. new toplevel window is created. It is emitted for all toplevels,
  41. regardless of the app that has created them.
  42. All initial properties of the toplevel (title, app_id, states, etc.)
  43. will be sent immediately after this event via the corresponding
  44. events in zcosmic_toplevel_handle_v1.
  45. </description>
  46. <arg name="toplevel" type="new_id" interface="zcosmic_toplevel_handle_v1"/>
  47. </event>
  48. <request name="stop" deprecated-since="2">
  49. <description summary="stop sending events">
  50. This request indicates that the client no longer wishes to receive
  51. events for new toplevels. However, the compositor may emit further
  52. toplevel_created events until the finished event is emitted.
  53. The client must not send any more requests after this one.
  54. Note: This request isn't necessary for clients binding version 2
  55. of this protocol and will be ignored.
  56. </description>
  57. </request>
  58. <event name="finished" deprecated-since="2">
  59. <description summary="the compositor has finished with the toplevel manager">
  60. This event indicates that the compositor is done sending events
  61. to the zcosmic_toplevel_info_v1. The server will destroy the
  62. object immediately after sending this request, so it will become
  63. invalid and the client should free any resources associated with it.
  64. Note: This event is emitted immediately after calling `stop` for
  65. clients binding version 2 of this protocol for backwards compatibility.
  66. </description>
  67. </event>
  68. <request name="get_cosmic_toplevel" since="2">
  69. <description summary="get cosmic toplevel extension object">
  70. Request a zcosmic_toplevel_handle_v1 extension object for an existing
  71. ext_foreign_toplevel_handle_v1.
  72. All initial properties of the toplevel (states, etc.)
  73. will be sent immediately after this event via the corresponding
  74. events in zcosmic_toplevel_handle_v1.
  75. </description>
  76. <arg name="cosmic_toplevel" type="new_id" interface="zcosmic_toplevel_handle_v1"/>
  77. <arg name="foreign_toplevel" type="object" interface="ext_foreign_toplevel_handle_v1"/>
  78. </request>
  79. <event name="done" since="2">
  80. <description summary="all information about active toplevels have been sent">
  81. This event is sent after all changes for currently active
  82. zcosmic_toplevel_handle_v1 have been sent.
  83. This allows changes to multiple zcosmic_toplevel_handle_v1 handles
  84. and their properties to be seen as atomic, even if they happen via
  85. multiple events.
  86. </description>
  87. </event>
  88. </interface>
  89. <interface name="zcosmic_toplevel_handle_v1" version="3">
  90. <description summary="an open toplevel">
  91. A zcosmic_toplevel_handle_v1 object represents an open toplevel
  92. window. A single app may have multiple open toplevels.
  93. Each toplevel has a list of outputs it is visible on, exposed to the
  94. client via the output_enter and output_leave events.
  95. </description>
  96. <request name="destroy" type="destructor">
  97. <description summary="destroy the zcosmic_toplevel_handle_v1 object">
  98. This request should be called either when the client will no longer
  99. use the zcosmic_toplevel_handle_v1.
  100. </description>
  101. </request>
  102. <event name="closed" deprecated-since="2">
  103. <description summary="the toplevel has been closed">
  104. The server will emit no further events on the
  105. zcosmic_toplevel_handle_v1 after this event. Any requests received
  106. aside from the destroy request will be ignored. Upon receiving this
  107. event, the client should make the destroy request to allow freeing
  108. of resources.
  109. Note: This event will not be emitted for clients binding version 2
  110. of this protocol, as `ext_foreign_toplevel_handle_v1.closed` is
  111. equivalent.
  112. </description>
  113. </event>
  114. <event name="done" deprecated-since="2">
  115. <description summary="all information about the toplevel has been sent">
  116. This event is sent after all changes in the toplevel state have
  117. been sent.
  118. This allows changes to the zcosmic_toplevel_handle_v1 properties
  119. to be seen as atomic, even if they happen via multiple events.
  120. Note: this is is not sent after the closed event.
  121. Note: This event will not be emitted for clients binding version 2
  122. of this protocol, as `ext_foreign_toplevel_handle_v1.done` is
  123. equivalent.
  124. </description>
  125. </event>
  126. <event name="title" deprecated-since="2">
  127. <description summary="title change">
  128. This event is emitted whenever the title of the toplevel changes.
  129. Note: This event will not be emitted for clients binding version 2
  130. of this protocol, as `ext_foreign_toplevel_handle_v1.title` is
  131. equivalent.
  132. </description>
  133. <arg name="title" type="string"/>
  134. </event>
  135. <event name="app_id" deprecated-since="2">
  136. <description summary="app_id change">
  137. This event is emitted whenever the app_id of the toplevel changes.
  138. Note: This event will not be emitted for clients binding version 2
  139. of this protocol, as `ext_foreign_toplevel_handle_v1.app_id` is
  140. equivalent.
  141. </description>
  142. <arg name="app_id" type="string"/>
  143. </event>
  144. <event name="output_enter">
  145. <description summary="toplevel entered an output">
  146. This event is emitted whenever the toplevel becomes visible on the
  147. given output. A toplevel may be visible on multiple outputs.
  148. </description>
  149. <arg name="output" type="object" interface="wl_output"/>
  150. </event>
  151. <event name="output_leave">
  152. <description summary="toplevel left an output">
  153. This event is emitted whenever the toplevel is no longer visible
  154. on a given output. It is guaranteed that an output_enter event with
  155. the same output has been emitted before this event.
  156. </description>
  157. <arg name="output" type="object" interface="wl_output"/>
  158. </event>
  159. <event name="workspace_enter" deprecated-since="3">
  160. <description summary="toplevel entered an workspace">
  161. This event is emitted whenever the toplevel becomes visible on the
  162. given workspace. A toplevel may be visible on multiple workspaces.
  163. </description>
  164. <arg name="workspace" type="object" interface="zcosmic_workspace_handle_v1"/>
  165. </event>
  166. <event name="workspace_leave" deprecated-since="3">
  167. <description summary="toplevel left an workspace">
  168. This event is emitted whenever the toplevel is no longer visible
  169. on a given workspace. It is guaranteed that an workspace_enter event with
  170. the same workspace has been emitted before this event.
  171. </description>
  172. <arg name="workspace" type="object" interface="zcosmic_workspace_handle_v1"/>
  173. </event>
  174. <enum name="state">
  175. <description summary="types of states on the toplevel">
  176. The different states that a toplevel may have. These have the same
  177. meaning as the states with the same names defined in xdg-toplevel
  178. </description>
  179. <entry name="maximized" value="0" summary="the toplevel is maximized" />
  180. <entry name="minimized" value="1" summary="the toplevel is minimized" />
  181. <entry name="activated" value="2" summary="the toplevel is active" />
  182. <entry name="fullscreen" value="3" summary="the toplevel is fullscreen" />
  183. <entry name="sticky" value="4" summary="the toplevel is sticky" since="2" />
  184. </enum>
  185. <event name="state">
  186. <description summary="the toplevel state changed">
  187. This event is emitted once on creation of the
  188. zcosmic_toplevel_handle_v1 and again whenever the state of the
  189. toplevel changes.
  190. </description>
  191. <arg name="state" type="array"/>
  192. </event>
  193. <event name="geometry" since="2">
  194. <description summary="the toplevel's position and/or size has changed">
  195. Emitted when the geometry of a toplevel (it's position and/or size)
  196. relative to the provided output has changed.
  197. This event is emitted once on creation of the
  198. zcosmic_toplevel_handle_v1 for every entered output and again
  199. whenever the geometry of the toplevel changes relative to any output.
  200. </description>
  201. <arg name="output" type="object" interface="wl_output"/>
  202. <arg name="x" type="int" summary="x coordinate of the upper-left corner"/>
  203. <arg name="y" type="int" summary="y coordinate of the upper-left corner"/>
  204. <arg name="width" type="int" summary="width of the toplevel"/>
  205. <arg name="height" type="int" summary="height of the toplevel"/>
  206. </event>
  207. <event name="ext_workspace_enter" since="3">
  208. <description summary="toplevel entered an workspace">
  209. This event is emitted whenever the toplevel becomes visible on the
  210. given workspace. A toplevel may be visible on multiple workspaces.
  211. </description>
  212. <arg name="workspace" type="object" interface="ext_workspace_handle_v1"/>
  213. </event>
  214. <event name="ext_workspace_leave" since="3">
  215. <description summary="toplevel left an workspace">
  216. This event is emitted whenever the toplevel is no longer visible
  217. on a given workspace. It is guaranteed that an workspace_enter event with
  218. the same workspace has been emitted before this event.
  219. </description>
  220. <arg name="workspace" type="object" interface="ext_workspace_handle_v1"/>
  221. </event>
  222. </interface>
  223. </protocol>