jsaddle-0.9.7.1: Interface for JavaScript that works with GHCJS and GHC

Safe HaskellNone
LanguageHaskell2010

JavaScript.TypedArray

Synopsis

Documentation

class TypedArray a where Source #

Methods

unsafeIndex :: Int -> a -> JSM (Elem a) Source #

index :: Int -> a -> JSM (Elem a) Source #

unsafeSetIndex :: Int -> Elem a -> a -> JSM () Source #

setIndex :: Int -> Elem a -> a -> JSM () Source #

create :: Int -> JSM a Source #

fromArray :: SomeJSArray m -> JSM a Source #

fromArrayBuffer :: MutableArrayBuffer -> Int -> Maybe Int -> JSM a Source #

indexOf :: Int -> Elem a -> a -> JSM Int Source #

lastIndexOf :: Int -> Elem a -> a -> JSM Int Source #

Instances
TypedArray IOFloat64Array Source # 
Instance details

Defined in JavaScript.TypedArray.Internal

TypedArray IOFloat32Array Source # 
Instance details

Defined in JavaScript.TypedArray.Internal

TypedArray IOUint8ClampedArray Source # 
Instance details

Defined in JavaScript.TypedArray.Internal

TypedArray IOUint32Array Source # 
Instance details

Defined in JavaScript.TypedArray.Internal

TypedArray IOUint16Array Source # 
Instance details

Defined in JavaScript.TypedArray.Internal

TypedArray IOUint8Array Source # 
Instance details

Defined in JavaScript.TypedArray.Internal

TypedArray IOInt32Array Source # 
Instance details

Defined in JavaScript.TypedArray.Internal

TypedArray IOInt16Array Source # 
Instance details

Defined in JavaScript.TypedArray.Internal

TypedArray IOInt8Array Source # 
Instance details

Defined in JavaScript.TypedArray.Internal

length :: SomeTypedArray e m -> GHCJSPure Int Source #

length of the typed array in elements

byteLength :: SomeTypedArray e m -> GHCJSPure Int Source #

length of the array in bytes

byteOffset :: SomeTypedArray e m -> GHCJSPure Int Source #

offset of the array in the buffer

buffer :: SomeTypedArray e m -> GHCJSPure (SomeArrayBuffer m) Source #

the underlying buffer of the array

subarray :: Int -> Int -> SomeTypedArray e m -> GHCJSPure (SomeTypedArray e m) Source #

create a view of the existing array

set :: Int -> SomeTypedArray e m -> SomeTypedArray e1 Mutable -> GHCJSPure () Source #

copy the elements of one typed array to another