| 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 ppp_instance.idl modified Thu Dec 15 10:30:21 2011. */ | 6 /* From ppp_instance.idl modified Wed Jan 4 06:11:56 2012. */ |
| 7 | 7 |
| 8 #ifndef PPAPI_C_PPP_INSTANCE_H_ | 8 #ifndef PPAPI_C_PPP_INSTANCE_H_ |
| 9 #define PPAPI_C_PPP_INSTANCE_H_ | 9 #define PPAPI_C_PPP_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_point.h" | 14 #include "ppapi/c/pp_point.h" |
| 15 #include "ppapi/c/pp_rect.h" | 15 #include "ppapi/c/pp_rect.h" |
| 16 #include "ppapi/c/pp_resource.h" | 16 #include "ppapi/c/pp_resource.h" |
| (...skipping 15 matching lines...) Expand all Loading... |
| 32 * @addtogroup Interfaces | 32 * @addtogroup Interfaces |
| 33 * @{ | 33 * @{ |
| 34 */ | 34 */ |
| 35 /** | 35 /** |
| 36 * The <code>PPP_Instance</code> interface contains pointers to a series of | 36 * The <code>PPP_Instance</code> interface contains pointers to a series of |
| 37 * functions that you must implement in your module. These functions can be | 37 * functions that you must implement in your module. These functions can be |
| 38 * trivial (simply return the default return value) unless you want your module | 38 * trivial (simply return the default return value) unless you want your module |
| 39 * to handle events such as change of focus or input events (keyboard/mouse) | 39 * to handle events such as change of focus or input events (keyboard/mouse) |
| 40 * events. | 40 * events. |
| 41 */ | 41 */ |
| 42 struct PPP_Instance { | 42 struct PPP_Instance_1_1 { |
| 43 /** | 43 /** |
| 44 * DidCreate() is a creation handler that is called when a new instance is | 44 * DidCreate() is a creation handler that is called when a new instance is |
| 45 * created. This function is called for each instantiation on the page, | 45 * created. This function is called for each instantiation on the page, |
| 46 * corresponding to one \<embed\> tag on the page. | 46 * corresponding to one \<embed\> tag on the page. |
| 47 * | 47 * |
| 48 * Generally you would handle this call by initializing the information | 48 * Generally you would handle this call by initializing the information |
| 49 * your module associates with an instance and creating a mapping from the | 49 * your module associates with an instance and creating a mapping from the |
| 50 * given <code>PP_Instance</code> handle to this data. The | 50 * given <code>PP_Instance</code> handle to this data. The |
| 51 * <code>PP_Instance</code> handle will be used in subsequent calls to | 51 * <code>PP_Instance</code> handle will be used in subsequent calls to |
| 52 * identify which instance the call pertains to. | 52 * identify which instance the call pertains to. |
| (...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 159 * that should do the load. | 159 * that should do the load. |
| 160 * | 160 * |
| 161 * @param[in] url_loader An open <code>PPB_URLLoader</code> instance. | 161 * @param[in] url_loader An open <code>PPB_URLLoader</code> instance. |
| 162 * | 162 * |
| 163 * @return <code>PP_TRUE</code> if the data was handled, | 163 * @return <code>PP_TRUE</code> if the data was handled, |
| 164 * <code>PP_FALSE</code> otherwise. | 164 * <code>PP_FALSE</code> otherwise. |
| 165 */ | 165 */ |
| 166 PP_Bool (*HandleDocumentLoad)(PP_Instance instance, PP_Resource url_loader); | 166 PP_Bool (*HandleDocumentLoad)(PP_Instance instance, PP_Resource url_loader); |
| 167 }; | 167 }; |
| 168 | 168 |
| 169 typedef struct PPP_Instance_1_1 PPP_Instance; |
| 170 |
| 169 struct PPP_Instance_1_0 { | 171 struct PPP_Instance_1_0 { |
| 170 PP_Bool (*DidCreate)(PP_Instance instance, | 172 PP_Bool (*DidCreate)(PP_Instance instance, |
| 171 uint32_t argc, | 173 uint32_t argc, |
| 172 const char* argn[], | 174 const char* argn[], |
| 173 const char* argv[]); | 175 const char* argv[]); |
| 174 void (*DidDestroy)(PP_Instance instance); | 176 void (*DidDestroy)(PP_Instance instance); |
| 175 void (*DidChangeView)(PP_Instance instance, | 177 void (*DidChangeView)(PP_Instance instance, |
| 176 const struct PP_Rect* position, | 178 const struct PP_Rect* position, |
| 177 const struct PP_Rect* clip); | 179 const struct PP_Rect* clip); |
| 178 void (*DidChangeFocus)(PP_Instance instance, PP_Bool has_focus); | 180 void (*DidChangeFocus)(PP_Instance instance, PP_Bool has_focus); |
| 179 PP_Bool (*HandleDocumentLoad)(PP_Instance instance, PP_Resource url_loader); | 181 PP_Bool (*HandleDocumentLoad)(PP_Instance instance, PP_Resource url_loader); |
| 180 }; | 182 }; |
| 181 /** | 183 /** |
| 182 * @} | 184 * @} |
| 183 */ | 185 */ |
| 184 | 186 |
| 185 | |
| 186 typedef struct PPP_Instance PPP_Instance_1_1; | |
| 187 | |
| 188 #endif /* PPAPI_C_PPP_INSTANCE_H_ */ | 187 #endif /* PPAPI_C_PPP_INSTANCE_H_ */ |
| 189 | 188 |
| OLD | NEW |