-
Notifications
You must be signed in to change notification settings - Fork 2
/
mouse_wayland_protocol.h
189 lines (162 loc) · 3.93 KB
/
mouse_wayland_protocol.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
/* Generated by wayland-scanner 1.22.0 */
#ifndef WAYLAND_CLIENT_PROTOCOL_H
#define WAYLAND_CLIENT_PROTOCOL_H
#include <stdint.h>
#include <stddef.h>
#include "wayland-client.h"
#ifdef __cplusplus
extern "C" {
#endif
/**
* @page page_wayland The wayland protocol
* @section page_ifaces_wayland Interfaces
* - @subpage page_iface_wl_seat -
*/
struct wl_keyboard;
struct wl_pointer;
struct wl_seat;
struct wl_touch;
#ifndef WL_SEAT_INTERFACE
#define WL_SEAT_INTERFACE
/**
* @page page_iface_wl_seat wl_seat
* @section page_iface_wl_seat_api API
* See @ref iface_wl_seat.
*/
/**
* @defgroup iface_wl_seat The wl_seat interface
*/
extern const struct wl_interface wl_seat_interface;
#endif
#ifndef WL_SEAT_CAPABILITY_ENUM
#define WL_SEAT_CAPABILITY_ENUM
enum wl_seat_capability {
WL_SEAT_CAPABILITY_POINTER = 1,
WL_SEAT_CAPABILITY_KEYBOARD = 2,
WL_SEAT_CAPABILITY_TOUCH = 4,
};
#endif /* WL_SEAT_CAPABILITY_ENUM */
/**
* @ingroup iface_wl_seat
* @struct wl_seat_listener
*/
struct wl_seat_listener {
/**
*/
void (*capabilities)(void *data,
struct wl_seat *wl_seat,
uint32_t capabilities);
/**
* @since 2
*/
void (*name)(void *data,
struct wl_seat *wl_seat,
const char *name);
};
/**
* @ingroup iface_wl_seat
*/
static inline int
wl_seat_add_listener(struct wl_seat *wl_seat,
const struct wl_seat_listener *listener, void *data)
{
return wl_proxy_add_listener((struct wl_proxy *) wl_seat,
(void (**)(void)) listener, data);
}
#define WL_SEAT_GET_POINTER 0
#define WL_SEAT_GET_KEYBOARD 1
#define WL_SEAT_GET_TOUCH 2
#define WL_SEAT_RELEASE 3
/**
* @ingroup iface_wl_seat
*/
#define WL_SEAT_CAPABILITIES_SINCE_VERSION 1
/**
* @ingroup iface_wl_seat
*/
#define WL_SEAT_NAME_SINCE_VERSION 2
/**
* @ingroup iface_wl_seat
*/
#define WL_SEAT_GET_POINTER_SINCE_VERSION 1
/**
* @ingroup iface_wl_seat
*/
#define WL_SEAT_GET_KEYBOARD_SINCE_VERSION 1
/**
* @ingroup iface_wl_seat
*/
#define WL_SEAT_GET_TOUCH_SINCE_VERSION 1
/**
* @ingroup iface_wl_seat
*/
#define WL_SEAT_RELEASE_SINCE_VERSION 5
/** @ingroup iface_wl_seat */
static inline void
wl_seat_set_user_data(struct wl_seat *wl_seat, void *user_data)
{
wl_proxy_set_user_data((struct wl_proxy *) wl_seat, user_data);
}
/** @ingroup iface_wl_seat */
static inline void *
wl_seat_get_user_data(struct wl_seat *wl_seat)
{
return wl_proxy_get_user_data((struct wl_proxy *) wl_seat);
}
static inline uint32_t
wl_seat_get_version(struct wl_seat *wl_seat)
{
return wl_proxy_get_version((struct wl_proxy *) wl_seat);
}
/** @ingroup iface_wl_seat */
static inline void
wl_seat_destroy(struct wl_seat *wl_seat)
{
wl_proxy_destroy((struct wl_proxy *) wl_seat);
}
/**
* @ingroup iface_wl_seat
*/
static inline struct wl_pointer *
wl_seat_get_pointer(struct wl_seat *wl_seat)
{
struct wl_proxy *id;
id = wl_proxy_marshal_flags((struct wl_proxy *) wl_seat,
WL_SEAT_GET_POINTER, &wl_pointer_interface, wl_proxy_get_version((struct wl_proxy *) wl_seat), 0, NULL);
return (struct wl_pointer *) id;
}
/**
* @ingroup iface_wl_seat
*/
static inline struct wl_keyboard *
wl_seat_get_keyboard(struct wl_seat *wl_seat)
{
struct wl_proxy *id;
id = wl_proxy_marshal_flags((struct wl_proxy *) wl_seat,
WL_SEAT_GET_KEYBOARD, &wl_keyboard_interface, wl_proxy_get_version((struct wl_proxy *) wl_seat), 0, NULL);
return (struct wl_keyboard *) id;
}
/**
* @ingroup iface_wl_seat
*/
static inline struct wl_touch *
wl_seat_get_touch(struct wl_seat *wl_seat)
{
struct wl_proxy *id;
id = wl_proxy_marshal_flags((struct wl_proxy *) wl_seat,
WL_SEAT_GET_TOUCH, &wl_touch_interface, wl_proxy_get_version((struct wl_proxy *) wl_seat), 0, NULL);
return (struct wl_touch *) id;
}
/**
* @ingroup iface_wl_seat
*/
static inline void
wl_seat_release(struct wl_seat *wl_seat)
{
wl_proxy_marshal_flags((struct wl_proxy *) wl_seat,
WL_SEAT_RELEASE, NULL, wl_proxy_get_version((struct wl_proxy *) wl_seat), WL_MARSHAL_FLAG_DESTROY);
}
#ifdef __cplusplus
}
#endif
#endif