wlr-layer-shell-unstable-v1.xml - wmenu - [fork] efficient dynamic menu for wayland
(HTM) git clone https://git.drkhsh.at/wmenu.git
(DIR) Log
(DIR) Files
(DIR) Refs
(DIR) README
(DIR) LICENSE
---
wlr-layer-shell-unstable-v1.xml (13369B)
---
1 <?xml version="1.0" encoding="UTF-8"?>
2 <protocol name="wlr_layer_shell_unstable_v1">
3 <copyright>
4 Copyright © 2017 Drew DeVault
5
6 Permission to use, copy, modify, distribute, and sell this
7 software and its documentation for any purpose is hereby granted
8 without fee, provided that the above copyright notice appear in
9 all copies and that both that copyright notice and this permission
10 notice appear in supporting documentation, and that the name of
11 the copyright holders not be used in advertising or publicity
12 pertaining to distribution of the software without specific,
13 written prior permission. The copyright holders make no
14 representations about the suitability of this software for any
15 purpose. It is provided "as is" without express or implied
16 warranty.
17
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
28 <interface name="zwlr_layer_shell_v1" version="1">
29 <description summary="create surfaces that are layers of the desktop">
30 Clients can use this interface to assign the surface_layer role to
31 wl_surfaces. Such surfaces are assigned to a "layer" of the output and
32 rendered with a defined z-depth respective to each other. They may also be
33 anchored to the edges and corners of a screen and specify input handling
34 semantics. This interface should be suitable for the implementation of
35 many desktop shell components, and a broad number of other applications
36 that interact with the desktop.
37 </description>
38
39 <request name="get_layer_surface">
40 <description summary="create a layer_surface from a surface">
41 Create a layer surface for an existing surface. This assigns the role of
42 layer_surface, or raises a protocol error if another role is already
43 assigned.
44
45 Creating a layer surface from a wl_surface which has a buffer attached
46 or committed is a client error, and any attempts by a client to attach
47 or manipulate a buffer prior to the first layer_surface.configure call
48 must also be treated as errors.
49
50 You may pass NULL for output to allow the compositor to decide which
51 output to use. Generally this will be the one that the user most
52 recently interacted with.
53
54 Clients can specify a namespace that defines the purpose of the layer
55 surface.
56 </description>
57 <arg name="id" type="new_id" interface="zwlr_layer_surface_v1"/>
58 <arg name="surface" type="object" interface="wl_surface"/>
59 <arg name="output" type="object" interface="wl_output" allow-null="true"/>
60 <arg name="layer" type="uint" enum="layer" summary="layer to add this surface to"/>
61 <arg name="namespace" type="string" summary="namespace for the layer surface"/>
62 </request>
63
64 <enum name="error">
65 <entry name="role" value="0" summary="wl_surface has another role"/>
66 <entry name="invalid_layer" value="1" summary="layer value is invalid"/>
67 <entry name="already_constructed" value="2" summary="wl_surface has a buffer attached or committed"/>
68 </enum>
69
70 <enum name="layer">
71 <description summary="available layers for surfaces">
72 These values indicate which layers a surface can be rendered in. They
73 are ordered by z depth, bottom-most first. Traditional shell surfaces
74 will typically be rendered between the bottom and top layers.
75 Fullscreen shell surfaces are typically rendered at the top layer.
76 Multiple surfaces can share a single layer, and ordering within a
77 single layer is undefined.
78 </description>
79
80 <entry name="background" value="0"/>
81 <entry name="bottom" value="1"/>
82 <entry name="top" value="2"/>
83 <entry name="overlay" value="3"/>
84 </enum>
85 </interface>
86
87 <interface name="zwlr_layer_surface_v1" version="1">
88 <description summary="layer metadata interface">
89 An interface that may be implemented by a wl_surface, for surfaces that
90 are designed to be rendered as a layer of a stacked desktop-like
91 environment.
92
93 Layer surface state (size, anchor, exclusive zone, margin, interactivity)
94 is double-buffered, and will be applied at the time wl_surface.commit of
95 the corresponding wl_surface is called.
96 </description>
97
98 <request name="set_size">
99 <description summary="sets the size of the surface">
100 Sets the size of the surface in surface-local coordinates. The
101 compositor will display the surface centered with respect to its
102 anchors.
103
104 If you pass 0 for either value, the compositor will assign it and
105 inform you of the assignment in the configure event. You must set your
106 anchor to opposite edges in the dimensions you omit; not doing so is a
107 protocol error. Both values are 0 by default.
108
109 Size is double-buffered, see wl_surface.commit.
110 </description>
111 <arg name="width" type="uint"/>
112 <arg name="height" type="uint"/>
113 </request>
114
115 <request name="set_anchor">
116 <description summary="configures the anchor point of the surface">
117 Requests that the compositor anchor the surface to the specified edges
118 and corners. If two orthoginal edges are specified (e.g. 'top' and
119 'left'), then the anchor point will be the intersection of the edges
120 (e.g. the top left corner of the output); otherwise the anchor point
121 will be centered on that edge, or in the center if none is specified.
122
123 Anchor is double-buffered, see wl_surface.commit.
124 </description>
125 <arg name="anchor" type="uint" enum="anchor"/>
126 </request>
127
128 <request name="set_exclusive_zone">
129 <description summary="configures the exclusive geometry of this surface">
130 Requests that the compositor avoids occluding an area of the surface
131 with other surfaces. The compositor's use of this information is
132 implementation-dependent - do not assume that this region will not
133 actually be occluded.
134
135 A positive value is only meaningful if the surface is anchored to an
136 edge, rather than a corner. The zone is the number of surface-local
137 coordinates from the edge that are considered exclusive.
138
139 Surfaces that do not wish to have an exclusive zone may instead specify
140 how they should interact with surfaces that do. If set to zero, the
141 surface indicates that it would like to be moved to avoid occluding
142 surfaces with a positive excluzive zone. If set to -1, the surface
143 indicates that it would not like to be moved to accommodate for other
144 surfaces, and the compositor should extend it all the way to the edges
145 it is anchored to.
146
147 For example, a panel might set its exclusive zone to 10, so that
148 maximized shell surfaces are not shown on top of it. A notification
149 might set its exclusive zone to 0, so that it is moved to avoid
150 occluding the panel, but shell surfaces are shown underneath it. A
151 wallpaper or lock screen might set their exclusive zone to -1, so that
152 they stretch below or over the panel.
153
154 The default value is 0.
155
156 Exclusive zone is double-buffered, see wl_surface.commit.
157 </description>
158 <arg name="zone" type="int"/>
159 </request>
160
161 <request name="set_margin">
162 <description summary="sets a margin from the anchor point">
163 Requests that the surface be placed some distance away from the anchor
164 point on the output, in surface-local coordinates. Setting this value
165 for edges you are not anchored to has no effect.
166
167 The exclusive zone includes the margin.
168
169 Margin is double-buffered, see wl_surface.commit.
170 </description>
171 <arg name="top" type="int"/>
172 <arg name="right" type="int"/>
173 <arg name="bottom" type="int"/>
174 <arg name="left" type="int"/>
175 </request>
176
177 <request name="set_keyboard_interactivity">
178 <description summary="requests keyboard events">
179 Set to 1 to request that the seat send keyboard events to this layer
180 surface. For layers below the shell surface layer, the seat will use
181 normal focus semantics. For layers above the shell surface layers, the
182 seat will always give exclusive keyboard focus to the top-most layer
183 which has keyboard interactivity set to true.
184
185 Layer surfaces receive pointer, touch, and tablet events normally. If
186 you do not want to receive them, set the input region on your surface
187 to an empty region.
188
189 Events is double-buffered, see wl_surface.commit.
190 </description>
191 <arg name="keyboard_interactivity" type="uint"/>
192 </request>
193
194 <request name="get_popup">
195 <description summary="assign this layer_surface as an xdg_popup parent">
196 This assigns an xdg_popup's parent to this layer_surface. This popup
197 should have been created via xdg_surface::get_popup with the parent set
198 to NULL, and this request must be invoked before committing the popup's
199 initial state.
200
201 See the documentation of xdg_popup for more details about what an
202 xdg_popup is and how it is used.
203 </description>
204 <arg name="popup" type="object" interface="xdg_popup"/>
205 </request>
206
207 <request name="ack_configure">
208 <description summary="ack a configure event">
209 When a configure event is received, if a client commits the
210 surface in response to the configure event, then the client
211 must make an ack_configure request sometime before the commit
212 request, passing along the serial of the configure event.
213
214 If the client receives multiple configure events before it
215 can respond to one, it only has to ack the last configure event.
216
217 A client is not required to commit immediately after sending
218 an ack_configure request - it may even ack_configure several times
219 before its next surface commit.
220
221 A client may send multiple ack_configure requests before committing, but
222 only the last request sent before a commit indicates which configure
223 event the client really is responding to.
224 </description>
225 <arg name="serial" type="uint" summary="the serial from the configure event"/>
226 </request>
227
228 <request name="destroy" type="destructor">
229 <description summary="destroy the layer_surface">
230 This request destroys the layer surface.
231 </description>
232 </request>
233
234 <event name="configure">
235 <description summary="suggest a surface change">
236 The configure event asks the client to resize its surface.
237
238 Clients should arrange their surface for the new states, and then send
239 an ack_configure request with the serial sent in this configure event at
240 some point before committing the new surface.
241
242 The client is free to dismiss all but the last configure event it
243 received.
244
245 The width and height arguments specify the size of the window in
246 surface-local coordinates.
247
248 The size is a hint, in the sense that the client is free to ignore it if
249 it doesn't resize, pick a smaller size (to satisfy aspect ratio or
250 resize in steps of NxM pixels). If the client picks a smaller size and
251 is anchored to two opposite anchors (e.g. 'top' and 'bottom'), the
252 surface will be centered on this axis.
253
254 If the width or height arguments are zero, it means the client should
255 decide its own window dimension.
256 </description>
257 <arg name="serial" type="uint"/>
258 <arg name="width" type="uint"/>
259 <arg name="height" type="uint"/>
260 </event>
261
262 <event name="closed">
263 <description summary="surface should be closed">
264 The closed event is sent by the compositor when the surface will no
265 longer be shown. The output may have been destroyed or the user may
266 have asked for it to be removed. Further changes to the surface will be
267 ignored. The client should destroy the resource after receiving this
268 event, and create a new surface if they so choose.
269 </description>
270 </event>
271
272 <enum name="error">
273 <entry name="invalid_surface_state" value="0" summary="provided surface state is invalid"/>
274 <entry name="invalid_size" value="1" summary="size is invalid"/>
275 <entry name="invalid_anchor" value="2" summary="anchor bitfield is invalid"/>
276 </enum>
277
278 <enum name="anchor" bitfield="true">
279 <entry name="top" value="1" summary="the top edge of the anchor rectangle"/>
280 <entry name="bottom" value="2" summary="the bottom edge of the anchor rectangle"/>
281 <entry name="left" value="4" summary="the left edge of the anchor rectangle"/>
282 <entry name="right" value="8" summary="the right edge of the anchor rectangle"/>
283 </enum>
284 </interface>
285 </protocol>