forked from DefinitelyTyped/DefinitelyTyped
-
Notifications
You must be signed in to change notification settings - Fork 0
/
wiiu.d.ts
112 lines (101 loc) · 3.18 KB
/
wiiu.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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
// Type definitions for Extended Functionality of Wii U Internet Browser
// Project: https://www.nintendo.co.jp/wiiu/hardware/internetbrowser/extended_functionality.html
// Definitions by: MIZUSHIMA Junki <https://github.com/mzsm>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
declare namespace wiiu {
const enum TPValidity {
VALID = 0,
X_INVALID = 1,
Y_INVALID = 2,
INVALID = 3
}
const enum Button {
MINUS = 0x00000004,
SELECT = MINUS,
PLUS = 0x00000008,
START = PLUS,
R = 0x00000010,
L = 0x00000020,
ZR = 0x00000040,
ZL = 0x00000080,
DOWN = 0x00000100,
UP = 0x00000200,
RIGHT = 0x00000400,
LEFT = 0x00000800,
Y = 0x00001000,
X = 0x00002000,
B = 0x00004000,
A = 0x00008000,
R_STICK = 0x00020000,
L_STICK = 0x00040000,
R_STICK_DOWN = 0x00800000,
R_STICK_UP = 0x01000000,
R_STICK_RIGHT = 0x02000000,
R_STICK_LEFT = 0x04000000,
L_STICK_DOWN = 0x08000000,
L_STICK_UP = 0x10000000,
L_STICK_RIGHT = 0x20000000,
L_STICK_LEFT = 0x40000000
}
interface WiiuGamePad {
isEnabled: boolean;
isDataValid: boolean;
tpTouch: boolean;
tpValidity: number;
contentX: number;
contentY: number;
lStickX: number;
lStickY: number;
rStickX: number;
rStickY: number;
hold: number;
accX: number;
accY: number;
accZ: number;
gyroX: number;
gyroY: number;
gyroZ: number;
angleX: number;
angleY: number;
angleZ: number;
dirXx: number;
dirXy: number;
dirYx: number;
dirXz: number;
dirYy: number;
dirYz: number;
dirZx: number;
dirZz: number;
dirZy: number;
update(): WiiuGamePad;
}
interface VideoPlayer {
viewMode: number;
end(): boolean;
}
const enum ImageViewErrorCode {
UNSUPPORTED_FORMAT = 202,
DIMENSIONS_TOO_LARGE = 203,
FILE_SIZE_TOO_LARGE = 204,
TOO_MANY_PIXELS_PROGRESSIVE_JPEG = 205
}
interface ImageView {
viewMode: number;
end(): boolean;
getErrorCode(): number;
}
var gamepad: WiiuGamePad;
var videoplayer: VideoPlayer;
var imageview: ImageView;
}
interface HTMLElement {
addEventListener(type: "wiiu_videoplayer_end", listener: (ev: CustomEvent) => any, useCapture?: boolean): void;
}
interface Window {
wiiu: typeof wiiu;
addEventListener(type: "wiiu_imageview_start", listener: (ev: CustomEvent) => any, useCapture?: boolean): void;
addEventListener(type: "wiiu_imageview_end", listener: (ev: CustomEvent) => any, useCapture?: boolean): void;
addEventListener(type: "wiiu_imageview_change_viewmode", listener: (ev: CustomEvent) => any, useCapture?: boolean): void;
addEventListener(type: "wiiu_imageview_change_content", listener: (ev: CustomEvent) => any, useCapture?: boolean): void;
addEventListener(type: "wiiu_imageview_error", listener: (ev: CustomEvent) => any, useCapture?: boolean): void;
}