MCPcopy Index your code
hub / github.com/endbasic/endbasic / activate_app

Function activate_app

sdl/src/host.rs:61–69  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

59/// Raises the current app to the front.
60#[cfg(target_os = "macos")]
61fn activate_app() {
62 use objc2::MainThreadMarker;
63 use objc2_app_kit::{NSApplication, NSApplicationActivationPolicy};
64
65 let mtm = MainThreadMarker::new().expect("activate_app must be called from the main thread");
66 let app = NSApplication::sharedApplication(mtm);
67 let _ = app.setActivationPolicy(NSApplicationActivationPolicy::Regular);
68 app.activate();
69}
70
71/// Number of loop iterations to poll for requests or events before sleeping.
72///

Callers 1

newMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected