Defined in: window.ts:1079
macOS vibrancy materials (NSVisualEffectMaterial).
Acrylic:
"acrylic"
Defined in: window.ts:1097
AppearanceBased:
"appearanceBased"
Defined in: window.ts:1080
Blur:
"blur"
Defined in: window.ts:1096
Windows only (no-op on macOS, kept for cross-platform config).
ContentBackground:
"contentBackground"
Defined in: window.ts:1092
FullScreenUI:
"fullScreenUI"
Defined in: window.ts:1090
HeaderView:
"headerView"
Defined in: window.ts:1086
HudWindow:
"hudWindow"
Defined in: window.ts:1089
LiquidGlassClear:
"liquidGlassClear"
Defined in: window.ts:1106
macOS 26+ Liquid Glass, clear variant (NSGlassEffectViewStyleClear).
LiquidGlassRegular:
"liquidGlassRegular"
Defined in: window.ts:1104
macOS 26+ Liquid Glass (NSGlassEffectView; on older systems the host
falls back to the first ordinary material in the same effects list).
Menu:
"menu"
Defined in: window.ts:1083
Mica:
"mica"
Defined in: window.ts:1099
Popover:
"popover"
Defined in: window.ts:1084
Selection:
"selection"
Defined in: window.ts:1082
Sheet:
"sheet"
Defined in: window.ts:1087
Sidebar:
"sidebar"
Defined in: window.ts:1085
Tabbed:
"tabbed"
Defined in: window.ts:1098
TabbedDark:
"tabbedDark"
Defined in: window.ts:1100
TabbedLight:
"tabbedLight"
Defined in: window.ts:1101
Titlebar:
"titlebar"
Defined in: window.ts:1081
ToolTip:
"toolTip"
Defined in: window.ts:1091
UnderPageBackground:
"underPageBackground"
Defined in: window.ts:1094
UnderWindowBackground:
"underWindowBackground"
Defined in: window.ts:1093
WindowBackground:
"windowBackground"
Defined in: window.ts:1088
Defined in: window.ts:1110
Effect active state (macOS vibrancy · Windows Mica/Acrylic backdrop).
Active:
0
Defined in: window.ts:1112
FollowsWindowActiveState:
-1
Defined in: window.ts:1111
Inactive:
1
Defined in: window.ts:1113
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:368
Android-only upstream: current activity name (null on desktop).
Promise<string | null>
center():
Promise<void>
Defined in: window.ts:704
Promise<void>
clearEffects():
Promise<void>
Defined in: window.ts:303
Removes any applied vibrancy effect.
Promise<void>
close():
Promise<void>
Defined in: window.ts:540
Promise<void>
cursorPosition():
Promise<{x:number;y:number; }>
Defined in: window.ts:391
Screen-space cursor position (no label needed; upstream parity).
Promise<{ x: number; y: number; }>
destroy():
Promise<void>
Defined in: window.ts:424
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:732
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:784
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:744
Whether the window stays on top of other windows.
Promise<boolean>
isClosable():
Promise<boolean>
Defined in: window.ts:661
Whether the native close button is enabled.
Promise<boolean>
isDecorated():
Promise<boolean>
Defined in: window.ts:666
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:671
Whether the window is currently focused (key window).
Promise<boolean>
isFullscreen():
Promise<boolean>
Defined in: window.ts:599
Promise<boolean>
isMaximizable():
Promise<boolean>
Defined in: window.ts:646
Whether the native maximize/zoom button is enabled.
Promise<boolean>
isMaximized():
Promise<boolean>
Defined in: window.ts:568
Promise<boolean>
isMinimizable():
Promise<boolean>
Defined in: window.ts:631
Whether the native minimize button is enabled.
Promise<boolean>
isMinimized():
Promise<boolean>
Defined in: window.ts:572
Promise<boolean>
isResizable():
Promise<boolean>
Defined in: window.ts:754
Whether the window is resizable.
Promise<boolean>
isVisible():
Promise<boolean>
Defined in: window.ts:749
Whether the window is visible.
Promise<boolean>
maximize():
Promise<void>
Defined in: window.ts:559
Sets the native maximize state without toggling (Tauri v2 split).
Promise<void>
minimize():
Promise<void>
Defined in: window.ts:546
Promise<void>
onBlurred(
handler):Promise<UnlistenFn>
Defined in: window.ts:946
() => void
Promise<UnlistenFn>
onCloseRequested(
handler):Promise<() =>void>
Defined in: window.ts:967
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:313
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:951
Focus + blur combined (Tauri v2 sugar).
(focused) => void
Promise<() => void>
onFocused(
handler):Promise<UnlistenFn>
Defined in: window.ts:942
() => void
Promise<UnlistenFn>
onMoved(
handler):Promise<UnlistenFn>
Defined in: window.ts:911
(payload) => void
Promise<UnlistenFn>
onResized(
handler):Promise<UnlistenFn>
Defined in: window.ts:907
(payload) => void
Promise<UnlistenFn>
onScaleChanged(
handler):Promise<UnlistenFn>
Defined in: window.ts:986
Fires when the backing scale factor changes (Retina display moves).
(payload) => void
Promise<UnlistenFn>
onThemeChanged(
handler):Promise<UnlistenFn>
Defined in: window.ts:993
Fires when the system theme changes (payload: "dark" | "light").
(theme) => void
Promise<UnlistenFn>
outerPosition():
Promise<{x:number;y:number; }>
Defined in: window.ts:770
The window's outer position (top-left origin).
Promise<{ x: number; y: number; }>
outerSize():
Promise<{height:number;width:number; }>
Defined in: window.ts:759
The window's outer size (width × height, including decorations).
Promise<{ height: number; width: number; }>
preventClose(
prevent):Promise<void>
Defined in: window.ts:419
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:695
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:378
iOS-only upstream: current scene identifier (null on desktop).
Promise<string | null>
setActivityName(
name):Promise<void>
Defined in: window.ts:373
Android-only upstream: accepted as a documented no-op on desktop.
string
Promise<void>
setAlwaysOnBottom(
alwaysOnBottom):Promise<void>
Defined in: window.ts:613
Keeps the window below all other windows (v2-only).
boolean
Promise<void>
setAlwaysOnTop(
alwaysOnTop):Promise<void>
Defined in: window.ts:605
boolean
Promise<void>
setBackgroundColor(
color):Promise<void>
Defined in: window.ts:877
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:854
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:866
Sets the badge to arbitrary text (macOS: dock badge · Windows: taskbar
overlay icon on the main window).
null/undefined/"" removes the badge.
string | null
Promise<void>
setBounds(
x,y,width?,height?):Promise<void>
Defined in: window.ts:440
Sets the window bounds (position + size in one op, dpi types accepted).
number
number
Promise<void>
setClosable(
closable):Promise<void>
Defined in: window.ts:653
Toggles the native close button.
boolean
Promise<void>
setContentProtected(
protect):Promise<void>
Defined in: window.ts:684
Prevents the window contents from being captured by other apps.
boolean
Promise<void>
setCursor(
cursor):Promise<void>
Defined in: window.ts:348
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:353
Alias of setCursor (Tauri v2 name).
string
Promise<void>
setCursorPosition(
x,y?):Promise<void>
Defined in: window.ts:398
Warps the cursor to window coordinates (dpi types accepted).
number
Promise<void>
setCursorVisible(
visible):Promise<void>
Defined in: window.ts:360
Hides/shows the system cursor (app-global hide counter — pair calls).
boolean
Promise<void>
setDecorations(
decorations):Promise<void>
Defined in: window.ts:802
Toggles native window decorations (title bar / borders).
boolean
Promise<void>
setEffects(
effects):Promise<void>
Defined in: window.ts:295
Vibrancy material (macOS). Windows-only effects are ignored there.
Promise<void>
setEnabled(
enabled):Promise<void>
Defined in: window.ts:466
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:708
Promise<void>
setFocusable(
focusable):Promise<void>
Defined in: window.ts:916
Toggles whether the window can take keyboard focus.
boolean
Promise<void>
setFullscreen(
fullscreen):Promise<void>
Defined in: window.ts:576
boolean
Promise<void>
setFullscreenOnMonitor(
position):Promise<void>
Defined in: window.ts:589
Fullscreens onto the monitor containing position (screen-space
coordinates, as from Monitor.position). macOS matches the
NSScreen, moves the window onto it, then enters fullscreen; Windows and
Linux currently fall back to plain fullscreen.
number
number
Promise<void>
setIcon(
icon):Promise<void>
Defined in: window.ts:274
Sets the window/dock icon from a JsImage (registered
Image, a path string, or raw bytes — normalized first).
Pass null to clear.
JsImage | 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:638
Toggles the native maximize/zoom button.
boolean
Promise<void>
setMaxSize(
size):Promise<void>
Defined in: window.ts:513
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:623
Toggles the native minimize button (macOS/Windows; button-mask based).
boolean
Promise<void>
setMinSize(
size):Promise<void>
Defined in: window.ts:500
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:724
Sets the window opacity, 0.0 (transparent) to 1.0 (opaque).
number
Promise<void>
setOverlayIcon(
icon):Promise<void>
Defined in: window.ts:286
Sets a small titlebar accessory icon (the macOS take on Windows'
overlay/status badge). Accepts a JsImage; null clears.
JsImage | null
Promise<void>
setPosition(
x,y?):Promise<void>
Defined in: window.ts:487
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:828
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:716
boolean
Promise<void>
setSceneIdentifier(
id):Promise<void>
Defined in: window.ts:383
iOS-only upstream: accepted as a documented no-op on desktop.
string
Promise<void>
setShadow(
shadow):Promise<void>
Defined in: window.ts:461
Toggles the native window shadow.
boolean
Promise<void>
setSimpleFullscreen(
fullscreen):Promise<void>
Defined in: window.ts:935
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:474
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:523
Sets min/max inner-size constraints in one call.
WindowSizeConstraints | null | undefined
Promise<void>
setSkipTaskbar(
skipTaskbar):Promise<void>
Defined in: window.ts:676
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:889
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:1001
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:794
Toggles a transparent window background.
boolean
Promise<void>
setVisible(
visible):Promise<void>
Defined in: window.ts:712
boolean
Promise<void>
setVisibleOnAllWorkspaces(
visible):Promise<void>
Defined in: window.ts:924
Shows the window on all workspaces / virtual desktops (macOS).
boolean
Promise<void>
setZoom(
zoom):Promise<void>
Defined in: window.ts:411
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:813
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:432
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:554
Promise<void>
unmaximize():
Promise<void>
Defined in: window.ts:564
Restores a maximized window (no-op when not zoomed).
Promise<void>
unminimize():
Promise<void>
Defined in: window.ts:550
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:1117
Window effect configuration (Tauri Effects).
optionalcolor?:string|null
Defined in: window.ts:1121
effects:
Effect[]
Defined in: window.ts:1118
optionalinteractive?:boolean
Defined in: window.ts:1123
Liquid Glass interactivity (macOS 27+; ignored elsewhere).
optionalradius?:number
Defined in: window.ts:1120
optionalstate?:EffectState
Defined in: window.ts:1119
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:1017
The list of all monitors (physical px).
Promise<Monitor[]>
currentMonitor():
Promise<Monitor|null>
Defined in: window.ts:1025
The monitor containing the window (or null off-screen).
Promise<Monitor | null>
cursorPosition():
Promise<{x:number;y:number; }>
Defined in: window.ts:1130
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:1011
All live window labels as Window handles.
Promise<Window[]>
monitorFromPoint(
x,y):Promise<Monitor|null>
Defined in: window.ts:1035
The monitor containing a desktop point (physical px, top-left origin).
number
number
Promise<Monitor | null>
primaryMonitor():
Promise<Monitor|null>
Defined in: window.ts:1030
The primary display.
Promise<Monitor | null>
setupDragRegion(
target?): () =>void
Defined in: window.ts:1049
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