| 1 |
|
| 2 |
|
| 3 |
#ifndef SURFACE_EXTENSION_CLIENT_PROTOCOL_H |
| 4 |
#define SURFACE_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 |
|
| 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 |
struct qt_extended_surface; |
| 60 |
struct qt_surface_extension; |
| 61 |
struct wl_surface; |
| 62 |
|
| 63 |
|
| 64 |
|
| 65 |
|
| 66 |
|
| 67 |
|
| 68 |
|
| 69 |
|
| 70 |
|
| 71 |
extern const struct wl_interface qt_surface_extension_interface; |
| 72 |
|
| 73 |
|
| 74 |
|
| 75 |
|
| 76 |
|
| 77 |
|
| 78 |
|
| 79 |
|
| 80 |
extern const struct wl_interface qt_extended_surface_interface; |
| 81 |
|
| 82 |
#define QT_SURFACE_EXTENSION_GET_EXTENDED_SURFACE 0 |
| 83 |
|
| 84 |
|
| 85 |
|
| 86 |
|
| 87 |
|
| 88 |
#define QT_SURFACE_EXTENSION_GET_EXTENDED_SURFACE_SINCE_VERSION 1 |
| 89 |
|
| 90 |
|
| 91 |
static inline void |
| 92 |
qt_surface_extension_set_user_data(struct qt_surface_extension *qt_surface_extension, void *user_data) |
| 93 |
{ |
| 94 |
wl_proxy_set_user_data((struct wl_proxy *) qt_surface_extension, user_data); |
| 95 |
} |
| 96 |
|
| 97 |
|
| 98 |
static inline void * |
| 99 |
qt_surface_extension_get_user_data(struct qt_surface_extension *qt_surface_extension) |
| 100 |
{ |
| 101 |
return wl_proxy_get_user_data((struct wl_proxy *) qt_surface_extension); |
| 102 |
} |
| 103 |
|
| 104 |
static inline uint32_t |
| 105 |
qt_surface_extension_get_version(struct qt_surface_extension *qt_surface_extension) |
| 106 |
{ |
| 107 |
return wl_proxy_get_version((struct wl_proxy *) qt_surface_extension); |
| 108 |
} |
| 109 |
|
| 110 |
|
| 111 |
static inline void |
| 112 |
qt_surface_extension_destroy(struct qt_surface_extension *qt_surface_extension) |
| 113 |
{ |
| 114 |
wl_proxy_destroy((struct wl_proxy *) qt_surface_extension); |
| 115 |
} |
| 116 |
|
| 117 |
|
| 118 |
|
| 119 |
|
| 120 |
static inline struct qt_extended_surface * |
| 121 |
qt_surface_extension_get_extended_surface(struct qt_surface_extension *qt_surface_extension, struct wl_surface *surface) |
| 122 |
{ |
| 123 |
struct wl_proxy *id; |
| 124 |
|
| 125 |
id = wl_proxy_marshal_constructor((struct wl_proxy *) qt_surface_extension, |
| 126 |
QT_SURFACE_EXTENSION_GET_EXTENDED_SURFACE, &qt_extended_surface_interface, NULL, surface); |
| 127 |
|
| 128 |
return (struct qt_extended_surface *) id; |
| 129 |
} |
| 130 |
|
| 131 |
#ifndef QT_EXTENDED_SURFACE_ORIENTATION_ENUM |
| 132 |
#define QT_EXTENDED_SURFACE_ORIENTATION_ENUM |
| 133 |
enum qt_extended_surface_orientation { |
| 134 |
QT_EXTENDED_SURFACE_ORIENTATION_PRIMARYORIENTATION = 0, |
| 135 |
QT_EXTENDED_SURFACE_ORIENTATION_PORTRAITORIENTATION = 1, |
| 136 |
QT_EXTENDED_SURFACE_ORIENTATION_LANDSCAPEORIENTATION = 2, |
| 137 |
QT_EXTENDED_SURFACE_ORIENTATION_INVERTEDPORTRAITORIENTATION = 4, |
| 138 |
QT_EXTENDED_SURFACE_ORIENTATION_INVERTEDLANDSCAPEORIENTATION = 8, |
| 139 |
}; |
| 140 |
#endif |
| 141 |
|
| 142 |
#ifndef QT_EXTENDED_SURFACE_WINDOWFLAG_ENUM |
| 143 |
#define QT_EXTENDED_SURFACE_WINDOWFLAG_ENUM |
| 144 |
enum qt_extended_surface_windowflag { |
| 145 |
QT_EXTENDED_SURFACE_WINDOWFLAG_OVERRIDESSYSTEMGESTURES = 1, |
| 146 |
QT_EXTENDED_SURFACE_WINDOWFLAG_STAYSONTOP = 2, |
| 147 |
QT_EXTENDED_SURFACE_WINDOWFLAG_BYPASSWINDOWMANAGER = 4, |
| 148 |
}; |
| 149 |
#endif |
| 150 |
|
| 151 |
|
| 152 |
|
| 153 |
|
| 154 |
|
| 155 |
struct qt_extended_surface_listener { |
| 156 |
|
| 157 |
|
| 158 |
void (*onscreen_visibility)(void *data, |
| 159 |
struct qt_extended_surface *qt_extended_surface, |
| 160 |
int32_t visible); |
| 161 |
|
| 162 |
|
| 163 |
void (*set_generic_property)(void *data, |
| 164 |
struct qt_extended_surface *qt_extended_surface, |
| 165 |
const char *name, |
| 166 |
struct wl_array *value); |
| 167 |
|
| 168 |
|
| 169 |
void (*close)(void *data, |
| 170 |
struct qt_extended_surface *qt_extended_surface); |
| 171 |
}; |
| 172 |
|
| 173 |
|
| 174 |
|
| 175 |
|
| 176 |
static inline int |
| 177 |
qt_extended_surface_add_listener(struct qt_extended_surface *qt_extended_surface, |
| 178 |
const struct qt_extended_surface_listener *listener, void *data) |
| 179 |
{ |
| 180 |
return wl_proxy_add_listener((struct wl_proxy *) qt_extended_surface, |
| 181 |
(void (**)(void)) listener, data); |
| 182 |
} |
| 183 |
|
| 184 |
#define QT_EXTENDED_SURFACE_UPDATE_GENERIC_PROPERTY 0 |
| 185 |
#define QT_EXTENDED_SURFACE_SET_CONTENT_ORIENTATION_MASK 1 |
| 186 |
#define QT_EXTENDED_SURFACE_SET_WINDOW_FLAGS 2 |
| 187 |
#define QT_EXTENDED_SURFACE_RAISE 3 |
| 188 |
#define QT_EXTENDED_SURFACE_LOWER 4 |
| 189 |
|
| 190 |
|
| 191 |
|
| 192 |
|
| 193 |
#define QT_EXTENDED_SURFACE_ONSCREEN_VISIBILITY_SINCE_VERSION 1 |
| 194 |
|
| 195 |
|
| 196 |
|
| 197 |
#define QT_EXTENDED_SURFACE_SET_GENERIC_PROPERTY_SINCE_VERSION 1 |
| 198 |
|
| 199 |
|
| 200 |
|
| 201 |
#define QT_EXTENDED_SURFACE_CLOSE_SINCE_VERSION 1 |
| 202 |
|
| 203 |
|
| 204 |
|
| 205 |
|
| 206 |
#define QT_EXTENDED_SURFACE_UPDATE_GENERIC_PROPERTY_SINCE_VERSION 1 |
| 207 |
|
| 208 |
|
| 209 |
|
| 210 |
#define QT_EXTENDED_SURFACE_SET_CONTENT_ORIENTATION_MASK_SINCE_VERSION 1 |
| 211 |
|
| 212 |
|
| 213 |
|
| 214 |
#define QT_EXTENDED_SURFACE_SET_WINDOW_FLAGS_SINCE_VERSION 1 |
| 215 |
|
| 216 |
|
| 217 |
|
| 218 |
#define QT_EXTENDED_SURFACE_RAISE_SINCE_VERSION 1 |
| 219 |
|
| 220 |
|
| 221 |
|
| 222 |
#define QT_EXTENDED_SURFACE_LOWER_SINCE_VERSION 1 |
| 223 |
|
| 224 |
|
| 225 |
static inline void |
| 226 |
qt_extended_surface_set_user_data(struct qt_extended_surface *qt_extended_surface, void *user_data) |
| 227 |
{ |
| 228 |
wl_proxy_set_user_data((struct wl_proxy *) qt_extended_surface, user_data); |
| 229 |
} |
| 230 |
|
| 231 |
|
| 232 |
static inline void * |
| 233 |
qt_extended_surface_get_user_data(struct qt_extended_surface *qt_extended_surface) |
| 234 |
{ |
| 235 |
return wl_proxy_get_user_data((struct wl_proxy *) qt_extended_surface); |
| 236 |
} |
| 237 |
|
| 238 |
static inline uint32_t |
| 239 |
qt_extended_surface_get_version(struct qt_extended_surface *qt_extended_surface) |
| 240 |
{ |
| 241 |
return wl_proxy_get_version((struct wl_proxy *) qt_extended_surface); |
| 242 |
} |
| 243 |
|
| 244 |
|
| 245 |
static inline void |
| 246 |
qt_extended_surface_destroy(struct qt_extended_surface *qt_extended_surface) |
| 247 |
{ |
| 248 |
wl_proxy_destroy((struct wl_proxy *) qt_extended_surface); |
| 249 |
} |
| 250 |
|
| 251 |
|
| 252 |
|
| 253 |
|
| 254 |
static inline void |
| 255 |
qt_extended_surface_update_generic_property(struct qt_extended_surface *qt_extended_surface, const char *name, struct wl_array *value) |
| 256 |
{ |
| 257 |
wl_proxy_marshal((struct wl_proxy *) qt_extended_surface, |
| 258 |
QT_EXTENDED_SURFACE_UPDATE_GENERIC_PROPERTY, name, value); |
| 259 |
} |
| 260 |
|
| 261 |
|
| 262 |
|
| 263 |
|
| 264 |
static inline void |
| 265 |
qt_extended_surface_set_content_orientation_mask(struct qt_extended_surface *qt_extended_surface, int32_t orientation) |
| 266 |
{ |
| 267 |
wl_proxy_marshal((struct wl_proxy *) qt_extended_surface, |
| 268 |
QT_EXTENDED_SURFACE_SET_CONTENT_ORIENTATION_MASK, orientation); |
| 269 |
} |
| 270 |
|
| 271 |
|
| 272 |
|
| 273 |
|
| 274 |
static inline void |
| 275 |
qt_extended_surface_set_window_flags(struct qt_extended_surface *qt_extended_surface, int32_t flags) |
| 276 |
{ |
| 277 |
wl_proxy_marshal((struct wl_proxy *) qt_extended_surface, |
| 278 |
QT_EXTENDED_SURFACE_SET_WINDOW_FLAGS, flags); |
| 279 |
} |
| 280 |
|
| 281 |
|
| 282 |
|
| 283 |
|
| 284 |
static inline void |
| 285 |
qt_extended_surface_raise(struct qt_extended_surface *qt_extended_surface) |
| 286 |
{ |
| 287 |
wl_proxy_marshal((struct wl_proxy *) qt_extended_surface, |
| 288 |
QT_EXTENDED_SURFACE_RAISE); |
| 289 |
} |
| 290 |
|
| 291 |
|
| 292 |
|
| 293 |
|
| 294 |
static inline void |
| 295 |
qt_extended_surface_lower(struct qt_extended_surface *qt_extended_surface) |
| 296 |
{ |
| 297 |
wl_proxy_marshal((struct wl_proxy *) qt_extended_surface, |
| 298 |
QT_EXTENDED_SURFACE_LOWER); |
| 299 |
} |
| 300 |
|
| 301 |
#ifdef __cplusplus |
| 302 |
} |
| 303 |
#endif |
| 304 |
|
| 305 |
#endif |