<p dir="ltr">Looks good!<br>
--Jason Ekstrand</p>
<div class="gmail_quote">On Mar 30, 2013 12:24 AM, <<a href="mailto:matthias.clasen@gmail.com">matthias.clasen@gmail.com</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
From: Matthias Clasen <<a href="mailto:mclasen@redhat.com">mclasen@redhat.com</a>><br>
<br>
Use NULL consistently. And add some more information in a few<br>
places.<br>
---<br>
protocol/wayland.xml | 123 +++++++++++++++++++++++++++++----------------------<br>
1 file changed, 69 insertions(+), 54 deletions(-)<br>
<br>
diff --git a/protocol/wayland.xml b/protocol/wayland.xml<br>
index a3599f0..3e674f3 100644<br>
--- a/protocol/wayland.xml<br>
+++ b/protocol/wayland.xml<br>
@@ -874,48 +874,54 @@<br>
<br>
<interface name="wl_surface" version="2"><br>
<description summary="an onscreen surface"><br>
- A surface. This is an image that is displayed on the screen.<br>
+ A surface is a rectangular area that is displayed on the screen.<br>
It has a location, size and pixel contents.<br>
+<br>
+ Surfaces are also used for some special purposes, e.g. as<br>
+ cursor images for pointers, drag icons, etc.<br>
</description><br>
<br>
<request name="destroy" type="destructor"><br>
<description summary="delete surface"><br>
- Deletes the surface and invalidates its object id.<br>
+ Deletes the surface and invalidates its object ID.<br>
</description><br>
</request><br>
<br>
<request name="attach"><br>
<description summary="set the surface contents"><br>
- Set the contents of a buffer into this surface. The x and y<br>
- arguments specify the location of the new pending buffer's upper<br>
- left corner, relative to the current buffer's upper left corner. In<br>
- other words, the x and y, and the width and height of the wl_buffer<br>
- together define in which directions the surface's size changes.<br>
+ Set a buffer as the content of this surface.<br>
+<br>
+ The x and y arguments specify the location of the new pending<br>
+ buffer's upper left corner, relative to the current buffer's<br>
+ upper left corner. In other words, the x and y, and the width<br>
+ and height of the wl_buffer together define in which directions<br>
+ the surface's size changes.<br>
<br>
Surface contents are double-buffered state, see wl_surface.commit.<br>
<br>
The initial surface contents are void; there is no content.<br>
- wl_surface.attach assigns the given wl_buffer as the pending wl_buffer.<br>
- wl_surface.commit makes the pending wl_buffer the new<br>
+ wl_surface.attach assigns the given wl_buffer as the pending<br>
+ wl_buffer. wl_surface.commit makes the pending wl_buffer the new<br>
surface contents, and the size of the surface becomes the size of<br>
- the wl_buffer. After commit, there is no pending buffer until the<br>
- next attach.<br>
+ the wl_buffer, as described above. After commit, there is no<br>
+ pending buffer until the next attach.<br>
<br>
Committing a pending wl_buffer allows the compositor to read the<br>
- pixels in the wl_buffer. The compositor may access the pixels at any<br>
- time after the wl_surface.commit request. When the compositor will<br>
- not access the pixels anymore, it will send the wl_buffer.release<br>
- event. Only after receiving wl_buffer.release, the client may re-use<br>
- the wl_buffer. A wl_buffer, that has been attached and then replaced<br>
- by another attach instead of committed, will not receive a release<br>
- event, and is not used by the compositor.<br>
-<br>
- Destroying the wl_buffer after wl_buffer.release does not change the<br>
- surface contents. However, if the client destroys the wl_buffer<br>
- before receiving wl_buffer.release, the surface contents become<br>
- undefined immediately.<br>
-<br>
- Only if wl_surface.attach is sent with a nil wl_buffer, the<br>
+ pixels in the wl_buffer. The compositor may access the pixels at<br>
+ any time after the wl_surface.commit request. When the compositor<br>
+ will not access the pixels anymore, it will send the<br>
+ wl_buffer.release event. Only after receiving wl_buffer.release,<br>
+ the client may re-use the wl_buffer. A wl_buffer that has been<br>
+ attached and then replaced by another attach instead of committed<br>
+ will not receive a release event, and is not used by the<br>
+ compositor.<br>
+<br>
+ Destroying the wl_buffer after wl_buffer.release does not change<br>
+ the surface contents. However, if the client destroys the<br>
+ wl_buffer before receiving wl_buffer.release, the surface<br>
+ contents become undefined immediately.<br>
+<br>
+ Only if wl_surface.attach is sent with a NULL wl_buffer, the<br>
following wl_surface.commit will remove the surface content.<br>
</description><br>
<br>
@@ -928,18 +934,20 @@<br>
<description summary="mark part of the surface damaged"><br>
This request is used to describe the regions where the pending<br>
buffer is different from the current surface contents, and where<br>
- the surface therefore needs to be repainted. The pending buffer must<br>
- be set by wl_surface.attach before sending damage. The compositor<br>
- ignores the parts of the damage that fall outside of the surface.<br>
+ the surface therefore needs to be repainted. The pending buffer<br>
+ must be set by wl_surface.attach before sending damage. The<br>
+ compositor ignores the parts of the damage that fall outside of<br>
+ the surface.<br>
<br>
Damage is double-buffered state, see wl_surface.commit.<br>
<br>
The initial value for pending damage is empty: no damage.<br>
- wl_surface.damage adds pending damage: the new pending damage is the<br>
- union of old pending damage and the given rectangle.<br>
- wl_surface.commit assigns pending damage as the current damage, and<br>
- clears pending damage. The server will clear the current damage as<br>
- it repaints the surface.<br>
+ wl_surface.damage adds pending damage: the new pending damage<br>
+ is the union of old pending damage and the given rectangle.<br>
+<br>
+ wl_surface.commit assigns pending damage as the current damage,<br>
+ and clears pending damage. The server will clear the current<br>
+ damage as it repaints the surface.<br>
</description><br>
<br>
<arg name="x" type="int"/><br>
@@ -972,11 +980,14 @@<br>
<request name="set_opaque_region"><br>
<description summary="set opaque region"><br>
This request sets the region of the surface that contains<br>
- opaque content. The opaque region is an optimization hint for<br>
- the compositor that lets it optimize out redrawing of content<br>
- behind opaque regions. Setting an opaque region is not<br>
- required for correct behaviour, but marking transparent<br>
- content as opaque will result in repaint artifacts.<br>
+ opaque content.<br>
+<br>
+ The opaque region is an optimization hint for the compositor<br>
+ that lets it optimize out redrawing of content behind opaque<br>
+ regions. Setting an opaque region is not required for correct<br>
+ behaviour, but marking transparent content as opaque will result<br>
+ in repaint artifacts.<br>
+<br>
The compositor ignores the parts of the opaque region that fall<br>
outside of the surface.<br>
<br>
@@ -984,11 +995,11 @@<br>
<br>
wl_surface.set_opaque_region changes the pending opaque region.<br>
wl_surface.commit copies the pending region to the current region.<br>
- Otherwise the pending and current regions are never changed.<br>
+ Otherwise, the pending and current regions are never changed.<br>
<br>
The initial value for opaque region is empty. Setting the pending<br>
opaque region has copy semantics, and the wl_region object can be<br>
- destroyed immediately. A nil wl_region causes the pending opaque<br>
+ destroyed immediately. A NULL wl_region causes the pending opaque<br>
region to be set to empty.<br>
</description><br>
<br>
@@ -998,10 +1009,11 @@<br>
<request name="set_input_region"><br>
<description summary="set input region"><br>
This request sets the region of the surface that can receive<br>
- pointer and touch events. Input events happening outside of<br>
- this region will try the next surface in the server surface<br>
- stack. The compositor ignores the parts of the input region that<br>
- fall outside of the surface.<br>
+ pointer and touch events.<br>
+<br>
+ Input events happening outside of this region will try the next<br>
+ surface in the server surface stack. The compositor ignores the<br>
+ parts of the input region that fall outside of the surface.<br>
<br>
Input region is double-buffered state, see wl_surface.commit.<br>
<br>
@@ -1011,10 +1023,11 @@<br>
except cursor and icon surfaces are special cases, see<br>
wl_pointer.set_cursor and wl_data_device.start_drag.<br>
<br>
- The initial value for input region is infinite. That means the whole<br>
- surface will accept input. Setting the pending input region has copy<br>
- semantics, and the wl_region object can be destroyed immediately. A<br>
- nil wl_region causes the input region to be set to infinite.<br>
+ The initial value for input region is infinite. That means the<br>
+ whole surface will accept input. Setting the pending input region<br>
+ has copy semantics, and the wl_region object can be destroyed<br>
+ immediately. A NULL wl_region causes the input region to be set<br>
+ to infinite.<br>
</description><br>
<br>
<arg name="region" type="object" interface="wl_region" allow-null="true"/><br>
@@ -1044,18 +1057,20 @@<br>
<br>
<event name="enter"><br>
<description summary="surface enters an output"><br>
- This is emitted whenever a surface's creation, movement, or resizing<br>
- results in some part of it being within the scanout region of an<br>
- output.<br>
+ This is emitted whenever a surface's creation, movement, or resizing<br>
+ results in some part of it being within the scanout region of an<br>
+ output.<br>
+<br>
+ Note that a surface may be overlapping with zero or more outputs.<br>
</description><br>
<arg name="output" type="object" interface="wl_output"/><br>
</event><br>
<br>
<event name="leave"><br>
<description summary="surface leaves an output"><br>
- This is emitted whenever a surface's creation, movement, or resizing<br>
- results in it no longer having any part of it within the scanout region<br>
- of an output.<br>
+ This is emitted whenever a surface's creation, movement, or resizing<br>
+ results in it no longer having any part of it within the scanout region<br>
+ of an output.<br>
</description><br>
<arg name="output" type="object" interface="wl_output"/><br>
</event><br>
--<br>
1.8.1.4<br>
<br>
_______________________________________________<br>
wayland-devel mailing list<br>
<a href="mailto:wayland-devel@lists.freedesktop.org">wayland-devel@lists.freedesktop.org</a><br>
<a href="http://lists.freedesktop.org/mailman/listinfo/wayland-devel" target="_blank">http://lists.freedesktop.org/mailman/listinfo/wayland-devel</a><br>
</blockquote></div>