UNPKG

@kui-shell/core

Version:

An Electron-based shell for cloud-native development

29 lines (28 loc) 1.02 kB
import { Screen } from 'electron'; import ISubwindowPrefs from '../models/SubwindowPrefs'; type BW = { getAllWindows: () => any[]; }; /** Open a new Electron window */ export declare function createWindow(noHeadless: boolean, env: Record<any, any>, executeThisArgvPlease?: string | string[], subwindowPlease?: boolean, subwindowPrefs?: ISubwindowPrefs, secondary?: boolean, isForPopup?: boolean): Promise<void>; /** * Strip off the command to be executed from the given argv * */ interface Command { argv: string[]; subwindowPlease: boolean; subwindowPrefs: ISubwindowPrefs; } export declare const getCommand: (argv: string[], cwd: string, env: Record<any, any>, screen: () => Promise<{ screen: Screen; BrowserWindow: BW; }>) => Command; /** * Spawn electron * */ export declare function initElectron(command?: string[], { isRunningHeadless }?: { isRunningHeadless?: boolean; }, subwindowPlease?: boolean, subwindowPrefs?: ISubwindowPrefs, isForPopup?: boolean): Promise<void>; export {};