-
-
Notifications
You must be signed in to change notification settings - Fork 10
/
types.d.ts
61 lines (58 loc) · 1.66 KB
/
types.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
import type {
AnimationFrameCallback,
WindowClosedEvent,
WindowCloseEvent,
WindowDropEvent,
WindowFocusEvent,
WindowFramebufferSizeEvent,
WindowInputEvent,
WindowKeyboardEvent,
WindowMaximizeEvent,
WindowMinimizeEvent,
WindowMouseEvent,
WindowMoveEvent,
WindowRedrawRequestedEvent,
WindowRefreshEvent,
WindowResizeEvent,
WindowScrollEvent,
} from "./mod.ts";
declare global {
/** Framebuffer height of active window */
// deno-lint-ignore no-var
var innerHeight: number;
/** Framebuffer width of active window */
// deno-lint-ignore no-var
var innerWidth: number;
// deno-lint-ignore no-var
var devicePixelRatio: number;
function requestAnimationFrame(callback: AnimationFrameCallback): number;
function cancelAnimationFrame(id: number): void;
interface WindowEventMap {
close: WindowCloseEvent;
closed: WindowClosedEvent;
resize: WindowResizeEvent;
redrawRequested: WindowRedrawRequestedEvent;
keydown: WindowKeyboardEvent;
keyup: WindowKeyboardEvent;
mousedown: WindowMouseEvent;
mouseup: WindowMouseEvent;
mousemove: WindowMouseEvent;
pointerdown: WindowMouseEvent;
pointerup: WindowMouseEvent;
pointermove: WindowMouseEvent;
mouseenter: WindowMouseEvent;
mouseleave: WindowMouseEvent;
click: WindowMouseEvent;
dblclick: WindowMouseEvent;
contextmenu: WindowMouseEvent;
move: WindowMoveEvent;
refresh: WindowRefreshEvent;
focus: WindowFocusEvent;
minimize: WindowMinimizeEvent;
maximize: WindowMaximizeEvent;
input: WindowInputEvent;
framebuffersize: WindowFramebufferSizeEvent;
scroll: WindowScrollEvent;
drop: WindowDropEvent;
}
}