@overwolf/ow-electron-packages-types 1.0.0-beta.6 → 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 +71 -34
package/package.json
CHANGED
package/types.d.ts
CHANGED
|
@@ -4230,7 +4230,7 @@ type ZOrderType = "default" | "topMost" | "bottomMost";
|
|
|
4230
4230
|
interface OverlayOptions {
|
|
4231
4231
|
/**
|
|
4232
4232
|
* Controls how input is handled by the overlay window.
|
|
4233
|
-
* @default 'noPassThrough'
|
|
4233
|
+
* @default 'noPassThrough'
|
|
4234
4234
|
* @see {@link PassthroughType}.
|
|
4235
4235
|
*
|
|
4236
4236
|
*/
|
|
@@ -4238,18 +4238,28 @@ interface OverlayOptions {
|
|
|
4238
4238
|
|
|
4239
4239
|
/**
|
|
4240
4240
|
* Controls the z-order (stacking order) of the overlay window.
|
|
4241
|
-
* @default 'default'
|
|
4241
|
+
* @default 'default'
|
|
4242
4242
|
* @see {@link ZOrderType}.
|
|
4243
4243
|
*/
|
|
4244
4244
|
zOrder?: ZOrderType;
|
|
4245
4245
|
|
|
4246
4246
|
/**
|
|
4247
4247
|
* Controls whether the overlay intercepts keyboard input.
|
|
4248
|
-
*
|
|
4248
|
+
*
|
|
4249
4249
|
* `true`—the overlay won't intercept keyboard input.
|
|
4250
4250
|
* @default false
|
|
4251
4251
|
*/
|
|
4252
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;
|
|
4253
4263
|
}
|
|
4254
4264
|
|
|
4255
4265
|
|
|
@@ -4529,22 +4539,22 @@ interface InjectionError {
|
|
|
4529
4539
|
* ```
|
|
4530
4540
|
*/
|
|
4531
4541
|
interface GameWindowInfo {
|
|
4532
|
-
/**
|
|
4533
|
-
* The dimensions of the game window.
|
|
4542
|
+
/**
|
|
4543
|
+
* The dimensions of the game window.
|
|
4534
4544
|
*/
|
|
4535
4545
|
readonly size: Size;
|
|
4536
4546
|
|
|
4537
|
-
/**
|
|
4547
|
+
/**
|
|
4538
4548
|
* The native window handle (HWND) of the game window.
|
|
4539
4549
|
*/
|
|
4540
4550
|
readonly nativeHandle: number;
|
|
4541
4551
|
|
|
4542
|
-
/**
|
|
4552
|
+
/**
|
|
4543
4553
|
* Indicates if the game window is currently in focus.
|
|
4544
4554
|
*/
|
|
4545
4555
|
readonly focused: boolean;
|
|
4546
4556
|
|
|
4547
|
-
/**
|
|
4557
|
+
/**
|
|
4548
4558
|
* The graphics API used by the game (e.g., Direct3D 9, 11, 12, Vulkan).
|
|
4549
4559
|
*/
|
|
4550
4560
|
readonly graphics: 'd3d9' | 'd3d12' | 'd3d11' | 'vulkan' | string | undefined;
|
|
@@ -4554,15 +4564,31 @@ interface GameWindowInfo {
|
|
|
4554
4564
|
*/
|
|
4555
4565
|
readonly screen?: Display;
|
|
4556
4566
|
|
|
4557
|
-
/**
|
|
4567
|
+
/**
|
|
4558
4568
|
* The bounding rectangle of the game window in the screen's coordinates.
|
|
4559
4569
|
*
|
|
4560
4570
|
* For example: `bounds: { x: 100, y: 100, width: 800, height: 600 }`
|
|
4561
|
-
*
|
|
4571
|
+
*
|
|
4562
4572
|
* Means the game window is positioned at (100, 100) on the screen and has a size of 800x600 pixels.
|
|
4563
4573
|
* @since 1.5.11.
|
|
4564
4574
|
*/
|
|
4565
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;
|
|
4566
4592
|
}
|
|
4567
4593
|
|
|
4568
4594
|
/**
|
|
@@ -4809,7 +4835,7 @@ interface IOverlayHotkeys {
|
|
|
4809
4835
|
interface IOverwolfOverlayApi extends EventEmitter {
|
|
4810
4836
|
/**
|
|
4811
4837
|
* Create new Overlay window.
|
|
4812
|
-
* @param options - Window configuration including name, z-order, passthrough, etc.
|
|
4838
|
+
* @param options - Window configuration including name, z-order, passthrough, etc.
|
|
4813
4839
|
* @returns A promise that resolves to the created `OverlayBrowserWindow`.
|
|
4814
4840
|
* @see {@link OverlayWindowOptions}.
|
|
4815
4841
|
* @see {@link OverlayBrowserWindow}.
|
|
@@ -4838,13 +4864,12 @@ interface IOverwolfOverlayApi extends EventEmitter {
|
|
|
4838
4864
|
|
|
4839
4865
|
/**
|
|
4840
4866
|
* Returns the overlay window associated with a given `WebContents` instance.
|
|
4841
|
-
* @param webContents - The Electron WebContents to query.
|
|
4867
|
+
* @param webContents - The Electron WebContents to query.
|
|
4842
4868
|
* @see {@link OverlayBrowserWindow}.
|
|
4843
|
-
* @returns The corresponding overlay window or `null` if not found.
|
|
4869
|
+
* @returns The corresponding overlay window or `null` if not found.
|
|
4844
4870
|
*/
|
|
4845
4871
|
fromWebContents(webContents: WebContents): OverlayBrowserWindow | null;
|
|
4846
4872
|
|
|
4847
|
-
|
|
4848
4873
|
/**
|
|
4849
4874
|
* Returns the overlay window associated with a given `BrowserWindow`.
|
|
4850
4875
|
*
|
|
@@ -4854,7 +4879,19 @@ interface IOverwolfOverlayApi extends EventEmitter {
|
|
|
4854
4879
|
*/
|
|
4855
4880
|
fromBrowserWindow(browserWindow: BrowserWindow): OverlayBrowserWindow | null;
|
|
4856
4881
|
|
|
4857
|
-
|
|
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
|
+
/**
|
|
4858
4895
|
* The hotkeys API used to register, update, and remove overlay hotkeys.
|
|
4859
4896
|
* @see {@link IOverlayHotkeys}.
|
|
4860
4897
|
*/
|
|
@@ -4901,24 +4938,24 @@ interface IOverwolfOverlayApi extends EventEmitter {
|
|
|
4901
4938
|
*/
|
|
4902
4939
|
on(eventName: 'game-launched', listener: (event: GameLaunchEvent, gameInfo: GameInfo) => void): this;
|
|
4903
4940
|
|
|
4904
|
-
/**
|
|
4905
|
-
|
|
4906
|
-
|
|
4907
|
-
|
|
4908
|
-
|
|
4909
|
-
|
|
4910
|
-
|
|
4911
|
-
|
|
4912
|
-
|
|
4913
|
-
|
|
4914
|
-
|
|
4915
|
-
|
|
4916
|
-
|
|
4917
|
-
|
|
4918
|
-
|
|
4919
|
-
|
|
4920
|
-
|
|
4921
|
-
|
|
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
|
+
*/
|
|
4922
4959
|
on(eventName: 'game-exit', listener: (gameInfo: GameInfo, wasInjected: boolean) => void): this;
|
|
4923
4960
|
|
|
4924
4961
|
/**
|
|
@@ -4983,7 +5020,7 @@ interface IOverwolfOverlayApi extends EventEmitter {
|
|
|
4983
5020
|
* @param eventName - `game-input-interception-changed`
|
|
4984
5021
|
* @param listener - Callback with updated input state.
|
|
4985
5022
|
* @see {@link GameInputInterception}.
|
|
4986
|
-
*
|
|
5023
|
+
*
|
|
4987
5024
|
*/
|
|
4988
5025
|
on(
|
|
4989
5026
|
eventName: 'game-input-interception-changed',
|