Expand description
Provides APIs to create windows, communicate with other windows and manipulate the current window.
The APIs must be added to tauri.allowlist.window in tauri.conf.json:
{
"tauri": {
"allowlist": {
"window": {
"all": true, // enable all window APIs
"create": true, // enable window creation
"center": true,
"requestUserAttention": true,
"setResizable": true,
"setTitle": true,
"maximize": true,
"unmaximize": true,
"minimize": true,
"unminimize": true,
"show": true,
"hide": true,
"close": true,
"setDecorations": true,
"setAlwaysOnTop": true,
"setSize": true,
"setMinSize": true,
"setMaxSize": true,
"setPosition": true,
"setFullscreen": true,
"setFocus": true,
"setIcon": true,
"setSkipTaskbar": true,
"setCursorGrab": true,
"setCursorVisible": true,
"setCursorIcon": true,
"setCursorPosition": true,
"setIgnoreCursorEvents": true,
"startDragging": true,
"print": true
}
}
}
}
It is recommended to allowlist only the APIs you use for optimal bundle size and security.
Structs§
- A position represented in logical pixels.
- A size represented in logical pixels.
- Allows you to retrieve information about a given monitor.
- A position represented in physical pixels.
- A size represented in physical pixels.
- Create new webview windows and get a handle to existing ones.
Enums§
- Attention type to request on a window.
Functions§
- Gets a list of instances of
WebviewWindow
for all available webview windows. - Returns the list of all the monitors available on the system.
- Returns the monitor on which the window currently resides.
- Get an instance of
WebviewWindow
for the current webview window. - Returns the primary monitor of the system.