AtlatestRepositorysigil-ui

sigil-ui / tree / test / waylandwlr-virtual-pointer-unstable-v1-client-protocol.h

1/* Generated by wayland-scanner 1.24.0 */
2
3#ifndef WLR_VIRTUAL_POINTER_UNSTABLE_V1_CLIENT_PROTOCOL_H
4#define WLR_VIRTUAL_POINTER_UNSTABLE_V1_CLIENT_PROTOCOL_H
5
6#include <stdint.h>
7#include <stddef.h>
8#include "wayland-client.h"
9
10#ifdef __cplusplus
11extern "C" {
12#endif
14/**
15 * @page page_wlr_virtual_pointer_unstable_v1 The wlr_virtual_pointer_unstable_v1 protocol
16 * @section page_ifaces_wlr_virtual_pointer_unstable_v1 Interfaces
17 * - @subpage page_iface_zwlr_virtual_pointer_v1 - virtual pointer
18 * - @subpage page_iface_zwlr_virtual_pointer_manager_v1 - virtual pointer manager
19 * @section page_copyright_wlr_virtual_pointer_unstable_v1 Copyright
20 * <pre>
21 *
22 * Copyright © 2019 Josef Gajdusek
23 *
24 * Permission is hereby granted, free of charge, to any person obtaining a
25 * copy of this software and associated documentation files (the "Software"),
26 * to deal in the Software without restriction, including without limitation
27 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
28 * and/or sell copies of the Software, and to permit persons to whom the
29 * Software is furnished to do so, subject to the following conditions:
30 *
31 * The above copyright notice and this permission notice (including the next
32 * paragraph) shall be included in all copies or substantial portions of the
33 * Software.
34 *
35 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
36 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
37 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
38 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
39 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
40 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
41 * DEALINGS IN THE SOFTWARE.
42 * </pre>
43 */
44struct wl_output;
45struct wl_seat;
46struct zwlr_virtual_pointer_manager_v1;
47struct zwlr_virtual_pointer_v1;
49#ifndef ZWLR_VIRTUAL_POINTER_V1_INTERFACE
50#define ZWLR_VIRTUAL_POINTER_V1_INTERFACE
51/**
52 * @page page_iface_zwlr_virtual_pointer_v1 zwlr_virtual_pointer_v1
53 * @section page_iface_zwlr_virtual_pointer_v1_desc Description
54 *
55 * This protocol allows clients to emulate a physical pointer device. The
56 * requests are mostly mirror opposites of those specified in wl_pointer.
57 * @section page_iface_zwlr_virtual_pointer_v1_api API
58 * See @ref iface_zwlr_virtual_pointer_v1.
59 */
60/**
61 * @defgroup iface_zwlr_virtual_pointer_v1 The zwlr_virtual_pointer_v1 interface
62 *
63 * This protocol allows clients to emulate a physical pointer device. The
64 * requests are mostly mirror opposites of those specified in wl_pointer.
65 */
66extern const struct wl_interface zwlr_virtual_pointer_v1_interface;
67#endif
68#ifndef ZWLR_VIRTUAL_POINTER_MANAGER_V1_INTERFACE
69#define ZWLR_VIRTUAL_POINTER_MANAGER_V1_INTERFACE
70/**
71 * @page page_iface_zwlr_virtual_pointer_manager_v1 zwlr_virtual_pointer_manager_v1
72 * @section page_iface_zwlr_virtual_pointer_manager_v1_desc Description
73 *
74 * This object allows clients to create individual virtual pointer objects.
75 * @section page_iface_zwlr_virtual_pointer_manager_v1_api API
76 * See @ref iface_zwlr_virtual_pointer_manager_v1.
77 */
78/**
79 * @defgroup iface_zwlr_virtual_pointer_manager_v1 The zwlr_virtual_pointer_manager_v1 interface
80 *
81 * This object allows clients to create individual virtual pointer objects.
82 */
83extern const struct wl_interface zwlr_virtual_pointer_manager_v1_interface;
84#endif
86#ifndef ZWLR_VIRTUAL_POINTER_V1_ERROR_ENUM
87#define ZWLR_VIRTUAL_POINTER_V1_ERROR_ENUM
88enum zwlr_virtual_pointer_v1_error {
89 /**
90 * client sent invalid axis enumeration value
91 */
92 ZWLR_VIRTUAL_POINTER_V1_ERROR_INVALID_AXIS = 0,
93 /**
94 * client sent invalid axis source enumeration value
95 */
96 ZWLR_VIRTUAL_POINTER_V1_ERROR_INVALID_AXIS_SOURCE = 1,
97};
98#endif /* ZWLR_VIRTUAL_POINTER_V1_ERROR_ENUM */
100#define ZWLR_VIRTUAL_POINTER_V1_MOTION 0
101#define ZWLR_VIRTUAL_POINTER_V1_MOTION_ABSOLUTE 1
102#define ZWLR_VIRTUAL_POINTER_V1_BUTTON 2
103#define ZWLR_VIRTUAL_POINTER_V1_AXIS 3
104#define ZWLR_VIRTUAL_POINTER_V1_FRAME 4
105#define ZWLR_VIRTUAL_POINTER_V1_AXIS_SOURCE 5
106#define ZWLR_VIRTUAL_POINTER_V1_AXIS_STOP 6
107#define ZWLR_VIRTUAL_POINTER_V1_AXIS_DISCRETE 7
108#define ZWLR_VIRTUAL_POINTER_V1_DESTROY 8
111/**
112 * @ingroup iface_zwlr_virtual_pointer_v1
113 */
114#define ZWLR_VIRTUAL_POINTER_V1_MOTION_SINCE_VERSION 1
115/**
116 * @ingroup iface_zwlr_virtual_pointer_v1
117 */
118#define ZWLR_VIRTUAL_POINTER_V1_MOTION_ABSOLUTE_SINCE_VERSION 1
119/**
120 * @ingroup iface_zwlr_virtual_pointer_v1
121 */
122#define ZWLR_VIRTUAL_POINTER_V1_BUTTON_SINCE_VERSION 1
123/**
124 * @ingroup iface_zwlr_virtual_pointer_v1
125 */
126#define ZWLR_VIRTUAL_POINTER_V1_AXIS_SINCE_VERSION 1
127/**
128 * @ingroup iface_zwlr_virtual_pointer_v1
129 */
130#define ZWLR_VIRTUAL_POINTER_V1_FRAME_SINCE_VERSION 1
131/**
132 * @ingroup iface_zwlr_virtual_pointer_v1
133 */
134#define ZWLR_VIRTUAL_POINTER_V1_AXIS_SOURCE_SINCE_VERSION 1
135/**
136 * @ingroup iface_zwlr_virtual_pointer_v1
137 */
138#define ZWLR_VIRTUAL_POINTER_V1_AXIS_STOP_SINCE_VERSION 1
139/**
140 * @ingroup iface_zwlr_virtual_pointer_v1
141 */
142#define ZWLR_VIRTUAL_POINTER_V1_AXIS_DISCRETE_SINCE_VERSION 1
143/**
144 * @ingroup iface_zwlr_virtual_pointer_v1
145 */
146#define ZWLR_VIRTUAL_POINTER_V1_DESTROY_SINCE_VERSION 1
148/** @ingroup iface_zwlr_virtual_pointer_v1 */
149static inline void
150zwlr_virtual_pointer_v1_set_user_data(struct zwlr_virtual_pointer_v1 *zwlr_virtual_pointer_v1, void *user_data)
152 wl_proxy_set_user_data((struct wl_proxy *) zwlr_virtual_pointer_v1, user_data);
155/** @ingroup iface_zwlr_virtual_pointer_v1 */
156static inline void *
157zwlr_virtual_pointer_v1_get_user_data(struct zwlr_virtual_pointer_v1 *zwlr_virtual_pointer_v1)
159 return wl_proxy_get_user_data((struct wl_proxy *) zwlr_virtual_pointer_v1);
162static inline uint32_t
163zwlr_virtual_pointer_v1_get_version(struct zwlr_virtual_pointer_v1 *zwlr_virtual_pointer_v1)
165 return wl_proxy_get_version((struct wl_proxy *) zwlr_virtual_pointer_v1);
168/**
169 * @ingroup iface_zwlr_virtual_pointer_v1
170 *
171 * The pointer has moved by a relative amount to the previous request.
172 *
173 * Values are in the global compositor space.
174 */
175static inline void
176zwlr_virtual_pointer_v1_motion(struct zwlr_virtual_pointer_v1 *zwlr_virtual_pointer_v1, uint32_t time, wl_fixed_t dx, wl_fixed_t dy)
178 wl_proxy_marshal_flags((struct wl_proxy *) zwlr_virtual_pointer_v1,
179 ZWLR_VIRTUAL_POINTER_V1_MOTION, NULL, wl_proxy_get_version((struct wl_proxy *) zwlr_virtual_pointer_v1), 0, time, dx, dy);
182/**
183 * @ingroup iface_zwlr_virtual_pointer_v1
184 *
185 * The pointer has moved in an absolute coordinate frame.
186 *
187 * Value of x can range from 0 to x_extent, value of y can range from 0
188 * to y_extent.
189 */
190static inline void
191zwlr_virtual_pointer_v1_motion_absolute(struct zwlr_virtual_pointer_v1 *zwlr_virtual_pointer_v1, uint32_t time, uint32_t x, uint32_t y, uint32_t x_extent, uint32_t y_extent)
193 wl_proxy_marshal_flags((struct wl_proxy *) zwlr_virtual_pointer_v1,
194 ZWLR_VIRTUAL_POINTER_V1_MOTION_ABSOLUTE, NULL, wl_proxy_get_version((struct wl_proxy *) zwlr_virtual_pointer_v1), 0, time, x, y, x_extent, y_extent);
197/**
198 * @ingroup iface_zwlr_virtual_pointer_v1
199 *
200 * A button was pressed or released.
201 */
202static inline void
203zwlr_virtual_pointer_v1_button(struct zwlr_virtual_pointer_v1 *zwlr_virtual_pointer_v1, uint32_t time, uint32_t button, uint32_t state)
205 wl_proxy_marshal_flags((struct wl_proxy *) zwlr_virtual_pointer_v1,
206 ZWLR_VIRTUAL_POINTER_V1_BUTTON, NULL, wl_proxy_get_version((struct wl_proxy *) zwlr_virtual_pointer_v1), 0, time, button, state);
209/**
210 * @ingroup iface_zwlr_virtual_pointer_v1
211 *
212 * Scroll and other axis requests.
213 */
214static inline void
215zwlr_virtual_pointer_v1_axis(struct zwlr_virtual_pointer_v1 *zwlr_virtual_pointer_v1, uint32_t time, uint32_t axis, wl_fixed_t value)
217 wl_proxy_marshal_flags((struct wl_proxy *) zwlr_virtual_pointer_v1,
218 ZWLR_VIRTUAL_POINTER_V1_AXIS, NULL, wl_proxy_get_version((struct wl_proxy *) zwlr_virtual_pointer_v1), 0, time, axis, value);
221/**
222 * @ingroup iface_zwlr_virtual_pointer_v1
223 *
224 * Indicates the set of events that logically belong together.
225 */
226static inline void
227zwlr_virtual_pointer_v1_frame(struct zwlr_virtual_pointer_v1 *zwlr_virtual_pointer_v1)
229 wl_proxy_marshal_flags((struct wl_proxy *) zwlr_virtual_pointer_v1,
230 ZWLR_VIRTUAL_POINTER_V1_FRAME, NULL, wl_proxy_get_version((struct wl_proxy *) zwlr_virtual_pointer_v1), 0);
233/**
234 * @ingroup iface_zwlr_virtual_pointer_v1
235 *
236 * Source information for scroll and other axis.
237 */
238static inline void
239zwlr_virtual_pointer_v1_axis_source(struct zwlr_virtual_pointer_v1 *zwlr_virtual_pointer_v1, uint32_t axis_source)
241 wl_proxy_marshal_flags((struct wl_proxy *) zwlr_virtual_pointer_v1,
242 ZWLR_VIRTUAL_POINTER_V1_AXIS_SOURCE, NULL, wl_proxy_get_version((struct wl_proxy *) zwlr_virtual_pointer_v1), 0, axis_source);
245/**
246 * @ingroup iface_zwlr_virtual_pointer_v1
247 *
248 * Stop notification for scroll and other axes.
249 */
250static inline void
251zwlr_virtual_pointer_v1_axis_stop(struct zwlr_virtual_pointer_v1 *zwlr_virtual_pointer_v1, uint32_t time, uint32_t axis)
253 wl_proxy_marshal_flags((struct wl_proxy *) zwlr_virtual_pointer_v1,
254 ZWLR_VIRTUAL_POINTER_V1_AXIS_STOP, NULL, wl_proxy_get_version((struct wl_proxy *) zwlr_virtual_pointer_v1), 0, time, axis);
257/**
258 * @ingroup iface_zwlr_virtual_pointer_v1
259 *
260 * Discrete step information for scroll and other axes.
261 *
262 * This event allows the client to extend data normally sent using the axis
263 * event with discrete value.
264 */
265static inline void
266zwlr_virtual_pointer_v1_axis_discrete(struct zwlr_virtual_pointer_v1 *zwlr_virtual_pointer_v1, uint32_t time, uint32_t axis, wl_fixed_t value, int32_t discrete)
268 wl_proxy_marshal_flags((struct wl_proxy *) zwlr_virtual_pointer_v1,
269 ZWLR_VIRTUAL_POINTER_V1_AXIS_DISCRETE, NULL, wl_proxy_get_version((struct wl_proxy *) zwlr_virtual_pointer_v1), 0, time, axis, value, discrete);
272/**
273 * @ingroup iface_zwlr_virtual_pointer_v1
274 */
275static inline void
276zwlr_virtual_pointer_v1_destroy(struct zwlr_virtual_pointer_v1 *zwlr_virtual_pointer_v1)
278 wl_proxy_marshal_flags((struct wl_proxy *) zwlr_virtual_pointer_v1,
279 ZWLR_VIRTUAL_POINTER_V1_DESTROY, NULL, wl_proxy_get_version((struct wl_proxy *) zwlr_virtual_pointer_v1), WL_MARSHAL_FLAG_DESTROY);
282#define ZWLR_VIRTUAL_POINTER_MANAGER_V1_CREATE_VIRTUAL_POINTER 0
283#define ZWLR_VIRTUAL_POINTER_MANAGER_V1_DESTROY 1
284#define ZWLR_VIRTUAL_POINTER_MANAGER_V1_CREATE_VIRTUAL_POINTER_WITH_OUTPUT 2
287/**
288 * @ingroup iface_zwlr_virtual_pointer_manager_v1
289 */
290#define ZWLR_VIRTUAL_POINTER_MANAGER_V1_CREATE_VIRTUAL_POINTER_SINCE_VERSION 1
291/**
292 * @ingroup iface_zwlr_virtual_pointer_manager_v1
293 */
294#define ZWLR_VIRTUAL_POINTER_MANAGER_V1_DESTROY_SINCE_VERSION 1
295/**
296 * @ingroup iface_zwlr_virtual_pointer_manager_v1
297 */
298#define ZWLR_VIRTUAL_POINTER_MANAGER_V1_CREATE_VIRTUAL_POINTER_WITH_OUTPUT_SINCE_VERSION 2
300/** @ingroup iface_zwlr_virtual_pointer_manager_v1 */
301static inline void
302zwlr_virtual_pointer_manager_v1_set_user_data(struct zwlr_virtual_pointer_manager_v1 *zwlr_virtual_pointer_manager_v1, void *user_data)
304 wl_proxy_set_user_data((struct wl_proxy *) zwlr_virtual_pointer_manager_v1, user_data);
307/** @ingroup iface_zwlr_virtual_pointer_manager_v1 */
308static inline void *
309zwlr_virtual_pointer_manager_v1_get_user_data(struct zwlr_virtual_pointer_manager_v1 *zwlr_virtual_pointer_manager_v1)
311 return wl_proxy_get_user_data((struct wl_proxy *) zwlr_virtual_pointer_manager_v1);
314static inline uint32_t
315zwlr_virtual_pointer_manager_v1_get_version(struct zwlr_virtual_pointer_manager_v1 *zwlr_virtual_pointer_manager_v1)
317 return wl_proxy_get_version((struct wl_proxy *) zwlr_virtual_pointer_manager_v1);
320/**
321 * @ingroup iface_zwlr_virtual_pointer_manager_v1
322 *
323 * Creates a new virtual pointer. The optional seat is a suggestion to the
324 * compositor.
325 */
326static inline struct zwlr_virtual_pointer_v1 *
327zwlr_virtual_pointer_manager_v1_create_virtual_pointer(struct zwlr_virtual_pointer_manager_v1 *zwlr_virtual_pointer_manager_v1, struct wl_seat *seat)
329 struct wl_proxy *id;
331 id = wl_proxy_marshal_flags((struct wl_proxy *) zwlr_virtual_pointer_manager_v1,
332 ZWLR_VIRTUAL_POINTER_MANAGER_V1_CREATE_VIRTUAL_POINTER, &zwlr_virtual_pointer_v1_interface, wl_proxy_get_version((struct wl_proxy *) zwlr_virtual_pointer_manager_v1), 0, seat, NULL);
334 return (struct zwlr_virtual_pointer_v1 *) id;
337/**
338 * @ingroup iface_zwlr_virtual_pointer_manager_v1
339 */
340static inline void
341zwlr_virtual_pointer_manager_v1_destroy(struct zwlr_virtual_pointer_manager_v1 *zwlr_virtual_pointer_manager_v1)
343 wl_proxy_marshal_flags((struct wl_proxy *) zwlr_virtual_pointer_manager_v1,
344 ZWLR_VIRTUAL_POINTER_MANAGER_V1_DESTROY, NULL, wl_proxy_get_version((struct wl_proxy *) zwlr_virtual_pointer_manager_v1), WL_MARSHAL_FLAG_DESTROY);
347/**
348 * @ingroup iface_zwlr_virtual_pointer_manager_v1
349 *
350 * Creates a new virtual pointer. The seat and the output arguments are
351 * optional. If the seat argument is set, the compositor should assign the
352 * input device to the requested seat. If the output argument is set, the
353 * compositor should map the input device to the requested output.
354 */
355static inline struct zwlr_virtual_pointer_v1 *
356zwlr_virtual_pointer_manager_v1_create_virtual_pointer_with_output(struct zwlr_virtual_pointer_manager_v1 *zwlr_virtual_pointer_manager_v1, struct wl_seat *seat, struct wl_output *output)
358 struct wl_proxy *id;
360 id = wl_proxy_marshal_flags((struct wl_proxy *) zwlr_virtual_pointer_manager_v1,
361 ZWLR_VIRTUAL_POINTER_MANAGER_V1_CREATE_VIRTUAL_POINTER_WITH_OUTPUT, &zwlr_virtual_pointer_v1_interface, wl_proxy_get_version((struct wl_proxy *) zwlr_virtual_pointer_manager_v1), 0, seat, output, NULL);
363 return (struct zwlr_virtual_pointer_v1 *) id;
366#ifdef __cplusplus
368#endif
370#endif