ui/cocoa/toolkit.m

changeset 1143
218ada0d4017
parent 1081
1126fb7d174e
child 1144
6e9da0736c33
--- a/ui/cocoa/toolkit.m	Tue May 26 21:05:47 2026 +0200
+++ b/ui/cocoa/toolkit.m	Wed May 27 15:04:53 2026 +0200
@@ -130,6 +130,9 @@
 
 void ui_main(void) {
     NSApplicationMain(app_argc, app_argv);
+    //[NSApp finishLaunching];
+    //[NSApp activateIgnoringOtherApps:YES];
+    //[NSApp run];
     if(exit_on_shutdown) {
         exit(0);
     }
@@ -147,6 +150,12 @@
     [[NSApplication sharedApplication] terminate:nil];
 }
 
+void ui_open_uri(const char *uri) {
+    NSString *urlString = [NSString stringWithUTF8String:uri];
+    NSURL *url = [NSURL URLWithString:urlString];
+    [[NSWorkspace sharedWorkspace] openURL:url];
+}
+
 /* ------------------- Window Visibility functions ------------------- */
 
 void ui_show(UiObject *obj) {

mercurial