OLD | NEW |
---|---|
(Empty) | |
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 | |
3 * found in the LICENSE file. | |
4 */ | |
5 | |
6 /** | |
7 * This file defines the <code>PPB_ArrayBuffer_Dev</code> struct. | |
8 */ | |
9 | |
10 label Chrome { | |
11 M17 = 0.1 | |
12 }; | |
darin (slow to review)
2011/11/08 22:16:18
i guess this file should have the _dev suffix too?
| |
13 | |
14 /** | |
15 * PPB_ArrayBuffer_Dev API. This provides a way to interact with JavaScript | |
16 * ArrayBuffers, which are the underlying implementation for TypedArrays. | |
17 * To manage the reference count for an ArrayBuffer, please see PPB_Var. | |
18 */ | |
19 interface PPB_ArrayBuffer_Dev { | |
20 /** | |
21 * Create a zero-initialized ArrayBuffer. | |
22 * | |
23 * @param[in] module A PP_Module uniquely identifying the module. | |
24 * @param[in] size_in_bytes The size of the array that will be created. | |
25 * | |
26 * @return A PP_Var which represents an ArrayBuffer of the requested size with | |
27 * a reference count of 1. | |
28 */ | |
29 PP_Var Create([in] PP_Module module, | |
30 [in] uint32_t size_in_bytes); | |
31 /** | |
32 * Returns the length of the ArrayBuffer in bytes. | |
33 * | |
34 * @return The length of the ArrayBuffer in bytes. | |
35 */ | |
36 uint32_t ByteLength([in] PP_Var array); | |
37 /** | |
38 * Returns a pointer to the beginning of the buffer for the given array. | |
39 * | |
40 * @param[in] array The array whose buffer should be returned. | |
41 * | |
42 * @return A pointer to the buffer for this array. | |
43 */ | |
44 mem_t GetBuffer([in] PP_Var array); | |
45 }; | |
46 | |
OLD | NEW |