Core Commands

CmdWindowCursor

Configures the window mouse cursor (not to be confused with generic pointer events).

Groups:

  • cursor visibility
  • grab/lock mode
  • cursor icon

Platform Notes

  • Desktop: native support for none, confined, and locked.
  • WASM: partial support:
    • mode=locked: requests Pointer Lock API;
    • mode=confined: logical polyfill with relative movement and no delta clamping;
    • mode=none: exits capture/lock.
    • visible and icon remain unsupported.

Arguments

Field Type Description
windowId u32 Window ID
visible Option Show/hide cursor (optional)
mode Option Grab mode (optional): none, confined, locked
icon Option Cursor icon (optional)

CursorIcon (Enum)

  • default
  • context-menu
  • help
  • pointer
  • progress
  • wait
  • cell
  • crosshair
  • text
  • vertical-text
  • alias
  • copy
  • move
  • no-drop
  • not-allowed
  • grab
  • grabbing
  • e-resize
  • n-resize
  • ne-resize
  • nw-resize
  • s-resize
  • se-resize
  • sw-resize
  • w-resize
  • ew-resize
  • ns-resize
  • nesw-resize
  • nwse-resize
  • col-resize
  • row-resize
  • all-scroll
  • zoom-in
  • zoom-out

Response

Returns CmdResultWindowCursor:

Field Type Description
success bool Whether command was applied successfully
message String Status or error

Notes

  • All fields are optional: send only the subset you want to update.
  • When icon is sent by host command, the icon becomes a persistent window override and has priority over cursor updates from the UI pipeline.
  • Capture changes emit WindowEvent::OnPointerCaptureChange.
  • In browsers, Escape may release pointer lock due to platform policy; the core reports this change via capture event.
Documentation Vulfram Core