WGShare.Client.Electron/src/render.d.ts

46 lines
1.7 KiB
TypeScript

// electron-env.d.ts
export interface IElectronAPI {
startSignalr: (user: any) => Promise<void>;
offSignalr: () => Promise<void>;
onStop: () => Promise<void>;
onInvoke: (str: string, data: any) => Promise<void>;
changeLocalStorage: (callBack: Function) => void;
onOtherSignalr: (callBack: Function) => void;
onSignalr: (callBack: Function) => void;
setMainWindowSize: (config: any) => void;
getWindowSize: () => any;
setViewStatus: (status: 'quit' | 'maximize' | 'minimize' | 'unmaximize' | 'hide' | 'show') => void;
getIsMaximized: () => Promise<boolean>;
getAppPath: () => Promise<string>;
setWriteText: (text: string) => void;
onQuit: (callBack: Function) => void;
onUpdate: (callBack: Function) => void;
joinNotification: (data: { name: string, body: string }) => void;
onDownload: (data: string) => void
selectFilePath: (data?: any) => void
onFilePath: (callBack: Function) => void;
getSources: () => any;
quit: (bool) => any;
downFile: (callBack: Function) => void;
quitAndInstall: (callBack: Function) => void;
isOpenWindows: (callBack: Function) => void;
setEnv: (str: string) => any;
getVersion: () => Promise<string>;
isVisible: () => Promise<string>;
setRegistry: (uuid: string) => any;
getRegistry: () => any;
createChildWindow: (str: string) => void;
setChildWindow: (config: any) => void;
setChildWindowShow: (config: any) => void;
closeChildWindow: (key: string) => void;
setPosition: (data: ang) => void;
windowHandleMessage: (data: any) => {}
windowHandleMessageCallBack: (callBack: Function) => void;
}
declare global {
interface Window {
electron: IElectronAPI;
}
}