Core Commands

CmdWindowMeasurement

Applies and queries window measurements in a single command.

Groups:

  • position (set/get)
  • inner size (set/get)
  • outer size (get)
  • surface size (get)

Platform Notes

  • WASM: uses the same response shape as native. While the window is not ready yet, it returns an empty payload with success=true (eventual consistency).
  • In HiDPI, surface size reflects real drawing-buffer pixels (not only CSS pixels).

Arguments

Field Type Description
windowId u32 Window ID
position Option New outer position (optional)
size Option New inner size (optional)
getPosition bool Includes position in response
getSize bool Includes size in response
getOuterSize bool Includes outerSize in response
getSurfaceSize bool Includes surfaceSize in response

Response

Returns CmdResultWindowMeasurement:

Field Type Description
success bool Whether command was applied successfully
message String Status (includes transient/deferred state)
position Option Current/updated position when requested
size Option Current/updated inner size when requested
outerSize Option Current outer size when requested
surfaceSize Option Current surface size when requested

Notes

  • Patch fields are optional: send only what you want to change.
  • position and size, when sent, are also returned in the response payload.
  • If windowId/GPU are not ready yet, the command returns success=true with empty read fields (eventual consistency).
Documentation Vulfram Core