| OLD | NEW |
| (Empty) | |
| 1 /* Generated by wayland-scanner 1.11.90 */ |
| 2 |
| 3 #ifndef LINUX_EXPLICIT_SYNCHRONIZATION_UNSTABLE_V1_CLIENT_PROTOCOL_H |
| 4 #define LINUX_EXPLICIT_SYNCHRONIZATION_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_linux_explicit_synchronization_unstable_v1 The linux_explicit_sync
hronization_unstable_v1 protocol |
| 16 * Protocol for explicit synchronization |
| 17 * |
| 18 * @section page_desc_linux_explicit_synchronization_unstable_v1 Description |
| 19 * |
| 20 * This protocol specifies a set of interfaces used to provide explicit |
| 21 * synchronization of buffers to the the client. |
| 22 * |
| 23 * Warning! The protocol described in this file is experimental and backward |
| 24 * incompatible changes may be made. Backward compatible changes may be added |
| 25 * together with the corresponding interface version bump. Backward |
| 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 |
| 28 * is to be declared stable, the version number in the protocol is removed and |
| 29 * the interface version number is reset. |
| 30 * |
| 31 * @section page_ifaces_linux_explicit_synchronization_unstable_v1 Interfaces |
| 32 * - @subpage page_iface_zcr_linux_explicit_fencing_v1 - Protocol for providing
explicit fencing support |
| 33 * - @subpage page_iface_zcr_explicit_fenced_surface_v1 - |
| 34 * @section page_copyright_linux_explicit_synchronization_unstable_v1 Copyright |
| 35 * <pre> |
| 36 * |
| 37 * Copyright 2016 The Chromium Authors. |
| 38 * |
| 39 * Permission is hereby granted, free of charge, to any person obtaining a |
| 40 * copy of this software and associated documentation files (the "Software"), |
| 41 * to deal in the Software without restriction, including without limitation |
| 42 * the rights to use, copy, modify, merge, publish, distribute, sublicense, |
| 43 * and/or sell copies of the Software, and to permit persons to whom the |
| 44 * Software is furnished to do so, subject to the following conditions: |
| 45 * |
| 46 * The above copyright notice and this permission notice (including the next |
| 47 * paragraph) shall be included in all copies or substantial portions of the |
| 48 * Software. |
| 49 * |
| 50 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
| 51 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
| 52 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL |
| 53 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER |
| 54 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING |
| 55 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER |
| 56 * DEALINGS IN THE SOFTWARE. |
| 57 * </pre> |
| 58 */ |
| 59 struct wl_surface; |
| 60 struct zcr_explicit_fenced_surface_v1; |
| 61 struct zcr_linux_explicit_fencing_v1; |
| 62 |
| 63 /** |
| 64 * @page page_iface_zcr_linux_explicit_fencing_v1 zcr_linux_explicit_fencing_v1 |
| 65 * @section page_iface_zcr_linux_explicit_fencing_v1_desc Description |
| 66 * |
| 67 * The global interface that allows clients to subscribe for explicit |
| 68 * synchronization fences for given wl_surface. |
| 69 * @section page_iface_zcr_linux_explicit_fencing_v1_api API |
| 70 * See @ref iface_zcr_linux_explicit_fencing_v1. |
| 71 */ |
| 72 /** |
| 73 * @defgroup iface_zcr_linux_explicit_fencing_v1 The zcr_linux_explicit_fencing_
v1 interface |
| 74 * |
| 75 * The global interface that allows clients to subscribe for explicit |
| 76 * synchronization fences for given wl_surface. |
| 77 */ |
| 78 extern const struct wl_interface zcr_linux_explicit_fencing_v1_interface; |
| 79 /** |
| 80 * @page page_iface_zcr_explicit_fenced_surface_v1 zcr_explicit_fenced_surface_v
1 |
| 81 * @section page_iface_zcr_explicit_fenced_surface_v1_api API |
| 82 * See @ref iface_zcr_explicit_fenced_surface_v1. |
| 83 */ |
| 84 /** |
| 85 * @defgroup iface_zcr_explicit_fenced_surface_v1 The zcr_explicit_fenced_surfac
e_v1 interface |
| 86 */ |
| 87 extern const struct wl_interface zcr_explicit_fenced_surface_v1_interface; |
| 88 |
| 89 #ifndef ZCR_LINUX_EXPLICIT_FENCING_V1_ERROR_ENUM |
| 90 #define ZCR_LINUX_EXPLICIT_FENCING_V1_ERROR_ENUM |
| 91 enum zcr_linux_explicit_fencing_v1_error { |
| 92 /** |
| 93 * the surface already has an fencing object associated |
| 94 */ |
| 95 ZCR_LINUX_EXPLICIT_FENCING_V1_ERROR_FENCING_EXISTS = 0, |
| 96 }; |
| 97 #endif /* ZCR_LINUX_EXPLICIT_FENCING_V1_ERROR_ENUM */ |
| 98 |
| 99 #define ZCR_LINUX_EXPLICIT_FENCING_V1_DESTROY 0 |
| 100 #define ZCR_LINUX_EXPLICIT_FENCING_V1_GET_FENCING 1 |
| 101 |
| 102 /** |
| 103 * @ingroup iface_zcr_linux_explicit_fencing_v1 |
| 104 */ |
| 105 #define ZCR_LINUX_EXPLICIT_FENCING_V1_DESTROY_SINCE_VERSION 1 |
| 106 /** |
| 107 * @ingroup iface_zcr_linux_explicit_fencing_v1 |
| 108 */ |
| 109 #define ZCR_LINUX_EXPLICIT_FENCING_V1_GET_FENCING_SINCE_VERSION 1 |
| 110 |
| 111 /** @ingroup iface_zcr_linux_explicit_fencing_v1 */ |
| 112 static inline void |
| 113 zcr_linux_explicit_fencing_v1_set_user_data(struct zcr_linux_explicit_fencing_v1
*zcr_linux_explicit_fencing_v1, void *user_data) |
| 114 { |
| 115 wl_proxy_set_user_data((struct wl_proxy *) zcr_linux_explicit_fencing_v1
, user_data); |
| 116 } |
| 117 |
| 118 /** @ingroup iface_zcr_linux_explicit_fencing_v1 */ |
| 119 static inline void * |
| 120 zcr_linux_explicit_fencing_v1_get_user_data(struct zcr_linux_explicit_fencing_v1
*zcr_linux_explicit_fencing_v1) |
| 121 { |
| 122 return wl_proxy_get_user_data((struct wl_proxy *) zcr_linux_explicit_fen
cing_v1); |
| 123 } |
| 124 |
| 125 static inline uint32_t |
| 126 zcr_linux_explicit_fencing_v1_get_version(struct zcr_linux_explicit_fencing_v1 *
zcr_linux_explicit_fencing_v1) |
| 127 { |
| 128 return wl_proxy_get_version((struct wl_proxy *) zcr_linux_explicit_fenci
ng_v1); |
| 129 } |
| 130 |
| 131 /** |
| 132 * @ingroup iface_zcr_linux_explicit_fencing_v1 |
| 133 * |
| 134 * Destroy this explicit synchronization object. Existing explicit |
| 135 * synchronization objects shall not be affected by this request. |
| 136 */ |
| 137 static inline void |
| 138 zcr_linux_explicit_fencing_v1_destroy(struct zcr_linux_explicit_fencing_v1 *zcr_
linux_explicit_fencing_v1) |
| 139 { |
| 140 wl_proxy_marshal((struct wl_proxy *) zcr_linux_explicit_fencing_v1, |
| 141 ZCR_LINUX_EXPLICIT_FENCING_V1_DESTROY); |
| 142 |
| 143 wl_proxy_destroy((struct wl_proxy *) zcr_linux_explicit_fencing_v1); |
| 144 } |
| 145 |
| 146 /** |
| 147 * @ingroup iface_zcr_linux_explicit_fencing_v1 |
| 148 * |
| 149 * Instantiate an interface extension for the given wl_surface to |
| 150 * provide explicit fencing. If the given wl_surface already has |
| 151 * an explicit fencing object associated, the fencing_exists |
| 152 * protocol error is raised. |
| 153 * |
| 154 * Please see the zcr_explicit_fenced_surface_v1 protocol description |
| 155 * for details of how this affects the behaviour of the wl_surface it |
| 156 * is created against. |
| 157 */ |
| 158 static inline struct zcr_explicit_fenced_surface_v1 * |
| 159 zcr_linux_explicit_fencing_v1_get_fencing(struct zcr_linux_explicit_fencing_v1 *
zcr_linux_explicit_fencing_v1, struct wl_surface *surface) |
| 160 { |
| 161 struct wl_proxy *id; |
| 162 |
| 163 id = wl_proxy_marshal_constructor((struct wl_proxy *) zcr_linux_explicit
_fencing_v1, |
| 164 ZCR_LINUX_EXPLICIT_FENCING_V1_GET_FENCING, &zcr_explici
t_fenced_surface_v1_interface, NULL, surface); |
| 165 |
| 166 return (struct zcr_explicit_fenced_surface_v1 *) id; |
| 167 } |
| 168 |
| 169 /** |
| 170 * @ingroup iface_zcr_explicit_fenced_surface_v1 |
| 171 * @struct zcr_explicit_fenced_surface_v1_listener |
| 172 */ |
| 173 struct zcr_explicit_fenced_surface_v1_listener { |
| 174 /** |
| 175 * present fence changed |
| 176 * |
| 177 * Provides client with a fence that will be signaled at the |
| 178 * vsync when the result of composition of last frame appear. |
| 179 * @param fd fence fd |
| 180 */ |
| 181 void (*present)(void *data, |
| 182 struct zcr_explicit_fenced_surface_v1 *zcr_explicit_fenc
ed_surface_v1, |
| 183 int32_t fd); |
| 184 }; |
| 185 |
| 186 /** |
| 187 * @ingroup zcr_explicit_fenced_surface_v1_iface |
| 188 */ |
| 189 static inline int |
| 190 zcr_explicit_fenced_surface_v1_add_listener(struct zcr_explicit_fenced_surface_v
1 *zcr_explicit_fenced_surface_v1, |
| 191 const struct zcr_explicit_fenced_sur
face_v1_listener *listener, void *data) |
| 192 { |
| 193 return wl_proxy_add_listener((struct wl_proxy *) zcr_explicit_fenced_sur
face_v1, |
| 194 (void (**)(void)) listener, data); |
| 195 } |
| 196 |
| 197 #define ZCR_EXPLICIT_FENCED_SURFACE_V1_DESTROY 0 |
| 198 #define ZCR_EXPLICIT_FENCED_SURFACE_V1_SET_ACQUIRE_FENCE 1 |
| 199 |
| 200 /** |
| 201 * @ingroup iface_zcr_explicit_fenced_surface_v1 |
| 202 */ |
| 203 #define ZCR_EXPLICIT_FENCED_SURFACE_V1_DESTROY_SINCE_VERSION 1 |
| 204 /** |
| 205 * @ingroup iface_zcr_explicit_fenced_surface_v1 |
| 206 */ |
| 207 #define ZCR_EXPLICIT_FENCED_SURFACE_V1_SET_ACQUIRE_FENCE_SINCE_VERSION 1 |
| 208 |
| 209 /** @ingroup iface_zcr_explicit_fenced_surface_v1 */ |
| 210 static inline void |
| 211 zcr_explicit_fenced_surface_v1_set_user_data(struct zcr_explicit_fenced_surface_
v1 *zcr_explicit_fenced_surface_v1, void *user_data) |
| 212 { |
| 213 wl_proxy_set_user_data((struct wl_proxy *) zcr_explicit_fenced_surface_v
1, user_data); |
| 214 } |
| 215 |
| 216 /** @ingroup iface_zcr_explicit_fenced_surface_v1 */ |
| 217 static inline void * |
| 218 zcr_explicit_fenced_surface_v1_get_user_data(struct zcr_explicit_fenced_surface_
v1 *zcr_explicit_fenced_surface_v1) |
| 219 { |
| 220 return wl_proxy_get_user_data((struct wl_proxy *) zcr_explicit_fenced_su
rface_v1); |
| 221 } |
| 222 |
| 223 static inline uint32_t |
| 224 zcr_explicit_fenced_surface_v1_get_version(struct zcr_explicit_fenced_surface_v1
*zcr_explicit_fenced_surface_v1) |
| 225 { |
| 226 return wl_proxy_get_version((struct wl_proxy *) zcr_explicit_fenced_surf
ace_v1); |
| 227 } |
| 228 |
| 229 /** |
| 230 * @ingroup iface_zcr_explicit_fenced_surface_v1 |
| 231 * |
| 232 * Destroy this explicit synchronization object. |
| 233 */ |
| 234 static inline void |
| 235 zcr_explicit_fenced_surface_v1_destroy(struct zcr_explicit_fenced_surface_v1 *zc
r_explicit_fenced_surface_v1) |
| 236 { |
| 237 wl_proxy_marshal((struct wl_proxy *) zcr_explicit_fenced_surface_v1, |
| 238 ZCR_EXPLICIT_FENCED_SURFACE_V1_DESTROY); |
| 239 |
| 240 wl_proxy_destroy((struct wl_proxy *) zcr_explicit_fenced_surface_v1); |
| 241 } |
| 242 |
| 243 /** |
| 244 * @ingroup iface_zcr_explicit_fenced_surface_v1 |
| 245 * |
| 246 * Set the acquire fence that must be signaled before the compositor |
| 247 * is allowed to read the pixels in the pending wl_buffer. |
| 248 * |
| 249 * The acquire state is double-buffered state, and will be applied on |
| 250 * the next wl_surface.commit. |
| 251 */ |
| 252 static inline void |
| 253 zcr_explicit_fenced_surface_v1_set_acquire_fence(struct zcr_explicit_fenced_surf
ace_v1 *zcr_explicit_fenced_surface_v1, int32_t fd) |
| 254 { |
| 255 wl_proxy_marshal((struct wl_proxy *) zcr_explicit_fenced_surface_v1, |
| 256 ZCR_EXPLICIT_FENCED_SURFACE_V1_SET_ACQUIRE_FENCE, fd); |
| 257 |
| 258 wl_proxy_destroy((struct wl_proxy *) zcr_explicit_fenced_surface_v1); |
| 259 } |
| 260 |
| 261 #ifdef __cplusplus |
| 262 } |
| 263 #endif |
| 264 |
| 265 #endif |
| OLD | NEW |