/
init.event.ts
86 lines (77 loc) · 1.58 KB
/
init.event.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
/**
* @category Internal but public
*/
export interface InitBase {
port: string;
uuid: string;
registerEvent: string;
info: InitEventInfo;
}
/**
* @category Internal but public
*/
export interface InitPi<Settings = any> extends InitBase {
actionInfo: InitEventActionInfo<Settings>;
}
/**
* @category Internal but public
*/
export interface InitEventInfo {
application: InitEventInfoApplication;
plugin: InitEventInfoPlugin;
devicePixelRatio: number;
devices: InitEventInfoDevice[];
}
/**
* @category Internal but public
*/
export interface InitEventInfoApplication {
language: string;
platform: string;
version: string;
}
/**
* @category Internal but public
*/
export interface InitEventInfoPlugin {
version: string;
}
/**
* @category Internal but public
*/
export interface InitEventInfoDevice {
id: string;
name: string;
size: InitEventInfoDeviceSize;
type: number;
}
/**
* @category Internal but public
*/
export interface InitEventInfoDeviceSize {
columns: number;
rows: number;
}
/**
* @category Internal but public
*/
export interface InitEventActionInfo<Settings = any> {
action: string;
context: string;
device: string;
payload: InitEventActionInfoPayload<Settings>;
}
/**
* @category Internal but public
*/
export interface InitEventActionInfoPayload<Settings = any> {
settings: Settings;
coordinates: InitEventActionInfoPayloadCoordinates;
}
/**
* @category Internal but public
*/
export interface InitEventActionInfoPayloadCoordinates {
column: number;
row: number;
}