Package-level declarations
Types
Background throttling policy
Bundle type of the current application.
Identifier type used for data stores on macOS and iOS.
The drag and drop event types.
Window effect state macOS only
Command arguments.
A position represented in logical pixels. For an explanation of what logical pixels are, see description of {@linkcode LogicalSize}.
A size represented in logical pixels. Logical pixels are scaled according to the window's DPI scale. Most browser APIs (i.e. MouseEvent's clientX) will return logical pixels.
Options for mockIPC.
Payload for the onBackButtonPress event.
A position represented in physical pixels.
A size represented in physical pixels.
Minimum margin to work area
The payload for the scaleChange event.
The scrollbar style to use in the webview.
Describes a tray icon event.
{@link TrayIcon.new|TrayIcon} creation options
Attention type to request on a window.
Configuration for the webview to create.
Configuration for the window to create.
Functions
Returns the path to the suggested directory for your app's cache files. Resolves to ${cacheDir}/${bundleIdentifier}, where bundleIdentifier is the identifier value configured in tauri.conf.json.
Returns the path to the suggested directory for your app's config files. Resolves to ${configDir}/${bundleIdentifier}, where bundleIdentifier is the identifier value configured in tauri.conf.json.
Returns the path to the suggested directory for your app's data files. Resolves to ${dataDir}/${bundleIdentifier}, where bundleIdentifier is the identifier value configured in tauri.conf.json.
Returns the path to the suggested directory for your app's local data files. Resolves to ${localDataDir}/${bundleIdentifier}, where bundleIdentifier is the identifier value configured in tauri.conf.json.
Returns the list of all the monitors available on the system.
Get permission state for a plugin.
Clears mocked functions/data injected by the other functions in this module. When using a test runner that doesn't provide a fresh window object for each test, calling this function will reset tauri specific properties.
Convert a device file path to an URL that can be loaded by the webview. Note that asset: and http://asset.localhost must be added to app.security.csp in tauri.conf.json. Example CSP value: "csp": "default-src 'self' ipc: http://ipc.localhost; img-src 'self' asset: http://asset.localhost" to use the asset protocol on image sources.
Returns the monitor on which the window currently resides. Returns null if current monitor can't be detected.
Get the cursor position relative to the top-left hand corner of the desktop.
Gets the default window icon.
Returns the path to the user's desktop directory.
Returns the path to the user's document directory.
Returns the path to the user's download directory.
Emits an event to all {@link EventTarget|targets} matching the given target.
Returns the path to the user's executable directory.
Fetches the data store identifiers on macOS and iOS.
Gets a list of instances of Webview for all available webviews.
Gets a list of instances of Webview for all available webview windows.
Gets a list of instances of Window for all available windows.
Gets the application bundle type.
Get an instance of Webview for the current webview.
Get an instance of Webview for the current webview window.
Get an instance of Window for the current window.
Gets the application identifier.
Gets the Tauri framework version used by this application.
Gets the application version.
Sends a message to the backend.
Returns whether the path is absolute or not.
Returns the path to the user's local data directory.
Mock convertFileSrc function
Intercepts all IPC requests with the given mock handler.
Mocks one or many window labels. In non-tauri context it is required to call this function before using the @tauri-apps/api/window module.
Returns the monitor that contains the given point. Returns null if can't find any.
Listens to the backButton event on Android.
Returns the path to the user's picture directory.
Returns the primary monitor of the system. Returns null if it can't identify any monitor as a primary one.
Removes the data store with the given identifier.
Request permissions.
Resolve the path to a resource file.
Returns the path to the application's resource directory. To resolve a resource path, see {@linkcode resolveResource}.
Returns the path to the user's runtime directory.
Sets the dock visibility for the application on macOS.
Returns the path to the user's template directory.
Transforms image from various types into a type acceptable by Rust.