menubar
Version:
high level way to create menubar desktop applications with electron
24 lines (23 loc) • 768 B
TypeScript
/**
* Utilities to get taskbar position and consequently menubar's position
*/
/** */
import { Tray } from 'electron';
type TaskbarLocation = 'top' | 'bottom' | 'left' | 'right';
/**
* Determine taskbard location: "top", "bottom", "left" or "right".
*
* Only tested on Windows for now, and only used in Windows.
*
* @param tray - The Electron Tray instance.
*/
export declare function taskbarLocation(tray: Tray): TaskbarLocation;
type WindowPosition = 'trayCenter' | 'topRight' | 'trayBottomCenter' | 'bottomLeft' | 'bottomRight';
/**
* Depending on where the taskbar is, determine where the window should be
* positioned.
*
* @param tray - The Electron Tray instance.
*/
export declare function getWindowPosition(tray: Tray): WindowPosition;
export {};