@overwolf/ow-electron-packages-types 1.0.0-beta.5 → 1.0.0-beta.7
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/package.json +1 -1
- package/types.d.ts +72 -38
package/package.json
CHANGED
package/types.d.ts
CHANGED
|
@@ -3170,9 +3170,6 @@ interface EncoderInformation {
|
|
|
3170
3170
|
* const options: RecordingAppOptions = {
|
|
3171
3171
|
* showDebugWindow: true,
|
|
3172
3172
|
* enableDebugLogs: true,
|
|
3173
|
-
* customCommandLineArgs: ['--multi-threading'],
|
|
3174
|
-
* overrideOBSFolder: 'C:/custom/obs',
|
|
3175
|
-
* statsInterval: 5000
|
|
3176
3173
|
* };
|
|
3177
3174
|
* ```
|
|
3178
3175
|
*/
|
|
@@ -3938,7 +3935,7 @@ interface IOverwolfRecordingApi {
|
|
|
3938
3935
|
|
|
3939
3936
|
/**
|
|
3940
3937
|
* @event Fired periodically with recorder performance metrics.
|
|
3941
|
-
*
|
|
3938
|
+
*
|
|
3942
3939
|
*/
|
|
3943
3940
|
on(eventName: 'stats', listener: (args: RecorderStats) => void): this;
|
|
3944
3941
|
}
|
|
@@ -4233,7 +4230,7 @@ type ZOrderType = "default" | "topMost" | "bottomMost";
|
|
|
4233
4230
|
interface OverlayOptions {
|
|
4234
4231
|
/**
|
|
4235
4232
|
* Controls how input is handled by the overlay window.
|
|
4236
|
-
* @default 'noPassThrough'
|
|
4233
|
+
* @default 'noPassThrough'
|
|
4237
4234
|
* @see {@link PassthroughType}.
|
|
4238
4235
|
*
|
|
4239
4236
|
*/
|
|
@@ -4241,18 +4238,28 @@ interface OverlayOptions {
|
|
|
4241
4238
|
|
|
4242
4239
|
/**
|
|
4243
4240
|
* Controls the z-order (stacking order) of the overlay window.
|
|
4244
|
-
* @default 'default'
|
|
4241
|
+
* @default 'default'
|
|
4245
4242
|
* @see {@link ZOrderType}.
|
|
4246
4243
|
*/
|
|
4247
4244
|
zOrder?: ZOrderType;
|
|
4248
4245
|
|
|
4249
4246
|
/**
|
|
4250
4247
|
* Controls whether the overlay intercepts keyboard input.
|
|
4251
|
-
*
|
|
4248
|
+
*
|
|
4252
4249
|
* `true`—the overlay won't intercept keyboard input.
|
|
4253
4250
|
* @default false
|
|
4254
4251
|
*/
|
|
4255
4252
|
ignoreKeyboardInput?: boolean;
|
|
4253
|
+
|
|
4254
|
+
/**
|
|
4255
|
+
* When `true`, the overlay window is strictly confined to the game window boundaries.
|
|
4256
|
+
*
|
|
4257
|
+
* This prevents the overlay from being moved outside the game window area.
|
|
4258
|
+
* @default false
|
|
4259
|
+
*
|
|
4260
|
+
* @since 1.9.0
|
|
4261
|
+
*/
|
|
4262
|
+
strictToGameWindow?: boolean;
|
|
4256
4263
|
}
|
|
4257
4264
|
|
|
4258
4265
|
|
|
@@ -4532,22 +4539,22 @@ interface InjectionError {
|
|
|
4532
4539
|
* ```
|
|
4533
4540
|
*/
|
|
4534
4541
|
interface GameWindowInfo {
|
|
4535
|
-
/**
|
|
4536
|
-
* The dimensions of the game window.
|
|
4542
|
+
/**
|
|
4543
|
+
* The dimensions of the game window.
|
|
4537
4544
|
*/
|
|
4538
4545
|
readonly size: Size;
|
|
4539
4546
|
|
|
4540
|
-
/**
|
|
4547
|
+
/**
|
|
4541
4548
|
* The native window handle (HWND) of the game window.
|
|
4542
4549
|
*/
|
|
4543
4550
|
readonly nativeHandle: number;
|
|
4544
4551
|
|
|
4545
|
-
/**
|
|
4552
|
+
/**
|
|
4546
4553
|
* Indicates if the game window is currently in focus.
|
|
4547
4554
|
*/
|
|
4548
4555
|
readonly focused: boolean;
|
|
4549
4556
|
|
|
4550
|
-
/**
|
|
4557
|
+
/**
|
|
4551
4558
|
* The graphics API used by the game (e.g., Direct3D 9, 11, 12, Vulkan).
|
|
4552
4559
|
*/
|
|
4553
4560
|
readonly graphics: 'd3d9' | 'd3d12' | 'd3d11' | 'vulkan' | string | undefined;
|
|
@@ -4557,15 +4564,31 @@ interface GameWindowInfo {
|
|
|
4557
4564
|
*/
|
|
4558
4565
|
readonly screen?: Display;
|
|
4559
4566
|
|
|
4560
|
-
/**
|
|
4567
|
+
/**
|
|
4561
4568
|
* The bounding rectangle of the game window in the screen's coordinates.
|
|
4562
4569
|
*
|
|
4563
4570
|
* For example: `bounds: { x: 100, y: 100, width: 800, height: 600 }`
|
|
4564
|
-
*
|
|
4571
|
+
*
|
|
4565
4572
|
* Means the game window is positioned at (100, 100) on the screen and has a size of 800x600 pixels.
|
|
4566
4573
|
* @since 1.5.11.
|
|
4567
4574
|
*/
|
|
4568
4575
|
readonly bounds?: Rectangle;
|
|
4576
|
+
|
|
4577
|
+
/**
|
|
4578
|
+
* Indicates if the game is currently running in fullscreen exclusive mode.
|
|
4579
|
+
*
|
|
4580
|
+
* Relevant only for OOPO games.
|
|
4581
|
+
* @since 1.9.0
|
|
4582
|
+
*/
|
|
4583
|
+
readonly isFullscreen?: boolean;
|
|
4584
|
+
|
|
4585
|
+
/**
|
|
4586
|
+
* Indicates if fullscreen rendering is disabled.
|
|
4587
|
+
*
|
|
4588
|
+
* Relevant only for OOPO games.
|
|
4589
|
+
* @since 1.9.0
|
|
4590
|
+
*/
|
|
4591
|
+
readonly isOOPOFullscreenRenderingDisabled?: boolean;
|
|
4569
4592
|
}
|
|
4570
4593
|
|
|
4571
4594
|
/**
|
|
@@ -4812,7 +4835,7 @@ interface IOverlayHotkeys {
|
|
|
4812
4835
|
interface IOverwolfOverlayApi extends EventEmitter {
|
|
4813
4836
|
/**
|
|
4814
4837
|
* Create new Overlay window.
|
|
4815
|
-
* @param options - Window configuration including name, z-order, passthrough, etc.
|
|
4838
|
+
* @param options - Window configuration including name, z-order, passthrough, etc.
|
|
4816
4839
|
* @returns A promise that resolves to the created `OverlayBrowserWindow`.
|
|
4817
4840
|
* @see {@link OverlayWindowOptions}.
|
|
4818
4841
|
* @see {@link OverlayBrowserWindow}.
|
|
@@ -4841,13 +4864,12 @@ interface IOverwolfOverlayApi extends EventEmitter {
|
|
|
4841
4864
|
|
|
4842
4865
|
/**
|
|
4843
4866
|
* Returns the overlay window associated with a given `WebContents` instance.
|
|
4844
|
-
* @param webContents - The Electron WebContents to query.
|
|
4867
|
+
* @param webContents - The Electron WebContents to query.
|
|
4845
4868
|
* @see {@link OverlayBrowserWindow}.
|
|
4846
|
-
* @returns The corresponding overlay window or `null` if not found.
|
|
4869
|
+
* @returns The corresponding overlay window or `null` if not found.
|
|
4847
4870
|
*/
|
|
4848
4871
|
fromWebContents(webContents: WebContents): OverlayBrowserWindow | null;
|
|
4849
4872
|
|
|
4850
|
-
|
|
4851
4873
|
/**
|
|
4852
4874
|
* Returns the overlay window associated with a given `BrowserWindow`.
|
|
4853
4875
|
*
|
|
@@ -4857,7 +4879,19 @@ interface IOverwolfOverlayApi extends EventEmitter {
|
|
|
4857
4879
|
*/
|
|
4858
4880
|
fromBrowserWindow(browserWindow: BrowserWindow): OverlayBrowserWindow | null;
|
|
4859
4881
|
|
|
4860
|
-
|
|
4882
|
+
/**
|
|
4883
|
+
* Requests game injection for the specified class ID (late injection).
|
|
4884
|
+
*
|
|
4885
|
+
* If the game is running, the 'game-launched' event will be emitted, and you can call `event.inject()` to inject the overlay.
|
|
4886
|
+
* If another game is already injected, the overlay will move to the newly injected game.
|
|
4887
|
+
*
|
|
4888
|
+
* Throws an error if the game is not running.
|
|
4889
|
+
*
|
|
4890
|
+
* @param classId - The class ID of the game to inject the overlay into.
|
|
4891
|
+
*/
|
|
4892
|
+
requestGameInjection(classId: number): Promise<void>;
|
|
4893
|
+
|
|
4894
|
+
/**
|
|
4861
4895
|
* The hotkeys API used to register, update, and remove overlay hotkeys.
|
|
4862
4896
|
* @see {@link IOverlayHotkeys}.
|
|
4863
4897
|
*/
|
|
@@ -4904,24 +4938,24 @@ interface IOverwolfOverlayApi extends EventEmitter {
|
|
|
4904
4938
|
*/
|
|
4905
4939
|
on(eventName: 'game-launched', listener: (event: GameLaunchEvent, gameInfo: GameInfo) => void): this;
|
|
4906
4940
|
|
|
4907
|
-
/**
|
|
4908
|
-
|
|
4909
|
-
|
|
4910
|
-
|
|
4911
|
-
|
|
4912
|
-
|
|
4913
|
-
|
|
4914
|
-
|
|
4915
|
-
|
|
4916
|
-
|
|
4917
|
-
|
|
4918
|
-
|
|
4919
|
-
|
|
4920
|
-
|
|
4921
|
-
|
|
4922
|
-
|
|
4923
|
-
|
|
4924
|
-
|
|
4941
|
+
/**
|
|
4942
|
+
* Fires when a registered game process terminates.
|
|
4943
|
+
*
|
|
4944
|
+
* Useful for performing cleanup, UI updates, or closing overlay windows.
|
|
4945
|
+
*
|
|
4946
|
+
* @param eventName - The event identifier for when the game exits.
|
|
4947
|
+
* @param listener - A callback function that receives the game info of the exited game.
|
|
4948
|
+
*
|
|
4949
|
+
* @example
|
|
4950
|
+
* ```ts
|
|
4951
|
+
* overlay.on('game-exit', (gameInfo, wasInjected) => {
|
|
4952
|
+
* console.log(`Game exited: ${gameInfo.title} and ${wasInjected ? 'was injected' : 'was not injected'}`);
|
|
4953
|
+
* closeOverlayWindows();
|
|
4954
|
+
* });
|
|
4955
|
+
* ```
|
|
4956
|
+
*
|
|
4957
|
+
* @see {@link GameInfo}.
|
|
4958
|
+
*/
|
|
4925
4959
|
on(eventName: 'game-exit', listener: (gameInfo: GameInfo, wasInjected: boolean) => void): this;
|
|
4926
4960
|
|
|
4927
4961
|
/**
|
|
@@ -4986,7 +5020,7 @@ interface IOverwolfOverlayApi extends EventEmitter {
|
|
|
4986
5020
|
* @param eventName - `game-input-interception-changed`
|
|
4987
5021
|
* @param listener - Callback with updated input state.
|
|
4988
5022
|
* @see {@link GameInputInterception}.
|
|
4989
|
-
*
|
|
5023
|
+
*
|
|
4990
5024
|
*/
|
|
4991
5025
|
on(
|
|
4992
5026
|
eventName: 'game-input-interception-changed',
|