API
Methods for interacting with ToDesktop application's menu.
Remarks
This package exposes a number of methods for interacting with ToDesktop application's menu.
Functions
dipToScreenPoint()
Converts a screen DIP point to a screen physical point. The DPI scale is performed relative to the display containing the DIP point.
Signature:
Parameters
Returns:
Promise<Electron.Point>
dipToScreenRect()
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
.
Signature:
Parameters
Returns:
Promise<Electron.Point>
getAllDisplays()
Signature:
Returns:
Promise<Electron.Display[]>
An array of displays that are currently available.
getCursorScreenPoint()
The current absolute position of the mouse pointer.
Signature:
Returns:
Promise<Electron.Point>
The current absolute position of the mouse pointer. Note: DIP point, not a screen physical point.
getDisplayMatching()
Signature:
Parameters
Returns:
Promise<Electron.Display>
The display that most closely intersects the provided bounds.
getDisplayNearestPoint()
Signature:
Parameters
Returns:
Promise<Electron.Display>
The display nearest the specified point.
getPrimaryDisplay()
Signature:
Returns:
Promise<Electron.Display>
The primary display.
screenToDipPoint()
Converts a screen physical point to a screen DIP point. The DPI scale is performed relative to the display containing the physical point.
Signature:
Parameters
Returns:
Promise<Electron.Point>
screenToDipRect()
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
.
Signature:
Parameters
Returns:
Promise<Electron.Point>
Variables
on
Signature:
removeAllListeners
Unsubscribes all menu objects from the event name.
Signature:
Type Aliases
TrayEvents
Signature: