Skip to content
Myr

wlr-layer-shell-unstable-v1.xml

This file

Path

external/wlr-layer-shell-unstable-v1.xml

390 lines · 18.0 KiB

Last changed by

Not known.

History of this file

Take it

1<?xml version="1.0" encoding="UTF-8"?>2<protocol name="wlr_layer_shell_unstable_v1">3  <copyright>4    Copyright © 2017 Drew DeVault56    Permission to use, copy, modify, distribute, and sell this7    software and its documentation for any purpose is hereby granted8    without fee, provided that the above copyright notice appear in9    all copies and that both that copyright notice and this permission10    notice appear in supporting documentation, and that the name of11    the copyright holders not be used in advertising or publicity12    pertaining to distribution of the software without specific,13    written prior permission.  The copyright holders make no14    representations about the suitability of this software for any15    purpose.  It is provided "as is" without express or implied16    warranty.1718    THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS19    SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND20    FITNESS, IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY21    SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES22    WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN23    AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,24    ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF25    THIS SOFTWARE.26  </copyright>2728  <interface name="zwlr_layer_shell_v1" version="4">29    <description summary="create surfaces that are layers of the desktop">30      Clients can use this interface to assign the surface_layer role to31      wl_surfaces. Such surfaces are assigned to a "layer" of the output and32      rendered with a defined z-depth respective to each other. They may also be33      anchored to the edges and corners of a screen and specify input handling34      semantics. This interface should be suitable for the implementation of35      many desktop shell components, and a broad number of other applications36      that interact with the desktop.37    </description>3839    <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 of42        layer_surface, or raises a protocol error if another role is already43        assigned.4445        Creating a layer surface from a wl_surface which has a buffer attached46        or committed is a client error, and any attempts by a client to attach47        or manipulate a buffer prior to the first layer_surface.configure call48        must also be treated as errors.4950        After creating a layer_surface object and setting it up, the client51        must perform an initial commit without any buffer attached.52        The compositor will reply with a layer_surface.configure event.53        The client must acknowledge it and is then allowed to attach a buffer54        to map the surface.5556        You may pass NULL for output to allow the compositor to decide which57        output to use. Generally this will be the one that the user most58        recently interacted with.5960        Clients can specify a namespace that defines the purpose of the layer61        surface.62      </description>63      <arg name="id" type="new_id" interface="zwlr_layer_surface_v1"/>64      <arg name="surface" type="object" interface="wl_surface"/>65      <arg name="output" type="object" interface="wl_output" allow-null="true"/>66      <arg name="layer" type="uint" enum="layer" summary="layer to add this surface to"/>67      <arg name="namespace" type="string" summary="namespace for the layer surface"/>68    </request>6970    <enum name="error">71      <entry name="role" value="0" summary="wl_surface has another role"/>72      <entry name="invalid_layer" value="1" summary="layer value is invalid"/>73      <entry name="already_constructed" value="2" summary="wl_surface has a buffer attached or committed"/>74    </enum>7576    <enum name="layer">77      <description summary="available layers for surfaces">78        These values indicate which layers a surface can be rendered in. They79        are ordered by z depth, bottom-most first. Traditional shell surfaces80        will typically be rendered between the bottom and top layers.81        Fullscreen shell surfaces are typically rendered at the top layer.82        Multiple surfaces can share a single layer, and ordering within a83        single layer is undefined.84      </description>8586      <entry name="background" value="0"/>87      <entry name="bottom" value="1"/>88      <entry name="top" value="2"/>89      <entry name="overlay" value="3"/>90    </enum>9192    <!-- Version 3 additions -->9394    <request name="destroy" type="destructor" since="3">95      <description summary="destroy the layer_shell object">96        This request indicates that the client will not use the layer_shell97        object any more. Objects that have been created through this instance98        are not affected.99      </description>100    </request>101  </interface>102103  <interface name="zwlr_layer_surface_v1" version="4">104    <description summary="layer metadata interface">105      An interface that may be implemented by a wl_surface, for surfaces that106      are designed to be rendered as a layer of a stacked desktop-like107      environment.108109      Layer surface state (layer, size, anchor, exclusive zone,110      margin, interactivity) is double-buffered, and will be applied at the111      time wl_surface.commit of the corresponding wl_surface is called.112113      Attaching a null buffer to a layer surface unmaps it.114115      Unmapping a layer_surface means that the surface cannot be shown by the116      compositor until it is explicitly mapped again. The layer_surface117      returns to the state it had right after layer_shell.get_layer_surface.118      The client can re-map the surface by performing a commit without any119      buffer attached, waiting for a configure event and handling it as usual.120    </description>121122    <request name="set_size">123      <description summary="sets the size of the surface">124        Sets the size of the surface in surface-local coordinates. The125        compositor will display the surface centered with respect to its126        anchors.127128        If you pass 0 for either value, the compositor will assign it and129        inform you of the assignment in the configure event. You must set your130        anchor to opposite edges in the dimensions you omit; not doing so is a131        protocol error. Both values are 0 by default.132133        Size is double-buffered, see wl_surface.commit.134      </description>135      <arg name="width" type="uint"/>136      <arg name="height" type="uint"/>137    </request>138139    <request name="set_anchor">140      <description summary="configures the anchor point of the surface">141        Requests that the compositor anchor the surface to the specified edges142        and corners. If two orthogonal edges are specified (e.g. 'top' and143        'left'), then the anchor point will be the intersection of the edges144        (e.g. the top left corner of the output); otherwise the anchor point145        will be centered on that edge, or in the center if none is specified.146147        Anchor is double-buffered, see wl_surface.commit.148      </description>149      <arg name="anchor" type="uint" enum="anchor"/>150    </request>151152    <request name="set_exclusive_zone">153      <description summary="configures the exclusive geometry of this surface">154        Requests that the compositor avoids occluding an area with other155        surfaces. The compositor's use of this information is156        implementation-dependent - do not assume that this region will not157        actually be occluded.158159        A positive value is only meaningful if the surface is anchored to one160        edge or an edge and both perpendicular edges. If the surface is not161        anchored, anchored to only two perpendicular edges (a corner), anchored162        to only two parallel edges or anchored to all edges, a positive value163        will be treated the same as zero.164165        A positive zone is the distance from the edge in surface-local166        coordinates to consider exclusive.167168        Surfaces that do not wish to have an exclusive zone may instead specify169        how they should interact with surfaces that do. If set to zero, the170        surface indicates that it would like to be moved to avoid occluding171        surfaces with a positive exclusive zone. If set to -1, the surface172        indicates that it would not like to be moved to accommodate for other173        surfaces, and the compositor should extend it all the way to the edges174        it is anchored to.175176        For example, a panel might set its exclusive zone to 10, so that177        maximized shell surfaces are not shown on top of it. A notification178        might set its exclusive zone to 0, so that it is moved to avoid179        occluding the panel, but shell surfaces are shown underneath it. A180        wallpaper or lock screen might set their exclusive zone to -1, so that181        they stretch below or over the panel.182183        The default value is 0.184185        Exclusive zone is double-buffered, see wl_surface.commit.186      </description>187      <arg name="zone" type="int"/>188    </request>189190    <request name="set_margin">191      <description summary="sets a margin from the anchor point">192        Requests that the surface be placed some distance away from the anchor193        point on the output, in surface-local coordinates. Setting this value194        for edges you are not anchored to has no effect.195196        The exclusive zone includes the margin.197198        Margin is double-buffered, see wl_surface.commit.199      </description>200      <arg name="top" type="int"/>201      <arg name="right" type="int"/>202      <arg name="bottom" type="int"/>203      <arg name="left" type="int"/>204    </request>205206    <enum name="keyboard_interactivity">207      <description summary="types of keyboard interaction possible for a layer shell surface">208        Types of keyboard interaction possible for layer shell surfaces. The209        rationale for this is twofold: (1) some applications are not interested210        in keyboard events and not allowing them to be focused can improve the211        desktop experience; (2) some applications will want to take exclusive212        keyboard focus.213      </description>214215      <entry name="none" value="0">216        <description summary="no keyboard focus is possible">217          This value indicates that this surface is not interested in keyboard218          events and the compositor should never assign it the keyboard focus.219220          This is the default value, set for newly created layer shell surfaces.221222          This is useful for e.g. desktop widgets that display information or223          only have interaction with non-keyboard input devices.224        </description>225      </entry>226      <entry name="exclusive" value="1">227        <description summary="request exclusive keyboard focus">228          Request exclusive keyboard focus if this surface is above the shell surface layer.229230          For the top and overlay layers, the seat will always give231          exclusive keyboard focus to the top-most layer which has keyboard232          interactivity set to exclusive. If this layer contains multiple233          surfaces with keyboard interactivity set to exclusive, the compositor234          determines the one receiving keyboard events in an implementation-235          defined manner. In this case, no guarantee is made when this surface236          will receive keyboard focus (if ever).237238          For the bottom and background layers, the compositor is allowed to use239          normal focus semantics.240241          This setting is mainly intended for applications that need to ensure242          they receive all keyboard events, such as a lock screen or a password243          prompt.244        </description>245      </entry>246      <entry name="on_demand" value="2" since="4">247        <description summary="request regular keyboard focus semantics">248          This requests the compositor to allow this surface to be focused and249          unfocused by the user in an implementation-defined manner. The user250          should be able to unfocus this surface even regardless of the layer251          it is on.252253          Typically, the compositor will want to use its normal mechanism to254          manage keyboard focus between layer shell surfaces with this setting255          and regular toplevels on the desktop layer (e.g. click to focus).256          Nevertheless, it is possible for a compositor to require a special257          interaction to focus or unfocus layer shell surfaces (e.g. requiring258          a click even if focus follows the mouse normally, or providing a259          keybinding to switch focus between layers).260261          This setting is mainly intended for desktop shell components (e.g.262          panels) that allow keyboard interaction. Using this option can allow263          implementing a desktop shell that can be fully usable without the264          mouse.265        </description>266      </entry>267    </enum>268269    <request name="set_keyboard_interactivity">270      <description summary="requests keyboard events">271        Set how keyboard events are delivered to this surface. By default,272        layer shell surfaces do not receive keyboard events; this request can273        be used to change this.274275        This setting is inherited by child surfaces set by the get_popup276        request.277278        Layer surfaces receive pointer, touch, and tablet events normally. If279        you do not want to receive them, set the input region on your surface280        to an empty region.281282        Keyboard interactivity is double-buffered, see wl_surface.commit.283      </description>284      <arg name="keyboard_interactivity" type="uint" enum="keyboard_interactivity"/>285    </request>286287    <request name="get_popup">288      <description summary="assign this layer_surface as an xdg_popup parent">289        This assigns an xdg_popup's parent to this layer_surface.  This popup290        should have been created via xdg_surface::get_popup with the parent set291        to NULL, and this request must be invoked before committing the popup's292        initial state.293294        See the documentation of xdg_popup for more details about what an295        xdg_popup is and how it is used.296      </description>297      <arg name="popup" type="object" interface="xdg_popup"/>298    </request>299300    <request name="ack_configure">301      <description summary="ack a configure event">302        When a configure event is received, if a client commits the303        surface in response to the configure event, then the client304        must make an ack_configure request sometime before the commit305        request, passing along the serial of the configure event.306307        If the client receives multiple configure events before it308        can respond to one, it only has to ack the last configure event.309310        A client is not required to commit immediately after sending311        an ack_configure request - it may even ack_configure several times312        before its next surface commit.313314        A client may send multiple ack_configure requests before committing, but315        only the last request sent before a commit indicates which configure316        event the client really is responding to.317      </description>318      <arg name="serial" type="uint" summary="the serial from the configure event"/>319    </request>320321    <request name="destroy" type="destructor">322      <description summary="destroy the layer_surface">323        This request destroys the layer surface.324      </description>325    </request>326327    <event name="configure">328      <description summary="suggest a surface change">329        The configure event asks the client to resize its surface.330331        Clients should arrange their surface for the new states, and then send332        an ack_configure request with the serial sent in this configure event at333        some point before committing the new surface.334335        The client is free to dismiss all but the last configure event it336        received.337338        The width and height arguments specify the size of the window in339        surface-local coordinates.340341        The size is a hint, in the sense that the client is free to ignore it if342        it doesn't resize, pick a smaller size (to satisfy aspect ratio or343        resize in steps of NxM pixels). If the client picks a smaller size and344        is anchored to two opposite anchors (e.g. 'top' and 'bottom'), the345        surface will be centered on this axis.346347        If the width or height arguments are zero, it means the client should348        decide its own window dimension.349      </description>350      <arg name="serial" type="uint"/>351      <arg name="width" type="uint"/>352      <arg name="height" type="uint"/>353    </event>354355    <event name="closed">356      <description summary="surface should be closed">357        The closed event is sent by the compositor when the surface will no358        longer be shown. The output may have been destroyed or the user may359        have asked for it to be removed. Further changes to the surface will be360        ignored. The client should destroy the resource after receiving this361        event, and create a new surface if they so choose.362      </description>363    </event>364365    <enum name="error">366      <entry name="invalid_surface_state" value="0" summary="provided surface state is invalid"/>367      <entry name="invalid_size" value="1" summary="size is invalid"/>368      <entry name="invalid_anchor" value="2" summary="anchor bitfield is invalid"/>369      <entry name="invalid_keyboard_interactivity" value="3" summary="keyboard interactivity is invalid"/>370    </enum>371372    <enum name="anchor" bitfield="true">373      <entry name="top" value="1" summary="the top edge of the anchor rectangle"/>374      <entry name="bottom" value="2" summary="the bottom edge of the anchor rectangle"/>375      <entry name="left" value="4" summary="the left edge of the anchor rectangle"/>376      <entry name="right" value="8" summary="the right edge of the anchor rectangle"/>377    </enum>378379    <!-- Version 2 additions -->380381    <request name="set_layer" since="2">382      <description summary="change the layer of the surface">383        Change the layer that the surface is rendered on.384385        Layer is double-buffered, see wl_surface.commit.386      </description>387      <arg name="layer" type="uint" enum="zwlr_layer_shell_v1.layer" summary="layer to move this surface to"/>388    </request>389  </interface>390</protocol>