@decky/ui 4.9.1 → 4.10.0

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.
Files changed (184) hide show
  1. package/dist/components/SidebarNavigation.d.ts +1 -1
  2. package/dist/globals/SteamClient.d.ts +1 -304
  3. package/dist/globals/steam-client/App.d.ts +880 -0
  4. package/dist/globals/steam-client/App.js +320 -0
  5. package/dist/globals/steam-client/Auth.d.ts +57 -0
  6. package/dist/globals/steam-client/Auth.js +19 -0
  7. package/dist/globals/steam-client/Broadcast.d.ts +22 -0
  8. package/dist/globals/steam-client/Broadcast.js +1 -0
  9. package/dist/globals/steam-client/Browser.d.ts +45 -0
  10. package/dist/globals/steam-client/Browser.js +17 -0
  11. package/dist/globals/steam-client/ClientNotifications.d.ts +20 -0
  12. package/dist/globals/steam-client/ClientNotifications.js +6 -0
  13. package/dist/globals/steam-client/Cloud.d.ts +4 -0
  14. package/dist/globals/steam-client/Cloud.js +1 -0
  15. package/dist/globals/steam-client/CommunityItems.d.ts +5 -0
  16. package/dist/globals/steam-client/CommunityItems.js +1 -0
  17. package/dist/globals/steam-client/Console.d.ts +11 -0
  18. package/dist/globals/steam-client/Console.js +1 -0
  19. package/dist/globals/steam-client/Customization.d.ts +8 -0
  20. package/dist/globals/steam-client/Customization.js +1 -0
  21. package/dist/globals/steam-client/Downloads.d.ts +63 -0
  22. package/dist/globals/steam-client/Downloads.js +1 -0
  23. package/dist/globals/steam-client/FamilySharing.d.ts +20 -0
  24. package/dist/globals/steam-client/FamilySharing.js +1 -0
  25. package/dist/globals/steam-client/FriendSettings.d.ts +49 -0
  26. package/dist/globals/steam-client/FriendSettings.js +6 -0
  27. package/dist/globals/steam-client/Friends.d.ts +27 -0
  28. package/dist/globals/steam-client/Friends.js +1 -0
  29. package/dist/globals/steam-client/GameNotes.d.ts +41 -0
  30. package/dist/globals/steam-client/GameNotes.js +1 -0
  31. package/dist/globals/steam-client/GameRecording.d.ts +20 -0
  32. package/dist/globals/steam-client/GameRecording.js +1 -0
  33. package/dist/globals/steam-client/GameSessions.d.ts +26 -0
  34. package/dist/globals/steam-client/GameSessions.js +1 -0
  35. package/dist/globals/steam-client/Input.d.ts +421 -0
  36. package/dist/globals/steam-client/Input.js +170 -0
  37. package/dist/globals/steam-client/InstallFolder.d.ts +57 -0
  38. package/dist/globals/steam-client/InstallFolder.js +1 -0
  39. package/dist/globals/steam-client/Installs.d.ts +60 -0
  40. package/dist/globals/steam-client/Installs.js +20 -0
  41. package/dist/globals/steam-client/Messaging.d.ts +5 -0
  42. package/dist/globals/steam-client/Messaging.js +1 -0
  43. package/dist/globals/steam-client/Music.d.ts +36 -0
  44. package/dist/globals/steam-client/Music.js +14 -0
  45. package/dist/globals/steam-client/Notifications.d.ts +260 -0
  46. package/dist/globals/steam-client/Notifications.js +73 -0
  47. package/dist/globals/steam-client/OpenVR.d.ts +85 -0
  48. package/dist/globals/steam-client/OpenVR.js +16 -0
  49. package/dist/globals/steam-client/Overlay.d.ts +58 -0
  50. package/dist/globals/steam-client/Overlay.js +18 -0
  51. package/dist/globals/steam-client/Parental.d.ts +69 -0
  52. package/dist/globals/steam-client/Parental.js +19 -0
  53. package/dist/globals/steam-client/RemotePlay.d.ts +225 -0
  54. package/dist/globals/steam-client/RemotePlay.js +71 -0
  55. package/dist/globals/steam-client/Screenshots.d.ts +47 -0
  56. package/dist/globals/steam-client/Screenshots.js +8 -0
  57. package/dist/globals/steam-client/ServerBrowser.d.ts +117 -0
  58. package/dist/globals/steam-client/ServerBrowser.js +26 -0
  59. package/dist/globals/steam-client/Settings.d.ts +398 -0
  60. package/dist/globals/steam-client/Settings.js +96 -0
  61. package/dist/globals/steam-client/SharedConnection.d.ts +22 -0
  62. package/dist/globals/steam-client/SharedConnection.js +1 -0
  63. package/dist/globals/steam-client/Stats.d.ts +4 -0
  64. package/dist/globals/steam-client/Stats.js +1 -0
  65. package/dist/globals/steam-client/SteamChina.d.ts +3 -0
  66. package/dist/globals/steam-client/SteamChina.js +1 -0
  67. package/dist/globals/steam-client/Storage.d.ts +8 -0
  68. package/dist/globals/steam-client/Storage.js +1 -0
  69. package/dist/globals/steam-client/Streaming.d.ts +15 -0
  70. package/dist/globals/steam-client/Streaming.js +1 -0
  71. package/dist/globals/steam-client/UI.d.ts +44 -0
  72. package/dist/globals/steam-client/UI.js +12 -0
  73. package/dist/globals/steam-client/URL.d.ts +16 -0
  74. package/dist/globals/steam-client/URL.js +1 -0
  75. package/dist/globals/steam-client/Updates.d.ts +68 -0
  76. package/dist/globals/steam-client/Updates.js +34 -0
  77. package/dist/globals/steam-client/User.d.ts +130 -0
  78. package/dist/globals/steam-client/User.js +33 -0
  79. package/dist/globals/steam-client/WebChat.d.ts +60 -0
  80. package/dist/globals/steam-client/WebChat.js +6 -0
  81. package/dist/globals/steam-client/WebUITransport.d.ts +11 -0
  82. package/dist/globals/steam-client/WebUITransport.js +1 -0
  83. package/dist/globals/steam-client/Window.d.ts +66 -0
  84. package/dist/globals/steam-client/Window.js +6 -0
  85. package/dist/globals/steam-client/browser-view/BrowserViewPopup.d.ts +124 -0
  86. package/dist/globals/steam-client/browser-view/BrowserViewPopup.js +35 -0
  87. package/dist/globals/steam-client/browser-view/index.d.ts +20 -0
  88. package/dist/globals/steam-client/browser-view/index.js +1 -0
  89. package/dist/globals/steam-client/index.d.ts +89 -0
  90. package/dist/globals/steam-client/index.js +1 -0
  91. package/dist/globals/steam-client/shared.d.ts +166 -0
  92. package/dist/globals/steam-client/shared.js +146 -0
  93. package/dist/globals/steam-client/system/Audio.d.ts +42 -0
  94. package/dist/globals/steam-client/system/Audio.js +1 -0
  95. package/dist/globals/steam-client/system/AudioDevice.d.ts +92 -0
  96. package/dist/globals/steam-client/system/AudioDevice.js +33 -0
  97. package/dist/globals/steam-client/system/Bluetooth.d.ts +47 -0
  98. package/dist/globals/steam-client/system/Bluetooth.js +15 -0
  99. package/dist/globals/steam-client/system/Devkit.d.ts +7 -0
  100. package/dist/globals/steam-client/system/Devkit.js +1 -0
  101. package/dist/globals/steam-client/system/Display.d.ts +10 -0
  102. package/dist/globals/steam-client/system/Display.js +1 -0
  103. package/dist/globals/steam-client/system/DisplayManager.d.ts +9 -0
  104. package/dist/globals/steam-client/system/DisplayManager.js +1 -0
  105. package/dist/globals/steam-client/system/Dock.d.ts +19 -0
  106. package/dist/globals/steam-client/system/Dock.js +1 -0
  107. package/dist/globals/steam-client/system/Perf.d.ts +159 -0
  108. package/dist/globals/steam-client/system/Perf.js +53 -0
  109. package/dist/globals/steam-client/system/Report.d.ts +13 -0
  110. package/dist/globals/steam-client/system/Report.js +1 -0
  111. package/dist/globals/steam-client/system/UI.d.ts +28 -0
  112. package/dist/globals/steam-client/system/UI.js +1 -0
  113. package/dist/globals/steam-client/system/index.d.ts +243 -0
  114. package/dist/globals/steam-client/system/index.js +111 -0
  115. package/dist/globals/steam-client/system/network/Device.d.ts +10 -0
  116. package/dist/globals/steam-client/system/network/Device.js +1 -0
  117. package/dist/globals/steam-client/system/network/index.d.ts +312 -0
  118. package/dist/globals/steam-client/system/network/index.js +55 -0
  119. package/dist/globals/stores.d.ts +26 -13
  120. package/dist/modules/Router.d.ts +2 -39
  121. package/dist/modules/Router.js +0 -39
  122. package/package.json +1 -1
  123. package/src/components/SidebarNavigation.ts +1 -1
  124. package/src/globals/SteamClient.ts +4 -320
  125. package/src/globals/steam-client/App.ts +1749 -0
  126. package/src/globals/steam-client/Auth.ts +105 -0
  127. package/src/globals/steam-client/Broadcast.ts +56 -0
  128. package/src/globals/steam-client/Browser.ts +91 -0
  129. package/src/globals/steam-client/ClientNotifications.ts +39 -0
  130. package/src/globals/steam-client/Cloud.ts +14 -0
  131. package/src/globals/steam-client/CommunityItems.ts +24 -0
  132. package/src/globals/steam-client/Console.ts +43 -0
  133. package/src/globals/steam-client/Customization.ts +12 -0
  134. package/src/globals/steam-client/Downloads.ts +175 -0
  135. package/src/globals/steam-client/FamilySharing.ts +30 -0
  136. package/src/globals/steam-client/FriendSettings.ts +80 -0
  137. package/src/globals/steam-client/Friends.ts +70 -0
  138. package/src/globals/steam-client/GameNotes.ts +73 -0
  139. package/src/globals/steam-client/GameRecording.ts +29 -0
  140. package/src/globals/steam-client/GameSessions.ts +59 -0
  141. package/src/globals/steam-client/Input.ts +762 -0
  142. package/src/globals/steam-client/InstallFolder.ts +167 -0
  143. package/src/globals/steam-client/Installs.ts +131 -0
  144. package/src/globals/steam-client/Messaging.ts +20 -0
  145. package/src/globals/steam-client/Music.ts +99 -0
  146. package/src/globals/steam-client/Notifications.ts +333 -0
  147. package/src/globals/steam-client/OpenVR.ts +122 -0
  148. package/src/globals/steam-client/Overlay.ts +172 -0
  149. package/src/globals/steam-client/Parental.ts +129 -0
  150. package/src/globals/steam-client/RemotePlay.ts +342 -0
  151. package/src/globals/steam-client/Screenshots.ts +149 -0
  152. package/src/globals/steam-client/ServerBrowser.ts +372 -0
  153. package/src/globals/steam-client/Settings.ts +663 -0
  154. package/src/globals/steam-client/SharedConnection.ts +43 -0
  155. package/src/globals/steam-client/Stats.ts +10 -0
  156. package/src/globals/steam-client/SteamChina.ts +3 -0
  157. package/src/globals/steam-client/Storage.ts +24 -0
  158. package/src/globals/steam-client/Streaming.ts +59 -0
  159. package/src/globals/steam-client/UI.ts +90 -0
  160. package/src/globals/steam-client/URL.ts +174 -0
  161. package/src/globals/steam-client/Updates.ts +101 -0
  162. package/src/globals/steam-client/User.ts +266 -0
  163. package/src/globals/steam-client/WebChat.ts +164 -0
  164. package/src/globals/steam-client/WebUITransport.ts +21 -0
  165. package/src/globals/steam-client/Window.ts +235 -0
  166. package/src/globals/steam-client/browser-view/BrowserViewPopup.ts +393 -0
  167. package/src/globals/steam-client/browser-view/index.ts +54 -0
  168. package/src/globals/steam-client/index.ts +90 -0
  169. package/src/globals/steam-client/shared.ts +262 -0
  170. package/src/globals/steam-client/system/Audio.ts +202 -0
  171. package/src/globals/steam-client/system/AudioDevice.ts +116 -0
  172. package/src/globals/steam-client/system/Bluetooth.ts +171 -0
  173. package/src/globals/steam-client/system/Devkit.ts +11 -0
  174. package/src/globals/steam-client/system/Display.ts +15 -0
  175. package/src/globals/steam-client/system/DisplayManager.ts +16 -0
  176. package/src/globals/steam-client/system/Dock.ts +34 -0
  177. package/src/globals/steam-client/system/Perf.ts +194 -0
  178. package/src/globals/steam-client/system/Report.ts +39 -0
  179. package/src/globals/steam-client/system/UI.ts +38 -0
  180. package/src/globals/steam-client/system/index.ts +390 -0
  181. package/src/globals/steam-client/system/network/Device.ts +17 -0
  182. package/src/globals/steam-client/system/network/index.ts +403 -0
  183. package/src/globals/stores.ts +30 -13
  184. package/src/modules/Router.ts +2 -40
