@overwolf/ow-electron-packages-types 1.0.0-beta.6 → 1.0.0-beta.8
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 +81 -38
package/package.json
CHANGED
package/types.d.ts
CHANGED
|
@@ -575,7 +575,7 @@ interface EncoderProperty {
|
|
|
575
575
|
/**
|
|
576
576
|
* The default value for this encoder property.
|
|
577
577
|
*/
|
|
578
|
-
readonly default
|
|
578
|
+
readonly default?: any;
|
|
579
579
|
|
|
580
580
|
/**
|
|
581
581
|
* A human-readable explanation of the property's purpose.
|
|
@@ -583,10 +583,16 @@ interface EncoderProperty {
|
|
|
583
583
|
readonly description: string;
|
|
584
584
|
|
|
585
585
|
/**
|
|
586
|
-
* Optional
|
|
586
|
+
* Optional array of possible values for this property.
|
|
587
587
|
* Useful for dropdowns or presets.
|
|
588
588
|
*/
|
|
589
|
-
readonly values?:
|
|
589
|
+
readonly values?: (string | number)[];
|
|
590
|
+
|
|
591
|
+
/**
|
|
592
|
+
* Optional array of descriptions corresponding to the `values` array.
|
|
593
|
+
* Helps provide additional context for each option.
|
|
594
|
+
*/
|
|
595
|
+
readonly valuesDesc?: string[];
|
|
590
596
|
}
|
|
591
597
|
|
|
592
598
|
/**
|
|
@@ -679,7 +685,7 @@ interface AdapterInfo {
|
|
|
679
685
|
/**
|
|
680
686
|
* The index of the adapter (usually starts at 0 for the primary GPU).
|
|
681
687
|
*/
|
|
682
|
-
readonly index:
|
|
688
|
+
readonly index: number;
|
|
683
689
|
|
|
684
690
|
/**
|
|
685
691
|
* The display name of the GPU adapter.
|
|
@@ -4230,7 +4236,7 @@ type ZOrderType = "default" | "topMost" | "bottomMost";
|
|
|
4230
4236
|
interface OverlayOptions {
|
|
4231
4237
|
/**
|
|
4232
4238
|
* Controls how input is handled by the overlay window.
|
|
4233
|
-
* @default 'noPassThrough'
|
|
4239
|
+
* @default 'noPassThrough'
|
|
4234
4240
|
* @see {@link PassthroughType}.
|
|
4235
4241
|
*
|
|
4236
4242
|
*/
|
|
@@ -4238,18 +4244,28 @@ interface OverlayOptions {
|
|
|
4238
4244
|
|
|
4239
4245
|
/**
|
|
4240
4246
|
* Controls the z-order (stacking order) of the overlay window.
|
|
4241
|
-
* @default 'default'
|
|
4247
|
+
* @default 'default'
|
|
4242
4248
|
* @see {@link ZOrderType}.
|
|
4243
4249
|
*/
|
|
4244
4250
|
zOrder?: ZOrderType;
|
|
4245
4251
|
|
|
4246
4252
|
/**
|
|
4247
4253
|
* Controls whether the overlay intercepts keyboard input.
|
|
4248
|
-
*
|
|
4254
|
+
*
|
|
4249
4255
|
* `true`—the overlay won't intercept keyboard input.
|
|
4250
4256
|
* @default false
|
|
4251
4257
|
*/
|
|
4252
4258
|
ignoreKeyboardInput?: boolean;
|
|
4259
|
+
|
|
4260
|
+
/**
|
|
4261
|
+
* When `true`, the overlay window is strictly confined to the game window boundaries.
|
|
4262
|
+
*
|
|
4263
|
+
* This prevents the overlay from being moved outside the game window area.
|
|
4264
|
+
* @default false
|
|
4265
|
+
*
|
|
4266
|
+
* @since 1.9.0
|
|
4267
|
+
*/
|
|
4268
|
+
strictToGameWindow?: boolean;
|
|
4253
4269
|
}
|
|
4254
4270
|
|
|
4255
4271
|
|
|
@@ -4529,22 +4545,22 @@ interface InjectionError {
|
|
|
4529
4545
|
* ```
|
|
4530
4546
|
*/
|
|
4531
4547
|
interface GameWindowInfo {
|
|
4532
|
-
/**
|
|
4533
|
-
* The dimensions of the game window.
|
|
4548
|
+
/**
|
|
4549
|
+
* The dimensions of the game window.
|
|
4534
4550
|
*/
|
|
4535
4551
|
readonly size: Size;
|
|
4536
4552
|
|
|
4537
|
-
/**
|
|
4553
|
+
/**
|
|
4538
4554
|
* The native window handle (HWND) of the game window.
|
|
4539
4555
|
*/
|
|
4540
4556
|
readonly nativeHandle: number;
|
|
4541
4557
|
|
|
4542
|
-
/**
|
|
4558
|
+
/**
|
|
4543
4559
|
* Indicates if the game window is currently in focus.
|
|
4544
4560
|
*/
|
|
4545
4561
|
readonly focused: boolean;
|
|
4546
4562
|
|
|
4547
|
-
/**
|
|
4563
|
+
/**
|
|
4548
4564
|
* The graphics API used by the game (e.g., Direct3D 9, 11, 12, Vulkan).
|
|
4549
4565
|
*/
|
|
4550
4566
|
readonly graphics: 'd3d9' | 'd3d12' | 'd3d11' | 'vulkan' | string | undefined;
|
|
@@ -4554,15 +4570,31 @@ interface GameWindowInfo {
|
|
|
4554
4570
|
*/
|
|
4555
4571
|
readonly screen?: Display;
|
|
4556
4572
|
|
|
4557
|
-
/**
|
|
4573
|
+
/**
|
|
4558
4574
|
* The bounding rectangle of the game window in the screen's coordinates.
|
|
4559
4575
|
*
|
|
4560
4576
|
* For example: `bounds: { x: 100, y: 100, width: 800, height: 600 }`
|
|
4561
|
-
*
|
|
4577
|
+
*
|
|
4562
4578
|
* Means the game window is positioned at (100, 100) on the screen and has a size of 800x600 pixels.
|
|
4563
4579
|
* @since 1.5.11.
|
|
4564
4580
|
*/
|
|
4565
4581
|
readonly bounds?: Rectangle;
|
|
4582
|
+
|
|
4583
|
+
/**
|
|
4584
|
+
* Indicates if the game is currently running in fullscreen exclusive mode.
|
|
4585
|
+
*
|
|
4586
|
+
* Relevant only for OOPO games.
|
|
4587
|
+
* @since 1.9.0
|
|
4588
|
+
*/
|
|
4589
|
+
readonly isFullscreen?: boolean;
|
|
4590
|
+
|
|
4591
|
+
/**
|
|
4592
|
+
* Indicates if fullscreen rendering is disabled.
|
|
4593
|
+
*
|
|
4594
|
+
* Relevant only for OOPO games.
|
|
4595
|
+
* @since 1.9.0
|
|
4596
|
+
*/
|
|
4597
|
+
readonly isOOPOFullscreenRenderingDisabled?: boolean;
|
|
4566
4598
|
}
|
|
4567
4599
|
|
|
4568
4600
|
/**
|
|
@@ -4809,7 +4841,7 @@ interface IOverlayHotkeys {
|
|
|
4809
4841
|
interface IOverwolfOverlayApi extends EventEmitter {
|
|
4810
4842
|
/**
|
|
4811
4843
|
* Create new Overlay window.
|
|
4812
|
-
* @param options - Window configuration including name, z-order, passthrough, etc.
|
|
4844
|
+
* @param options - Window configuration including name, z-order, passthrough, etc.
|
|
4813
4845
|
* @returns A promise that resolves to the created `OverlayBrowserWindow`.
|
|
4814
4846
|
* @see {@link OverlayWindowOptions}.
|
|
4815
4847
|
* @see {@link OverlayBrowserWindow}.
|
|
@@ -4838,13 +4870,12 @@ interface IOverwolfOverlayApi extends EventEmitter {
|
|
|
4838
4870
|
|
|
4839
4871
|
/**
|
|
4840
4872
|
* Returns the overlay window associated with a given `WebContents` instance.
|
|
4841
|
-
* @param webContents - The Electron WebContents to query.
|
|
4873
|
+
* @param webContents - The Electron WebContents to query.
|
|
4842
4874
|
* @see {@link OverlayBrowserWindow}.
|
|
4843
|
-
* @returns The corresponding overlay window or `null` if not found.
|
|
4875
|
+
* @returns The corresponding overlay window or `null` if not found.
|
|
4844
4876
|
*/
|
|
4845
4877
|
fromWebContents(webContents: WebContents): OverlayBrowserWindow | null;
|
|
4846
4878
|
|
|
4847
|
-
|
|
4848
4879
|
/**
|
|
4849
4880
|
* Returns the overlay window associated with a given `BrowserWindow`.
|
|
4850
4881
|
*
|
|
@@ -4854,7 +4885,19 @@ interface IOverwolfOverlayApi extends EventEmitter {
|
|
|
4854
4885
|
*/
|
|
4855
4886
|
fromBrowserWindow(browserWindow: BrowserWindow): OverlayBrowserWindow | null;
|
|
4856
4887
|
|
|
4857
|
-
|
|
4888
|
+
/**
|
|
4889
|
+
* Requests game injection for the specified class ID (late injection).
|
|
4890
|
+
*
|
|
4891
|
+
* If the game is running, the 'game-launched' event will be emitted, and you can call `event.inject()` to inject the overlay.
|
|
4892
|
+
* If another game is already injected, the overlay will move to the newly injected game.
|
|
4893
|
+
*
|
|
4894
|
+
* Throws an error if the game is not running.
|
|
4895
|
+
*
|
|
4896
|
+
* @param classId - The class ID of the game to inject the overlay into.
|
|
4897
|
+
*/
|
|
4898
|
+
requestGameInjection(classId: number): Promise<void>;
|
|
4899
|
+
|
|
4900
|
+
/**
|
|
4858
4901
|
* The hotkeys API used to register, update, and remove overlay hotkeys.
|
|
4859
4902
|
* @see {@link IOverlayHotkeys}.
|
|
4860
4903
|
*/
|
|
@@ -4901,24 +4944,24 @@ interface IOverwolfOverlayApi extends EventEmitter {
|
|
|
4901
4944
|
*/
|
|
4902
4945
|
on(eventName: 'game-launched', listener: (event: GameLaunchEvent, gameInfo: GameInfo) => void): this;
|
|
4903
4946
|
|
|
4904
|
-
/**
|
|
4905
|
-
|
|
4906
|
-
|
|
4907
|
-
|
|
4908
|
-
|
|
4909
|
-
|
|
4910
|
-
|
|
4911
|
-
|
|
4912
|
-
|
|
4913
|
-
|
|
4914
|
-
|
|
4915
|
-
|
|
4916
|
-
|
|
4917
|
-
|
|
4918
|
-
|
|
4919
|
-
|
|
4920
|
-
|
|
4921
|
-
|
|
4947
|
+
/**
|
|
4948
|
+
* Fires when a registered game process terminates.
|
|
4949
|
+
*
|
|
4950
|
+
* Useful for performing cleanup, UI updates, or closing overlay windows.
|
|
4951
|
+
*
|
|
4952
|
+
* @param eventName - The event identifier for when the game exits.
|
|
4953
|
+
* @param listener - A callback function that receives the game info of the exited game.
|
|
4954
|
+
*
|
|
4955
|
+
* @example
|
|
4956
|
+
* ```ts
|
|
4957
|
+
* overlay.on('game-exit', (gameInfo, wasInjected) => {
|
|
4958
|
+
* console.log(`Game exited: ${gameInfo.title} and ${wasInjected ? 'was injected' : 'was not injected'}`);
|
|
4959
|
+
* closeOverlayWindows();
|
|
4960
|
+
* });
|
|
4961
|
+
* ```
|
|
4962
|
+
*
|
|
4963
|
+
* @see {@link GameInfo}.
|
|
4964
|
+
*/
|
|
4922
4965
|
on(eventName: 'game-exit', listener: (gameInfo: GameInfo, wasInjected: boolean) => void): this;
|
|
4923
4966
|
|
|
4924
4967
|
/**
|
|
@@ -4983,7 +5026,7 @@ interface IOverwolfOverlayApi extends EventEmitter {
|
|
|
4983
5026
|
* @param eventName - `game-input-interception-changed`
|
|
4984
5027
|
* @param listener - Callback with updated input state.
|
|
4985
5028
|
* @see {@link GameInputInterception}.
|
|
4986
|
-
*
|
|
5029
|
+
*
|
|
4987
5030
|
*/
|
|
4988
5031
|
on(
|
|
4989
5032
|
eventName: 'game-input-interception-changed',
|