| 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" |  | 
| 12 | 11 | 
| 13 #define PPB_INSTANCE_INTERFACE_0_4 "PPB_Instance;0.4" |  | 
| 14 #define PPB_INSTANCE_INTERFACE_0_5 "PPB_Instance;0.5" | 12 #define PPB_INSTANCE_INTERFACE_0_5 "PPB_Instance;0.5" | 
| 15 #define PPB_INSTANCE_INTERFACE_1_0 "PPB_Instance;1.0" | 13 #define PPB_INSTANCE_INTERFACE_1_0 "PPB_Instance;1.0" | 
| 16 #ifdef PPAPI_INSTANCE_REMOVE_SCRIPTING |  | 
| 17 #define PPB_INSTANCE_INTERFACE PPB_INSTANCE_INTERFACE_1_0 | 14 #define PPB_INSTANCE_INTERFACE PPB_INSTANCE_INTERFACE_1_0 | 
| 18 #else |  | 
| 19 #define PPB_INSTANCE_INTERFACE PPB_INSTANCE_INTERFACE_0_4 |  | 
| 20 #endif |  | 
| 21 | 15 | 
| 22 /** | 16 /** | 
| 23  * @file | 17  * @file | 
| 24  * This file defines the PPB_Instance interface implemented by the | 18  * This file defines the PPB_Instance interface implemented by the | 
| 25  * browser and containing pointers to functions related to | 19  * browser and containing pointers to functions related to | 
| 26  * the module instance on a web page. | 20  * the module instance on a web page. | 
| 27  * | 21  * | 
| 28  * @addtogroup Interfaces | 22  * @addtogroup Interfaces | 
| 29  * @{ | 23  * @{ | 
| 30  */ | 24  */ | 
| 31 | 25 | 
| 32 /** | 26 /** | 
| 33  * The PPB_Instance interface contains pointers to functions | 27  * The PPB_Instance interface contains pointers to functions | 
| 34  * related to the module instance on a web page. | 28  * related to the module instance on a web page. | 
| 35  * | 29  * | 
| 36  */ | 30  */ | 
| 37 | 31 | 
| 38 #ifdef PPAPI_INSTANCE_REMOVE_SCRIPTING |  | 
| 39 struct PPB_Instance { | 32 struct PPB_Instance { | 
| 40 #else |  | 
| 41 struct PPB_Instance_1_0 { |  | 
| 42 #endif |  | 
| 43   /** | 33   /** | 
| 44    * BindGraphics() binds the given graphics as the current drawing surface. | 34    * 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 | 35    * 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. | 36    * area on the web page. The device must be a 2D or a 3D device. | 
| 47    * | 37    * | 
| 48    * You can pass a <code>NULL</code> resource as the device parameter to | 38    * 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 | 39    * 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> | 40    * 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 | 41    * and will do nothing. Unbinding a device will drop any pending flush | 
| 52    * callbacks. | 42    * callbacks. | 
| (...skipping 26 matching lines...) Expand all  Loading... | 
| 79    * @param[in] instance A <code>PP_Instance</code> indentifying one instance | 69    * @param[in] instance A <code>PP_Instance</code> indentifying one instance | 
| 80    * of a module. | 70    * of a module. | 
| 81    * | 71    * | 
| 82    * @return A <code>PP_Bool</code> containing <code>PP_TRUE<code> if the | 72    * @return A <code>PP_Bool</code> containing <code>PP_TRUE<code> if the | 
| 83    * instance is full-frame. | 73    * instance is full-frame. | 
| 84    */ | 74    */ | 
| 85   PP_Bool (*IsFullFrame)(PP_Instance instance); | 75   PP_Bool (*IsFullFrame)(PP_Instance instance); | 
| 86 | 76 | 
| 87 }; | 77 }; | 
| 88 | 78 | 
| 89 #ifdef PPAPI_INSTANCE_REMOVE_SCRIPTING |  | 
| 90 struct PPB_Instance_0_4 { |  | 
| 91 #else |  | 
| 92 struct PPB_Instance { |  | 
| 93 #endif |  | 
| 94   struct PP_Var (*GetWindowObject)(PP_Instance instance); |  | 
| 95   struct PP_Var (*GetOwnerElementObject)(PP_Instance instance); |  | 
| 96   PP_Bool (*BindGraphics)(PP_Instance instance, PP_Resource device); |  | 
| 97   PP_Bool (*IsFullFrame)(PP_Instance instance); |  | 
| 98   struct PP_Var (*ExecuteScript)(PP_Instance instance, |  | 
| 99                                  struct PP_Var script, |  | 
| 100                                  struct PP_Var* exception); |  | 
| 101 }; |  | 
| 102 |  | 
| 103 #ifdef PPAPI_INSTANCE_REMOVE_SCRIPTING |  | 
| 104 typedef struct PPB_Instance PPB_Instance_1_0; | 79 typedef struct PPB_Instance PPB_Instance_1_0; | 
| 105 #else |  | 
| 106 typedef struct PPB_Instance PPB_Instance_0_4; |  | 
| 107 #endif |  | 
| 108 | 80 | 
| 109 /** | 81 /** | 
| 110  * @} | 82  * @} | 
| 111  */ | 83  */ | 
| 112 | 84 | 
| 113 #endif  /* PPAPI_C_PPB_INSTANCE_H_ */ | 85 #endif  /* PPAPI_C_PPB_INSTANCE_H_ */ | 
| 114 | 86 | 
| OLD | NEW | 
|---|