diff --git a/v3/internal/runtime/desktop/@wailsio/runtime/package.json b/v3/internal/runtime/desktop/@wailsio/runtime/package.json index 56f3059b..07023084 100644 --- a/v3/internal/runtime/desktop/@wailsio/runtime/package.json +++ b/v3/internal/runtime/desktop/@wailsio/runtime/package.json @@ -1,6 +1,6 @@ { "name": "@wailsio/runtime", - "version": "3.0.0-alpha.15", + "version": "3.0.0-alpha.16", "description": "Wails Runtime", "main": "src/index.js", "types": "types/index.d.ts", diff --git a/v3/internal/runtime/desktop/@wailsio/runtime/src/screens.js b/v3/internal/runtime/desktop/@wailsio/runtime/src/screens.js index cc61bfca..ffd9cbda 100644 --- a/v3/internal/runtime/desktop/@wailsio/runtime/src/screens.js +++ b/v3/internal/runtime/desktop/@wailsio/runtime/src/screens.js @@ -10,6 +10,33 @@ The electron alternative for Go /* jshint esversion: 9 */ +/** + * @typedef {Object} Position + * @property {number} X - The X coordinate. + * @property {number} Y - The Y coordinate. + */ + +/** + * @typedef {Object} Size + * @property {number} X - The width. + * @property {number} Y - The height. + */ + + +/** + * @typedef {Object} Rect + * @property {number} X - The X coordinate of the top-left corner. + * @property {number} Y - The Y coordinate of the top-left corner. + * @property {number} Width - The width of the rectangle. + * @property {number} Height - The height of the rectangle. + */ + + +/** + * @typedef {('Zero'|'Ninety'|'OneEighty'|'TwoSeventy')} Rotation + * The rotation of the screen. Can be one of 'Zero', 'Ninety', 'OneEighty', 'TwoSeventy'. + */ + /** * @typedef {Object} Screen diff --git a/v3/internal/runtime/desktop/@wailsio/runtime/src/window.js b/v3/internal/runtime/desktop/@wailsio/runtime/src/window.js index 5c83fe85..a91ceb75 100644 --- a/v3/internal/runtime/desktop/@wailsio/runtime/src/window.js +++ b/v3/internal/runtime/desktop/@wailsio/runtime/src/window.js @@ -15,33 +15,6 @@ The electron alternative for Go * @typedef {import("./screens").Screen} Screen */ -/** - * @typedef {Object} Position - * @property {number} X - The X coordinate. - * @property {number} Y - The Y coordinate. - */ - -/** - * @typedef {Object} Size - * @property {number} X - The width. - * @property {number} Y - The height. - */ - - -/** - * @typedef {Object} Rect - * @property {number} X - The X coordinate of the top-left corner. - * @property {number} Y - The Y coordinate of the top-left corner. - * @property {number} Width - The width of the rectangle. - * @property {number} Height - The height of the rectangle. - */ - -/** - * @typedef {('Zero'|'Ninety'|'OneEighty'|'TwoSeventy')} Rotation - * The rotation of the screen. Can be one of 'Zero', 'Ninety', 'OneEighty', 'TwoSeventy'. - */ - - import {newRuntimeCallerWithID, objectNames} from "./runtime"; const center = 0; diff --git a/v3/internal/runtime/desktop/@wailsio/runtime/types/screens.d.ts b/v3/internal/runtime/desktop/@wailsio/runtime/types/screens.d.ts index b7cc66a8..eb17390e 100644 --- a/v3/internal/runtime/desktop/@wailsio/runtime/types/screens.d.ts +++ b/v3/internal/runtime/desktop/@wailsio/runtime/types/screens.d.ts @@ -14,6 +14,48 @@ export function GetPrimary(): Promise; * @returns {Promise} A promise that resolves with the current active screen. */ export function GetCurrent(): Promise; +export type Position = { + /** + * - The X coordinate. + */ + X: number; + /** + * - The Y coordinate. + */ + Y: number; +}; +export type Size = { + /** + * - The width. + */ + X: number; + /** + * - The height. + */ + Y: number; +}; +export type Rect = { + /** + * - The X coordinate of the top-left corner. + */ + X: number; + /** + * - The Y coordinate of the top-left corner. + */ + Y: number; + /** + * - The width of the rectangle. + */ + Width: number; + /** + * - The height of the rectangle. + */ + Height: number; +}; +/** + * The rotation of the screen. Can be one of 'Zero', 'Ninety', 'OneEighty', 'TwoSeventy'. + */ +export type Rotation = ('Zero' | 'Ninety' | 'OneEighty' | 'TwoSeventy'); export type Screen = { /** * - Unique identifier for the screen. diff --git a/v3/internal/runtime/desktop/@wailsio/runtime/types/window.d.ts b/v3/internal/runtime/desktop/@wailsio/runtime/types/window.d.ts index 4e008ccb..89805f73 100644 --- a/v3/internal/runtime/desktop/@wailsio/runtime/types/window.d.ts +++ b/v3/internal/runtime/desktop/@wailsio/runtime/types/window.d.ts @@ -28,16 +28,6 @@ export function SetSize(width: number, height: number): void; * Gets the size of the window. */ export function Size(): any; -export type Size = { - /** - * - The width. - */ - X: number; - /** - * - The height. - */ - Y: number; -}; /** * Sets the maximum size of the window. * @param {number} width - The maximum width of the window. @@ -148,35 +138,3 @@ export function GetZoomLevel(): any; * @param {number} zoomLevel - The zoom level to set. */ export function SetZoomLevel(zoomLevel: number): void; -export type Position = { - /** - * - The X coordinate. - */ - X: number; - /** - * - The Y coordinate. - */ - Y: number; -}; -export type Rect = { - /** - * - The X coordinate of the top-left corner. - */ - X: number; - /** - * - The Y coordinate of the top-left corner. - */ - Y: number; - /** - * - The width of the rectangle. - */ - Width: number; - /** - * - The height of the rectangle. - */ - Height: number; -}; -/** - * The rotation of the screen. Can be one of 'Zero', 'Ninety', 'OneEighty', 'TwoSeventy'. - */ -export type Rotation = ('Zero' | 'Ninety' | 'OneEighty' | 'TwoSeventy');