summaryrefslogtreecommitdiff
path: root/libs/pbd/cocoa_open_uri.mm
blob: 90a3995d71f8a138a09eecb199540bf5c4adcfbf (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#include <CoreFoundation/CFLocale.h>
#import  <CoreFoundation/CFString.h>
#import  <Foundation/NSString.h>
#import  <Foundation/NSURL.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;
}