1 /* Generated by wayland-scanner 1.22.0 */
2 
3 #ifndef CURSOR_SHAPES_V1_CLIENT_PROTOCOL_H
4 #define CURSOR_SHAPES_V1_CLIENT_PROTOCOL_H
5 
6 #include <stdint.h>
7 #include <stddef.h>
8 #include "wayland-client.h"
9 
10 #ifdef  __cplusplus
11 extern "C" {
12 #endif
13 
14 /**
15  * @page page_cursor_shapes_v1 The cursor_shapes_v1 protocol
16  * @section page_ifaces_cursor_shapes_v1 Interfaces
17  * - @subpage page_iface_zcr_cursor_shapes_v1 - Allows to set the cursor shape
18  * @section page_copyright_cursor_shapes_v1 Copyright
19  * <pre>
20  *
21  * Copyright 2018 The Chromium Authors
22  *
23  * Permission is hereby granted, free of charge, to any person obtaining a
24  * copy of this software and associated documentation files (the "Software"),
25  * to deal in the Software without restriction, including without limitation
26  * the rights to use, copy, modify, merge, publish, distribute, sublicense,
27  * and/or sell copies of the Software, and to permit persons to whom the
28  * Software is furnished to do so, subject to the following conditions:
29  *
30  * The above copyright notice and this permission notice (including the next
31  * paragraph) shall be included in all copies or substantial portions of the
32  * Software.
33  *
34  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
35  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
36  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
37  * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
38  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
39  * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
40  * DEALINGS IN THE SOFTWARE.
41  * </pre>
42  */
43 struct wl_pointer;
44 struct zcr_cursor_shapes_v1;
45 
46 #ifndef ZCR_CURSOR_SHAPES_V1_INTERFACE
47 #define ZCR_CURSOR_SHAPES_V1_INTERFACE
48 /**
49  * @page page_iface_zcr_cursor_shapes_v1 zcr_cursor_shapes_v1
50  * @section page_iface_zcr_cursor_shapes_v1_desc Description
51  *
52  * Allows to set the semantic cursor shape rather than a surface for a
53  * pointer cursor.
54  *
55  * Warning! The protocol described in this file is experimental and
56  * backward incompatible changes may be made. Backward compatible changes
57  * may be added together with the corresponding uinterface version bump.
58  * Backward incompatible changes are done by bumping the version number in
59  * the protocol and uinterface names and resetting the interface version.
60  * Once the protocol is to be declared stable, the 'z' prefix and the
61  * version number in the protocol and interface names are removed and the
62  * interface version number is reset.
63  * @section page_iface_zcr_cursor_shapes_v1_api API
64  * See @ref iface_zcr_cursor_shapes_v1.
65  */
66 /**
67  * @defgroup iface_zcr_cursor_shapes_v1 The zcr_cursor_shapes_v1 interface
68  *
69  * Allows to set the semantic cursor shape rather than a surface for a
70  * pointer cursor.
71  *
72  * Warning! The protocol described in this file is experimental and
73  * backward incompatible changes may be made. Backward compatible changes
74  * may be added together with the corresponding uinterface version bump.
75  * Backward incompatible changes are done by bumping the version number in
76  * the protocol and uinterface names and resetting the interface version.
77  * Once the protocol is to be declared stable, the 'z' prefix and the
78  * version number in the protocol and interface names are removed and the
79  * interface version number is reset.
80  */
81 extern const struct wl_interface zcr_cursor_shapes_v1_interface;
82 #endif
83 
84 #ifndef ZCR_CURSOR_SHAPES_V1_ERROR_ENUM
85 #define ZCR_CURSOR_SHAPES_V1_ERROR_ENUM
86 enum zcr_cursor_shapes_v1_error {
87 	/**
88 	 * the specified shape value is invalid
89 	 */
90 	ZCR_CURSOR_SHAPES_V1_ERROR_INVALID_SHAPE = 0,
91 };
92 #endif /* ZCR_CURSOR_SHAPES_V1_ERROR_ENUM */
93 
94 #ifndef ZCR_CURSOR_SHAPES_V1_CURSOR_SHAPE_TYPE_ENUM
95 #define ZCR_CURSOR_SHAPES_V1_CURSOR_SHAPE_TYPE_ENUM
96 /**
97  * @ingroup iface_zcr_cursor_shapes_v1
98  * the type of cursor shape
99  */
100 enum zcr_cursor_shapes_v1_cursor_shape_type {
101 	ZCR_CURSOR_SHAPES_V1_CURSOR_SHAPE_TYPE_POINTER = 0,
102 	ZCR_CURSOR_SHAPES_V1_CURSOR_SHAPE_TYPE_CROSS = 1,
103 	ZCR_CURSOR_SHAPES_V1_CURSOR_SHAPE_TYPE_HAND = 2,
104 	ZCR_CURSOR_SHAPES_V1_CURSOR_SHAPE_TYPE_IBEAM = 3,
105 	ZCR_CURSOR_SHAPES_V1_CURSOR_SHAPE_TYPE_WAIT = 4,
106 	ZCR_CURSOR_SHAPES_V1_CURSOR_SHAPE_TYPE_HELP = 5,
107 	ZCR_CURSOR_SHAPES_V1_CURSOR_SHAPE_TYPE_EAST_RESIZE = 6,
108 	ZCR_CURSOR_SHAPES_V1_CURSOR_SHAPE_TYPE_NORTH_RESIZE = 7,
109 	ZCR_CURSOR_SHAPES_V1_CURSOR_SHAPE_TYPE_NORTH_EAST_RESIZE = 8,
110 	ZCR_CURSOR_SHAPES_V1_CURSOR_SHAPE_TYPE_NORTH_WEST_RESIZE = 9,
111 	ZCR_CURSOR_SHAPES_V1_CURSOR_SHAPE_TYPE_SOUTH_RESIZE = 10,
112 	ZCR_CURSOR_SHAPES_V1_CURSOR_SHAPE_TYPE_SOUTH_EAST_RESIZE = 11,
113 	ZCR_CURSOR_SHAPES_V1_CURSOR_SHAPE_TYPE_SOUTH_WEST_RESIZE = 12,
114 	ZCR_CURSOR_SHAPES_V1_CURSOR_SHAPE_TYPE_WEST_RESIZE = 13,
115 	ZCR_CURSOR_SHAPES_V1_CURSOR_SHAPE_TYPE_NORTH_SOUTH_RESIZE = 14,
116 	ZCR_CURSOR_SHAPES_V1_CURSOR_SHAPE_TYPE_EAST_WEST_RESIZE = 15,
117 	ZCR_CURSOR_SHAPES_V1_CURSOR_SHAPE_TYPE_NORTH_EAST_SOUTH_WEST_RESIZE = 16,
118 	ZCR_CURSOR_SHAPES_V1_CURSOR_SHAPE_TYPE_NORTH_WEST_SOUTH_EAST_RESIZE = 17,
119 	ZCR_CURSOR_SHAPES_V1_CURSOR_SHAPE_TYPE_COLUMN_RESIZE = 18,
120 	ZCR_CURSOR_SHAPES_V1_CURSOR_SHAPE_TYPE_ROW_RESIZE = 19,
121 	ZCR_CURSOR_SHAPES_V1_CURSOR_SHAPE_TYPE_MIDDLE_PANNING = 20,
122 	ZCR_CURSOR_SHAPES_V1_CURSOR_SHAPE_TYPE_EAST_PANNING = 21,
123 	ZCR_CURSOR_SHAPES_V1_CURSOR_SHAPE_TYPE_NORTH_PANNING = 22,
124 	ZCR_CURSOR_SHAPES_V1_CURSOR_SHAPE_TYPE_NORTH_EAST_PANNING = 23,
125 	ZCR_CURSOR_SHAPES_V1_CURSOR_SHAPE_TYPE_NORTH_WEST_PANNING = 24,
126 	ZCR_CURSOR_SHAPES_V1_CURSOR_SHAPE_TYPE_SOUTH_PANNING = 25,
127 	ZCR_CURSOR_SHAPES_V1_CURSOR_SHAPE_TYPE_SOUTH_EAST_PANNING = 26,
128 	ZCR_CURSOR_SHAPES_V1_CURSOR_SHAPE_TYPE_SOUTH_WEST_PANNING = 27,
129 	ZCR_CURSOR_SHAPES_V1_CURSOR_SHAPE_TYPE_WEST_PANNING = 28,
130 	ZCR_CURSOR_SHAPES_V1_CURSOR_SHAPE_TYPE_MOVE = 29,
131 	ZCR_CURSOR_SHAPES_V1_CURSOR_SHAPE_TYPE_VERTICAL_TEXT = 30,
132 	ZCR_CURSOR_SHAPES_V1_CURSOR_SHAPE_TYPE_CELL = 31,
133 	ZCR_CURSOR_SHAPES_V1_CURSOR_SHAPE_TYPE_CONTEXT_MENU = 32,
134 	ZCR_CURSOR_SHAPES_V1_CURSOR_SHAPE_TYPE_ALIAS = 33,
135 	ZCR_CURSOR_SHAPES_V1_CURSOR_SHAPE_TYPE_PROGRESS = 34,
136 	ZCR_CURSOR_SHAPES_V1_CURSOR_SHAPE_TYPE_NO_DROP = 35,
137 	ZCR_CURSOR_SHAPES_V1_CURSOR_SHAPE_TYPE_COPY = 36,
138 	ZCR_CURSOR_SHAPES_V1_CURSOR_SHAPE_TYPE_NONE = 37,
139 	ZCR_CURSOR_SHAPES_V1_CURSOR_SHAPE_TYPE_NOT_ALLOWED = 38,
140 	ZCR_CURSOR_SHAPES_V1_CURSOR_SHAPE_TYPE_ZOOM_IN = 39,
141 	ZCR_CURSOR_SHAPES_V1_CURSOR_SHAPE_TYPE_ZOOM_OUT = 40,
142 	ZCR_CURSOR_SHAPES_V1_CURSOR_SHAPE_TYPE_GRAB = 41,
143 	ZCR_CURSOR_SHAPES_V1_CURSOR_SHAPE_TYPE_GRABBING = 42,
144 	ZCR_CURSOR_SHAPES_V1_CURSOR_SHAPE_TYPE_DND_NONE = 43,
145 	ZCR_CURSOR_SHAPES_V1_CURSOR_SHAPE_TYPE_DND_MOVE = 44,
146 	ZCR_CURSOR_SHAPES_V1_CURSOR_SHAPE_TYPE_DND_COPY = 45,
147 	ZCR_CURSOR_SHAPES_V1_CURSOR_SHAPE_TYPE_DND_LINK = 46,
148 };
149 #endif /* ZCR_CURSOR_SHAPES_V1_CURSOR_SHAPE_TYPE_ENUM */
150 
151 #define ZCR_CURSOR_SHAPES_V1_SET_CURSOR_SHAPE 0
152 
153 
154 /**
155  * @ingroup iface_zcr_cursor_shapes_v1
156  */
157 #define ZCR_CURSOR_SHAPES_V1_SET_CURSOR_SHAPE_SINCE_VERSION 1
158 
159 /** @ingroup iface_zcr_cursor_shapes_v1 */
160 static inline void
zcr_cursor_shapes_v1_set_user_data(struct zcr_cursor_shapes_v1 * zcr_cursor_shapes_v1,void * user_data)161 zcr_cursor_shapes_v1_set_user_data(struct zcr_cursor_shapes_v1 *zcr_cursor_shapes_v1, void *user_data)
162 {
163 	wl_proxy_set_user_data((struct wl_proxy *) zcr_cursor_shapes_v1, user_data);
164 }
165 
166 /** @ingroup iface_zcr_cursor_shapes_v1 */
167 static inline void *
zcr_cursor_shapes_v1_get_user_data(struct zcr_cursor_shapes_v1 * zcr_cursor_shapes_v1)168 zcr_cursor_shapes_v1_get_user_data(struct zcr_cursor_shapes_v1 *zcr_cursor_shapes_v1)
169 {
170 	return wl_proxy_get_user_data((struct wl_proxy *) zcr_cursor_shapes_v1);
171 }
172 
173 static inline uint32_t
zcr_cursor_shapes_v1_get_version(struct zcr_cursor_shapes_v1 * zcr_cursor_shapes_v1)174 zcr_cursor_shapes_v1_get_version(struct zcr_cursor_shapes_v1 *zcr_cursor_shapes_v1)
175 {
176 	return wl_proxy_get_version((struct wl_proxy *) zcr_cursor_shapes_v1);
177 }
178 
179 /** @ingroup iface_zcr_cursor_shapes_v1 */
180 static inline void
zcr_cursor_shapes_v1_destroy(struct zcr_cursor_shapes_v1 * zcr_cursor_shapes_v1)181 zcr_cursor_shapes_v1_destroy(struct zcr_cursor_shapes_v1 *zcr_cursor_shapes_v1)
182 {
183 	wl_proxy_destroy((struct wl_proxy *) zcr_cursor_shapes_v1);
184 }
185 
186 /**
187  * @ingroup iface_zcr_cursor_shapes_v1
188  *
189  * Sets the pointer cursor to the specified shape. The server will change
190  * the cursor graphics based on the specified shape and its graphic assets
191  * and system condition.
192  *
193  * The "shape" argument needs to be one of the values in cursor_shape_type
194  * enum. Otherwise invalid_shape error is raised.
195  *
196  * This is similar to wl_pointer::set_cursor request, but this accepts a
197  * shape instead of contents in the form of a surface.
198  *
199  * The client which do not know this protocol should work as-is, so
200  * wl_pointer::set_cursor will change the cursor graphics even when it's
201  * combined with this request; and another invocation of set_cursor_shape
202  * will change the cursor shape again. This means the last invoked one will
203  * be used for the actual cursor.
204  */
205 static inline void
zcr_cursor_shapes_v1_set_cursor_shape(struct zcr_cursor_shapes_v1 * zcr_cursor_shapes_v1,struct wl_pointer * pointer,int32_t shape)206 zcr_cursor_shapes_v1_set_cursor_shape(struct zcr_cursor_shapes_v1 *zcr_cursor_shapes_v1, struct wl_pointer *pointer, int32_t shape)
207 {
208 	wl_proxy_marshal_flags((struct wl_proxy *) zcr_cursor_shapes_v1,
209 			 ZCR_CURSOR_SHAPES_V1_SET_CURSOR_SHAPE, NULL, wl_proxy_get_version((struct wl_proxy *) zcr_cursor_shapes_v1), 0, pointer, shape);
210 }
211 
212 #ifdef  __cplusplus
213 }
214 #endif
215 
216 #endif
217