jSObjectMakeTypedArrayWithArrayBufferAndOffset top-level property

Pointer<NativeType> Function(Pointer<NativeType> ctx, int arrayType, Pointer<NativeType> buffer, int byteOffset, int length, Pointer<Pointer<NativeType>> exception) jSObjectMakeTypedArrayWithArrayBufferAndOffset
final

Creates a JavaScript Typed Array object from an existing JavaScript Array Buffer object with the given offset and length. ctx (JSContextRef) The execution context to use. arrayType (JSTypedArrayType) A value identifying the type of array to create. If arrayType is kJSTypedArrayTypeNone or kJSTypedArrayTypeArrayBuffer then NULL will be returned. buffer (JSObjectRef) An Array Buffer object that should be used as the backing store for the created JavaScript Typed Array object. byteOffset (size_t) The byte offset for the created Typed Array. byteOffset should aligned with the element size of arrayType. length (size_t) The number of elements to include in the Typed Array. exception (JSValueRef*) A pointer to a JSValueRef in which to store an exception, if any. Pass NULL if you do not care to store an exception. @result (JSObjectRef) A JSObjectRef that is a Typed Array or NULL if there was an error. The backing store of the Typed Array will be buffer.

Implementation

final Pointer Function(Pointer ctx, int arrayType, Pointer buffer,
        int byteOffset, int length, Pointer<Pointer> exception)
    jSObjectMakeTypedArrayWithArrayBufferAndOffset = JscFfi.lib
        .lookup<
            NativeFunction<
                Pointer Function(Pointer, Int8, Pointer, Uint32, Uint32,
                    Pointer)>>('JSObjectMakeTypedArrayWithArrayBufferAndOffset')
        .asFunction();