@wailsio/runtime 3.0.0-alpha.13 → 3.0.0-alpha.14

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.
@@ -0,0 +1,183 @@
1
+
2
+ export declare const EventTypes: {
3
+ Windows: {
4
+ SystemThemeChanged: string,
5
+ APMPowerStatusChange: string,
6
+ APMSuspend: string,
7
+ APMResumeAutomatic: string,
8
+ APMResumeSuspend: string,
9
+ APMPowerSettingChange: string,
10
+ ApplicationStarted: string,
11
+ WebViewNavigationCompleted: string,
12
+ WindowInactive: string,
13
+ WindowActive: string,
14
+ WindowClickActive: string,
15
+ WindowMaximise: string,
16
+ WindowUnMaximise: string,
17
+ WindowFullscreen: string,
18
+ WindowUnFullscreen: string,
19
+ WindowRestore: string,
20
+ WindowMinimise: string,
21
+ WindowUnMinimise: string,
22
+ WindowClose: string,
23
+ WindowSetFocus: string,
24
+ WindowKillFocus: string,
25
+ WindowDragDrop: string,
26
+ WindowDragEnter: string,
27
+ WindowDragLeave: string,
28
+ WindowDragOver: string,
29
+ },
30
+ Mac: {
31
+ ApplicationDidBecomeActive: string,
32
+ ApplicationDidChangeBackingProperties: string,
33
+ ApplicationDidChangeEffectiveAppearance: string,
34
+ ApplicationDidChangeIcon: string,
35
+ ApplicationDidChangeOcclusionState: string,
36
+ ApplicationDidChangeScreenParameters: string,
37
+ ApplicationDidChangeStatusBarFrame: string,
38
+ ApplicationDidChangeStatusBarOrientation: string,
39
+ ApplicationDidFinishLaunching: string,
40
+ ApplicationDidHide: string,
41
+ ApplicationDidResignActiveNotification: string,
42
+ ApplicationDidUnhide: string,
43
+ ApplicationDidUpdate: string,
44
+ ApplicationWillBecomeActive: string,
45
+ ApplicationWillFinishLaunching: string,
46
+ ApplicationWillHide: string,
47
+ ApplicationWillResignActive: string,
48
+ ApplicationWillTerminate: string,
49
+ ApplicationWillUnhide: string,
50
+ ApplicationWillUpdate: string,
51
+ ApplicationTerminate: string,
52
+ ApplicationDidChangeTheme: string,
53
+ ApplicationShouldHandleReopen: string,
54
+ WindowDidBecomeKey: string,
55
+ WindowDidBecomeMain: string,
56
+ WindowDidBeginSheet: string,
57
+ WindowDidChangeAlpha: string,
58
+ WindowDidChangeBackingLocation: string,
59
+ WindowDidChangeBackingProperties: string,
60
+ WindowDidChangeCollectionBehavior: string,
61
+ WindowDidChangeEffectiveAppearance: string,
62
+ WindowDidChangeOcclusionState: string,
63
+ WindowDidChangeOrderingMode: string,
64
+ WindowDidChangeScreen: string,
65
+ WindowDidChangeScreenParameters: string,
66
+ WindowDidChangeScreenProfile: string,
67
+ WindowDidChangeScreenSpace: string,
68
+ WindowDidChangeScreenSpaceProperties: string,
69
+ WindowDidChangeSharingType: string,
70
+ WindowDidChangeSpace: string,
71
+ WindowDidChangeSpaceOrderingMode: string,
72
+ WindowDidChangeTitle: string,
73
+ WindowDidChangeToolbar: string,
74
+ WindowDidChangeVisibility: string,
75
+ WindowDidDeminiaturize: string,
76
+ WindowDidEndSheet: string,
77
+ WindowDidEnterFullScreen: string,
78
+ WindowDidEnterVersionBrowser: string,
79
+ WindowDidExitFullScreen: string,
80
+ WindowDidExitVersionBrowser: string,
81
+ WindowDidExpose: string,
82
+ WindowDidFocus: string,
83
+ WindowDidMiniaturize: string,
84
+ WindowDidMove: string,
85
+ WindowDidOrderOffScreen: string,
86
+ WindowDidOrderOnScreen: string,
87
+ WindowDidResignKey: string,
88
+ WindowDidResignMain: string,
89
+ WindowDidResize: string,
90
+ WindowDidUpdate: string,
91
+ WindowDidUpdateAlpha: string,
92
+ WindowDidUpdateCollectionBehavior: string,
93
+ WindowDidUpdateCollectionProperties: string,
94
+ WindowDidUpdateShadow: string,
95
+ WindowDidUpdateTitle: string,
96
+ WindowDidUpdateToolbar: string,
97
+ WindowDidUpdateVisibility: string,
98
+ WindowShouldClose: string,
99
+ WindowWillBecomeKey: string,
100
+ WindowWillBecomeMain: string,
101
+ WindowWillBeginSheet: string,
102
+ WindowWillChangeOrderingMode: string,
103
+ WindowWillClose: string,
104
+ WindowWillDeminiaturize: string,
105
+ WindowWillEnterFullScreen: string,
106
+ WindowWillEnterVersionBrowser: string,
107
+ WindowWillExitFullScreen: string,
108
+ WindowWillExitVersionBrowser: string,
109
+ WindowWillFocus: string,
110
+ WindowWillMiniaturize: string,
111
+ WindowWillMove: string,
112
+ WindowWillOrderOffScreen: string,
113
+ WindowWillOrderOnScreen: string,
114
+ WindowWillResignMain: string,
115
+ WindowWillResize: string,
116
+ WindowWillUnfocus: string,
117
+ WindowWillUpdate: string,
118
+ WindowWillUpdateAlpha: string,
119
+ WindowWillUpdateCollectionBehavior: string,
120
+ WindowWillUpdateCollectionProperties: string,
121
+ WindowWillUpdateShadow: string,
122
+ WindowWillUpdateTitle: string,
123
+ WindowWillUpdateToolbar: string,
124
+ WindowWillUpdateVisibility: string,
125
+ WindowWillUseStandardFrame: string,
126
+ MenuWillOpen: string,
127
+ MenuDidOpen: string,
128
+ MenuDidClose: string,
129
+ MenuWillSendAction: string,
130
+ MenuDidSendAction: string,
131
+ MenuWillHighlightItem: string,
132
+ MenuDidHighlightItem: string,
133
+ MenuWillDisplayItem: string,
134
+ MenuDidDisplayItem: string,
135
+ MenuWillAddItem: string,
136
+ MenuDidAddItem: string,
137
+ MenuWillRemoveItem: string,
138
+ MenuDidRemoveItem: string,
139
+ MenuWillBeginTracking: string,
140
+ MenuDidBeginTracking: string,
141
+ MenuWillEndTracking: string,
142
+ MenuDidEndTracking: string,
143
+ MenuWillUpdate: string,
144
+ MenuDidUpdate: string,
145
+ MenuWillPopUp: string,
146
+ MenuDidPopUp: string,
147
+ MenuWillSendActionToItem: string,
148
+ MenuDidSendActionToItem: string,
149
+ WebViewDidStartProvisionalNavigation: string,
150
+ WebViewDidReceiveServerRedirectForProvisionalNavigation: string,
151
+ WebViewDidFinishNavigation: string,
152
+ WebViewDidCommitNavigation: string,
153
+ WindowFileDraggingEntered: string,
154
+ WindowFileDraggingPerformed: string,
155
+ WindowFileDraggingExited: string,
156
+ },
157
+ Linux: {
158
+ SystemThemeChanged: string,
159
+ },
160
+ Common: {
161
+ ApplicationStarted: string,
162
+ WindowMaximise: string,
163
+ WindowUnMaximise: string,
164
+ WindowFullscreen: string,
165
+ WindowUnFullscreen: string,
166
+ WindowRestore: string,
167
+ WindowMinimise: string,
168
+ WindowUnMinimise: string,
169
+ WindowClosing: string,
170
+ WindowZoom: string,
171
+ WindowZoomIn: string,
172
+ WindowZoomOut: string,
173
+ WindowZoomReset: string,
174
+ WindowFocus: string,
175
+ WindowLostFocus: string,
176
+ WindowShow: string,
177
+ WindowHide: string,
178
+ WindowDPIChanged: string,
179
+ WindowFilesDropped: string,
180
+ ThemeChanged: string,
181
+ ApplicationTerminate: string,
182
+ },
183
+ };
package/types/events.d.ts CHANGED
@@ -1,4 +1,3 @@
1
- export function dispatchWailsEvent(event: any): void;
2
1
  /**
3
2
  * Register a callback function to be called multiple times for a specific event.
4
3
  *
@@ -46,6 +45,197 @@ export function OffAll(): void;
46
45
  * @returns {any} - The result of the emitted event.
47
46
  */
