electron/spec-main/ambient.d.ts

41 lines
912 B
TypeScript
Raw Normal View History

2020-03-20 20:28:31 +00:00
declare let standardScheme: string;
declare namespace Electron {
interface Menu {
2020-04-02 23:07:56 +00:00
_executeCommand(event: any, id: number): void;
_menuWillShow(): void;
getAcceleratorTextAt(index: number): string;
}
interface MenuItem {
getDefaultRoleAccelerator(): Accelerator | undefined;
}
interface WebContents {
getOwnerBrowserWindow(): BrowserWindow;
getWebPreferences(): any;
}
2019-08-27 21:55:19 +00:00
interface Session {
destroy(): void;
}
// Experimental views API
class TopLevelWindow {
constructor(args: {show: boolean})
setContentView(view: View): void
}
class View {}
class WebContentsView {
constructor(options: BrowserWindowConstructorOptions)
}
namespace Main {
class TopLevelWindow extends Electron.TopLevelWindow {}
class View extends Electron.View {}
class WebContentsView extends Electron.WebContentsView {}
}
}
2019-08-28 20:54:50 +00:00
declare module 'dbus-native';