···11+<?xml version="1.0" encoding="UTF-8"?>
22+<protocol name="cursor_shape_v1">
33+ <copyright>
44+ Copyright 2018 The Chromium Authors
55+ Copyright 2023 Simon Ser
66+77+ Permission is hereby granted, free of charge, to any person obtaining a
88+ copy of this software and associated documentation files (the "Software"),
99+ to deal in the Software without restriction, including without limitation
1010+ the rights to use, copy, modify, merge, publish, distribute, sublicense,
1111+ and/or sell copies of the Software, and to permit persons to whom the
1212+ Software is furnished to do so, subject to the following conditions:
1313+ The above copyright notice and this permission notice (including the next
1414+ paragraph) shall be included in all copies or substantial portions of the
1515+ Software.
1616+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
1717+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
1818+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
1919+ THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
2020+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
2121+ FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
2222+ DEALINGS IN THE SOFTWARE.
2323+ </copyright>
2424+2525+ <interface name="wp_cursor_shape_manager_v1" version="1">
2626+ <description summary="cursor shape manager">
2727+ This global offers an alternative, optional way to set cursor images. This
2828+ new way uses enumerated cursors instead of a wl_surface like
2929+ wl_pointer.set_cursor does.
3030+3131+ Warning! The protocol described in this file is currently in the testing
3232+ phase. Backward compatible changes may be added together with the
3333+ corresponding interface version bump. Backward incompatible changes can
3434+ only be done by creating a new major version of the extension.
3535+ </description>
3636+3737+ <request name="destroy" type="destructor">
3838+ <description summary="destroy the manager">
3939+ Destroy the cursor shape manager.
4040+ </description>
4141+ </request>
4242+4343+ <request name="get_pointer">
4444+ <description summary="manage the cursor shape of a pointer device">
4545+ Obtain a wp_cursor_shape_device_v1 for a wl_pointer object.
4646+ </description>
4747+ <arg name="cursor_shape_device" type="new_id" interface="wp_cursor_shape_device_v1"/>
4848+ <arg name="pointer" type="object" interface="wl_pointer"/>
4949+ </request>
5050+5151+ <request name="get_tablet_tool_v2">
5252+ <description summary="manage the cursor shape of a tablet tool device">
5353+ Obtain a wp_cursor_shape_device_v1 for a zwp_tablet_tool_v2 object.
5454+ </description>
5555+ <arg name="cursor_shape_device" type="new_id" interface="wp_cursor_shape_device_v1"/>
5656+ <arg name="tablet_tool" type="object" interface="zwp_tablet_tool_v2"/>
5757+ </request>
5858+ </interface>
5959+6060+ <interface name="wp_cursor_shape_device_v1" version="1">
6161+ <description summary="cursor shape for a device">
6262+ This interface advertises the list of supported cursor shapes for a
6363+ device, and allows clients to set the cursor shape.
6464+ </description>
6565+6666+ <enum name="shape">
6767+ <description summary="cursor shapes">
6868+ This enum describes cursor shapes.
6969+7070+ The names are taken from the CSS W3C specification:
7171+ https://w3c.github.io/csswg-drafts/css-ui/#cursor
7272+ </description>
7373+ <entry name="default" value="1" summary="default cursor"/>
7474+ <entry name="context_menu" value="2" summary="a context menu is available for the object under the cursor"/>
7575+ <entry name="help" value="3" summary="help is available for the object under the cursor"/>
7676+ <entry name="pointer" value="4" summary="pointer that indicates a link or another interactive element"/>
7777+ <entry name="progress" value="5" summary="progress indicator"/>
7878+ <entry name="wait" value="6" summary="program is busy, user should wait"/>
7979+ <entry name="cell" value="7" summary="a cell or set of cells may be selected"/>
8080+ <entry name="crosshair" value="8" summary="simple crosshair"/>
8181+ <entry name="text" value="9" summary="text may be selected"/>
8282+ <entry name="vertical_text" value="10" summary="vertical text may be selected"/>
8383+ <entry name="alias" value="11" summary="drag-and-drop: alias of/shortcut to something is to be created"/>
8484+ <entry name="copy" value="12" summary="drag-and-drop: something is to be copied"/>
8585+ <entry name="move" value="13" summary="drag-and-drop: something is to be moved"/>
8686+ <entry name="no_drop" value="14" summary="drag-and-drop: the dragged item cannot be dropped at the current cursor location"/>
8787+ <entry name="not_allowed" value="15" summary="drag-and-drop: the requested action will not be carried out"/>
8888+ <entry name="grab" value="16" summary="drag-and-drop: something can be grabbed"/>
8989+ <entry name="grabbing" value="17" summary="drag-and-drop: something is being grabbed"/>
9090+ <entry name="e_resize" value="18" summary="resizing: the east border is to be moved"/>
9191+ <entry name="n_resize" value="19" summary="resizing: the north border is to be moved"/>
9292+ <entry name="ne_resize" value="20" summary="resizing: the north-east corner is to be moved"/>
9393+ <entry name="nw_resize" value="21" summary="resizing: the north-west corner is to be moved"/>
9494+ <entry name="s_resize" value="22" summary="resizing: the south border is to be moved"/>
9595+ <entry name="se_resize" value="23" summary="resizing: the south-east corner is to be moved"/>
9696+ <entry name="sw_resize" value="24" summary="resizing: the south-west corner is to be moved"/>
9797+ <entry name="w_resize" value="25" summary="resizing: the west border is to be moved"/>
9898+ <entry name="ew_resize" value="26" summary="resizing: the east and west borders are to be moved"/>
9999+ <entry name="ns_resize" value="27" summary="resizing: the north and south borders are to be moved"/>
100100+ <entry name="nesw_resize" value="28" summary="resizing: the north-east and south-west corners are to be moved"/>
101101+ <entry name="nwse_resize" value="29" summary="resizing: the north-west and south-east corners are to be moved"/>
102102+ <entry name="col_resize" value="30" summary="resizing: that the item/column can be resized horizontally"/>
103103+ <entry name="row_resize" value="31" summary="resizing: that the item/row can be resized vertically"/>
104104+ <entry name="all_scroll" value="32" summary="something can be scrolled in any direction"/>
105105+ <entry name="zoom_in" value="33" summary="something can be zoomed in"/>
106106+ <entry name="zoom_out" value="34" summary="something can be zoomed out"/>
107107+ </enum>
108108+109109+ <enum name="error">
110110+ <entry name="invalid_shape" value="1"
111111+ summary="the specified shape value is invalid"/>
112112+ </enum>
113113+114114+ <request name="destroy" type="destructor">
115115+ <description summary="destroy the cursor shape device">
116116+ Destroy the cursor shape device.
117117+118118+ The device cursor shape remains unchanged.
119119+ </description>
120120+ </request>
121121+122122+ <request name="set_shape">
123123+ <description summary="set device cursor to the shape">
124124+ Sets the device cursor to the specified shape. The compositor will
125125+ change the cursor image based on the specified shape.
126126+127127+ The cursor actually changes only if the input device focus is one of
128128+ the requesting client's surfaces. If any, the previous cursor image
129129+ (surface or shape) is replaced.
130130+131131+ The "shape" argument must be a valid enum entry, otherwise the
132132+ invalid_shape protocol error is raised.
133133+134134+ This is similar to the wl_pointer.set_cursor and
135135+ zwp_tablet_tool_v2.set_cursor requests, but this request accepts a
136136+ shape instead of contents in the form of a surface. Clients can mix
137137+ set_cursor and set_shape requests.
138138+139139+ The serial parameter must match the latest wl_pointer.enter or
140140+ zwp_tablet_tool_v2.proximity_in serial number sent to the client.
141141+ Otherwise the request will be ignored.
142142+ </description>
143143+ <arg name="serial" type="uint" summary="serial number of the enter event"/>
144144+ <arg name="shape" type="uint" enum="shape"/>
145145+ </request>
146146+ </interface>
147147+</protocol>