/** * Methods for interacting with ToDesktop application's menu. * * @remarks * This package exposes a number of methods for interacting with ToDesktop * application's menu. * @experimental * @public * @packageDocumentation */ import { Point, Rectangle, Display } from "@todesktop/client-electron-types"; import { type NamespaceEvents } from "./utils.js"; /** * The current absolute position of the mouse pointer. * * @returns The current absolute position of the mouse pointer. Note: DIP point, not a screen physical point. * @public */ export declare function getCursorScreenPoint(): Promise; /** * @returns The primary display. * @public */ export declare function getPrimaryDisplay(): Promise; /** * @returns An array of displays that are currently available. * @public */ export declare function getAllDisplays(): Promise; /** * @returns The display nearest the specified point. * @public */ export declare function getDisplayNearestPoint(point: Point): Promise; /** * @returns The display that most closely intersects the provided bounds. * @public */ export declare function getDisplayMatching(rect: Rectangle): Promise; /** * Converts a screen physical point to a screen DIP point. * The DPI scale is performed relative to the display containing the physical point. * * @public */ export declare function screenToDipPoint(point: Point): Promise; /** * Converts a screen DIP point to a screen physical point. * The DPI scale is performed relative to the display containing the DIP point. * * @public */ export declare function dipToScreenPoint(point: Point): Promise; /** * Converts a screen physical rect to a screen DIP rect. * The DPI scale is performed relative to the display nearest to `window`. * If `window` is null, scaling will be performed to the display nearest to `rect`. * * @returns * @public */ export declare function screenToDipRect(point: Point): Promise; /** * Converts a screen DIP rect to a screen physical rect. * The DPI scale is performed relative to the display nearest to `window`. * If `window` is null, scaling will be performed to the display nearest to `rect`. * * @returns * @public */ export declare function dipToScreenRect(point: Point): Promise; /** * @public */ export declare type ScreenEvents = NamespaceEvents<{ "display-added": (newDisplay: Display) => void; "display-removed": (oldDisplay: Display) => void; "display-metrics-changed": (display: Display, changedMetrics: string[]) => void; }>; export declare const on: (eventName: E, callback: NamespaceEvents<{ "display-added": (newDisplay: Display) => void; "display-removed": (oldDisplay: Display) => void; "display-metrics-changed": (display: Display, changedMetrics: string[]) => void; }>[E], args_0?: { ref?: import("@todesktop/client-util").InstanceRefObject; preventDefault?: boolean; }) => Promise<() => Promise>; /** * Unsubscribes all menu objects from the event name. * * @param options - ref: Reference for the Menu; eventName: The event name to unsubscribe from; * @returns Reference for the menu. * @public */ export declare const removeAllListeners: (eventName: E, args_0?: { ref?: import("@todesktop/client-util").InstanceRefObject; }) => Promise;