UNPKG

784 BTypeScriptView Raw
1/**
2 * Utilities to get taskbar position and consequently menubar's position
3 */
4/** */
5import { Tray } from 'electron';
6declare type TaskbarLocation = 'top' | 'bottom' | 'left' | 'right';
7/**
8 * Determine taskbard location: "top", "bottom", "left" or "right".
9 *
10 * Only tested on Windows for now, and only used in Windows.
11 *
12 * @param tray - The Electron Tray instance.
13 */
14export declare function taskbarLocation(tray: Tray): TaskbarLocation;
15declare type WindowPosition = 'trayCenter' | 'topRight' | 'trayBottomCenter' | 'bottomLeft' | 'bottomRight';
16/**
17 * Depending on where the taskbar is, determine where the window should be
18 * positioned.
19 *
20 * @param tray - The Electron Tray instance.
21 */
22export declare function getWindowPosition(tray: Tray): WindowPosition;
23export {};