@wailsio/runtime 3.0.0-alpha.65 → 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.
Files changed (142) hide show
  1. package/{src → dist}/application.js +2 -16
  2. package/dist/browser.js +20 -0
  3. package/dist/callable.js +144 -0
  4. package/dist/calls.js +194 -0
  5. package/dist/cancellable.js +792 -0
  6. package/dist/clipboard.js +30 -0
  7. package/dist/contextmenu.js +80 -0
  8. package/{src → dist}/create.js +2 -33
  9. package/dist/dialogs.js +134 -0
  10. package/dist/drag.js +222 -0
  11. package/dist/event_types.js +229 -0
  12. package/dist/events.js +101 -0
  13. package/dist/flags.js +23 -0
  14. package/dist/index.js +38 -0
  15. package/dist/listener.js +44 -0
  16. package/{src → dist}/nanoid.js +7 -11
  17. package/dist/runtime.js +63 -0
  18. package/dist/screens.js +38 -0
  19. package/dist/system.js +116 -0
  20. package/{src → dist}/utils.js +29 -20
  21. package/dist/window.js +438 -0
  22. package/{src → dist}/wml.js +51 -122
  23. package/package.json +43 -19
  24. package/types/application.d.ts +3 -10
  25. package/types/browser.d.ts +4 -4
  26. package/types/callable.d.ts +3 -0
  27. package/types/calls.d.ts +43 -49
  28. package/types/cancellable.d.ts +434 -0
  29. package/types/clipboard.d.ts +6 -5
  30. package/types/contextmenu.d.ts +1 -0
  31. package/types/create.d.ts +6 -27
  32. package/types/dialogs.d.ts +99 -143
  33. package/types/drag.d.ts +1 -0
  34. package/types/event_types.d.ts +218 -219
  35. package/types/events.d.ts +45 -250
  36. package/types/flags.d.ts +3 -3
  37. package/types/index.d.ts +16 -14
  38. package/types/listener.d.ts +9 -0
  39. package/types/nanoid.d.ts +1 -1
  40. package/types/runtime.d.ts +18 -26
  41. package/types/screens.d.ts +42 -76
  42. package/types/system.d.ts +50 -79
  43. package/types/utils.d.ts +15 -8
  44. package/types/window.d.ts +110 -225
  45. package/types/wml.d.ts +2 -6
  46. package/docs/.nojekyll +0 -1
  47. package/docs/assets/highlight.css +0 -22
  48. package/docs/assets/icons.js +0 -15
  49. package/docs/assets/icons.svg +0 -1
  50. package/docs/assets/main.js +0 -59
  51. package/docs/assets/navigation.js +0 -1
  52. package/docs/assets/search.js +0 -1
  53. package/docs/assets/style.css +0 -1415
  54. package/docs/classes/Call.RuntimeError.html +0 -11
  55. package/docs/classes/Events.WailsEvent.html +0 -4
  56. package/docs/functions/Application.Hide.html +0 -2
  57. package/docs/functions/Application.Quit.html +0 -2
  58. package/docs/functions/Application.Show.html +0 -2
  59. package/docs/functions/Browser.OpenURL.html +0 -3
  60. package/docs/functions/Call.ByID.html +0 -8
  61. package/docs/functions/Call.ByName.html +0 -6
  62. package/docs/functions/Call.Call.html +0 -11
  63. package/docs/functions/Clipboard.SetText.html +0 -6
  64. package/docs/functions/Clipboard.Text.html +0 -3
  65. package/docs/functions/Create.Any.html +0 -2
  66. package/docs/functions/Create.Array.html +0 -4
  67. package/docs/functions/Create.ByteSlice.html +0 -3
  68. package/docs/functions/Create.Map.html +0 -4
  69. package/docs/functions/Create.Nullable.html +0 -3
  70. package/docs/functions/Create.Struct.html +0 -3
  71. package/docs/functions/Dialogs.Error.html +0 -5
  72. package/docs/functions/Dialogs.Info.html +0 -5
  73. package/docs/functions/Dialogs.OpenFile.html +0 -3
  74. package/docs/functions/Dialogs.Question.html +0 -5
  75. package/docs/functions/Dialogs.SaveFile.html +0 -3
  76. package/docs/functions/Dialogs.Warning.html +0 -5
  77. package/docs/functions/Events.Emit.html +0 -6
  78. package/docs/functions/Events.Off.html +0 -4
  79. package/docs/functions/Events.OffAll.html +0 -3
  80. package/docs/functions/Events.On.html +0 -7
  81. package/docs/functions/Events.OnMultiple.html +0 -8
  82. package/docs/functions/Events.Once.html +0 -7
  83. package/docs/functions/Events.setup.html +0 -1
  84. package/docs/functions/Flags.GetFlag.html +0 -6
  85. package/docs/functions/Screens.GetAll.html +0 -3
  86. package/docs/functions/Screens.GetCurrent.html +0 -3
  87. package/docs/functions/Screens.GetPrimary.html +0 -3
  88. package/docs/functions/System.Capabilities.html +0 -4
  89. package/docs/functions/System.Environment.html +0 -5
  90. package/docs/functions/System.IsAMD64.html +0 -3
  91. package/docs/functions/System.IsARM.html +0 -3
  92. package/docs/functions/System.IsARM64.html +0 -5
  93. package/docs/functions/System.IsDarkMode.html +0 -5
  94. package/docs/functions/System.IsDebug.html +0 -1
  95. package/docs/functions/System.IsLinux.html +0 -3
  96. package/docs/functions/System.IsMac.html +0 -3
  97. package/docs/functions/System.IsWindows.html +0 -3
  98. package/docs/functions/System.invoke.html +0 -1
  99. package/docs/functions/WML.Enable.html +0 -2
  100. package/docs/functions/WML.Reload.html +0 -2
  101. package/docs/functions/init.html +0 -1
  102. package/docs/index.html +0 -5
  103. package/docs/interfaces/Call.CallOptions.html +0 -7
  104. package/docs/interfaces/Dialogs.Button.html +0 -7
  105. package/docs/interfaces/Dialogs.FileFilter.html +0 -5
  106. package/docs/interfaces/Dialogs.MessageDialogOptions.html +0 -9
  107. package/docs/interfaces/Dialogs.OpenFileDialogOptions.html +0 -33
  108. package/docs/interfaces/Dialogs.SaveFileDialogOptions.html +0 -35
  109. package/docs/interfaces/Screens.Rect.html +0 -9
  110. package/docs/interfaces/Screens.Screen.html +0 -25
  111. package/docs/interfaces/Screens.Size.html +0 -5
  112. package/docs/interfaces/System.EnvironmentInfo.html +0 -11
  113. package/docs/interfaces/System.OSInfo.html +0 -9
  114. package/docs/modules/Application.html +0 -4
  115. package/docs/modules/Browser.html +0 -2
  116. package/docs/modules/Call.html +0 -6
  117. package/docs/modules/Clipboard.html +0 -3
  118. package/docs/modules/Create.html +0 -7
  119. package/docs/modules/Dialogs.html +0 -12
  120. package/docs/modules/Events.html +0 -10
  121. package/docs/modules/Flags.html +0 -2
  122. package/docs/modules/Screens.html +0 -7
  123. package/docs/modules/System.html +0 -14
  124. package/docs/modules/WML.html +0 -3
  125. package/docs/modules.html +0 -14
  126. package/docs/variables/Events.Types.html +0 -1
  127. package/docs/variables/Window.html +0 -2
  128. package/src/browser.js +0 -24
  129. package/src/calls.js +0 -221
  130. package/src/clipboard.js +0 -35
  131. package/src/contextmenu.js +0 -97
  132. package/src/dialogs.js +0 -200
  133. package/src/drag.js +0 -119
  134. package/src/event_types.js +0 -219
  135. package/src/events.js +0 -140
  136. package/src/flags.js +0 -25
  137. package/src/index.js +0 -60
  138. package/src/runtime.js +0 -92
  139. package/src/screens.js +0 -71
  140. package/src/system.js +0 -143
  141. package/src/window.js +0 -638
  142. package/tsconfig.json +0 -20
