// Types for node-neutralino package import { Manifest } from "./types/api/updater"; import { Envs, ExecCommandOptions, ExecCommandResult, FolderDialogOptions, KnownPath, OpenDialogOptions, SaveDialogOptions, SpawnedProcess, TrayOptions, } from "./types/api/os"; import { CopyOptions, DirectoryEntry, DirectoryReaderOptions, FileReaderOptions, OpenedFile, Stats, Watcher, } from "./types/api/filesystem"; import { ExtensionStats } from "./types/api/extensions"; import { CPUInfo, Display, KernelInfo, MemoryInfo, MousePosition, OSInfo, } from "./types/api/computer"; import { ClipboardImage } from "./types/api/clipboard"; import { WindowOptions, WindowPosOptions, WindowSizeOptions, } from "./types/api/window"; import { ClipboardFormat, Icon, LoggerType, MessageBoxChoice, } from "./types/enums"; declare class NeutralinoApp { constructor({ url, windowOptions, }: { url: string; windowOptions?: WindowOptions; }); init(): void; close(): void; // ----------------- Native Methods ----------------- exit(code?: number): Promise; killProcess(): Promise; getConfig(): Promise; broadcast(event: string, data?: any): Promise; readProcessInput(readAll?: boolean): Promise; writeProcessOutput(data: string): Promise; writeProcessError(data: string): Promise; // ------------ clipboard ------------ clipboard: { getFormat(): Promise; readText(): Promise; readImage(): Promise; writeText(data: string): Promise; writeImage(image: ClipboardImage): Promise; clear(): Promise; }; // ------------ computer ------------ computer: { getMemoryInfo(): Promise; getArch(): Promise; getKernelInfo(): Promise; getOSInfo(): Promise; getCPUInfo(): Promise; getDisplays(): Promise; getMousePosition(): Promise; }; // ------------ custom ------------ custom: { getMethods(): Promise; }; // ------------ debug ------------ debug: { log(message: string, type?: LoggerType): Promise; }; // ------------ events ------------ events: { broadcast(event: string, data?: any): Promise; on(event: string, handler: (ev: CustomEvent) => void): Promise; off(event: string, handler: (ev: CustomEvent) => void): Promise; dispatch(event: string, data?: any): Promise; }; // ------------ extensions ------------ extensions: { dispatch(extensionId: string, event: string, data?: any): Promise; broadcast(event: string, data?: any): Promise; getStats(): Promise; }; // ------------ filesystem ------------ filesystem: { createDirectory(path: string): Promise; remove(path: string): Promise; writeFile(path: string, data: string): Promise; appendFile(path: string, data: string): Promise; writeBinaryFile(path: string, data: ArrayBuffer): Promise; appendBinaryFile(path: string, data: ArrayBuffer): Promise; readFile(path: string, options?: FileReaderOptions): Promise; readBinaryFile( path: string, options?: FileReaderOptions ): Promise; openFile(path: string): Promise; createWatcher(path: string): Promise; removeWatcher(id: number): Promise; getWatchers(): Promise; updateOpenedFile(id: number, event: string, data?: any): Promise; getOpenedFileInfo(id: number): Promise; readDirectory( path: string, options?: DirectoryReaderOptions ): Promise; copy( source: string, destination: string, options?: CopyOptions ): Promise; move(source: string, destination: string): Promise; getStats(path: string): Promise; }; // ------------ os ------------ os: { execCommand( command: string, options?: ExecCommandOptions ): Promise; spawnProcess(command: string, cwd?: string): Promise; updateSpawnedProcess(id: number, event: string, data?: any): Promise; getSpawnedProcesses(): Promise; getEnv(key: string): Promise; getEnvs(): Promise; showOpenDialog( title?: string, options?: OpenDialogOptions ): Promise; showFolderDialog( title?: string, options?: FolderDialogOptions ): Promise; showSaveDialog( title?: string, options?: SaveDialogOptions ): Promise; showNotification( title: string, content: string, icon?: Icon ): Promise; showMessageBox( title: string, content: string, choice?: MessageBoxChoice, icon?: Icon ): Promise; setTray(options: TrayOptions): Promise; open(url: string): Promise; getPath(name: KnownPath): Promise; }; // ------------ storage ------------ storage: { setData(key: string, data: string): Promise; getData(key: string): Promise; getKeys(): Promise; }; // ------------ updater ------------ updater: { checkForUpdates(url: string): Promise; install(manifest: Manifest): Promise; }; // ------------ window ------------ window: { setTitle(title: string): Promise; getTitle(): Promise; maximize(): Promise; unmaximize(): Promise; isMaximized(): Promise; minimize(): Promise; setFullScreen(): Promise; exitFullScreen(): Promise; isFullScreen(): Promise; show(): Promise; hide(): Promise; isVisible(): Promise; focus(): Promise; setIcon(icon: string): Promise; move(x: number, y: number): Promise; center(): Promise; setDraggableRegion(domElementOrId: string | HTMLElement): Promise; unsetDraggableRegion(domElementOrId: string | HTMLElement): Promise; setSize(options: WindowSizeOptions): Promise; getSize(): Promise; getPosition(): Promise; setAlwaysOnTop(onTop: boolean): Promise; }; } export default NeutralinoApp;