@wailsio/runtime 3.0.0-alpha.26 → 3.0.0-alpha.27

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wailsio/runtime",
3
- "version": "3.0.0-alpha.26",
3
+ "version": "3.0.0-alpha.27",
4
4
  "description": "Wails Runtime",
5
5
  "main": "src/index.js",
6
6
  "types": "types/index.d.ts",
package/src/screens.js CHANGED
@@ -10,23 +10,17 @@ The electron alternative for Go
10
10
 
11
11
  /* jshint esversion: 9 */
12
12
 
13
- /**
14
- * @typedef {Object} Position
15
- * @property {number} X - The X coordinate.
16
- * @property {number} Y - The Y coordinate.
17
- */
18
-
19
13
  /**
20
14
  * @typedef {Object} Size
21
- * @property {number} X - The width.
22
- * @property {number} Y - The height.
15
+ * @property {number} Width - The width.
16
+ * @property {number} Height - The height.
23
17
  */
24
18
 
25
19
 
26
20
  /**
27
21
  * @typedef {Object} Rect
28
- * @property {number} X - The X coordinate of the top-left corner.
29
- * @property {number} Y - The Y coordinate of the top-left corner.
22
+ * @property {number} X - The X coordinate of the origin.
23
+ * @property {number} Y - The Y coordinate of the origin.
30
24
  * @property {number} Width - The width of the rectangle.
31
25
  * @property {number} Height - The height of the rectangle.
32
26
  */
@@ -36,11 +30,14 @@ The electron alternative for Go
36
30
  * @typedef {Object} Screen
37
31
  * @property {string} Id - Unique identifier for the screen.
38
32
  * @property {string} Name - Human readable name of the screen.
39
- * @property {number} Scale - The resolution scale of the screen. 1 = standard resolution, 2 = high (Retina), etc.
40
- * @property {Position} Position - Contains the X and Y coordinates of the screen's position.
33
+ * @property {number} ScaleFactor - The scale factor of the screen (DPI/96). 1 = standard DPI, 2 = HiDPI (Retina), etc.
34
+ * @property {number} X - The X coordinate of the screen.
35
+ * @property {number} Y - The Y coordinate of the screen.
41
36
  * @property {Size} Size - Contains the width and height of the screen.
42
37
  * @property {Rect} Bounds - Contains the bounds of the screen in terms of X, Y, Width, and Height.
38
+ * @property {Rect} PhysicalBounds - Contains the physical bounds of the screen in terms of X, Y, Width, and Height (before scaling).
43
39
  * @property {Rect} WorkArea - Contains the area of the screen that is actually usable (excluding taskbar and other system UI).
40
+ * @property {Rect} PhysicalWorkArea - Contains the physical WorkArea of the screen (before scaling).
44
41
  * @property {boolean} IsPrimary - True if this is the primary monitor selected by the user in the operating system.
45
42
  * @property {number} Rotation - The rotation of the screen.
46
43
  */
@@ -14,33 +14,23 @@ 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 Position = {
18
- /**
19
- * - The X coordinate.
20
- */
21
- X: number;
22
- /**
23
- * - The Y coordinate.
24
- */
25
- Y: number;
26
- };
27
17
  export type Size = {
28
18
  /**
29
19
  * - The width.
30
20
  */
31
- X: number;
21
+ Width: number;
32
22
  /**
33
23
  * - The height.
34
24
  */
35
- Y: number;
25
+ Height: number;
36
26
  };
37
27
  export type Rect = {
38
28
  /**
39
- * - The X coordinate of the top-left corner.
29
+ * - The X coordinate of the origin.
40
30
  */
41
31
  X: number;
42
32
  /**
43
- * - The Y coordinate of the top-left corner.
33
+ * - The Y coordinate of the origin.
44
34
  */
45
35
  Y: number;
46
36
  /**
@@ -62,13 +52,17 @@ export type Screen = {
62
52
  */
63
53
  Name: string;
64
54
  /**
65
- * - The resolution scale of the screen. 1 = standard resolution, 2 = high (Retina), etc.
55
+ * - The scale factor of the screen (DPI/96). 1 = standard DPI, 2 = HiDPI (Retina), etc.
66
56
  */
67
- Scale: number;
57
+ ScaleFactor: number;
68
58
  /**
69
- * - Contains the X and Y coordinates of the screen's position.
59
+ * - The X coordinate of the screen.
70
60
  */
71
- Position: Position;
61
+ X: number;
62
+ /**
63
+ * - The Y coordinate of the screen.
64
+ */
65
+ Y: number;
72
66
  /**
73
67
  * - Contains the width and height of the screen.
74
68
  */
@@ -77,10 +71,18 @@ export type Screen = {
77
71
  * - Contains the bounds of the screen in terms of X, Y, Width, and Height.
78
72
  */
79
73
  Bounds: Rect;
74
+ /**
75
+ * - Contains the physical bounds of the screen in terms of X, Y, Width, and Height (before scaling).
76
+ */
77
+ PhysicalBounds: Rect;
80
78
  /**
81
79
  * - Contains the area of the screen that is actually usable (excluding taskbar and other system UI).
82
80
  */
83
81
  WorkArea: Rect;
82
+ /**
83
+ * - Contains the physical WorkArea of the screen (before scaling).
84
+ */
85
+ PhysicalWorkArea: Rect;
84
86
  /**
85
87
  * - True if this is the primary monitor selected by the user in the operating system.
86
88
  */