完成基本功能

This commit is contained in:
zyj
2026-03-09 16:46:15 +08:00
parent d8851e7698
commit f55dd8ca03
57 changed files with 16098 additions and 6 deletions

View File

@@ -0,0 +1,452 @@
// @ts-check
// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL
// This file is automatically generated. DO NOT EDIT
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore: Unused imports
import { Create as $Create } from "@wailsio/runtime";
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore: Unused imports
import * as slog$0 from "../../../../../../log/slog/models.js";
export class App {
/**
* Creates a new App instance.
* @param {Partial<App>} [$$source = {}] - The source object to create the App.
*/
constructor($$source = {}) {
if (!("Window" in $$source)) {
/**
* Manager pattern for organized API
* @member
* @type {WindowManager | null}
*/
this["Window"] = null;
}
if (!("ContextMenu" in $$source)) {
/**
* @member
* @type {ContextMenuManager | null}
*/
this["ContextMenu"] = null;
}
if (!("KeyBinding" in $$source)) {
/**
* @member
* @type {KeyBindingManager | null}
*/
this["KeyBinding"] = null;
}
if (!("Browser" in $$source)) {
/**
* @member
* @type {BrowserManager | null}
*/
this["Browser"] = null;
}
if (!("Env" in $$source)) {
/**
* @member
* @type {EnvironmentManager | null}
*/
this["Env"] = null;
}
if (!("Dialog" in $$source)) {
/**
* @member
* @type {DialogManager | null}
*/
this["Dialog"] = null;
}
if (!("Event" in $$source)) {
/**
* @member
* @type {EventManager | null}
*/
this["Event"] = null;
}
if (!("Menu" in $$source)) {
/**
* @member
* @type {MenuManager | null}
*/
this["Menu"] = null;
}
if (!("Screen" in $$source)) {
/**
* @member
* @type {ScreenManager | null}
*/
this["Screen"] = null;
}
if (!("Clipboard" in $$source)) {
/**
* @member
* @type {ClipboardManager | null}
*/
this["Clipboard"] = null;
}
if (!("SystemTray" in $$source)) {
/**
* @member
* @type {SystemTrayManager | null}
*/
this["SystemTray"] = null;
}
if (!("Logger" in $$source)) {
/**
* @member
* @type {slog$0.Logger | null}
*/
this["Logger"] = null;
}
Object.assign(this, $$source);
}
/**
* Creates a new App instance from a string or object.
* @param {any} [$$source = {}]
* @returns {App}
*/
static createFrom($$source = {}) {
const $$createField0_0 = $$createType1;
const $$createField1_0 = $$createType3;
const $$createField2_0 = $$createType5;
const $$createField3_0 = $$createType7;
const $$createField4_0 = $$createType9;
const $$createField5_0 = $$createType11;
const $$createField6_0 = $$createType13;
const $$createField7_0 = $$createType15;
const $$createField8_0 = $$createType17;
const $$createField9_0 = $$createType19;
const $$createField10_0 = $$createType21;
const $$createField11_0 = $$createType23;
let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source;
if ("Window" in $$parsedSource) {
$$parsedSource["Window"] = $$createField0_0($$parsedSource["Window"]);
}
if ("ContextMenu" in $$parsedSource) {
$$parsedSource["ContextMenu"] = $$createField1_0($$parsedSource["ContextMenu"]);
}
if ("KeyBinding" in $$parsedSource) {
$$parsedSource["KeyBinding"] = $$createField2_0($$parsedSource["KeyBinding"]);
}
if ("Browser" in $$parsedSource) {
$$parsedSource["Browser"] = $$createField3_0($$parsedSource["Browser"]);
}
if ("Env" in $$parsedSource) {
$$parsedSource["Env"] = $$createField4_0($$parsedSource["Env"]);
}
if ("Dialog" in $$parsedSource) {
$$parsedSource["Dialog"] = $$createField5_0($$parsedSource["Dialog"]);
}
if ("Event" in $$parsedSource) {
$$parsedSource["Event"] = $$createField6_0($$parsedSource["Event"]);
}
if ("Menu" in $$parsedSource) {
$$parsedSource["Menu"] = $$createField7_0($$parsedSource["Menu"]);
}
if ("Screen" in $$parsedSource) {
$$parsedSource["Screen"] = $$createField8_0($$parsedSource["Screen"]);
}
if ("Clipboard" in $$parsedSource) {
$$parsedSource["Clipboard"] = $$createField9_0($$parsedSource["Clipboard"]);
}
if ("SystemTray" in $$parsedSource) {
$$parsedSource["SystemTray"] = $$createField10_0($$parsedSource["SystemTray"]);
}
if ("Logger" in $$parsedSource) {
$$parsedSource["Logger"] = $$createField11_0($$parsedSource["Logger"]);
}
return new App(/** @type {Partial<App>} */($$parsedSource));
}
}
/**
* BrowserManager manages browser-related operations
*/
export class BrowserManager {
/**
* Creates a new BrowserManager instance.
* @param {Partial<BrowserManager>} [$$source = {}] - The source object to create the BrowserManager.
*/
constructor($$source = {}) {
Object.assign(this, $$source);
}
/**
* Creates a new BrowserManager instance from a string or object.
* @param {any} [$$source = {}]
* @returns {BrowserManager}
*/
static createFrom($$source = {}) {
let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source;
return new BrowserManager(/** @type {Partial<BrowserManager>} */($$parsedSource));
}
}
/**
* ClipboardManager manages clipboard operations
*/
export class ClipboardManager {
/**
* Creates a new ClipboardManager instance.
* @param {Partial<ClipboardManager>} [$$source = {}] - The source object to create the ClipboardManager.
*/
constructor($$source = {}) {
Object.assign(this, $$source);
}
/**
* Creates a new ClipboardManager instance from a string or object.
* @param {any} [$$source = {}]
* @returns {ClipboardManager}
*/
static createFrom($$source = {}) {
let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source;
return new ClipboardManager(/** @type {Partial<ClipboardManager>} */($$parsedSource));
}
}
/**
* ContextMenuManager manages all context menu operations
*/
export class ContextMenuManager {
/**
* Creates a new ContextMenuManager instance.
* @param {Partial<ContextMenuManager>} [$$source = {}] - The source object to create the ContextMenuManager.
*/
constructor($$source = {}) {
Object.assign(this, $$source);
}
/**
* Creates a new ContextMenuManager instance from a string or object.
* @param {any} [$$source = {}]
* @returns {ContextMenuManager}
*/
static createFrom($$source = {}) {
let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source;
return new ContextMenuManager(/** @type {Partial<ContextMenuManager>} */($$parsedSource));
}
}
/**
* DialogManager manages dialog-related operations
*/
export class DialogManager {
/**
* Creates a new DialogManager instance.
* @param {Partial<DialogManager>} [$$source = {}] - The source object to create the DialogManager.
*/
constructor($$source = {}) {
Object.assign(this, $$source);
}
/**
* Creates a new DialogManager instance from a string or object.
* @param {any} [$$source = {}]
* @returns {DialogManager}
*/
static createFrom($$source = {}) {
let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source;
return new DialogManager(/** @type {Partial<DialogManager>} */($$parsedSource));
}
}
/**
* EnvironmentManager manages environment-related operations
*/
export class EnvironmentManager {
/**
* Creates a new EnvironmentManager instance.
* @param {Partial<EnvironmentManager>} [$$source = {}] - The source object to create the EnvironmentManager.
*/
constructor($$source = {}) {
Object.assign(this, $$source);
}
/**
* Creates a new EnvironmentManager instance from a string or object.
* @param {any} [$$source = {}]
* @returns {EnvironmentManager}
*/
static createFrom($$source = {}) {
let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source;
return new EnvironmentManager(/** @type {Partial<EnvironmentManager>} */($$parsedSource));
}
}
/**
* EventManager manages event-related operations
*/
export class EventManager {
/**
* Creates a new EventManager instance.
* @param {Partial<EventManager>} [$$source = {}] - The source object to create the EventManager.
*/
constructor($$source = {}) {
Object.assign(this, $$source);
}
/**
* Creates a new EventManager instance from a string or object.
* @param {any} [$$source = {}]
* @returns {EventManager}
*/
static createFrom($$source = {}) {
let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source;
return new EventManager(/** @type {Partial<EventManager>} */($$parsedSource));
}
}
/**
* KeyBindingManager manages all key binding operations
*/
export class KeyBindingManager {
/**
* Creates a new KeyBindingManager instance.
* @param {Partial<KeyBindingManager>} [$$source = {}] - The source object to create the KeyBindingManager.
*/
constructor($$source = {}) {
Object.assign(this, $$source);
}
/**
* Creates a new KeyBindingManager instance from a string or object.
* @param {any} [$$source = {}]
* @returns {KeyBindingManager}
*/
static createFrom($$source = {}) {
let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source;
return new KeyBindingManager(/** @type {Partial<KeyBindingManager>} */($$parsedSource));
}
}
/**
* MenuManager manages menu-related operations
*/
export class MenuManager {
/**
* Creates a new MenuManager instance.
* @param {Partial<MenuManager>} [$$source = {}] - The source object to create the MenuManager.
*/
constructor($$source = {}) {
Object.assign(this, $$source);
}
/**
* Creates a new MenuManager instance from a string or object.
* @param {any} [$$source = {}]
* @returns {MenuManager}
*/
static createFrom($$source = {}) {
let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source;
return new MenuManager(/** @type {Partial<MenuManager>} */($$parsedSource));
}
}
export class ScreenManager {
/**
* Creates a new ScreenManager instance.
* @param {Partial<ScreenManager>} [$$source = {}] - The source object to create the ScreenManager.
*/
constructor($$source = {}) {
Object.assign(this, $$source);
}
/**
* Creates a new ScreenManager instance from a string or object.
* @param {any} [$$source = {}]
* @returns {ScreenManager}
*/
static createFrom($$source = {}) {
let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source;
return new ScreenManager(/** @type {Partial<ScreenManager>} */($$parsedSource));
}
}
/**
* SystemTrayManager manages system tray-related operations
*/
export class SystemTrayManager {
/**
* Creates a new SystemTrayManager instance.
* @param {Partial<SystemTrayManager>} [$$source = {}] - The source object to create the SystemTrayManager.
*/
constructor($$source = {}) {
Object.assign(this, $$source);
}
/**
* Creates a new SystemTrayManager instance from a string or object.
* @param {any} [$$source = {}]
* @returns {SystemTrayManager}
*/
static createFrom($$source = {}) {
let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source;
return new SystemTrayManager(/** @type {Partial<SystemTrayManager>} */($$parsedSource));
}
}
/**
* WindowManager manages all window-related operations
*/
export class WindowManager {
/**
* Creates a new WindowManager instance.
* @param {Partial<WindowManager>} [$$source = {}] - The source object to create the WindowManager.
*/
constructor($$source = {}) {
Object.assign(this, $$source);
}
/**
* Creates a new WindowManager instance from a string or object.
* @param {any} [$$source = {}]
* @returns {WindowManager}
*/
static createFrom($$source = {}) {
let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source;
return new WindowManager(/** @type {Partial<WindowManager>} */($$parsedSource));
}
}
// Private type creation functions
const $$createType0 = WindowManager.createFrom;
const $$createType1 = $Create.Nullable($$createType0);
const $$createType2 = ContextMenuManager.createFrom;
const $$createType3 = $Create.Nullable($$createType2);
const $$createType4 = KeyBindingManager.createFrom;
const $$createType5 = $Create.Nullable($$createType4);
const $$createType6 = BrowserManager.createFrom;
const $$createType7 = $Create.Nullable($$createType6);
const $$createType8 = EnvironmentManager.createFrom;
const $$createType9 = $Create.Nullable($$createType8);
const $$createType10 = DialogManager.createFrom;
const $$createType11 = $Create.Nullable($$createType10);
const $$createType12 = EventManager.createFrom;
const $$createType13 = $Create.Nullable($$createType12);
const $$createType14 = MenuManager.createFrom;
const $$createType15 = $Create.Nullable($$createType14);
const $$createType16 = ScreenManager.createFrom;
const $$createType17 = $Create.Nullable($$createType16);
const $$createType18 = ClipboardManager.createFrom;
const $$createType19 = $Create.Nullable($$createType18);
const $$createType20 = SystemTrayManager.createFrom;
const $$createType21 = $Create.Nullable($$createType20);
const $$createType22 = slog$0.Logger.createFrom;
const $$createType23 = $Create.Nullable($$createType22);