I'm trying to implement the example provided at https://docs.rs/tauri/latest/tauri/window/struct.Window.html. Specifically the bit setting the background color of a macos window. There are three errors in the code:
#[cfg(target_os = "macos")]
unsafe {
let () = msg_send![win.inner(), setPageZoom: 4.];
let () = msg_send![win.controller(), removeAllUserScripts];
let bg_color: cocoa::base::id = msg_send![class!(NSColor), colorWithDeviceRed:0.5 green:0.2 blue:0.4 alpha:1.];
let () = msg_send![win.ns_window(), setBackgroundColor: bg_color];
}
win.inner() - no method inner found for struct Window
win.controller() - no method controller found for struct Window
msg_send![win.ns_window(), setBackgroundColor: bg_color]; - type Result<*mut c_void, tauri::Error> cannot be dereferenced