@decky/ui 4.9.2 → 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.
- package/dist/globals/SteamClient.d.ts +1 -304
- package/dist/globals/steam-client/App.d.ts +880 -0
- package/dist/globals/steam-client/App.js +320 -0
- package/dist/globals/steam-client/Auth.d.ts +57 -0
- package/dist/globals/steam-client/Auth.js +19 -0
- package/dist/globals/steam-client/Broadcast.d.ts +22 -0
- package/dist/globals/steam-client/Broadcast.js +1 -0
- package/dist/globals/steam-client/Browser.d.ts +45 -0
- package/dist/globals/steam-client/Browser.js +17 -0
- package/dist/globals/steam-client/ClientNotifications.d.ts +20 -0
- package/dist/globals/steam-client/ClientNotifications.js +6 -0
- package/dist/globals/steam-client/Cloud.d.ts +4 -0
- package/dist/globals/steam-client/Cloud.js +1 -0
- package/dist/globals/steam-client/CommunityItems.d.ts +5 -0
- package/dist/globals/steam-client/CommunityItems.js +1 -0
- package/dist/globals/steam-client/Console.d.ts +11 -0
- package/dist/globals/steam-client/Console.js +1 -0
- package/dist/globals/steam-client/Customization.d.ts +8 -0
- package/dist/globals/steam-client/Customization.js +1 -0
- package/dist/globals/steam-client/Downloads.d.ts +63 -0
- package/dist/globals/steam-client/Downloads.js +1 -0
- package/dist/globals/steam-client/FamilySharing.d.ts +20 -0
- package/dist/globals/steam-client/FamilySharing.js +1 -0
- package/dist/globals/steam-client/FriendSettings.d.ts +49 -0
- package/dist/globals/steam-client/FriendSettings.js +6 -0
- package/dist/globals/steam-client/Friends.d.ts +27 -0
- package/dist/globals/steam-client/Friends.js +1 -0
- package/dist/globals/steam-client/GameNotes.d.ts +41 -0
- package/dist/globals/steam-client/GameNotes.js +1 -0
- package/dist/globals/steam-client/GameRecording.d.ts +20 -0
- package/dist/globals/steam-client/GameRecording.js +1 -0
- package/dist/globals/steam-client/GameSessions.d.ts +26 -0
- package/dist/globals/steam-client/GameSessions.js +1 -0
- package/dist/globals/steam-client/Input.d.ts +421 -0
- package/dist/globals/steam-client/Input.js +170 -0
- package/dist/globals/steam-client/InstallFolder.d.ts +57 -0
- package/dist/globals/steam-client/InstallFolder.js +1 -0
- package/dist/globals/steam-client/Installs.d.ts +60 -0
- package/dist/globals/steam-client/Installs.js +20 -0
- package/dist/globals/steam-client/Messaging.d.ts +5 -0
- package/dist/globals/steam-client/Messaging.js +1 -0
- package/dist/globals/steam-client/Music.d.ts +36 -0
- package/dist/globals/steam-client/Music.js +14 -0
- package/dist/globals/steam-client/Notifications.d.ts +260 -0
- package/dist/globals/steam-client/Notifications.js +73 -0
- package/dist/globals/steam-client/OpenVR.d.ts +85 -0
- package/dist/globals/steam-client/OpenVR.js +16 -0
- package/dist/globals/steam-client/Overlay.d.ts +58 -0
- package/dist/globals/steam-client/Overlay.js +18 -0
- package/dist/globals/steam-client/Parental.d.ts +69 -0
- package/dist/globals/steam-client/Parental.js +19 -0
- package/dist/globals/steam-client/RemotePlay.d.ts +225 -0
- package/dist/globals/steam-client/RemotePlay.js +71 -0
- package/dist/globals/steam-client/Screenshots.d.ts +47 -0
- package/dist/globals/steam-client/Screenshots.js +8 -0
- package/dist/globals/steam-client/ServerBrowser.d.ts +117 -0
- package/dist/globals/steam-client/ServerBrowser.js +26 -0
- package/dist/globals/steam-client/Settings.d.ts +398 -0
- package/dist/globals/steam-client/Settings.js +96 -0
- package/dist/globals/steam-client/SharedConnection.d.ts +22 -0
- package/dist/globals/steam-client/SharedConnection.js +1 -0
- package/dist/globals/steam-client/Stats.d.ts +4 -0
- package/dist/globals/steam-client/Stats.js +1 -0
- package/dist/globals/steam-client/SteamChina.d.ts +3 -0
- package/dist/globals/steam-client/SteamChina.js +1 -0
- package/dist/globals/steam-client/Storage.d.ts +8 -0
- package/dist/globals/steam-client/Storage.js +1 -0
- package/dist/globals/steam-client/Streaming.d.ts +15 -0
- package/dist/globals/steam-client/Streaming.js +1 -0
- package/dist/globals/steam-client/UI.d.ts +44 -0
- package/dist/globals/steam-client/UI.js +12 -0
- package/dist/globals/steam-client/URL.d.ts +16 -0
- package/dist/globals/steam-client/URL.js +1 -0
- package/dist/globals/steam-client/Updates.d.ts +68 -0
- package/dist/globals/steam-client/Updates.js +34 -0
- package/dist/globals/steam-client/User.d.ts +130 -0
- package/dist/globals/steam-client/User.js +33 -0
- package/dist/globals/steam-client/WebChat.d.ts +60 -0
- package/dist/globals/steam-client/WebChat.js +6 -0
- package/dist/globals/steam-client/WebUITransport.d.ts +11 -0
- package/dist/globals/steam-client/WebUITransport.js +1 -0
- package/dist/globals/steam-client/Window.d.ts +66 -0
- package/dist/globals/steam-client/Window.js +6 -0
- package/dist/globals/steam-client/browser-view/BrowserViewPopup.d.ts +124 -0
- package/dist/globals/steam-client/browser-view/BrowserViewPopup.js +35 -0
- package/dist/globals/steam-client/browser-view/index.d.ts +20 -0
- package/dist/globals/steam-client/browser-view/index.js +1 -0
- package/dist/globals/steam-client/index.d.ts +89 -0
- package/dist/globals/steam-client/index.js +1 -0
- package/dist/globals/steam-client/shared.d.ts +166 -0
- package/dist/globals/steam-client/shared.js +146 -0
- package/dist/globals/steam-client/system/Audio.d.ts +42 -0
- package/dist/globals/steam-client/system/Audio.js +1 -0
- package/dist/globals/steam-client/system/AudioDevice.d.ts +92 -0
- package/dist/globals/steam-client/system/AudioDevice.js +33 -0
- package/dist/globals/steam-client/system/Bluetooth.d.ts +47 -0
- package/dist/globals/steam-client/system/Bluetooth.js +15 -0
- package/dist/globals/steam-client/system/Devkit.d.ts +7 -0
- package/dist/globals/steam-client/system/Devkit.js +1 -0
- package/dist/globals/steam-client/system/Display.d.ts +10 -0
- package/dist/globals/steam-client/system/Display.js +1 -0
- package/dist/globals/steam-client/system/DisplayManager.d.ts +9 -0
- package/dist/globals/steam-client/system/DisplayManager.js +1 -0
- package/dist/globals/steam-client/system/Dock.d.ts +19 -0
- package/dist/globals/steam-client/system/Dock.js +1 -0
- package/dist/globals/steam-client/system/Perf.d.ts +159 -0
- package/dist/globals/steam-client/system/Perf.js +53 -0
- package/dist/globals/steam-client/system/Report.d.ts +13 -0
- package/dist/globals/steam-client/system/Report.js +1 -0
- package/dist/globals/steam-client/system/UI.d.ts +28 -0
- package/dist/globals/steam-client/system/UI.js +1 -0
- package/dist/globals/steam-client/system/index.d.ts +243 -0
- package/dist/globals/steam-client/system/index.js +111 -0
- package/dist/globals/steam-client/system/network/Device.d.ts +10 -0
- package/dist/globals/steam-client/system/network/Device.js +1 -0
- package/dist/globals/steam-client/system/network/index.d.ts +312 -0
- package/dist/globals/steam-client/system/network/index.js +55 -0
- package/dist/globals/stores.d.ts +26 -13
- package/dist/modules/Router.d.ts +2 -39
- package/dist/modules/Router.js +0 -39
- package/package.json +1 -1
- package/src/globals/SteamClient.ts +4 -320
- package/src/globals/steam-client/App.ts +1749 -0
- package/src/globals/steam-client/Auth.ts +105 -0
- package/src/globals/steam-client/Broadcast.ts +56 -0
- package/src/globals/steam-client/Browser.ts +91 -0
- package/src/globals/steam-client/ClientNotifications.ts +39 -0
- package/src/globals/steam-client/Cloud.ts +14 -0
- package/src/globals/steam-client/CommunityItems.ts +24 -0
- package/src/globals/steam-client/Console.ts +43 -0
- package/src/globals/steam-client/Customization.ts +12 -0
- package/src/globals/steam-client/Downloads.ts +175 -0
- package/src/globals/steam-client/FamilySharing.ts +30 -0
- package/src/globals/steam-client/FriendSettings.ts +80 -0
- package/src/globals/steam-client/Friends.ts +70 -0
- package/src/globals/steam-client/GameNotes.ts +73 -0
- package/src/globals/steam-client/GameRecording.ts +29 -0
- package/src/globals/steam-client/GameSessions.ts +59 -0
- package/src/globals/steam-client/Input.ts +762 -0
- package/src/globals/steam-client/InstallFolder.ts +167 -0
- package/src/globals/steam-client/Installs.ts +131 -0
- package/src/globals/steam-client/Messaging.ts +20 -0
- package/src/globals/steam-client/Music.ts +99 -0
- package/src/globals/steam-client/Notifications.ts +333 -0
- package/src/globals/steam-client/OpenVR.ts +122 -0
- package/src/globals/steam-client/Overlay.ts +172 -0
- package/src/globals/steam-client/Parental.ts +129 -0
- package/src/globals/steam-client/RemotePlay.ts +342 -0
- package/src/globals/steam-client/Screenshots.ts +149 -0
- package/src/globals/steam-client/ServerBrowser.ts +372 -0
- package/src/globals/steam-client/Settings.ts +663 -0
- package/src/globals/steam-client/SharedConnection.ts +43 -0
- package/src/globals/steam-client/Stats.ts +10 -0
- package/src/globals/steam-client/SteamChina.ts +3 -0
- package/src/globals/steam-client/Storage.ts +24 -0
- package/src/globals/steam-client/Streaming.ts +59 -0
- package/src/globals/steam-client/UI.ts +90 -0
- package/src/globals/steam-client/URL.ts +174 -0
- package/src/globals/steam-client/Updates.ts +101 -0
- package/src/globals/steam-client/User.ts +266 -0
- package/src/globals/steam-client/WebChat.ts +164 -0
- package/src/globals/steam-client/WebUITransport.ts +21 -0
- package/src/globals/steam-client/Window.ts +235 -0
- package/src/globals/steam-client/browser-view/BrowserViewPopup.ts +393 -0
- package/src/globals/steam-client/browser-view/index.ts +54 -0
- package/src/globals/steam-client/index.ts +90 -0
- package/src/globals/steam-client/shared.ts +262 -0
- package/src/globals/steam-client/system/Audio.ts +202 -0
- package/src/globals/steam-client/system/AudioDevice.ts +116 -0
- package/src/globals/steam-client/system/Bluetooth.ts +171 -0
- package/src/globals/steam-client/system/Devkit.ts +11 -0
- package/src/globals/steam-client/system/Display.ts +15 -0
- package/src/globals/steam-client/system/DisplayManager.ts +16 -0
- package/src/globals/steam-client/system/Dock.ts +34 -0
- package/src/globals/steam-client/system/Perf.ts +194 -0
- package/src/globals/steam-client/system/Report.ts +39 -0
- package/src/globals/steam-client/system/UI.ts +38 -0
- package/src/globals/steam-client/system/index.ts +390 -0
- package/src/globals/steam-client/system/network/Device.ts +17 -0
- package/src/globals/steam-client/system/network/index.ts +403 -0
- package/src/globals/stores.ts +30 -13
- package/src/modules/Router.ts +2 -40
|
@@ -0,0 +1,266 @@
|
|
|
1
|
+
import { EResult, OperationResponse, Unregisterable } from "./shared";
|
|
2
|
+
|
|
3
|
+
export interface User {
|
|
4
|
+
AuthorizeMicrotxn(txnId: number | string): void;
|
|
5
|
+
|
|
6
|
+
CancelLogin(): void;
|
|
7
|
+
|
|
8
|
+
CancelMicrotxn(txnId: number | string): void;
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* Tries to cancel Steam shutdown.
|
|
12
|
+
* @remarks Used in the "Shutting down" dialog.
|
|
13
|
+
*/
|
|
14
|
+
CancelShutdown(): void;
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* Opens the "Change Account" dialog.
|
|
18
|
+
*/
|
|
19
|
+
ChangeUser(): void;
|
|
20
|
+
|
|
21
|
+
Connect(): Promise<OperationResponse>;
|
|
22
|
+
|
|
23
|
+
FlipToLogin(): void;
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* Forces a shutdown while shutting down.
|
|
27
|
+
* @remarks Used in the "Shutting down" dialog.
|
|
28
|
+
*/
|
|
29
|
+
ForceShutdown(): void;
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* Forgets an account's password.
|
|
33
|
+
* @param accountName Login of the account to forget.
|
|
34
|
+
* @returns a boolean indicating whether the operation succeeded or not.
|
|
35
|
+
*/
|
|
36
|
+
ForgetPassword(accountName: string): Promise<boolean>;
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* Gets your country code.
|
|
40
|
+
* @returns a string containing your country code.
|
|
41
|
+
*/
|
|
42
|
+
GetIPCountry(): Promise<string>;
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* @todo param0 mirrors param3 of {@link RegisterForLoginStateChange}
|
|
46
|
+
*/
|
|
47
|
+
GetLoginProgress(callback: (param0: number, param1: number) => void): Unregisterable;
|
|
48
|
+
|
|
49
|
+
GetLoginUsers(): Promise<LoginUser[]>;
|
|
50
|
+
|
|
51
|
+
GoOffline(): void;
|
|
52
|
+
|
|
53
|
+
GoOnline(): void;
|
|
54
|
+
|
|
55
|
+
OptOutOfSurvey(): void;
|
|
56
|
+
|
|
57
|
+
PrepareForSystemSuspend(): Promise<{
|
|
58
|
+
result: EResult;
|
|
59
|
+
}>;
|
|
60
|
+
|
|
61
|
+
Reconnect(): void;
|
|
62
|
+
|
|
63
|
+
RegisterForConnectionAttemptsThrottled(callback: (data: ConnectionAttempt) => void): Unregisterable;
|
|
64
|
+
|
|
65
|
+
RegisterForCurrentUserChanges(callback: (user: CurrentUser) => void): void;
|
|
66
|
+
|
|
67
|
+
RegisterForLoginStateChange(
|
|
68
|
+
callback: (
|
|
69
|
+
/**
|
|
70
|
+
* Empty if not logged in.
|
|
71
|
+
*/
|
|
72
|
+
accountName: string,
|
|
73
|
+
state: ELoginState,
|
|
74
|
+
result: EResult,
|
|
75
|
+
param3: number,
|
|
76
|
+
percentage: number,
|
|
77
|
+
/**
|
|
78
|
+
* @todo name is from CLoginStore, but it's always empty, unused ?
|
|
79
|
+
*/
|
|
80
|
+
emailDomain: string,
|
|
81
|
+
) => void
|
|
82
|
+
): Unregisterable;
|
|
83
|
+
|
|
84
|
+
RegisterForPrepareForSystemSuspendProgress(callback: (progress: SuspendProgress) => void): Unregisterable;
|
|
85
|
+
|
|
86
|
+
RegisterForResumeSuspendedGamesProgress(callback: (progress: SuspendProgress) => void): Unregisterable;
|
|
87
|
+
|
|
88
|
+
RegisterForShowHardwareSurvey(callback: () => void): Unregisterable;
|
|
89
|
+
|
|
90
|
+
/**
|
|
91
|
+
* Register a function to be executed when shutdown completes.
|
|
92
|
+
* @param callback The function to be executed on completion.
|
|
93
|
+
*/
|
|
94
|
+
RegisterForShutdownDone(callback: (state: EShutdownStep, appid: number, param2: boolean) => void): Unregisterable;
|
|
95
|
+
|
|
96
|
+
RegisterForShutdownFailed(callback: (state: EShutdownStep, appid: number, success: boolean) => void): Unregisterable;
|
|
97
|
+
|
|
98
|
+
/**
|
|
99
|
+
* Register a function to be executed when Steam starts shutting down.
|
|
100
|
+
* @param callback The function to be executed on shutdown start.
|
|
101
|
+
*/
|
|
102
|
+
RegisterForShutdownStart(callback: (param0: boolean) => void): Unregisterable;
|
|
103
|
+
|
|
104
|
+
/**
|
|
105
|
+
* Register a function to be executed when shutdown state changes.
|
|
106
|
+
* @param callback The function to be executed on change.
|
|
107
|
+
*/
|
|
108
|
+
RegisterForShutdownState(callback: (state: EShutdownStep, appid: number, allowForceQuit: boolean) => void): Unregisterable;
|
|
109
|
+
|
|
110
|
+
/**
|
|
111
|
+
* Removes an account from remembered users.
|
|
112
|
+
* @param accountName The account to remove.
|
|
113
|
+
*/
|
|
114
|
+
RemoveUser(accountName: string): void;
|
|
115
|
+
|
|
116
|
+
RequestSupportSystemReport(reportId: string): Promise<{
|
|
117
|
+
bSuccess: boolean;
|
|
118
|
+
}>;
|
|
119
|
+
|
|
120
|
+
ResumeSuspendedGames(param0: boolean): Promise<ResumeSuspendedGamesResult>;
|
|
121
|
+
|
|
122
|
+
// Hardware survey information
|
|
123
|
+
RunSurvey(callback: (surveySections: SurveySection[]) => void): void;
|
|
124
|
+
|
|
125
|
+
SendSurvey(): void;
|
|
126
|
+
|
|
127
|
+
SetAsyncNotificationEnabled(appId: number, enable: boolean): void;
|
|
128
|
+
|
|
129
|
+
/**
|
|
130
|
+
* Sets given login credentials, but don't log in to that account.
|
|
131
|
+
* @param accountName Account name.
|
|
132
|
+
* @param password Account password.
|
|
133
|
+
* @param rememberMe Whether to remember that account.
|
|
134
|
+
*/
|
|
135
|
+
SetLoginCredentials(accountName: string, password: string, rememberMe: boolean): void;
|
|
136
|
+
|
|
137
|
+
SetOOBEComplete(): void;
|
|
138
|
+
|
|
139
|
+
ShouldShowUserChooser(): Promise<boolean>;
|
|
140
|
+
|
|
141
|
+
/**
|
|
142
|
+
* Signs out and restarts Steam.
|
|
143
|
+
*/
|
|
144
|
+
SignOutAndRestart(): void;
|
|
145
|
+
|
|
146
|
+
/**
|
|
147
|
+
* Relogin after disabling offline mode. Not sure what else it's useful for,
|
|
148
|
+
* there isn't even a single mention of it in steam's js, lol
|
|
149
|
+
*/
|
|
150
|
+
StartLogin(): void;
|
|
151
|
+
|
|
152
|
+
/**
|
|
153
|
+
* Toggles offline mode.
|
|
154
|
+
*
|
|
155
|
+
* Note that after disabling offline mode, you have to relogin with
|
|
156
|
+
* {@link StartLogin}.
|
|
157
|
+
*/
|
|
158
|
+
StartOffline(value: boolean): void;
|
|
159
|
+
|
|
160
|
+
/**
|
|
161
|
+
* Restarts the Steam client.
|
|
162
|
+
*
|
|
163
|
+
* @todo I don't remember what the arg is, but IIRC with `true` it disables
|
|
164
|
+
* some ldd check or whatever, really it's only noticeable on slow PCs.
|
|
165
|
+
*/
|
|
166
|
+
StartRestart(force: boolean): void;
|
|
167
|
+
|
|
168
|
+
/**
|
|
169
|
+
* @todo I don't remember what the arg is, but IIRC with `true` it disables
|
|
170
|
+
* some ldd check or whatever, really it's only noticeable on slow PCs.
|
|
171
|
+
*/
|
|
172
|
+
StartShutdown(force: boolean): void;
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
export interface ConnectionAttempt {
|
|
176
|
+
rtCooldownExpiration: number;
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
export interface CurrentUser {
|
|
180
|
+
NotificationCounts: {
|
|
181
|
+
async_game_updates: number;
|
|
182
|
+
comments: number;
|
|
183
|
+
gifts: number;
|
|
184
|
+
help_request_replies: number;
|
|
185
|
+
inventory_items: number;
|
|
186
|
+
invites: number;
|
|
187
|
+
moderator_messages: number;
|
|
188
|
+
offline_messages: number;
|
|
189
|
+
trade_offers: number;
|
|
190
|
+
};
|
|
191
|
+
bHWSurveyPending: boolean;
|
|
192
|
+
bIsLimited: boolean;
|
|
193
|
+
bIsOfflineMode: boolean;
|
|
194
|
+
bPromptToChangePassword: boolean;
|
|
195
|
+
bSupportAckOnlyMessages: boolean;
|
|
196
|
+
bSupportAlertActive: boolean;
|
|
197
|
+
bSupportPopupMessage: boolean;
|
|
198
|
+
clientinstanceid: string;
|
|
199
|
+
strAccountBalance: string;
|
|
200
|
+
strAccountBalancePending: string;
|
|
201
|
+
strAccountName: string;
|
|
202
|
+
strFamilyGroupID: string;
|
|
203
|
+
strSteamID: string;
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
export enum ELoginState {
|
|
207
|
+
None,
|
|
208
|
+
WelcomeDialog,
|
|
209
|
+
WaitingForCreateUser,
|
|
210
|
+
WaitingForCredentials,
|
|
211
|
+
WaitingForNetwork,
|
|
212
|
+
WaitingForServerResponse,
|
|
213
|
+
WaitingForLibraryReady,
|
|
214
|
+
Success,
|
|
215
|
+
Quit,
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
export enum EShutdownStep {
|
|
219
|
+
None,
|
|
220
|
+
Start,
|
|
221
|
+
WaitForGames,
|
|
222
|
+
WaitForCloud,
|
|
223
|
+
FinishingDownload,
|
|
224
|
+
WaitForDownload,
|
|
225
|
+
WaitForServiceApps,
|
|
226
|
+
WaitForLogOff,
|
|
227
|
+
Done,
|
|
228
|
+
// TODO: RegisterForShutdownDone outputs 9 here
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
export enum ESuspendResumeProgressState {
|
|
232
|
+
Invalid,
|
|
233
|
+
Complete,
|
|
234
|
+
CloudSync,
|
|
235
|
+
LoggingIn,
|
|
236
|
+
WaitingForApp,
|
|
237
|
+
Working,
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
export interface LoginUser {
|
|
241
|
+
personaName: string;
|
|
242
|
+
accountName: string;
|
|
243
|
+
hasPin: boolean;
|
|
244
|
+
rememberPassword: boolean;
|
|
245
|
+
avatarUrl: string;
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
export interface ResumeSuspendedGamesResult {
|
|
249
|
+
nAppIDPlayingElsewhere: number;
|
|
250
|
+
result: EResult;
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
export interface SuspendProgress {
|
|
254
|
+
bGameSuspended: boolean;
|
|
255
|
+
state: ESuspendResumeProgressState;
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
export interface SurveyEntry {
|
|
259
|
+
strName: string;
|
|
260
|
+
vecArgs: string[];
|
|
261
|
+
}
|
|
262
|
+
|
|
263
|
+
export interface SurveySection {
|
|
264
|
+
strSectionName: string;
|
|
265
|
+
vecEntries: SurveyEntry[];
|
|
266
|
+
}
|
|
@@ -0,0 +1,164 @@
|
|
|
1
|
+
import {OverlayBrowserInfo} from "./Overlay";
|
|
2
|
+
import { EResult, EUIMode, Unregisterable } from "./shared";
|
|
3
|
+
|
|
4
|
+
export interface WebChat {
|
|
5
|
+
BSuppressPopupsInRestore(): Promise<boolean>;
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Gets your Steam3 ID.
|
|
9
|
+
* @returns a Steam3 ID.
|
|
10
|
+
*/
|
|
11
|
+
GetCurrentUserAccountID(): Promise<number>;
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* Gets the current user's 64x64 avatar as a data URL.
|
|
15
|
+
* @returns the data URL.
|
|
16
|
+
*/
|
|
17
|
+
GetLocalAvatarBase64(): Promise<string>;
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* Gets the current user's nickname.
|
|
21
|
+
* @returns the nickname.
|
|
22
|
+
*/
|
|
23
|
+
GetLocalPersonaName(): Promise<string>;
|
|
24
|
+
|
|
25
|
+
GetOverlayChatBrowserInfo(): Promise<OverlayBrowserInfo[]>;
|
|
26
|
+
|
|
27
|
+
// param0 - appid ?
|
|
28
|
+
GetPrivateConnectString(param0: number): Promise<string>;
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* Gets information about push-to-Talk.
|
|
32
|
+
* @returns
|
|
33
|
+
*/
|
|
34
|
+
GetPushToTalkEnabled(): Promise<PushToTalkInfo>;
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* Gets the "Sign in to friends when Steam starts" option value.
|
|
38
|
+
* @returns a boolean indicating whether the option is enabled or not.
|
|
39
|
+
*/
|
|
40
|
+
GetSignIntoFriendsOnStart(): Promise<boolean>;
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* Retrieves the current UI mode.
|
|
44
|
+
* @returns the current UI mode.
|
|
45
|
+
*/
|
|
46
|
+
GetUIMode(): Promise<EUIMode>;
|
|
47
|
+
|
|
48
|
+
OnGroupChatUserStateChange(chatGroupId: number, accountId: number, action: number): void;
|
|
49
|
+
|
|
50
|
+
OnNewGroupChatMsgAdded(
|
|
51
|
+
groupId: string,
|
|
52
|
+
chatId: string,
|
|
53
|
+
accountId: number,
|
|
54
|
+
timestamp: number,
|
|
55
|
+
param4: number,
|
|
56
|
+
message: string,
|
|
57
|
+
): void;
|
|
58
|
+
|
|
59
|
+
/**
|
|
60
|
+
* Opens a provided URL in the Steam client. Does NOT work on desktop mode -
|
|
61
|
+
* will open in default web browser instead!
|
|
62
|
+
* @param url The URL to open.
|
|
63
|
+
*/
|
|
64
|
+
OpenURLInClient(url: string, pid: number, forceExternal: boolean): void;
|
|
65
|
+
|
|
66
|
+
/**
|
|
67
|
+
* Registers a callback function to be called when the computer's active state changes.
|
|
68
|
+
* @param callback The callback function to be called.
|
|
69
|
+
* @returns an object that can be used to unregister the callback.
|
|
70
|
+
* @todo Changes to 2 after 10 seconds?
|
|
71
|
+
* @todo Does not affect the keyboard?
|
|
72
|
+
*/
|
|
73
|
+
RegisterForComputerActiveStateChange(
|
|
74
|
+
callback: (state: EComputerActiveState, time: number) => void,
|
|
75
|
+
): Unregisterable;
|
|
76
|
+
|
|
77
|
+
/**
|
|
78
|
+
* @todo WebChat.ShowFriendChatDialog does this.
|
|
79
|
+
*/
|
|
80
|
+
RegisterForFriendPostMessage(callback: (data: FriendChatDialogData) => void): Unregisterable;
|
|
81
|
+
|
|
82
|
+
/**
|
|
83
|
+
* To unregister, use {@link UnregisterForMouseXButtonDown}.
|
|
84
|
+
*/
|
|
85
|
+
RegisterForMouseXButtonDown(callback: (param0: number) => void): void;
|
|
86
|
+
|
|
87
|
+
/**
|
|
88
|
+
* Registers a callback function to be called when the push-to-talk state changes.
|
|
89
|
+
* @param callback The callback function to be called.
|
|
90
|
+
* @returns an object that can be used to unregister the callback.
|
|
91
|
+
*/
|
|
92
|
+
RegisterForPushToTalkStateChange(callback: (state: boolean) => void): Unregisterable;
|
|
93
|
+
|
|
94
|
+
/**
|
|
95
|
+
* Registers a callback function to be called when the UI mode is changed.
|
|
96
|
+
* @param callback The callback function to be called.
|
|
97
|
+
* @returns an object that can be used to unregister the callback.
|
|
98
|
+
*/
|
|
99
|
+
RegisterForUIModeChange(callback: (mode: EUIMode) => void): Unregisterable;
|
|
100
|
+
|
|
101
|
+
RegisterOverlayChatBrowserInfoChanged(callback: () => void): Unregisterable;
|
|
102
|
+
|
|
103
|
+
SetActiveClanChatIDs(clanChatIds: number[]): void;
|
|
104
|
+
|
|
105
|
+
SetNumChatsWithUnreadPriorityMessages(size: number): void;
|
|
106
|
+
|
|
107
|
+
SetPersonaName(value: string): Promise<SetPersonaNameResult>;
|
|
108
|
+
|
|
109
|
+
SetPushToMuteEnabled(value: boolean): void;
|
|
110
|
+
|
|
111
|
+
SetPushToTalkEnabled(value: boolean): void;
|
|
112
|
+
|
|
113
|
+
SetPushToTalkHotKey(param0: number): void;
|
|
114
|
+
|
|
115
|
+
SetPushToTalkMouseButton(param0: number): void;
|
|
116
|
+
|
|
117
|
+
SetVoiceChatActive(value: boolean): void;
|
|
118
|
+
SetVoiceChatStatus(muted: boolean, deafened: boolean): void;
|
|
119
|
+
ShowChatRoomGroupDialog(param0: number, param1: number): void;
|
|
120
|
+
|
|
121
|
+
ShowFriendChatDialog(steamid64: string): void;
|
|
122
|
+
|
|
123
|
+
UnregisterForMouseXButtonDown(): void;
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
export enum EComputerActiveState {
|
|
127
|
+
Invalid,
|
|
128
|
+
Active,
|
|
129
|
+
Idle,
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
export interface FriendChatDialog {
|
|
133
|
+
browserid: number;
|
|
134
|
+
btakefocus: string;
|
|
135
|
+
command: string;
|
|
136
|
+
pid: number;
|
|
137
|
+
steamid: string;
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
export interface FriendChatDialogData {
|
|
141
|
+
data: FriendChatDialog;
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
interface SetPersonaNameResult {
|
|
145
|
+
eResult: EResult;
|
|
146
|
+
/**
|
|
147
|
+
* Localization token. Empty if success.
|
|
148
|
+
*/
|
|
149
|
+
strMessageToken: string;
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
export interface PushToTalkInfo {
|
|
153
|
+
/** Indicates whether push-to-talk is enabled. */
|
|
154
|
+
bEnabled: boolean;
|
|
155
|
+
/** Indicates whether push-to-mute is in use instead. */
|
|
156
|
+
bPushToMute: boolean;
|
|
157
|
+
/**
|
|
158
|
+
* Push-to-talk hotkey.
|
|
159
|
+
* @todo enum? this is not EHIDKeyboardKey
|
|
160
|
+
*/
|
|
161
|
+
vkHotKey: number;
|
|
162
|
+
/** Push-to-talk hotkey name. */
|
|
163
|
+
strKeyName: string;
|
|
164
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { OperationResponse } from "./shared";
|
|
2
|
+
|
|
3
|
+
export interface WebUITransport {
|
|
4
|
+
GetTransportInfo(): Promise<TransportInfo>;
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Tells Steam the websocket failed and opens a troubleshooting dialog.
|
|
8
|
+
*
|
|
9
|
+
* The responsible message for this is `CMsgWebUITransportFailure`.
|
|
10
|
+
*
|
|
11
|
+
* @param base64 Serialized ProtoBuf message.
|
|
12
|
+
*/
|
|
13
|
+
NotifyTransportFailure(base64: string): Promise<OperationResponse>;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export interface TransportInfo {
|
|
17
|
+
authKeyClientdll: string;
|
|
18
|
+
authKeySteamUI: string;
|
|
19
|
+
portClientdll: number;
|
|
20
|
+
portSteamUI: number;
|
|
21
|
+
}
|
|
@@ -0,0 +1,235 @@
|
|
|
1
|
+
import { EUIComposition } from "./shared";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Represents functionality for managing Steam's windows.
|
|
5
|
+
*
|
|
6
|
+
* "Restore details" here refers to a string that is similiar to
|
|
7
|
+
* `1&x=604&y=257&w=1010&h=600`, which is usable with certain
|
|
8
|
+
* `window.open()` parameters and methods from here.
|
|
9
|
+
*
|
|
10
|
+
* Note that methods here have to be called from the
|
|
11
|
+
* window you want to use (not SharedJSContext).
|
|
12
|
+
*/
|
|
13
|
+
export interface Window {
|
|
14
|
+
BringToFront(forceOS?: EWindowBringToFront): void;
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* Closes the window.
|
|
18
|
+
*/
|
|
19
|
+
Close(): void;
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* @returns the window's fullscreen state.
|
|
23
|
+
*/
|
|
24
|
+
DefaultMonitorHasFullscreenWindow(): Promise<boolean>;
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* Flashes the window in the taskbar.
|
|
28
|
+
*/
|
|
29
|
+
FlashWindow(): void;
|
|
30
|
+
|
|
31
|
+
GetDefaultMonitorDimensions(): Promise<MonitorDimensions>;
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* @returns the mouse position's restore details.
|
|
35
|
+
*/
|
|
36
|
+
GetMousePositionDetails(): Promise<string>;
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* @returns the window's details.
|
|
40
|
+
*/
|
|
41
|
+
GetWindowDetails(): Promise<WindowDetails>;
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* @returns the window's dimensions.
|
|
45
|
+
*/
|
|
46
|
+
GetWindowDimensions(): Promise<WindowDimensions>;
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* @returns the window's restore details.
|
|
50
|
+
*/
|
|
51
|
+
GetWindowRestoreDetails(): Promise<string>;
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
* Hides the window.
|
|
55
|
+
*/
|
|
56
|
+
HideWindow(): void;
|
|
57
|
+
|
|
58
|
+
/**
|
|
59
|
+
* @returns the window's maximized state.
|
|
60
|
+
*/
|
|
61
|
+
IsWindowMaximized(): Promise<boolean>;
|
|
62
|
+
|
|
63
|
+
/**
|
|
64
|
+
* @returns the window's minimized state.
|
|
65
|
+
*/
|
|
66
|
+
IsWindowMinimized(): Promise<boolean>;
|
|
67
|
+
|
|
68
|
+
MarkLastFocused(): void;
|
|
69
|
+
|
|
70
|
+
/**
|
|
71
|
+
* Minimizes the window.
|
|
72
|
+
*/
|
|
73
|
+
Minimize(): void;
|
|
74
|
+
|
|
75
|
+
/**
|
|
76
|
+
* Moves the window to given coordinates.
|
|
77
|
+
* @param x Window X position.
|
|
78
|
+
* @param y Window Y position.
|
|
79
|
+
* @param dpi Screen DPI.
|
|
80
|
+
*/
|
|
81
|
+
MoveTo(x: number, y: number, dpi?: number): void;
|
|
82
|
+
|
|
83
|
+
/**
|
|
84
|
+
* Moves the window to a given location.
|
|
85
|
+
* @param location Window location.
|
|
86
|
+
* @param offset X/Y offset.
|
|
87
|
+
*/
|
|
88
|
+
MoveToLocation(location: WindowLocation_t, offset?: number): void;
|
|
89
|
+
|
|
90
|
+
/**
|
|
91
|
+
* Moves the window relatively to given details.
|
|
92
|
+
* @param details Window restore details string from {@link GetWindowRestoreDetails}.
|
|
93
|
+
* @param x Window X position.
|
|
94
|
+
* @param y Window Y position.
|
|
95
|
+
* @param width Window width.
|
|
96
|
+
* @param height Window height.
|
|
97
|
+
*
|
|
98
|
+
* @example
|
|
99
|
+
* Move the window to bottom right by 50 pixels:
|
|
100
|
+
* ```
|
|
101
|
+
* SteamClient.Window.GetWindowRestoreDetails((e) => {
|
|
102
|
+
* SteamClient.Window.PositionWindowRelative(e, 50, 50, 0, 0);
|
|
103
|
+
* });
|
|
104
|
+
* ```
|
|
105
|
+
*/
|
|
106
|
+
PositionWindowRelative(details: string, x: number, y: number, width: number, height: number): void;
|
|
107
|
+
|
|
108
|
+
/**
|
|
109
|
+
* @returns `true` if yje naun [tpcess od about to shut down.]
|
|
110
|
+
*/
|
|
111
|
+
ProcessShuttingDown(): Promise<boolean>;
|
|
112
|
+
|
|
113
|
+
/**
|
|
114
|
+
* Resizes the window to given dimension.
|
|
115
|
+
* The window has to be created with the resizable flag.
|
|
116
|
+
* @param width Window width.
|
|
117
|
+
* @param height Window height.
|
|
118
|
+
* @param applyBrowserScaleOrDPIValue
|
|
119
|
+
*/
|
|
120
|
+
ResizeTo(width: number, height: number, applyBrowserScaleOrDPIValue: boolean | number): void;
|
|
121
|
+
|
|
122
|
+
/**
|
|
123
|
+
* Moves the window to given details.
|
|
124
|
+
* @param details Window details string from `Window.GetWindowRestoreDetails`.
|
|
125
|
+
*/
|
|
126
|
+
RestoreWindowSizeAndPosition(details: string): void;
|
|
127
|
+
|
|
128
|
+
SetAutoDisplayScale(value: boolean): void;
|
|
129
|
+
|
|
130
|
+
SetComposition(mode: EUIComposition, appIdCompositionQueue: number[], windowId: number): void;
|
|
131
|
+
|
|
132
|
+
/**
|
|
133
|
+
* Makes the window hide, but not close on pressing the close button.
|
|
134
|
+
* @param value Hide on close?
|
|
135
|
+
*/
|
|
136
|
+
SetHideOnClose(value: boolean): void;
|
|
137
|
+
|
|
138
|
+
SetKeyFocus(value: boolean): void;
|
|
139
|
+
|
|
140
|
+
SetManualDisplayScaleFactor(displayScaleFactor: number): void;
|
|
141
|
+
|
|
142
|
+
/**
|
|
143
|
+
* Sets the window's max size.
|
|
144
|
+
* @param width Window's max width.
|
|
145
|
+
* @param height Window's max height.
|
|
146
|
+
*/
|
|
147
|
+
SetMaxSize(width: number, height: number): void;
|
|
148
|
+
|
|
149
|
+
/**
|
|
150
|
+
* Sets the window's min size.
|
|
151
|
+
* @param width Window's max width.
|
|
152
|
+
* @param height Window's max height.
|
|
153
|
+
*/
|
|
154
|
+
SetMinSize(width: number, height: number): void;
|
|
155
|
+
|
|
156
|
+
SetModal(value: boolean): void;
|
|
157
|
+
|
|
158
|
+
/**
|
|
159
|
+
* Sets the window's resize grip size.
|
|
160
|
+
* The window has to be created with the resizable flag for this to take any effect.
|
|
161
|
+
* @param width Resize grip width.
|
|
162
|
+
* @param height Resize grip height.
|
|
163
|
+
*/
|
|
164
|
+
SetResizeGrip(width: number, height: number): void;
|
|
165
|
+
|
|
166
|
+
/**
|
|
167
|
+
* Set the window's icon.
|
|
168
|
+
* @param icon The window icon to be used.
|
|
169
|
+
*/
|
|
170
|
+
SetWindowIcon(icon: WindowIcon_t): void;
|
|
171
|
+
|
|
172
|
+
/**
|
|
173
|
+
* Shows the window.
|
|
174
|
+
*/
|
|
175
|
+
ShowWindow(): void;
|
|
176
|
+
|
|
177
|
+
/**
|
|
178
|
+
* Stops the window's taskbar flashing.
|
|
179
|
+
*/
|
|
180
|
+
StopFlashWindow(): void;
|
|
181
|
+
|
|
182
|
+
/**
|
|
183
|
+
* Toggles the window's fullscreen state.
|
|
184
|
+
*/
|
|
185
|
+
ToggleFullscreen(): void;
|
|
186
|
+
|
|
187
|
+
/**
|
|
188
|
+
* Toggles the window's maximized state.
|
|
189
|
+
*/
|
|
190
|
+
ToggleMaximize(): void;
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
export enum EWindowBringToFront {
|
|
194
|
+
Invalid,
|
|
195
|
+
AndForceOS,
|
|
196
|
+
WithoutForcingOS,
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
export type WindowLocation_t =
|
|
200
|
+
| 'upper-left'
|
|
201
|
+
| 'lower-left'
|
|
202
|
+
| 'center-top'
|
|
203
|
+
| 'center-bottom'
|
|
204
|
+
| 'upper-right'
|
|
205
|
+
| 'lower-right';
|
|
206
|
+
|
|
207
|
+
export type WindowIcon_t = 'steam' | 'messages' | 'voice';
|
|
208
|
+
|
|
209
|
+
/**
|
|
210
|
+
* "Usable" here refers to space that is not taken by the taskbar.
|
|
211
|
+
*/
|
|
212
|
+
export interface MonitorDimensions {
|
|
213
|
+
flHorizontalScale: number;
|
|
214
|
+
flVerticalScale: number;
|
|
215
|
+
nFullHeight: number;
|
|
216
|
+
nFullLeft: number;
|
|
217
|
+
nFullTop: number;
|
|
218
|
+
nFullWidth: number;
|
|
219
|
+
nUsableHeight: number;
|
|
220
|
+
nUsableLeft: number;
|
|
221
|
+
nUsableTop: number;
|
|
222
|
+
nUsableWidth: number;
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
export interface WindowDetails {
|
|
226
|
+
bGPUEnabled: boolean;
|
|
227
|
+
bUnderlaySupported: boolean;
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
export interface WindowDimensions {
|
|
231
|
+
x: number;
|
|
232
|
+
y: number;
|
|
233
|
+
width: number;
|
|
234
|
+
height: number;
|
|
235
|
+
}
|