ui/cocoa/toolkit.m

changeset 1143
218ada0d4017
parent 1081
1126fb7d174e
child 1144
6e9da0736c33
equal deleted inserted replaced
1142:e2a6707aa1e0 1143:218ada0d4017
128 uic_application_exit(&e); 128 uic_application_exit(&e);
129 } 129 }
130 130
131 void ui_main(void) { 131 void ui_main(void) {
132 NSApplicationMain(app_argc, app_argv); 132 NSApplicationMain(app_argc, app_argv);
133 //[NSApp finishLaunching];
134 //[NSApp activateIgnoringOtherApps:YES];
135 //[NSApp run];
133 if(exit_on_shutdown) { 136 if(exit_on_shutdown) {
134 exit(0); 137 exit(0);
135 } 138 }
136 } 139 }
137 140
143 // TODO 146 // TODO
144 } 147 }
145 148
146 void ui_app_quit(void) { 149 void ui_app_quit(void) {
147 [[NSApplication sharedApplication] terminate:nil]; 150 [[NSApplication sharedApplication] terminate:nil];
151 }
152
153 void ui_open_uri(const char *uri) {
154 NSString *urlString = [NSString stringWithUTF8String:uri];
155 NSURL *url = [NSURL URLWithString:urlString];
156 [[NSWorkspace sharedWorkspace] openURL:url];
148 } 157 }
149 158
150 /* ------------------- Window Visibility functions ------------------- */ 159 /* ------------------- Window Visibility functions ------------------- */
151 160
152 void ui_show(UiObject *obj) { 161 void ui_show(UiObject *obj) {

mercurial