Debian Codegraph @

wayland/qtwayland-dev/5.15.1/QtWaylandClient/private/wayland-touch-extension-client-protocol.h

raw symbols SCIP
1 /* Generated by wayland-scanner 1.16.0 */
2
3 #ifndef TOUCH_EXTENSION_CLIENT_PROTOCOL_H
4 #define TOUCH_EXTENSION_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_touch_extension The touch_extension protocol
16 * @section page_ifaces_touch_extension Interfaces
17 * - @subpage page_iface_qt_touch_extension -
18 * @section page_copyright_touch_extension Copyright
19 * <pre>
20 *
21 * Copyright (C) 2015 The Qt Company Ltd.
22 * Contact: http://www.qt.io/licensing/
23 *
24 * This file is part of the plugins of the Qt Toolkit.
25 *
26 * $QT_BEGIN_LICENSE:BSD$
27 * You may use this file under the terms of the BSD license as follows:
28 *
29 * "Redistribution and use in source and binary forms, with or without
30 * modification, are permitted provided that the following conditions are
31 * met:
32 * * Redistributions of source code must retain the above copyright
33 * notice, this list of conditions and the following disclaimer.
34 * * Redistributions in binary form must reproduce the above copyright
35 * notice, this list of conditions and the following disclaimer in
36 * the documentation and/or other materials provided with the
37 * distribution.
38 * * Neither the name of The Qt Company Ltd nor the names of its
39 * contributors may be used to endorse or promote products derived
40 * from this software without specific prior written permission.
41 *
42 *
43 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
44 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
45 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
46 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
47 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
48 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
49 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
50 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
51 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
52 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
53 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
54 *
55 * $QT_END_LICENSE$
56 * </pre>
57 */
58 struct qt_touch_extension;
59
60 /**
61 * @page page_iface_qt_touch_extension qt_touch_extension
62 * @section page_iface_qt_touch_extension_api API
63 * See @ref iface_qt_touch_extension.
64 */
65 /**
66 * @defgroup iface_qt_touch_extension The qt_touch_extension interface
67 */
68 extern const struct wl_interface qt_touch_extension_interface;
69
70 #ifndef QT_TOUCH_EXTENSION_FLAGS_ENUM
71 #define QT_TOUCH_EXTENSION_FLAGS_ENUM
72 enum qt_touch_extension_flags {
73 QT_TOUCH_EXTENSION_FLAGS_MOUSE_FROM_TOUCH = 0x1,
74 };
75 #endif /* QT_TOUCH_EXTENSION_FLAGS_ENUM */
76
77 /**
78 * @ingroup iface_qt_touch_extension
79 * @struct qt_touch_extension_listener
80 */
81 struct qt_touch_extension_listener {
82 /**
83 */
84 void (*touch)(void *data,
85 struct qt_touch_extension *qt_touch_extension,
86 uint32_t time,
87 uint32_t id,
88 uint32_t state,
89 int32_t x,
90 int32_t y,
91 int32_t normalized_x,
92 int32_t normalized_y,
93 int32_t width,
94 int32_t height,
95 uint32_t pressure,
96 int32_t velocity_x,
97 int32_t velocity_y,
98 uint32_t flags,
99 struct wl_array *rawdata);
100 /**
101 */
102 void (*configure)(void *data,
103 struct qt_touch_extension *qt_touch_extension,
104 uint32_t flags);
105 };
106
107 /**
108 * @ingroup iface_qt_touch_extension
109 */
110 static inline int
111 qt_touch_extension_add_listener(struct qt_touch_extension *qt_touch_extension,
112 const struct qt_touch_extension_listener *listener, void *data)
113 {
114 return wl_proxy_add_listener((struct wl_proxy *) qt_touch_extension,
115 (void (**)(void)) listener, data);
116 }
117
118 #define QT_TOUCH_EXTENSION_DUMMY 0
119
120 /**
121 * @ingroup iface_qt_touch_extension
122 */
123 #define QT_TOUCH_EXTENSION_TOUCH_SINCE_VERSION 1
124 /**
125 * @ingroup iface_qt_touch_extension
126 */
127 #define QT_TOUCH_EXTENSION_CONFIGURE_SINCE_VERSION 1
128
129 /**
130 * @ingroup iface_qt_touch_extension
131 */
132 #define QT_TOUCH_EXTENSION_DUMMY_SINCE_VERSION 1
133
134 /** @ingroup iface_qt_touch_extension */
135 static inline void
136 qt_touch_extension_set_user_data(struct qt_touch_extension *qt_touch_extension, void *user_data)
137 {
138 wl_proxy_set_user_data((struct wl_proxy *) qt_touch_extension, user_data);
139 }
140
141 /** @ingroup iface_qt_touch_extension */
142 static inline void *
143 qt_touch_extension_get_user_data(struct qt_touch_extension *qt_touch_extension)
144 {
145 return wl_proxy_get_user_data((struct wl_proxy *) qt_touch_extension);
146 }
147
148 static inline uint32_t
149 qt_touch_extension_get_version(struct qt_touch_extension *qt_touch_extension)
150 {
151 return wl_proxy_get_version((struct wl_proxy *) qt_touch_extension);
152 }
153
154 /** @ingroup iface_qt_touch_extension */
155 static inline void
156 qt_touch_extension_destroy(struct qt_touch_extension *qt_touch_extension)
157 {
158 wl_proxy_destroy((struct wl_proxy *) qt_touch_extension);
159 }
160
161 /**
162 * @ingroup iface_qt_touch_extension
163 */
164 static inline void
165 qt_touch_extension_dummy(struct qt_touch_extension *qt_touch_extension)
166 {
167 wl_proxy_marshal((struct wl_proxy *) qt_touch_extension,
168 QT_TOUCH_EXTENSION_DUMMY);
169 }
170
171 #ifdef __cplusplus
172 }
173 #endif
174
175 #endif