| 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 |
| 6 /* From ppb_instance.idl modified Mon Jul 18 12:54:08 2011. */ |
| 7 |
| 5 #ifndef PPAPI_C_PPB_INSTANCE_H_ | 8 #ifndef PPAPI_C_PPB_INSTANCE_H_ |
| 6 #define PPAPI_C_PPB_INSTANCE_H_ | 9 #define PPAPI_C_PPB_INSTANCE_H_ |
| 7 | 10 |
| 8 #include "ppapi/c/pp_bool.h" | 11 #include "ppapi/c/pp_bool.h" |
| 9 #include "ppapi/c/pp_instance.h" | 12 #include "ppapi/c/pp_instance.h" |
| 13 #include "ppapi/c/pp_macros.h" |
| 10 #include "ppapi/c/pp_resource.h" | 14 #include "ppapi/c/pp_resource.h" |
| 11 | 15 #include "ppapi/c/pp_stdint.h" |
| 12 #define PPB_INSTANCE_INTERFACE_0_5 "PPB_Instance;0.5" | 16 #include "ppapi/c/pp_var.h" |
| 13 #define PPB_INSTANCE_INTERFACE_1_0 "PPB_Instance;1.0" | |
| 14 #define PPB_INSTANCE_INTERFACE PPB_INSTANCE_INTERFACE_1_0 | |
| 15 | 17 |
| 16 /** | 18 /** |
| 17 * @file | 19 * @file |
| 18 * This file defines the PPB_Instance interface implemented by the | 20 * This file defines the PPB_Instance interface implemented by the |
| 19 * browser and containing pointers to functions related to | 21 * browser and containing pointers to functions related to |
| 20 * the module instance on a web page. | 22 * the module instance on a web page. |
| 21 * | 23 */ |
| 24 |
| 25 |
| 26 /** |
| 22 * @addtogroup Interfaces | 27 * @addtogroup Interfaces |
| 23 * @{ | 28 * @{ |
| 24 */ | 29 */ |
| 25 | |
| 26 /** | 30 /** |
| 27 * The PPB_Instance interface contains pointers to functions | 31 * The PPB_Instance interface contains pointers to functions |
| 28 * related to the module instance on a web page. | 32 * related to the module instance on a web page. |
| 29 * | |
| 30 */ | 33 */ |
| 34 #define PPB_INSTANCE_INTERFACE_0_5 "PPB_Instance;0.5" |
| 35 #define PPB_INSTANCE_INTERFACE_1_0 "PPB_Instance;1.0" |
| 36 #define PPB_INSTANCE_INTERFACE PPB_INSTANCE_INTERFACE_1_0 |
| 31 | 37 |
| 32 struct PPB_Instance { | 38 struct PPB_Instance { |
| 33 /** | 39 /** |
| 34 * BindGraphics() binds the given graphics as the current drawing surface. | 40 * BindGraphics() binds the given graphics as the current drawing surface. |
| 35 * The contents of this device is what will be displayed in the module's | 41 * The contents of this device is what will be displayed in the module's |
| 36 * area on the web page. The device must be a 2D or a 3D device. | 42 * area on the web page. The device must be a 2D or a 3D device. |
| 37 * | 43 * |
| 38 * You can pass a <code>NULL</code> resource as the device parameter to | 44 * You can pass a <code>NULL</code> resource as the device parameter to |
| 39 * unbind all devices from the given instance. The instance will then appear | 45 * unbind all devices from the given instance. The instance will then appear |
| 40 * transparent. Re-binding the same device will return <code>PP_TRUE</code> | 46 * transparent. Re-binding the same device will return <code>PP_TRUE</code> |
| (...skipping 10 matching lines...) Expand all Loading... |
| 51 * | 57 * |
| 52 * @param[in] instance A PP_Instance indentifying one instance of a module. | 58 * @param[in] instance A PP_Instance indentifying one instance of a module. |
| 53 * @param[in] device A PP_Resource representing the graphics device. | 59 * @param[in] device A PP_Resource representing the graphics device. |
| 54 * | 60 * |
| 55 * @return <code>PP_Bool</code> containing <code>PP_TRUE</code> if bind was | 61 * @return <code>PP_Bool</code> containing <code>PP_TRUE</code> if bind was |
| 56 * successful or <code>PP_FALSE</code> if the device was not the correct | 62 * successful or <code>PP_FALSE</code> if the device was not the correct |
| 57 * type. On success, a reference to the device will be held by the | 63 * type. On success, a reference to the device will be held by the |
| 58 * instance, so the caller can release its reference if it chooses. | 64 * instance, so the caller can release its reference if it chooses. |
| 59 */ | 65 */ |
| 60 PP_Bool (*BindGraphics)(PP_Instance instance, PP_Resource device); | 66 PP_Bool (*BindGraphics)(PP_Instance instance, PP_Resource device); |
| 61 | |
| 62 /** | 67 /** |
| 63 * IsFullFrame() determines if the module instance is full-frame (repr). | 68 * IsFullFrame() determines if the module instance is full-frame (repr). |
| 64 * Such a module represents the entire document in a frame rather than an | 69 * Such a module represents the entire document in a frame rather than an |
| 65 * embedded resource. This can happen if the user does a top-level | 70 * embedded resource. This can happen if the user does a top-level |
| 66 * navigation or the page specifies an iframe to a resource with a MIME | 71 * navigation or the page specifies an iframe to a resource with a MIME |
| 67 * type registered by the module. | 72 * type registered by the module. |
| 68 * | 73 * |
| 69 * @param[in] instance A <code>PP_Instance</code> indentifying one instance | 74 * @param[in] instance A <code>PP_Instance</code> indentifying one instance |
| 70 * of a module. | 75 * of a module. |
| 71 * | 76 * |
| 72 * @return A <code>PP_Bool</code> containing <code>PP_TRUE<code> if the | 77 * @return A <code>PP_Bool</code> containing <code>PP_TRUE<code> if the |
| 73 * instance is full-frame. | 78 * instance is full-frame. |
| 74 */ | 79 */ |
| 75 PP_Bool (*IsFullFrame)(PP_Instance instance); | 80 PP_Bool (*IsFullFrame)(PP_Instance instance); |
| 76 | |
| 77 }; | 81 }; |
| 78 | |
| 79 typedef struct PPB_Instance PPB_Instance_1_0; | |
| 80 | |
| 81 /** | 82 /** |
| 82 * @} | 83 * @} |
| 83 */ | 84 */ |
| 84 | 85 |
| 85 #endif /* PPAPI_C_PPB_INSTANCE_H_ */ | 86 #endif /* PPAPI_C_PPB_INSTANCE_H_ */ |
| 86 | 87 |
| OLD | NEW |