wlr-foreign-toplevel-management.xml
XML 1.0 document, Unicode text, UTF-8 text
1<?xml version="1.0" encoding="UTF-8"?> 2<protocol name="wlr_foreign_toplevel_management_unstable_v1"> 3<copyright> 4Copyright © 2018 Ilia Bozhinov 5 6Permission to use, copy, modify, distribute, and sell this 7software and its documentation for any purpose is hereby granted 8without fee, provided that the above copyright notice appear in 9all copies and that both that copyright notice and this permission 10notice appear in supporting documentation, and that the name of 11the copyright holders not be used in advertising or publicity 12pertaining to distribution of the software without specific, 13written prior permission. The copyright holders make no 14representations about the suitability of this software for any 15purpose. It is provided "as is" without express or implied 16warranty. 17 18THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS 19SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND 20FITNESS, IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY 21SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 22WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN 23AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, 24ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF 25THIS SOFTWARE. 26</copyright> 27 28<interface name="zwlr_foreign_toplevel_manager_v1" version="3"> 29<description summary="list and control opened apps"> 30The purpose of this protocol is to enable the creation of taskbars 31and docks by providing them with a list of opened applications and 32letting them request certain actions on them, like maximizing, etc. 33 34After a client binds the zwlr_foreign_toplevel_manager_v1, each opened 35toplevel window will be sent via the toplevel event 36</description> 37 38<event name="toplevel"> 39<description summary="a toplevel has been created"> 40This event is emitted whenever a new toplevel window is created. It 41is emitted for all toplevels, regardless of the app that has created 42them. 43 44All initial details of the toplevel(title, app_id, states, etc.) will 45be sent immediately after this event via the corresponding events in 46zwlr_foreign_toplevel_handle_v1. 47</description> 48<arg name="toplevel" type="new_id" interface="zwlr_foreign_toplevel_handle_v1"/> 49</event> 50 51<request name="stop"> 52<description summary="stop sending events"> 53Indicates the client no longer wishes to receive events for new toplevels. 54However the compositor may emit further toplevel_created events, until 55the finished event is emitted. 56 57The client must not send any more requests after this one. 58</description> 59</request> 60 61<event name="finished"> 62<description summary="the compositor has finished with the toplevel manager"> 63This event indicates that the compositor is done sending events to the 64zwlr_foreign_toplevel_manager_v1. The server will destroy the object 65immediately after sending this request, so it will become invalid and 66the client should free any resources associated with it. 67</description> 68</event> 69</interface> 70 71<interface name="zwlr_foreign_toplevel_handle_v1" version="3"> 72<description summary="an opened toplevel"> 73A zwlr_foreign_toplevel_handle_v1 object represents an opened toplevel 74window. Each app may have multiple opened toplevels. 75 76Each toplevel has a list of outputs it is visible on, conveyed to the 77client with the output_enter and output_leave events. 78</description> 79 80<event name="title"> 81<description summary="title change"> 82This event is emitted whenever the title of the toplevel changes. 83</description> 84<arg name="title" type="string"/> 85</event> 86 87<event name="app_id"> 88<description summary="app-id change"> 89This event is emitted whenever the app-id of the toplevel changes. 90</description> 91<arg name="app_id" type="string"/> 92</event> 93 94<event name="output_enter"> 95<description summary="toplevel entered an output"> 96This event is emitted whenever the toplevel becomes visible on 97the given output. A toplevel may be visible on multiple outputs. 98</description> 99<arg name="output" type="object" interface="wl_output"/> 100</event> 101 102<event name="output_leave"> 103<description summary="toplevel left an output"> 104This event is emitted whenever the toplevel stops being visible on 105the given output. It is guaranteed that an entered-output event 106with the same output has been emitted before this event. 107</description> 108<arg name="output" type="object" interface="wl_output"/> 109</event> 110 111<request name="set_maximized"> 112<description summary="requests that the toplevel be maximized"> 113Requests that the toplevel be maximized. If the maximized state actually 114changes, this will be indicated by the state event. 115</description> 116</request> 117 118<request name="unset_maximized"> 119<description summary="requests that the toplevel be unmaximized"> 120Requests that the toplevel be unmaximized. If the maximized state actually 121changes, this will be indicated by the state event. 122</description> 123</request> 124 125<request name="set_minimized"> 126<description summary="requests that the toplevel be minimized"> 127Requests that the toplevel be minimized. If the minimized state actually 128changes, this will be indicated by the state event. 129</description> 130</request> 131 132<request name="unset_minimized"> 133<description summary="requests that the toplevel be unminimized"> 134Requests that the toplevel be unminimized. If the minimized state actually 135changes, this will be indicated by the state event. 136</description> 137</request> 138 139<request name="activate"> 140<description summary="activate the toplevel"> 141Request that this toplevel be activated on the given seat. 142There is no guarantee the toplevel will be actually activated. 143</description> 144<arg name="seat" type="object" interface="wl_seat"/> 145</request> 146 147<enum name="state"> 148<description summary="types of states on the toplevel"> 149The different states that a toplevel can have. These have the same meaning 150as the states with the same names defined in xdg-toplevel 151</description> 152 153<entry name="maximized" value="0" summary="the toplevel is maximized"/> 154<entry name="minimized" value="1" summary="the toplevel is minimized"/> 155<entry name="activated" value="2" summary="the toplevel is active"/> 156<entry name="fullscreen" value="3" summary="the toplevel is fullscreen" since="2"/> 157</enum> 158 159<event name="state"> 160<description summary="the toplevel state changed"> 161This event is emitted immediately after the zlw_foreign_toplevel_handle_v1 162is created and each time the toplevel state changes, either because of a 163compositor action or because of a request in this protocol. 164</description> 165 166<arg name="state" type="array"/> 167</event> 168 169<event name="done"> 170<description summary="all information about the toplevel has been sent"> 171This event is sent after all changes in the toplevel state have been 172sent. 173 174This allows changes to the zwlr_foreign_toplevel_handle_v1 properties 175to be seen as atomic, even if they happen via multiple events. 176</description> 177</event> 178 179<request name="close"> 180<description summary="request that the toplevel be closed"> 181Send a request to the toplevel to close itself. The compositor would 182typically use a shell-specific method to carry out this request, for 183example by sending the xdg_toplevel.close event. However, this gives 184no guarantees the toplevel will actually be destroyed. If and when 185this happens, the zwlr_foreign_toplevel_handle_v1.closed event will 186be emitted. 187</description> 188</request> 189 190<request name="set_rectangle"> 191<description summary="the rectangle which represents the toplevel"> 192The rectangle of the surface specified in this request corresponds to 193the place where the app using this protocol represents the given toplevel. 194It can be used by the compositor as a hint for some operations, e.g 195minimizing. The client is however not required to set this, in which 196case the compositor is free to decide some default value. 197 198If the client specifies more than one rectangle, only the last one is 199considered. 200 201The dimensions are given in surface-local coordinates. 202Setting width=height=0 removes the already-set rectangle. 203</description> 204 205<arg name="surface" type="object" interface="wl_surface"/> 206<arg name="x" type="int"/> 207<arg name="y" type="int"/> 208<arg name="width" type="int"/> 209<arg name="height" type="int"/> 210</request> 211 212<enum name="error"> 213<entry name="invalid_rectangle" value="0" 214summary="the provided rectangle is invalid"/> 215</enum> 216 217<event name="closed"> 218<description summary="this toplevel has been destroyed"> 219This event means the toplevel has been destroyed. It is guaranteed there 220won't be any more events for this zwlr_foreign_toplevel_handle_v1. The 221toplevel itself becomes inert so any requests will be ignored except the 222destroy request. 223</description> 224</event> 225 226<request name="destroy" type="destructor"> 227<description summary="destroy the zwlr_foreign_toplevel_handle_v1 object"> 228Destroys the zwlr_foreign_toplevel_handle_v1 object. 229 230This request should be called either when the client does not want to 231use the toplevel anymore or after the closed event to finalize the 232destruction of the object. 233</description> 234</request> 235 236<!-- Version 2 additions --> 237 238<request name="set_fullscreen" since="2"> 239<description summary="request that the toplevel be fullscreened"> 240Requests that the toplevel be fullscreened on the given output. If the 241fullscreen state and/or the outputs the toplevel is visible on actually 242change, this will be indicated by the state and output_enter/leave 243events. 244 245The output parameter is only a hint to the compositor. Also, if output 246is NULL, the compositor should decide which output the toplevel will be 247fullscreened on, if at all. 248</description> 249<arg name="output" type="object" interface="wl_output" allow-null="true"/> 250</request> 251 252<request name="unset_fullscreen" since="2"> 253<description summary="request that the toplevel be unfullscreened"> 254Requests that the toplevel be unfullscreened. If the fullscreen state 255actually changes, this will be indicated by the state event. 256</description> 257</request> 258 259<!-- Version 3 additions --> 260 261<event name="parent" since="3"> 262<description summary="parent change"> 263This event is emitted whenever the parent of the toplevel changes. 264 265No event is emitted when the parent handle is destroyed by the client. 266</description> 267<arg name="parent" type="object" interface="zwlr_foreign_toplevel_handle_v1" allow-null="true"/> 268</event> 269</interface> 270</protocol> 271