Changeset View
Changeset View
Standalone View
Standalone View
intern/ghost/intern/GHOST_SystemPathsCocoa.mm
| Show All 13 Lines | |||||
| * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. | * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. | ||||
| * | * | ||||
| * The Original Code is Copyright (C) 2010 Blender Foundation. | * The Original Code is Copyright (C) 2010 Blender Foundation. | ||||
| * All rights reserved. | * All rights reserved. | ||||
| * | * | ||||
| * | * | ||||
| */ | */ | ||||
| #import <Foundation/Foundation.h> | #import <Cocoa/Cocoa.h> | ||||
| #include "GHOST_SystemPathsCocoa.h" | #include "GHOST_SystemPathsCocoa.h" | ||||
| #pragma mark initialization/finalization | #pragma mark initialization/finalization | ||||
| GHOST_SystemPathsCocoa::GHOST_SystemPathsCocoa() | GHOST_SystemPathsCocoa::GHOST_SystemPathsCocoa() | ||||
| { | { | ||||
| } | } | ||||
| ▲ Show 20 Lines • Show All 74 Lines • ▼ Show 20 Lines | const GHOST_TUns8 *GHOST_SystemPathsCocoa::getBinaryDir() const | ||||
| strcpy((char *)tempPath, [basePath cStringUsingEncoding:NSASCIIStringEncoding]); | strcpy((char *)tempPath, [basePath cStringUsingEncoding:NSASCIIStringEncoding]); | ||||
| [pool drain]; | [pool drain]; | ||||
| return tempPath; | return tempPath; | ||||
| } | } | ||||
| void GHOST_SystemPathsCocoa::addToSystemRecentFiles(const char *filename) const | void GHOST_SystemPathsCocoa::addToSystemRecentFiles(const char *filename) const | ||||
| { | { | ||||
| /* TODO: implement for macOS */ | NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; | ||||
| NSString *pathString = [NSString stringWithUTF8String:filename]; | |||||
| NSURL *pathUrl = [NSURL fileURLWithPath:pathString]; | |||||
| [[NSDocumentController sharedDocumentController] noteNewRecentDocumentURL:pathUrl]; | |||||
| [pool drain]; | |||||
| } | } | ||||