Archived
Private
Public Access
1
0

Finished WindowAPI for the frontend

This commit is contained in:
2022-10-24 22:57:17 +02:00
parent 0fd41608b9
commit e27992ffdb
246 changed files with 1067505 additions and 39 deletions

View File

@@ -0,0 +1,11 @@
import { Notification } from "../Notification.js";
import { PopupData } from "../PopupData.js";
export interface Actions {
openWindow(identifier: string, args?: string[], asPopup?: boolean): Promise<number>;
closeWindow(uuid: number): Promise<boolean>;
sendDataToWindow(uuid: number, data: any): Promise<boolean>;
close(): Promise<void>;
focus(): Promise<void>;
notification(notification: Notification): Promise<void>;
openPopup<T>(data: PopupData): Promise<T>;
}

View File

@@ -0,0 +1,2 @@
export {};
//# sourceMappingURL=Actions.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"Actions.js","sourceRoot":"","sources":["../../../src/helper/functions/Actions.ts"],"names":[],"mappings":""}

View File

@@ -0,0 +1,15 @@
export interface Getters {
title(): Promise<string>;
size(): Promise<{
width: number;
height: number;
}>;
position(): Promise<{
x: number;
y: number;
}>;
maximized(): Promise<boolean>;
minimized(): Promise<boolean>;
draggable(): Promise<boolean>;
resizable(): Promise<boolean>;
}

View File

@@ -0,0 +1,2 @@
export {};
//# sourceMappingURL=Getter.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"Getter.js","sourceRoot":"","sources":["../../../src/helper/functions/Getter.ts"],"names":[],"mappings":""}

View File

@@ -0,0 +1,15 @@
export interface Setters {
title(value: string): void;
size(value: {
width: number;
height: number;
}): void;
position(value: {
x: number;
y: number;
}): void;
maximized(value: boolean): void;
minimized(value: boolean): void;
draggable(value: boolean): void;
resizable(value: boolean): void;
}

View File

@@ -0,0 +1,2 @@
export {};
//# sourceMappingURL=Setter.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"Setter.js","sourceRoot":"","sources":["../../../src/helper/functions/Setter.ts"],"names":[],"mappings":""}

View File

@@ -0,0 +1,11 @@
import { WindowEventName } from "../PackageTypes.js";
import { WindowEvent } from "../EventData.js";
export declare type WindowEventListener = (event: WindowEvent) => void;
export declare abstract class WindowEventEmitter {
protected _events: {
[name: string]: WindowEventListener[];
};
abstract on(name: WindowEventName, listener: WindowEventListener): void;
abstract removeListener(name: WindowEventName, listenerToRemove: WindowEventListener): void;
abstract emit(name: WindowEventName, data: WindowEvent): void;
}

View File

@@ -0,0 +1,6 @@
export class WindowEventEmitter {
constructor() {
this._events = {};
}
}
//# sourceMappingURL=WindowEventEmitter.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"WindowEventEmitter.js","sourceRoot":"","sources":["../../../src/helper/functions/WindowEventEmitter.ts"],"names":[],"mappings":"AAKA,MAAM,OAAgB,kBAAkB;IAAxC;QAEc,YAAO,GAA4C,EAAE,CAAC;IAMpE,CAAC;CAAA"}