Index: ppapi/c/dev/ppb_arraybuffer.h |
diff --git a/ppapi/c/dev/ppb_arraybuffer.h b/ppapi/c/dev/ppb_arraybuffer.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..c3a91691e54e293675387b2d288b8afe3ad47d96 |
--- /dev/null |
+++ b/ppapi/c/dev/ppb_arraybuffer.h |
@@ -0,0 +1,66 @@ |
+/* Copyright (c) 2011 The Chromium Authors. All rights reserved. |
+ * Use of this source code is governed by a BSD-style license that can be |
+ * found in the LICENSE file. |
+ */ |
+ |
+/* From dev/ppb_arraybuffer.idl modified Tue Nov 8 14:56:24 2011. */ |
+ |
+#ifndef PPAPI_C_DEV_PPB_ARRAYBUFFER_H_ |
+#define PPAPI_C_DEV_PPB_ARRAYBUFFER_H_ |
+ |
+#include "ppapi/c/pp_bool.h" |
+#include "ppapi/c/pp_macros.h" |
+#include "ppapi/c/pp_module.h" |
+#include "ppapi/c/pp_stdint.h" |
+#include "ppapi/c/pp_var.h" |
+ |
+#define PPB_ARRAYBUFFER_DEV_INTERFACE_0_1 "PPB_ArrayBuffer(Dev);0.1" |
+#define PPB_ARRAYBUFFER_DEV_INTERFACE PPB_ARRAYBUFFER_DEV_INTERFACE_0_1 |
+ |
+/** |
+ * @file |
+ * This file defines the <code>PPB_ArrayBuffer_Dev</code> struct. |
+ */ |
+ |
+ |
+/** |
+ * @addtogroup Interfaces |
+ * @{ |
+ */ |
+/** |
+ * PPB_ArrayBuffer_Dev API. This provides a way to interact with JavaScript |
+ * ArrayBuffers, which are the underlying implementation for TypedArrays. |
+ * To manage the reference count for an ArrayBuffer, please see PPB_Var. |
+ */ |
+struct PPB_ArrayBuffer_Dev { |
+ /** |
+ * Create a zero-initialized ArrayBuffer. |
+ * |
+ * @param[in] module A PP_Module uniquely identifying the module. |
+ * @param[in] size_in_bytes The size of the array that will be created. |
+ * |
+ * @return A PP_Var which represents an ArrayBuffer of the requested size with |
+ * a reference count of 1. |
+ */ |
+ struct PP_Var (*Create)(PP_Module module, uint32_t size_in_bytes); |
+ /** |
+ * Returns the length of the ArrayBuffer in bytes. |
+ * |
+ * @return The length of the ArrayBuffer in bytes. |
+ */ |
+ uint32_t (*ByteLength)(struct PP_Var array); |
+ /** |
+ * Returns a pointer to the beginning of the buffer for the given array. |
+ * |
+ * @param[in] array The array whose buffer should be returned. |
+ * |
+ * @return A pointer to the buffer for this array. |
+ */ |
+ void* (*GetBuffer)(struct PP_Var array); |
+}; |
+/** |
+ * @} |
+ */ |
+ |
+#endif /* PPAPI_C_DEV_PPB_ARRAYBUFFER_H_ */ |
+ |