@lynx-js/lynxtron / Dock
Dock
构造函数
new Dock()
返回
方法
bounce() macOS
an ID representing the request.
When critical is passed, the dock icon will bounce until either the
application becomes active or the request is canceled.
When informational is passed, the dock icon will bounce for one second.
However, the request remains active until either the application becomes active
or the request is canceled.
This method can only be used while the app is not focused; when the app is focused it will return -1.
参数
返回
number
定义于
cancelBounce() macOS
Cancel the bounce of id.
参数
返回
void
定义于
downloadFinished() macOS
Bounces the Downloads stack if the filePath is inside the Downloads folder.
参数
返回
void
定义于
getBadge() macOS
The badge string of the dock.
返回
string
定义于
getMenu() macOS
The application's dock menu.
返回
null | Menu
定义于
hide() macOS
Hides the dock icon.
返回
void
定义于
isVisible() macOS
Whether the dock icon is visible.
返回
boolean
定义于
setBadge() macOS
Sets the string to be displayed in the dock’s badging area.
You need to ensure that your application has the permission to display notifications for this method to work.
参数
返回
void
定义于
setIcon() macOS
Sets the image associated with this dock icon.
参数
返回
void
定义于
setMenu() macOS
Sets the application's dock menu.
参数
返回
void
定义于
show() macOS
Resolves when the dock icon is shown.
返回
Promise<void>
定义于