package/types/events.d.ts CHANGED
@@ -1,271 +1,66 @@
1
- export function setup(): void;
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 {string} eventName - The name of the event to register the callback for.
6
- * @param {function} callback - The callback function to be called when the event is triggered.
7
- * @param {number} 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.
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: Function, maxCallbacks: number): Function;
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 {string} eventName - The name of the event.
16
- * @param {function} callback - The callback function to be executed. It takes no parameters.
17
- * @return {function} - A function that, when called, will unregister the callback from the event. */
18
- export function On(eventName: string, callback: Function): Function;
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 {string} eventName - The name of the event.
23
- * @param {function} callback - The function to be executed when the event occurs.
24
- * @return {function} - A function that, when called, will unregister the callback from the event.
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: Function): Function;
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 {string} eventName - The name of the event to remove listeners for.
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(eventName: string, ...additionalEventNames: string[]): undefined;
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 an event using the given event name.
61
+ * Emits the given event.
44
62
  *
45
- * @param {WailsEvent} event - The name of the event to emit.
46
- * @returns {any} - The result of the emitted event.
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): any;
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 {string} keyString - The key to retrieve the value for.
5
- * @return {*} - The value associated with the specified key.
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(keyString: string): any;
7
+ export declare function GetFlag(key: string): any;
package/types/index.d.ts CHANGED
@@ -1,14 +1,16 @@
1
- export function init(): void;
2
- import * as Application from "./application";
3
- import * as Browser from "./browser";
4
- import * as Call from "./calls";
5
- import * as Clipboard from "./clipboard";
6
- import * as Create from "./create";
7
- import * as Dialogs from "./dialogs";
8
- import * as Events from "./events";
9
- import * as Flags from "./flags";
10
- import * as Screens from "./screens";
11
- import * as System from "./system";
12
- import Window from "./window";
13
- import * as WML from "./wml";
14
- export { Application, Browser, Call, Clipboard, Create, Dialogs, Events, Flags, Screens, System, Window, WML };
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;
@@ -1,30 +1,22 @@
1
- /**
2
- * Creates a runtime caller function that invokes a specified method on a given object within a specified window context.
3
- *
4
- * @param {Object} object - The object on which the method is to be invoked.
5
- * @param {string} windowName - The name of the window context in which the method should be called.
6
- * @returns {Function} A runtime caller function that takes the method name and optionally arguments and invokes the method within the specified window context.
7
- */
8
- export function newRuntimeCaller(object: any, windowName: string): Function;
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 {number} object - The object to invoke the method on.
13
- * @param {string} windowName - The name of the window.
14
- * @return {Function} - The new runtime caller function.
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 newRuntimeCallerWithID(object: number, windowName: string): 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>;
@@ -1,94 +1,60 @@
1
- /**
2
- * Gets all screens.
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 type Rect = {
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 type Screen = {
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>;