OLD | NEW |
1 /* Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 /* Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 * Use of this source code is governed by a BSD-style license that can be | 2 * Use of this source code is governed by a BSD-style license that can be |
3 * found in the LICENSE file. | 3 * found in the LICENSE file. |
4 */ | 4 */ |
5 | 5 |
6 /* From ppb_view.idl modified Tue Jun 17 10:27:32 2014. */ | 6 /* From ppb_view.idl modified Fri Sep 5 11:32:22 2014. */ |
7 | 7 |
8 #ifndef PPAPI_C_PPB_VIEW_H_ | 8 #ifndef PPAPI_C_PPB_VIEW_H_ |
9 #define PPAPI_C_PPB_VIEW_H_ | 9 #define PPAPI_C_PPB_VIEW_H_ |
10 | 10 |
11 #include "ppapi/c/pp_bool.h" | 11 #include "ppapi/c/pp_bool.h" |
12 #include "ppapi/c/pp_macros.h" | 12 #include "ppapi/c/pp_macros.h" |
13 #include "ppapi/c/pp_point.h" | 13 #include "ppapi/c/pp_point.h" |
14 #include "ppapi/c/pp_rect.h" | 14 #include "ppapi/c/pp_rect.h" |
15 #include "ppapi/c/pp_resource.h" | 15 #include "ppapi/c/pp_resource.h" |
16 #include "ppapi/c/pp_size.h" | 16 #include "ppapi/c/pp_size.h" |
17 #include "ppapi/c/pp_stdint.h" | 17 #include "ppapi/c/pp_stdint.h" |
18 | 18 |
19 #define PPB_VIEW_INTERFACE_1_0 "PPB_View;1.0" | 19 #define PPB_VIEW_INTERFACE_1_0 "PPB_View;1.0" |
20 #define PPB_VIEW_INTERFACE_1_1 "PPB_View;1.1" | 20 #define PPB_VIEW_INTERFACE_1_1 "PPB_View;1.1" |
21 #define PPB_VIEW_INTERFACE_1_2 "PPB_View;1.2" /* dev */ | 21 #define PPB_VIEW_INTERFACE_1_2 "PPB_View;1.2" |
22 #define PPB_VIEW_INTERFACE PPB_VIEW_INTERFACE_1_1 | 22 #define PPB_VIEW_INTERFACE PPB_VIEW_INTERFACE_1_2 |
23 | 23 |
24 /** | 24 /** |
25 * @file | 25 * @file |
26 * This file defines the <code>PPB_View</code> struct representing the state | 26 * This file defines the <code>PPB_View</code> struct representing the state |
27 * of the view of an instance. | 27 * of the view of an instance. |
28 */ | 28 */ |
29 | 29 |
30 | 30 |
31 /** | 31 /** |
32 * @addtogroup Interfaces | 32 * @addtogroup Interfaces |
33 * @{ | 33 * @{ |
34 */ | 34 */ |
35 /** | 35 /** |
36 * <code>PPB_View</code> represents the state of the view of an instance. | 36 * <code>PPB_View</code> represents the state of the view of an instance. |
37 * You will receive new view information using | 37 * You will receive new view information using |
38 * <code>PPP_Instance.DidChangeView</code>. | 38 * <code>PPP_Instance.DidChangeView</code>. |
39 */ | 39 */ |
40 struct PPB_View_1_2 { /* dev */ | 40 struct PPB_View_1_2 { |
41 /** | 41 /** |
42 * IsView() determines if the given resource is a valid | 42 * IsView() determines if the given resource is a valid |
43 * <code>PPB_View</code> resource. Note that <code>PPB_ViewChanged</code> | 43 * <code>PPB_View</code> resource. Note that <code>PPB_ViewChanged</code> |
44 * resources derive from <code>PPB_View</code> and will return true here | 44 * resources derive from <code>PPB_View</code> and will return true here |
45 * as well. | 45 * as well. |
46 * | 46 * |
47 * @param resource A <code>PP_Resource</code> corresponding to a | 47 * @param resource A <code>PP_Resource</code> corresponding to a |
48 * <code>PPB_View</code> resource. | 48 * <code>PPB_View</code> resource. |
49 * | 49 * |
50 * @return <code>PP_TRUE</code> if the given resource supports | 50 * @return <code>PP_TRUE</code> if the given resource supports |
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
207 * | 207 * |
208 * @param[out] offset A <code>PP_Point</code> which will be set to the value | 208 * @param[out] offset A <code>PP_Point</code> which will be set to the value |
209 * of the scroll offset in CSS pixels. | 209 * of the scroll offset in CSS pixels. |
210 * | 210 * |
211 * @return Returns <code>PP_TRUE</code> if the resource was valid and the | 211 * @return Returns <code>PP_TRUE</code> if the resource was valid and the |
212 * offset was filled in, <code>PP_FALSE</code> if not. | 212 * offset was filled in, <code>PP_FALSE</code> if not. |
213 */ | 213 */ |
214 PP_Bool (*GetScrollOffset)(PP_Resource resource, struct PP_Point* offset); | 214 PP_Bool (*GetScrollOffset)(PP_Resource resource, struct PP_Point* offset); |
215 }; | 215 }; |
216 | 216 |
| 217 typedef struct PPB_View_1_2 PPB_View; |
| 218 |
217 struct PPB_View_1_0 { | 219 struct PPB_View_1_0 { |
218 PP_Bool (*IsView)(PP_Resource resource); | 220 PP_Bool (*IsView)(PP_Resource resource); |
219 PP_Bool (*GetRect)(PP_Resource resource, struct PP_Rect* rect); | 221 PP_Bool (*GetRect)(PP_Resource resource, struct PP_Rect* rect); |
220 PP_Bool (*IsFullscreen)(PP_Resource resource); | 222 PP_Bool (*IsFullscreen)(PP_Resource resource); |
221 PP_Bool (*IsVisible)(PP_Resource resource); | 223 PP_Bool (*IsVisible)(PP_Resource resource); |
222 PP_Bool (*IsPageVisible)(PP_Resource resource); | 224 PP_Bool (*IsPageVisible)(PP_Resource resource); |
223 PP_Bool (*GetClipRect)(PP_Resource resource, struct PP_Rect* clip); | 225 PP_Bool (*GetClipRect)(PP_Resource resource, struct PP_Rect* clip); |
224 }; | 226 }; |
225 | 227 |
226 struct PPB_View_1_1 { | 228 struct PPB_View_1_1 { |
227 PP_Bool (*IsView)(PP_Resource resource); | 229 PP_Bool (*IsView)(PP_Resource resource); |
228 PP_Bool (*GetRect)(PP_Resource resource, struct PP_Rect* rect); | 230 PP_Bool (*GetRect)(PP_Resource resource, struct PP_Rect* rect); |
229 PP_Bool (*IsFullscreen)(PP_Resource resource); | 231 PP_Bool (*IsFullscreen)(PP_Resource resource); |
230 PP_Bool (*IsVisible)(PP_Resource resource); | 232 PP_Bool (*IsVisible)(PP_Resource resource); |
231 PP_Bool (*IsPageVisible)(PP_Resource resource); | 233 PP_Bool (*IsPageVisible)(PP_Resource resource); |
232 PP_Bool (*GetClipRect)(PP_Resource resource, struct PP_Rect* clip); | 234 PP_Bool (*GetClipRect)(PP_Resource resource, struct PP_Rect* clip); |
233 float (*GetDeviceScale)(PP_Resource resource); | 235 float (*GetDeviceScale)(PP_Resource resource); |
234 float (*GetCSSScale)(PP_Resource resource); | 236 float (*GetCSSScale)(PP_Resource resource); |
235 }; | 237 }; |
236 | |
237 typedef struct PPB_View_1_1 PPB_View; | |
238 /** | 238 /** |
239 * @} | 239 * @} |
240 */ | 240 */ |
241 | 241 |
242 #endif /* PPAPI_C_PPB_VIEW_H_ */ | 242 #endif /* PPAPI_C_PPB_VIEW_H_ */ |
243 | 243 |
OLD | NEW |