IOverwolfUtilityApi
Electron APIs / utility / IOverwolfUtilityApi
Defines the API for managing game launch and utility operations.
Methods
on("game-launched")
on(eventName: "game-launched", listener: (gameInfo: GameInfo) => void): this;
Fires when a tracked game is launched.
Parameters
Parameter | Type | Description |
---|---|---|
eventName | "game-launched" | The name of the event ('game-launched'). |
listener | (gameInfo : GameInfo ) => void | A callback that receives the GameInfo of the launched game. |
Returns
this
The current instance for method chaining.
on("game-exit")
on(eventName: "game-exit", listener: (gameInfo: GameInfo) => void): this;
Fires when a tracked game is exited.
Parameters
Parameter | Type | Description |
---|---|---|
eventName | "game-exit" | The name of the event ('game-exit'). |
listener | (gameInfo : GameInfo ) => void | A callback that receives the GameInfo of the exited game. |
Returns
this
The current instance for method chaining.
scan()
scan(filter?: any): Promise<InstalledGameInfo[]>;
Scans the system for installed games that match the provided filter.
Parameters
Parameter | Type | Description |
---|---|---|
filter? | any | Optional. Configuration specifying which games to include in the scan. |
Returns
Promise
<InstalledGameInfo
[]>
A promise that resolves to an array of InstalledGameInfo
objects representing the installed games.
trackGames()
trackGames(filter: GamesFilter): Promise<void>;
Register games you want to track.
Once a game that matches the filter is launched or exited, the appropriate event listeners will be triggered.
Parameters
Parameter | Type | Description |
---|---|---|
filter | GamesFilter | Configuration specifying which games to register and whether to include unsupported titles. |
Returns
Promise
<void
>