OLD | NEW |
1 /* Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 /* Copyright (c) 2011 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_instance.idl modified Mon Aug 15 11:01:06 2011. */ | 6 /* From ppb_instance.idl modified Tue Aug 23 11:25:50 2011. */ |
7 | 7 |
8 #ifndef PPAPI_C_PPB_INSTANCE_H_ | 8 #ifndef PPAPI_C_PPB_INSTANCE_H_ |
9 #define PPAPI_C_PPB_INSTANCE_H_ | 9 #define PPAPI_C_PPB_INSTANCE_H_ |
10 | 10 |
11 #include "ppapi/c/pp_bool.h" | 11 #include "ppapi/c/pp_bool.h" |
12 #include "ppapi/c/pp_instance.h" | 12 #include "ppapi/c/pp_instance.h" |
13 #include "ppapi/c/pp_macros.h" | 13 #include "ppapi/c/pp_macros.h" |
14 #include "ppapi/c/pp_resource.h" | 14 #include "ppapi/c/pp_resource.h" |
15 #include "ppapi/c/pp_stdint.h" | 15 #include "ppapi/c/pp_stdint.h" |
16 #include "ppapi/c/pp_var.h" | 16 #include "ppapi/c/pp_var.h" |
17 | 17 |
18 #define PPB_INSTANCE_INTERFACE_0_5 "PPB_Instance;0.5" | 18 #define PPB_INSTANCE_INTERFACE_0_5 "PPB_Instance;0.5" |
19 #define PPB_INSTANCE_INTERFACE_1_0 "PPB_Instance;1.0" | 19 #define PPB_INSTANCE_INTERFACE_1_0 "PPB_Instance;1.0" |
20 #define PPB_INSTANCE_INTERFACE PPB_INSTANCE_INTERFACE_1_0 | 20 #define PPB_INSTANCE_INTERFACE PPB_INSTANCE_INTERFACE_1_0 |
21 | 21 |
22 /** | 22 /** |
23 * @file | 23 * @file |
24 * This file defines the PPB_Instance interface implemented by the | 24 * This file defines the <code>PPB_Instance</code> interface implemented by the |
25 * browser and containing pointers to functions related to | 25 * browser and containing pointers to functions related to |
26 * the module instance on a web page. | 26 * the module instance on a web page. |
27 */ | 27 */ |
28 | 28 |
29 | 29 |
30 /** | 30 /** |
31 * @addtogroup Interfaces | 31 * @addtogroup Interfaces |
32 * @{ | 32 * @{ |
33 */ | 33 */ |
34 /** | 34 /** |
(...skipping 12 matching lines...) Expand all Loading... |
47 * and will do nothing. | 47 * and will do nothing. |
48 * | 48 * |
49 * Any previously-bound device will be released. It is an error to bind | 49 * Any previously-bound device will be released. It is an error to bind |
50 * a device when it is already bound to another instance. If you want | 50 * a device when it is already bound to another instance. If you want |
51 * to move a device between instances, first unbind it from the old one, and | 51 * to move a device between instances, first unbind it from the old one, and |
52 * then rebind it to the new one. | 52 * then rebind it to the new one. |
53 * | 53 * |
54 * Binding a device will invalidate that portion of the web page to flush the | 54 * Binding a device will invalidate that portion of the web page to flush the |
55 * contents of the new device to the screen. | 55 * contents of the new device to the screen. |
56 * | 56 * |
57 * @param[in] instance A PP_Instance indentifying one instance of a module. | 57 * @param[in] instance A PP_Instance identifying one instance of a module. |
58 * @param[in] device A PP_Resource representing the graphics device. | 58 * @param[in] device A PP_Resource corresponding to a graphics device. |
59 * | 59 * |
60 * @return <code>PP_Bool</code> containing <code>PP_TRUE</code> if bind was | 60 * @return <code>PP_Bool</code> containing <code>PP_TRUE</code> if bind was |
61 * successful or <code>PP_FALSE</code> if the device was not the correct | 61 * successful or <code>PP_FALSE</code> if the device was not the correct |
62 * type. On success, a reference to the device will be held by the | 62 * type. On success, a reference to the device will be held by the |
63 * instance, so the caller can release its reference if it chooses. | 63 * instance, so the caller can release its reference if it chooses. |
64 */ | 64 */ |
65 PP_Bool (*BindGraphics)(PP_Instance instance, PP_Resource device); | 65 PP_Bool (*BindGraphics)(PP_Instance instance, PP_Resource device); |
66 /** | 66 /** |
67 * IsFullFrame() determines if the instance is full-frame. Such an instance | 67 * IsFullFrame() determines if the instance is full-frame. Such an instance |
68 * represents the entire document in a frame rather than an embedded | 68 * represents the entire document in a frame rather than an embedded |
69 * resource. This can happen if the user does a top-level navigation or the | 69 * resource. This can happen if the user does a top-level navigation or the |
70 * page specifies an iframe to a resource with a MIME type registered by the | 70 * page specifies an iframe to a resource with a MIME type registered by the |
71 * module. | 71 * module. |
72 * | 72 * |
73 * @param[in] instance A <code>PP_Instance</code> indentifying one instance | 73 * @param[in] instance A <code>PP_Instance</code> identifying one instance |
74 * of a module. | 74 * of a module. |
75 * | 75 * |
76 * @return A <code>PP_Bool</code> containing <code>PP_TRUE</code> if the | 76 * @return A <code>PP_Bool</code> containing <code>PP_TRUE</code> if the |
77 * instance is full-frame. | 77 * instance is full-frame. |
78 */ | 78 */ |
79 PP_Bool (*IsFullFrame)(PP_Instance instance); | 79 PP_Bool (*IsFullFrame)(PP_Instance instance); |
80 }; | 80 }; |
81 | 81 |
82 struct PPB_Instance_0_5 { | 82 struct PPB_Instance_0_5 { |
83 struct PP_Var (*GetWindowObject)(PP_Instance instance); | 83 struct PP_Var (*GetWindowObject)(PP_Instance instance); |
84 struct PP_Var (*GetOwnerElementObject)(PP_Instance instance); | 84 struct PP_Var (*GetOwnerElementObject)(PP_Instance instance); |
85 PP_Bool (*BindGraphics)(PP_Instance instance, PP_Resource device); | 85 PP_Bool (*BindGraphics)(PP_Instance instance, PP_Resource device); |
86 PP_Bool (*IsFullFrame)(PP_Instance instance); | 86 PP_Bool (*IsFullFrame)(PP_Instance instance); |
87 }; | 87 }; |
88 /** | 88 /** |
89 * @} | 89 * @} |
90 */ | 90 */ |
91 | 91 |
92 #endif /* PPAPI_C_PPB_INSTANCE_H_ */ | 92 #endif /* PPAPI_C_PPB_INSTANCE_H_ */ |
93 | 93 |
OLD | NEW |