Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(331)

Unified Diff: ppapi/api/dev/ppb_arraybuffer.idl

Issue 8502030: Draft of a PPAPI interface for ArrayBuffer and typed arrays. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Oops, remove Resize Created 9 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | ppapi/api/pp_var.idl » ('j') | ppapi/api/pp_var.idl » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
+};
+
« no previous file with comments | « no previous file | ppapi/api/pp_var.idl » ('j') | ppapi/api/pp_var.idl » ('J')

Powered by Google App Engine
This is Rietveld 408576698