mirror of
https://github.com/SteamDeckHomebrew/decky-frontend-lib.git
synced 2026-05-21 02:19:12 +02:00
* change: Add SteamClient types Steam Version: 1690583737 Steam Client Build Date: Sat, Jul 29 02:44 UTC -08:00 * new: Document some SteamClient interfaces Using the SDH discord server, GitHub and some personal findings, I tried to document as much SteamClient functions as I can. * new: Document some SteamClient interfaces - part 2 * new: Document some SteamClient interfaces - part 3 * new: Document some SteamClient interfaces - part 4 * new: Document some SteamClient interfaces - part 5 * new: Document some SteamClient interfaces - part 6 * new: Document some SteamClient interfaces - part 7 * change: Update interfaces to Steam Version 1691097434 Steam Version: 1691097434 Steam Client Build Date: Fri, Aug 4 04:54 UTC -08:00 * new: Document some SteamClient interfaces - part 8 * new: Document some SteamClient interfaces - part 9 * change: Update interfaces to Steam Version 1694466342 Steam Version: 1694466342 Steam Client Build Date: Tue, Sep 12 04:59 UTC +08:00 * new: Document some SteamClient interfaces - part 10 * new: Document some SteamClient interfaces - part 11 * new: Document some SteamClient interfaces - part 12 * new: Document some SteamClient interfaces - part 13 * new: Document some SteamClient interfaces - part 14 * change: Update interfaces to Steam Version 1698260427 Steam Version: 1698260427 Steam Client Build Date: Thu, Oct 26 2:40 AM UTC -08:00 * new: Document some SteamClient interfaces - part 10 * change: Update interfaces to Steam Version 1700160213 Steam Version: 1700160213 Steam Client Build Date: Fri, Nov 17 2:23 AM UTC +08:00 * docs(SteamClient): document some interfaces * change: Fix formatting style * docs(SteamClient): document protobufs & System.Report * docs(SteamClient): document CMsgMonitorInfo * docs(SteamClient): document remaining messages * docs(SteamClient): update interfaces to Steam Version 1702515219 Steam Version: 1702515219 Steam Client Build Date: Thu, Dec 14 00:36 UTC -08:00 * docs(SteamClient): update interfaces to Steam Version 1704329464 Steam Version: 1704329464 Steam Client Build Date: Thu, Jan 4 12:23 AM UTC -08:00 * docs(SteamClient): update interfaces to Steam Version 1705630720 Steam Version: 1705630720 Steam Client Build Date: Fri, Jan 19 1:58 AM UTC -08:00 * docs(SteamClient): update interfaces to Steam Version 1706914901 Steam Version: 1706914901 Steam Client Build Date: Fri, Feb 2 8:46 PM UTC -08:00 * docs(SteamClient): update interfaces to Steam Version 1709920887 Steam Version: 1709920887 Steam Client Build Date: Thu, Mar 7 5:29 PM UTC -08:00 * docs(SteamClient): update interfaces to Steam Version 1710786209 Steam Version: 1710786209 Steam Client Build Date: Mon, Mar 18 7:07 PM UTC -08:00 * docs(SteamClient): document even more interfaces * new: Document some SteamClient interfaces - part 15 * Fix QAM button bit number * new: Document some SteamClient interfaces - part 16 * change: Update interfaces to Steam Version 1714854927 Steam Version: 1714854927 Steam Client Build Date: Sat, May 4 7:11 AM UTC -08:00 * change: Refactor and reorganize SteamClient * docs(SteamClient): document more notification interfaces * docs(SteamClient): document more interfaces * docs(SteamClient): add some descriptions * docs(SteamClient): remove duplicate types * change: Fix rebase errors * Updated ControllerStateChange * Fix typo * docs(SteamClient): update interfaces to Steam Version 1723601482 Steam Version: 1723601482 Steam Client Build Date: Wed, Aug 14 01:51 UTC -08:00 * docs(SteamClient): update interfaces to 1725654351 * docs(SteamClient): update interfaces to 1730416762 * docs(SteamClient): forgot some stuff * docs(SteamClient): add missed interfaces * docs(SteamClient): update enums * docs(SteamClient): add some things and move stuff around * docs(SteamClient): move shared enums/interfaces to a separate file * docs(SteamClient): add more stuff * docs(SteamClient): reword some things * docs(SteamClient): new BrowserView things * docs(SteamClient): review fixes * move to src/globals --------- Co-authored-by: ricewind012 <58827198+ricewind012@users.noreply.github.com> Co-authored-by: Party Wumpus <48649272+PartyWumpus@users.noreply.github.com> Co-authored-by: Xander <xander@isxander.dev>
168 lines
5.5 KiB
TypeScript
168 lines
5.5 KiB
TypeScript
import { Unregisterable } from "./shared";
|
|
import {EAppUpdateError} from "./App";
|
|
|
|
/**
|
|
* Represents functions related to Steam Install Folders.
|
|
*/
|
|
export interface InstallFolder {
|
|
/**
|
|
* Adds a Steam Library folder to the Steam client.
|
|
* @param path The path of the Steam Library folder to be added.
|
|
* @returns the index of the added folder.
|
|
*/
|
|
AddInstallFolder(path: string): Promise<number>;
|
|
|
|
/**
|
|
* Opens the file explorer to browse files in a specific Steam Library folder.
|
|
* @param folderIndex The index of the folder to be opened.
|
|
*/
|
|
BrowseFilesInFolder(folderIndex: number): void;
|
|
|
|
/**
|
|
* Cancels the current move operation for moving game content.
|
|
*/
|
|
CancelMove(): void;
|
|
|
|
/**
|
|
* Retrieves a list of installed Steam Library folders.
|
|
* @returns an array of SteamInstallFolder objects.
|
|
*/
|
|
GetInstallFolders(): Promise<SteamInstallFolder[]>;
|
|
|
|
/**
|
|
* Retrieves a list of potential Steam Library folders that can be added.
|
|
* @returns an array of PotentialInstallFolder objects.
|
|
*/
|
|
GetPotentialFolders(): Promise<PotentialInstallFolder[]>;
|
|
|
|
/**
|
|
* Moves the installation folder for a specific app to another Steam Library folder.
|
|
* @param appId The ID of the application to be moved.
|
|
* @param folderIndex The index of the target Steam Library folder.
|
|
*/
|
|
MoveInstallFolderForApp(appId: number, folderIndex: number): void;
|
|
|
|
/**
|
|
* Refreshes the list of installed Steam Library folders.
|
|
*/
|
|
RefreshFolders(): void;
|
|
|
|
/**
|
|
* Registers a callback function to be called when changes occur in Steam Install Folders.
|
|
* @param callback The callback function to be called.
|
|
* @returns an object that can be used to unregister the callback.
|
|
*/
|
|
RegisterForInstallFolderChanges(callback: (change: FolderChange) => void): Unregisterable;
|
|
|
|
/**
|
|
* Registers a callback function to be called when moving game content progresses.
|
|
* @param callback The callback function to be called.
|
|
* @returns an object that can be used to unregister the callback.
|
|
*/
|
|
RegisterForMoveContentProgress(callback: (progress: MoveContentProgress) => void): Unregisterable;
|
|
|
|
/**
|
|
* Registers a callback function to be called when repairing an install folder is finished.
|
|
* @param callback The callback function to be called.
|
|
* @returns an object that can be used to unregister the callback.
|
|
*/
|
|
RegisterForRepairFolderFinished(callback: (change: FolderChange) => void): Unregisterable;
|
|
|
|
/**
|
|
* Removes a Steam Library folder from the Steam client.
|
|
* @param folderIndex The index of the folder to be removed.
|
|
*/
|
|
RemoveInstallFolder(folderIndex: number): void;
|
|
|
|
/**
|
|
* Repairs an installed Steam Library folder.
|
|
* @param folderIndex The index of the folder to be repaired.
|
|
*/
|
|
RepairInstallFolder(folderIndex: number): void;
|
|
|
|
/**
|
|
* Sets a specific Steam Library folder as the default install folder.
|
|
* @param folderIndex The index of the folder to be set as default.
|
|
*/
|
|
SetDefaultInstallFolder(folderIndex: number): void;
|
|
|
|
/**
|
|
* Sets a user-defined label for a specific Steam Library folder.
|
|
* @param folderIndex The index of the folder to be labeled.
|
|
* @param label The label to be assigned to the folder.
|
|
*/
|
|
SetFolderLabel(folderIndex: number, label: string): void;
|
|
}
|
|
|
|
/**
|
|
* Represents information about an installation folder.
|
|
*/
|
|
export interface SteamInstallFolder extends PotentialInstallFolder {
|
|
/** Index of the folder. */
|
|
nFolderIndex: number;
|
|
/** Used space in the folder. */
|
|
strUsedSize: string;
|
|
/** Size of DLC storage used in the folder. */
|
|
strDLCSize: string;
|
|
/** Size of workshop storage used in the folder. */
|
|
strWorkshopSize: string;
|
|
/** Size of staged storage used in the folder. */
|
|
strStagedSize: string;
|
|
/** Indicates if the folder is set as the default installation folder. */
|
|
bIsDefaultFolder: boolean;
|
|
/** Indicates if the folder is currently mounted. */
|
|
bIsMounted: boolean;
|
|
/** List of applications installed in the folder. */
|
|
vecApps: AppInfo[];
|
|
}
|
|
|
|
export interface PotentialInstallFolder {
|
|
/** Path of the folder. */
|
|
strFolderPath: string;
|
|
/** User label for the folder. */
|
|
strUserLabel: string;
|
|
/** Name of the drive where the folder is located. */
|
|
strDriveName: string;
|
|
/** Total capacity of the folder. */
|
|
strCapacity: string;
|
|
/** Available free space in the folder. */
|
|
strFreeSpace: string;
|
|
/** Indicates if the folder is on a fixed drive. */
|
|
bIsFixed: boolean;
|
|
}
|
|
|
|
/**
|
|
* Represents information about an installed application.
|
|
*/
|
|
export interface AppInfo {
|
|
/** ID of the application. */
|
|
nAppID: number;
|
|
/** Name of the application. */
|
|
strAppName: string;
|
|
/** Sorting information for the application. */
|
|
strSortAs: string;
|
|
/** Last played time in Unix Epoch time format. */
|
|
rtLastPlayed: number;
|
|
/** Size of used storage by the application. */
|
|
strUsedSize: string;
|
|
/** Size of DLC storage used by the application. */
|
|
strDLCSize: string;
|
|
/** Size of workshop storage used by the application. */
|
|
strWorkshopSize: string;
|
|
/** Size of staged storage used by the application. */
|
|
strStagedSize: string;
|
|
}
|
|
|
|
export interface FolderChange {
|
|
folderIndex: number;
|
|
}
|
|
|
|
export interface MoveContentProgress {
|
|
appid: number;
|
|
eError: EAppUpdateError;
|
|
flProgress: number;
|
|
strBytesMoved: string;
|
|
strTotalBytesToMove: string;
|
|
nFilesMoved: number;
|
|
}
|