mod: ui
This commit is contained in:
@@ -5,6 +5,10 @@
|
||||
// @ts-ignore: Unused imports
|
||||
import { Call as $Call, CancellablePromise as $CancellablePromise, Create as $Create } from "@wailsio/runtime";
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
||||
// @ts-ignore: Unused imports
|
||||
import * as $models from "./models.js";
|
||||
|
||||
export function GetAutoAccept(): $CancellablePromise<boolean> {
|
||||
return $Call.ByID(2605668438);
|
||||
}
|
||||
@@ -29,6 +33,12 @@ export function GetVersion(): $CancellablePromise<string> {
|
||||
return $Call.ByID(3578438023);
|
||||
}
|
||||
|
||||
export function GetWindowState(): $CancellablePromise<$models.WindowState> {
|
||||
return $Call.ByID(341414414).then(($result: any) => {
|
||||
return $$createType0($result);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Save 保存配置到磁盘
|
||||
*/
|
||||
@@ -54,3 +64,10 @@ export function SetSaveHistory(saveHistory: boolean): $CancellablePromise<void>
|
||||
export function SetSavePath(savePath: string): $CancellablePromise<void> {
|
||||
return $Call.ByID(3805718491, savePath);
|
||||
}
|
||||
|
||||
export function SetWindowState(state: $models.WindowState): $CancellablePromise<void> {
|
||||
return $Call.ByID(4007191514, state);
|
||||
}
|
||||
|
||||
// Private type creation functions
|
||||
const $$createType0 = $models.WindowState.createFrom;
|
||||
|
||||
@@ -5,3 +5,7 @@ import * as Config from "./config.js";
|
||||
export {
|
||||
Config
|
||||
};
|
||||
|
||||
export {
|
||||
WindowState
|
||||
} from "./models.js";
|
||||
|
||||
46
frontend/bindings/mesh-drop/internal/config/models.ts
Normal file
46
frontend/bindings/mesh-drop/internal/config/models.ts
Normal file
@@ -0,0 +1,46 @@
|
||||
// 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";
|
||||
|
||||
/**
|
||||
* WindowState 定义窗口状态
|
||||
*/
|
||||
export class WindowState {
|
||||
"Width": number;
|
||||
"Height": number;
|
||||
"X": number;
|
||||
"Y": number;
|
||||
"Maximised": boolean;
|
||||
|
||||
/** Creates a new WindowState instance. */
|
||||
constructor($$source: Partial<WindowState> = {}) {
|
||||
if (!("Width" in $$source)) {
|
||||
this["Width"] = 0;
|
||||
}
|
||||
if (!("Height" in $$source)) {
|
||||
this["Height"] = 0;
|
||||
}
|
||||
if (!("X" in $$source)) {
|
||||
this["X"] = 0;
|
||||
}
|
||||
if (!("Y" in $$source)) {
|
||||
this["Y"] = 0;
|
||||
}
|
||||
if (!("Maximised" in $$source)) {
|
||||
this["Maximised"] = false;
|
||||
}
|
||||
|
||||
Object.assign(this, $$source);
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a new WindowState instance from a string or object.
|
||||
*/
|
||||
static createFrom($$source: any = {}): WindowState {
|
||||
let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source;
|
||||
return new WindowState($$parsedSource as Partial<WindowState>);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user