Overview
Electron APIs / utility
This module provides utility methods for tracking and managing game-related events such as game launch, exit, and scanning for installed games. It is used to enable event-driven behavior based on a user's game activity.
Example
const utility: IOverwolfUtilityApi = new OverwolfUtility();
utility.trackGames({ includeUnsupported: true });
utility.on("game-launched", (gameInfo) => {
console.log("Game launched:", gameInfo.name);
});
utility.on("game-exit", (gameInfo) => {
console.log("Game exited:", gameInfo.name);
});
const installedGames = await utility.scan();
console.log("Installed games:", installedGames);
Interfaces
| Interface | Description |
|---|---|
| ElevatedInjectionCapability | Reports whether an elevated (HIGH integrity) game can actually be injected under the account the app is running as. |
| IOverwolfUtilityApi | Defines the API for managing game launch and utility operations. |
| UtilityApiError | The value a failed elevation call rejects with: installHighElevationHelper(), isHighElevationHelperInstalled(), canInjectElevated(), installElevationBroker() and uninstallElevationBroker(). |
Type Aliases
| Type Alias | Description |
|---|---|
| ElevatedInjectionUnsupportedReason | Reason canInjectElevated() reports ElevatedInjectionCapability.supported as false. |