Core Commands

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: getState and getResizable;
    • getDecorations returns None (not applicable to canvas).

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.
  • iconBufferId consumes the upload (one-shot) and requires uploadType = \"image-data\".
  • fullscreen requires exclusive mode; if unavailable, the command returns success=false and the core emits SystemEvent::Error.
  • Lifecycle changes emit WindowEvent::OnStateChange.
Documentation Vulfram Core