/* * Copyright (C)2005-2013 Haxe Foundation * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), * to deal in the Software without restriction, including without limitation * the rights to use, copy, modify, merge, publish, distribute, sublicense, * and/or sell copies of the Software, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER * DEALINGS IN THE SOFTWARE. */ // This file is generated, do not edit! package js.html; /**

The Int16Array type represents an array of twos-complement 16-bit signed integers.

Once established, you can reference elements in the array using the object's methods, or using standard array index syntax (that is, using bracket notation).



Documentation for this class was provided by MDN. */ @:native("Int16Array") extern class Int16Array extends ArrayBufferView implements ArrayAccess { /** The size, in bytes, of each array element. */ static inline var BYTES_PER_ELEMENT : Int = 2; /** The number of entries in the array. Read only. */ var length(default,null) : Int; /**
Note: In these methods, TypedArray represents any of the typed array object types.
Int16Array Int16Array(unsigned long length);
Int16Array Int16Array(TypedArray array);
Int16Array Int16Array(sequence<type> array);
Int16Array Int16Array(ArrayBuffer buffer, optional unsigned long byteOffset, optional unsigned long length);

Returns a new Int16Array object.

Int16Array Int16Array(
  unsigned long length
);

Int16Array Int16Array(
  TypedArray array
);

Int16Array Int16Array(
  sequence<type> array
);

Int16Array Int16Array(
  ArrayBuffer buffer,
  optional unsigned long byteOffset,
  optional unsigned long length
);
Parameters
length
The number of elements in the byte array. If unspecified, length of the array view will match the buffer's length.
array
An object of any of the typed array types (such as Int32Array), or a sequence of objects of a particular type, to copy into a new ArrayBuffer. Each value in the source array is converted to a 16-bit signed integer before being copied into the new array.
buffer
An existing ArrayBuffer to use as the storage for the new Int16Array object.
byteOffset
The offset, in bytes, to the first byte in the specified buffer for the new view to reference. If not specified, the Int16Array's view of the buffer will start with the first byte.
Return value

A new Int16Array object representing the specified data buffer.

*/ @:overload( function( length : Int ) : Void {} ) @:overload( function( array : Array ) : Void {} ) @:overload( function( array : Int16Array ) : Void {} ) function new( buffer : ArrayBuffer, ?byteOffset : Int, ?length : Int ) : Void; /**

Sets multiple values in the typed array, reading input values from a specified array.

Parameters
array
An array from which to copy values. All values from the source array are copied into the target array, unless the length of the source array plus the offset exceeds the length of the target array, in which case an exception is thrown. If the source array is a typed array, the two arrays may share the same underlying ArrayBuffer; the browser will intelligently copy the source range of the buffer to the destination range.
offset Optional
The offset into the target array at which to begin writing values from the source array. If you omit this value, 0 is assumed (that is, the source array will overwrite values in the target array starting at index 0).
*/ @:overload( function() :Void {} ) @:overload( function( array : Int16Array, ?offset : Int ) :Void {} ) function set( array : Array, ?offset : Int ) : Void; function subarray( start : Int, ?end : Int ) : Int16Array; }