aboutsummaryrefslogtreecommitdiffstats
path: root/protocol.xml
diff options
context:
space:
mode:
authorKristian Høgsberg <krh@bitplanet.net>2010-08-17 21:23:10 -0400
committerKristian Høgsberg <krh@bitplanet.net>2010-08-18 15:27:27 -0400
commiteef08fbb1a32d206c32608c95fe8a80db0fbc081 (patch)
treea8934f9190a2dbe8f908f595d36f5ce596ae7bf5 /protocol.xml
parentAdd missing drm.c (diff)
downloadwayland-eef08fbb1a32d206c32608c95fe8a80db0fbc081.tar
wayland-eef08fbb1a32d206c32608c95fe8a80db0fbc081.tar.gz
wayland-eef08fbb1a32d206c32608c95fe8a80db0fbc081.tar.bz2
wayland-eef08fbb1a32d206c32608c95fe8a80db0fbc081.tar.lz
wayland-eef08fbb1a32d206c32608c95fe8a80db0fbc081.tar.xz
wayland-eef08fbb1a32d206c32608c95fe8a80db0fbc081.tar.zst
wayland-eef08fbb1a32d206c32608c95fe8a80db0fbc081.zip
First step towards drag and drop protocol
Diffstat (limited to 'protocol.xml')
-rw-r--r--protocol.xml88
1 files changed, 88 insertions, 0 deletions
diff --git a/protocol.xml b/protocol.xml
index d8c644c..9abeffa 100644
--- a/protocol.xml
+++ b/protocol.xml
@@ -96,6 +96,94 @@
</event>
</interface>
+ <interface name="drag" version="1">
+ <request name="prepare">
+ <!-- Start a drag action from given surface and device for the
+ grab started by the button click at time -->
+ <arg name="surface" type="object" interface="surface"/>
+ <arg name="time" type="uint"/>
+ <arg name="buffer" type="object" interface="buffer"/>
+ <arg name="hotspot_x" type="int"/>
+ <arg name="hotspot_y" type="int"/>
+ </request>
+
+ <!-- Add an offered mime type. Can be called several times to
+ offer multiple types, but must be called before 'activate'. -->
+ <request name="offer">
+ <arg name="type" type="string"/>
+ </request>
+
+ <request name="activate"/>
+
+ <!-- Cancel the drag. -->
+ <request name="cancel"/>
+
+ <!-- Send the data to the target that accepted the offer -->
+ <request name="send">
+ <arg name="contents" type="array"/>
+ </request>
+
+ <!-- Called by the drag target to accept the offer of the given
+ type -->
+ <request name="accept">
+ <arg name="type" type="string"/>
+ </request>
+
+ <!-- Sent at connect time to announce the association -->
+ <event name="device">
+ <arg name="device" type="object" interface="input_device"/>
+ </event>
+
+ <!-- Similar to device::pointer_focus. Sent to potential
+ target surfaces to offer drag data. If the device
+ leaves the window, the drag stops or the originator cancels
+ the drag, this event is sent with the NULL surface. -->
+ <event name="pointer_focus">
+ <arg name="time" type="uint"/>
+ <arg name="surface" type="object" interface="surface"/>
+ <arg name="x" type="int"/>
+ <arg name="y" type="int"/>
+ <arg name="surface_x" type="int"/>
+ <arg name="surface_y" type="int"/>
+ </event>
+
+ <!-- Sent after the pointer_focus event to announce the types
+ offered. One event per offered mime type. -->
+ <event name="offer">
+ <arg name="type" type="string"/>
+ </event>
+
+ <!-- Similar to device::motion. Sent to potential target surfaces
+ as the drag pointer moves around in the surface. -->
+ <event name="motion">
+ <arg name="time" type="uint"/>
+ <arg name="x" type="int"/>
+ <arg name="y" type="int"/>
+ <arg name="surface_x" type="int"/>
+ <arg name="surface_y" type="int"/>
+ </event>
+
+ <!-- Sent to drag originator in response to pointer_focus and
+ motion events. If a target does not accept any of the
+ offered types, type is NULL -->
+ <event name="target">
+ <arg name="mime_type" type="string"/>
+ </event>
+
+ <!-- Sent to drag originator when the drag is finished. It's also
+ sent in case an originator tries to activate a drag after the
+ grab was released. If the originator didn't receive a
+ 'target' event before receiving the 'finish' event, no drag
+ target was found and the originator should not send data. -->
+ <event name="finish"/>
+
+ <!-- Sent to target, contains dragged data. Ends transaction on
+ the target side. -->
+ <event name="drop">
+ <arg name="contents" type="array"/>
+ </event>
+ </interface>
+
<interface name="surface" version="1">
<request name="destroy"/>