CmdWindowState
Applies and queries window state/properties in a single command.
Groups:
- title
- window state (
minimized,maximized,windowed,fullscreen,windowed-fullscreen) - icon by
bufferId - decorations / resizable
- focus and attention actions
- querying
state/decorations/resizable
Platform Notes
- Desktop: full patch + get support.
- WASM: partial support:
- mutations (
title,state,decorations,resizable,action,iconBufferId) are not supported; - supported getters:
getStateandgetResizable; getDecorationsreturnsNone(not applicable to canvas).
- mutations (
Arguments
| Field | Type | Description |
|---|---|---|
| windowId | u32 | Window ID |
| title | Option |
New title (optional) |
| state | Option |
New window state (optional) |
| iconBufferId | Option |
Image buffer for icon (optional) |
| decorations | Option |
Enable/disable decorations (optional) |
| resizable | Option |
Enable/disable resize (optional) |
| action | Option |
Optional action: focus, request-attention |
| attentionType | Option |
Type for request-attention: critical, informational |
| getState | bool | Includes state in response |
| getDecorations | bool | Includes decorations in response |
| getResizable | bool | Includes resizable in response |
Response
Returns CmdResultWindowState:
| Field | Type | Description |
|---|---|---|
| success | bool | Whether command was applied successfully |
| message | String | Status or error |
| state | Option |
Current/updated state when requested |
| decorations | Option |
Current/updated value when requested |
| resizable | Option |
Current/updated value when requested |
Notes
- Patch fields are optional: send only what you want to change.
iconBufferIdconsumes the upload (one-shot) and requiresuploadType = \"image-data\".fullscreenrequires exclusive mode; if unavailable, the command returnssuccess=falseand the core emitsSystemEvent::Error.- Lifecycle changes emit
WindowEvent::OnStateChange.
Documentation Vulfram Core