@wailsio/runtime 3.0.0-alpha.64 → 3.0.0-alpha.66
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/{src → dist}/application.js +2 -16
- package/dist/browser.js +20 -0
- package/dist/callable.js +144 -0
- package/dist/calls.js +194 -0
- package/dist/cancellable.js +792 -0
- package/dist/clipboard.js +30 -0
- package/dist/contextmenu.js +80 -0
- package/{src → dist}/create.js +2 -33
- package/dist/dialogs.js +134 -0
- package/dist/drag.js +222 -0
- package/dist/event_types.js +229 -0
- package/dist/events.js +101 -0
- package/dist/flags.js +23 -0
- package/dist/index.js +38 -0
- package/dist/listener.js +44 -0
- package/{src → dist}/nanoid.js +7 -11
- package/dist/runtime.js +63 -0
- package/dist/screens.js +38 -0
- package/dist/system.js +116 -0
- package/{src → dist}/utils.js +29 -20
- package/dist/window.js +438 -0
- package/{src → dist}/wml.js +51 -122
- package/package.json +43 -19
- package/types/application.d.ts +3 -10
- package/types/browser.d.ts +4 -4
- package/types/callable.d.ts +3 -0
- package/types/calls.d.ts +43 -49
- package/types/cancellable.d.ts +434 -0
- package/types/clipboard.d.ts +6 -5
- package/types/contextmenu.d.ts +1 -0
- package/types/create.d.ts +6 -27
- package/types/dialogs.d.ts +99 -143
- package/types/drag.d.ts +1 -0
- package/types/event_types.d.ts +218 -219
- package/types/events.d.ts +45 -250
- package/types/flags.d.ts +3 -3
- package/types/index.d.ts +16 -14
- package/types/listener.d.ts +9 -0
- package/types/nanoid.d.ts +1 -1
- package/types/runtime.d.ts +18 -26
- package/types/screens.d.ts +42 -76
- package/types/system.d.ts +50 -79
- package/types/utils.d.ts +15 -8
- package/types/window.d.ts +110 -225
- package/types/wml.d.ts +2 -6
- package/docs/.nojekyll +0 -1
- package/docs/assets/highlight.css +0 -22
- package/docs/assets/icons.js +0 -15
- package/docs/assets/icons.svg +0 -1
- package/docs/assets/main.js +0 -59
- package/docs/assets/navigation.js +0 -1
- package/docs/assets/search.js +0 -1
- package/docs/assets/style.css +0 -1415
- package/docs/classes/Call.RuntimeError.html +0 -11
- package/docs/classes/Events.WailsEvent.html +0 -4
- package/docs/functions/Application.Hide.html +0 -2
- package/docs/functions/Application.Quit.html +0 -2
- package/docs/functions/Application.Show.html +0 -2
- package/docs/functions/Browser.OpenURL.html +0 -3
- package/docs/functions/Call.ByID.html +0 -8
- package/docs/functions/Call.ByName.html +0 -6
- package/docs/functions/Call.Call.html +0 -11
- package/docs/functions/Clipboard.SetText.html +0 -6
- package/docs/functions/Clipboard.Text.html +0 -3
- package/docs/functions/Create.Any.html +0 -2
- package/docs/functions/Create.Array.html +0 -4
- package/docs/functions/Create.ByteSlice.html +0 -3
- package/docs/functions/Create.Map.html +0 -4
- package/docs/functions/Create.Nullable.html +0 -3
- package/docs/functions/Create.Struct.html +0 -3
- package/docs/functions/Dialogs.Error.html +0 -5
- package/docs/functions/Dialogs.Info.html +0 -5
- package/docs/functions/Dialogs.OpenFile.html +0 -3
- package/docs/functions/Dialogs.Question.html +0 -5
- package/docs/functions/Dialogs.SaveFile.html +0 -3
- package/docs/functions/Dialogs.Warning.html +0 -5
- package/docs/functions/Events.Emit.html +0 -6
- package/docs/functions/Events.Off.html +0 -4
- package/docs/functions/Events.OffAll.html +0 -3
- package/docs/functions/Events.On.html +0 -7
- package/docs/functions/Events.OnMultiple.html +0 -8
- package/docs/functions/Events.Once.html +0 -7
- package/docs/functions/Events.setup.html +0 -1
- package/docs/functions/Flags.GetFlag.html +0 -6
- package/docs/functions/Screens.GetAll.html +0 -3
- package/docs/functions/Screens.GetCurrent.html +0 -3
- package/docs/functions/Screens.GetPrimary.html +0 -3
- package/docs/functions/System.Capabilities.html +0 -4
- package/docs/functions/System.Environment.html +0 -5
- package/docs/functions/System.IsAMD64.html +0 -3
- package/docs/functions/System.IsARM.html +0 -3
- package/docs/functions/System.IsARM64.html +0 -5
- package/docs/functions/System.IsDarkMode.html +0 -5
- package/docs/functions/System.IsDebug.html +0 -1
- package/docs/functions/System.IsLinux.html +0 -3
- package/docs/functions/System.IsMac.html +0 -3
- package/docs/functions/System.IsWindows.html +0 -3
- package/docs/functions/System.invoke.html +0 -1
- package/docs/functions/WML.Enable.html +0 -2
- package/docs/functions/WML.Reload.html +0 -2
- package/docs/functions/init.html +0 -1
- package/docs/index.html +0 -5
- package/docs/interfaces/Call.CallOptions.html +0 -7
- package/docs/interfaces/Dialogs.Button.html +0 -7
- package/docs/interfaces/Dialogs.FileFilter.html +0 -5
- package/docs/interfaces/Dialogs.MessageDialogOptions.html +0 -9
- package/docs/interfaces/Dialogs.OpenFileDialogOptions.html +0 -33
- package/docs/interfaces/Dialogs.SaveFileDialogOptions.html +0 -35
- package/docs/interfaces/Screens.Rect.html +0 -9
- package/docs/interfaces/Screens.Screen.html +0 -25
- package/docs/interfaces/Screens.Size.html +0 -5
- package/docs/interfaces/System.EnvironmentInfo.html +0 -11
- package/docs/interfaces/System.OSInfo.html +0 -9
- package/docs/modules/Application.html +0 -4
- package/docs/modules/Browser.html +0 -2
- package/docs/modules/Call.html +0 -6
- package/docs/modules/Clipboard.html +0 -3
- package/docs/modules/Create.html +0 -7
- package/docs/modules/Dialogs.html +0 -12
- package/docs/modules/Events.html +0 -10
- package/docs/modules/Flags.html +0 -2
- package/docs/modules/Screens.html +0 -7
- package/docs/modules/System.html +0 -14
- package/docs/modules/WML.html +0 -3
- package/docs/modules.html +0 -14
- package/docs/variables/Events.Types.html +0 -1
- package/docs/variables/Window.html +0 -2
- package/src/browser.js +0 -24
- package/src/calls.js +0 -221
- package/src/clipboard.js +0 -35
- package/src/contextmenu.js +0 -97
- package/src/dialogs.js +0 -200
- package/src/drag.js +0 -119
- package/src/event_types.js +0 -219
- package/src/events.js +0 -140
- package/src/flags.js +0 -25
- package/src/index.js +0 -60
- package/src/runtime.js +0 -92
- package/src/screens.js +0 -71
- package/src/system.js +0 -143
- package/src/window.js +0 -638
- package/tsconfig.json +0 -20
package/types/events.d.ts
CHANGED
|
@@ -1,271 +1,66 @@
|
|
|
1
|
-
export
|
|
1
|
+
export { Types } from "./event_types.js";
|
|
2
|
+
/**
|
|
3
|
+
* The type of handlers for a given event.
|
|
4
|
+
*/
|
|
5
|
+
export type Callback = (ev: WailsEvent) => void;
|
|
6
|
+
/**
|
|
7
|
+
* Represents a system event or a custom event emitted through wails-provided facilities.
|
|
8
|
+
*/
|
|
9
|
+
export declare class WailsEvent {
|
|
10
|
+
/**
|
|
11
|
+
* The name of the event.
|
|
12
|
+
*/
|
|
13
|
+
name: string;
|
|
14
|
+
/**
|
|
15
|
+
* Optional data associated with the emitted event.
|
|
16
|
+
*/
|
|
17
|
+
data: any;
|
|
18
|
+
/**
|
|
19
|
+
* Name of the originating window. Omitted for application events.
|
|
20
|
+
* Will be overridden if set manually.
|
|
21
|
+
*/
|
|
22
|
+
sender?: string;
|
|
23
|
+
constructor(name: string, data?: any);
|
|
24
|
+
}
|
|
2
25
|
/**
|
|
3
26
|
* Register a callback function to be called multiple times for a specific event.
|
|
4
27
|
*
|
|
5
|
-
* @param
|
|
6
|
-
* @param
|
|
7
|
-
* @param
|
|
8
|
-
*
|
|
9
|
-
@return {function} - A function that, when called, will unregister the callback from the event.
|
|
28
|
+
* @param eventName - The name of the event to register the callback for.
|
|
29
|
+
* @param callback - The callback function to be called when the event is triggered.
|
|
30
|
+
* @param maxCallbacks - The maximum number of times the callback can be called for the event. Once the maximum number is reached, the callback will no longer be called.
|
|
31
|
+
* @returns A function that, when called, will unregister the callback from the event.
|
|
10
32
|
*/
|
|
11
|
-
export function OnMultiple(eventName: string, callback:
|
|
33
|
+
export declare function OnMultiple(eventName: string, callback: Callback, maxCallbacks: number): () => void;
|
|
12
34
|
/**
|
|
13
35
|
* Registers a callback function to be executed when the specified event occurs.
|
|
14
36
|
*
|
|
15
|
-
* @param
|
|
16
|
-
* @param
|
|
17
|
-
* @
|
|
18
|
-
|
|
37
|
+
* @param eventName - The name of the event to register the callback for.
|
|
38
|
+
* @param callback - The callback function to be called when the event is triggered.
|
|
39
|
+
* @returns A function that, when called, will unregister the callback from the event.
|
|
40
|
+
*/
|
|
41
|
+
export declare function On(eventName: string, callback: Callback): () => void;
|
|
19
42
|
/**
|
|
20
43
|
* Registers a callback function to be executed only once for the specified event.
|
|
21
44
|
*
|
|
22
|
-
* @param
|
|
23
|
-
* @param
|
|
24
|
-
* @
|
|
45
|
+
* @param eventName - The name of the event to register the callback for.
|
|
46
|
+
* @param callback - The callback function to be called when the event is triggered.
|
|
47
|
+
* @returns A function that, when called, will unregister the callback from the event.
|
|
25
48
|
*/
|
|
26
|
-
export function Once(eventName: string, callback:
|
|
49
|
+
export declare function Once(eventName: string, callback: Callback): () => void;
|
|
27
50
|
/**
|
|
28
51
|
* Removes event listeners for the specified event names.
|
|
29
52
|
*
|
|
30
|
-
* @param
|
|
31
|
-
* @param {...string} additionalEventNames - Additional event names to remove listeners for.
|
|
32
|
-
* @return {undefined}
|
|
53
|
+
* @param eventNames - The name of the events to remove listeners for.
|
|
33
54
|
*/
|
|
34
|
-
export function Off(
|
|
55
|
+
export declare function Off(...eventNames: [string, ...string[]]): void;
|
|
35
56
|
/**
|
|
36
57
|
* Removes all event listeners.
|
|
37
|
-
*
|
|
38
|
-
* @function OffAll
|
|
39
|
-
* @returns {void}
|
|
40
58
|
*/
|
|
41
|
-
export function OffAll(): void;
|
|
59
|
+
export declare function OffAll(): void;
|
|
42
60
|
/**
|
|
43
|
-
* Emits
|
|
61
|
+
* Emits the given event.
|
|
44
62
|
*
|
|
45
|
-
* @param
|
|
46
|
-
* @returns
|
|
63
|
+
* @param event - The name of the event to emit.
|
|
64
|
+
* @returns A promise that will be fulfilled once the event has been emitted.
|
|
47
65
|
*/
|
|
48
|
-
export function Emit(event: WailsEvent):
|
|
49
|
-
export const Types: {
|
|
50
|
-
Windows: {
|
|
51
|
-
APMPowerSettingChange: string;
|
|
52
|
-
APMPowerStatusChange: string;
|
|
53
|
-
APMResumeAutomatic: string;
|
|
54
|
-
APMResumeSuspend: string;
|
|
55
|
-
APMSuspend: string;
|
|
56
|
-
ApplicationStarted: string;
|
|
57
|
-
SystemThemeChanged: string;
|
|
58
|
-
WebViewNavigationCompleted: string;
|
|
59
|
-
WindowActive: string;
|
|
60
|
-
WindowBackgroundErase: string;
|
|
61
|
-
WindowClickActive: string;
|
|
62
|
-
WindowClosing: string;
|
|
63
|
-
WindowDidMove: string;
|
|
64
|
-
WindowDidResize: string;
|
|
65
|
-
WindowDPIChanged: string;
|
|
66
|
-
WindowDragDrop: string;
|
|
67
|
-
WindowDragEnter: string;
|
|
68
|
-
WindowDragLeave: string;
|
|
69
|
-
WindowDragOver: string;
|
|
70
|
-
WindowEndMove: string;
|
|
71
|
-
WindowEndResize: string;
|
|
72
|
-
WindowFullscreen: string;
|
|
73
|
-
WindowHide: string;
|
|
74
|
-
WindowInactive: string;
|
|
75
|
-
WindowKeyDown: string;
|
|
76
|
-
WindowKeyUp: string;
|
|
77
|
-
WindowKillFocus: string;
|
|
78
|
-
WindowNonClientHit: string;
|
|
79
|
-
WindowNonClientMouseDown: string;
|
|
80
|
-
WindowNonClientMouseLeave: string;
|
|
81
|
-
WindowNonClientMouseMove: string;
|
|
82
|
-
WindowNonClientMouseUp: string;
|
|
83
|
-
WindowPaint: string;
|
|
84
|
-
WindowRestore: string;
|
|
85
|
-
WindowSetFocus: string;
|
|
86
|
-
WindowShow: string;
|
|
87
|
-
WindowStartMove: string;
|
|
88
|
-
WindowStartResize: string;
|
|
89
|
-
WindowUnFullscreen: string;
|
|
90
|
-
WindowZOrderChanged: string;
|
|
91
|
-
WindowMinimise: string;
|
|
92
|
-
WindowUnMinimise: string;
|
|
93
|
-
WindowMaximise: string;
|
|
94
|
-
WindowUnMaximise: string;
|
|
95
|
-
};
|
|
96
|
-
Mac: {
|
|
97
|
-
ApplicationDidBecomeActive: string;
|
|
98
|
-
ApplicationDidChangeBackingProperties: string;
|
|
99
|
-
ApplicationDidChangeEffectiveAppearance: string;
|
|
100
|
-
ApplicationDidChangeIcon: string;
|
|
101
|
-
ApplicationDidChangeOcclusionState: string;
|
|
102
|
-
ApplicationDidChangeScreenParameters: string;
|
|
103
|
-
ApplicationDidChangeStatusBarFrame: string;
|
|
104
|
-
ApplicationDidChangeStatusBarOrientation: string;
|
|
105
|
-
ApplicationDidChangeTheme: string;
|
|
106
|
-
ApplicationDidFinishLaunching: string;
|
|
107
|
-
ApplicationDidHide: string;
|
|
108
|
-
ApplicationDidResignActive: string;
|
|
109
|
-
ApplicationDidUnhide: string;
|
|
110
|
-
ApplicationDidUpdate: string;
|
|
111
|
-
ApplicationShouldHandleReopen: string;
|
|
112
|
-
ApplicationWillBecomeActive: string;
|
|
113
|
-
ApplicationWillFinishLaunching: string;
|
|
114
|
-
ApplicationWillHide: string;
|
|
115
|
-
ApplicationWillResignActive: string;
|
|
116
|
-
ApplicationWillTerminate: string;
|
|
117
|
-
ApplicationWillUnhide: string;
|
|
118
|
-
ApplicationWillUpdate: string;
|
|
119
|
-
MenuDidAddItem: string;
|
|
120
|
-
MenuDidBeginTracking: string;
|
|
121
|
-
MenuDidClose: string;
|
|
122
|
-
MenuDidDisplayItem: string;
|
|
123
|
-
MenuDidEndTracking: string;
|
|
124
|
-
MenuDidHighlightItem: string;
|
|
125
|
-
MenuDidOpen: string;
|
|
126
|
-
MenuDidPopUp: string;
|
|
127
|
-
MenuDidRemoveItem: string;
|
|
128
|
-
MenuDidSendAction: string;
|
|
129
|
-
MenuDidSendActionToItem: string;
|
|
130
|
-
MenuDidUpdate: string;
|
|
131
|
-
MenuWillAddItem: string;
|
|
132
|
-
MenuWillBeginTracking: string;
|
|
133
|
-
MenuWillDisplayItem: string;
|
|
134
|
-
MenuWillEndTracking: string;
|
|
135
|
-
MenuWillHighlightItem: string;
|
|
136
|
-
MenuWillOpen: string;
|
|
137
|
-
MenuWillPopUp: string;
|
|
138
|
-
MenuWillRemoveItem: string;
|
|
139
|
-
MenuWillSendAction: string;
|
|
140
|
-
MenuWillSendActionToItem: string;
|
|
141
|
-
MenuWillUpdate: string;
|
|
142
|
-
WebViewDidCommitNavigation: string;
|
|
143
|
-
WebViewDidFinishNavigation: string;
|
|
144
|
-
WebViewDidReceiveServerRedirectForProvisionalNavigation: string;
|
|
145
|
-
WebViewDidStartProvisionalNavigation: string;
|
|
146
|
-
WindowDidBecomeKey: string;
|
|
147
|
-
WindowDidBecomeMain: string;
|
|
148
|
-
WindowDidBeginSheet: string;
|
|
149
|
-
WindowDidChangeAlpha: string;
|
|
150
|
-
WindowDidChangeBackingLocation: string;
|
|
151
|
-
WindowDidChangeBackingProperties: string;
|
|
152
|
-
WindowDidChangeCollectionBehavior: string;
|
|
153
|
-
WindowDidChangeEffectiveAppearance: string;
|
|
154
|
-
WindowDidChangeOcclusionState: string;
|
|
155
|
-
WindowDidChangeOrderingMode: string;
|
|
156
|
-
WindowDidChangeScreen: string;
|
|
157
|
-
WindowDidChangeScreenParameters: string;
|
|
158
|
-
WindowDidChangeScreenProfile: string;
|
|
159
|
-
WindowDidChangeScreenSpace: string;
|
|
160
|
-
WindowDidChangeScreenSpaceProperties: string;
|
|
161
|
-
WindowDidChangeSharingType: string;
|
|
162
|
-
WindowDidChangeSpace: string;
|
|
163
|
-
WindowDidChangeSpaceOrderingMode: string;
|
|
164
|
-
WindowDidChangeTitle: string;
|
|
165
|
-
WindowDidChangeToolbar: string;
|
|
166
|
-
WindowDidDeminiaturize: string;
|
|
167
|
-
WindowDidEndSheet: string;
|
|
168
|
-
WindowDidEnterFullScreen: string;
|
|
169
|
-
WindowDidEnterVersionBrowser: string;
|
|
170
|
-
WindowDidExitFullScreen: string;
|
|
171
|
-
WindowDidExitVersionBrowser: string;
|
|
172
|
-
WindowDidExpose: string;
|
|
173
|
-
WindowDidFocus: string;
|
|
174
|
-
WindowDidMiniaturize: string;
|
|
175
|
-
WindowDidMove: string;
|
|
176
|
-
WindowDidOrderOffScreen: string;
|
|
177
|
-
WindowDidOrderOnScreen: string;
|
|
178
|
-
WindowDidResignKey: string;
|
|
179
|
-
WindowDidResignMain: string;
|
|
180
|
-
WindowDidResize: string;
|
|
181
|
-
WindowDidUpdate: string;
|
|
182
|
-
WindowDidUpdateAlpha: string;
|
|
183
|
-
WindowDidUpdateCollectionBehavior: string;
|
|
184
|
-
WindowDidUpdateCollectionProperties: string;
|
|
185
|
-
WindowDidUpdateShadow: string;
|
|
186
|
-
WindowDidUpdateTitle: string;
|
|
187
|
-
WindowDidUpdateToolbar: string;
|
|
188
|
-
WindowDidZoom: string;
|
|
189
|
-
WindowFileDraggingEntered: string;
|
|
190
|
-
WindowFileDraggingExited: string;
|
|
191
|
-
WindowFileDraggingPerformed: string;
|
|
192
|
-
WindowHide: string;
|
|
193
|
-
WindowMaximise: string;
|
|
194
|
-
WindowUnMaximise: string;
|
|
195
|
-
WindowMinimise: string;
|
|
196
|
-
WindowUnMinimise: string;
|
|
197
|
-
WindowShouldClose: string;
|
|
198
|
-
WindowShow: string;
|
|
199
|
-
WindowWillBecomeKey: string;
|
|
200
|
-
WindowWillBecomeMain: string;
|
|
201
|
-
WindowWillBeginSheet: string;
|
|
202
|
-
WindowWillChangeOrderingMode: string;
|
|
203
|
-
WindowWillClose: string;
|
|
204
|
-
WindowWillDeminiaturize: string;
|
|
205
|
-
WindowWillEnterFullScreen: string;
|
|
206
|
-
WindowWillEnterVersionBrowser: string;
|
|
207
|
-
WindowWillExitFullScreen: string;
|
|
208
|
-
WindowWillExitVersionBrowser: string;
|
|
209
|
-
WindowWillFocus: string;
|
|
210
|
-
WindowWillMiniaturize: string;
|
|
211
|
-
WindowWillMove: string;
|
|
212
|
-
WindowWillOrderOffScreen: string;
|
|
213
|
-
WindowWillOrderOnScreen: string;
|
|
214
|
-
WindowWillResignMain: string;
|
|
215
|
-
WindowWillResize: string;
|
|
216
|
-
WindowWillUnfocus: string;
|
|
217
|
-
WindowWillUpdate: string;
|
|
218
|
-
WindowWillUpdateAlpha: string;
|
|
219
|
-
WindowWillUpdateCollectionBehavior: string;
|
|
220
|
-
WindowWillUpdateCollectionProperties: string;
|
|
221
|
-
WindowWillUpdateShadow: string;
|
|
222
|
-
WindowWillUpdateTitle: string;
|
|
223
|
-
WindowWillUpdateToolbar: string;
|
|
224
|
-
WindowWillUpdateVisibility: string;
|
|
225
|
-
WindowWillUseStandardFrame: string;
|
|
226
|
-
WindowZoomIn: string;
|
|
227
|
-
WindowZoomOut: string;
|
|
228
|
-
WindowZoomReset: string;
|
|
229
|
-
};
|
|
230
|
-
Linux: {
|
|
231
|
-
ApplicationStartup: string;
|
|
232
|
-
SystemThemeChanged: string;
|
|
233
|
-
WindowDeleteEvent: string;
|
|
234
|
-
WindowDidMove: string;
|
|
235
|
-
WindowDidResize: string;
|
|
236
|
-
WindowFocusIn: string;
|
|
237
|
-
WindowFocusOut: string;
|
|
238
|
-
WindowLoadChanged: string;
|
|
239
|
-
};
|
|
240
|
-
Common: {
|
|
241
|
-
ApplicationOpenedWithFile: string;
|
|
242
|
-
ApplicationStarted: string;
|
|
243
|
-
ThemeChanged: string;
|
|
244
|
-
WindowClosing: string;
|
|
245
|
-
WindowDidMove: string;
|
|
246
|
-
WindowDidResize: string;
|
|
247
|
-
WindowDPIChanged: string;
|
|
248
|
-
WindowFilesDropped: string;
|
|
249
|
-
WindowFocus: string;
|
|
250
|
-
WindowFullscreen: string;
|
|
251
|
-
WindowHide: string;
|
|
252
|
-
WindowLostFocus: string;
|
|
253
|
-
WindowMaximise: string;
|
|
254
|
-
WindowMinimise: string;
|
|
255
|
-
WindowRestore: string;
|
|
256
|
-
WindowRuntimeReady: string;
|
|
257
|
-
WindowShow: string;
|
|
258
|
-
WindowUnFullscreen: string;
|
|
259
|
-
WindowUnMaximise: string;
|
|
260
|
-
WindowUnMinimise: string;
|
|
261
|
-
WindowZoom: string;
|
|
262
|
-
WindowZoomIn: string;
|
|
263
|
-
WindowZoomOut: string;
|
|
264
|
-
WindowZoomReset: string;
|
|
265
|
-
};
|
|
266
|
-
};
|
|
267
|
-
export class WailsEvent {
|
|
268
|
-
constructor(name: any, data?: any);
|
|
269
|
-
name: any;
|
|
270
|
-
data: any;
|
|
271
|
-
}
|
|
66
|
+
export declare function Emit(event: WailsEvent): Promise<void>;
|
package/types/flags.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Retrieves the value associated with the specified key from the flag map.
|
|
3
3
|
*
|
|
4
|
-
* @param
|
|
5
|
-
* @return
|
|
4
|
+
* @param key - The key to retrieve the value for.
|
|
5
|
+
* @return The value associated with the specified key.
|
|
6
6
|
*/
|
|
7
|
-
export function GetFlag(
|
|
7
|
+
export declare function GetFlag(key: string): any;
|
package/types/index.d.ts
CHANGED
|
@@ -1,14 +1,16 @@
|
|
|
1
|
-
|
|
2
|
-
import
|
|
3
|
-
import * as
|
|
4
|
-
import * as
|
|
5
|
-
import * as
|
|
6
|
-
import * as
|
|
7
|
-
import * as
|
|
8
|
-
import * as
|
|
9
|
-
import * as
|
|
10
|
-
import * as
|
|
11
|
-
import * as
|
|
12
|
-
import
|
|
13
|
-
import
|
|
14
|
-
|
|
1
|
+
import "./contextmenu.js";
|
|
2
|
+
import "./drag.js";
|
|
3
|
+
import * as Application from "./application.js";
|
|
4
|
+
import * as Browser from "./browser.js";
|
|
5
|
+
import * as Call from "./calls.js";
|
|
6
|
+
import * as Clipboard from "./clipboard.js";
|
|
7
|
+
import * as Create from "./create.js";
|
|
8
|
+
import * as Dialogs from "./dialogs.js";
|
|
9
|
+
import * as Events from "./events.js";
|
|
10
|
+
import * as Flags from "./flags.js";
|
|
11
|
+
import * as Screens from "./screens.js";
|
|
12
|
+
import * as System from "./system.js";
|
|
13
|
+
import Window from "./window.js";
|
|
14
|
+
import * as WML from "./wml.js";
|
|
15
|
+
export { Application, Browser, Call, Clipboard, Dialogs, Events, Flags, Screens, System, Window, WML };
|
|
16
|
+
export * from "./cancellable.js";
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export declare const eventListeners: Map<string, Listener[]>;
|
|
2
|
+
export declare class Listener {
|
|
3
|
+
eventName: string;
|
|
4
|
+
callback: (data: any) => void;
|
|
5
|
+
maxCallbacks: number;
|
|
6
|
+
constructor(eventName: string, callback: (data: any) => void, maxCallbacks: number);
|
|
7
|
+
dispatch(data: any): boolean;
|
|
8
|
+
}
|
|
9
|
+
export declare function listenerOff(listener: Listener): void;
|
package/types/nanoid.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export function nanoid(size?: number): string;
|
|
1
|
+
export declare function nanoid(size?: number): string;
|
package/types/runtime.d.ts
CHANGED
|
@@ -1,30 +1,22 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
1
|
+
export declare const objectNames: Readonly<{
|
|
2
|
+
Call: 0;
|
|
3
|
+
Clipboard: 1;
|
|
4
|
+
Application: 2;
|
|
5
|
+
Events: 3;
|
|
6
|
+
ContextMenu: 4;
|
|
7
|
+
Dialog: 5;
|
|
8
|
+
Window: 6;
|
|
9
|
+
Screens: 7;
|
|
10
|
+
System: 8;
|
|
11
|
+
Browser: 9;
|
|
12
|
+
CancelCall: 10;
|
|
13
|
+
}>;
|
|
14
|
+
export declare let clientId: string;
|
|
9
15
|
/**
|
|
10
16
|
* Creates a new runtime caller with specified ID.
|
|
11
17
|
*
|
|
12
|
-
* @param
|
|
13
|
-
* @param
|
|
14
|
-
* @return
|
|
18
|
+
* @param object - The object to invoke the method on.
|
|
19
|
+
* @param windowName - The name of the window.
|
|
20
|
+
* @return The new runtime caller function.
|
|
15
21
|
*/
|
|
16
|
-
export function
|
|
17
|
-
export namespace objectNames {
|
|
18
|
-
let Call: number;
|
|
19
|
-
let Clipboard: number;
|
|
20
|
-
let Application: number;
|
|
21
|
-
let Events: number;
|
|
22
|
-
let ContextMenu: number;
|
|
23
|
-
let Dialog: number;
|
|
24
|
-
let Window: number;
|
|
25
|
-
let Screens: number;
|
|
26
|
-
let System: number;
|
|
27
|
-
let Browser: number;
|
|
28
|
-
let CancelCall: number;
|
|
29
|
-
}
|
|
30
|
-
export let clientId: string;
|
|
22
|
+
export declare function newRuntimeCaller(object: number, windowName?: string): (method: number, args?: any) => Promise<any>;
|
package/types/screens.d.ts
CHANGED
|
@@ -1,94 +1,60 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
* @returns {Promise<Screen[]>} A promise that resolves to an array of Screen objects.
|
|
4
|
-
*/
|
|
5
|
-
export function GetAll(): Promise<Screen[]>;
|
|
6
|
-
/**
|
|
7
|
-
* Gets the primary screen.
|
|
8
|
-
* @returns {Promise<Screen>} A promise that resolves to the primary screen.
|
|
9
|
-
*/
|
|
10
|
-
export function GetPrimary(): Promise<Screen>;
|
|
11
|
-
/**
|
|
12
|
-
* Gets the current active screen.
|
|
13
|
-
*
|
|
14
|
-
* @returns {Promise<Screen>} A promise that resolves with the current active screen.
|
|
15
|
-
*/
|
|
16
|
-
export function GetCurrent(): Promise<Screen>;
|
|
17
|
-
export type Size = {
|
|
18
|
-
/**
|
|
19
|
-
* - The width.
|
|
20
|
-
*/
|
|
1
|
+
export interface Size {
|
|
2
|
+
/** The width of a rectangular area. */
|
|
21
3
|
Width: number;
|
|
22
|
-
/**
|
|
23
|
-
* - The height.
|
|
24
|
-
*/
|
|
4
|
+
/** The height of a rectangular area. */
|
|
25
5
|
Height: number;
|
|
26
|
-
}
|
|
27
|
-
export
|
|
28
|
-
/**
|
|
29
|
-
* - The X coordinate of the origin.
|
|
30
|
-
*/
|
|
6
|
+
}
|
|
7
|
+
export interface Rect {
|
|
8
|
+
/** The X coordinate of the origin. */
|
|
31
9
|
X: number;
|
|
32
|
-
/**
|
|
33
|
-
* - The Y coordinate of the origin.
|
|
34
|
-
*/
|
|
10
|
+
/** The Y coordinate of the origin. */
|
|
35
11
|
Y: number;
|
|
36
|
-
/**
|
|
37
|
-
* - The width of the rectangle.
|
|
38
|
-
*/
|
|
12
|
+
/** The width of the rectangle. */
|
|
39
13
|
Width: number;
|
|
40
|
-
/**
|
|
41
|
-
* - The height of the rectangle.
|
|
42
|
-
*/
|
|
14
|
+
/** The height of the rectangle. */
|
|
43
15
|
Height: number;
|
|
44
|
-
}
|
|
45
|
-
export
|
|
46
|
-
/**
|
|
47
|
-
* - Unique identifier for the screen.
|
|
48
|
-
*/
|
|
16
|
+
}
|
|
17
|
+
export interface Screen {
|
|
18
|
+
/** Unique identifier for the screen. */
|
|
49
19
|
ID: string;
|
|
50
|
-
/**
|
|
51
|
-
* - Human readable name of the screen.
|
|
52
|
-
*/
|
|
20
|
+
/** Human-readable name of the screen. */
|
|
53
21
|
Name: string;
|
|
54
|
-
/**
|
|
55
|
-
* - The scale factor of the screen (DPI/96). 1 = standard DPI, 2 = HiDPI (Retina), etc.
|
|
56
|
-
*/
|
|
22
|
+
/** The scale factor of the screen (DPI/96). 1 = standard DPI, 2 = HiDPI (Retina), etc. */
|
|
57
23
|
ScaleFactor: number;
|
|
58
|
-
/**
|
|
59
|
-
* - The X coordinate of the screen.
|
|
60
|
-
*/
|
|
24
|
+
/** The X coordinate of the screen. */
|
|
61
25
|
X: number;
|
|
62
|
-
/**
|
|
63
|
-
* - The Y coordinate of the screen.
|
|
64
|
-
*/
|
|
26
|
+
/** The Y coordinate of the screen. */
|
|
65
27
|
Y: number;
|
|
66
|
-
/**
|
|
67
|
-
* - Contains the width and height of the screen.
|
|
68
|
-
*/
|
|
28
|
+
/** Contains the width and height of the screen. */
|
|
69
29
|
Size: Size;
|
|
70
|
-
/**
|
|
71
|
-
* - Contains the bounds of the screen in terms of X, Y, Width, and Height.
|
|
72
|
-
*/
|
|
30
|
+
/** Contains the bounds of the screen in terms of X, Y, Width, and Height. */
|
|
73
31
|
Bounds: Rect;
|
|
74
|
-
/**
|
|
75
|
-
* - Contains the physical bounds of the screen in terms of X, Y, Width, and Height (before scaling).
|
|
76
|
-
*/
|
|
32
|
+
/** Contains the physical bounds of the screen in terms of X, Y, Width, and Height (before scaling). */
|
|
77
33
|
PhysicalBounds: Rect;
|
|
78
|
-
/**
|
|
79
|
-
* - Contains the area of the screen that is actually usable (excluding taskbar and other system UI).
|
|
80
|
-
*/
|
|
34
|
+
/** Contains the area of the screen that is actually usable (excluding taskbar and other system UI). */
|
|
81
35
|
WorkArea: Rect;
|
|
82
|
-
/**
|
|
83
|
-
* - Contains the physical WorkArea of the screen (before scaling).
|
|
84
|
-
*/
|
|
36
|
+
/** Contains the physical WorkArea of the screen (before scaling). */
|
|
85
37
|
PhysicalWorkArea: Rect;
|
|
86
|
-
/**
|
|
87
|
-
* - True if this is the primary monitor selected by the user in the operating system.
|
|
88
|
-
*/
|
|
38
|
+
/** True if this is the primary monitor selected by the user in the operating system. */
|
|
89
39
|
IsPrimary: boolean;
|
|
90
|
-
/**
|
|
91
|
-
* - The rotation of the screen.
|
|
92
|
-
*/
|
|
40
|
+
/** The rotation of the screen. */
|
|
93
41
|
Rotation: number;
|
|
94
|
-
}
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* Gets all screens.
|
|
45
|
+
*
|
|
46
|
+
* @returns A promise that resolves to an array of Screen objects.
|
|
47
|
+
*/
|
|
48
|
+
export declare function GetAll(): Promise<Screen[]>;
|
|
49
|
+
/**
|
|
50
|
+
* Gets the primary screen.
|
|
51
|
+
*
|
|
52
|
+
* @returns A promise that resolves to the primary screen.
|
|
53
|
+
*/
|
|
54
|
+
export declare function GetPrimary(): Promise<Screen>;
|
|
55
|
+
/**
|
|
56
|
+
* Gets the current active screen.
|
|
57
|
+
*
|
|
58
|
+
* @returns A promise that resolves with the current active screen.
|
|
59
|
+
*/
|
|
60
|
+
export declare function GetCurrent(): Promise<Screen>;
|