import type { MenuItem } from "../api"; /** * 托盘选项 */ export interface TrayOptions { /** 图标文件路径(PNG/ICO) */ icon: string; /** 鼠标悬停提示文本 */ tooltip?: string; /** 托盘标题(macOS/Linux) */ title?: string; /** 右键菜单 */ menu?: MenuItem[]; } /** * 气泡通知选项(暂未实现) */ export interface BalloonOptions { /** 通知标题 */ title: string; /** 通知内容 */ content: string; /** 图标路径 */ icon?: string; } /** * 托盘事件类型 */ export type TrayEventType = "click" | "right-click" | "double-click"; /** * Tray 实例类 */ export declare class Tray { private id; constructor(id: number); /** 获取托盘 ID */ getId(): number; /** 设置鼠标悬停提示文本 */ setToolTip(text: string): Promise; /** 设置托盘标题(macOS/Linux) */ setTitle(title: string): Promise; /** 设置右键菜单 */ setMenu(template: MenuItem[]): Promise; /** 设置托盘图标 */ setImage(icon: string): Promise; /** 销毁托盘图标 */ destroy(): Promise; /** 显示气泡通知(暂未实现) */ displayBalloon(_options: BalloonOptions): Promise; /** 监听托盘事件 */ on(event: TrayEventType, callback: (data: { trayId: number; button: string; }) => void): () => void; } /** * 托盘 API 接口 */ export interface TrayAPI { /** 创建系统托盘图标 */ create: (options: TrayOptions) => Promise; } /** * 系统托盘相关 API */ export declare const tray: TrayAPI; //# sourceMappingURL=tray.d.ts.map