UNPKG

@bitblit/asyncglk

Version:
21 lines (20 loc) 1.15 kB
export type GlkTypedArray = Uint8Array | Uint32Array; export type GlkTypedArrayConstructor = Uint8ArrayConstructor | Uint32ArrayConstructor; /** A DataView with support for getting and setting arrays and four character codes */ export declare class FileView extends DataView { constructor(array: Uint8Array); constructor(buffer: ArrayBuffer, byteOffset?: number, byteLength?: number); getFourCC(index: number): string; getUint8Subarray(index?: number, length?: number): Uint8Array; setFourCC(index: number, text: string): void; setUint8Array(index: number, data: Uint8Array): void; } /** Write a Uint32Array as a big-endian Uint8Array */ export declare function Array_to_BEBuffer(arr: Uint32Array): Uint8Array; /** Read a big-endian Uint8Array into a Uint32Array */ export declare function BEBuffer_to_Array(buf: Uint8Array): Uint32Array; /** If we can determine that the browser is currently pinch zoomed */ export declare function is_pinch_zoomed(): boolean; export declare function is_unicode_array(arr: GlkTypedArray): boolean; export declare const utf8decoder: TextDecoder; export declare const utf8encoder: TextEncoder;