summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRobin Burchell <robin.burchell@crimson.no>2017-07-30 21:50:41 +0200
committerPaul Olav Tvete <paul.tvete@qt.io>2018-08-17 14:39:03 +0000
commit4d2106d4b6ed1a088834a8fec9c6a47e5a67d4e8 (patch)
tree01c53fcbd48c821a8846406ff3c0ba0db7a8a60a
parent8a19893226d46c7e45da0d2fe6e327f438aacdf7 (diff)
Upgrade wayland.xml to version 1.10.0
Change-Id: I85b58ca9d14a1d37959475b05e0be8c9c8721186 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
-rw-r--r--src/3rdparty/protocol/qt_attribution.json4
-rw-r--r--src/3rdparty/protocol/wayland.xml743
2 files changed, 662 insertions, 85 deletions
diff --git a/src/3rdparty/protocol/qt_attribution.json b/src/3rdparty/protocol/qt_attribution.json
index ac6ba44ce..bf5851f84 100644
--- a/src/3rdparty/protocol/qt_attribution.json
+++ b/src/3rdparty/protocol/qt_attribution.json
@@ -8,8 +8,8 @@
"Description": "Wayland is a protocol for a compositor to talk to its clients.",
"Homepage": "https://wayland.freedesktop.org",
- "Version": "1.6.1",
- "DownloadLocation": "https://cgit.freedesktop.org/wayland/wayland/tag/?id=1.6.1",
+ "Version": "1.10.0",
+ "DownloadLocation": "https://cgit.freedesktop.org/wayland/wayland/tag/?id=1.10.0",
"LicenseId": "HPND",
"License": "HPND License",
"LicenseFile": "HPND_LICENSE.txt",
diff --git a/src/3rdparty/protocol/wayland.xml b/src/3rdparty/protocol/wayland.xml
index bb457bcf7..8739cd319 100644
--- a/src/3rdparty/protocol/wayland.xml
+++ b/src/3rdparty/protocol/wayland.xml
@@ -6,26 +6,26 @@
Copyright © 2010-2011 Intel Corporation
Copyright © 2012-2013 Collabora, Ltd.
- Permission to use, copy, modify, distribute, and sell this
- software and its documentation for any purpose is hereby granted
- without fee, provided that the above copyright notice appear in
- all copies and that both that copyright notice and this permission
- notice appear in supporting documentation, and that the name of
- the copyright holders not be used in advertising or publicity
- pertaining to distribution of the software without specific,
- written prior permission. The copyright holders make no
- representations about the suitability of this software for any
- purpose. It is provided "as is" without express or implied
- warranty.
-
- THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS
- SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
- FITNESS, IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY
- SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
- WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
- AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
- ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF
- THIS SOFTWARE.
+ Permission is hereby granted, free of charge, to any person
+ obtaining a copy of this software and associated documentation files
+ (the "Software"), to deal in the Software without restriction,
+ including without limitation the rights to use, copy, modify, merge,
+ publish, distribute, sublicense, and/or sell copies of the Software,
+ and to permit persons to whom the Software is furnished to do so,
+ subject to the following conditions:
+
+ The above copyright notice and this permission notice (including the
+ next paragraph) shall be included in all copies or substantial
+ portions of the Software.
+
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
+ BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+ ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ SOFTWARE.
</copyright>
<interface name="wl_display" version="1">
@@ -176,7 +176,7 @@
</event>
</interface>
- <interface name="wl_compositor" version="3">
+ <interface name="wl_compositor" version="4">
<description summary="the compositor singleton">
A compositor. This object is a singleton global. The
compositor is in charge of combining the contents of multiple
@@ -367,7 +367,7 @@
can be used for buffers. Known formats include
argb8888 and xrgb8888.
</description>
- <arg name="format" type="uint"/>
+ <arg name="format" type="uint" enum="format"/>
</event>
</interface>
@@ -408,7 +408,7 @@
</interface>
- <interface name="wl_data_offer" version="1">
+ <interface name="wl_data_offer" version="3">
<description summary="offer to transfer data">
A wl_data_offer represents a piece of data offered for transfer
by another client (the source client). It is used by the
@@ -418,12 +418,33 @@
data directly from the source client.
</description>
+ <enum name="error">
+ <entry name="invalid_finish" value="0"
+ summary="finish request was called untimely"/>
+ <entry name="invalid_action_mask" value="1"
+ summary="action mask contains invalid values"/>
+ <entry name="invalid_action" value="2"
+ summary="action argument has an invalid value"/>
+ <entry name="invalid_offer" value="3"
+ summary="offer doesn't accept this request"/>
+ </enum>
+
<request name="accept">
<description summary="accept one of the offered mime types">
Indicate that the client can accept the given mime type, or
NULL for not accepted.
- Used for feedback during drag-and-drop.
+ For objects of version 2 or older, this request is used by the
+ client to give feedback whether the client can receive the given
+ mime type, or NULL if none is accepted; the feedback does not
+ determine whether the drag-and-drop operation succeeds or not.
+
+ For objects of version 3 or newer, this request determines the
+ final result of the drag-and-drop operation. If the end result
+ is that no mime types were accepted, the drag-and-drop operation
+ will be cancelled and the corresponding drag source will receive
+ wl_data_source.cancelled. Clients may still use this event in
+ conjunction with wl_data_source.action for feedback.
</description>
<arg name="serial" type="uint"/>
@@ -440,8 +461,13 @@
file descriptor.
The receiving client reads from the read end of the pipe until
- EOF and the closes its end, at which point the transfer is
+ EOF and then closes its end, at which point the transfer is
complete.
+
+ This request may happen multiple times for different mimetypes,
+ both before and after wl_data_device.drop. Drag-and-drop destination
+ clients may preemptively fetch data or examine it more closely to
+ determine acceptance.
</description>
<arg name="mime_type" type="string"/>
<arg name="fd" type="fd"/>
@@ -461,9 +487,115 @@
<arg name="mime_type" type="string"/>
</event>
+
+ <!-- Version 3 additions -->
+
+ <request name="finish" since="3">
+ <description summary="the offer will no longer be used">
+ Notifies the compositor that the drag destination successfully
+ finished the drag-and-drop operation.
+
+ Upon receiving this request, the compositor will emit
+ wl_data_source.dnd_finished on the drag source client.
+
+ It is a client error to perform other requests than
+ wl_data_offer.destroy after this one. It is also an error to perform
+ this request after a NULL mime type has been set in
+ wl_data_offer.accept or no action was received through
+ wl_data_offer.action.
+ </description>
+ </request>
+
+ <request name="set_actions" since="3">
+ <description summary="set the available/preferred drag-and-drop actions">
+ Sets the actions that the destination side client supports for
+ this operation. This request may trigger the emission of
+ wl_data_source.action and wl_data_offer.action events if the compositor
+ need to change the selected action.
+
+ This request can be called multiple times throughout the
+ drag-and-drop operation, typically in response to wl_data_device.enter
+ or wl_data_device.motion events.
+
+ This request determines the final result of the drag-and-drop
+ operation. If the end result is that no action is accepted,
+ the drag source will receive wl_drag_source.cancelled.
+
+ The dnd_actions argument must contain only values expressed in the
+ wl_data_device_manager.dnd_actions enum, and the preferred_action
+ argument must only contain one of those values set, otherwise it
+ will result in a protocol error.
+
+ While managing an "ask" action, the destination drag-and-drop client
+ may perform further wl_data_offer.receive requests, and is expected
+ to perform one last wl_data_offer.set_actions request with a preferred
+ action other than "ask" (and optionally wl_data_offer.accept) before
+ requesting wl_data_offer.finish, in order to convey the action selected
+ by the user. If the preferred action is not in the
+ wl_data_offer.source_actions mask, an error will be raised.
+
+ If the "ask" action is dismissed (e.g. user cancellation), the client
+ is expected to perform wl_data_offer.destroy right away.
+
+ This request can only be made on drag-and-drop offers, a protocol error
+ will be raised otherwise.
+ </description>
+ <arg name="dnd_actions" type="uint"/>
+ <arg name="preferred_action" type="uint"/>
+ </request>
+
+ <event name="source_actions" since="3">
+ <description summary="notify the source-side available actions">
+ This event indicates the actions offered by the data source. It
+ will be sent right after wl_data_device.enter, or anytime the source
+ side changes its offered actions through wl_data_source.set_actions.
+ </description>
+ <arg name="source_actions" type="uint"/>
+ </event>
+
+ <event name="action" since="3">
+ <description summary="notify the selected action">
+ This event indicates the action selected by the compositor after
+ matching the source/destination side actions. Only one action (or
+ none) will be offered here.
+
+ This event can be emitted multiple times during the drag-and-drop
+ operation in response to destination side action changes through
+ wl_data_offer.set_actions.
+
+ This event will no longer be emitted after wl_data_device.drop
+ happened on the drag-and-drop destination, the client must
+ honor the last action received, or the last preferred one set
+ through wl_data_offer.set_actions when handling an "ask" action.
+
+ Compositors may also change the selected action on the fly, mainly
+ in response to keyboard modifier changes during the drag-and-drop
+ operation.
+
+ The most recent action received is always the valid one. Prior to
+ receiving wl_data_device.drop, the chosen action may change (e.g.
+ due to keyboard modifiers being pressed). At the time of receiving
+ wl_data_device.drop the drag-and-drop destination must honor the
+ last action received.
+
+ Action changes may still happen after wl_data_device.drop,
+ especially on "ask" actions, where the drag-and-drop destination
+ may choose another action afterwards. Action changes happening
+ at this stage are always the result of inter-client negotiation, the
+ compositor shall no longer be able to induce a different action.
+
+ Upon "ask" actions, it is expected that the drag-and-drop destination
+ may potentially choose different a different action and/or mime type,
+ based on wl_data_offer.source_actions and finally chosen by the
+ user (e.g. popping up a menu with the available options). The
+ final wl_data_offer.set_actions and wl_data_offer.accept requests
+ must happen before the call to wl_data_offer.finish.
+ </description>
+ <arg name="dnd_action" type="uint"/>
+ </event>
</interface>
- <interface name="wl_data_source" version="1">
+ <interface name="wl_data_source" version="3">
<description summary="offer to transfer data">
The wl_data_source object is the source side of a wl_data_offer.
It is created by the source client in a data transfer and
@@ -471,6 +603,13 @@
to requests to transfer the data.
</description>
+ <enum name="error">
+ <entry name="invalid_action_mask" value="0"
+ summary="action mask contains invalid values"/>
+ <entry name="invalid_source" value="1"
+ summary="source doesn't accept this request"/>
+ </enum>
+
<request name="offer">
<description summary="add an offered mime type">
This request adds a mime type to the set of mime types
@@ -510,14 +649,108 @@
<event name="cancelled">
<description summary="selection was cancelled">
- This data source has been replaced by another data source.
+ This data source is no longer valid. There are several reasons why
+ this could happen:
+
+ - The data source has been replaced by another data source.
+ - The drag-and-drop operation was performed, but the drop destination
+ did not accept any of the mimetypes offered through
+ wl_data_source.target.
+ - The drag-and-drop operation was performed, but the drop destination
+ did not select any of the actions present in the mask offered through
+ wl_data_source.action.
+ - The drag-and-drop operation was performed but didn't happen over a
+ surface.
+ - The compositor cancelled the drag-and-drop operation (e.g. compositor
+ dependent timeouts to avoid stale drag-and-drop transfers).
+
The client should clean up and destroy this data source.
+
+ For objects of version 2 or older, wl_data_source.cancelled will
+ only be emitted if the data source was replaced by another data
+ source.
+ </description>
+ </event>
+
+ <!-- Version 3 additions -->
+
+ <request name="set_actions" since="3">
+ <description summary="set the available drag-and-drop actions">
+ Sets the actions that the source side client supports for this
+ operation. This request may trigger wl_data_source.action and
+ wl_data_offer.action events if the compositor needs to change the
+ selected action.
+
+ The dnd_actions argument must contain only values expressed in the
+ wl_data_device_manager.dnd_actions enum, otherwise it will result
+ in a protocol error.
+
+ This request must be made once only, and can only be made on sources
+ used in drag-and-drop, so it must be performed before
+ wl_data_device.start_drag. Attempting to use the source other than
+ for drag-and-drop will raise a protocol error.
+ </description>
+ <arg name="dnd_actions" type="uint"/>
+ </request>
+
+ <event name="dnd_drop_performed" since="3">
+ <description summary="the drag-and-drop operation physically finished">
+ The user performed the drop action. This event does not indicate
+ acceptance, wl_data_source.cancelled may still be emitted afterwards
+ if the drop destination does not accept any mimetype.
+
+ However, this event might however not be received if the compositor
+ cancelled the drag-and-drop operation before this event could happen.
+
+ Note that the data_source may still be used in the future and should
+ not be destroyed here.
</description>
</event>
+ <event name="dnd_finished" since="3">
+ <description summary="the drag-and-drop operation concluded">
+ The drop destination finished interoperating with this data
+ source, so the client is now free to destroy this data source and
+ free all associated data.
+
+ If the action used to perform the operation was "move", the
+ source can now delete the transferred data.
+ </description>
+ </event>
+
+ <event name="action" since="3">
+ <description summary="notify the selected action">
+ This event indicates the action selected by the compositor after
+ matching the source/destination side actions. Only one action (or
+ none) will be offered here.
+
+ This event can be emitted multiple times during the drag-and-drop
+ operation, mainly in response to destination side changes through
+ wl_data_offer.set_actions, and as the data device enters/leaves
+ surfaces.
+
+ It is only possible to receive this event after
+ wl_data_source.dnd_drop_performed if the drag-and-drop operation
+ ended in an "ask" action, in which case the final wl_data_source.action
+ event will happen immediately before wl_data_source.dnd_finished.
+
+ Compositors may also change the selected action on the fly, mainly
+ in response to keyboard modifier changes during the drag-and-drop
+ operation.
+
+ The most recent action received is always the valid one. The chosen
+ action may change alongside negotiation (e.g. an "ask" action can turn
+ into a "move" operation), so the effects of the final action must
+ always be applied in wl_data_offer.dnd_finished.
+
+ Clients can trigger cursor surface changes from this point, so
+ they reflect the current action.
+ </description>
+ <arg name="dnd_action" type="uint"/>
+ </event>
</interface>
- <interface name="wl_data_device" version="1">
+ <interface name="wl_data_device" version="3">
<description summary="data transfer device">
There is one wl_data_device per seat which can be obtained
from the global wl_data_device_manager singleton.
@@ -525,6 +758,11 @@
A wl_data_device provides access to inter-client data transfer
mechanisms such as copy-and-paste and drag-and-drop.
</description>
+
+ <enum name="error">
+ <entry name="role" value="0" summary="given wl_surface has another role"/>
+ </enum>
+
<request name="start_drag">
<description summary="start drag-and-drop operation">
This request asks the compositor to start a drag-and-drop
@@ -545,7 +783,9 @@
the top-left corner of the icon surface is placed at the cursor
hotspot, but subsequent wl_surface.attach request can move the
relative position. Attach requests must be confirmed with
- wl_surface.commit as usual.
+ wl_surface.commit as usual. The icon surface is given the role of
+ a drag-and-drop icon. If the icon surface already has another role,
+ it raises a protocol error.
The current and pending input regions of the icon wl_surface are
cleared, and wl_surface.set_input_region is ignored until the
@@ -623,6 +863,17 @@
<description summary="end drag-and-drag session successfully">
The event is sent when a drag-and-drop operation is ended
because the implicit grab is removed.
+
+ The drag-and-drop destination is expected to honor the last action
+ received through wl_data_offer.action, if the resulting action is
+ "copy" or "move", the destination can still perform
+ wl_data_offer.receive requests, and is expected to end all
+ transfers with a wl_data_offer.finish request.
+
+ If the resulting action is "ask", the action will not be considered
+ final. The drag-and-drop destination is expected to perform one last
+ wl_data_offer.set_actions request, or wl_data_offer.destroy in order
+ to cancel the operation.
</description>
</event>
@@ -636,19 +887,34 @@
immediately before receiving keyboard focus and when a new
selection is set while the client has keyboard focus. The
data_offer is valid until a new data_offer or NULL is received
- or until the client loses keyboard focus.
+ or until the client loses keyboard focus. The client must
+ destroy the previous selection data_offer, if any, upon receiving
+ this event.
</description>
<arg name="id" type="object" interface="wl_data_offer" allow-null="true"/>
</event>
+
+ <!-- Version 2 additions -->
+
+ <request name="release" type="destructor" since="2">
+ <description summary="destroy data device">
+ This request destroys the data device.
+ </description>
+ </request>
</interface>
- <interface name="wl_data_device_manager" version="1">
+ <interface name="wl_data_device_manager" version="3">
<description summary="data transfer interface">
The wl_data_device_manager is a singleton global object that
provides access to inter-client data transfer mechanisms such as
copy-and-paste and drag-and-drop. These mechanisms are tied to
a wl_seat and this interface lets a client get a wl_data_device
corresponding to a wl_seat.
+
+ Depending on the version bound, the objects created from the bound
+ wl_data_device_manager object will have different requirements for
+ functioning properly. See wl_data_source.set_actions,
+ wl_data_offer.accept and wl_data_offer.finish for details.
</description>
<request name="create_data_source">
@@ -665,6 +931,40 @@
<arg name="id" type="new_id" interface="wl_data_device"/>
<arg name="seat" type="object" interface="wl_seat"/>
</request>
+
+ <!-- Version 3 additions -->
+
+ <enum name="dnd_action" bitfield="true" since="3">
+ <description summary="drag and drop actions">
+ This is a bitmask of the available/preferred actions in a
+ drag-and-drop operation.
+
+ In the compositor, the selected action is a result of matching the
+ actions offered by the source and destination sides. "action" events
+ with a "none" action will be sent to both source and destination if
+ there is no match. All further checks will effectively happen on
+ (source actions ∩ destination actions).
+
+ In addition, compositors may also pick different actions in
+ reaction to key modifiers being pressed, one common design that
+ is used in major toolkits (and the behavior recommended for
+ compositors) is:
+
+ - If no modifiers are pressed, the first match (in bit order)
+ will be used.
+ - Pressing Shift selects "move", if enabled in the mask.
+ - Pressing Control selects "copy", if enabled in the mask.
+
+ Behavior beyond that is considered implementation-dependent.
+ Compositors may for example bind other modifiers (like Alt/Meta)
+ or drags initiated with other buttons than BTN_LEFT to specific
+ actions (e.g. "ask").
+ </description>
+ <entry name="none" value="0"/>
+ <entry name="copy" value="1"/>
+ <entry name="move" value="2"/>
+ <entry name="ask" value="4"/>
+ </enum>
</interface>
<interface name="wl_shell" version="1">
@@ -676,9 +976,15 @@
a basic surface.
</description>
+ <enum name="error">
+ <entry name="role" value="0" summary="given wl_surface has another role"/>
+ </enum>
+
<request name="get_shell_surface">
<description summary="create a shell surface from a surface">
- Create a shell surface for an existing surface.
+ Create a shell surface for an existing surface. This gives
+ the wl_surface the role of a shell surface. If the wl_surface
+ already has another role, it raises a protocol error.
Only one shell surface can be associated with a given surface.
</description>
@@ -723,7 +1029,7 @@
<arg name="serial" type="uint" summary="serial of the implicit grab on the pointer"/>
</request>
- <enum name="resize">
+ <enum name="resize" bitfield="true">
<description summary="edge values for resizing">
These values are used to indicate which edge of a surface
is being dragged in a resize operation. The server may
@@ -751,7 +1057,7 @@
</description>
<arg name="seat" type="object" interface="wl_seat" summary="the wl_seat whose pointer is used"/>
<arg name="serial" type="uint" summary="serial of the implicit grab on the pointer"/>
- <arg name="edges" type="uint" summary="which edge or corner is being dragged"/>
+ <arg name="edges" type="uint" enum="resize" summary="which edge or corner is being dragged"/>
</request>
<request name="set_toplevel">
@@ -762,7 +1068,7 @@
</description>
</request>
- <enum name="transient">
+ <enum name="transient" bitfield="true">
<description summary="details of transient behaviour">
These flags specify details of the expected behaviour
of transient surfaces. Used in the set_transient request.
@@ -784,7 +1090,7 @@
<arg name="parent" type="object" interface="wl_surface"/>
<arg name="x" type="int"/>
<arg name="y" type="int"/>
- <arg name="flags" type="uint"/>
+ <arg name="flags" type="uint" enum="transient"/>
</request>
<enum name="fullscreen_method">
@@ -835,7 +1141,7 @@
with the dimensions for the output on which the surface will
be made fullscreen.
</description>
- <arg name="method" type="uint"/>
+ <arg name="method" type="uint" enum="fullscreen_method"/>
<arg name="framerate" type="uint"/>
<arg name="output" type="object" interface="wl_output" allow-null="true"/>
</request>
@@ -868,7 +1174,7 @@
<arg name="parent" type="object" interface="wl_surface"/>
<arg name="x" type="int"/>
<arg name="y" type="int"/>
- <arg name="flags" type="uint"/>
+ <arg name="flags" type="uint" enum="transient"/>
</request>
<request name="set_maximized">
@@ -949,7 +1255,7 @@
in surface local coordinates.
</description>
- <arg name="edges" type="uint"/>
+ <arg name="edges" type="uint" enum="resize"/>
<arg name="width" type="int"/>
<arg name="height" type="int"/>
</event>
@@ -963,7 +1269,7 @@
</event>
</interface>
- <interface name="wl_surface" version="3">
+ <interface name="wl_surface" version="4">
<description summary="an onscreen surface">
A surface is a rectangular area that is displayed on the screen.
It has a location, size and pixel contents.
@@ -973,8 +1279,37 @@
local coordinates of the pixel content, in case a buffer_transform
or a buffer_scale is used.
- Surfaces are also used for some special purposes, e.g. as
- cursor images for pointers, drag icons, etc.
+ A surface without a "role" is fairly useless, a compositor does
+ not know where, when or how to present it. The role is the
+ purpose of a wl_surface. Examples of roles are a cursor for a
+ pointer (as set by wl_pointer.set_cursor), a drag icon
+ (wl_data_device.start_drag), a sub-surface
+ (wl_subcompositor.get_subsurface), and a window as defined by a
+ shell protocol (e.g. wl_shell.get_shell_surface).
+
+ A surface can have only one role at a time. Initially a
+ wl_surface does not have a role. Once a wl_surface is given a
+ role, it is set permanently for the whole lifetime of the
+ wl_surface object. Giving the current role again is allowed,
+ unless explicitly forbidden by the relevant interface
+ specification.
+
+ Surface roles are given by requests in other interfaces such as
+ wl_pointer.set_cursor. The request should explicitly mention
+ that this request gives a role to a wl_surface. Often, this
+ request also creates a new protocol object that represents the
+ role and adds additional functionality to wl_surface. When a
+ client wants to destroy a wl_surface, they must destroy this 'role
+ object' before the wl_surface.
+
+ Destroying the role object does not remove the role from the
+ wl_surface, but it may stop the wl_surface from "playing the role".
+ For instance, if a wl_subsurface object is destroyed, the wl_surface
+ it was created for will be unmapped and forget its position and
+ z-order. It is allowed to create a wl_subsurface for the same
+ wl_surface again, but it is not allowed to use the wl_surface as
+ a cursor (cursor is a different role than sub-surface, and role
+ switching is not allowed).
</description>
<enum name="error">
@@ -1043,10 +1378,8 @@
<description summary="mark part of the surface damaged">
This request is used to describe the regions where the pending
buffer is different from the current surface contents, and where
- the surface therefore needs to be repainted. The pending buffer
- must be set by wl_surface.attach before sending damage. The
- compositor ignores the parts of the damage that fall outside of
- the surface.
+ the surface therefore needs to be repainted. The compositor
+ ignores the parts of the damage that fall outside of the surface.
Damage is double-buffered state, see wl_surface.commit.
@@ -1059,6 +1392,10 @@
wl_surface.commit assigns pending damage as the current damage,
and clears pending damage. The server will clear the current
damage as it repaints the surface.
+
+ Alternatively, damage can be posted with wl_surface.damage_buffer
+ which uses buffer co-ordinates instead of surface co-ordinates,
+ and is probably the preferred and intuitive way of doing this.
</description>
<arg name="x" type="int"/>
@@ -1275,9 +1612,51 @@
</description>
<arg name="scale" type="int"/>
</request>
+
+ <!-- Version 4 additions -->
+ <request name="damage_buffer" since="4">
+ <description summary="mark part of the surface damaged using buffer co-ordinates">
+ This request is used to describe the regions where the pending
+ buffer is different from the current surface contents, and where
+ the surface therefore needs to be repainted. The compositor
+ ignores the parts of the damage that fall outside of the surface.
+
+ Damage is double-buffered state, see wl_surface.commit.
+
+ The damage rectangle is specified in buffer coordinates.
+
+ The initial value for pending damage is empty: no damage.
+ wl_surface.damage_buffer adds pending damage: the new pending
+ damage is the union of old pending damage and the given rectangle.
+
+ wl_surface.commit assigns pending damage as the current damage,
+ and clears pending damage. The server will clear the current
+ damage as it repaints the surface.
+
+ This request differs from wl_surface.damage in only one way - it
+ takes damage in buffer co-ordinates instead of surface local
+ co-ordinates. While this generally is more intuitive than surface
+ co-ordinates, it is especially desirable when using wp_viewport
+ or when a drawing library (like EGL) is unaware of buffer scale
+ and buffer transform.
+
+ Note: Because buffer transformation changes and damage requests may
+ be interleaved in the protocol stream, It is impossible to determine
+ the actual mapping between surface and buffer damage until
+ wl_surface.commit time. Therefore, compositors wishing to take both
+ kinds of damage into account will have to accumulate damage from the
+ two requests separately and only transform from one to the other
+ after receiving the wl_surface.commit.
+ </description>
+
+ <arg name="x" type="int"/>
+ <arg name="y" type="int"/>
+ <arg name="width" type="int"/>
+ <arg name="height" type="int"/>
+ </request>
</interface>
- <interface name="wl_seat" version="4">
+ <interface name="wl_seat" version="5">
<description summary="group of input devices">
A seat is a group of keyboards, pointer and touch devices. This
object is published as a global during start up, or when such a
@@ -1285,7 +1664,7 @@
maintains a keyboard focus and a pointer focus.
</description>
- <enum name="capability">
+ <enum name="capability" bitfield="true">
<description summary="seat capability bitmask">
This is a bitmask of capabilities this seat has; if a member is
set, then it is present on the seat.
@@ -1297,47 +1676,74 @@
<event name="capabilities">
<description summary="seat capabilities changed">
- This is emitted whenever a seat gains or loses the pointer,
+ This is emitted whenever a seat gains or loses the pointer,
keyboard or touch capabilities. The argument is a capability
enum containing the complete set of capabilities this seat has.
+
+ When the pointer capability is added, a client may create a
+ wl_pointer object using the wl_seat.get_pointer request. This object
+ will receive pointer events until the capability is removed in the
+ future.
+
+ When the pointer capability is removed, a client should destroy the
+ wl_pointer objects associated with the seat where the capability was
+ removed, using the wl_pointer.release request. No further pointer
+ events will be received on these objects.
+
+ In some compositors, if a seat regains the pointer capability and a
+ client has a previously obtained wl_pointer object of version 4 or
+ less, that object may start sending pointer events again. This
+ behavior is considered a misinterpretation of the intended behavior
+ and must not be relied upon by the client. wl_pointer objects of
+ version 5 or later must not send events if created before the most
+ recent event notifying the client of an added pointer capability.
+
+ The above behavior also applies to wl_keyboard and wl_touch with the
+ keyboard and touch capabilities, respectively.
</description>
- <arg name="capabilities" type="uint"/>
+ <arg name="capabilities" type="uint" enum="capability"/>
</event>
<request name="get_pointer">
<description summary="return pointer object">
- The ID provided will be initialized to the wl_pointer interface
+ The ID provided will be initialized to the wl_pointer interface
for this seat.
- This request only takes effect if the seat has the pointer
- capability.
+ This request only takes effect if the seat has the pointer
+ capability, or has had the pointer capability in the past.
+ It is a protocol violation to issue this request on a seat that has
+ never had the pointer capability.
</description>
<arg name="id" type="new_id" interface="wl_pointer"/>
</request>
<request name="get_keyboard">
<description summary="return keyboard object">
- The ID provided will be initialized to the wl_keyboard interface
+ The ID provided will be initialized to the wl_keyboard interface
for this seat.
- This request only takes effect if the seat has the keyboard
- capability.
+ This request only takes effect if the seat has the keyboard
+ capability, or has had the keyboard capability in the past.
+ It is a protocol violation to issue this request on a seat that has
+ never had the keyboard capability.
</description>
<arg name="id" type="new_id" interface="wl_keyboard"/>
</request>
<request name="get_touch">
<description summary="return touch object">
- The ID provided will be initialized to the wl_touch interface
+ The ID provided will be initialized to the wl_touch interface
for this seat.
- This request only takes effect if the seat has the touch
- capability.
+ This request only takes effect if the seat has the touch
+ capability, or has had the touch capability in the past.
+ It is a protocol violation to issue this request on a seat that has
+ never had the touch capability.
</description>
<arg name="id" type="new_id" interface="wl_touch"/>
</request>
- <!-- Version 2 of additions -->
+ <!-- Version 2 additions -->
<event name="name" since="2">
<description summary="unique identifier for this seat">
@@ -1348,9 +1754,18 @@
<arg name="name" type="string"/>
</event>
+ <!-- Version 5 additions -->
+
+ <request name="release" type="destructor" since="5">
+ <description summary="release the seat object">
+ Using this request client can tell the server that it is not going to
+ use the seat object anymore.
+ </description>
+ </request>
+
</interface>
- <interface name="wl_pointer" version="3">
+ <interface name="wl_pointer" version="5">
<description summary="pointer input device">
The wl_pointer interface represents one or more input devices,
such as mice, which control the pointer location and pointer_focus
@@ -1362,10 +1777,18 @@
and scrolling.
</description>
+ <enum name="error">
+ <entry name="role" value="0" summary="given wl_surface has another role"/>
+ </enum>
+
<request name="set_cursor">
<description summary="set the pointer surface">
Set the pointer surface, i.e., the surface that contains the
- pointer image (cursor). This request only takes effect if the pointer
+ pointer image (cursor). This request gives the surface the role
+ of a cursor. If the surface already has another role, it raises
+ a protocol error.
+
+ The cursor actually changes only if the pointer
focus for this device is one of the requesting client's surfaces
or the surface parameter is the current pointer surface. If
there was a previous surface set with this request it is
@@ -1461,7 +1884,7 @@
<arg name="serial" type="uint"/>
<arg name="time" type="uint" summary="timestamp with millisecond granularity"/>
<arg name="button" type="uint"/>
- <arg name="state" type="uint"/>
+ <arg name="state" type="uint" enum="button_state"/>
</event>
<enum name="axis">
@@ -1493,19 +1916,169 @@
</description>
<arg name="time" type="uint" summary="timestamp with millisecond granularity"/>
- <arg name="axis" type="uint"/>
+ <arg name="axis" type="uint" enum="axis"/>
<arg name="value" type="fixed"/>
</event>
<!-- Version 3 additions -->
<request name="release" type="destructor" since="3">
- <description summary="release the pointer object"/>
+ <description summary="release the pointer object">
+ Using this request client can tell the server that it is not going to
+ use the pointer object anymore.
+
+ This request destroys the pointer proxy object, so user must not call
+ wl_pointer_destroy() after using this request.
+ </description>
</request>
+ <!-- Version 5 additions -->
+
+ <event name="frame" since="5">
+ <description summary="end of a pointer event sequence">
+ Indicates the end of a set of events that logically belong together.
+ A client is expected to accumulate the data in all events within the
+ frame before proceeding.
+
+ All wl_pointer events before a wl_pointer.frame event belong
+ logically together. For example, in a diagonal scroll motion the
+ compositor will send an optional wl_pointer.axis_source event, two
+ wl_pointer.axis events (horizontal and vertical) and finally a
+ wl_pointer.frame event. The client may use this information to
+ calculate a diagonal vector for scrolling.
+
+ When multiple wl_pointer.axis events occur within the same frame,
+ the motion vector is the combined motion of all events.
+ When a wl_pointer.axis and a wl_pointer.axis_stop event occur within
+ the same frame, this indicates that axis movement in one axis has
+ stopped but continues in the other axis.
+ When multiple wl_pointer.axis_stop events occur within in the same
+ frame, this indicates that these axes stopped in the same instance.
+
+ A wl_pointer.frame event is sent for every logical event group,
+ even if the group only contains a single wl_pointer event.
+ Specifically, a client may get a sequence: motion, frame, button,
+ frame, axis, frame, axis_stop, frame.
+
+ The wl_pointer.enter and wl_pointer.leave events are logical events
+ generated by the compositor and not the hardware. These events are
+ also grouped by a wl_pointer.frame. When a pointer moves from one
+ surface to the another, a compositor should group the
+ wl_pointer.leave event within the same wl_pointer.frame.
+ However, a client must not rely on wl_pointer.leave and
+ wl_pointer.enter being in the same wl_pointer.frame.
+ Compositor-specific policies may require the wl_pointer.leave and
+ wl_pointer.enter event being split across multiple wl_pointer.frame
+ groups.
+ </description>
+ </event>
+
+ <enum name="axis_source">
+ <description summary="axis source types">
+ Describes the source types for axis events. This indicates to the
+ client how an axis event was physically generated; a client may
+ adjust the user interface accordingly. For example, scroll events
+ from a "finger" source may be in a smooth coordinate space with
+ kinetic scrolling whereas a "wheel" source may be in discrete steps
+ of a number of lines.
+
+ The "continuous" axis source is a device generating events in a
+ continuous coordinate space, but using something other than a
+ finger. One example for this source is button-based scrolling where
+ the vertical motion of a device is converted to scroll events while
+ a button is held down.
+ </description>
+ <entry name="wheel" value="0" summary="A physical wheel" />
+ <entry name="finger" value="1" summary="Finger on a touch surface" />
+ <entry name="continuous" value="2" summary="Continuous coordinate space"/>
+ </enum>
+
+ <event name="axis_source" since="5">
+ <description summary="axis source event">
+ Source information for scroll and other axes.
+
+ This event does not occur on its own. It is sent before a
+ wl_pointer.frame event and carries the source information for
+ all events within that frame.
+
+ The source specifies how this event was generated. If the source is
+ wl_pointer.axis_source.finger, a wl_pointer.axis_stop event will be
+ sent when the user lifts the finger off the device.
+
+ If the source is wl_pointer axis_source.wheel or
+ wl_pointer.axis_source.continuous, a wl_pointer.axis_stop event may
+ or may not be sent. Whether a compositor sends a axis_stop event
+ for these sources is hardware-specific and implementation-dependent;
+ clients must not rely on receiving an axis_stop event for these
+ scroll sources and should treat scroll sequences from these scroll
+ sources as unterminated by default.
+
+ This event is optional. If the source is unknown for a particular
+ axis event sequence, no event is sent.
+ Only one wl_pointer.axis_source event is permitted per frame.
+
+ The order of wl_pointer.axis_discrete and wl_pointer.axis_source is
+ not guaranteed.
+ </description>
+ <arg name="axis_source" type="uint" enum="axis_source"/>
+ </event>
+
+ <event name="axis_stop" since="5">
+ <description summary="axis stop event">
+ Stop notification for scroll and other axes.
+
+ For some wl_pointer.axis_source types, a wl_pointer.axis_stop event
+ is sent to notify a client that the axis sequence has terminated.
+ This enables the client to implement kinetic scrolling.
+ See the wl_pointer.axis_source documentation for information on when
+ this event may be generated.
+
+ Any wl_pointer.axis events with the same axis_source after this
+ event should be considered as the start of a new axis motion.
+
+ The timestamp is to be interpreted identical to the timestamp in the
+ wl_pointer.axis event. The timestamp value may be the same as a
+ preceeding wl_pointer.axis event.
+ </description>
+ <arg name="time" type="uint" summary="timestamp with millisecond granularity"/>
+ <arg name="axis" type="uint" enum="axis" summary="the axis stopped with this event"/>
+ </event>
+
+ <event name="axis_discrete" since="5">
+ <description summary="axis click event">
+ Discrete step information for scroll and other axes.
+
+ This event carries the axis value of the wl_pointer.axis event in
+ discrete steps (e.g. mouse wheel clicks).
+
+ This event does not occur on its own, it is coupled with a
+ wl_pointer.axis event that represents this axis value on a
+ continuous scale. The protocol guarantees that each axis_discrete
+ event is always followed by exactly one axis event with the same
+ axis number within the same wl_pointer.frame. Note that the protocol
+ allows for other events to occur between the axis_discrete and
+ its coupled axis event, including other axis_discrete or axis
+ events.
+
+ This event is optional; continuous scrolling devices
+ like two-finger scrolling on touchpads do not have discrete
+ steps and do not generate this event.
+
+ The discrete value carries the directional information. e.g. a value
+ of -2 is two steps towards the negative direction of this axis.
+
+ The axis number is identical to the axis number in the associate
+ axis event.
+
+ The order of wl_pointer.axis_discrete and wl_pointer.axis_source is
+ not guaranteed.
+ </description>
+ <arg name="axis" type="uint" enum="axis" />
+ <arg name="discrete" type="int"/>
+ </event>
</interface>
- <interface name="wl_keyboard" version="4">
+ <interface name="wl_keyboard" version="5">
<description summary="keyboard input device">
The wl_keyboard interface represents one or more keyboards
associated with a seat.
@@ -1527,7 +2100,7 @@
This event provides a file descriptor to the client which can be
memory-mapped to provide a keyboard mapping description.
</description>
- <arg name="format" type="uint"/>
+ <arg name="format" type="uint" enum="keymap_format"/>
<arg name="fd" type="fd"/>
<arg name="size" type="uint"/>
</event>
@@ -1572,7 +2145,7 @@
<arg name="serial" type="uint"/>
<arg name="time" type="uint" summary="timestamp with millisecond granularity"/>
<arg name="key" type="uint"/>
- <arg name="state" type="uint"/>
+ <arg name="state" type="uint" enum="key_state"/>
</event>
<event name="modifiers">
@@ -1619,7 +2192,7 @@
</event>
</interface>
- <interface name="wl_touch" version="3">
+ <interface name="wl_touch" version="5">
<description summary="touchscreen input device">
The wl_touch interface represents a touchscreen
associated with a seat.
@@ -1704,7 +2277,7 @@
<enum name="subpixel">
<description summary="subpixel geometry information">
This enumeration describes how the physical
- pixels on an output are layed out.
+ pixels on an output are laid out.
</description>
<entry name="unknown" value="0"/>
<entry name="none" value="1"/>
@@ -1753,17 +2326,17 @@
summary="width in millimeters of the output"/>
<arg name="physical_height" type="int"
summary="height in millimeters of the output"/>
- <arg name="subpixel" type="int"
+ <arg name="subpixel" type="int" enum="subpixel"
summary="subpixel orientation of the output"/>
<arg name="make" type="string"
summary="textual description of the manufacturer"/>
<arg name="model" type="string"
summary="textual description of the model"/>
- <arg name="transform" type="int"
+ <arg name="transform" type="int" enum="transform"
summary="transform that maps framebuffer to output"/>
</event>
- <enum name="mode">
+ <enum name="mode" bitfield="true">
<description summary="mode information">
These flags describe properties of an output mode.
They are used in the flags bitfield of the mode event.
@@ -1790,7 +2363,7 @@
the output may be scaled, as described in wl_output.scale,
or transformed , as described in wl_output.transform.
</description>
- <arg name="flags" type="uint" summary="bitfield of mode flags"/>
+ <arg name="flags" type="uint" enum="mode" summary="bitfield of mode flags"/>
<arg name="width" type="int" summary="width of the mode in hardware units"/>
<arg name="height" type="int" summary="height of the mode in hardware units"/>
<arg name="refresh" type="int" summary="vertical refresh rate in mHz"/>
@@ -1911,9 +2484,9 @@
associate it with the given parent surface. This turns a
plain wl_surface into a sub-surface.
- The to-be sub-surface must not already have a dedicated
- purpose, like any shell surface type, cursor image, drag icon,
- or sub-surface. Otherwise a protocol error is raised.
+ The to-be sub-surface must not already have another role, and it
+ must not have an existing wl_subsurface object. Otherwise a protocol
+ error is raised.
</description>
<arg name="id" type="new_id" interface="wl_subsurface"
@@ -2001,8 +2574,10 @@
coordinate system. The coordinates are not restricted to the parent
surface area. Negative values are allowed.
- The next wl_surface.commit on the parent surface will reset
- the sub-surface's position to the scheduled coordinates.
+ The scheduled coordinates will take effect whenever the state of the
+ parent surface is applied. When this happens depends on whether the
+ parent surface is in synchronized mode or not. See
+ wl_subsurface.set_sync and wl_subsurface.set_desync for details.
If more than one set_position request is invoked by the client before
the commit of the parent surface, the position of a new request always
@@ -2024,9 +2599,11 @@
will cause a protocol error.
The z-order is double-buffered. Requests are handled in order and
- applied immediately to a pending state, then committed to the active
- state on the next commit of the parent surface.
- See wl_surface.commit and wl_subcompositor.get_subsurface.
+ applied immediately to a pending state. The final pending state is
+ copied to the active state the next time the state of the parent
+ surface is applied. When this happens depends on whether the parent
+ surface is in synchronized mode or not. See wl_subsurface.set_sync and
+ wl_subsurface.set_desync for details.
A new sub-surface is initially added as the top-most in the stack
of its siblings and parent.
@@ -2049,7 +2626,7 @@
<request name="set_sync">
<description summary="set sub-surface to synchronized mode">
Change the commit behaviour of the sub-surface to synchronized
- mode, also described as the parent dependant mode.
+ mode, also described as the parent dependent mode.
In synchronized mode, wl_surface.commit on a sub-surface will
accumulate the committed state in a cache, but the state will