UNPKG

@sinotron/core

Version:

Simple framework for Typescript Electron projects

38 lines (37 loc) 914 B
import { BrowserWindow, OpenDevToolsOptions } from 'electron'; export declare class WinHelper { private readonly win; constructor(win: BrowserWindow); openDevTools(opts?: OpenDevToolsOptions): void; /** * Set the window width. * * @param width */ setWidth(width: number): this; /** * Set the window height. * * @param height */ setHeight(height: number): this; /** * Set the window size. * * @param width * @param height */ setSize(width: number, height: number): this; /** * Broadcast a channel message using webContents.send(...) * * @param channelName * @param args */ sendChannelMessage(channelName: string, ...args: any[]): void; } /** * Get typed property of the global window object. * @param prop */ export declare function _windowProp<T>(prop: string): T | undefined;