@@ -0,0 +1,167 @@
1
+ import { Unregisterable } from "./shared";
2
+ import {EAppUpdateError} from "./App";
3
+
4
+ /**
5
+ * Represents functions related to Steam Install Folders.
6
+ */
7
+ export interface InstallFolder {
8
+ /**
9
+ * Adds a Steam Library folder to the Steam client.
10
+ * @param path The path of the Steam Library folder to be added.
11
+ * @returns the index of the added folder.
12
+ */
13
+ AddInstallFolder(path: string): Promise<number>;
14
+
15
+ /**
16
+ * Opens the file explorer to browse files in a specific Steam Library folder.
17
+ * @param folderIndex The index of the folder to be opened.
18
+ */
19
+ BrowseFilesInFolder(folderIndex: number): void;
20
+
21
+ /**
22
+ * Cancels the current move operation for moving game content.
23
+ */
24
+ CancelMove(): void;
25
+
26
+ /**
27
+ * Retrieves a list of installed Steam Library folders.
28
+ * @returns an array of SteamInstallFolder objects.
29
+ */
30
+ GetInstallFolders(): Promise<SteamInstallFolder[]>;
31
+
32
+ /**
33
+ * Retrieves a list of potential Steam Library folders that can be added.
34
+ * @returns an array of PotentialInstallFolder objects.
35
+ */
36
+ GetPotentialFolders(): Promise<PotentialInstallFolder[]>;
37
+
38
+ /**
39
+ * Moves the installation folder for a specific app to another Steam Library folder.
40
+ * @param appId The ID of the application to be moved.
41
+ * @param folderIndex The index of the target Steam Library folder.
42
+ */
43
+ MoveInstallFolderForApp(appId: number, folderIndex: number): void;
44
+
45
+ /**
46
+ * Refreshes the list of installed Steam Library folders.
47
+ */
48
+ RefreshFolders(): void;
49
+
50
+ /**
51
+ * Registers a callback function to be called when changes occur in Steam Install Folders.
52
+ * @param callback The callback function to be called.
53
+ * @returns an object that can be used to unregister the callback.
54
+ */
55
+ RegisterForInstallFolderChanges(callback: (change: FolderChange) => void): Unregisterable;
56
+
57
+ /**
58
+ * Registers a callback function to be called when moving game content progresses.
59
+ * @param callback The callback function to be called.
60
+ * @returns an object that can be used to unregister the callback.
61
+ */
62
+ RegisterForMoveContentProgress(callback: (progress: MoveContentProgress) => void): Unregisterable;
63
+
64
+ /**
65
+ * Registers a callback function to be called when repairing an install folder is finished.
66
+ * @param callback The callback function to be called.
67
+ * @returns an object that can be used to unregister the callback.
68
+ */
69
+ RegisterForRepairFolderFinished(callback: (change: FolderChange) => void): Unregisterable;
70
+
71
+ /**
72
+ * Removes a Steam Library folder from the Steam client.
73
+ * @param folderIndex The index of the folder to be removed.
74
+ */
75
+ RemoveInstallFolder(folderIndex: number): void;
76
+
77
+ /**
78
+ * Repairs an installed Steam Library folder.
79
+ * @param folderIndex The index of the folder to be repaired.
80
+ */
81
+ RepairInstallFolder(folderIndex: number): void;
82
+
83
+ /**
84
+ * Sets a specific Steam Library folder as the default install folder.
85
+ * @param folderIndex The index of the folder to be set as default.
86
+ */
87
+ SetDefaultInstallFolder(folderIndex: number): void;
88
+
89
+ /**
90
+ * Sets a user-defined label for a specific Steam Library folder.
91
+ * @param folderIndex The index of the folder to be labeled.
92
+ * @param label The label to be assigned to the folder.
93
+ */
94
+ SetFolderLabel(folderIndex: number, label: string): void;
95
+ }
96
+
97
+ /**
98
+ * Represents information about an installation folder.
99
+ */
100
+ export interface SteamInstallFolder extends PotentialInstallFolder {
101
+ /** Index of the folder. */
102
+ nFolderIndex: number;
103
+ /** Used space in the folder. */
104
+ strUsedSize: string;
105
+ /** Size of DLC storage used in the folder. */
106
+ strDLCSize: string;
107
+ /** Size of workshop storage used in the folder. */
108
+ strWorkshopSize: string;
109
+ /** Size of staged storage used in the folder. */
110
+ strStagedSize: string;
111
+ /** Indicates if the folder is set as the default installation folder. */
112
+ bIsDefaultFolder: boolean;
113
+ /** Indicates if the folder is currently mounted. */
114
+ bIsMounted: boolean;
115
+ /** List of applications installed in the folder. */
116
+ vecApps: AppInfo[];
117
+ }
118
+
119
+ export interface PotentialInstallFolder {
120
+ /** Path of the folder. */
121
+ strFolderPath: string;
122
+ /** User label for the folder. */
123
+ strUserLabel: string;
124
+ /** Name of the drive where the folder is located. */
125
+ strDriveName: string;
126
+ /** Total capacity of the folder. */
127
+ strCapacity: string;
128
+ /** Available free space in the folder. */
129
+ strFreeSpace: string;
130
+ /** Indicates if the folder is on a fixed drive. */
131
+ bIsFixed: boolean;
132
+ }
133
+
134
+ /**
135
+ * Represents information about an installed application.
136
+ */
137
+ export interface AppInfo {
138
+ /** ID of the application. */
139
+ nAppID: number;
140
+ /** Name of the application. */
141
+ strAppName: string;
142
+ /** Sorting information for the application. */
143
+ strSortAs: string;
144
+ /** Last played time in Unix Epoch time format. */
145
+ rtLastPlayed: number;
146
+ /** Size of used storage by the application. */
147
+ strUsedSize: string;
148
+ /** Size of DLC storage used by the application. */
149
+ strDLCSize: string;
150
+ /** Size of workshop storage used by the application. */
151
+ strWorkshopSize: string;
152
+ /** Size of staged storage used by the application. */
153
+ strStagedSize: string;
154
+ }
155
+
156
+ export interface FolderChange {
157
+ folderIndex: number;
158
+ }
159
+
160
+ export interface MoveContentProgress {
161
+ appid: number;
162
+ eError: EAppUpdateError;
163
+ flProgress: number;
164
+ strBytesMoved: string;
165
+ strTotalBytesToMove: string;
166
+ nFilesMoved: number;
167
+ }
@@ -0,0 +1,131 @@
1
+ import { Unregisterable } from "./shared";
2
+ import {EAppUpdateError} from "./App";
3
+
4
+ /**
5
+ * Represents functions related to managing installs and installation wizards in Steam.
6
+ */
7
+ export interface Installs {
8
+ /**
9
+ * Cancels the installation wizard if it is open.
10
+ */
11
+ CancelInstall(): void;
12
+
13
+ /**
14
+ * Continues and starts the installation if the wizard is still open.
15
+ */
16
+ ContinueInstall(): void;
17
+
18
+ /**
19
+ * Retrieves information from the last opened or currently opened installation wizard.
20
+ */
21
+ GetInstallManagerInfo(): Promise<InstallMgrInfo>;
22
+
23
+ /**
24
+ * Opens the restore from backup installer wizard for a specific app.
25
+ * @param appBackupPath The backup path of the app.
26
+ */
27
+ OpenInstallBackup(appBackupPath: string): void;
28
+
29
+ /**
30
+ * Opens the installation wizard for specified app IDs.
31
+ * @param appIds An array of app IDs to install.
32
+ */
33
+ OpenInstallWizard(appIds: number[]): void;
34
+
35
+ /**
36
+ * Opens the uninstall wizard for specified app IDs.
37
+ * @param appIds An array of app IDs to uninstall.
38
+ * @param dontPrompt Whether to *not* prompt the user to uninstall.
39
+ */
40
+ OpenUninstallWizard(appIds: number[], dontPrompt: boolean): void;
41
+
42
+ RegisterForShowConfirmUninstall: Unregisterable; // Broken? doesn't seem to work
43
+
44
+ /**
45
+ * Registers a callback function to be called when the "Failed Uninstall" dialog is shown.
46
+ * @param callback The callback function to be called when the dialog is shown.
47
+ * @returns an object that can be used to unregister the callback.
48
+ */
49
+ RegisterForShowFailedUninstall(callback: (appId: number, reason: EAppUpdateError) => void): Unregisterable;
50
+
51
+ /**
52
+ * Registers a callback function to be called when the installation wizard is shown.
53
+ * @param callback The callback function to be called.
54
+ * @returns an object that can be used to unregister the callback.
55
+ */
56
+ RegisterForShowInstallWizard(callback: (data: InstallMgrInfo) => void): Unregisterable;
57
+
58
+ RegisterForShowRegisterCDKey: any;
59
+
60
+ /**
61
+ * Sets a list of app identifiers for downloads in the installation wizard.
62
+ * @param appIds An array of app IDs to set.
63
+ * @remarks The wizard will not reflect this change immediately, but changing another option will.
64
+ */
65
+ SetAppList(appIds: number[]): void;
66
+
67
+ /**
68
+ * Sets the options for creating shortcuts in the installation wizard.
69
+ * @param bDesktopShortcut Whether to create a desktop shortcut.
70
+ * @param bSystemMenuShortcut Whether to create a system menu shortcut.
71
+ * @remarks The wizard will not reflect this change immediately, but changing another option will.
72
+ */
73
+ SetCreateShortcuts(bDesktopShortcut: boolean, bSystemMenuShortcut: boolean): void;
74
+
75
+ /**
76
+ * Sets the install folder for the installation wizard using an install folder index.
77
+ * @param folderIndex The index of the install folder.
78
+ * @remarks The wizard will not reflect this change immediately, but changing another option will.
79
+ */
80
+ SetInstallFolder(folderIndex: number): void;
81
+ }
82
+
83
+ export interface InstallMgrInfo {
84
+ rgAppIDs: InstallInfoApps[];
85
+ eInstallState: EInstallMgrState;
86
+ nDiskSpaceRequired: number;
87
+ nDiskSpaceAvailable: number;
88
+ nCurrentDisk: number;
89
+ nTotalDisks: number;
90
+ bCanChangeInstallFolder: boolean;
91
+ /**
92
+ * Index of the install folder. -1 if not installed.
93
+ */
94
+ iInstallFolder: number;
95
+ iUnmountedFolder: number;
96
+ currentAppID: number;
97
+ eAppError: EAppUpdateError;
98
+ errorDetail: string;
99
+ bSystemMenuShortcut: boolean;
100
+ bDesktopShortcut: boolean;
101
+ bIsBackupInstall: boolean;
102
+ // device/hostname
103
+ strPeerContentServer: string;
104
+ bPeerContentServerOnline: boolean;
105
+ bPeerContentServerAvailable: boolean;
106
+ }
107
+
108
+ export interface InstallInfoApps {
109
+ nAppID: number;
110
+ lDiskSpaceRequiredBytes: number;
111
+ }
112
+
113
+ export enum EInstallMgrState {
114
+ None,
115
+ Setup,
116
+ WaitLicense,
117
+ FreeLicense,
118
+ ShowCDKey,
119
+ WaitAppInfo,
120
+ ShowPassword,
121
+ ShowConfig,
122
+ ShowEULAs,
123
+ CreateApps,
124
+ ReadFromMedia,
125
+ ShowChangeMedia,
126
+ WaitLegacyCDKeys,
127
+ ShowSignup,
128
+ Complete,
129
+ Failed,
130
+ Canceled,
131
+ }
@@ -0,0 +1,20 @@
1
+ import { Unregisterable } from "./shared";
2
+
3
+ export interface Messaging {
4
+ // section - "ContentManagement", "JumpList", "PostToLibrary"
5
+ // seems multipurpose
6
+ RegisterForMessages<T extends string>(
7
+ message: T,
8
+ callback: (message: T, section: string, args: string) => void,
9
+ ): Unregisterable;
10
+
11
+ /*
12
+ function m(e) {
13
+ SteamClient.Messaging.PostMessage("LibraryCommands", "ShowFriendChatDialog", JSON.stringify({
14
+ steamid: e.persona.m_steamid.ConvertTo64BitString()
15
+ }))
16
+ }
17
+ SteamClient.Messaging.PostMessage("FriendsUI", "AcceptedRemotePlayInvite", JSON.stringify({id: this.appID})) : SteamClient.Messaging.PostMessage("FriendsUI", "AcceptedGameInvite", JSON.stringify({id: this.appID}))
18
+ */
19
+ PostMessage(message: string, section: string, args: string): void;
20
+ }
@@ -0,0 +1,99 @@
1
+ import { Unregisterable } from "./shared";
2
+
3
+ /**
4
+ * Represents functions related to controlling music playback in the Steam client.
5
+ */
6
+ export interface Music {
7
+ /**
8
+ * Decreases the music volume by 10%.
9
+ */
10
+ DecreaseVolume(): void;
11
+
12
+ /**
13
+ * Increases the music volume by 10%.
14
+ */
15
+ IncreaseVolume(): void;
16
+
17
+ /**
18
+ * Plays the next track in the music playlist.
19
+ */
20
+ PlayNext(): void;
21
+
22
+ /**
23
+ * Plays the previous track in the music playlist.
24
+ */
25
+ PlayPrevious(): void;
26
+
27
+ /**
28
+ * Registers a callback function to be called when music playback changes.
29
+ * @param callback The callback function to be called.
30
+ * @returns an object that can be used to unregister the callback.
31
+ */
32
+ RegisterForMusicPlaybackChanges(callback: (param0: boolean | MusicTrack) => void): Unregisterable;
33
+
34
+ /**
35
+ * Registers a callback function to be called when the music playback position changes.
36
+ * @param callback The callback function to be called.
37
+ * @returns an object that can be used to unregister the callback.
38
+ */
39
+ RegisterForMusicPlaybackPosition(callback: (position: number) => void): Unregisterable;
40
+
41
+ /**
42
+ * Sets the playback position of the music track.
43
+ * @param position The position to set in seconds.
44
+ */
45
+ SetPlaybackPosition(position: number): void;
46
+
47
+ /**
48
+ * Sets the repeat status for music playback.
49
+ * @param status The repeat status.
50
+ */
51
+ SetPlayingRepeatStatus(status: EMusicPlayingRepeatStatus): void;
52
+
53
+ /**
54
+ * Sets the shuffle status for music playback.
55
+ * @param value True to enable shuffle, false to disable shuffle.
56
+ */
57
+ SetPlayingShuffled(value: boolean): void;
58
+
59
+ /**
60
+ * Sets the volume for music playback.
61
+ * @param volume The volume level to set.
62
+ * @remarks Ranges from 0 to 100.
63
+ */
64
+ SetVolume(volume: number): void;
65
+
66
+ /**
67
+ * Toggles the mute state of the music volume.
68
+ */
69
+ ToggleMuteVolume(): void;
70
+
71
+ /**
72
+ * Toggles between play and pause for music playback.
73
+ */
74
+ TogglePlayPause(): void;
75
+ }
76
+
77
+ export interface MusicTrack {
78
+ uSoundtrackAppId: number;
79
+ ePlaybackStatus: EAudioPlayback;
80
+ eRepeatStatus: EMusicPlayingRepeatStatus;
81
+ bShuffle: boolean;
82
+ nVolume: number;
83
+ nActiveTrack: number;
84
+ nLengthInMsec: number;
85
+ }
86
+
87
+ export enum EAudioPlayback {
88
+ Undefined,
89
+ Playing,
90
+ Paused,
91
+ Idle,
92
+ }
93
+
94
+ export enum EMusicPlayingRepeatStatus {
95
+ None,
96
+ All,
97
+ Once,
98
+ Max,
99
+ }