/** * Interface to interact with the macOS dock. * * @public */ import { type InstanceRefObject } from "@todesktop/client-util"; import { type Ref } from "../invoke.js"; /** * Bounce this app icon in the dock. * * @see https://www.electronjs.org/docs/api/dock#dockbouncetype-macos * @returns An identifier representing the bounce executed. * @public */ export declare function bounce(kind: "informational" | "critical"): Promise; /** * Cancel the bounce action with identifier `id`. * * @see https://www.electronjs.org/docs/api/dock#dockcancelbounceid-macos * @public */ export declare function cancelBounce(id: number): Promise; /** * Hides the dock icon. * @see https://www.electronjs.org/docs/api/dock#dockhide-macos * @public */ export declare function hide(): Promise; /** * Shows the dock icon. * @see https://www.electronjs.org/docs/api/dock#dockshow-macos * @public */ export declare function show(): Promise; /** * Set this app's badge in the dock. * * @see https://www.electronjs.org/docs/api/dock#docksetbadgetext-macos * @public */ export declare function setBadge(label: string): Promise; /** * Get the currently set badge for this app in the dock. * * @see https://www.electronjs.org/docs/api/dock#dockgetbadge-macos * @public */ export declare function getBadge(): Promise; /** * Sets the `image` associated with this dock icon. * * @see https://www.electronjs.org/docs/latest/api/dock#dockseticonimage-macos * @example * ```typescript * import { * app, * nativeWindow, * nativeImage, * platform, * } from '@todesktop/client-core'; * * // You can convert canvas to a data URL (using `toDataURL`) * const dataURL = "data:image/png;base64,iVBORw0KGgo…"; * * const imgRef = await nativeImage.createFromDataURL(dataURL); * * if (platform.os.getOSPlatform() === "darwin") { * await app.dock.setIcon(imgRef); * } else { * // Windows and Linux * await nativeWindow.setIcon({}, imgRef); * } * ``` * * @public */ export declare function setIcon(...args: [InstanceRefObject]): Promise; /** * Gets the `menu` associated with this dock icon. * @see https://www.electronjs.org/docs/api/dock#docksetmenu-macos * @public */ export declare function getMenu(): Promise; /** * Sets the `menu` associated with this dock icon. * @see https://www.electronjs.org/docs/api/dock#dockgetmenu-macos * @public */ export declare function setMenu(menu: Ref): Promise; /** * @param isVisible - Whether the dock icon should be visible when no windows are open. Defaults to false. */ export declare function setVisibleWhenNoWindowsOpen(isVisible: boolean): any;