5
0
mirror of https://github.com/wailsapp/wails.git synced 2025-05-02 19:50:15 +08:00
wails/v2/internal/frontend/runtime/wrapper/runtime.d.ts
Lea Anthony f059c35d9e
Feature: WindowToggleMaximise (#1159)
* [windows] Add WindowToggleMaximise

* Add mac support

* Update docs

* [linux] Toggle Maximise
2022-02-18 20:28:16 +11:00

88 lines
1.6 KiB
TypeScript

export interface Position {
x: number;
y: number;
}
export interface Size {
w: number;
h: number;
}
export interface RGBA {
r: number;
g: number;
b: number;
a: number;
}
export interface runtime {
EventsEmit(eventName: string, data?: any): void;
EventsOn(eventName: string, callback: (data?: any) => void): void;
EventsOnMultiple(eventName: string, callback: (data?: any) => void, maxCallbacks: number): void;
EventsOnce(eventName: string, callback: (data?: any) => void): void;
LogTrace(message: string): void;
LogDebug(message: string): void;
LogError(message: string): void;
LogFatal(message: string): void;
LogInfo(message: string): void;
LogWarning(message: string): void;
WindowReload(): void;
WindowCenter(): void;
WindowSetTitle(title: string): void;
WindowFullscreen(): void;
WindowUnFullscreen(): void;
WindowSetSize(width: number, height: number): Promise<Size>;
WindowGetSize(): Promise<Size>;
WindowSetMaxSize(width: number, height: number): void;
WindowSetMinSize(width: number, height: number): void;
WindowSetPosition(x: number, y: number): void;
WindowGetPosition(): Promise<Position>;
WindowHide(): void;
WindowShow(): void;
WindowMaximise(): void;
WindowToggleMaximise(): void;
WindowUnmaximise(): void;
WindowMinimise(): void;
WindowUnminimise(): void;
WindowSetRGBA(rgba: RGBA): void;
BrowserOpenURL(url: string): void;
Quit(): void;
}
declare global {
interface Window {
runtime: runtime;
}
}