| 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 pp_var.idl modified Fri Nov 11 19:57:17 2011. */ | 6 /* From pp_var.idl modified Fri Dec 2 16:45:08 2011. */ |
| 7 | 7 |
| 8 #ifndef PPAPI_C_PP_VAR_H_ | 8 #ifndef PPAPI_C_PP_VAR_H_ |
| 9 #define PPAPI_C_PP_VAR_H_ | 9 #define PPAPI_C_PP_VAR_H_ |
| 10 | 10 |
| 11 #include "ppapi/c/pp_bool.h" | 11 #include "ppapi/c/pp_bool.h" |
| 12 #include "ppapi/c/pp_macros.h" | 12 #include "ppapi/c/pp_macros.h" |
| 13 #include "ppapi/c/pp_stdint.h" | 13 #include "ppapi/c/pp_stdint.h" |
| 14 | 14 |
| 15 /** | 15 /** |
| 16 * @file | 16 * @file |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 61 * from modules, although it is used internally for some tasks. | 61 * from modules, although it is used internally for some tasks. |
| 62 */ | 62 */ |
| 63 PP_VARTYPE_OBJECT = 6, | 63 PP_VARTYPE_OBJECT = 6, |
| 64 /** | 64 /** |
| 65 * Arrays and dictionaries are not currently supported but will be added | 65 * Arrays and dictionaries are not currently supported but will be added |
| 66 * in future revisions. These objects are reference counted so be sure | 66 * in future revisions. These objects are reference counted so be sure |
| 67 * to properly AddRef/Release them as you would with strings to ensure your | 67 * to properly AddRef/Release them as you would with strings to ensure your |
| 68 * module will continue to work with future versions of the API. | 68 * module will continue to work with future versions of the API. |
| 69 */ | 69 */ |
| 70 PP_VARTYPE_ARRAY = 7, | 70 PP_VARTYPE_ARRAY = 7, |
| 71 PP_VARTYPE_DICTIONARY = 8 | 71 PP_VARTYPE_DICTIONARY = 8, |
| 72 /** |
| 73 * ArrayBuffer represents a JavaScript ArrayBuffer. This is the type which |
| 74 * represents Typed Arrays in JavaScript. Unlike JavaScript 'Array', it is |
| 75 * only meant to contain basic numeric types, and is always stored |
| 76 * contiguously. See PPB_VarArrayBuffer_Dev for functions special to |
| 77 * ArrayBuffer vars. |
| 78 */ |
| 79 PP_VARTYPE_ARRAY_BUFFER = 9 |
| 72 } PP_VarType; | 80 } PP_VarType; |
| 73 PP_COMPILE_ASSERT_SIZE_IN_BYTES(PP_VarType, 4); | 81 PP_COMPILE_ASSERT_SIZE_IN_BYTES(PP_VarType, 4); |
| 74 /** | 82 /** |
| 75 * @} | 83 * @} |
| 76 */ | 84 */ |
| 77 | 85 |
| 78 /** | 86 /** |
| 79 * @addtogroup Structs | 87 * @addtogroup Structs |
| 80 * @{ | 88 * @{ |
| 81 */ | 89 */ |
| (...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 217 struct PP_Var result = { PP_VARTYPE_DOUBLE, 0, {PP_FALSE} }; | 225 struct PP_Var result = { PP_VARTYPE_DOUBLE, 0, {PP_FALSE} }; |
| 218 result.value.as_double = value; | 226 result.value.as_double = value; |
| 219 return result; | 227 return result; |
| 220 } | 228 } |
| 221 /** | 229 /** |
| 222 * @} | 230 * @} |
| 223 */ | 231 */ |
| 224 | 232 |
| 225 #endif /* PPAPI_C_PP_VAR_H_ */ | 233 #endif /* PPAPI_C_PP_VAR_H_ */ |
| 226 | 234 |
| OLD | NEW |