#Change cursor icon?

11 messages · Page 1 of 1 (latest)

static swift
#

How would I go about making my app make the cursor icon busy?

sand mulch
#

When inside the window or for the entire OS?

#

If it's just inside the window, you can use JS or CSS.
JS: document.documentElement.style.cursor = "wait"
CSS: html { cursor: wait; }

sand mulch
#

If you want to change the icon for a specific window from Rust:

if let Err(e) = window.set_cursor_icon(tauri::CursorIcon::Wait) {
  println!("failed to set cursor icon: {}", e);
}
hoary jewel
#

@sand mulch I'm not the OP but curious to know how would you do it for the whole OS?

Call OS-api's using c/obj-c/swift or is there a more ergonomic way via Rust?

sand mulch
#

If you can call the APIs using C, you can call them using Rust in an unsafe block.

#

Microsoft made a couple of Rust libraries for their Windows APIs.

static swift
#

I would want to do it for the whole OS yeah

#

was just wondering if there was a tauri way of doing it cross platform