[PATCH wayland] protocol: make pointer images regular surfaces
Ander Conselvan de Oliveira
ander.conselvan.de.oliveira at intel.com
Tue Apr 3 05:44:15 PDT 2012
Replace the input_device.attach request with a request for setting a
pointer surface. Also add a new interface, wl_pointer_surface, that
provides a request for setting the hotspot of a pointer surface.
With this change, clients should be able to request frame callbacks
for pointer surfaces in order to implement animated cursors.
---
protocol/wayland.xml | 45 ++++++++++++++++++++++++++++++++++++---------
1 files changed, 36 insertions(+), 9 deletions(-)
diff --git a/protocol/wayland.xml b/protocol/wayland.xml
index 5118b5b..935173a 100644
--- a/protocol/wayland.xml
+++ b/protocol/wayland.xml
@@ -612,6 +612,28 @@
</request>
</interface>
+ <interface name="wl_pointer_surface" version="1">
+ <description summary="special interface for pointer surfaces">
+ An interface implemented by wl_surface that is used as a pointer
+ surface. This object is automatically destroyed if the wl_surface
+ used to create it is destroyed.
+
+ The input region of a wl_surface implementing this interface is
+ always empty.
+ </description>
+
+ <request name="set_hotspot">
+ <description summary="change the hotspot">
+ Set the hotspot of a pointer surface. When the pointer surface
+ is mapped, its top-left corner position will be the current
+ pointer position minus the vector (x, y).
+ </description>
+
+ <arg name="x" type="int"/>
+ <arg name="y" type="int"/>
+ </request>
+ </interface>
+
<interface name="wl_input_device" version="1">
<description summary="input device group">
A group of keyboards and pointer devices (mice, for
@@ -621,17 +643,22 @@
pointer_focus.
</description>
- <request name="attach">
- <description summary="set the pointer image">
- Set the pointer's image. This request only takes effect if
- the pointer focus for this device is one of the requesting
- clients surfaces.
+ <request name="set_pointer_surface">
+ <description summary="set the surface containing the pointer image">
+ Set the supplied client surface as the pointer surface for the
+ requesting client. When the pointer focus is on one of the
+ requesting clients surfaces, this pointer surface will be
+ displayed at the cursor location, offset by a hotspot that
+ may be set with the wl_pointer_surface::set_hotspot request.
+
+ Returns a newly created wl_pointer_surface object. If there was
+ a previous pointer surface set by the client, the wl_pointer_surface
+ object associated with it is destroyed. Parameter surface must be
+ non-nil.
</description>
- <arg name="time" type="uint"/>
- <arg name="buffer" type="object" interface="wl_buffer"/>
- <arg name="hotspot_x" type="int"/>
- <arg name="hotspot_y" type="int"/>
+ <arg name="surface" type="object" interface="wl_surface"/>
+ <arg name="id" type="new_id" interface="wl_pointer_surface"/>
</request>
<event name="motion">
--
1.7.4.1
More information about the wayland-devel
mailing list