forked from flyover/imgui-js
-
Notifications
You must be signed in to change notification settings - Fork 0
/
emscripten.d.ts
80 lines (67 loc) · 1.99 KB
/
emscripten.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
/// <reference types="emscripten" />
export declare class EmscriptenClassHandle {
}
export declare class EmscriptenRegisteredClass {
baseClass: any;
"constructor": (...args: any[]) => this;
constructor_body: any;
downcast: number;
getActualType: () => any;
instancePrototype: EmscriptenClassHandle;
name: string;
pureVirtualFunctions: ((...args: any[]) => any)[];
rawDestructor: () => void;
upcast: number;
}
export declare class EmscriptenRegisteredPointer {
destructorFunction: ((ptr: number) => void) | null;
isConst: boolean;
isReference: boolean;
isSmartPointer: boolean;
name: string;
pointeeType: any;
rawConstructor: any;
rawDestructor: any;
rawGetPointee: any;
rawShare: any;
registeredClass: EmscriptenRegisteredClass;
sharingPolicy: any;
fromWireType: (value: any) => any;
toWireType: (destructors: any[], value: any) => number;
}
export declare class EmscriptenWireType {
ptr: number;
ptrType: EmscriptenRegisteredPointer;
count: { value: number };
}
export declare class EmscriptenClassReference {
$$: EmscriptenWireType;
}
export declare class EmscriptenClass extends EmscriptenClassReference {
delete(): void;
}
export interface EmscriptenModule {
ENVIRONMENT?: "WEB" | "WORKER" | "NODE" | "SHELL";
"arguments": any[];
thisProgram: string;
quit(status: number, toThrow: Error): void;
preRun: (() => void)[];
postRun: (() => void)[];
buffer: ArrayBuffer;
HEAP8: Int8Array;
HEAP16: Int16Array;
HEAP32: Int32Array;
HEAPU8: Uint8Array;
HEAPU16: Uint16Array;
HEAPU32: Uint32Array;
HEAPF32: Float32Array;
HEAPF64: Float64Array;
TOTAL_STACK: number;
TOTAL_MEMORY: number;
count_emval_handles(): number;
onRuntimeInitialized: () => void;
_malloc(size: number): number;
_free(ptr: number): number;
_memcpy(dst: number, src: number, num: number): number;
_memset(ptr: number, val: number, num: number): number;
}