@tauri-apps/api
Advanced tools
Comparing version 2.0.0-beta.9 to 2.0.0-beta.10
{ | ||
"name": "@tauri-apps/api", | ||
"version": "2.0.0-beta.9", | ||
"version": "2.0.0-beta.10", | ||
"description": "Tauri API definitions", | ||
@@ -5,0 +5,0 @@ "funding": { |
@@ -1472,3 +1472,14 @@ /** | ||
declare function availableMonitors(): Promise<Monitor[]>; | ||
export { Window, CloseRequestedEvent, getCurrent, getAll, LogicalSize, PhysicalSize, LogicalPosition, PhysicalPosition, UserAttentionType, Effect, EffectState, currentMonitor, primaryMonitor, availableMonitors }; | ||
/** | ||
* Get the cursor position relative to the top-left hand corner of the desktop. | ||
* | ||
* Note that the top-left hand corner of the desktop is not necessarily the same as the screen. | ||
* If the user uses a desktop with multiple monitors, | ||
* the top-left hand corner of the desktop is the top-left hand corner of the main monitor on Windows and macOS | ||
* or the top-left of the leftmost monitor on X11. | ||
* | ||
* The coordinates can be negative if the top-left hand corner of the window is outside of the visible screen region. | ||
*/ | ||
declare function cursorPosition(): Promise<PhysicalPosition>; | ||
export { Window, CloseRequestedEvent, getCurrent, getAll, LogicalSize, PhysicalSize, LogicalPosition, PhysicalPosition, UserAttentionType, Effect, EffectState, currentMonitor, primaryMonitor, availableMonitors, cursorPosition }; | ||
export type { Effects, Theme, TitleBarStyle, ScaleFactorChanged, WindowOptions, Color, DragDropEvent, DragDropPayload }; |
@@ -1803,3 +1803,16 @@ import { PhysicalPosition, PhysicalSize } from './dpi.js'; | ||
} | ||
/** | ||
* Get the cursor position relative to the top-left hand corner of the desktop. | ||
* | ||
* Note that the top-left hand corner of the desktop is not necessarily the same as the screen. | ||
* If the user uses a desktop with multiple monitors, | ||
* the top-left hand corner of the desktop is the top-left hand corner of the main monitor on Windows and macOS | ||
* or the top-left of the leftmost monitor on X11. | ||
* | ||
* The coordinates can be negative if the top-left hand corner of the window is outside of the visible screen region. | ||
*/ | ||
async function cursorPosition() { | ||
return invoke('plugin:window|cursor_position').then(mapPhysicalPosition); | ||
} | ||
export { CloseRequestedEvent, Effect, EffectState, PhysicalPosition, PhysicalSize, ProgressBarStatus, UserAttentionType, Window, availableMonitors, currentMonitor, getAll, getCurrent, primaryMonitor }; | ||
export { CloseRequestedEvent, Effect, EffectState, PhysicalPosition, PhysicalSize, ProgressBarStatus, UserAttentionType, Window, availableMonitors, currentMonitor, cursorPosition, getAll, getCurrent, primaryMonitor }; |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
553511
13739