Defined in: window.ts:1047
macOS vibrancy materials (NSVisualEffectMaterial).
Acrylic:
"acrylic"
Defined in: window.ts:1065
AppearanceBased:
"appearanceBased"
Defined in: window.ts:1048
Blur:
"blur"
Defined in: window.ts:1064
Windows only (no-op on macOS, kept for cross-platform config).
ContentBackground:
"contentBackground"
Defined in: window.ts:1060
FullScreenUI:
"fullScreenUI"
Defined in: window.ts:1058
HeaderView:
"headerView"
Defined in: window.ts:1054
HudWindow:
"hudWindow"
Defined in: window.ts:1057
Menu:
"menu"
Defined in: window.ts:1051
Mica:
"mica"
Defined in: window.ts:1067
Popover:
"popover"
Defined in: window.ts:1052
Selection:
"selection"
Defined in: window.ts:1050
Sheet:
"sheet"
Defined in: window.ts:1055
Sidebar:
"sidebar"
Defined in: window.ts:1053
Tabbed:
"tabbed"
Defined in: window.ts:1066
TabbedDark:
"tabbedDark"
Defined in: window.ts:1068
TabbedLight:
"tabbedLight"
Defined in: window.ts:1069
Titlebar:
"titlebar"
Defined in: window.ts:1049
ToolTip:
"toolTip"
Defined in: window.ts:1059
UnderPageBackground:
"underPageBackground"
Defined in: window.ts:1062
UnderWindowBackground:
"underWindowBackground"
Defined in: window.ts:1061
WindowBackground:
"windowBackground"
Defined in: window.ts:1056
Defined in: window.ts:1073
Effect active state (macOS only).
Active:
0
Defined in: window.ts:1075
FollowsWindowActiveState:
-1
Defined in: window.ts:1074
Inactive:
1
Defined in: window.ts:1076
Defined in: window.ts:74
Dock/Tile progress-bar states (upstream ProgressBarStatus).
Error:
"error"
Defined in: window.ts:79
Indeterminate:
"indeterminate"
Defined in: window.ts:77
None:
"none"
Defined in: window.ts:75
Normal:
"normal"
Defined in: window.ts:76
Paused:
"paused"
Defined in: window.ts:78
Defined in: window.ts:89
Attention request type for Window.requestUserAttention.
Critical:
"Critical"
Defined in: window.ts:90
Informational:
"Informational"
Defined in: window.ts:91
Defined in: window.ts:136
Delivered to Window.onCloseRequested: call
CloseRequestedEvent.preventDefault inside the handler to keep
the window open (a port of @tauri-apps/api CloseRequestedEvent).
new CloseRequestedEvent(
event):CloseRequestedEvent
Defined in: window.ts:142
string
number
readonlyevent:string
Defined in: window.ts:137
readonlyid:number
Defined in: window.ts:138
isPreventDefault():
boolean
Defined in: window.ts:151
boolean
preventDefault():
void
Defined in: window.ts:147
void
Defined in: window.ts:156
new Window(
label):Window
Defined in: window.ts:159
string
readonlylabel:string
Defined in: window.ts:157
activityName():
Promise<string|null>
Defined in: window.ts:365
Android-only upstream: current activity name (null on desktop).
Promise<string | null>
center():
Promise<void>
Defined in: window.ts:685
Promise<void>
clearEffects():
Promise<void>
Defined in: window.ts:300
Removes any applied vibrancy effect.
Promise<void>
close():
Promise<void>
Defined in: window.ts:537
Promise<void>
cursorPosition():
Promise<{x:number;y:number; }>
Defined in: window.ts:388
Screen-space cursor position (no label needed; upstream parity).
Promise<{ x: number; y: number; }>
destroy():
Promise<void>
Defined in: window.ts:421
Force-closes the window, bypassing preventClose.
Promise<void>
getState():
Promise<{alwaysOnTop:boolean;fullscreen:boolean;maximized:boolean;minimized:boolean;resizable:boolean;visible:boolean; } |null>
Defined in: window.ts:713
Reads the window's boolean state flags (maximized/fullscreen/etc).
Promise<{ alwaysOnTop: boolean; fullscreen: boolean; maximized: boolean; minimized: boolean; resizable: boolean; visible: boolean; } | null>
getTheme():
Promise<string|null>
Defined in: window.ts:210
The OS color scheme the window follows ("light" | "dark").
Promise<string | null>
getTitle():
Promise<string>
Defined in: window.ts:183
The current native window title.
Promise<string>
hide():
Promise<void>
Defined in: window.ts:229
Promise<void>
innerPosition():
Promise<{x:number;y:number; }>
Defined in: window.ts:765
The window's inner position (content top-left). Approximated by the outer frame origin — exact content origin needs titlebar-height measurement.
Promise<{ x: number; y: number; }>
innerSize():
Promise<{height:number;width:number; }>
Defined in: window.ts:200
The window's inner (content) size in points — excludes title bar.
Promise<{ height: number; width: number; }>
isAlwaysOnTop():
Promise<boolean>
Defined in: window.ts:725
Whether the window stays on top of other windows.
Promise<boolean>
isClosable():
Promise<boolean>
Defined in: window.ts:642
Whether the native close button is enabled.
Promise<boolean>
isDecorated():
Promise<boolean>
Defined in: window.ts:647
Whether the window has native decorations (title bar / borders).
Promise<boolean>
isEnabled():
Promise<boolean>
Defined in: window.ts:193
Whether the window is enabled (macOS: always true — no NSWindow state).
Promise<boolean>
isFocused():
Promise<boolean>
Defined in: window.ts:652
Whether the window is currently focused (key window).
Promise<boolean>
isFullscreen():
Promise<boolean>
Defined in: window.ts:580
Promise<boolean>
isMaximizable():
Promise<boolean>
Defined in: window.ts:627
Whether the native maximize/zoom button is enabled.
Promise<boolean>
isMaximized():
Promise<boolean>
Defined in: window.ts:565
Promise<boolean>
isMinimizable():
Promise<boolean>
Defined in: window.ts:612
Whether the native minimize button is enabled.
Promise<boolean>
isMinimized():
Promise<boolean>
Defined in: window.ts:569
Promise<boolean>
isResizable():
Promise<boolean>
Defined in: window.ts:735
Whether the window is resizable.
Promise<boolean>
isVisible():
Promise<boolean>
Defined in: window.ts:730
Whether the window is visible.
Promise<boolean>
maximize():
Promise<void>
Defined in: window.ts:556
Sets the native maximize state without toggling (Tauri v2 split).
Promise<void>
minimize():
Promise<void>
Defined in: window.ts:543
Promise<void>
onBlurred(
handler):Promise<UnlistenFn>
Defined in: window.ts:926
() => void
Promise<UnlistenFn>
onCloseRequested(
handler):Promise<() =>void>
Defined in: window.ts:947
Fires when a close is requested. The handler decides dynamically:
call event.preventDefault() to keep the window open, otherwise the
window is destroyed when the handler completes (Tauri v2 semantics).
(event) => unknown
Promise<() => void>
onDragDropEvent(
handler): () =>void
Defined in: window.ts:310
A normalized drag-and-drop notification (Tauri DragDropEvent): enter
carries paths + position, over only the position, drop paths +
position, and leave fires when the drag leaves the window without a
drop. Positions are physical pixels relative to the window's top-left.
(payload) => void
() => void
onFocusChanged(
handler):Promise<() =>void>
Defined in: window.ts:931
Focus + blur combined (Tauri v2 sugar).
(focused) => void
Promise<() => void>
onFocused(
handler):Promise<UnlistenFn>
Defined in: window.ts:922
() => void
Promise<UnlistenFn>
onMoved(
handler):Promise<UnlistenFn>
Defined in: window.ts:891
(payload) => void
Promise<UnlistenFn>
onResized(
handler):Promise<UnlistenFn>
Defined in: window.ts:887
(payload) => void
Promise<UnlistenFn>
onScaleChanged(
handler):Promise<UnlistenFn>
Defined in: window.ts:966
Fires when the backing scale factor changes (Retina display moves).
(payload) => void
Promise<UnlistenFn>
onThemeChanged(
handler):Promise<UnlistenFn>
Defined in: window.ts:973
Fires when the system theme changes (payload: "dark" | "light").
(theme) => void
Promise<UnlistenFn>
outerPosition():
Promise<{x:number;y:number; }>
Defined in: window.ts:751
The window's outer position (top-left origin).
Promise<{ x: number; y: number; }>
outerSize():
Promise<{height:number;width:number; }>
Defined in: window.ts:740
The window's outer size (width × height, including decorations).
Promise<{ height: number; width: number; }>
preventClose(
prevent):Promise<void>
Defined in: window.ts:416
Prevents the window from closing; a ztron://close-requested event is
emitted instead, letting the frontend confirm (then call destroy()).
boolean
Promise<void>
requestUserAttention(
type?):Promise<void>
Defined in: window.ts:676
Bounces the dock icon until activated. null cancels the request.
(macOS maps Critical/Informational to the bounce style.)
UserAttentionType | null
Promise<void>
scaleFactor():
Promise<number|null>
Defined in: window.ts:234
The window's backing scale factor (2 on Retina/HiDPI).
Promise<number | null>
sceneIdentifier():
Promise<string|null>
Defined in: window.ts:375
iOS-only upstream: current scene identifier (null on desktop).
Promise<string | null>
setActivityName(
name):Promise<void>
Defined in: window.ts:370
Android-only upstream: accepted as a documented no-op on desktop.
string
Promise<void>
setAlwaysOnBottom(
alwaysOnBottom):Promise<void>
Defined in: window.ts:594
Keeps the window below all other windows (v2-only).
boolean
Promise<void>
setAlwaysOnTop(
alwaysOnTop):Promise<void>
Defined in: window.ts:586
boolean
Promise<void>
setBackgroundColor(
color):Promise<void>
Defined in: window.ts:857
Sets the window background color: "#rrggbb", "#rrggbbaa" or
"transparent". Takes effect on frameless/transparent windows.
string
Promise<void>
setBadgeCount(
count):Promise<void>
Defined in: window.ts:835
Sets the dock badge count. null/undefined removes the badge.
macOS dock / Windows taskbar; unsupported elsewhere.
number | null
Promise<void>
setBadgeLabel(
badgeLabel):Promise<void>
Defined in: window.ts:846
Sets the dock badge to arbitrary text (macOS only).
null/undefined/"" removes the badge.
string | null
Promise<void>
setBounds(
x,y,width?,height?):Promise<void>
Defined in: window.ts:437
Sets the window bounds (position + size in one op, dpi types accepted).
number
number
Promise<void>
setClosable(
closable):Promise<void>
Defined in: window.ts:634
Toggles the native close button.
boolean
Promise<void>
setContentProtected(
protect):Promise<void>
Defined in: window.ts:665
Prevents the window contents from being captured by other apps.
boolean
Promise<void>
setCursor(
cursor):Promise<void>
Defined in: window.ts:345
Sets the window cursor (CSS-style name: "default", "pointer", "text", "crosshair", "move", "not-allowed", resize cursors, …).
string
Promise<void>
setCursorGrab(
grab):Promise<void>
Defined in: window.ts:262
Locks the cursor at its current position (Tauri setCursorGrab). On
macOS the cursor visually parks in place; release with false.
boolean
Promise<void>
setCursorIcon(
icon):Promise<void>
Defined in: window.ts:350
Alias of setCursor (Tauri v2 name).
string
Promise<void>
setCursorPosition(
x,y?):Promise<void>
Defined in: window.ts:395
Warps the cursor to window coordinates (dpi types accepted).
number
Promise<void>
setCursorVisible(
visible):Promise<void>
Defined in: window.ts:357
Hides/shows the system cursor (app-global hide counter — pair calls).
boolean
Promise<void>
setDecorations(
decorations):Promise<void>
Defined in: window.ts:783
Toggles native window decorations (title bar / borders).
boolean
Promise<void>
setEffects(
effects):Promise<void>
Defined in: window.ts:292
Vibrancy material (macOS). Windows-only effects are ignored there.
Promise<void>
setEnabled(
enabled):Promise<void>
Defined in: window.ts:463
Enables/disables the native window.
boolean
Promise<void>
setFileDropEnabled(
enabled):Promise<void>
Defined in: window.ts:251
Enables/disables the native file drag-and-drop handler. While enabled
(default) file drags produce Window.onDragDropEvent events;
disable it to let the page use the HTML5 drag-and-drop APIs instead.
boolean
Promise<void>
setFocus():
Promise<void>
Defined in: window.ts:689
Promise<void>
setFocusable(
focusable):Promise<void>
Defined in: window.ts:896
Toggles whether the window can take keyboard focus.
boolean
Promise<void>
setFullscreen(
fullscreen):Promise<void>
Defined in: window.ts:573
boolean
Promise<void>
setIcon(
icon):Promise<void>
Defined in: window.ts:273
Sets the window/dock icon from an Image (registered host
image). Pass null to clear.
Image | null
Promise<void>
setIgnoreCursorEvents(
ignore):Promise<void>
Defined in: window.ts:239
Toggles whether the window ignores mouse/cursor events.
boolean
Promise<void>
setMaximizable(
maximizable):Promise<void>
Defined in: window.ts:619
Toggles the native maximize/zoom button.
boolean
Promise<void>
setMaxSize(
size):Promise<void>
Defined in: window.ts:510
Sets the window maximum inner size. null unsets the constraint
(dpi types accepted).
SizeLike | null | undefined
Promise<void>
setMinimizable(
minimizable):Promise<void>
Defined in: window.ts:604
Toggles the native minimize button (macOS/Windows; button-mask based).
boolean
Promise<void>
setMinSize(
size):Promise<void>
Defined in: window.ts:497
Sets the window minimum inner size. null unsets the constraint
(dpi types accepted, like new LogicalSize(300, 200)).
SizeLike | null | undefined
Promise<void>
setOpacity(
opacity):Promise<void>
Defined in: window.ts:705
Sets the window opacity, 0.0 (transparent) to 1.0 (opaque).
number
Promise<void>
setOverlayIcon(
icon):Promise<void>
Defined in: window.ts:284
Sets a small titlebar accessory icon (the macOS take on Windows'
overlay/status badge). Pass null to clear.
Image | null
Promise<void>
setPosition(
x,y?):Promise<void>
Defined in: window.ts:484
Moves the window. Accepts plain numbers, a LogicalPosition /
PhysicalPosition, or a plain { x, y } object.
number
Promise<void>
setProgressBar(
progress):Promise<void>
Defined in: window.ts:809
Dock/taskbar progress. Accepts a bare determinate value / null (v1
shape) or an upstream ProgressBarState object: Indeterminate toggles
the spinning bar, None clears it.
number | ProgressBarStateInput | null
Promise<void>
setResizable(
resizable):Promise<void>
Defined in: window.ts:697
boolean
Promise<void>
setSceneIdentifier(
id):Promise<void>
Defined in: window.ts:380
iOS-only upstream: accepted as a documented no-op on desktop.
string
Promise<void>
setShadow(
shadow):Promise<void>
Defined in: window.ts:458
Toggles the native window shadow.
boolean
Promise<void>
setSimpleFullscreen(
fullscreen):Promise<void>
Defined in: window.ts:915
Borderless "simple" fullscreen: content fills the screen without the native fullscreen space transition (frame + decorations restored on off).
boolean
Promise<void>
setSize(
width,height?):Promise<void>
Defined in: window.ts:471
Sets the window size. Accepts plain numbers, a LogicalSize /
PhysicalSize, or a plain { width, height } object.
number
Promise<void>
setSizeConstraints(
constraints):Promise<void>
Defined in: window.ts:520
Sets min/max inner-size constraints in one call.
WindowSizeConstraints | null | undefined
Promise<void>
setSkipTaskbar(
skipTaskbar):Promise<void>
Defined in: window.ts:657
Hides the window icon from the taskbar/dock (macOS: whole app).
boolean
Promise<void>
setTheme(
theme):Promise<void>
Defined in: window.ts:220
App-wide theme override ("dark"/"light"; null follows system).
"dark" | "light" | null
Promise<void>
setTitle(
title):Promise<void>
Defined in: window.ts:178
string
Promise<void>
setTitleBarStyle(
style):Promise<void>
Defined in: window.ts:869
Sets the title-bar style (macOS only): "visible" (default),
"transparent" (hidden chrome) or "overlay" (content under the
traffic lights — the Tauri "transparent + full-size content view").
Promise<void>
setTrafficLightPosition(
x,y):Promise<void>
Defined in: window.ts:981
Moves the traffic-light buttons (close/minimize/zoom) — for frameless
macOS windows with titleBarStyle: "overlay".
number
number
Promise<void>
setTransparent(
transparent):Promise<void>
Defined in: window.ts:775
Toggles a transparent window background.
boolean
Promise<void>
setVisible(
visible):Promise<void>
Defined in: window.ts:693
boolean
Promise<void>
setVisibleOnAllWorkspaces(
visible):Promise<void>
Defined in: window.ts:904
Shows the window on all workspaces / virtual desktops (macOS).
boolean
Promise<void>
setZoom(
zoom):Promise<void>
Defined in: window.ts:408
Zooms the web content (CSS zoom factor, e.g. 1.5).
number
Promise<void>
show():
Promise<void>
Defined in: window.ts:225
Alias of setVisible(true) / setVisible(false) (Tauri v2 parity).
Promise<void>
startDragging():
Promise<void>
Defined in: window.ts:794
Starts a native window drag — call from a mousedown on a
data-tauri-drag-region element of a frameless window.
Promise<void>
startResizeDragging(
direction?):Promise<void>
Defined in: window.ts:429
Starts a native resize drag (direction: "north"/"south"/"east"/"west" or combinations like "southeast"). macOS is not implemented.
string = "southeast"
Promise<void>
theme():
Promise<string|null>
Defined in: window.ts:215
The OS color scheme, alias of getTheme (Tauri v2 parity).
Promise<string | null>
title():
Promise<string>
Defined in: window.ts:188
Sets the window title (alias of setTitle for Tauri v2 parity).
Promise<string>
toggleMaximize():
Promise<void>
Defined in: window.ts:551
Promise<void>
unmaximize():
Promise<void>
Defined in: window.ts:561
Restores a maximized window (no-op when not zoomed).
Promise<void>
unminimize():
Promise<void>
Defined in: window.ts:547
Promise<void>
staticgetByLabel(label):Promise<Window|null>
Defined in: window.ts:164
Looks up a live window by label (null when it doesn't exist).
string
Promise<Window | null>
staticgetCurrent():Window
Defined in: window.ts:169
The current window (label from the bootstrap metadata).
Defined in: window.ts:1080
Window effect configuration (Tauri Effects).
optionalcolor?:string|null
Defined in: window.ts:1084
effects:
Effect[]
Defined in: window.ts:1081
optionalradius?:number
Defined in: window.ts:1083
optionalstate?:EffectState
Defined in: window.ts:1082
Defined in: window.ts:122
A physical display (values in physical pixels).
name:
string|null
Defined in: window.ts:123
position:
object
Defined in: window.ts:124
x:
number
y:
number
scaleFactor:
number
Defined in: window.ts:128
size:
object
Defined in: window.ts:125
height:
number
width:
number
workArea:
object
Defined in: window.ts:127
Usable area (excludes menu bar / dock / taskbar).
height:
number
width:
number
x:
number
y:
number
Defined in: window.ts:82
status:
ProgressBarStatus
Defined in: window.ts:83
optionalvalue?:number
Defined in: window.ts:85
Determinate value when status is Normal/Paused/Error.
Defined in: window.ts:98
Window inner-size constraints (logical pixels; undefined = unset).
optionalmaxHeight?:number
Defined in: window.ts:102
optionalmaxWidth?:number
Defined in: window.ts:101
optionalminHeight?:number
Defined in: window.ts:100
optionalminWidth?:number
Defined in: window.ts:99
CursorIcon = typeof
CursorIcon[keyof typeofCursorIcon]
Defined in: window.ts:34
Stock cursor shapes accepted by setCursor/setCursorIcon
(upstream CursorIcon union members).
TitleBarStyle =
"visible"|"transparent"|"overlay"
Defined in: window.ts:95
Title-bar style (macOS only).
WindowEventName =
"resize"|"move"|"focus"|"blur"|"close-requested"|"suspended"|"resumed"|"scale-change"|"theme-changed"|"drag-enter"|"drag-over"|"drag-drop"|"drag-leave"
Defined in: window.ts:15
constCursorIcon:object
Defined in: window.ts:34
Stock cursor shapes accepted by setCursor/setCursorIcon
(upstream CursorIcon union members).
readonlyAlias:"alias"="alias"
readonlyAllScroll:"allScroll"="allScroll"
readonlyArrow:"arrow"="arrow"
readonlyCell:"cell"="cell"
readonlyColResize:"colResize"="colResize"
readonlyContextMenu:"contextMenu"="contextMenu"
readonlyCopy:"copy"="copy"
readonlyCrosshair:"crosshair"="crosshair"
readonlyDefault:"default"="default"
readonlyEResize:"eResize"="eResize"
readonlyEwResize:"ewResize"="ewResize"
readonlyGrab:"grab"="grab"
readonlyGrabbing:"grabbing"="grabbing"
readonlyHand:"hand"="hand"
readonlyHelp:"help"="help"
readonlyMove:"move"="move"
readonlyNeResize:"neResize"="neResize"
readonlyNeswResize:"neswResize"="neswResize"
readonlyNoDrop:"noDrop"="noDrop"
readonlyNotAllowed:"notAllowed"="notAllowed"
readonlyNResize:"nResize"="nResize"
readonlyNsResize:"nsResize"="nsResize"
readonlyNwResize:"nwResize"="nwResize"
readonlyNwseResize:"nwseResize"="nwseResize"
readonlyProgress:"progress"="progress"
readonlyRowResize:"rowResize"="rowResize"
readonlySeResize:"seResize"="seResize"
readonlySResize:"sResize"="sResize"
readonlySwResize:"swResize"="swResize"
readonlyText:"text"="text"
readonlyVerticalText:"verticalText"="verticalText"
readonlyWait:"wait"="wait"
readonlyWResize:"wResize"="wResize"
readonlyZoomIn:"zoomIn"="zoomIn"
readonlyZoomOut:"zoomOut"="zoomOut"
availableMonitors():
Promise<Monitor[]>
Defined in: window.ts:997
The list of all monitors (physical px).
Promise<Monitor[]>
currentMonitor():
Promise<Monitor|null>
Defined in: window.ts:1005
The monitor containing the window (or null off-screen).
Promise<Monitor | null>
cursorPosition():
Promise<{x:number;y:number; }>
Defined in: window.ts:1091
Global mouse position in screen coordinates — no window label required
(upstream cursorPosition() standalone helper).
Promise<{ x: number; y: number; }>
getAllWindows():
Promise<Window[]>
Defined in: window.ts:991
All live window labels as Window handles.
Promise<Window[]>
monitorFromPoint(
x,y):Promise<Monitor|null>
Defined in: window.ts:1015
The monitor containing a desktop point (physical px, top-left origin).
number
number
Promise<Monitor | null>
primaryMonitor():
Promise<Monitor|null>
Defined in: window.ts:1010
The primary display.
Promise<Monitor | null>
setupDragRegion(
target?): () =>void
Defined in: window.ts:1029
Enables window dragging from any element with a data-tauri-drag-region
attribute (the Tauri frameless-window convention). Call once per page.
Document | HTMLElement
() => void