@overwolf/ow-electron-packages-types 0.0.2 → 0.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/game-list.d.ts +2 -1
- package/gep-supported-games.d.ts +1 -0
- package/overlay.d.ts +89 -15
- package/package.json +2 -2
package/game-list.d.ts
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
// game list version: 8963284
|
|
2
2
|
export const enum kGameIds {
|
|
3
|
+
AmericanTruckSimulator = 10874,
|
|
3
4
|
DiabloIV = 22700,
|
|
5
|
+
EuroTruckSimulator2 = 8584,
|
|
4
6
|
LeagueofLegends = 5426,
|
|
5
|
-
LeagueofLegendsLauncher = 10902,
|
|
6
7
|
LeagueofLegendsPBE = 22848,
|
|
7
8
|
RocketLeague = 10798,
|
|
8
9
|
TeamfightTactics = 21570,
|
package/gep-supported-games.d.ts
CHANGED
package/overlay.d.ts
CHANGED
|
@@ -1,4 +1,9 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {
|
|
2
|
+
BrowserWindow,
|
|
3
|
+
BrowserWindowConstructorOptions,
|
|
4
|
+
Size,
|
|
5
|
+
WebContents,
|
|
6
|
+
} from 'electron';
|
|
2
7
|
import { EventEmitter } from 'events';
|
|
3
8
|
|
|
4
9
|
export declare type GameProcessInfo = {
|
|
@@ -11,7 +16,7 @@ export declare type GameProcessInfo = {
|
|
|
11
16
|
is32Bit?: boolean;
|
|
12
17
|
|
|
13
18
|
isElevated?: boolean;
|
|
14
|
-
}
|
|
19
|
+
};
|
|
15
20
|
|
|
16
21
|
export declare type GameInfo = {
|
|
17
22
|
id: number;
|
|
@@ -20,11 +25,11 @@ export declare type GameInfo = {
|
|
|
20
25
|
|
|
21
26
|
name: string;
|
|
22
27
|
|
|
23
|
-
supported: boolean
|
|
28
|
+
supported: boolean;
|
|
24
29
|
|
|
25
30
|
processInfo?: GameProcessInfo;
|
|
26
31
|
|
|
27
|
-
flags?: any
|
|
32
|
+
flags?: any;
|
|
28
33
|
|
|
29
34
|
type: 'Game' | 'Launcher';
|
|
30
35
|
};
|
|
@@ -52,14 +57,15 @@ export const enum PassthroughType {
|
|
|
52
57
|
}
|
|
53
58
|
|
|
54
59
|
/**
|
|
55
|
-
* Overlay
|
|
60
|
+
* Overlay rendering Z-Order
|
|
56
61
|
*/
|
|
57
62
|
export const enum ZOrderType {
|
|
58
63
|
Default,
|
|
59
|
-
TopMost
|
|
64
|
+
TopMost,
|
|
65
|
+
BottomMost,
|
|
60
66
|
}
|
|
61
67
|
|
|
62
|
-
/** Overlay
|
|
68
|
+
/** Overlay ow-electron options */
|
|
63
69
|
export interface OverlayOptions {
|
|
64
70
|
passthrough?: PassthroughType;
|
|
65
71
|
|
|
@@ -92,7 +98,7 @@ export interface IOverlayHotkey {
|
|
|
92
98
|
}
|
|
93
99
|
|
|
94
100
|
export interface GameLaunchEvent {
|
|
95
|
-
inject: (
|
|
101
|
+
inject: () => void;
|
|
96
102
|
}
|
|
97
103
|
|
|
98
104
|
/**
|
|
@@ -109,19 +115,32 @@ export interface OverlayBrowserWindow {
|
|
|
109
115
|
}
|
|
110
116
|
|
|
111
117
|
export interface InjectionError {
|
|
112
|
-
error: string
|
|
118
|
+
error: string;
|
|
113
119
|
}
|
|
114
120
|
|
|
115
121
|
export interface GameWindowInfo {
|
|
116
|
-
size: Size
|
|
117
|
-
nativeHandle: number
|
|
118
|
-
focused: boolean
|
|
119
|
-
graphics: 'd3d9' | 'd3d12' | 'd3d11' | string | undefined
|
|
122
|
+
size: Size;
|
|
123
|
+
nativeHandle: number;
|
|
124
|
+
focused: boolean;
|
|
125
|
+
graphics: 'd3d9' | 'd3d12' | 'd3d11' | string | undefined;
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
export interface GameInputInterception {
|
|
129
|
+
/**
|
|
130
|
+
* Can the Overlay window process input
|
|
131
|
+
* Related to `mixed mode when available` and/or `exclusive only` games
|
|
132
|
+
*/
|
|
133
|
+
readonly canInterceptInput?: boolean;
|
|
134
|
+
/**
|
|
135
|
+
* Overlay has full input control, blocking input from the game
|
|
136
|
+
*/
|
|
137
|
+
readonly exclusiveMode?: boolean;
|
|
120
138
|
}
|
|
121
139
|
|
|
122
140
|
export interface ActiveGameInfo {
|
|
123
|
-
gameInfo
|
|
124
|
-
gameWindowInfo: GameWindowInfo;
|
|
141
|
+
readonly gameInfo: GameInfo;
|
|
142
|
+
readonly gameWindowInfo: GameWindowInfo;
|
|
143
|
+
readonly gameInputInfo: GameInputInterception;
|
|
125
144
|
}
|
|
126
145
|
|
|
127
146
|
export declare type GameWindowUpdateReason = undefined | 'resized' | 'focus';
|
|
@@ -132,6 +151,25 @@ export declare type HotkeyCallback = (
|
|
|
132
151
|
state: HotkeyState
|
|
133
152
|
) => void;
|
|
134
153
|
|
|
154
|
+
export interface ExclusiveInputOptions {
|
|
155
|
+
/**
|
|
156
|
+
* Exclusive mode FadeIn / FadeOut duration in miliseconds.
|
|
157
|
+
*
|
|
158
|
+
* Use `0` to disable.
|
|
159
|
+
* @default 100
|
|
160
|
+
*/
|
|
161
|
+
fadeAnimateInterval?: number;
|
|
162
|
+
|
|
163
|
+
/**
|
|
164
|
+
* Exclusive mode overlay background color.
|
|
165
|
+
* Use `rgba(0,0,0,0)` to disable background color
|
|
166
|
+
*
|
|
167
|
+
* Note: Using an invalid color format (e.g: not `rgba(...)`) will throw an Error.
|
|
168
|
+
* @default 'rgba(12, 12, 12, , 0.5)'
|
|
169
|
+
*/
|
|
170
|
+
backgroundColor?: string;
|
|
171
|
+
}
|
|
172
|
+
|
|
135
173
|
export interface IOverlayHotkeys {
|
|
136
174
|
/**
|
|
137
175
|
* Register new hotkey.
|
|
@@ -200,6 +238,25 @@ export interface IOverwolfOverlayApi extends EventEmitter {
|
|
|
200
238
|
*/
|
|
201
239
|
hotkeys: IOverlayHotkeys;
|
|
202
240
|
|
|
241
|
+
/**
|
|
242
|
+
* Enters Overlay "Exclusive Mode" - meaning, the game no longer receives user
|
|
243
|
+
* input (all input will go to the overlay windows).
|
|
244
|
+
*
|
|
245
|
+
* The `game-input-exclusive-mode-changed` event fires if exclusive mode was entered.
|
|
246
|
+
*
|
|
247
|
+
* NOTE: This is only supported when getActiveGameInfo returns
|
|
248
|
+
* `"canInterceptInput" == false`. Calling this function when unsupported will
|
|
249
|
+
* be ignored and will not throw an exception.
|
|
250
|
+
*/
|
|
251
|
+
enterExclusiveMode(options?: ExclusiveInputOptions): void;
|
|
252
|
+
|
|
253
|
+
/**
|
|
254
|
+
* Exits Overlay Exclusive Mode, returning input control to the game.
|
|
255
|
+
*
|
|
256
|
+
* The `game-input-exclusive-mode-changed` event fires when exiting exclusive mode.
|
|
257
|
+
*/
|
|
258
|
+
exitExclusiveMode(): void;
|
|
259
|
+
|
|
203
260
|
/**
|
|
204
261
|
*TODO(bFox) :replace ...args
|
|
205
262
|
*/
|
|
@@ -255,4 +312,21 @@ export interface IOverwolfOverlayApi extends EventEmitter {
|
|
|
255
312
|
reason?: GameWindowUpdateReason
|
|
256
313
|
) => void
|
|
257
314
|
): this;
|
|
315
|
+
|
|
316
|
+
/**
|
|
317
|
+
* Fires when the game input interception state changes
|
|
318
|
+
*/
|
|
319
|
+
on(
|
|
320
|
+
eventName: 'game-input-interception-changed',
|
|
321
|
+
listener: (info: GameInputInterception) => void
|
|
322
|
+
): this;
|
|
323
|
+
|
|
324
|
+
/**
|
|
325
|
+
* Fires when Overlay input Exclusive Mode changes.
|
|
326
|
+
* Only relevant to `mixed mode when available` and/or `exclusive only` games
|
|
327
|
+
*/
|
|
328
|
+
on(
|
|
329
|
+
eventName: 'game-input-exclusive-mode-changed',
|
|
330
|
+
listener: (info: GameInputInterception) => void
|
|
331
|
+
): this;
|
|
258
332
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@overwolf/ow-electron-packages-types",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.4",
|
|
4
4
|
"description": "Type definition file for autocompletion and documentation purposes for ow-electron packages",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"types": "overlay.d.ts",
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
"type": "git",
|
|
21
21
|
"url": "https://github.com/overwolf/ow-electron-packages-types"
|
|
22
22
|
}
|
|
23
|
-
}
|
|
23
|
+
}
|