summaryrefslogtreecommitdiffstats
path: root/src/3rdparty/protocol/wayland.xml
diff options
context:
space:
mode:
Diffstat (limited to 'src/3rdparty/protocol/wayland.xml')
-rw-r--r--src/3rdparty/protocol/wayland.xml547
1 files changed, 466 insertions, 81 deletions
diff --git a/src/3rdparty/protocol/wayland.xml b/src/3rdparty/protocol/wayland.xml
index 141038b7a..10e039d6e 100644
--- a/src/3rdparty/protocol/wayland.xml
+++ b/src/3rdparty/protocol/wayland.xml
@@ -91,18 +91,20 @@
<entry name="invalid_object" value="0"
summary="server couldn't find object"/>
<entry name="invalid_method" value="1"
- summary="method doesn't exist on the specified interface"/>
+ summary="method doesn't exist on the specified interface or malformed request"/>
<entry name="no_memory" value="2"
summary="server is out of memory"/>
+ <entry name="implementation" value="3"
+ summary="implementation error in compositor"/>
</enum>
<event name="delete_id">
<description summary="acknowledge object ID deletion">
This event is used internally by the object ID management
- logic. When a client deletes an object, the server will send
- this event to acknowledge that it has seen the delete request.
- When the client receives this event, it will know that it can
- safely reuse the object ID.
+ logic. When a client deletes an object that it had created,
+ the server will send this event to acknowledge that it has
+ seen the delete request. When the client receives this event,
+ it will know that it can safely reuse the object ID.
</description>
<arg name="id" type="uint" summary="deleted object ID"/>
</event>
@@ -175,9 +177,12 @@
<description summary="callback object">
Clients can handle the 'done' event to get notified when
the related request is done.
+
+ Note, because wl_callback objects are created from multiple independent
+ factory interfaces, the wl_callback interface is frozen at version 1.
</description>
- <event name="done">
+ <event name="done" type="destructor">
<description summary="done event">
Notify the client when the related request is done.
</description>
@@ -185,7 +190,7 @@
</event>
</interface>
- <interface name="wl_compositor" version="4">
+ <interface name="wl_compositor" version="6">
<description summary="the compositor singleton">
A compositor. This object is a singleton global. The
compositor is in charge of combining the contents of multiple
@@ -256,6 +261,12 @@
for the pool from the file descriptor passed when the pool was
created, but using the new size. This request can only be
used to make the pool bigger.
+
+ This request only changes the amount of bytes that are mmapped
+ by the server and does not touch the file corresponding to the
+ file descriptor passed at creation time. It is the client's
+ responsibility to ensure that the file is at least as big as
+ the new pool size.
</description>
<arg name="size" type="int" summary="new size of the pool, in bytes"/>
</request>
@@ -269,8 +280,8 @@
Clients can create wl_shm_pool objects using the create_pool
request.
- At connection setup time, the wl_shm object emits one or more
- format events to inform clients about the valid pixel formats
+ On binding the wl_shm object one or more format events
+ are emitted to inform clients about the valid pixel formats
that can be used for buffers.
</description>
@@ -291,10 +302,15 @@
formats are optional and may not be supported by the particular
renderer in use.
- The drm format codes match the macros defined in drm_fourcc.h.
- The formats actually supported by the compositor will be
- reported by the format event.
+ The drm format codes match the macros defined in drm_fourcc.h, except
+ argb8888 and xrgb8888. The formats actually supported by the compositor
+ will be reported by the format event.
+
+ For all wl_shm formats and unless specified in another protocol
+ extension, pre-multiplied alpha is used for pixel values.
</description>
+ <!-- Note to protocol writers: don't update this list manually, instead
+ run the automated script that keeps it in sync with drm_fourcc.h. -->
<entry name="argb8888" value="0" summary="32-bit ARGB format, [31:0] A:R:G:B 8:8:8:8 little endian"/>
<entry name="xrgb8888" value="1" summary="32-bit RGB format, [31:0] x:R:G:B 8:8:8:8 little endian"/>
<entry name="c8" value="0x20203843" summary="8-bit color index format, [7:0] C"/>
@@ -353,6 +369,56 @@
<entry name="yvu422" value="0x36315659" summary="3 plane YCbCr format, 2x1 subsampled Cr (1) and Cb (2) planes"/>
<entry name="yuv444" value="0x34325559" summary="3 plane YCbCr format, non-subsampled Cb (1) and Cr (2) planes"/>
<entry name="yvu444" value="0x34325659" summary="3 plane YCbCr format, non-subsampled Cr (1) and Cb (2) planes"/>
+ <entry name="r8" value="0x20203852" summary="[7:0] R"/>
+ <entry name="r16" value="0x20363152" summary="[15:0] R little endian"/>
+ <entry name="rg88" value="0x38384752" summary="[15:0] R:G 8:8 little endian"/>
+ <entry name="gr88" value="0x38385247" summary="[15:0] G:R 8:8 little endian"/>
+ <entry name="rg1616" value="0x32334752" summary="[31:0] R:G 16:16 little endian"/>
+ <entry name="gr1616" value="0x32335247" summary="[31:0] G:R 16:16 little endian"/>
+ <entry name="xrgb16161616f" value="0x48345258" summary="[63:0] x:R:G:B 16:16:16:16 little endian"/>
+ <entry name="xbgr16161616f" value="0x48344258" summary="[63:0] x:B:G:R 16:16:16:16 little endian"/>
+ <entry name="argb16161616f" value="0x48345241" summary="[63:0] A:R:G:B 16:16:16:16 little endian"/>
+ <entry name="abgr16161616f" value="0x48344241" summary="[63:0] A:B:G:R 16:16:16:16 little endian"/>
+ <entry name="xyuv8888" value="0x56555958" summary="[31:0] X:Y:Cb:Cr 8:8:8:8 little endian"/>
+ <entry name="vuy888" value="0x34325556" summary="[23:0] Cr:Cb:Y 8:8:8 little endian"/>
+ <entry name="vuy101010" value="0x30335556" summary="Y followed by U then V, 10:10:10. Non-linear modifier only"/>
+ <entry name="y210" value="0x30313259" summary="[63:0] Cr0:0:Y1:0:Cb0:0:Y0:0 10:6:10:6:10:6:10:6 little endian per 2 Y pixels"/>
+ <entry name="y212" value="0x32313259" summary="[63:0] Cr0:0:Y1:0:Cb0:0:Y0:0 12:4:12:4:12:4:12:4 little endian per 2 Y pixels"/>
+ <entry name="y216" value="0x36313259" summary="[63:0] Cr0:Y1:Cb0:Y0 16:16:16:16 little endian per 2 Y pixels"/>
+ <entry name="y410" value="0x30313459" summary="[31:0] A:Cr:Y:Cb 2:10:10:10 little endian"/>
+ <entry name="y412" value="0x32313459" summary="[63:0] A:0:Cr:0:Y:0:Cb:0 12:4:12:4:12:4:12:4 little endian"/>
+ <entry name="y416" value="0x36313459" summary="[63:0] A:Cr:Y:Cb 16:16:16:16 little endian"/>
+ <entry name="xvyu2101010" value="0x30335658" summary="[31:0] X:Cr:Y:Cb 2:10:10:10 little endian"/>
+ <entry name="xvyu12_16161616" value="0x36335658" summary="[63:0] X:0:Cr:0:Y:0:Cb:0 12:4:12:4:12:4:12:4 little endian"/>
+ <entry name="xvyu16161616" value="0x38345658" summary="[63:0] X:Cr:Y:Cb 16:16:16:16 little endian"/>
+ <entry name="y0l0" value="0x304c3059" summary="[63:0] A3:A2:Y3:0:Cr0:0:Y2:0:A1:A0:Y1:0:Cb0:0:Y0:0 1:1:8:2:8:2:8:2:1:1:8:2:8:2:8:2 little endian"/>
+ <entry name="x0l0" value="0x304c3058" summary="[63:0] X3:X2:Y3:0:Cr0:0:Y2:0:X1:X0:Y1:0:Cb0:0:Y0:0 1:1:8:2:8:2:8:2:1:1:8:2:8:2:8:2 little endian"/>
+ <entry name="y0l2" value="0x324c3059" summary="[63:0] A3:A2:Y3:Cr0:Y2:A1:A0:Y1:Cb0:Y0 1:1:10:10:10:1:1:10:10:10 little endian"/>
+ <entry name="x0l2" value="0x324c3058" summary="[63:0] X3:X2:Y3:Cr0:Y2:X1:X0:Y1:Cb0:Y0 1:1:10:10:10:1:1:10:10:10 little endian"/>
+ <entry name="yuv420_8bit" value="0x38305559"/>
+ <entry name="yuv420_10bit" value="0x30315559"/>
+ <entry name="xrgb8888_a8" value="0x38415258"/>
+ <entry name="xbgr8888_a8" value="0x38414258"/>
+ <entry name="rgbx8888_a8" value="0x38415852"/>
+ <entry name="bgrx8888_a8" value="0x38415842"/>
+ <entry name="rgb888_a8" value="0x38413852"/>
+ <entry name="bgr888_a8" value="0x38413842"/>
+ <entry name="rgb565_a8" value="0x38413552"/>
+ <entry name="bgr565_a8" value="0x38413542"/>
+ <entry name="nv24" value="0x3432564e" summary="non-subsampled Cr:Cb plane"/>
+ <entry name="nv42" value="0x3234564e" summary="non-subsampled Cb:Cr plane"/>
+ <entry name="p210" value="0x30313250" summary="2x1 subsampled Cr:Cb plane, 10 bit per channel"/>
+ <entry name="p010" value="0x30313050" summary="2x2 subsampled Cr:Cb plane 10 bits per channel"/>
+ <entry name="p012" value="0x32313050" summary="2x2 subsampled Cr:Cb plane 12 bits per channel"/>
+ <entry name="p016" value="0x36313050" summary="2x2 subsampled Cr:Cb plane 16 bits per channel"/>
+ <entry name="axbxgxrx106106106106" value="0x30314241" summary="[63:0] A:x:B:x:G:x:R:x 10:6:10:6:10:6:10:6 little endian"/>
+ <entry name="nv15" value="0x3531564e" summary="2x2 subsampled Cr:Cb plane"/>
+ <entry name="q410" value="0x30313451"/>
+ <entry name="q401" value="0x31303451"/>
+ <entry name="xrgb16161616" value="0x38345258" summary="[63:0] x:R:G:B 16:16:16:16 little endian"/>
+ <entry name="xbgr16161616" value="0x38344258" summary="[63:0] x:B:G:R 16:16:16:16 little endian"/>
+ <entry name="argb16161616" value="0x38345241" summary="[63:0] A:R:G:B 16:16:16:16 little endian"/>
+ <entry name="abgr16161616" value="0x38344241" summary="[63:0] A:B:G:R 16:16:16:16 little endian"/>
</enum>
<request name="create_pool">
@@ -381,10 +447,18 @@
<interface name="wl_buffer" version="1">
<description summary="content for a wl_surface">
A buffer provides the content for a wl_surface. Buffers are
- created through factory interfaces such as wl_drm, wl_shm or
- similar. It has a width and a height and can be attached to a
- wl_surface, but the mechanism by which a client provides and
- updates the contents is defined by the buffer factory interface.
+ created through factory interfaces such as wl_shm, wp_linux_buffer_params
+ (from the linux-dmabuf protocol extension) or similar. It has a width and
+ a height and can be attached to a wl_surface, but the mechanism by which a
+ client provides and updates the contents is defined by the buffer factory
+ interface.
+
+ If the buffer uses a format that has an alpha channel, the alpha channel
+ is assumed to be premultiplied in the color channels unless otherwise
+ specified.
+
+ Note, because wl_buffer objects are created from multiple independent
+ factory interfaces, the wl_buffer interface is frozen at version 1.
</description>
<request name="destroy" type="destructor">
@@ -507,6 +581,9 @@
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.
+
+ If wl_data_offer.finish request is received for a non drag and drop
+ operation, the invalid_finish protocol error is raised.
</description>
</request>
@@ -523,7 +600,7 @@
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 drag source will receive wl_data_source.cancelled.
The dnd_actions argument must contain only values expressed in the
wl_data_device_manager.dnd_actions enum, and the preferred_action
@@ -544,17 +621,21 @@
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" summary="actions supported by the destination client"/>
- <arg name="preferred_action" type="uint" summary="action preferred by the destination client"/>
+ <arg name="dnd_actions" type="uint" summary="actions supported by the destination client"
+ enum="wl_data_device_manager.dnd_action"/>
+ <arg name="preferred_action" type="uint" summary="action preferred by the destination client"
+ enum="wl_data_device_manager.dnd_action"/>
</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.
+ will be sent immediately after creating the wl_data_offer object,
+ or anytime the source side changes its offered actions through
+ wl_data_source.set_actions.
</description>
- <arg name="source_actions" type="uint" summary="actions offered by the data source"/>
+ <arg name="source_actions" type="uint" summary="actions offered by the data source"
+ enum="wl_data_device_manager.dnd_action"/>
</event>
<event name="action" since="3">
@@ -595,7 +676,8 @@
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" summary="action selected by the compositor"/>
+ <arg name="dnd_action" type="uint" summary="action selected by the compositor"
+ enum="wl_data_device_manager.dnd_action"/>
</event>
</interface>
@@ -692,7 +774,8 @@
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" summary="actions supported by the data source"/>
+ <arg name="dnd_actions" type="uint" summary="actions supported by the data source"
+ enum="wl_data_device_manager.dnd_action"/>
</request>
<event name="dnd_drop_performed" since="3">
@@ -748,7 +831,8 @@
Clients can trigger cursor surface changes from this point, so
they reflect the current action.
</description>
- <arg name="dnd_action" type="uint" summary="action selected by the compositor"/>
+ <arg name="dnd_action" type="uint" summary="action selected by the compositor"
+ enum="wl_data_device_manager.dnd_action"/>
</event>
</interface>
@@ -774,7 +858,8 @@
for the eventual data transfer. If source is NULL, enter, leave
and motion events are sent only to the client that initiated the
drag and the client is expected to handle the data passing
- internally.
+ internally. If source is destroyed, the drag-and-drop session will be
+ cancelled.
The origin surface is the surface where the drag originates and
the client must have an active implicit grab that matches the
@@ -789,11 +874,8 @@
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
- wl_surface is no longer used as the icon surface. When the use
- as an icon ends, the current and pending input regions become
- undefined, and the wl_surface is unmapped.
+ The input region is ignored for wl_surfaces with the role of a
+ drag-and-drop icon.
</description>
<arg name="source" type="object" interface="wl_data_source" allow-null="true" summary="data source for the eventual transfer"/>
<arg name="origin" type="object" interface="wl_surface" summary="surface where the drag originates"/>
@@ -818,7 +900,7 @@
which will subsequently be used in either the
data_device.enter event (for drag-and-drop) or the
data_device.selection event (for selections). Immediately
- following the data_device_data_offer event, the new data_offer
+ following the data_device.data_offer event, the new data_offer
object will send out data_offer.offer events to describe the
mime types it offers.
</description>
@@ -888,9 +970,10 @@
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. The client must
- destroy the previous selection data_offer, if any, upon receiving
- this event.
+ or until the client loses keyboard focus. Switching surface with
+ keyboard focus within the same client doesn't mean a new selection
+ will be sent. 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"
summary="selection data_offer object"/>
@@ -978,7 +1061,8 @@
a basic surface.
Note! This protocol is deprecated and not intended for production use.
- For desktop-style user interfaces, use xdg_shell.
+ For desktop-style user interfaces, use xdg_shell. Compositors and clients
+ should not implement this interface.
</description>
<enum name="error">
@@ -1272,10 +1356,12 @@
</event>
</interface>
- <interface name="wl_surface" version="4">
+ <interface name="wl_surface" version="6">
<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.
+ A surface is a rectangular area that may be displayed on zero
+ or more outputs, and shown any number of times at the compositor's
+ discretion. They can present wl_buffers, receive user input, and
+ define a local coordinate system.
The size of a surface (and relative positions on it) is described
in surface-local coordinates, which may differ from the buffer
@@ -1302,8 +1388,9 @@
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.
+ client wants to destroy a wl_surface, they must destroy this role
+ object before the wl_surface, otherwise a defunct_role_object error is
+ sent.
Destroying the role object does not remove the role from the
wl_surface, but it may stop the wl_surface from "playing the role".
@@ -1321,6 +1408,10 @@
</description>
<entry name="invalid_scale" value="0" summary="buffer scale value is invalid"/>
<entry name="invalid_transform" value="1" summary="buffer transform value is invalid"/>
+ <entry name="invalid_size" value="2" summary="buffer size is invalid"/>
+ <entry name="invalid_offset" value="3" summary="buffer offset is invalid"/>
+ <entry name="defunct_role_object" value="4"
+ summary="surface was destroyed before its role object"/>
</enum>
<request name="destroy" type="destructor">
@@ -1335,14 +1426,23 @@
The new size of the surface is calculated based on the buffer
size transformed by the inverse buffer_transform and the
- inverse buffer_scale. This means that the supplied buffer
- must be an integer multiple of the buffer_scale.
+ inverse buffer_scale. This means that at commit time the supplied
+ buffer size must be an integer multiple of the buffer_scale. If
+ that's not the case, an invalid_size error is sent.
The x and y arguments specify the location of the new pending
buffer's upper left corner, relative to the current buffer's upper
left corner, in surface-local coordinates. In other words, the
x and y, combined with the new surface size define in which
- directions the surface's size changes.
+ directions the surface's size changes. Setting anything other than 0
+ as x and y arguments is discouraged, and should instead be replaced
+ with using the separate wl_surface.offset request.
+
+ When the bound wl_surface version is 5 or higher, passing any
+ non-zero x or y is a protocol violation, and will result in an
+ 'invalid_offset' error being raised. The x and y arguments are ignored
+ and do not change the pending state. To achieve equivalent semantics,
+ use wl_surface.offset.
Surface contents are double-buffered state, see wl_surface.commit.
@@ -1363,10 +1463,19 @@
will not receive a release event, and is not used by the
compositor.
+ If a pending wl_buffer has been committed to more than one wl_surface,
+ the delivery of wl_buffer.release events becomes undefined. A well
+ behaved client should not rely on wl_buffer.release events in this
+ case. Alternatively, a client could create multiple wl_buffer objects
+ from the same backing storage or use wp_linux_buffer_release.
+
Destroying the wl_buffer after wl_buffer.release does not change
- the surface contents. However, if the client destroys the
- wl_buffer before receiving the wl_buffer.release event, the surface
- contents become undefined immediately.
+ the surface contents. Destroying the wl_buffer before wl_buffer.release
+ is allowed as long as the underlying buffer storage isn't re-used (this
+ can happen e.g. on client process termination). However, if the client
+ destroys the wl_buffer before receiving the wl_buffer.release event and
+ mutates the underlying buffer storage, the surface contents become
+ undefined immediately.
If wl_surface.attach is sent with a NULL wl_buffer, the
following wl_surface.commit will remove the surface content.
@@ -1397,9 +1506,9 @@
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 coordinates instead of surface coordinates,
- and is probably the preferred and intuitive way of doing this.
+ Note! New clients should not use this request. Instead damage can be
+ posted with wl_surface.damage_buffer which uses buffer coordinates
+ instead of surface coordinates.
</description>
<arg name="x" type="int" summary="surface-local x coordinate"/>
<arg name="y" type="int" summary="surface-local y coordinate"/>
@@ -1543,6 +1652,12 @@
This is emitted whenever a surface's creation, movement, or resizing
results in it no longer having any part of it within the scanout region
of an output.
+
+ Clients should not use the number of outputs the surface is on for frame
+ throttling purposes. The surface might be hidden even if no leave event
+ has been sent, and the compositor might expect new surface content
+ updates even if no enter event has been sent. The frame event should be
+ used instead.
</description>
<arg name="output" type="object" interface="wl_output" summary="output left by the surface"/>
</event>
@@ -1658,9 +1773,58 @@
<arg name="width" type="int" summary="width of damage rectangle"/>
<arg name="height" type="int" summary="height of damage rectangle"/>
</request>
+
+ <!-- Version 5 additions -->
+
+ <request name="offset" since="5">
+ <description summary="set the surface contents offset">
+ The x and y arguments specify the location of the new pending
+ buffer's upper left corner, relative to the current buffer's upper
+ left corner, in surface-local coordinates. In other words, the
+ x and y, combined with the new surface size define in which
+ directions the surface's size changes.
+
+ Surface location offset is double-buffered state, see
+ wl_surface.commit.
+
+ This request is semantically equivalent to and the replaces the x and y
+ arguments in the wl_surface.attach request in wl_surface versions prior
+ to 5. See wl_surface.attach for details.
+ </description>
+ <arg name="x" type="int" summary="surface-local x coordinate"/>
+ <arg name="y" type="int" summary="surface-local y coordinate"/>
+ </request>
+
+ <!-- Version 6 additions -->
+
+ <event name="preferred_buffer_scale" since="6">
+ <description summary="preferred buffer scale for the surface">
+ This event indicates the preferred buffer scale for this surface. It is
+ sent whenever the compositor's preference changes.
+
+ It is intended that scaling aware clients use this event to scale their
+ content and use wl_surface.set_buffer_scale to indicate the scale they
+ have rendered with. This allows clients to supply a higher detail
+ buffer.
+ </description>
+ <arg name="factor" type="int" summary="preferred scaling factor"/>
+ </event>
+
+ <event name="preferred_buffer_transform" since="6">
+ <description summary="preferred buffer transform for the surface">
+ This event indicates the preferred buffer transform for this surface.
+ It is sent whenever the compositor's preference changes.
+
+ It is intended that transform aware clients use this event to apply the
+ transform to their content and use wl_surface.set_buffer_transform to
+ indicate the transform they have rendered with.
+ </description>
+ <arg name="transform" type="uint" enum="wl_output.transform"
+ summary="preferred transform"/>
+ </event>
</interface>
- <interface name="wl_seat" version="6">
+ <interface name="wl_seat" version="9">
<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
@@ -1678,6 +1842,14 @@
<entry name="touch" value="4" summary="the seat has touch devices"/>
</enum>
+ <enum name="error">
+ <description summary="wl_seat error values">
+ These errors can be emitted in response to wl_seat requests.
+ </description>
+ <entry name="missing_capability" value="0"
+ summary="get_pointer, get_keyboard or get_touch called on seat without the matching capability"/>
+ </enum>
+
<event name="capabilities">
<description summary="seat capabilities changed">
This is emitted whenever a seat gains or loses the pointer,
@@ -1716,7 +1888,8 @@
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.
+ never had the pointer capability. The missing_capability error will
+ be sent in this case.
</description>
<arg name="id" type="new_id" interface="wl_pointer" summary="seat pointer"/>
</request>
@@ -1729,7 +1902,8 @@
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.
+ never had the keyboard capability. The missing_capability error will
+ be sent in this case.
</description>
<arg name="id" type="new_id" interface="wl_keyboard" summary="seat keyboard"/>
</request>
@@ -1742,7 +1916,8 @@
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.
+ never had the touch capability. The missing_capability error will
+ be sent in this case.
</description>
<arg name="id" type="new_id" interface="wl_touch" summary="seat touch interface"/>
</request>
@@ -1751,9 +1926,22 @@
<event name="name" since="2">
<description summary="unique identifier for this seat">
- In a multiseat configuration this can be used by the client to help
- identify which physical devices the seat represents. Based on
- the seat configuration used by the compositor.
+ In a multi-seat configuration the seat name can be used by clients to
+ help identify which physical devices the seat represents.
+
+ The seat name is a UTF-8 string with no convention defined for its
+ contents. Each name is unique among all wl_seat globals. The name is
+ only guaranteed to be unique for the current compositor instance.
+
+ The same seat names are used for all clients. Thus, the name can be
+ shared across processes to refer to a specific wl_seat global.
+
+ The name event is sent after binding to the seat global. This event is
+ only sent once per seat object, and the name does not change over the
+ lifetime of the wl_seat global.
+
+ Compositors may re-use the same seat name if the wl_seat global is
+ destroyed and re-created later.
</description>
<arg name="name" type="string" summary="seat identifier"/>
</event>
@@ -1769,7 +1957,7 @@
</interface>
- <interface name="wl_pointer" version="6">
+ <interface name="wl_pointer" version="9">
<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
@@ -1813,11 +2001,13 @@
pointer surface to this request with new values for hotspot_x
and hotspot_y.
- The current and pending input regions of the wl_surface are
- cleared, and wl_surface.set_input_region is ignored until the
- wl_surface is no longer used as the cursor. When the use as a
- cursor ends, the current and pending input regions become
- undefined, and the wl_surface is unmapped.
+ The input region is ignored for wl_surfaces with the role of
+ a cursor. When the use as a cursor ends, the wl_surface is
+ unmapped.
+
+ The serial parameter must match the latest wl_pointer.enter
+ serial number sent to the client. Otherwise the request will be
+ ignored.
</description>
<arg name="serial" type="uint" summary="serial number of the enter event"/>
<arg name="surface" type="object" interface="wl_surface" allow-null="true"
@@ -2065,6 +2255,9 @@
This event carries the axis value of the wl_pointer.axis event in
discrete steps (e.g. mouse wheel clicks).
+ This event is deprecated with wl_pointer version 8 - this event is not
+ sent to clients supporting version 8 or later.
+
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
@@ -2072,7 +2265,8 @@
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.
+ events. A wl_pointer.frame must not contain more than one axis_discrete
+ event per axis type.
This event is optional; continuous scrolling devices
like two-finger scrolling on touchpads do not have discrete
@@ -2090,9 +2284,93 @@
<arg name="axis" type="uint" enum="axis" summary="axis type"/>
<arg name="discrete" type="int" summary="number of steps"/>
</event>
+
+ <event name="axis_value120" since="8">
+ <description summary="axis high-resolution scroll event">
+ Discrete high-resolution scroll information.
+
+ This event carries high-resolution wheel scroll information,
+ with each multiple of 120 representing one logical scroll step
+ (a wheel detent). For example, an axis_value120 of 30 is one quarter of
+ a logical scroll step in the positive direction, a value120 of
+ -240 are two logical scroll steps in the negative direction within the
+ same hardware event.
+ Clients that rely on discrete scrolling should accumulate the
+ value120 to multiples of 120 before processing the event.
+
+ The value120 must not be zero.
+
+ This event replaces the wl_pointer.axis_discrete event in clients
+ supporting wl_pointer version 8 or later.
+
+ Where a wl_pointer.axis_source event occurs in the same
+ wl_pointer.frame, the axis source applies to this event.
+
+ The order of wl_pointer.axis_value120 and wl_pointer.axis_source is
+ not guaranteed.
+ </description>
+ <arg name="axis" type="uint" enum="axis" summary="axis type"/>
+ <arg name="value120" type="int" summary="scroll distance as fraction of 120"/>
+ </event>
+
+ <!-- Version 9 additions -->
+
+ <enum name="axis_relative_direction">
+ <description summary="axis relative direction">
+ This specifies the direction of the physical motion that caused a
+ wl_pointer.axis event, relative to the wl_pointer.axis direction.
+ </description>
+ <entry name="identical" value="0"
+ summary="physical motion matches axis direction"/>
+ <entry name="inverted" value="1"
+ summary="physical motion is the inverse of the axis direction"/>
+ </enum>
+
+ <event name="axis_relative_direction" since="9">
+ <description summary="axis relative physical direction event">
+ Relative directional information of the entity causing the axis
+ motion.
+
+ For a wl_pointer.axis event, the wl_pointer.axis_relative_direction
+ event specifies the movement direction of the entity causing the
+ wl_pointer.axis event. For example:
+ - if a user's fingers on a touchpad move down and this
+ causes a wl_pointer.axis vertical_scroll down event, the physical
+ direction is 'identical'
+ - if a user's fingers on a touchpad move down and this causes a
+ wl_pointer.axis vertical_scroll up scroll up event ('natural
+ scrolling'), the physical direction is 'inverted'.
+
+ A client may use this information to adjust scroll motion of
+ components. Specifically, enabling natural scrolling causes the
+ content to change direction compared to traditional scrolling.
+ Some widgets like volume control sliders should usually match the
+ physical direction regardless of whether natural scrolling is
+ active. This event enables clients to match the scroll direction of
+ a widget to the physical direction.
+
+ This event does not occur on its own, it is coupled with a
+ wl_pointer.axis event that represents this axis value.
+ The protocol guarantees that each axis_relative_direction 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_relative_direction
+ and its coupled axis event.
+
+ The axis number is identical to the axis number in the associated
+ axis event.
+
+ The order of wl_pointer.axis_relative_direction,
+ wl_pointer.axis_discrete and wl_pointer.axis_source is not
+ guaranteed.
+ </description>
+ <arg name="axis" type="uint" enum="axis" summary="axis type"/>
+ <arg name="direction" type="uint" enum="axis_relative_direction"
+ summary="physical direction relative to axis motion"/>
+ </event>
</interface>
- <interface name="wl_keyboard" version="6">
+ <interface name="wl_keyboard" version="9">
<description summary="keyboard input device">
The wl_keyboard interface represents one or more keyboards
associated with a seat.
@@ -2106,13 +2384,17 @@
<entry name="no_keymap" value="0"
summary="no keymap; client must understand how to interpret the raw keycode"/>
<entry name="xkb_v1" value="1"
- summary="libxkbcommon compatible; to determine the xkb keycode, clients must add 8 to the key event keycode"/>
+ summary="libxkbcommon compatible, null-terminated string; to determine the xkb keycode, clients must add 8 to the key event keycode"/>
</enum>
<event name="keymap">
<description summary="keyboard mapping">
This event provides a file descriptor to the client which can be
- memory-mapped to provide a keyboard mapping description.
+ memory-mapped in read-only mode to provide a keyboard mapping
+ description.
+
+ From version 7 onwards, the fd must be mapped with MAP_PRIVATE by
+ the recipient, as MAP_SHARED may fail.
</description>
<arg name="format" type="uint" enum="keymap_format" summary="keymap format"/>
<arg name="fd" type="fd" summary="keymap file descriptor"/>
@@ -2123,6 +2405,9 @@
<description summary="enter event">
Notification that this seat's keyboard focus is on a certain
surface.
+
+ The compositor must send the wl_keyboard.modifiers event after this
+ event.
</description>
<arg name="serial" type="uint" summary="serial number of the enter event"/>
<arg name="surface" type="object" interface="wl_surface" summary="surface gaining keyboard focus"/>
@@ -2136,6 +2421,9 @@
The leave notification is sent before the enter notification
for the new focus.
+
+ After this event client must assume that all keys, including modifiers,
+ are lifted and also it must stop key repeating if there's some going on.
</description>
<arg name="serial" type="uint" summary="serial number of the leave event"/>
<arg name="surface" type="object" interface="wl_surface" summary="surface that lost keyboard focus"/>
@@ -2154,6 +2442,12 @@
A key was pressed or released.
The time argument is a timestamp with millisecond
granularity, with an undefined base.
+
+ The key is a platform-specific key code that can be interpreted
+ by feeding it to the keyboard mapping (see the keymap event).
+
+ If this event produces a change in modifiers, then the resulting
+ wl_keyboard.modifiers event must be sent after this event.
</description>
<arg name="serial" type="uint" summary="serial number of the key event"/>
<arg name="time" type="uint" summary="timestamp with millisecond granularity"/>
@@ -2203,7 +2497,7 @@
</event>
</interface>
- <interface name="wl_touch" version="6">
+ <interface name="wl_touch" version="9">
<description summary="touchscreen input device">
The wl_touch interface represents a touchscreen
associated with a seat.
@@ -2347,7 +2641,7 @@
</event>
</interface>
- <interface name="wl_output" version="3">
+ <interface name="wl_output" version="4">
<description summary="compositor output region">
An output describes part of the compositor geometry. The
compositor works in the 'compositor coordinate system' and an
@@ -2402,6 +2696,16 @@
The physical size can be set to zero if it doesn't make sense for this
output (e.g. for projectors or virtual outputs).
+
+ The geometry event will be followed by a done event (starting from
+ version 2).
+
+ Note: wl_output only advertises partial information about the output
+ position and identification. Some compositors, for instance those not
+ implementing a desktop-style output layout or those exposing virtual
+ outputs, might fake this information. Instead of using x and y, clients
+ should use xdg_output.logical_position. Instead of using make and model,
+ clients should use name and description.
</description>
<arg name="x" type="int"
summary="x position within the global compositor space"/>
@@ -2442,11 +2746,31 @@
current. In other words, the current mode is always the last
mode that was received with the current flag set.
+ Non-current modes are deprecated. A compositor can decide to only
+ advertise the current mode and never send other modes. Clients
+ should not rely on non-current modes.
+
The size of a mode is given in physical hardware units of
the output device. This is not necessarily the same as
the output size in the global compositor space. For instance,
the output may be scaled, as described in wl_output.scale,
- or transformed, as described in wl_output.transform.
+ or transformed, as described in wl_output.transform. Clients
+ willing to retrieve the output size in the global compositor
+ space should use xdg_output.logical_size instead.
+
+ The vertical refresh rate can be set to zero if it doesn't make
+ sense for this output (e.g. for virtual outputs).
+
+ The mode event will be followed by a done event (starting from
+ version 2).
+
+ Clients should not use the refresh rate to schedule frames. Instead,
+ they should use the wl_surface.frame event or the presentation-time
+ protocol.
+
+ Note: this information is not always meaningful for all outputs. Some
+ compositors, such as those exposing virtual outputs, might fake the
+ refresh rate or the size.
</description>
<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"/>
@@ -2486,6 +2810,8 @@
the scale of the output. That way the compositor can
avoid scaling the surface, and the client can supply
a higher detail image.
+
+ The scale event will be followed by a done event.
</description>
<arg name="factor" type="int" summary="scaling factor of output"/>
</event>
@@ -2498,6 +2824,62 @@
use the output object anymore.
</description>
</request>
+
+ <!-- Version 4 additions -->
+
+ <event name="name" since="4">
+ <description summary="name of this output">
+ Many compositors will assign user-friendly names to their outputs, show
+ them to the user, allow the user to refer to an output, etc. The client
+ may wish to know this name as well to offer the user similar behaviors.
+
+ The name is a UTF-8 string with no convention defined for its contents.
+ Each name is unique among all wl_output globals. The name is only
+ guaranteed to be unique for the compositor instance.
+
+ The same output name is used for all clients for a given wl_output
+ global. Thus, the name can be shared across processes to refer to a
+ specific wl_output global.
+
+ The name is not guaranteed to be persistent across sessions, thus cannot
+ be used to reliably identify an output in e.g. configuration files.
+
+ Examples of names include 'HDMI-A-1', 'WL-1', 'X11-1', etc. However, do
+ not assume that the name is a reflection of an underlying DRM connector,
+ X11 connection, etc.
+
+ The name event is sent after binding the output object. This event is
+ only sent once per output object, and the name does not change over the
+ lifetime of the wl_output global.
+
+ Compositors may re-use the same output name if the wl_output global is
+ destroyed and re-created later. Compositors should avoid re-using the
+ same name if possible.
+
+ The name event will be followed by a done event.
+ </description>
+ <arg name="name" type="string" summary="output name"/>
+ </event>
+
+ <event name="description" since="4">
+ <description summary="human-readable description of this output">
+ Many compositors can produce human-readable descriptions of their
+ outputs. The client may wish to know this description as well, e.g. for
+ output selection purposes.
+
+ The description is a UTF-8 string with no convention defined for its
+ contents. The description is not guaranteed to be unique among all
+ wl_output globals. Examples might include 'Foocorp 11" Display' or
+ 'Virtual X11 output via :1'.
+
+ The description event is sent after binding the output object and
+ whenever the description changes. The description is optional, and may
+ not be sent at all.
+
+ The description event will be followed by a done event.
+ </description>
+ <arg name="description" type="string" summary="output description"/>
+ </event>
</interface>
<interface name="wl_region" version="1">
@@ -2569,6 +2951,8 @@
<enum name="error">
<entry name="bad_surface" value="0"
summary="the to-be sub-surface is invalid"/>
+ <entry name="bad_parent" value="1"
+ summary="the to-be sub-surface parent is invalid"/>
</enum>
<request name="get_subsurface">
@@ -2578,14 +2962,18 @@
plain wl_surface into a sub-surface.
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.
+ must not have an existing wl_subsurface object. Otherwise the
+ bad_surface protocol error is raised.
Adding sub-surfaces to a parent is a double-buffered operation on the
parent (see wl_surface.commit). The effect of adding a sub-surface
becomes visible on the next time the state of the parent surface is
applied.
+ The parent surface must not be one of the child surface's descendants,
+ and the parent must be different from the child surface, otherwise the
+ bad_parent protocol error is raised.
+
This request modifies the behaviour of wl_surface.commit request on
the sub-surface, see the documentation on wl_subsurface interface.
</description>
@@ -2621,7 +3009,7 @@
wl_surface state directly. A sub-surface is initially in the
synchronized mode.
- Sub-surfaces have also other kind of state, which is managed by
+ Sub-surfaces also have another kind of state, which is managed by
wl_subsurface requests, as opposed to wl_surface requests. This
state includes the sub-surface position relative to the parent
surface (wl_subsurface.set_position), and the stacking order of
@@ -2640,12 +3028,10 @@
synchronized mode, and then assume that all its child and grand-child
sub-surfaces are synchronized, too, without explicitly setting them.
- If the wl_surface associated with the wl_subsurface is destroyed, the
- wl_subsurface object becomes inert. Note, that destroying either object
- takes effect immediately. If you need to synchronize the removal
- of a sub-surface to the parent surface update, unmap the sub-surface
- first by attaching a NULL wl_buffer, update parent, and then destroy
- the sub-surface.
+ Destroying a sub-surface takes effect immediately. If you need to
+ synchronize the removal of a sub-surface to the parent surface update,
+ unmap the sub-surface first by attaching a NULL wl_buffer, update parent,
+ and then destroy the sub-surface.
If the parent wl_surface object is destroyed, the sub-surface is
unmapped.
@@ -2656,8 +3042,7 @@
The sub-surface interface is removed from the wl_surface object
that was turned into a sub-surface with a
wl_subcompositor.get_subsurface request. The wl_surface's association
- to the parent is deleted, and the wl_surface loses its role as
- a sub-surface. The wl_surface is unmapped immediately.
+ to the parent is deleted. The wl_surface is unmapped immediately.
</description>
</request>