@overlayed/app 0.10.2 → 0.12.0
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/dist/index.d.ts +782 -641
- package/dist/index.js +6843 -1206
- package/dist/preload.d.ts +1 -1
- package/dist/siege.d.ts +2852 -2072
- package/dist/siege.js +449 -125
- package/package.json +2 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,32 +1,35 @@
|
|
|
1
1
|
/// <reference types="electron" />
|
|
2
2
|
/// <reference types="node" />
|
|
3
3
|
|
|
4
|
-
import { BrowserWindow } from
|
|
5
|
-
import { electron } from
|
|
6
|
-
import { Module } from
|
|
7
|
-
import { ObjectType } from
|
|
8
|
-
import { Out } from
|
|
9
|
-
import { Process } from
|
|
4
|
+
import { BrowserWindow } from "electron";
|
|
5
|
+
import { electron } from "electron";
|
|
6
|
+
import { Module } from "arktype";
|
|
7
|
+
import { ObjectType } from "arktype/internal/methods/object.ts";
|
|
8
|
+
import { Out } from "arktype/internal/attributes.ts";
|
|
9
|
+
import { Process } from "@overlayed-gg/native-interface";
|
|
10
10
|
|
|
11
11
|
export const enum AccessLevel {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
12
|
+
Default = 0,
|
|
13
|
+
Global = 1,
|
|
14
|
+
Admin = 2,
|
|
15
|
+
}
|
|
16
16
|
|
|
17
17
|
export declare type ActiveGameInfo = {
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
18
|
+
isConnected: boolean;
|
|
19
|
+
resolution: {
|
|
20
|
+
width: number;
|
|
21
|
+
height: number;
|
|
22
|
+
};
|
|
23
23
|
};
|
|
24
24
|
|
|
25
|
-
declare const BaseEvent: ObjectType<
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
25
|
+
declare const BaseEvent: ObjectType<
|
|
26
|
+
{
|
|
27
|
+
game: string;
|
|
28
|
+
type: string;
|
|
29
|
+
creation_time: number;
|
|
30
|
+
},
|
|
31
|
+
{}
|
|
32
|
+
>;
|
|
30
33
|
|
|
31
34
|
declare type BaseEvent = typeof BaseEvent.infer;
|
|
32
35
|
|
|
@@ -58,107 +61,98 @@ declare type BaseEvent = typeof BaseEvent.infer;
|
|
|
58
61
|
* ```
|
|
59
62
|
*/
|
|
60
63
|
declare type Brand<Base, Branding, ReservedName extends string = "__type__"> = Base & {
|
|
61
|
-
|
|
64
|
+
[K in ReservedName]: Branding;
|
|
62
65
|
} & { __witness__: Base };
|
|
63
66
|
|
|
64
|
-
declare interface CortexEvents extends Record<string, unknown> {
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
declare interface CortexLogs extends Record<string, unknown> {
|
|
68
|
-
}
|
|
67
|
+
declare interface CortexEvents extends Record<string, unknown> {}
|
|
69
68
|
|
|
70
69
|
declare type CustomLoggerScope = ReturnType<typeof Logger.prototype.scope>;
|
|
71
70
|
|
|
72
71
|
declare type ErrorEvents = ErrorPipeServerError | ErrorInvalidConfigFile;
|
|
73
72
|
|
|
74
73
|
declare interface ErrorInvalidConfigFile extends ErrorManagerEvent {
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
74
|
+
code: "INVALID_CONFIG_FILE";
|
|
75
|
+
data: {
|
|
76
|
+
issues: string[];
|
|
77
|
+
filePath: string;
|
|
78
|
+
data: unknown;
|
|
79
|
+
};
|
|
81
80
|
}
|
|
82
81
|
|
|
83
82
|
declare type ErrorManagerEvent = {
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
83
|
+
code: string;
|
|
84
|
+
message: string;
|
|
85
|
+
data: Record<string, any>;
|
|
86
|
+
timestamp: number;
|
|
88
87
|
};
|
|
89
88
|
|
|
90
89
|
declare type ErrorManagerEvents = {
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
90
|
+
fatal: FatalEvents;
|
|
91
|
+
error: ErrorEvents;
|
|
92
|
+
warning: WarningEvents;
|
|
94
93
|
};
|
|
95
94
|
|
|
96
95
|
declare interface ErrorPipeServerError extends ErrorManagerEvent {
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
96
|
+
code: "PIPE_SERVER_ERROR";
|
|
97
|
+
data: {
|
|
98
|
+
error: unknown;
|
|
99
|
+
};
|
|
101
100
|
}
|
|
102
101
|
|
|
103
|
-
declare type EventCallback<TEvent extends BaseEvent, TEventType extends EventType<TEvent>> = (
|
|
104
|
-
|
|
105
|
-
|
|
102
|
+
declare type EventCallback<TEvent extends BaseEvent, TEventType extends EventType<TEvent>> = (
|
|
103
|
+
event: Extract<
|
|
104
|
+
TEvent,
|
|
105
|
+
{
|
|
106
|
+
type: TEventType;
|
|
107
|
+
}
|
|
108
|
+
>,
|
|
109
|
+
) => void;
|
|
106
110
|
|
|
107
111
|
declare type EventType<TEvent extends BaseEvent> = TEvent["type"];
|
|
108
112
|
|
|
109
113
|
declare interface FatalElevationMismatch extends ErrorManagerEvent {
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
114
|
+
code: "ELEVATION_MISMATCH";
|
|
115
|
+
data: {
|
|
116
|
+
appElevated: boolean;
|
|
117
|
+
gameElevated: boolean;
|
|
118
|
+
};
|
|
115
119
|
}
|
|
116
120
|
|
|
117
121
|
declare type FatalEvents = FatalElevationMismatch;
|
|
118
122
|
|
|
119
123
|
export declare type GameLaunchManagerEvents = {
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
game: string;
|
|
126
|
-
reject: () => void;
|
|
127
|
-
}) => MaybePromise<boolean>;
|
|
128
|
-
gameClose: (args: {
|
|
129
|
-
game: string;
|
|
130
|
-
}) => MaybePromise<void>;
|
|
131
|
-
gameReady: (args: {
|
|
132
|
-
game: string;
|
|
133
|
-
}) => MaybePromise<void>;
|
|
134
|
-
gameReadyInternal: (args: {
|
|
135
|
-
ravenGame: GameModel;
|
|
136
|
-
process: Process;
|
|
137
|
-
}) => MaybePromise<void>;
|
|
124
|
+
gameCloseInternal: (args: { ravenGame: GameModel; process: Process }) => MaybePromise<void>;
|
|
125
|
+
gameLaunch: (args: { game: string; reject: () => void }) => MaybePromise<boolean>;
|
|
126
|
+
gameClose: (args: { game: string }) => MaybePromise<void>;
|
|
127
|
+
gameReady: (args: { game: string }) => MaybePromise<void>;
|
|
128
|
+
gameReadyInternal: (args: { ravenGame: GameModel; process: Process }) => MaybePromise<void>;
|
|
138
129
|
};
|
|
139
130
|
|
|
140
131
|
declare interface GameModel {
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
132
|
+
name: string;
|
|
133
|
+
identifier: Brand<string, GameModel>;
|
|
134
|
+
modules: string[];
|
|
135
|
+
executables: string[];
|
|
145
136
|
}
|
|
146
137
|
|
|
147
|
-
declare interface GameModule<
|
|
148
|
-
|
|
149
|
-
|
|
138
|
+
declare interface GameModule<
|
|
139
|
+
TEvents extends Record<string, BaseEvent> = Record<string, BaseEvent>,
|
|
140
|
+
TKey extends string = string,
|
|
141
|
+
> {
|
|
142
|
+
key: TKey;
|
|
143
|
+
events: Module<GameModuleEvent<TEvents>>;
|
|
150
144
|
}
|
|
151
145
|
|
|
152
146
|
declare type GameModuleEvent<TEvents extends Record<string, BaseEvent>> = TEvents & {
|
|
153
|
-
|
|
147
|
+
event: BaseEvent;
|
|
154
148
|
};
|
|
155
149
|
|
|
156
150
|
declare type GameModuleEventInfer<TModule extends GameModule> = TModule["events"]["event"]["infer"];
|
|
157
151
|
|
|
158
152
|
declare type KeybindCallbacks = {
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
153
|
+
toggle?: KeybindPressedCallback;
|
|
154
|
+
down?: KeybindDownCallback;
|
|
155
|
+
up?: KeybindUpCallback;
|
|
162
156
|
};
|
|
163
157
|
|
|
164
158
|
export declare type KeybindConfig = (typeof KeybindSchema.infer)[string];
|
|
@@ -167,637 +161,784 @@ declare type KeybindDownCallback = () => string | void;
|
|
|
167
161
|
|
|
168
162
|
declare type KeybindPressedCallback = () => string | void;
|
|
169
163
|
|
|
170
|
-
declare const KeybindSchema: ObjectType<
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
}
|
|
164
|
+
declare const KeybindSchema: ObjectType<
|
|
165
|
+
{
|
|
166
|
+
[x: string]: {
|
|
167
|
+
keys: string[];
|
|
168
|
+
mode: (In: "toggle" | "hold") => Out<"toggle" | "hold">;
|
|
169
|
+
};
|
|
170
|
+
},
|
|
171
|
+
{}
|
|
172
|
+
>;
|
|
176
173
|
|
|
177
174
|
declare type KeybindUpCallback = () => void;
|
|
178
175
|
|
|
179
176
|
export interface KeyboardKeyEvent extends WindowEvent {
|
|
180
|
-
|
|
181
|
-
|
|
177
|
+
key: VirtualKey;
|
|
178
|
+
}
|
|
182
179
|
|
|
183
|
-
declare const Logger = AsSingleton(LoggerClass);
|
|
180
|
+
declare const Logger = AsSingleton(LoggerClass, "main.log");
|
|
181
|
+
|
|
182
|
+
declare interface LoggerScope {
|
|
183
|
+
scope: (name: string) => LoggerScope;
|
|
184
|
+
error: (...args: any[]) => void;
|
|
185
|
+
warn: (...args: any[]) => void;
|
|
186
|
+
info: (...args: any[]) => void;
|
|
187
|
+
log: (...args: any[]) => void;
|
|
188
|
+
}
|
|
184
189
|
|
|
185
190
|
/** This should be kept in sync with EventEmitterManager */
|
|
186
191
|
declare class Manager {
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
+
protected logger: CustomLoggerScope;
|
|
193
|
+
initialized: boolean;
|
|
194
|
+
constructor(name: string);
|
|
195
|
+
init(): void;
|
|
196
|
+
destroy(): void;
|
|
192
197
|
}
|
|
193
198
|
|
|
194
199
|
declare type MaybePromise<T> = T | Promise<T>;
|
|
195
200
|
|
|
196
201
|
export interface MouseButtonEvent extends WindowEvent {
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
export declare function overlayed<TModule extends GameModule, TShortcut extends string>(
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
202
|
+
x: number;
|
|
203
|
+
y: number;
|
|
204
|
+
|
|
205
|
+
globalX: number;
|
|
206
|
+
globalY: number;
|
|
207
|
+
|
|
208
|
+
key: VirtualKey;
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
export declare function overlayed<TModule extends GameModule, TShortcut extends string>(
|
|
212
|
+
options: OverlayedOptions<TModule, TShortcut>,
|
|
213
|
+
): OverlayedApp<TModule, TShortcut>;
|
|
214
|
+
|
|
215
|
+
export declare type OverlayedApp<
|
|
216
|
+
TModule extends GameModule,
|
|
217
|
+
TKeybind extends string,
|
|
218
|
+
> = OverlayedAppGameModules<TModule> &
|
|
219
|
+
OverlayedAppHandlers & {
|
|
220
|
+
keybinds: OverlayedAppKeybindModule<TKeybind>;
|
|
221
|
+
windows: OverlayedAppWindowsModule;
|
|
222
|
+
input: OverlayedAppInputModule;
|
|
223
|
+
ads: OverlayedAppAdsModule;
|
|
224
|
+
cortex: OverlayedAppCortexModule;
|
|
225
|
+
log: OverlayedAppLoggingModule;
|
|
226
|
+
/**
|
|
227
|
+
* Returns true if any monitored processes are running.
|
|
228
|
+
*
|
|
229
|
+
* Useful for stopping the overlay from updating when the game is running.
|
|
230
|
+
*/
|
|
231
|
+
hasAnyActiveProcesses: () => boolean;
|
|
232
|
+
/**
|
|
233
|
+
* Initializes the overlayed app.
|
|
234
|
+
*
|
|
235
|
+
* This should only be called once, and is automatically called by default, unless `init: false` is passed:
|
|
236
|
+
* ```ts
|
|
237
|
+
* overlayed({
|
|
238
|
+
* init: false,
|
|
239
|
+
* });
|
|
240
|
+
* ```
|
|
241
|
+
*/
|
|
242
|
+
init: () => void;
|
|
243
|
+
/**
|
|
244
|
+
* Returns true if the overlayed app has been initialized.
|
|
245
|
+
*/
|
|
246
|
+
initialized: boolean;
|
|
247
|
+
};
|
|
236
248
|
|
|
237
249
|
declare interface OverlayedAppAdsModule {
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
250
|
+
registerWindow(
|
|
251
|
+
window: BrowserWindow,
|
|
252
|
+
options?: {
|
|
253
|
+
linkHandler?: {
|
|
254
|
+
allowHosts?: string[];
|
|
255
|
+
};
|
|
256
|
+
},
|
|
257
|
+
): void;
|
|
243
258
|
}
|
|
244
259
|
|
|
245
260
|
declare interface OverlayedAppCortexModule {
|
|
246
|
-
|
|
247
|
-
trackLog: <TEventName extends keyof CortexLogs>(name: TEventName, data: CortexLogs[TEventName]) => void;
|
|
261
|
+
track: <TEventName extends keyof CortexEvents>(name: TEventName, data: CortexEvents[TEventName]) => void;
|
|
248
262
|
}
|
|
249
263
|
|
|
250
264
|
declare type OverlayedAppGameModules<TModule extends GameModule> = {
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
+
[TKey in TModule["key"]]: {
|
|
266
|
+
onAny<
|
|
267
|
+
TEvent extends Extract<
|
|
268
|
+
TModule,
|
|
269
|
+
{
|
|
270
|
+
key: TKey;
|
|
271
|
+
}
|
|
272
|
+
>["events"]["event"]["infer"],
|
|
273
|
+
>(
|
|
274
|
+
cb: (data: TEvent) => void,
|
|
275
|
+
): void;
|
|
276
|
+
on<
|
|
277
|
+
TEvent extends Extract<
|
|
278
|
+
TModule,
|
|
279
|
+
{
|
|
280
|
+
key: TKey;
|
|
281
|
+
}
|
|
282
|
+
>["events"]["event"]["infer"],
|
|
283
|
+
TEventType extends EventType<TEvent> = EventType<TEvent>,
|
|
284
|
+
>(
|
|
285
|
+
event: TEventType,
|
|
286
|
+
cb: EventCallback<TEvent, TEventType>,
|
|
287
|
+
): void;
|
|
288
|
+
offAny<
|
|
289
|
+
TEvent extends Extract<
|
|
290
|
+
TModule,
|
|
291
|
+
{
|
|
292
|
+
key: TKey;
|
|
293
|
+
}
|
|
294
|
+
>["events"]["event"]["infer"],
|
|
295
|
+
>(
|
|
296
|
+
cb: (data: TEvent) => void,
|
|
297
|
+
): void;
|
|
298
|
+
off<
|
|
299
|
+
TEvent extends GameModuleEventInfer<
|
|
300
|
+
Extract<
|
|
301
|
+
TModule,
|
|
302
|
+
{
|
|
303
|
+
key: TKey;
|
|
304
|
+
}
|
|
305
|
+
>
|
|
306
|
+
>,
|
|
307
|
+
TEventType extends EventType<TEvent> = EventType<TEvent>,
|
|
308
|
+
>(
|
|
309
|
+
event: TEventType,
|
|
310
|
+
cb: EventCallback<TEvent, TEventType>,
|
|
311
|
+
): void;
|
|
312
|
+
};
|
|
265
313
|
};
|
|
266
314
|
|
|
267
315
|
declare type OverlayedAppHandlers = {
|
|
268
|
-
|
|
269
|
-
|
|
316
|
+
on: <TEvent extends keyof OverlayedAppHandlersMapping = keyof OverlayedAppHandlersMapping>(
|
|
317
|
+
event: TEvent,
|
|
318
|
+
cb: OverlayedAppHandlersMapping[TEvent],
|
|
319
|
+
) => void;
|
|
320
|
+
off: <TEvent extends keyof OverlayedAppHandlersMapping = keyof OverlayedAppHandlersMapping>(
|
|
321
|
+
event: TEvent,
|
|
322
|
+
cb: OverlayedAppHandlersMapping[TEvent],
|
|
323
|
+
) => void;
|
|
270
324
|
};
|
|
271
325
|
|
|
272
326
|
declare type OverlayedAppHandlersMapping = {
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
327
|
+
error: (data: ErrorManagerEvents["error"]) => void;
|
|
328
|
+
warning: (data: ErrorManagerEvents["warning"]) => void;
|
|
329
|
+
fatal: (data: ErrorManagerEvents["fatal"]) => void;
|
|
330
|
+
gameLaunch: GameLaunchManagerEvents["gameLaunch"];
|
|
331
|
+
gameClose: GameLaunchManagerEvents["gameClose"];
|
|
332
|
+
gameReady: GameLaunchManagerEvents["gameReady"];
|
|
279
333
|
};
|
|
280
334
|
|
|
281
335
|
declare interface OverlayedAppInputModule {
|
|
282
|
-
|
|
283
|
-
|
|
336
|
+
scope: (scopeName: string) => ReturnType<OverridesManager["scope"]>;
|
|
337
|
+
raw: OverlayedAppInputModuleRaw;
|
|
284
338
|
}
|
|
285
339
|
|
|
286
340
|
declare type OverlayedAppInputModuleRaw = {
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
341
|
+
/**
|
|
342
|
+
* Block the game from receiving mouse input.
|
|
343
|
+
*
|
|
344
|
+
* @param block Whether to block mouse input.
|
|
345
|
+
*/
|
|
346
|
+
setGlobalMouseBlock(block: boolean): void;
|
|
347
|
+
/**
|
|
348
|
+
* Block the game from receiving keyboard input.
|
|
349
|
+
*
|
|
350
|
+
* @param block Whether to block keyboard input.
|
|
351
|
+
*/
|
|
352
|
+
setGlobalKeyboardBlock(block: boolean): void;
|
|
353
|
+
/**
|
|
354
|
+
* Show or hide the cursor.
|
|
355
|
+
*
|
|
356
|
+
* @param show Whether to show or hide the cursor.
|
|
357
|
+
*/
|
|
358
|
+
setGlobalCursorOverride(show: boolean): void;
|
|
359
|
+
/**
|
|
360
|
+
* Block the game from receiving input for a specific key.
|
|
361
|
+
*
|
|
362
|
+
* @param key The key to block input for.
|
|
363
|
+
* @param block Whether to block input for the key.
|
|
364
|
+
*/
|
|
365
|
+
setKeyInputBlock(key: VirtualKey, block: boolean): void;
|
|
366
|
+
/**
|
|
367
|
+
* Get the current state of the global mouse block.
|
|
368
|
+
*/
|
|
369
|
+
getGlobalMouseBlock(): boolean;
|
|
370
|
+
/**
|
|
371
|
+
* Get the current state of the global keyboard block.
|
|
372
|
+
*/
|
|
373
|
+
getGlobalKeyboardBlock(): boolean;
|
|
374
|
+
/**
|
|
375
|
+
* Get the current state of the global cursor override.
|
|
376
|
+
*/
|
|
377
|
+
getGlobalCursorOverride(): boolean;
|
|
378
|
+
/**
|
|
379
|
+
* Get the current state of the key input block for a specific key.
|
|
380
|
+
* @param key The key to block input for.
|
|
381
|
+
*/
|
|
382
|
+
getKeyInputBlock(key: VirtualKey): boolean;
|
|
329
383
|
};
|
|
330
384
|
|
|
331
|
-
declare type OverlayedAppKeybindModule<TKeybind extends string> = Record<
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
385
|
+
declare type OverlayedAppKeybindModule<TKeybind extends string> = Record<
|
|
386
|
+
TKeybind,
|
|
387
|
+
{
|
|
388
|
+
on: <TEvent extends "down" | "up" | "toggle">(event: TEvent, cb: KeybindCallbacks[TEvent]) => void;
|
|
389
|
+
}
|
|
390
|
+
> & {
|
|
391
|
+
/**
|
|
392
|
+
* Get the current user keybinds.
|
|
393
|
+
*/
|
|
394
|
+
getConfig: () => OverlayedAppKeybindsConfig<TKeybind>;
|
|
395
|
+
/**
|
|
396
|
+
* Pause keybind listening. Essential for pausing keybind listening when recording new keybinds.
|
|
397
|
+
*/
|
|
398
|
+
pauseKeybindListening: () => void;
|
|
399
|
+
/**
|
|
400
|
+
* Resume keybind listening. Essential for resuming keybind listening after recording new keybinds.
|
|
401
|
+
*/
|
|
402
|
+
resumeKeybindListening: () => void;
|
|
403
|
+
/**
|
|
404
|
+
* Update a single keybind.
|
|
405
|
+
*
|
|
406
|
+
* @param keybind The keybind to update.
|
|
407
|
+
* @param keybindConfig The new keybind config.
|
|
408
|
+
*/
|
|
409
|
+
updateKeybind: (keybind: TKeybind, keybindConfig: OverlayedAppKeybindsConfig<TKeybind>[TKeybind]) => void;
|
|
410
|
+
/**
|
|
411
|
+
* Bulk update keybinds.
|
|
412
|
+
*
|
|
413
|
+
* @param keybinds The keybinds to update. Keybind keys not provided will not be updated.
|
|
414
|
+
*/
|
|
415
|
+
updateKeybinds: (keybinds: Partial<OverlayedAppKeybindsConfig<TKeybind>>) => void;
|
|
359
416
|
};
|
|
360
417
|
|
|
361
|
-
declare type OverlayedAppKeybindsConfig<TKeybind extends string> = Record<
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
418
|
+
declare type OverlayedAppKeybindsConfig<TKeybind extends string> = Record<
|
|
419
|
+
TKeybind,
|
|
420
|
+
{
|
|
421
|
+
/**
|
|
422
|
+
* - An array of [KeyboardEvent#code](https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/code)
|
|
423
|
+
* - Whatever you configure will be the default value
|
|
424
|
+
* - [Here](https://www.toptal.com/developers/keycode) is a good tool to easily find the codes for a given hotkey
|
|
425
|
+
*/
|
|
426
|
+
keys: OverlayedAppKeybindsConfigKey[];
|
|
427
|
+
/**
|
|
428
|
+
* - `toggle` will trigger the callback when the key is toggled on and off
|
|
429
|
+
* - `hold` will trigger the callback when the key is held down
|
|
430
|
+
* - This can be updated at runtime
|
|
431
|
+
*/
|
|
432
|
+
mode: OverlayedAppKeybindsConfigMode;
|
|
433
|
+
}
|
|
434
|
+
>;
|
|
435
|
+
|
|
436
|
+
declare type OverlayedAppKeybindsConfigKey =
|
|
437
|
+
| "ControlLeft"
|
|
438
|
+
| "AltLeft"
|
|
439
|
+
| "ShiftLeft"
|
|
440
|
+
| "AltRight"
|
|
441
|
+
| "ControlRight"
|
|
442
|
+
| "ShiftRight"
|
|
443
|
+
| (string & {});
|
|
377
444
|
|
|
378
445
|
declare type OverlayedAppKeybindsConfigMode = "toggle" | "hold";
|
|
379
446
|
|
|
380
|
-
declare interface
|
|
381
|
-
|
|
382
|
-
|
|
447
|
+
declare interface OverlayedAppLoggingModule {
|
|
448
|
+
/**
|
|
449
|
+
* Returns a scoped logging instance. Each message will be prefixed with the scope name.
|
|
450
|
+
*
|
|
451
|
+
* ```ts
|
|
452
|
+
* const scope = overlayed.log.scope("MyScope");
|
|
453
|
+
* scope.info("Hello, world!");
|
|
454
|
+
* // [2025-07-20 01:51:40.969] [log] [MyScope] Hello, world!
|
|
455
|
+
* ```
|
|
456
|
+
*
|
|
457
|
+
* @param scopeName - The name of the scope.
|
|
458
|
+
* @returns The logger scope.
|
|
459
|
+
*/
|
|
460
|
+
scope: (scopeName: string) => LoggerScope;
|
|
461
|
+
info: (message: string) => void;
|
|
462
|
+
warn: (message: string) => void;
|
|
463
|
+
error: (message: string) => void;
|
|
464
|
+
/**
|
|
465
|
+
* Submits info you provide, app logs, overlayed logs, and any additional files you provide to be viewed
|
|
466
|
+
* in your Overlayed dashboard.
|
|
467
|
+
*
|
|
468
|
+
* @param info - The information to include in the bug report.
|
|
469
|
+
* @param options - The options to include in the bug report.
|
|
470
|
+
* @returns The bug report id.
|
|
471
|
+
*/
|
|
472
|
+
submitBugReport: (
|
|
473
|
+
info: OverlayedAppLoggingModuleInfo,
|
|
474
|
+
options?: OverlayedAppLoggingModuleSubmitBugReportOptions,
|
|
475
|
+
) => Promise<
|
|
476
|
+
Result<
|
|
477
|
+
true,
|
|
478
|
+
{
|
|
479
|
+
message: string;
|
|
480
|
+
error: unknown;
|
|
481
|
+
}
|
|
482
|
+
>
|
|
483
|
+
>;
|
|
484
|
+
}
|
|
485
|
+
|
|
486
|
+
declare interface OverlayedAppLoggingModuleInfo extends Record<string, string | undefined> {
|
|
487
|
+
email?: string;
|
|
488
|
+
username?: string;
|
|
489
|
+
message?: string;
|
|
490
|
+
category?: string;
|
|
491
|
+
version?: string;
|
|
492
|
+
}
|
|
493
|
+
|
|
494
|
+
declare interface OverlayedAppLoggingModuleSubmitBugReportOptions {
|
|
495
|
+
/**
|
|
496
|
+
* A key value record of additional files to include in the bug report.
|
|
497
|
+
*
|
|
498
|
+
* The key is the name of the file, and the value is the content of the file.
|
|
499
|
+
*/
|
|
500
|
+
additionalFiles?: Record<string, string>;
|
|
501
|
+
}
|
|
502
|
+
|
|
503
|
+
declare interface OverlayedAppWindowsModule
|
|
504
|
+
extends Pick<
|
|
505
|
+
RenderInterface,
|
|
506
|
+
| "on"
|
|
507
|
+
| "off"
|
|
508
|
+
| "once"
|
|
509
|
+
| "addListener"
|
|
510
|
+
| "prependListener"
|
|
511
|
+
| "prependOnceListener"
|
|
512
|
+
| "removeListener"
|
|
513
|
+
| "removeAllListeners"
|
|
514
|
+
> {
|
|
515
|
+
createWindow(options: RenderWindowConstructorOptions): RenderWindow;
|
|
516
|
+
getActiveGameInfo: () => ActiveGameInfo;
|
|
383
517
|
}
|
|
384
518
|
|
|
385
519
|
declare interface OverlayedOptions<TModule extends GameModule, TKeybind extends string> {
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
520
|
+
/**
|
|
521
|
+
* The electron instance.
|
|
522
|
+
*
|
|
523
|
+
* Must be imported globally like:
|
|
524
|
+
* ```ts
|
|
525
|
+
* import { electron } from "electron";
|
|
526
|
+
* ```
|
|
527
|
+
* or
|
|
528
|
+
* ```ts
|
|
529
|
+
* const electron = require("electron");
|
|
530
|
+
* ```
|
|
531
|
+
*/
|
|
532
|
+
electron: electron;
|
|
533
|
+
/**
|
|
534
|
+
* The application id, this can be found in the [Overlayed Dashboard](https://dashboard.overlayed.gg/settings/applications).
|
|
535
|
+
*/
|
|
536
|
+
applicationId: string;
|
|
537
|
+
/**
|
|
538
|
+
* App modules to load.
|
|
539
|
+
*/
|
|
540
|
+
modules: TModule[];
|
|
541
|
+
/**
|
|
542
|
+
* App keybinds config.
|
|
543
|
+
*/
|
|
544
|
+
keybinds: OverlayedAppKeybindsConfig<TKeybind>;
|
|
545
|
+
/**
|
|
546
|
+
* Whether to initialize the app when the module is loaded.
|
|
547
|
+
* @default true;
|
|
548
|
+
*/
|
|
549
|
+
init?: boolean;
|
|
550
|
+
/**
|
|
551
|
+
* When true, the overlay will be loaded for all supported games.
|
|
552
|
+
* When false, only games registered under the `modules` array will be loaded.
|
|
553
|
+
*
|
|
554
|
+
* @default false
|
|
555
|
+
*/
|
|
556
|
+
universal?: boolean;
|
|
557
|
+
/**
|
|
558
|
+
* @deprecated
|
|
559
|
+
*/
|
|
560
|
+
channel?: string;
|
|
561
|
+
/**
|
|
562
|
+
* The version of the app.
|
|
563
|
+
*
|
|
564
|
+
* @deprecated
|
|
565
|
+
*/
|
|
566
|
+
version?: string;
|
|
427
567
|
}
|
|
428
568
|
|
|
429
569
|
declare class OverridesManager extends Manager {
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
570
|
+
private renderInterface;
|
|
571
|
+
private globalCursorOverrideCount;
|
|
572
|
+
private globalMouseBlockCount;
|
|
573
|
+
private globalKeyboardBlockCount;
|
|
574
|
+
private keyInputBlocks;
|
|
575
|
+
constructor(interfaceName: RenderInterfaceName);
|
|
576
|
+
scope(scopeName: string): OverridesManagerScope;
|
|
577
|
+
private setGlobalCursorOverride;
|
|
578
|
+
private setGlobalMouseBlock;
|
|
579
|
+
private setGlobalKeyboardBlock;
|
|
580
|
+
private setKeyInputBlock;
|
|
441
581
|
}
|
|
442
582
|
|
|
443
583
|
export declare interface OverridesManagerScope {
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
584
|
+
setGlobalCursorOverride: (override: boolean) => void;
|
|
585
|
+
setGlobalMouseBlock: (block: boolean) => void;
|
|
586
|
+
setGlobalKeyboardBlock: (block: boolean) => void;
|
|
587
|
+
setKeyInputBlock: (key: number, block: boolean) => void;
|
|
448
588
|
}
|
|
449
589
|
|
|
450
590
|
export class RenderInterface {
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
591
|
+
constructor(name: String, options?: { maxWindowCount?: number; eventQueueSize?: number; access?: AccessLevel }); // default: { maxWindowCount: 10, eventQueueSize: 200, access: AccessLevel.Default }
|
|
592
|
+
|
|
593
|
+
newWindowInternal(browserWindow: Electron.BrowserWindow, options?: RenderWindowConstructorOptions): RenderWindow;
|
|
594
|
+
|
|
595
|
+
getGlobalMouseBlock(): boolean;
|
|
596
|
+
getGlobalKeyboardBlock(): boolean;
|
|
597
|
+
getGlobalCursorOverride(): boolean;
|
|
598
|
+
getKeyInputBlock(key: VirtualKey): boolean;
|
|
599
|
+
|
|
600
|
+
setGlobalMouseBlock(block: boolean): void;
|
|
601
|
+
setGlobalKeyboardBlock(block: boolean): void;
|
|
602
|
+
setGlobalCursorOverride(show: boolean): void;
|
|
603
|
+
setKeyInputBlock(key: VirtualKey, block: boolean): void;
|
|
604
|
+
|
|
605
|
+
eventNames(): string[];
|
|
606
|
+
getMaxListeners(): number;
|
|
607
|
+
removeAllListeners(): this;
|
|
608
|
+
|
|
609
|
+
listeners(eventName: "keyDown"): Function[];
|
|
610
|
+
rawListeners(eventName: "keyDown"): Function[];
|
|
611
|
+
listenerCount(eventName: "keyDown", listener?: (event: KeyboardKeyEvent) => void): number;
|
|
612
|
+
|
|
613
|
+
on(eventName: "keyDown", listener: (event: KeyboardKeyEvent) => void): this;
|
|
614
|
+
once(eventName: "keyDown", listener: (event: KeyboardKeyEvent) => void): this;
|
|
615
|
+
addListener(eventName: "keyDown", listener: (event: KeyboardKeyEvent) => void): this;
|
|
616
|
+
prependListener(eventName: "keyDown", listener: (event: KeyboardKeyEvent) => void): this;
|
|
617
|
+
prependOnceListener(eventName: "keyDown", listener: (event: KeyboardKeyEvent) => void): this;
|
|
618
|
+
|
|
619
|
+
off(eventName: "keyDown", listener: (event: KeyboardKeyEvent) => void): this;
|
|
620
|
+
removeListener(eventName: "keyDown", listener: (event: KeyboardKeyEvent) => void): this;
|
|
621
|
+
removeAllListeners(eventName: "keyDown"): this;
|
|
622
|
+
|
|
623
|
+
listeners(eventName: "keyUp"): Function[];
|
|
624
|
+
rawListeners(eventName: "keyUp"): Function[];
|
|
625
|
+
listenerCount(eventName: "keyUp", listener?: (event: KeyboardKeyEvent) => void): number;
|
|
626
|
+
|
|
627
|
+
on(eventName: "keyUp", listener: (event: KeyboardKeyEvent) => void): this;
|
|
628
|
+
once(eventName: "keyUp", listener: (event: KeyboardKeyEvent) => void): this;
|
|
629
|
+
addListener(eventName: "keyUp", listener: (event: KeyboardKeyEvent) => void): this;
|
|
630
|
+
prependListener(eventName: "keyUp", listener: (event: KeyboardKeyEvent) => void): this;
|
|
631
|
+
prependOnceListener(eventName: "keyUp", listener: (event: KeyboardKeyEvent) => void): this;
|
|
632
|
+
|
|
633
|
+
off(eventName: "keyUp", listener: (event: KeyboardKeyEvent) => void): this;
|
|
634
|
+
removeListener(eventName: "keyUp", listener: (event: KeyboardKeyEvent) => void): this;
|
|
635
|
+
removeAllListeners(eventName: "keyUp"): this;
|
|
636
|
+
|
|
637
|
+
listeners(eventName: "mouseDown"): Function[];
|
|
638
|
+
rawListeners(eventName: "mouseDown"): Function[];
|
|
639
|
+
listenerCount(eventName: "mouseDown", listener?: (event: MouseButtonEvent) => void): number;
|
|
640
|
+
|
|
641
|
+
on(eventName: "mouseDown", listener: (event: MouseButtonEvent) => void): this;
|
|
642
|
+
once(eventName: "mouseDown", listener: (event: MouseButtonEvent) => void): this;
|
|
643
|
+
addListener(eventName: "mouseDown", listener: (event: MouseButtonEvent) => void): this;
|
|
644
|
+
prependListener(eventName: "mouseDown", listener: (event: MouseButtonEvent) => void): this;
|
|
645
|
+
prependOnceListener(eventName: "mouseDown", listener: (event: MouseButtonEvent) => void): this;
|
|
646
|
+
|
|
647
|
+
off(eventName: "mouseDown", listener: (event: MouseButtonEvent) => void): this;
|
|
648
|
+
removeListener(eventName: "mouseDown", listener: (event: MouseButtonEvent) => void): this;
|
|
649
|
+
removeAllListeners(eventName: "mouseDown"): this;
|
|
650
|
+
|
|
651
|
+
listeners(eventName: "mouseUp"): Function[];
|
|
652
|
+
rawListeners(eventName: "mouseUp"): Function[];
|
|
653
|
+
listenerCount(eventName: "mouseUp", listener?: (event: MouseButtonEvent) => void): number;
|
|
654
|
+
|
|
655
|
+
on(eventName: "mouseUp", listener: (event: MouseButtonEvent) => void): this;
|
|
656
|
+
once(eventName: "mouseUp", listener: (event: MouseButtonEvent) => void): this;
|
|
657
|
+
addListener(eventName: "mouseUp", listener: (event: MouseButtonEvent) => void): this;
|
|
658
|
+
prependListener(eventName: "mouseUp", listener: (event: MouseButtonEvent) => void): this;
|
|
659
|
+
prependOnceListener(eventName: "mouseUp", listener: (event: MouseButtonEvent) => void): this;
|
|
660
|
+
|
|
661
|
+
off(eventName: "mouseUp", listener: (event: MouseButtonEvent) => void): this;
|
|
662
|
+
removeListener(eventName: "mouseUp", listener: (event: MouseButtonEvent) => void): this;
|
|
663
|
+
removeAllListeners(eventName: "mouseUp"): this;
|
|
664
|
+
|
|
665
|
+
listeners(eventName: "resolution"): Function[];
|
|
666
|
+
rawListeners(eventName: "resolution"): Function[];
|
|
667
|
+
listenerCount(eventName: "resolution", listener?: (width: number, height: number) => void): number;
|
|
668
|
+
|
|
669
|
+
on(eventName: "resolution", listener: (width: number, height: number) => void): this;
|
|
670
|
+
once(eventName: "resolution", listener: (width: number, height: number) => void): this;
|
|
671
|
+
addListener(eventName: "resolution", listener: (width: number, height: number) => void): this;
|
|
672
|
+
prependListener(eventName: "resolution", listener: (width: number, height: number) => void): this;
|
|
673
|
+
prependOnceListener(eventName: "resolution", listener: (width: number, height: number) => void): this;
|
|
674
|
+
|
|
675
|
+
off(eventName: "resolution", listener: (width: number, height: number) => void): this;
|
|
676
|
+
removeListener(eventName: "resolution", listener: (width: number, height: number) => void): this;
|
|
677
|
+
removeAllListeners(eventName: "resolution"): this;
|
|
678
|
+
|
|
679
|
+
listeners(eventName: "keyboardFocus"): Function[];
|
|
680
|
+
rawListeners(eventName: "keyboardFocus"): Function[];
|
|
681
|
+
listenerCount(eventName: "keyboardFocus", listener?: (focus: boolean) => void): number;
|
|
682
|
+
|
|
683
|
+
on(eventName: "keyboardFocus", listener: (focus: boolean) => void): this;
|
|
684
|
+
once(eventName: "keyboardFocus", listener: (focus: boolean) => void): this;
|
|
685
|
+
addListener(eventName: "keyboardFocus", listener: (focus: boolean) => void): this;
|
|
686
|
+
prependListener(eventName: "keyboardFocus", listener: (focus: boolean) => void): this;
|
|
687
|
+
prependOnceListener(eventName: "keyboardFocus", listener: (focus: boolean) => void): this;
|
|
688
|
+
|
|
689
|
+
off(eventName: "keyboardFocus", listener: (focus: boolean) => void): this;
|
|
690
|
+
removeListener(eventName: "keyboardFocus", listener: (focus: boolean) => void): this;
|
|
691
|
+
removeAllListeners(eventName: "keyboardFocus"): this;
|
|
692
|
+
}
|
|
553
693
|
|
|
554
694
|
declare type RenderInterfaceName = "OGG_SIEGE";
|
|
555
695
|
|
|
556
696
|
export interface RenderWindow extends Electron.BrowserWindow {
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
697
|
+
getLayer(): number;
|
|
698
|
+
getInput(): boolean;
|
|
699
|
+
getInputBlock(): boolean;
|
|
700
|
+
getCursorOverride(): boolean;
|
|
701
|
+
|
|
702
|
+
setLayer(layer: number): void;
|
|
703
|
+
setInput(input: boolean): void;
|
|
704
|
+
setInputBlock(block: boolean): void;
|
|
705
|
+
setCursorOverride(override: boolean): void;
|
|
706
|
+
}
|
|
567
707
|
|
|
568
708
|
export interface RenderWindowConstructorOptions extends Electron.BrowserWindowConstructorOptions {
|
|
569
|
-
|
|
709
|
+
layer?: number; // default: 0
|
|
570
710
|
|
|
571
|
-
|
|
711
|
+
createForeground?: boolean; // default: true
|
|
572
712
|
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
713
|
+
hasInput?: boolean; // default: true
|
|
714
|
+
hasInputBlock?: boolean; // default: true
|
|
715
|
+
hasCursorOverride?: boolean; // default: true
|
|
716
|
+
}
|
|
717
|
+
|
|
718
|
+
declare type Result<T, E = string> = [T, undefined] | [undefined, E];
|
|
577
719
|
|
|
578
720
|
export declare function setFetchLatestTokenCallback(newFetchLatestToken: () => Promise<unknown> | undefined): void;
|
|
579
721
|
|
|
580
722
|
export declare function setUpdaterTokenResolver(newTokenResolver: () => string | undefined): void;
|
|
581
723
|
|
|
582
724
|
export const enum VirtualKey {
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
725
|
+
LeftButton = 0x01,
|
|
726
|
+
RightButton = 0x02,
|
|
727
|
+
Cancel = 0x03,
|
|
728
|
+
MiddleButton = 0x04,
|
|
729
|
+
ExtraButton1 = 0x05,
|
|
730
|
+
ExtraButton2 = 0x06,
|
|
731
|
+
Back = 0x08,
|
|
732
|
+
Tab = 0x09,
|
|
733
|
+
Clear = 0x0c,
|
|
734
|
+
Return = 0x0d,
|
|
735
|
+
Shift = 0x10,
|
|
736
|
+
Control = 0x11,
|
|
737
|
+
Menu = 0x12,
|
|
738
|
+
Pause = 0x13,
|
|
739
|
+
CapsLock = 0x14,
|
|
740
|
+
Kana = 0x15,
|
|
741
|
+
Hangeul = 0x15,
|
|
742
|
+
Hangul = 0x15,
|
|
743
|
+
Junja = 0x17,
|
|
744
|
+
Final = 0x18,
|
|
745
|
+
Hanja = 0x19,
|
|
746
|
+
Kanji = 0x19,
|
|
747
|
+
Escape = 0x1b,
|
|
748
|
+
Convert = 0x1c,
|
|
749
|
+
NonConvert = 0x1d,
|
|
750
|
+
Accept = 0x1e,
|
|
751
|
+
ModeChange = 0x1f,
|
|
752
|
+
Space = 0x20,
|
|
753
|
+
Prior = 0x21,
|
|
754
|
+
Next = 0x22,
|
|
755
|
+
End = 0x23,
|
|
756
|
+
Home = 0x24,
|
|
757
|
+
Left = 0x25,
|
|
758
|
+
Up = 0x26,
|
|
759
|
+
Right = 0x27,
|
|
760
|
+
Down = 0x28,
|
|
761
|
+
Select = 0x29,
|
|
762
|
+
Print = 0x2a,
|
|
763
|
+
Execute = 0x2b,
|
|
764
|
+
Snapshot = 0x2c,
|
|
765
|
+
Insert = 0x2d,
|
|
766
|
+
Delete = 0x2e,
|
|
767
|
+
Help = 0x2f,
|
|
768
|
+
N0 = 0x30,
|
|
769
|
+
N1 = 0x31,
|
|
770
|
+
N2 = 0x32,
|
|
771
|
+
N3 = 0x33,
|
|
772
|
+
N4 = 0x34,
|
|
773
|
+
N5 = 0x35,
|
|
774
|
+
N6 = 0x36,
|
|
775
|
+
N7 = 0x37,
|
|
776
|
+
N8 = 0x38,
|
|
777
|
+
N9 = 0x39,
|
|
778
|
+
A = 0x41,
|
|
779
|
+
B = 0x42,
|
|
780
|
+
C = 0x43,
|
|
781
|
+
D = 0x44,
|
|
782
|
+
E = 0x45,
|
|
783
|
+
F = 0x46,
|
|
784
|
+
G = 0x47,
|
|
785
|
+
H = 0x48,
|
|
786
|
+
I = 0x49,
|
|
787
|
+
J = 0x4a,
|
|
788
|
+
K = 0x4b,
|
|
789
|
+
L = 0x4c,
|
|
790
|
+
M = 0x4d,
|
|
791
|
+
N = 0x4e,
|
|
792
|
+
O = 0x4f,
|
|
793
|
+
P = 0x50,
|
|
794
|
+
Q = 0x51,
|
|
795
|
+
R = 0x52,
|
|
796
|
+
S = 0x53,
|
|
797
|
+
T = 0x54,
|
|
798
|
+
U = 0x55,
|
|
799
|
+
V = 0x56,
|
|
800
|
+
W = 0x57,
|
|
801
|
+
X = 0x58,
|
|
802
|
+
Y = 0x59,
|
|
803
|
+
Z = 0x5a,
|
|
804
|
+
LeftWindows = 0x5b,
|
|
805
|
+
RightWindows = 0x5c,
|
|
806
|
+
Application = 0x5d,
|
|
807
|
+
Sleep = 0x5f,
|
|
808
|
+
Numpad0 = 0x60,
|
|
809
|
+
Numpad1 = 0x61,
|
|
810
|
+
Numpad2 = 0x62,
|
|
811
|
+
Numpad3 = 0x63,
|
|
812
|
+
Numpad4 = 0x64,
|
|
813
|
+
Numpad5 = 0x65,
|
|
814
|
+
Numpad6 = 0x66,
|
|
815
|
+
Numpad7 = 0x67,
|
|
816
|
+
Numpad8 = 0x68,
|
|
817
|
+
Numpad9 = 0x69,
|
|
818
|
+
Multiply = 0x6a,
|
|
819
|
+
Add = 0x6b,
|
|
820
|
+
Separator = 0x6c,
|
|
821
|
+
Subtract = 0x6d,
|
|
822
|
+
Decimal = 0x6e,
|
|
823
|
+
Divide = 0x6f,
|
|
824
|
+
F1 = 0x70,
|
|
825
|
+
F2 = 0x71,
|
|
826
|
+
F3 = 0x72,
|
|
827
|
+
F4 = 0x73,
|
|
828
|
+
F5 = 0x74,
|
|
829
|
+
F6 = 0x75,
|
|
830
|
+
F7 = 0x76,
|
|
831
|
+
F8 = 0x77,
|
|
832
|
+
F9 = 0x78,
|
|
833
|
+
F10 = 0x79,
|
|
834
|
+
F11 = 0x7a,
|
|
835
|
+
F12 = 0x7b,
|
|
836
|
+
F13 = 0x7c,
|
|
837
|
+
F14 = 0x7d,
|
|
838
|
+
F15 = 0x7e,
|
|
839
|
+
F16 = 0x7f,
|
|
840
|
+
F17 = 0x80,
|
|
841
|
+
F18 = 0x81,
|
|
842
|
+
F19 = 0x82,
|
|
843
|
+
F20 = 0x83,
|
|
844
|
+
F21 = 0x84,
|
|
845
|
+
F22 = 0x85,
|
|
846
|
+
F23 = 0x86,
|
|
847
|
+
F24 = 0x87,
|
|
848
|
+
NumLock = 0x90,
|
|
849
|
+
ScrollLock = 0x91,
|
|
850
|
+
NEC_Equal = 0x92,
|
|
851
|
+
Fujitsu_Jisho = 0x92,
|
|
852
|
+
Fujitsu_Masshou = 0x93,
|
|
853
|
+
Fujitsu_Touroku = 0x94,
|
|
854
|
+
Fujitsu_Loya = 0x95,
|
|
855
|
+
Fujitsu_Roya = 0x96,
|
|
856
|
+
LeftShift = 0xa0,
|
|
857
|
+
RightShift = 0xa1,
|
|
858
|
+
LeftControl = 0xa2,
|
|
859
|
+
RightControl = 0xa3,
|
|
860
|
+
LeftMenu = 0xa4,
|
|
861
|
+
RightMenu = 0xa5,
|
|
862
|
+
BrowserBack = 0xa6,
|
|
863
|
+
BrowserForward = 0xa7,
|
|
864
|
+
BrowserRefresh = 0xa8,
|
|
865
|
+
BrowserStop = 0xa9,
|
|
866
|
+
BrowserSearch = 0xaa,
|
|
867
|
+
BrowserFavorites = 0xab,
|
|
868
|
+
BrowserHome = 0xac,
|
|
869
|
+
VolumeMute = 0xad,
|
|
870
|
+
VolumeDown = 0xae,
|
|
871
|
+
VolumeUp = 0xaf,
|
|
872
|
+
MediaNextTrack = 0xb0,
|
|
873
|
+
MediaPrevTrack = 0xb1,
|
|
874
|
+
MediaStop = 0xb2,
|
|
875
|
+
MediaPlayPause = 0xb3,
|
|
876
|
+
LaunchMail = 0xb4,
|
|
877
|
+
LaunchMediaSelect = 0xb5,
|
|
878
|
+
LaunchApplication1 = 0xb6,
|
|
879
|
+
LaunchApplication2 = 0xb7,
|
|
880
|
+
OEM1 = 0xba,
|
|
881
|
+
OEMPlus = 0xbb,
|
|
882
|
+
OEMComma = 0xbc,
|
|
883
|
+
OEMMinus = 0xbd,
|
|
884
|
+
OEMPeriod = 0xbe,
|
|
885
|
+
OEM2 = 0xbf,
|
|
886
|
+
OEM3 = 0xc0,
|
|
887
|
+
OEM4 = 0xdb,
|
|
888
|
+
OEM5 = 0xdc,
|
|
889
|
+
OEM6 = 0xdd,
|
|
890
|
+
OEM7 = 0xde,
|
|
891
|
+
OEM8 = 0xdf,
|
|
892
|
+
OEMAX = 0xe1,
|
|
893
|
+
OEM102 = 0xe2,
|
|
894
|
+
ICOHelp = 0xe3,
|
|
895
|
+
ICO00 = 0xe4,
|
|
896
|
+
ProcessKey = 0xe5,
|
|
897
|
+
ICOClear = 0xe6,
|
|
898
|
+
Packet = 0xe7,
|
|
899
|
+
OEMReset = 0xe9,
|
|
900
|
+
OEMJump = 0xea,
|
|
901
|
+
OEMPA1 = 0xeb,
|
|
902
|
+
OEMPA2 = 0xec,
|
|
903
|
+
OEMPA3 = 0xed,
|
|
904
|
+
OEMWSCtrl = 0xee,
|
|
905
|
+
OEMCUSel = 0xef,
|
|
906
|
+
OEMATTN = 0xf0,
|
|
907
|
+
OEMFinish = 0xf1,
|
|
908
|
+
OEMCopy = 0xf2,
|
|
909
|
+
OEMAuto = 0xf3,
|
|
910
|
+
OEMENLW = 0xf4,
|
|
911
|
+
OEMBackTab = 0xf5,
|
|
912
|
+
ATTN = 0xf6,
|
|
913
|
+
CRSel = 0xf7,
|
|
914
|
+
EXSel = 0xf8,
|
|
915
|
+
EREOF = 0xf9,
|
|
916
|
+
Play = 0xfa,
|
|
917
|
+
Zoom = 0xfb,
|
|
918
|
+
Noname = 0xfc,
|
|
919
|
+
PA1 = 0xfd,
|
|
920
|
+
OEMClear = 0xfe,
|
|
921
|
+
}
|
|
780
922
|
|
|
781
923
|
declare type WarningEvents = WarningInvalidEvent;
|
|
782
924
|
|
|
783
925
|
declare interface WarningInvalidEvent extends ErrorManagerEvent {
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
926
|
+
code: "INVALID_EVENT";
|
|
927
|
+
data: {
|
|
928
|
+
summary: string;
|
|
929
|
+
};
|
|
788
930
|
}
|
|
789
931
|
|
|
790
932
|
export interface WindowEvent {
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
export {
|
|
795
|
-
|
|
796
|
-
declare global {
|
|
797
|
-
namespace Electron {
|
|
798
|
-
interface BrowserWindow {
|
|
799
|
-
isShown(): boolean;
|
|
800
|
-
}
|
|
801
|
-
}
|
|
802
|
-
}
|
|
803
|
-
|
|
933
|
+
window?: RenderWindow;
|
|
934
|
+
}
|
|
935
|
+
|
|
936
|
+
export {};
|
|
937
|
+
|
|
938
|
+
declare global {
|
|
939
|
+
namespace Electron {
|
|
940
|
+
interface BrowserWindow {
|
|
941
|
+
isShown(): boolean;
|
|
942
|
+
}
|
|
943
|
+
}
|
|
944
|
+
}
|