Chromium Code Reviews| Index: ppapi/api/dev/ppb_arraybuffer.idl |
| diff --git a/ppapi/api/dev/ppb_arraybuffer.idl b/ppapi/api/dev/ppb_arraybuffer.idl |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..99c2631d65247f0e516e1f3d402982ad1e991b7a |
| --- /dev/null |
| +++ b/ppapi/api/dev/ppb_arraybuffer.idl |
| @@ -0,0 +1,46 @@ |
| +/* 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. |
| + */ |
| + |
| +/** |
| + * This file defines the <code>PPB_ArrayBuffer_Dev</code> struct. |
| + */ |
| + |
| +label Chrome { |
| + M17 = 0.1 |
| +}; |
|
darin (slow to review)
2011/11/08 22:16:18
i guess this file should have the _dev suffix too?
|
| + |
| +/** |
| + * 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. |
| + */ |
| +interface 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. |
| + */ |
| + PP_Var Create([in] PP_Module module, |
| + [in] uint32_t size_in_bytes); |
| + /** |
| + * Returns the length of the ArrayBuffer in bytes. |
| + * |
| + * @return The length of the ArrayBuffer in bytes. |
| + */ |
| + uint32_t ByteLength([in] 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. |
| + */ |
| + mem_t GetBuffer([in] PP_Var array); |
| +}; |
| + |