• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1<?xml version="1.0" encoding="UTF-8"?>
2<protocol name="cursor_shapes_v1">
3
4  <copyright>
5    Copyright 2018 The Chromium Authors.
6
7    Permission is hereby granted, free of charge, to any person obtaining a
8    copy of this software and associated documentation files (the "Software"),
9    to deal in the Software without restriction, including without limitation
10    the rights to use, copy, modify, merge, publish, distribute, sublicense,
11    and/or sell copies of the Software, and to permit persons to whom the
12    Software is furnished to do so, subject to the following conditions:
13
14    The above copyright notice and this permission notice (including the next
15    paragraph) shall be included in all copies or substantial portions of the
16    Software.
17
18    THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
19    IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
20    FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
21    THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
22    LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
23    FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
24    DEALINGS IN THE SOFTWARE.
25  </copyright>
26
27  <interface name="zcr_cursor_shapes_v1" version="1">
28    <description summary="Allows to set the cursor shape">
29      Allows to set the semantic cursor shape rather than a surface for a
30      pointer cursor.
31
32      Warning! The protocol described in this file is experimental and
33      backward incompatible changes may be made. Backward compatible changes
34      may be added together with the corresponding uinterface version bump.
35      Backward incompatible changes are done by bumping the version number in
36      the protocol and uinterface names and resetting the interface version.
37      Once the protocol is to be declared stable, the 'z' prefix and the
38      version number in the protocol and interface names are removed and the
39      interface version number is reset.
40    </description>
41
42    <enum name="error">
43      <entry name="invalid_shape" value="0"
44             summary="the specified shape value is invalid"/>
45    </enum>
46
47    <enum name="cursor_shape_type">
48      <description summary="the type of cursor shape"/>
49      <entry name="pointer" value="0"/>
50      <entry name="cross" value="1"/>
51      <entry name="hand" value="2"/>
52      <entry name="ibeam" value="3"/>
53      <entry name="wait" value="4"/>
54      <entry name="help" value="5"/>
55      <entry name="east_resize" value="6"/>
56      <entry name="north_resize" value="7"/>
57      <entry name="north_east_resize" value="8"/>
58      <entry name="north_west_resize" value="9"/>
59      <entry name="south_resize" value="10"/>
60      <entry name="south_east_resize" value="11"/>
61      <entry name="south_west_resize" value="12"/>
62      <entry name="west_resize" value="13"/>
63      <entry name="north_south_resize" value="14"/>
64      <entry name="east_west_resize" value="15"/>
65      <entry name="north_east_south_west_resize" value="16"/>
66      <entry name="north_west_south_east_resize" value="17"/>
67      <entry name="column_resize" value="18"/>
68      <entry name="row_resize" value="19"/>
69      <entry name="middle_panning" value="20"/>
70      <entry name="east_panning" value="21"/>
71      <entry name="north_panning" value="22"/>
72      <entry name="north_east_panning" value="23"/>
73      <entry name="north_west_panning" value="24"/>
74      <entry name="south_panning" value="25"/>
75      <entry name="south_east_panning" value="26"/>
76      <entry name="south_west_panning" value="27"/>
77      <entry name="west_panning" value="28"/>
78      <entry name="move" value="29"/>
79      <entry name="vertical_text" value="30"/>
80      <entry name="cell" value="31"/>
81      <entry name="context_menu" value="32"/>
82      <entry name="alias" value="33"/>
83      <entry name="progress" value="34"/>
84      <entry name="no_drop" value="35"/>
85      <entry name="copy" value="36"/>
86      <entry name="none" value="37"/>
87      <entry name="not_allowed" value="38"/>
88      <entry name="zoom_in" value="39"/>
89      <entry name="zoom_out" value="40"/>
90      <entry name="grab" value="41"/>
91      <entry name="grabbing" value="42"/>
92      <entry name="dnd_none" value="43"/>
93      <entry name="dnd_move" value="44"/>
94      <entry name="dnd_copy" value="45"/>
95      <entry name="dnd_link" value="46"/>
96    </enum>
97
98    <request name="set_cursor_shape">
99      <description summary="set pointer cursor to the shape">
100        Sets the pointer cursor to the specified shape. The server will change
101        the cursor graphics based on the specified shape and its graphic assets
102        and system condition.
103
104        The "shape" argument needs to be one of the values in cursor_shape_type
105        enum. Otherwise invalid_shape error is raised.
106
107        This is similar to wl_pointer::set_cursor request, but this accepts a
108        shape instead of contents in the form of a surface.
109
110        The client which do not know this protocol should work as-is, so
111        wl_pointer::set_cursor will change the cursor graphics even when it's
112        combined with this request; and another invocation of set_cursor_shape
113        will change the cursor shape again. This means the last invoked one will
114        be used for the actual cursor.
115      </description>
116      <arg name="pointer" type="object" interface="wl_pointer"/>
117      <arg name="shape" type="int"/>
118    </request>
119  </interface>
120</protocol>
121