@wailsio/runtime v3.0.0-alpha.16

This commit is contained in:
Lea Anthony
2024-01-20 11:38:56 +11:00
parent a805d6c2b1
commit bcb390f611
5 changed files with 70 additions and 70 deletions
@@ -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",
@@ -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
@@ -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;
@@ -14,6 +14,48 @@ export function GetPrimary(): Promise<Screen>;
* @returns {Promise<Screen>} A promise that resolves with the current active screen.
*/
export function GetCurrent(): Promise<Screen>;
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.
@@ -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');