| 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 #ifndef PPAPI_C_PPB_INSTANCE_H_ | 5 #ifndef PPAPI_C_PPB_INSTANCE_H_ |
| 6 #define PPAPI_C_PPB_INSTANCE_H_ | 6 #define PPAPI_C_PPB_INSTANCE_H_ |
| 7 | 7 |
| 8 #include "ppapi/c/pp_bool.h" | 8 #include "ppapi/c/pp_bool.h" |
| 9 #include "ppapi/c/pp_instance.h" | 9 #include "ppapi/c/pp_instance.h" |
| 10 #include "ppapi/c/pp_resource.h" | 10 #include "ppapi/c/pp_resource.h" |
| 11 #include "ppapi/c/pp_var.h" | 11 #include "ppapi/c/pp_var.h" |
| 12 | 12 |
| 13 #define PPB_INSTANCE_INTERFACE_0_4 "PPB_Instance;0.4" | 13 #define PPB_INSTANCE_INTERFACE_0_4 "PPB_Instance;0.4" |
| 14 #define PPB_INSTANCE_INTERFACE_0_5 "PPB_Instance;0.5" | 14 #define PPB_INSTANCE_INTERFACE_0_5 "PPB_Instance;0.5" |
| 15 #define PPB_INSTANCE_INTERFACE_1_0 "PPB_Instance;1.0" | |
| 16 #ifdef PPAPI_INSTANCE_REMOVE_SCRIPTING | 15 #ifdef PPAPI_INSTANCE_REMOVE_SCRIPTING |
| 17 #define PPB_INSTANCE_INTERFACE PPB_INSTANCE_INTERFACE_1_0 | 16 #define PPB_INSTANCE_INTERFACE PPB_INSTANCE_INTERFACE_0_5 |
| 18 #else | 17 #else |
| 19 #define PPB_INSTANCE_INTERFACE PPB_INSTANCE_INTERFACE_0_4 | 18 #define PPB_INSTANCE_INTERFACE PPB_INSTANCE_INTERFACE_0_4 |
| 20 #endif | 19 #endif |
| 21 | 20 |
| 22 /** | 21 /** |
| 23 * @file | 22 * @file |
| 24 * This file defines the PPB_Instance interface implemented by the | 23 * This file defines the PPB_Instance interface implemented by the |
| 25 * browser and containing pointers to functions related to | 24 * browser and containing pointers to functions related to |
| 26 * the module instance on a web page. | 25 * the module instance on a web page. |
| 27 * | 26 * |
| 28 * @addtogroup Interfaces | 27 * @addtogroup Interfaces |
| 29 * @{ | 28 * @{ |
| 30 */ | 29 */ |
| 31 | 30 |
| 32 /** | 31 /** |
| 33 * The PPB_Instance interface contains pointers to functions | 32 * The PPB_Instance interface contains pointers to functions |
| 34 * related to the module instance on a web page. | 33 * related to the module instance on a web page. |
| 35 * | 34 * |
| 36 */ | 35 */ |
| 37 | 36 |
| 38 #ifdef PPAPI_INSTANCE_REMOVE_SCRIPTING | 37 #ifdef PPAPI_INSTANCE_REMOVE_SCRIPTING |
| 39 struct PPB_Instance { | 38 struct PPB_Instance { |
| 40 #else | 39 #else |
| 41 struct PPB_Instance_1_0 { | 40 struct PPB_Instance_0_5 { |
| 42 #endif | 41 #endif |
| 43 /** | 42 /** |
| 44 * BindGraphics() binds the given graphics as the current drawing surface. | 43 * BindGraphics() binds the given graphics as the current drawing surface. |
| 45 * The contents of this device is what will be displayed in the module's | 44 * The contents of this device is what will be displayed in the module's |
| 46 * area on the web page. The device must be a 2D or a 3D device. | 45 * area on the web page. The device must be a 2D or a 3D device. |
| 47 * | 46 * |
| 48 * You can pass a <code>NULL</code> resource as the device parameter to | 47 * You can pass a <code>NULL</code> resource as the device parameter to |
| 49 * unbind all devices from the given instance. The instance will then appear | 48 * unbind all devices from the given instance. The instance will then appear |
| 50 * transparent. Re-binding the same device will return <code>PP_TRUE</code> | 49 * transparent. Re-binding the same device will return <code>PP_TRUE</code> |
| 51 * and will do nothing. Unbinding a device will drop any pending flush | 50 * and will do nothing. Unbinding a device will drop any pending flush |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 94 struct PP_Var (*GetWindowObject)(PP_Instance instance); | 93 struct PP_Var (*GetWindowObject)(PP_Instance instance); |
| 95 struct PP_Var (*GetOwnerElementObject)(PP_Instance instance); | 94 struct PP_Var (*GetOwnerElementObject)(PP_Instance instance); |
| 96 PP_Bool (*BindGraphics)(PP_Instance instance, PP_Resource device); | 95 PP_Bool (*BindGraphics)(PP_Instance instance, PP_Resource device); |
| 97 PP_Bool (*IsFullFrame)(PP_Instance instance); | 96 PP_Bool (*IsFullFrame)(PP_Instance instance); |
| 98 struct PP_Var (*ExecuteScript)(PP_Instance instance, | 97 struct PP_Var (*ExecuteScript)(PP_Instance instance, |
| 99 struct PP_Var script, | 98 struct PP_Var script, |
| 100 struct PP_Var* exception); | 99 struct PP_Var* exception); |
| 101 }; | 100 }; |
| 102 | 101 |
| 103 #ifdef PPAPI_INSTANCE_REMOVE_SCRIPTING | 102 #ifdef PPAPI_INSTANCE_REMOVE_SCRIPTING |
| 104 typedef struct PPB_Instance PPB_Instance_1_0; | 103 typedef struct PPB_Instance PPB_Instance_0_5; |
| 105 #else | 104 #else |
| 106 typedef struct PPB_Instance PPB_Instance_0_4; | 105 typedef struct PPB_Instance PPB_Instance_0_4; |
| 107 #endif | 106 #endif |
| 108 | 107 |
| 109 /** | 108 /** |
| 110 * @} | 109 * @} |
| 111 */ | 110 */ |
| 112 | 111 |
| 113 #endif /* PPAPI_C_PPB_INSTANCE_H_ */ | 112 #endif /* PPAPI_C_PPB_INSTANCE_H_ */ |
| 114 | 113 |
| OLD | NEW |