Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3)

Side by Side Diff: third_party/wayland-protocols/include/protocol/alpha-compositing-unstable-v1-client-protocol.h

Issue 2350633002: third_party: Switch to zcr prefix for downstream wayland interfaces. (Closed)
Patch Set: Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 12 matching lines...) Expand all
23 * Warning! The protocol described in this file is experimental and backward 23 * Warning! The protocol described in this file is experimental and backward
24 * incompatible changes may be made. Backward compatible changes may be added 24 * incompatible changes may be made. Backward compatible changes may be added
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_zwp_alpha_compositing_v1 - alpha_compositing 33 * - @subpage page_iface_zcr_alpha_compositing_v1 - alpha_compositing
34 * - @subpage page_iface_zwp_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
35 * @section page_copyright_alpha_compositing_unstable_v1 Copyright 37 * @section page_copyright_alpha_compositing_unstable_v1 Copyright
36 * <pre> 38 * <pre>
37 * 39 *
38 * Copyright 2016 The Chromium Authors. 40 * Copyright 2016 The Chromium Authors.
39 * 41 *
40 * Permission is hereby granted, free of charge, to any person obtaining a 42 * Permission is hereby granted, free of charge, to any person obtaining a
41 * copy of this software and associated documentation files (the "Software"), 43 * copy of this software and associated documentation files (the "Software"),
42 * to deal in the Software without restriction, including without limitation 44 * to deal in the Software without restriction, including without limitation
43 * the rights to use, copy, modify, merge, publish, distribute, sublicense, 45 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
44 * and/or sell copies of the Software, and to permit persons to whom the 46 * and/or sell copies of the Software, and to permit persons to whom the
45 * Software is furnished to do so, subject to the following conditions: 47 * Software is furnished to do so, subject to the following conditions:
46 * 48 *
47 * The above copyright notice and this permission notice (including the next 49 * The above copyright notice and this permission notice (including the next
48 * paragraph) shall be included in all copies or substantial portions of the 50 * paragraph) shall be included in all copies or substantial portions of the
49 * Software. 51 * Software.
50 * 52 *
51 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 53 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
52 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 54 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
53 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 55 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
54 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 56 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
55 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 57 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
56 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 58 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
57 * DEALINGS IN THE SOFTWARE. 59 * DEALINGS IN THE SOFTWARE.
58 * </pre> 60 * </pre>
59 */ 61 */
60 struct wl_surface; 62 struct wl_surface;
63 struct zcr_alpha_compositing_v1;
64 struct zcr_blending_v1;
61 struct zwp_alpha_compositing_v1; 65 struct zwp_alpha_compositing_v1;
62 struct zwp_blending_v1; 66 struct zwp_blending_v1;
63 67
64 /** 68 /**
69 * @page page_iface_zcr_alpha_compositing_v1 zcr_alpha_compositing_v1
70 * @section page_iface_zcr_alpha_compositing_v1_desc Description
71 *
72 * The global interface exposing compositing and blending capabilities is
73 * used to instantiate an interface extension for a wl_surface object.
74 * This extended interface will then allow the client to specify the
75 * blending equation and alpha value used for compositing the wl_surface.
76 * @section page_iface_zcr_alpha_compositing_v1_api API
77 * See @ref iface_zcr_alpha_compositing_v1.
78 */
79 /**
80 * @defgroup iface_zcr_alpha_compositing_v1 The zcr_alpha_compositing_v1 interfa ce
81 *
82 * The global interface exposing compositing and blending capabilities is
83 * used to instantiate an interface extension for a wl_surface object.
84 * This extended interface will then allow the client to specify the
85 * blending equation and alpha value used for compositing the wl_surface.
86 */
87 extern const struct wl_interface zcr_alpha_compositing_v1_interface;
88 /**
89 * @page page_iface_zcr_blending_v1 zcr_blending_v1
90 * @section page_iface_zcr_blending_v1_desc Description
91 *
92 * An additional interface to a wl_surface object, which allows the
93 * client to specify the blending equation used for compositing and
94 * an alpha value applied to the whole surface.
95 *
96 * If the wl_surface associated with the bledning object is destroyed,
97 * the blending object becomes inert.
98 *
99 * If the blending object is destroyed, the blending state is removed
100 * from the wl_surface. The change will be applied on the next
101 * wl_surface.commit.
102 * @section page_iface_zcr_blending_v1_api API
103 * See @ref iface_zcr_blending_v1.
104 */
105 /**
106 * @defgroup iface_zcr_blending_v1 The zcr_blending_v1 interface
107 *
108 * An additional interface to a wl_surface object, which allows the
109 * client to specify the blending equation used for compositing and
110 * an alpha value applied to the whole surface.
111 *
112 * If the wl_surface associated with the bledning object is destroyed,
113 * the blending object becomes inert.
114 *
115 * If the blending object is destroyed, the blending state is removed
116 * from the wl_surface. The change will be applied on the next
117 * wl_surface.commit.
118 */
119 extern const struct wl_interface zcr_blending_v1_interface;
120 /**
65 * @page page_iface_zwp_alpha_compositing_v1 zwp_alpha_compositing_v1 121 * @page page_iface_zwp_alpha_compositing_v1 zwp_alpha_compositing_v1
66 * @section page_iface_zwp_alpha_compositing_v1_desc Description 122 * @section page_iface_zwp_alpha_compositing_v1_desc Description
67 * 123 *
68 * The global interface exposing compositing and blending capabilities is 124 * The global interface exposing compositing and blending capabilities is
69 * used to instantiate an interface extension for a wl_surface object. 125 * used to instantiate an interface extension for a wl_surface object.
70 * This extended interface will then allow the client to specify the 126 * This extended interface will then allow the client to specify the
71 * blending equation and alpha value used for compositing the wl_surface. 127 * blending equation and alpha value used for compositing the wl_surface.
72 * @section page_iface_zwp_alpha_compositing_v1_api API 128 * @section page_iface_zwp_alpha_compositing_v1_api API
73 * See @ref iface_zwp_alpha_compositing_v1. 129 * See @ref iface_zwp_alpha_compositing_v1.
74 */ 130 */
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 * 163 *
108 * If the wl_surface associated with the bledning object is destroyed, 164 * If the wl_surface associated with the bledning object is destroyed,
109 * the blending object becomes inert. 165 * the blending object becomes inert.
110 * 166 *
111 * If the blending object is destroyed, the blending state is removed 167 * If the blending object is destroyed, the blending state is removed
112 * from the wl_surface. The change will be applied on the next 168 * from the wl_surface. The change will be applied on the next
113 * wl_surface.commit. 169 * wl_surface.commit.
114 */ 170 */
115 extern const struct wl_interface zwp_blending_v1_interface; 171 extern const struct wl_interface zwp_blending_v1_interface;
116 172
173 #ifndef ZCR_ALPHA_COMPOSITING_V1_ERROR_ENUM
174 #define ZCR_ALPHA_COMPOSITING_V1_ERROR_ENUM
175 enum zcr_alpha_compositing_v1_error {
176 /**
177 * the surface already has a blending object associated
178 */
179 ZCR_ALPHA_COMPOSITING_V1_ERROR_BLENDING_EXISTS = 0,
180 };
181 #endif /* ZCR_ALPHA_COMPOSITING_V1_ERROR_ENUM */
182
183 #define ZCR_ALPHA_COMPOSITING_V1_DESTROY 0
184 #define ZCR_ALPHA_COMPOSITING_V1_GET_BLENDING 1
185
186 /**
187 * @ingroup iface_zcr_alpha_compositing_v1
188 */
189 #define ZCR_ALPHA_COMPOSITING_V1_DESTROY_SINCE_VERSION 1
190 /**
191 * @ingroup iface_zcr_alpha_compositing_v1
192 */
193 #define ZCR_ALPHA_COMPOSITING_V1_GET_BLENDING_SINCE_VERSION 1
194
195 /** @ingroup iface_zcr_alpha_compositing_v1 */
196 static inline void
197 zcr_alpha_compositing_v1_set_user_data(struct zcr_alpha_compositing_v1 *zcr_alph a_compositing_v1, void *user_data)
198 {
199 wl_proxy_set_user_data((struct wl_proxy *) zcr_alpha_compositing_v1, use r_data);
200 }
201
202 /** @ingroup iface_zcr_alpha_compositing_v1 */
203 static inline void *
204 zcr_alpha_compositing_v1_get_user_data(struct zcr_alpha_compositing_v1 *zcr_alph a_compositing_v1)
205 {
206 return wl_proxy_get_user_data((struct wl_proxy *) zcr_alpha_compositing_ v1);
207 }
208
209 static inline uint32_t
210 zcr_alpha_compositing_v1_get_version(struct zcr_alpha_compositing_v1 *zcr_alpha_ compositing_v1)
211 {
212 return wl_proxy_get_version((struct wl_proxy *) zcr_alpha_compositing_v1 );
213 }
214
215 /**
216 * @ingroup iface_zcr_alpha_compositing_v1
217 *
218 * Informs the server that the client will not be using this
219 * protocol object anymore. This does not affect any other objects,
220 * blending objects included.
221 */
222 static inline void
223 zcr_alpha_compositing_v1_destroy(struct zcr_alpha_compositing_v1 *zcr_alpha_comp ositing_v1)
224 {
225 wl_proxy_marshal((struct wl_proxy *) zcr_alpha_compositing_v1,
226 ZCR_ALPHA_COMPOSITING_V1_DESTROY);
227
228 wl_proxy_destroy((struct wl_proxy *) zcr_alpha_compositing_v1);
229 }
230
231 /**
232 * @ingroup iface_zcr_alpha_compositing_v1
233 *
234 * Instantiate an interface extension for the given wl_surface to
235 * provide surface blending. If the given wl_surface already has
236 * a blending object associated, the blending_exists protocol error
237 * is raised.
238 */
239 static inline struct zcr_blending_v1 *
240 zcr_alpha_compositing_v1_get_blending(struct zcr_alpha_compositing_v1 *zcr_alpha _compositing_v1, struct wl_surface *surface)
241 {
242 struct wl_proxy *id;
243
244 id = wl_proxy_marshal_constructor((struct wl_proxy *) zcr_alpha_composit ing_v1,
245 ZCR_ALPHA_COMPOSITING_V1_GET_BLENDING, &zcr_blending_v1 _interface, NULL, surface);
246
247 return (struct zcr_blending_v1 *) id;
248 }
249
250 #ifndef ZCR_BLENDING_V1_BLENDING_EQUATION_ENUM
251 #define ZCR_BLENDING_V1_BLENDING_EQUATION_ENUM
252 /**
253 * @ingroup iface_zcr_blending_v1
254 * different blending equations for compositing
255 *
256 * Blending equations that can be used when compositing a surface.
257 */
258 enum zcr_blending_v1_blending_equation {
259 /**
260 * no blending
261 */
262 ZCR_BLENDING_V1_BLENDING_EQUATION_NONE = 0,
263 /**
264 * one / one_minus_src_alpha
265 */
266 ZCR_BLENDING_V1_BLENDING_EQUATION_PREMULT = 1,
267 /**
268 * src_alpha / one_minus_src_alpha
269 */
270 ZCR_BLENDING_V1_BLENDING_EQUATION_COVERAGE = 2,
271 };
272 #endif /* ZCR_BLENDING_V1_BLENDING_EQUATION_ENUM */
273
274 #define ZCR_BLENDING_V1_DESTROY 0
275 #define ZCR_BLENDING_V1_SET_BLENDING 1
276 #define ZCR_BLENDING_V1_SET_ALPHA 2
277
278 /**
279 * @ingroup iface_zcr_blending_v1
280 */
281 #define ZCR_BLENDING_V1_DESTROY_SINCE_VERSION 1
282 /**
283 * @ingroup iface_zcr_blending_v1
284 */
285 #define ZCR_BLENDING_V1_SET_BLENDING_SINCE_VERSION 1
286 /**
287 * @ingroup iface_zcr_blending_v1
288 */
289 #define ZCR_BLENDING_V1_SET_ALPHA_SINCE_VERSION 1
290
291 /** @ingroup iface_zcr_blending_v1 */
292 static inline void
293 zcr_blending_v1_set_user_data(struct zcr_blending_v1 *zcr_blending_v1, void *use r_data)
294 {
295 wl_proxy_set_user_data((struct wl_proxy *) zcr_blending_v1, user_data);
296 }
297
298 /** @ingroup iface_zcr_blending_v1 */
299 static inline void *
300 zcr_blending_v1_get_user_data(struct zcr_blending_v1 *zcr_blending_v1)
301 {
302 return wl_proxy_get_user_data((struct wl_proxy *) zcr_blending_v1);
303 }
304
305 static inline uint32_t
306 zcr_blending_v1_get_version(struct zcr_blending_v1 *zcr_blending_v1)
307 {
308 return wl_proxy_get_version((struct wl_proxy *) zcr_blending_v1);
309 }
310
311 /**
312 * @ingroup iface_zcr_blending_v1
313 *
314 * The associated wl_surface's blending state is removed.
315 * The change is applied on the next wl_surface.commit.
316 */
317 static inline void
318 zcr_blending_v1_destroy(struct zcr_blending_v1 *zcr_blending_v1)
319 {
320 wl_proxy_marshal((struct wl_proxy *) zcr_blending_v1,
321 ZCR_BLENDING_V1_DESTROY);
322
323 wl_proxy_destroy((struct wl_proxy *) zcr_blending_v1);
324 }
325
326 /**
327 * @ingroup iface_zcr_blending_v1
328 *
329 * Set the blending equation for compositing the wl_surface.
330 * See wp_alpha_compositing for the description.
331 *
332 * The blending equation state is double-buffered state,
333 * and will be applied on the next wl_surface.commit.
334 */
335 static inline void
336 zcr_blending_v1_set_blending(struct zcr_blending_v1 *zcr_blending_v1, uint32_t e quation)
337 {
338 wl_proxy_marshal((struct wl_proxy *) zcr_blending_v1,
339 ZCR_BLENDING_V1_SET_BLENDING, equation);
340 }
341
342 /**
343 * @ingroup iface_zcr_blending_v1
344 *
345 * Set the alpha value applied to the whole surface for compositing.
346 * See wp_alpha_compositing for the description.
347 *
348 * The alpha value state is double-buffered state,
349 * and will be applied on the next wl_surface.commit.
350 */
351 static inline void
352 zcr_blending_v1_set_alpha(struct zcr_blending_v1 *zcr_blending_v1, wl_fixed_t va lue)
353 {
354 wl_proxy_marshal((struct wl_proxy *) zcr_blending_v1,
355 ZCR_BLENDING_V1_SET_ALPHA, value);
356 }
357
117 #ifndef ZWP_ALPHA_COMPOSITING_V1_ERROR_ENUM 358 #ifndef ZWP_ALPHA_COMPOSITING_V1_ERROR_ENUM
118 #define ZWP_ALPHA_COMPOSITING_V1_ERROR_ENUM 359 #define ZWP_ALPHA_COMPOSITING_V1_ERROR_ENUM
119 enum zwp_alpha_compositing_v1_error { 360 enum zwp_alpha_compositing_v1_error {
120 /** 361 /**
121 * the surface already has a blending object associated 362 * the surface already has a blending object associated
122 */ 363 */
123 ZWP_ALPHA_COMPOSITING_V1_ERROR_BLENDING_EXISTS = 0, 364 ZWP_ALPHA_COMPOSITING_V1_ERROR_BLENDING_EXISTS = 0,
124 }; 365 };
125 #endif /* ZWP_ALPHA_COMPOSITING_V1_ERROR_ENUM */ 366 #endif /* ZWP_ALPHA_COMPOSITING_V1_ERROR_ENUM */
126 367
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after
297 { 538 {
298 wl_proxy_marshal((struct wl_proxy *) zwp_blending_v1, 539 wl_proxy_marshal((struct wl_proxy *) zwp_blending_v1,
299 ZWP_BLENDING_V1_SET_ALPHA, value); 540 ZWP_BLENDING_V1_SET_ALPHA, value);
300 } 541 }
301 542
302 #ifdef __cplusplus 543 #ifdef __cplusplus
303 } 544 }
304 #endif 545 #endif
305 546
306 #endif 547 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698