The window module controls and queries native windows: the Window
class (operates any live window by label), subscription helpers for the
13 window events, monitor queries and drag-region utilities — a port of
@tauri-apps/api/window. Every method is backed by the built-in
plugin:window|* commands.
For the narrative (the two ways to create windows: declarative config vs runtime creation) see the Windows guide; this page is the command-level reference for the module.
window is a framework built-in (not constructed as a separate plugin):
all of its plugin:window|* commands are granted by the
core:default permission set in a capability; individual
core:allow-window_<underscored_cmd> permissions (e.g.
core:allow-window_set_title) grant single commands. No scope.
From examples/hello/capabilities/main.json:
Example (adapted from examples/hello/frontend/src/main.ts; the anchors
WIN_STATE_OK, TITLE_OK, MONITORS_OK are its real run outputs):
Frameless-window dragging: add a data-tauri-drag-region attribute to
an element and call setupDragRegion() once per page; a mousedown then
triggers the native startDragging().
plugin:window|* totals 85 commands, covering titles, size,
position, state flags, button flags, cursor, theme, badges, effects,
events and more. Full list in the Commands
Reference.
Applicable version: ztron 0.3.1