OLD | NEW |
1 /* Generated by wayland-scanner 1.11.0 */ | 1 /* Generated by wayland-scanner 1.11.0 */ |
2 | 2 |
3 #ifndef ALPHA_COMPOSITING_UNSTABLE_V1_CLIENT_PROTOCOL_H | 3 #ifndef ALPHA_COMPOSITING_UNSTABLE_V1_CLIENT_PROTOCOL_H |
4 #define ALPHA_COMPOSITING_UNSTABLE_V1_CLIENT_PROTOCOL_H | 4 #define ALPHA_COMPOSITING_UNSTABLE_V1_CLIENT_PROTOCOL_H |
5 | 5 |
6 #include <stdint.h> | 6 #include <stdint.h> |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 #include "wayland-client.h" | 8 #include "wayland-client.h" |
9 | 9 |
10 #ifdef __cplusplus | 10 #ifdef __cplusplus |
(...skipping 14 matching lines...) Expand all Loading... |
25 * together with the corresponding interface version bump. Backward | 25 * together with the corresponding interface version bump. Backward |
26 * incompatible changes are done by bumping the version number in the protocol | 26 * incompatible changes are done by bumping the version number in the protocol |
27 * and interface names and resetting the interface version. Once the protocol | 27 * and interface names and resetting the interface version. Once the protocol |
28 * is to be declared stable, the 'z' prefix and the version number in the | 28 * is to be declared stable, the 'z' prefix and the version number in the |
29 * protocol and interface names are removed and the interface version number is | 29 * protocol and interface names are removed and the interface version number is |
30 * reset. | 30 * reset. |
31 * | 31 * |
32 * @section page_ifaces_alpha_compositing_unstable_v1 Interfaces | 32 * @section page_ifaces_alpha_compositing_unstable_v1 Interfaces |
33 * - @subpage page_iface_zcr_alpha_compositing_v1 - alpha_compositing | 33 * - @subpage page_iface_zcr_alpha_compositing_v1 - alpha_compositing |
34 * - @subpage page_iface_zcr_blending_v1 - blending interface to a wl_surface | 34 * - @subpage page_iface_zcr_blending_v1 - blending interface to a wl_surface |
35 * - @subpage page_iface_zwp_alpha_compositing_v1 - DEPRECATED | |
36 * - @subpage page_iface_zwp_blending_v1 - DEPRECATED | |
37 * @section page_copyright_alpha_compositing_unstable_v1 Copyright | 35 * @section page_copyright_alpha_compositing_unstable_v1 Copyright |
38 * <pre> | 36 * <pre> |
39 * | 37 * |
40 * Copyright 2016 The Chromium Authors. | 38 * Copyright 2016 The Chromium Authors. |
41 * | 39 * |
42 * Permission is hereby granted, free of charge, to any person obtaining a | 40 * Permission is hereby granted, free of charge, to any person obtaining a |
43 * copy of this software and associated documentation files (the "Software"), | 41 * copy of this software and associated documentation files (the "Software"), |
44 * to deal in the Software without restriction, including without limitation | 42 * to deal in the Software without restriction, including without limitation |
45 * the rights to use, copy, modify, merge, publish, distribute, sublicense, | 43 * the rights to use, copy, modify, merge, publish, distribute, sublicense, |
46 * and/or sell copies of the Software, and to permit persons to whom the | 44 * and/or sell copies of the Software, and to permit persons to whom the |
47 * Software is furnished to do so, subject to the following conditions: | 45 * Software is furnished to do so, subject to the following conditions: |
48 * | 46 * |
49 * The above copyright notice and this permission notice (including the next | 47 * The above copyright notice and this permission notice (including the next |
50 * paragraph) shall be included in all copies or substantial portions of the | 48 * paragraph) shall be included in all copies or substantial portions of the |
51 * Software. | 49 * Software. |
52 * | 50 * |
53 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | 51 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
54 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | 52 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
55 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL | 53 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL |
56 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | 54 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER |
57 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING | 55 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING |
58 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER | 56 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER |
59 * DEALINGS IN THE SOFTWARE. | 57 * DEALINGS IN THE SOFTWARE. |
60 * </pre> | 58 * </pre> |
61 */ | 59 */ |
62 struct wl_surface; | 60 struct wl_surface; |
63 struct zcr_alpha_compositing_v1; | 61 struct zcr_alpha_compositing_v1; |
64 struct zcr_blending_v1; | 62 struct zcr_blending_v1; |
65 struct zwp_alpha_compositing_v1; | |
66 struct zwp_blending_v1; | |
67 | 63 |
68 /** | 64 /** |
69 * @page page_iface_zcr_alpha_compositing_v1 zcr_alpha_compositing_v1 | 65 * @page page_iface_zcr_alpha_compositing_v1 zcr_alpha_compositing_v1 |
70 * @section page_iface_zcr_alpha_compositing_v1_desc Description | 66 * @section page_iface_zcr_alpha_compositing_v1_desc Description |
71 * | 67 * |
72 * The global interface exposing compositing and blending capabilities is | 68 * The global interface exposing compositing and blending capabilities is |
73 * used to instantiate an interface extension for a wl_surface object. | 69 * used to instantiate an interface extension for a wl_surface object. |
74 * This extended interface will then allow the client to specify the | 70 * This extended interface will then allow the client to specify the |
75 * blending equation and alpha value used for compositing the wl_surface. | 71 * blending equation and alpha value used for compositing the wl_surface. |
76 * @section page_iface_zcr_alpha_compositing_v1_api API | 72 * @section page_iface_zcr_alpha_compositing_v1_api API |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
110 * an alpha value applied to the whole surface. | 106 * an alpha value applied to the whole surface. |
111 * | 107 * |
112 * If the wl_surface associated with the bledning object is destroyed, | 108 * If the wl_surface associated with the bledning object is destroyed, |
113 * the blending object becomes inert. | 109 * the blending object becomes inert. |
114 * | 110 * |
115 * If the blending object is destroyed, the blending state is removed | 111 * If the blending object is destroyed, the blending state is removed |
116 * from the wl_surface. The change will be applied on the next | 112 * from the wl_surface. The change will be applied on the next |
117 * wl_surface.commit. | 113 * wl_surface.commit. |
118 */ | 114 */ |
119 extern const struct wl_interface zcr_blending_v1_interface; | 115 extern const struct wl_interface zcr_blending_v1_interface; |
120 /** | |
121 * @page page_iface_zwp_alpha_compositing_v1 zwp_alpha_compositing_v1 | |
122 * @section page_iface_zwp_alpha_compositing_v1_desc Description | |
123 * | |
124 * The global interface exposing compositing and blending capabilities is | |
125 * used to instantiate an interface extension for a wl_surface object. | |
126 * This extended interface will then allow the client to specify the | |
127 * blending equation and alpha value used for compositing the wl_surface. | |
128 * @section page_iface_zwp_alpha_compositing_v1_api API | |
129 * See @ref iface_zwp_alpha_compositing_v1. | |
130 */ | |
131 /** | |
132 * @defgroup iface_zwp_alpha_compositing_v1 The zwp_alpha_compositing_v1 interfa
ce | |
133 * | |
134 * The global interface exposing compositing and blending capabilities is | |
135 * used to instantiate an interface extension for a wl_surface object. | |
136 * This extended interface will then allow the client to specify the | |
137 * blending equation and alpha value used for compositing the wl_surface. | |
138 */ | |
139 extern const struct wl_interface zwp_alpha_compositing_v1_interface; | |
140 /** | |
141 * @page page_iface_zwp_blending_v1 zwp_blending_v1 | |
142 * @section page_iface_zwp_blending_v1_desc Description | |
143 * | |
144 * An additional interface to a wl_surface object, which allows the | |
145 * client to specify the blending equation used for compositing and | |
146 * an alpha value applied to the whole surface. | |
147 * | |
148 * If the wl_surface associated with the bledning object is destroyed, | |
149 * the blending object becomes inert. | |
150 * | |
151 * If the blending object is destroyed, the blending state is removed | |
152 * from the wl_surface. The change will be applied on the next | |
153 * wl_surface.commit. | |
154 * @section page_iface_zwp_blending_v1_api API | |
155 * See @ref iface_zwp_blending_v1. | |
156 */ | |
157 /** | |
158 * @defgroup iface_zwp_blending_v1 The zwp_blending_v1 interface | |
159 * | |
160 * An additional interface to a wl_surface object, which allows the | |
161 * client to specify the blending equation used for compositing and | |
162 * an alpha value applied to the whole surface. | |
163 * | |
164 * If the wl_surface associated with the bledning object is destroyed, | |
165 * the blending object becomes inert. | |
166 * | |
167 * If the blending object is destroyed, the blending state is removed | |
168 * from the wl_surface. The change will be applied on the next | |
169 * wl_surface.commit. | |
170 */ | |
171 extern const struct wl_interface zwp_blending_v1_interface; | |
172 | 116 |
173 #ifndef ZCR_ALPHA_COMPOSITING_V1_ERROR_ENUM | 117 #ifndef ZCR_ALPHA_COMPOSITING_V1_ERROR_ENUM |
174 #define ZCR_ALPHA_COMPOSITING_V1_ERROR_ENUM | 118 #define ZCR_ALPHA_COMPOSITING_V1_ERROR_ENUM |
175 enum zcr_alpha_compositing_v1_error { | 119 enum zcr_alpha_compositing_v1_error { |
176 /** | 120 /** |
177 * the surface already has a blending object associated | 121 * the surface already has a blending object associated |
178 */ | 122 */ |
179 ZCR_ALPHA_COMPOSITING_V1_ERROR_BLENDING_EXISTS = 0, | 123 ZCR_ALPHA_COMPOSITING_V1_ERROR_BLENDING_EXISTS = 0, |
180 }; | 124 }; |
181 #endif /* ZCR_ALPHA_COMPOSITING_V1_ERROR_ENUM */ | 125 #endif /* ZCR_ALPHA_COMPOSITING_V1_ERROR_ENUM */ |
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
348 * The alpha value state is double-buffered state, | 292 * The alpha value state is double-buffered state, |
349 * and will be applied on the next wl_surface.commit. | 293 * and will be applied on the next wl_surface.commit. |
350 */ | 294 */ |
351 static inline void | 295 static inline void |
352 zcr_blending_v1_set_alpha(struct zcr_blending_v1 *zcr_blending_v1, wl_fixed_t va
lue) | 296 zcr_blending_v1_set_alpha(struct zcr_blending_v1 *zcr_blending_v1, wl_fixed_t va
lue) |
353 { | 297 { |
354 wl_proxy_marshal((struct wl_proxy *) zcr_blending_v1, | 298 wl_proxy_marshal((struct wl_proxy *) zcr_blending_v1, |
355 ZCR_BLENDING_V1_SET_ALPHA, value); | 299 ZCR_BLENDING_V1_SET_ALPHA, value); |
356 } | 300 } |
357 | 301 |
358 #ifndef ZWP_ALPHA_COMPOSITING_V1_ERROR_ENUM | |
359 #define ZWP_ALPHA_COMPOSITING_V1_ERROR_ENUM | |
360 enum zwp_alpha_compositing_v1_error { | |
361 /** | |
362 * the surface already has a blending object associated | |
363 */ | |
364 ZWP_ALPHA_COMPOSITING_V1_ERROR_BLENDING_EXISTS = 0, | |
365 }; | |
366 #endif /* ZWP_ALPHA_COMPOSITING_V1_ERROR_ENUM */ | |
367 | |
368 #define ZWP_ALPHA_COMPOSITING_V1_DESTROY 0 | |
369 #define ZWP_ALPHA_COMPOSITING_V1_GET_BLENDING 1 | |
370 | |
371 /** | |
372 * @ingroup iface_zwp_alpha_compositing_v1 | |
373 */ | |
374 #define ZWP_ALPHA_COMPOSITING_V1_DESTROY_SINCE_VERSION 1 | |
375 /** | |
376 * @ingroup iface_zwp_alpha_compositing_v1 | |
377 */ | |
378 #define ZWP_ALPHA_COMPOSITING_V1_GET_BLENDING_SINCE_VERSION 1 | |
379 | |
380 /** @ingroup iface_zwp_alpha_compositing_v1 */ | |
381 static inline void | |
382 zwp_alpha_compositing_v1_set_user_data(struct zwp_alpha_compositing_v1 *zwp_alph
a_compositing_v1, void *user_data) | |
383 { | |
384 wl_proxy_set_user_data((struct wl_proxy *) zwp_alpha_compositing_v1, use
r_data); | |
385 } | |
386 | |
387 /** @ingroup iface_zwp_alpha_compositing_v1 */ | |
388 static inline void * | |
389 zwp_alpha_compositing_v1_get_user_data(struct zwp_alpha_compositing_v1 *zwp_alph
a_compositing_v1) | |
390 { | |
391 return wl_proxy_get_user_data((struct wl_proxy *) zwp_alpha_compositing_
v1); | |
392 } | |
393 | |
394 static inline uint32_t | |
395 zwp_alpha_compositing_v1_get_version(struct zwp_alpha_compositing_v1 *zwp_alpha_
compositing_v1) | |
396 { | |
397 return wl_proxy_get_version((struct wl_proxy *) zwp_alpha_compositing_v1
); | |
398 } | |
399 | |
400 /** | |
401 * @ingroup iface_zwp_alpha_compositing_v1 | |
402 * | |
403 * Informs the server that the client will not be using this | |
404 * protocol object anymore. This does not affect any other objects, | |
405 * blending objects included. | |
406 */ | |
407 static inline void | |
408 zwp_alpha_compositing_v1_destroy(struct zwp_alpha_compositing_v1 *zwp_alpha_comp
ositing_v1) | |
409 { | |
410 wl_proxy_marshal((struct wl_proxy *) zwp_alpha_compositing_v1, | |
411 ZWP_ALPHA_COMPOSITING_V1_DESTROY); | |
412 | |
413 wl_proxy_destroy((struct wl_proxy *) zwp_alpha_compositing_v1); | |
414 } | |
415 | |
416 /** | |
417 * @ingroup iface_zwp_alpha_compositing_v1 | |
418 * | |
419 * Instantiate an interface extension for the given wl_surface to | |
420 * provide surface blending. If the given wl_surface already has | |
421 * a blending object associated, the blending_exists protocol error | |
422 * is raised. | |
423 */ | |
424 static inline struct zwp_blending_v1 * | |
425 zwp_alpha_compositing_v1_get_blending(struct zwp_alpha_compositing_v1 *zwp_alpha
_compositing_v1, struct wl_surface *surface) | |
426 { | |
427 struct wl_proxy *id; | |
428 | |
429 id = wl_proxy_marshal_constructor((struct wl_proxy *) zwp_alpha_composit
ing_v1, | |
430 ZWP_ALPHA_COMPOSITING_V1_GET_BLENDING, &zwp_blending_v1
_interface, NULL, surface); | |
431 | |
432 return (struct zwp_blending_v1 *) id; | |
433 } | |
434 | |
435 #ifndef ZWP_BLENDING_V1_BLENDING_EQUATION_ENUM | |
436 #define ZWP_BLENDING_V1_BLENDING_EQUATION_ENUM | |
437 /** | |
438 * @ingroup iface_zwp_blending_v1 | |
439 * different blending equations for compositing | |
440 * | |
441 * Blending equations that can be used when compositing a surface. | |
442 */ | |
443 enum zwp_blending_v1_blending_equation { | |
444 /** | |
445 * no blending | |
446 */ | |
447 ZWP_BLENDING_V1_BLENDING_EQUATION_NONE = 0, | |
448 /** | |
449 * one / one_minus_src_alpha | |
450 */ | |
451 ZWP_BLENDING_V1_BLENDING_EQUATION_PREMULT = 1, | |
452 /** | |
453 * src_alpha / one_minus_src_alpha | |
454 */ | |
455 ZWP_BLENDING_V1_BLENDING_EQUATION_COVERAGE = 2, | |
456 }; | |
457 #endif /* ZWP_BLENDING_V1_BLENDING_EQUATION_ENUM */ | |
458 | |
459 #define ZWP_BLENDING_V1_DESTROY 0 | |
460 #define ZWP_BLENDING_V1_SET_BLENDING 1 | |
461 #define ZWP_BLENDING_V1_SET_ALPHA 2 | |
462 | |
463 /** | |
464 * @ingroup iface_zwp_blending_v1 | |
465 */ | |
466 #define ZWP_BLENDING_V1_DESTROY_SINCE_VERSION 1 | |
467 /** | |
468 * @ingroup iface_zwp_blending_v1 | |
469 */ | |
470 #define ZWP_BLENDING_V1_SET_BLENDING_SINCE_VERSION 1 | |
471 /** | |
472 * @ingroup iface_zwp_blending_v1 | |
473 */ | |
474 #define ZWP_BLENDING_V1_SET_ALPHA_SINCE_VERSION 1 | |
475 | |
476 /** @ingroup iface_zwp_blending_v1 */ | |
477 static inline void | |
478 zwp_blending_v1_set_user_data(struct zwp_blending_v1 *zwp_blending_v1, void *use
r_data) | |
479 { | |
480 wl_proxy_set_user_data((struct wl_proxy *) zwp_blending_v1, user_data); | |
481 } | |
482 | |
483 /** @ingroup iface_zwp_blending_v1 */ | |
484 static inline void * | |
485 zwp_blending_v1_get_user_data(struct zwp_blending_v1 *zwp_blending_v1) | |
486 { | |
487 return wl_proxy_get_user_data((struct wl_proxy *) zwp_blending_v1); | |
488 } | |
489 | |
490 static inline uint32_t | |
491 zwp_blending_v1_get_version(struct zwp_blending_v1 *zwp_blending_v1) | |
492 { | |
493 return wl_proxy_get_version((struct wl_proxy *) zwp_blending_v1); | |
494 } | |
495 | |
496 /** | |
497 * @ingroup iface_zwp_blending_v1 | |
498 * | |
499 * The associated wl_surface's blending state is removed. | |
500 * The change is applied on the next wl_surface.commit. | |
501 */ | |
502 static inline void | |
503 zwp_blending_v1_destroy(struct zwp_blending_v1 *zwp_blending_v1) | |
504 { | |
505 wl_proxy_marshal((struct wl_proxy *) zwp_blending_v1, | |
506 ZWP_BLENDING_V1_DESTROY); | |
507 | |
508 wl_proxy_destroy((struct wl_proxy *) zwp_blending_v1); | |
509 } | |
510 | |
511 /** | |
512 * @ingroup iface_zwp_blending_v1 | |
513 * | |
514 * Set the blending equation for compositing the wl_surface. | |
515 * See wp_alpha_compositing for the description. | |
516 * | |
517 * The blending equation state is double-buffered state, | |
518 * and will be applied on the next wl_surface.commit. | |
519 */ | |
520 static inline void | |
521 zwp_blending_v1_set_blending(struct zwp_blending_v1 *zwp_blending_v1, uint32_t e
quation) | |
522 { | |
523 wl_proxy_marshal((struct wl_proxy *) zwp_blending_v1, | |
524 ZWP_BLENDING_V1_SET_BLENDING, equation); | |
525 } | |
526 | |
527 /** | |
528 * @ingroup iface_zwp_blending_v1 | |
529 * | |
530 * Set the alpha value applied to the whole surface for compositing. | |
531 * See wp_alpha_compositing for the description. | |
532 * | |
533 * The alpha value state is double-buffered state, | |
534 * and will be applied on the next wl_surface.commit. | |
535 */ | |
536 static inline void | |
537 zwp_blending_v1_set_alpha(struct zwp_blending_v1 *zwp_blending_v1, wl_fixed_t va
lue) | |
538 { | |
539 wl_proxy_marshal((struct wl_proxy *) zwp_blending_v1, | |
540 ZWP_BLENDING_V1_SET_ALPHA, value); | |
541 } | |
542 | |
543 #ifdef __cplusplus | 302 #ifdef __cplusplus |
544 } | 303 } |
545 #endif | 304 #endif |
546 | 305 |
547 #endif | 306 #endif |
OLD | NEW |