blob: 2c6822ac94b5c92c9fb09852834671320caf7588 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
#include <CoreFoundation/CFLocale.h>
#import <CoreFoundation/CFString.h>
#import <Foundation/NSString.h>
#import <Foundation/NSAutoreleasePool.h>
#import <AppKit/NSWorkspace.h>
bool
cocoa_open_url (const char* uri)
{
NSString* struri = [[NSString alloc] initWithUTF8String:uri];
NSURL* nsurl = [[NSURL alloc] initWithString:struri];
bool ret = [[NSWorkspace sharedWorkspace] openURL:nsurl];
[struri release];
[nsurl release];
return ret;
}
|