OLD | NEW |
---|---|
1 /* Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 /* Copyright (c) 2010 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 #ifndef PPAPI_C_PPP_INSTANCE_H_ | 5 #ifndef PPAPI_C_PPP_INSTANCE_H_ |
6 #define PPAPI_C_PPP_INSTANCE_H_ | 6 #define PPAPI_C_PPP_INSTANCE_H_ |
7 | 7 |
8 #include "ppapi/c/dev/pp_message_event_dev.h" | |
8 #include "ppapi/c/pp_bool.h" | 9 #include "ppapi/c/pp_bool.h" |
9 #include "ppapi/c/pp_instance.h" | 10 #include "ppapi/c/pp_instance.h" |
10 #include "ppapi/c/pp_rect.h" | 11 #include "ppapi/c/pp_rect.h" |
11 #include "ppapi/c/pp_resource.h" | 12 #include "ppapi/c/pp_resource.h" |
12 | 13 |
13 struct PP_InputEvent; | 14 struct PP_InputEvent; |
14 struct PP_Var; | 15 struct PP_Var; |
15 | 16 |
16 #define PPP_INSTANCE_INTERFACE "PPP_Instance;0.4" | 17 #define PPP_INSTANCE_INTERFACE "PPP_Instance;0.5" |
17 | 18 |
18 /** | 19 /** |
19 * @file | 20 * @file |
20 * This file defines the PPP_Instance structure - a series of points to methods | 21 * This file defines the PPP_Instance structure - a series of points to methods |
21 * that you must implement in your model. | 22 * that you must implement in your model. |
22 * | 23 * |
23 */ | 24 */ |
24 | 25 |
25 /** @addtogroup Interfaces | 26 /** @addtogroup Interfaces |
26 * @{ | 27 * @{ |
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
164 * may want to call. | 165 * may want to call. |
165 * | 166 * |
166 * On Failure, the returned var should be a "void" var. | 167 * On Failure, the returned var should be a "void" var. |
167 * | 168 * |
168 * The returned PP_Var should have a reference added for the caller, which | 169 * The returned PP_Var should have a reference added for the caller, which |
169 * will be responsible for Release()ing that reference. | 170 * will be responsible for Release()ing that reference. |
170 * | 171 * |
171 * @param[in] instance A PP_Instance indentifying one instance of a module. | 172 * @param[in] instance A PP_Instance indentifying one instance of a module. |
172 * @return A PP_Var containing scriptable object. | 173 * @return A PP_Var containing scriptable object. |
173 */ | 174 */ |
174 struct PP_Var (*GetInstanceObject)(PP_Instance instance); | 175 struct PP_Var (*GetInstanceObject)(PP_Instance instance); |
darin (slow to review)
2011/02/23 22:36:46
I think now is the time to delete GetInstanceObjec
dmichael(do not use this one)
2011/02/23 22:45:00
I'm concerned that will make it really difficult t
| |
176 | |
177 /** | |
178 * This method gets called when postMessage is invoked on the DOM object for | |
179 * this instance in JavaScript. | |
180 * | |
181 * For example: | |
182 * | |
183 * <body> | |
184 * <object id="plugin" | |
185 * type="application/x-ppapi-postMessage-example"/> | |
186 * <script type="text/javascript"> | |
187 * document.getElementById('plugin').postMessage("Hello world!"); | |
188 * </script> | |
189 * </body> | |
190 * | |
191 * This will result in HandleMessage being invoked on the instance, with | |
192 * message being a string PP_Var containing "Hello world!". | |
193 */ | |
194 void (*HandleMessage)(PP_Instance instance, PP_Var message); | |
darin (slow to review)
2011/02/23 22:36:46
I think you need to stay "struct PP_Var" here.
dmichael(do not use this one)
2011/02/23 22:45:00
Nice catch, thanks! If I'd actually *built* ppapi
| |
175 }; | 195 }; |
176 /** | 196 /** |
177 * @} | 197 * @} |
178 */ | 198 */ |
179 | 199 |
180 #endif /* PPAPI_C_PPP_INSTANCE_H_ */ | 200 #endif /* PPAPI_C_PPP_INSTANCE_H_ */ |
181 | 201 |
OLD | NEW |