Chromium Code Reviews

Side by Side Diff: ppapi/c/dev/ppb_var_array_buffer_dev.h

Issue 8989006: Update PPAPI IDL generator to define versioned structs, and unversioned typedef. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix ppapi/tests/ forward declares to includes. Created 9 years ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | | Annotate | Revision Log
OLDNEW
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 dev/ppb_var_array_buffer_dev.idl modified Fri Dec 2 16:17:08 2011. */ 6 /* From dev/ppb_var_array_buffer_dev.idl modified Wed Dec 14 18:08:00 2011. */
7 7
8 #ifndef PPAPI_C_DEV_PPB_VAR_ARRAY_BUFFER_DEV_H_ 8 #ifndef PPAPI_C_DEV_PPB_VAR_ARRAY_BUFFER_DEV_H_
9 #define PPAPI_C_DEV_PPB_VAR_ARRAY_BUFFER_DEV_H_ 9 #define PPAPI_C_DEV_PPB_VAR_ARRAY_BUFFER_DEV_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 #include "ppapi/c/pp_var.h" 14 #include "ppapi/c/pp_var.h"
15 15
16 #define PPB_VAR_ARRAY_BUFFER_DEV_INTERFACE_0_1 "PPB_VarArrayBuffer(Dev);0.1" 16 #define PPB_VAR_ARRAY_BUFFER_DEV_INTERFACE_0_1 "PPB_VarArrayBuffer(Dev);0.1"
(...skipping 10 matching lines...)
27 * @addtogroup Interfaces 27 * @addtogroup Interfaces
28 * @{ 28 * @{
29 */ 29 */
30 /** 30 /**
31 * PPB_VarArrayBuffer_Dev API. This provides a way to interact with JavaScript 31 * PPB_VarArrayBuffer_Dev API. This provides a way to interact with JavaScript
32 * ArrayBuffers, which represent a contiguous sequence of bytes. To manage the 32 * ArrayBuffers, which represent a contiguous sequence of bytes. To manage the
33 * reference count for a VarArrayBuffer, please see PPB_Var. Note that 33 * reference count for a VarArrayBuffer, please see PPB_Var. Note that
34 * these Vars are not part of the embedding page's DOM, and can only be shared 34 * these Vars are not part of the embedding page's DOM, and can only be shared
35 * with JavaScript via pp::Instance's PostMessage and HandleMessage functions. 35 * with JavaScript via pp::Instance's PostMessage and HandleMessage functions.
36 */ 36 */
37 struct PPB_VarArrayBuffer_Dev { 37 struct PPB_VarArrayBuffer_Dev_0_1 {
38 /** 38 /**
39 * Create a zero-initialized VarArrayBuffer. 39 * Create a zero-initialized VarArrayBuffer.
40 * 40 *
41 * @param[in] size_in_bytes The size of the array buffer that will be created. 41 * @param[in] size_in_bytes The size of the array buffer that will be created.
42 * 42 *
43 * @return A PP_Var which represents an VarArrayBuffer of the requested size 43 * @return A PP_Var which represents an VarArrayBuffer of the requested size
44 * with a reference count of 1. 44 * with a reference count of 1.
45 */ 45 */
46 struct PP_Var (*Create)(uint32_t size_in_bytes); 46 struct PP_Var (*Create)(uint32_t size_in_bytes);
47 /** 47 /**
48 * Returns the length of the VarArrayBuffer in bytes. 48 * Returns the length of the VarArrayBuffer in bytes.
49 * 49 *
50 * @return The length of the VarArrayBuffer in bytes. 50 * @return The length of the VarArrayBuffer in bytes.
51 */ 51 */
52 uint32_t (*ByteLength)(struct PP_Var array); 52 uint32_t (*ByteLength)(struct PP_Var array);
53 /** 53 /**
54 * Returns a pointer to the beginning of the buffer for the given array. 54 * Returns a pointer to the beginning of the buffer for the given array.
55 * 55 *
56 * @param[in] array The array whose buffer should be returned. 56 * @param[in] array The array whose buffer should be returned.
57 * 57 *
58 * @return A pointer to the buffer for this array. 58 * @return A pointer to the buffer for this array.
59 */ 59 */
60 void* (*Map)(struct PP_Var array); 60 void* (*Map)(struct PP_Var array);
61 }; 61 };
62
63 typedef struct PPB_VarArrayBuffer_Dev_0_1 PPB_VarArrayBuffer_Dev;
62 /** 64 /**
63 * @} 65 * @}
64 */ 66 */
65 67
66 #endif /* PPAPI_C_DEV_PPB_VAR_ARRAY_BUFFER_DEV_H_ */ 68 #endif /* PPAPI_C_DEV_PPB_VAR_ARRAY_BUFFER_DEV_H_ */
67 69
OLDNEW

Powered by Google App Engine