Debian Codegraph @

wayland/qtwayland-dev/5.11.3/QtWaylandClient/private/wayland-qt-key-unstable-v1-client-protocol.h

raw symbols SCIP
1 /* Generated by wayland-scanner 1.16.0 */
2
3 #ifndef QT_KEY_UNSTABLE_V1_CLIENT_PROTOCOL_H
4 #define QT_KEY_UNSTABLE_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_qt_key_unstable_v1 The qt_key_unstable_v1 protocol
16 * @section page_ifaces_qt_key_unstable_v1 Interfaces
17 * - @subpage page_iface_zqt_key_v1 - send serialized QKeyEvents
18 * @section page_copyright_qt_key_unstable_v1 Copyright
19 * <pre>
20 *
21 * Copyright (C) 2018 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 wl_surface;
59 struct zqt_key_v1;
60
61 /**
62 * @page page_iface_zqt_key_v1 zqt_key_v1
63 * @section page_iface_zqt_key_v1_desc Description
64 *
65 * This protocol is independent of the Wayland seat concept. Its
66 * intention is to let a QKeyEvent be transferred from a Qt compositor
67 * to a Qt client without losing or adding false information by going
68 * through wl_seat and wl_keyboard.
69 *
70 * Note: This protocol is considered private to Qt. We will do our
71 * best to bump version numbers when we make backwards compatible
72 * changes, bump the protocol name and interface suffixes when we make
73 * backwards incompatible changes, but we provide no guarantees. We
74 * may also remove the protocol without warning. Implement this at
75 * your own risk.
76 * @section page_iface_zqt_key_v1_api API
77 * See @ref iface_zqt_key_v1.
78 */
79 /**
80 * @defgroup iface_zqt_key_v1 The zqt_key_v1 interface
81 *
82 * This protocol is independent of the Wayland seat concept. Its
83 * intention is to let a QKeyEvent be transferred from a Qt compositor
84 * to a Qt client without losing or adding false information by going
85 * through wl_seat and wl_keyboard.
86 *
87 * Note: This protocol is considered private to Qt. We will do our
88 * best to bump version numbers when we make backwards compatible
89 * changes, bump the protocol name and interface suffixes when we make
90 * backwards incompatible changes, but we provide no guarantees. We
91 * may also remove the protocol without warning. Implement this at
92 * your own risk.
93 */
94 extern const struct wl_interface zqt_key_v1_interface;
95
96 /**
97 * @ingroup iface_zqt_key_v1
98 * @struct zqt_key_v1_listener
99 */
100 struct zqt_key_v1_listener {
101 /**
102 * send key event
103 *
104 * The key event notifies the client that a QKeyEvent has
105 * occurred on the server side.
106 */
107 void (*key)(void *data,
108 struct zqt_key_v1 *zqt_key_v1,
109 struct wl_surface *surface,
110 uint32_t time,
111 uint32_t type,
112 uint32_t key,
113 uint32_t modifiers,
114 uint32_t nativeScanCode,
115 uint32_t nativeVirtualKey,
116 uint32_t nativeModifiers,
117 const char *text,
118 uint32_t autorepeat,
119 uint32_t count);
120 };
121
122 /**
123 * @ingroup iface_zqt_key_v1
124 */
125 static inline int
126 zqt_key_v1_add_listener(struct zqt_key_v1 *zqt_key_v1,
127 const struct zqt_key_v1_listener *listener, void *data)
128 {
129 return wl_proxy_add_listener((struct wl_proxy *) zqt_key_v1,
130 (void (**)(void)) listener, data);
131 }
132
133 /**
134 * @ingroup iface_zqt_key_v1
135 */
136 #define ZQT_KEY_V1_KEY_SINCE_VERSION 1
137
138
139 /** @ingroup iface_zqt_key_v1 */
140 static inline void
141 zqt_key_v1_set_user_data(struct zqt_key_v1 *zqt_key_v1, void *user_data)
142 {
143 wl_proxy_set_user_data((struct wl_proxy *) zqt_key_v1, user_data);
144 }
145
146 /** @ingroup iface_zqt_key_v1 */
147 static inline void *
148 zqt_key_v1_get_user_data(struct zqt_key_v1 *zqt_key_v1)
149 {
150 return wl_proxy_get_user_data((struct wl_proxy *) zqt_key_v1);
151 }
152
153 static inline uint32_t
154 zqt_key_v1_get_version(struct zqt_key_v1 *zqt_key_v1)
155 {
156 return wl_proxy_get_version((struct wl_proxy *) zqt_key_v1);
157 }
158
159 /** @ingroup iface_zqt_key_v1 */
160 static inline void
161 zqt_key_v1_destroy(struct zqt_key_v1 *zqt_key_v1)
162 {
163 wl_proxy_destroy((struct wl_proxy *) zqt_key_v1);
164 }
165
166 #ifdef __cplusplus
167 }
168 #endif
169
170 #endif