ghcjs-base-0.2.0.0: base library for GHCJS

Safe HaskellNone
LanguageHaskell98

JavaScript.TypedArray

Synopsis

Documentation

class TypedArray a where Source

Methods

unsafeIndex :: Int -> a -> IO (Elem a) Source

index :: Int -> a -> IO (Elem a) Source

unsafeSetIndex :: Int -> Elem a -> a -> IO () Source

setIndex :: Int -> Elem a -> a -> IO () Source

create :: Int -> IO a Source

fromArray :: SomeJSArray m -> IO a Source

fromArrayBuffer :: MutableArrayBuffer -> Int -> Maybe Int -> IO a Source

indexOf :: Int -> Elem a -> a -> IO Int Source

lastIndexOf :: Int -> Elem a -> a -> IO Int Source

type Int8Array = SomeInt8Array Immutable Source

type Int16Array = SomeInt16Array Immutable Source

type Int32Array = SomeInt32Array Immutable Source

type Uint8Array = SomeUint8Array Immutable Source

type Uint16Array = SomeUint16Array Immutable Source

type Uint32Array = SomeUint32Array Immutable Source

type Uint8ClampedArray = SomeUint8ClampedArray Immutable Source

type Float32Array = SomeFloat32Array Immutable Source

type Float64Array = SomeFloat64Array Immutable Source

length :: SomeTypedArray e m -> Int Source

length of the typed array in elements

byteLength :: SomeTypedArray e m -> Int Source

length of the array in bytes

byteOffset :: SomeTypedArray e m -> Int Source

offset of the array in the buffer

buffer :: SomeTypedArray e m -> SomeArrayBuffer m Source

the underlying buffer of the array #

subarray :: Int -> Int -> SomeTypedArray e m -> SomeTypedArray e m Source

create a view of the existing array

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

copy the elements of one typed array to another

unsafeSet :: Int -> SomeTypedArray e m -> SomeTypedArray e1 Mutable -> IO () Source