export interface TrayProxy { on(event: 'click' | 'balloon-click' | 'balloon-closed' | 'balloon-show' | 'drag-end' | 'drag-enter' | 'drag-leave' | 'drop', listener: Function): any; once(event: 'click' | 'balloon-click' | 'balloon-closed' | 'balloon-show' | 'drag-end' | 'drag-enter' | 'drag-leave' | 'drop', listener: Function): any; on(event: 'click', listener: (event: Event, bounds: Rectangle, position: Point) => void): any; once(event: 'click', listener: (event: Event, bounds: Rectangle, position: Point) => void): any; on(event: 'double-click', listener: (event: Event, bounds: Rectangle) => void): any; once(event: 'double-click', listener: (event: Event, bounds: Rectangle) => void): any; on(event: 'drop-files', listener: (event: Event, files: string[]) => void): any; once(event: 'drop-files', listener: (event: Event, files: string[]) => void): any; on(event: 'drop-text', listener: (event: Event, text: string) => void): any; once(event: 'drop-text', listener: (event: Event, text: string) => void): any; on(event: 'mouse-enter' | 'mouse-leave' | 'mouse-move' | 'right-click', listener: (event: Event, position: Point) => void): any; once(event: 'mouse-enter' | 'mouse-leave' | 'mouse-move' | 'right-click', listener: (event: Event, position: Point) => void): any; destroy(): void; /** * Sets when the tray's icon background becomes highlighted (in blue). Note: You * can use highlightMode with a BrowserWindow by toggling between 'never' and * 'always' modes when the window visibility changes. */ setHighlightMode(mode: 'selection' | 'always' | 'never'): void; /** * 图片可以来自于网络指定isWeb=true */ setImage(imageUrl: string, isWeb?: boolean): void; /** * Sets the image associated with this tray icon when pressed on macOS. */ /** * Sets the title displayed aside of the tray icon in the status bar (Support ANSI * colors). */ setTitle(title: string): void; /** * Sets the hover text for this tray icon. */ setToolTip(toolTip: string): void; setContextMenuTemplate(template: any[]): void; } export interface Rectangle { height: number; /** * The width of the rectangle (must be an integer) */ width: number; /** * The x coordinate of the origin of the rectangle (must be an integer) */ x: number; /** * The y coordinate of the origin of the rectangle (must be an integer) */ y: number; } export interface Point { x: number; y: number; }