UNPKG

attached-windows

Version:

Using Chrome extension API attach multiple normal and/or popup windows together that behave like a single window.

51 lines (50 loc) 1.45 kB
export interface AttachedWindowsContainer { top: number; left: number; width: number; height: number; state: 'normal' | 'minimized'; } export interface AttachedWindowsWindow { id: number; name?: any; widthFraction: number; isPrimary?: boolean; isHidden?: boolean; type: 'normal' | 'popup'; bounds: { top: number; left: number; width: number; height: number; state: 'normal' | 'minimized'; }; } export interface AttachedWindowsConfiguration { container: AttachedWindowsContainer; windows: { id: number; name?: any; widthFraction: number; isPrimary?: boolean; isHidden?: boolean; type: 'normal' | 'popup'; }[]; } declare class AttachedWindows { static isBusy: boolean; static onRemoveAttachedWindow?: Function; static terminate({ closeWindows, closePrimary }?: { closeWindows?: boolean; closePrimary?: boolean; }): Promise<{ id: number; isPrimary?: boolean | undefined; }[]>; static container: AttachedWindowsContainer; static windows: AttachedWindowsWindow[]; static calculateBounds(): void; static syncPositions(ignoreCheck?: boolean): Promise<boolean>; static initialize({ container, windows }: AttachedWindowsConfiguration): Promise<void>; } export default AttachedWindows;