48
47
  export function Emit(event: WailsEvent): any;
48
+ export const Types: {
49
+ Windows: {
50
+ SystemThemeChanged: string;
51
+ APMPowerStatusChange: string;
52
+ APMSuspend: string;
53
+ APMResumeAutomatic: string;
54
+ APMResumeSuspend: string;
55
+ APMPowerSettingChange: string;
56
+ ApplicationStarted: string;
57
+ WebViewNavigationCompleted: string;
58
+ WindowInactive: string;
59
+ WindowActive: string;
60
+ WindowClickActive: string;
61
+ WindowMaximise: string;
62
+ WindowUnMaximise: string;
63
+ WindowFullscreen: string;
64
+ WindowUnFullscreen: string;
65
+ WindowRestore: string;
66
+ WindowMinimise: string;
67
+ WindowUnMinimise: string;
68
+ WindowClose: string;
69
+ WindowSetFocus: string;
70
+ WindowKillFocus: string;
71
+ WindowDragDrop: string;
72
+ WindowDragEnter: string;
73
+ WindowDragLeave: string;
74
+ WindowDragOver: string;
75
+ };
76
+ Mac: {
77
+ ApplicationDidBecomeActive: string;
78
+ ApplicationDidChangeBackingProperties: string;
79
+ ApplicationDidChangeEffectiveAppearance: string;
80
+ ApplicationDidChangeIcon: string;
81
+ ApplicationDidChangeOcclusionState: string;
82
+ ApplicationDidChangeScreenParameters: string;
83
+ /**
84
+ * Register a callback function to be called multiple times for a specific event.
85
+ *
86
+ * @param {string} eventName - The name of the event to register the callback for.
87
+ * @param {function} callback - The callback function to be called when the event is triggered.
88
+ * @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.
89
+ *
90
+ @return {function} - A function that, when called, will unregister the callback from the event.
91
+ */
92
+ ApplicationDidChangeStatusBarFrame: string;
93
+ ApplicationDidChangeStatusBarOrientation: string;
94
+ ApplicationDidFinishLaunching: string;
95
+ ApplicationDidHide: string;
96
+ ApplicationDidResignActiveNotification: string;
97
+ ApplicationDidUnhide: string;
98
+ ApplicationDidUpdate: string;
99
+ ApplicationWillBecomeActive: string;
100
+ ApplicationWillFinishLaunching: string;
101
+ ApplicationWillHide: string;
102
+ ApplicationWillResignActive: string;
103
+ ApplicationWillTerminate: string;
104
+ ApplicationWillUnhide: string;
105
+ ApplicationWillUpdate: string;
106
+ ApplicationTerminate: string;
107
+ ApplicationDidChangeTheme: string;
108
+ ApplicationShouldHandleReopen: string;
109
+ WindowDidBecomeKey: string;
110
+ WindowDidBecomeMain: string;
111
+ WindowDidBeginSheet: string;
112
+ WindowDidChangeAlpha: string;
113
+ WindowDidChangeBackingLocation: string;
114
+ WindowDidChangeBackingProperties: string;
115
+ WindowDidChangeCollectionBehavior: string;
116
+ WindowDidChangeEffectiveAppearance: string;
117
+ WindowDidChangeOcclusionState: string;
118
+ WindowDidChangeOrderingMode: string;
119
+ WindowDidChangeScreen: string;
120
+ WindowDidChangeScreenParameters: string;
121
+ WindowDidChangeScreenProfile: string;
122
+ WindowDidChangeScreenSpace: string;
123
+ WindowDidChangeScreenSpaceProperties: string;
124
+ WindowDidChangeSharingType: string;
125
+ WindowDidChangeSpace: string;
126
+ WindowDidChangeSpaceOrderingMode: string;
127
+ WindowDidChangeTitle: string;
128
+ WindowDidChangeToolbar: string;
129
+ WindowDidChangeVisibility: string;
130
+ WindowDidDeminiaturize: string;
131
+ WindowDidEndSheet: string;
132
+ WindowDidEnterFullScreen: string;
133
+ WindowDidEnterVersionBrowser: string;
134
+ WindowDidExitFullScreen: string;
135
+ WindowDidExitVersionBrowser: string;
136
+ WindowDidExpose: string;
137
+ WindowDidFocus: string;
138
+ WindowDidMiniaturize: string;
139
+ WindowDidMove: string;
140
+ WindowDidOrderOffScreen: string;
141
+ WindowDidOrderOnScreen: string;
142
+ WindowDidResignKey: string;
143
+ WindowDidResignMain: string;
144
+ WindowDidResize: string;
145
+ WindowDidUpdate: string;
146
+ WindowDidUpdateAlpha: string;
147
+ WindowDidUpdateCollectionBehavior: string;
148
+ WindowDidUpdateCollectionProperties: string;
149
+ WindowDidUpdateShadow: string;
150
+ WindowDidUpdateTitle: string;
151
+ WindowDidUpdateToolbar: string;
152
+ WindowDidUpdateVisibility: string;
153
+ WindowShouldClose: string;
154
+ WindowWillBecomeKey: string;
155
+ WindowWillBecomeMain: string;
156
+ WindowWillBeginSheet: string;
157
+ WindowWillChangeOrderingMode: string;
158
+ WindowWillClose: string;
159
+ WindowWillDeminiaturize: string;
160
+ WindowWillEnterFullScreen: string;
161
+ WindowWillEnterVersionBrowser: string;
162
+ WindowWillExitFullScreen: string;
163
+ WindowWillExitVersionBrowser: string;
164
+ WindowWillFocus: string;
165
+ WindowWillMiniaturize: string;
166
+ WindowWillMove: string;
167
+ WindowWillOrderOffScreen: string;
168
+ WindowWillOrderOnScreen: string;
169
+ WindowWillResignMain: string;
170
+ WindowWillResize: string;
171
+ WindowWillUnfocus: string;
172
+ WindowWillUpdate: string;
173
+ WindowWillUpdateAlpha: string;
174
+ WindowWillUpdateCollectionBehavior: string;
175
+ WindowWillUpdateCollectionProperties: string;
176
+ WindowWillUpdateShadow: string;
177
+ WindowWillUpdateTitle: string;
178
+ WindowWillUpdateToolbar: string;
179
+ WindowWillUpdateVisibility: string;
180
+ WindowWillUseStandardFrame: string;
181
+ MenuWillOpen: string;
182
+ MenuDidOpen: string;
183
+ MenuDidClose: string;
184
+ MenuWillSendAction: string;
185
+ MenuDidSendAction: string;
186
+ MenuWillHighlightItem: string;
187
+ MenuDidHighlightItem: string;
188
+ MenuWillDisplayItem: string;
189
+ MenuDidDisplayItem: string;
190
+ MenuWillAddItem: string;
191
+ MenuDidAddItem: string;
192
+ MenuWillRemoveItem: string;
193
+ MenuDidRemoveItem: string;
194
+ MenuWillBeginTracking: string;
195
+ MenuDidBeginTracking: string;
196
+ MenuWillEndTracking: string;
197
+ MenuDidEndTracking: string;
198
+ MenuWillUpdate: string;
199
+ MenuDidUpdate: string;
200
+ MenuWillPopUp: string;
201
+ MenuDidPopUp: string;
202
+ MenuWillSendActionToItem: string;
203
+ MenuDidSendActionToItem: string;
204
+ WebViewDidStartProvisionalNavigation: string;
205
+ WebViewDidReceiveServerRedirectForProvisionalNavigation: string;
206
+ WebViewDidFinishNavigation: string;
207
+ WebViewDidCommitNavigation: string;
208
+ WindowFileDraggingEntered: string;
209
+ WindowFileDraggingPerformed: string;
210
+ WindowFileDraggingExited: string;
211
+ };
212
+ Linux: {
213
+ SystemThemeChanged: string;
214
+ };
215
+ Common: {
216
+ ApplicationStarted: string;
217
+ WindowMaximise: string;
218
+ WindowUnMaximise: string;
219
+ WindowFullscreen: string;
220
+ WindowUnFullscreen: string;
221
+ WindowRestore: string;
222
+ WindowMinimise: string;
223
+ WindowUnMinimise: string;
224
+ WindowClosing: string;
225
+ WindowZoom: string;
226
+ WindowZoomIn: string;
227
+ WindowZoomOut: string;
228
+ WindowZoomReset: string;
229
+ WindowFocus: string;
230
+ WindowLostFocus: string;
231
+ WindowShow: string;
232
+ WindowHide: string;
233
+ WindowDPIChanged: string;
234
+ WindowFilesDropped: string;
235
+ ThemeChanged: string;
236
+ ApplicationTerminate: string;
237
+ };
238
+ };
49
239
  export class WailsEvent {
50
240
  constructor(name: any, data?: any);
51
241
  name: any;
package/types/index.d.ts CHANGED
@@ -1,49 +1,12 @@
1
- export namespace Events {
2
- export { On };
3
- export { Off };
4
- export { OnMultiple };
5
- export { WailsEvent };
6
- export { OffAll };
7
- export { Emit };
8
- export { Once };
9
- }
10
- export namespace Call {
11
- export { Plugin };
12
- export { ByID };
13
- export { ByName };
14
- }
15
- export namespace Dialogs {
16
- export { Info };
17
- export { Error };
18
- export { OpenFile };
19
- export { Question };
20
- export { Warning };
21
- export { SaveFile };
22
- }
23
- import * as Application from "./application";
24
- import * as Browser from "./browser";
25
- import * as Clipboard from "./clipboard";
26
- import * as ContextMenu from "./contextmenu";
27
- import * as Flags from "./flags";
28
- import * as Runtime from "./runtime";
29
- import * as Screens from "./screens";
30
- import * as System from "./system";
31
- import * as Window from "./window";
32
- import * as WML from "./wml";
33
- import { On } from './events';
34
- import { Off } from './events';
35
- import { OnMultiple } from './events';
36
- import { WailsEvent } from './events';
37
- import { OffAll } from './events';
38
- import { Emit } from './events';
39
- import { Once } from './events';
40
- import { Plugin } from "./calls";
41
- import { ByID } from "./calls";
42
- import { ByName } from "./calls";
43
- import { Info } from "./dialogs";
44
- import { Error } from "./dialogs";
45
- import { OpenFile } from "./dialogs";
46
- import { Question } from "./dialogs";
47
- import { Warning } from "./dialogs";
48
- import { SaveFile } from "./dialogs";
49
- export { Application, Browser, Clipboard, ContextMenu, Flags, Runtime, Screens, System, Window, WML };
1
+ import * as Application from "./application";
2
+ import * as Browser from "./browser";
3
+ import * as Call from "./calls";
4
+ import * as Clipboard from "./clipboard";
5
+ import * as Dialogs from "./dialogs";
6
+ import * as Events from "./events";
7
+ import * as Flags from "./flags";
8
+ import * as Screens from "./screens";
9
+ import * as System from "./system";
10
+ import * as Window from "./window";
11
+ import * as WML from './wml';
12
+ export { Application, Browser, Call, Clipboard, Dialogs, Events, Flags, Screens, System, Window, WML };
@@ -14,4 +14,41 @@ export function GetPrimary(): Promise<Screen>;
14
14
  * @returns {Promise<Screen>} A promise that resolves with the current active screen.
15
15
  */
16
16
  export function GetCurrent(): Promise<Screen>;
17
- export type Screen = any;
17
+ export type Screen = {
18
+ /**
19
+ * - Unique identifier for the screen.
20
+ */
21
+ Id: string;
22
+ /**
23
+ * - Human readable name of the screen.
24
+ */
25
+ Name: string;
26
+ /**
27
+ * - The resolution scale of the screen. 1 = standard resolution, 2 = high (Retina), etc.
28
+ */
29
+ Scale: number;
30
+ /**
31
+ * - Contains the X and Y coordinates of the screen's position.
32
+ */
33
+ Position: Position;
34
+ /**
35
+ * - Contains the width and height of the screen.
36
+ */
37
+ Size: Size;
38
+ /**
39
+ * - Contains the bounds of the screen in terms of X, Y, Width, and Height.
40
+ */
41
+ Bounds: Rect;
42
+ /**
43
+ * - Contains the area of the screen that is actually usable (excluding taskbar and other system UI).
44
+ */
45
+ WorkArea: Rect;
46
+ /**
47
+ * - True if this is the primary monitor selected by the user in the operating system.
48
+ */
49
+ IsPrimary: boolean;
50
+ /**
51
+ * - The rotation of the screen.
52
+ */
53
+ Rotation: Rotation;
54
+ };
package/types/window.d.ts CHANGED
@@ -5,13 +5,48 @@
5
5
  * @return {Object} - The specified window object.
6
6
  */
7
7
  export function Get(windowName: string): any;
8
- /**
9
- * Returns a map of all methods in the current window.
10
- * @returns {Map} - A map of window methods.
11
- */
12
- export function WindowMethods(targetWindow: any): Map<any, any>;
13
8
  declare const _default: any;
14
9
  export default _default;
15
- export type Size = any;
16
- export type Position = any;
17
- export type Screen = any;
10
+ export type Screen = import("./screens").Screen;
11
+ export type Position = {
12
+ /**
13
+ * - The X coordinate.
14
+ */
15
+ X: number;
16
+ /**
17
+ * - The Y coordinate.
18
+ */
19
+ Y: number;
20
+ };
21
+ export type Size = {
22
+ /**
23
+ * - The width.
24
+ */
25
+ X: number;
26
+ /**
27
+ * - The height.
28
+ */
29
+ Y: number;
30
+ };
31
+ export type Rect = {
32
+ /**
33
+ * - The X coordinate of the top-left corner.
34
+ */
35
+ X: number;
36
+ /**
37
+ * - The Y coordinate of the top-left corner.
38
+ */
39
+ Y: number;
40
+ /**
41
+ * - The width of the rectangle.
42
+ */
43
+ Width: number;
44
+ /**
45
+ * - The height of the rectangle.
46
+ */
47
+ Height: number;
48
+ };
49
+ /**
50
+ * The rotation of the screen. Can be one of 'Zero', 'Ninety', 'OneEighty', 'TwoSeventy'.
51
+ */
52
+ export type Rotation = ('Zero' | 'Ninety' | 'OneEighty' | 'TwoSeventy');
package/types/wml.d.ts CHANGED
@@ -1,6 +1,6 @@
1
- /**
2
- * Reloads the WML system by adding necessary event listeners and browser listeners.
3
- *
4
- * @return {void}
5
- */
6
- export function Reload(): void;
1
+ /**
2
+ * Reloads the WML page by adding necessary event listeners and browser listeners.
3
+ *
4
+ * @return {void}
5
+ */
6
+ export function Reload(): void;
package/src/index.d.ts DELETED
@@ -1,136 +0,0 @@
1
- declare module '@wailsio/runtime';
2
-
3
- /**
4
- * Describes the properties of a Button object.
5
- */
6
- export interface Button {
7
- // Text that appears within the button.
8
- Label?: string;
9
- // True if the button should cancel an operation when clicked.
10
- IsCancel?: boolean;
11
- // True if the button should be the default action when the user presses enter.
12
- IsDefault?: boolean;
13
- }
14
-
15
- /**
16
- * Describes the properties of a FileFilter object.
17
- */
18
- export interface FileFilter {
19
- // Display name for the filter, it could be "Text Files", "Images" etc.
20
- DisplayName?: string;
21
- // Pattern to match for the filter, e.g. "*.txt;*.md" for text markdown files.
22
- Pattern?: string;
23
- }
24
-
25
- /**
26
- * Describes the properties of a Position object.
27
- */
28
- export interface Position {
29
- X: number;
30
- Y: number;
31
- }
32
-
33
- /**
34
- * Describes the properties of a Size object.
35
- * Extends the properties of Position.
36
- */
37
- export type Size = Position;
38
-
39
- /**
40
- * Describes the properties of a Rect object.
41
- * Extends the properties of Size.
42
- */
43
- export type Rect = Size & Position;
44
-
45
- /**
46
- * Describes the possible rotations a Screen can have.
47
- */
48
- export enum Rotation {
49
- Zero = 0,
50
- Ninety = 90,
51
- OneEighty = 180,
52
- TwoSeventy = 270
53
- }
54
-
55
- /**
56
- * Describes the properties of a Screen object.
57
- */
58
- export interface Screen {
59
- // Unique identifier for the screen.
60
- Id: string;
61
- // Human readable name of the screen.
62
- Name: string;
63
- // The resolution scale of the screen. 1 = standard resolution, 2 = high (Retina), etc.
64
- Scale: number;
65
- // Contains the X and Y coordinates of the screen's position.
66
- Position: Position;
67
- // Contains the width and height of the screen.
68
- Size: Size;
69
- // Contains the bounds of the screen in terms of X, Y, Width, and Height.
70
- Bounds: Rect;
71
- // Contains the area of the screen that is actually usable (excluding taskbar and other system UI).
72
- WorkArea: Rect;
73
- // True if this is the primary monitor selected by the user in the operating system.
74
- IsPrimary: boolean;
75
- // The rotation of the screen. Can be one of 0, 90, 180, 270 degrees.
76
- Rotation: Rotation;
77
- }
78
-
79
- /**
80
- * Describes the properties of a MessageDialogOptions object.
81
- */
82
- export interface MessageDialogOptions {
83
- // The title of the dialog window.
84
- Title?: string;
85
- // The main message to show in the dialog.
86
- Message?: string;
87
- // Array of button options to show in the dialog.
88
- Buttons?: Button[];
89
- // True if the dialog should appear detached from the main window (if applicable).
90
- Detached?: boolean;
91
- }
92
-
93
- /**
94
- * Describes the properties common to OpenFileDialogOptions and SaveFileDialogOptions objects.
95
- */
96
- export interface DialogOptions {
97
- CanChooseDirectories?: boolean;
98
- CanChooseFiles?: boolean;
99
- CanCreateDirectories?: boolean;
100
- ShowHiddenFiles?: boolean;
101
- ResolvesAliases?: boolean;
102
- AllowsMultipleSelection?: boolean;
103
- HideExtension?: boolean;
104
- CanSelectHiddenExtension?: boolean;
105
- TreatsFilePackagesAsDirectories?: boolean;
106
- AllowsOtherFiletypes?: boolean;
107
- Filters?: FileFilter[];
108
- Title?: string;
109
- Message?: string;
110
- ButtonText?: string;
111
- Directory?: string;
112
- Detached?: boolean;
113
- }
114
-
115
- /**
116
- * Describes properties unique to OpenFileDialogOptions.
117
- */
118
- export type OpenFileDialogOptions = DialogOptions;
119
-
120
- /**
121
- * Describes properties unique to SaveFileDialogOptions.
122
- */
123
- export type SaveFileDialogOptions = DialogOptions & {
124
- // Default filename to use for the save dialog.
125
- Filename?: string;
126
- };
127
-
128
- /**
129
- * Describes the properties of a WailsEvent object.
130
- */
131
- export interface WailsEvent {
132
- // The name of the event.
133
- Name: string;
134
- // Any data associated with the event.
135
- Data?: unknown;
136
- }