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

Side by Side Diff: third_party/wayland-protocols/include/protocol/vsync-feedback-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 VSYNC_FEEDBACK_UNSTABLE_V1_CLIENT_PROTOCOL_H 3 #ifndef VSYNC_FEEDBACK_UNSTABLE_V1_CLIENT_PROTOCOL_H
4 #define VSYNC_FEEDBACK_UNSTABLE_V1_CLIENT_PROTOCOL_H 4 #define VSYNC_FEEDBACK_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 * 23 *
24 * Warning! The protocol described in this file is experimental and backward 24 * Warning! The protocol described in this file is experimental and backward
25 * incompatible changes may be made. Backward compatible changes may be added 25 * incompatible changes may be made. Backward compatible changes may be added
26 * together with the corresponding interface version bump. Backward 26 * together with the corresponding interface version bump. Backward
27 * incompatible changes are done by bumping the version number in the protocol 27 * incompatible changes are done by bumping the version number in the protocol
28 * and interface names and resetting the interface version. Once the protocol 28 * and interface names and resetting the interface version. Once the protocol
29 * is to be declared stable, the version number in the protocol is removed and 29 * is to be declared stable, the version number in the protocol is removed and
30 * the interface version number is reset. 30 * the interface version number is reset.
31 * 31 *
32 * @section page_ifaces_vsync_feedback_unstable_v1 Interfaces 32 * @section page_ifaces_vsync_feedback_unstable_v1 Interfaces
33 * - @subpage page_iface_zwp_vsync_feedback_v1 - Protocol for providing vertical synchronization timing 33 * - @subpage page_iface_zcr_vsync_feedback_v1 - Protocol for providing vertical synchronization timing
34 * - @subpage page_iface_zcr_vsync_timing_v1 -
35 * - @subpage page_iface_zwp_vsync_feedback_v1 - DEPRECATED
34 * - @subpage page_iface_zwp_vsync_timing_v1 - 36 * - @subpage page_iface_zwp_vsync_timing_v1 -
35 * @section page_copyright_vsync_feedback_unstable_v1 Copyright 37 * @section page_copyright_vsync_feedback_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_output; 62 struct wl_output;
63 struct zcr_vsync_feedback_v1;
64 struct zcr_vsync_timing_v1;
61 struct zwp_vsync_feedback_v1; 65 struct zwp_vsync_feedback_v1;
62 struct zwp_vsync_timing_v1; 66 struct zwp_vsync_timing_v1;
63 67
64 /** 68 /**
69 * @page page_iface_zcr_vsync_feedback_v1 zcr_vsync_feedback_v1
70 * @section page_iface_zcr_vsync_feedback_v1_desc Description
71 *
72 * The global interface that allows clients to subscribe for vertical
73 * synchronization timing data for given wl_output.
74 * @section page_iface_zcr_vsync_feedback_v1_api API
75 * See @ref iface_zcr_vsync_feedback_v1.
76 */
77 /**
78 * @defgroup iface_zcr_vsync_feedback_v1 The zcr_vsync_feedback_v1 interface
79 *
80 * The global interface that allows clients to subscribe for vertical
81 * synchronization timing data for given wl_output.
82 */
83 extern const struct wl_interface zcr_vsync_feedback_v1_interface;
84 /**
85 * @page page_iface_zcr_vsync_timing_v1 zcr_vsync_timing_v1
86 * @section page_iface_zcr_vsync_timing_v1_api API
87 * See @ref iface_zcr_vsync_timing_v1.
88 */
89 /**
90 * @defgroup iface_zcr_vsync_timing_v1 The zcr_vsync_timing_v1 interface
91 */
92 extern const struct wl_interface zcr_vsync_timing_v1_interface;
93 /**
65 * @page page_iface_zwp_vsync_feedback_v1 zwp_vsync_feedback_v1 94 * @page page_iface_zwp_vsync_feedback_v1 zwp_vsync_feedback_v1
66 * @section page_iface_zwp_vsync_feedback_v1_desc Description 95 * @section page_iface_zwp_vsync_feedback_v1_desc Description
67 * 96 *
68 * The global interface that allows clients to subscribe for vertical 97 * The global interface that allows clients to subscribe for vertical
69 * synchronization timing data for given wl_output. 98 * synchronization timing data for given wl_output.
70 * @section page_iface_zwp_vsync_feedback_v1_api API 99 * @section page_iface_zwp_vsync_feedback_v1_api API
71 * See @ref iface_zwp_vsync_feedback_v1. 100 * See @ref iface_zwp_vsync_feedback_v1.
72 */ 101 */
73 /** 102 /**
74 * @defgroup iface_zwp_vsync_feedback_v1 The zwp_vsync_feedback_v1 interface 103 * @defgroup iface_zwp_vsync_feedback_v1 The zwp_vsync_feedback_v1 interface
75 * 104 *
76 * The global interface that allows clients to subscribe for vertical 105 * The global interface that allows clients to subscribe for vertical
77 * synchronization timing data for given wl_output. 106 * synchronization timing data for given wl_output.
78 */ 107 */
79 extern const struct wl_interface zwp_vsync_feedback_v1_interface; 108 extern const struct wl_interface zwp_vsync_feedback_v1_interface;
80 /** 109 /**
81 * @page page_iface_zwp_vsync_timing_v1 zwp_vsync_timing_v1 110 * @page page_iface_zwp_vsync_timing_v1 zwp_vsync_timing_v1
82 * @section page_iface_zwp_vsync_timing_v1_api API 111 * @section page_iface_zwp_vsync_timing_v1_api API
83 * See @ref iface_zwp_vsync_timing_v1. 112 * See @ref iface_zwp_vsync_timing_v1.
84 */ 113 */
85 /** 114 /**
86 * @defgroup iface_zwp_vsync_timing_v1 The zwp_vsync_timing_v1 interface 115 * @defgroup iface_zwp_vsync_timing_v1 The zwp_vsync_timing_v1 interface
87 */ 116 */
88 extern const struct wl_interface zwp_vsync_timing_v1_interface; 117 extern const struct wl_interface zwp_vsync_timing_v1_interface;
89 118
119 #define ZCR_VSYNC_FEEDBACK_V1_DESTROY 0
120 #define ZCR_VSYNC_FEEDBACK_V1_GET_VSYNC_TIMING 1
121
122 /**
123 * @ingroup iface_zcr_vsync_feedback_v1
124 */
125 #define ZCR_VSYNC_FEEDBACK_V1_DESTROY_SINCE_VERSION 1
126 /**
127 * @ingroup iface_zcr_vsync_feedback_v1
128 */
129 #define ZCR_VSYNC_FEEDBACK_V1_GET_VSYNC_TIMING_SINCE_VERSION 1
130
131 /** @ingroup iface_zcr_vsync_feedback_v1 */
132 static inline void
133 zcr_vsync_feedback_v1_set_user_data(struct zcr_vsync_feedback_v1 *zcr_vsync_feed back_v1, void *user_data)
134 {
135 wl_proxy_set_user_data((struct wl_proxy *) zcr_vsync_feedback_v1, user_d ata);
136 }
137
138 /** @ingroup iface_zcr_vsync_feedback_v1 */
139 static inline void *
140 zcr_vsync_feedback_v1_get_user_data(struct zcr_vsync_feedback_v1 *zcr_vsync_feed back_v1)
141 {
142 return wl_proxy_get_user_data((struct wl_proxy *) zcr_vsync_feedback_v1) ;
143 }
144
145 static inline uint32_t
146 zcr_vsync_feedback_v1_get_version(struct zcr_vsync_feedback_v1 *zcr_vsync_feedba ck_v1)
147 {
148 return wl_proxy_get_version((struct wl_proxy *) zcr_vsync_feedback_v1);
149 }
150
151 /**
152 * @ingroup iface_zcr_vsync_feedback_v1
153 *
154 * Destroy this vsync feedback object. Existing vsync timing objects shall
155 * not be affected by this request.
156 */
157 static inline void
158 zcr_vsync_feedback_v1_destroy(struct zcr_vsync_feedback_v1 *zcr_vsync_feedback_v 1)
159 {
160 wl_proxy_marshal((struct wl_proxy *) zcr_vsync_feedback_v1,
161 ZCR_VSYNC_FEEDBACK_V1_DESTROY);
162
163 wl_proxy_destroy((struct wl_proxy *) zcr_vsync_feedback_v1);
164 }
165
166 /**
167 * @ingroup iface_zcr_vsync_feedback_v1
168 *
169 * Create a new vsync timing object that represents a subscription to
170 * vertical synchronization timing updates of given wl_output object.
171 *
172 * The newly created object will immediately signal an update to notify
173 * the subscriber of initial timing parameters.
174 */
175 static inline struct zcr_vsync_timing_v1 *
176 zcr_vsync_feedback_v1_get_vsync_timing(struct zcr_vsync_feedback_v1 *zcr_vsync_f eedback_v1, struct wl_output *output)
177 {
178 struct wl_proxy *id;
179
180 id = wl_proxy_marshal_constructor((struct wl_proxy *) zcr_vsync_feedback _v1,
181 ZCR_VSYNC_FEEDBACK_V1_GET_VSYNC_TIMING, &zcr_vsync_timi ng_v1_interface, NULL, output);
182
183 return (struct zcr_vsync_timing_v1 *) id;
184 }
185
186 /**
187 * @ingroup iface_zcr_vsync_timing_v1
188 * @struct zcr_vsync_timing_v1_listener
189 */
190 struct zcr_vsync_timing_v1_listener {
191 /**
192 * vsync timing updated
193 *
194 * Notifies client that vertical synchronization timing of given
195 * wl_output has changed.
196 *
197 * Timing information consists of two data, timebase and interval.
198 * Timebase is an absolute timestamp of the vsync event that caused
199 * the timing to change. Interval is a period of time between
200 * subsequent vsync events.
201 *
202 * The unit of all above mentioned time values shall be
203 * microseconds and absolute timestamps should match the realm of
204 * the primary system monotonic counter, i.e. the POSIX
205 * clock_gettime(CLOCK_MONOTONIC). Data type of both values is
206 * defined to be a 64-bit unsigned integer, but since the biggest
207 * unsigned integer datatype defined by the Wayland protocol is the
208 * 32-bit uint, both timebase and interval are split into most
209 * significant and least significant part, suffixed by "_h" and
210 * "_l" respectively.
211 * @param timebase_l new vsync timebase (lower 32 bits)
212 * @param timebase_h new vsync timebase (upper 32 bits)
213 * @param interval_l new vsync interval (lower 32 bits)
214 * @param interval_h new vsync interval (upper 32 bits)
215 */
216 void (*update)(void *data,
217 struct zcr_vsync_timing_v1 *zcr_vsync_timing_v1,
218 uint32_t timebase_l,
219 uint32_t timebase_h,
220 uint32_t interval_l,
221 uint32_t interval_h);
222 };
223
224 /**
225 * @ingroup zcr_vsync_timing_v1_iface
226 */
227 static inline int
228 zcr_vsync_timing_v1_add_listener(struct zcr_vsync_timing_v1 *zcr_vsync_timing_v1 ,
229 const struct zcr_vsync_timing_v1_listener *list ener, void *data)
230 {
231 return wl_proxy_add_listener((struct wl_proxy *) zcr_vsync_timing_v1,
232 (void (**)(void)) listener, data);
233 }
234
235 #define ZCR_VSYNC_TIMING_V1_DESTROY 0
236
237 /**
238 * @ingroup iface_zcr_vsync_timing_v1
239 */
240 #define ZCR_VSYNC_TIMING_V1_DESTROY_SINCE_VERSION 1
241
242 /** @ingroup iface_zcr_vsync_timing_v1 */
243 static inline void
244 zcr_vsync_timing_v1_set_user_data(struct zcr_vsync_timing_v1 *zcr_vsync_timing_v 1, void *user_data)
245 {
246 wl_proxy_set_user_data((struct wl_proxy *) zcr_vsync_timing_v1, user_dat a);
247 }
248
249 /** @ingroup iface_zcr_vsync_timing_v1 */
250 static inline void *
251 zcr_vsync_timing_v1_get_user_data(struct zcr_vsync_timing_v1 *zcr_vsync_timing_v 1)
252 {
253 return wl_proxy_get_user_data((struct wl_proxy *) zcr_vsync_timing_v1);
254 }
255
256 static inline uint32_t
257 zcr_vsync_timing_v1_get_version(struct zcr_vsync_timing_v1 *zcr_vsync_timing_v1)
258 {
259 return wl_proxy_get_version((struct wl_proxy *) zcr_vsync_timing_v1);
260 }
261
262 /**
263 * @ingroup iface_zcr_vsync_timing_v1
264 *
265 * Destroy this vsync timing object.
266 */
267 static inline void
268 zcr_vsync_timing_v1_destroy(struct zcr_vsync_timing_v1 *zcr_vsync_timing_v1)
269 {
270 wl_proxy_marshal((struct wl_proxy *) zcr_vsync_timing_v1,
271 ZCR_VSYNC_TIMING_V1_DESTROY);
272
273 wl_proxy_destroy((struct wl_proxy *) zcr_vsync_timing_v1);
274 }
275
90 #define ZWP_VSYNC_FEEDBACK_V1_DESTROY 0 276 #define ZWP_VSYNC_FEEDBACK_V1_DESTROY 0
91 #define ZWP_VSYNC_FEEDBACK_V1_GET_VSYNC_TIMING 1 277 #define ZWP_VSYNC_FEEDBACK_V1_GET_VSYNC_TIMING 1
92 278
93 /** 279 /**
94 * @ingroup iface_zwp_vsync_feedback_v1 280 * @ingroup iface_zwp_vsync_feedback_v1
95 */ 281 */
96 #define ZWP_VSYNC_FEEDBACK_V1_DESTROY_SINCE_VERSION 1 282 #define ZWP_VSYNC_FEEDBACK_V1_DESTROY_SINCE_VERSION 1
97 /** 283 /**
98 * @ingroup iface_zwp_vsync_feedback_v1 284 * @ingroup iface_zwp_vsync_feedback_v1
99 */ 285 */
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after
242 ZWP_VSYNC_TIMING_V1_DESTROY); 428 ZWP_VSYNC_TIMING_V1_DESTROY);
243 429
244 wl_proxy_destroy((struct wl_proxy *) zwp_vsync_timing_v1); 430 wl_proxy_destroy((struct wl_proxy *) zwp_vsync_timing_v1);
245 } 431 }
246 432
247 #ifdef __cplusplus 433 #ifdef __cplusplus
248 } 434 }
249 #endif 435 #endif
250 436
251 #endif 437 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698