diff options
author | don bright <hugh.m.bright@gmail.com> | 2013-02-24 03:54:53 (GMT) |
---|---|---|
committer | don bright <hugh.m.bright@gmail.com> | 2013-02-24 03:54:53 (GMT) |
commit | ca41979ee514f642c506e4f4d81461f19b587bf2 (patch) | |
tree | f31feb004d0b724d5240c8a227c7f0c886939a1b /src/CocoaUtils.mm | |
parent | eff16283358217b43b310269a72e0cb47357a8b3 (diff) | |
parent | abc9da96c89b337377ee62ac29ee54e4e7b0a514 (diff) |
Merge branch 'master' of github.com:openscad/openscad into issue11_2
Conflicts:
RELEASE_NOTES
openscad.pro
src/mainwin.cc
Diffstat (limited to 'src/CocoaUtils.mm')
-rw-r--r-- | src/CocoaUtils.mm | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/CocoaUtils.mm b/src/CocoaUtils.mm new file mode 100644 index 0000000..295ceb9 --- /dev/null +++ b/src/CocoaUtils.mm @@ -0,0 +1,15 @@ +#include "CocoaUtils.h" +#import <Foundation/Foundation.h> +#include <stdio.h> + +void CocoaUtils::endApplication() +{ + [[NSNotificationCenter defaultCenter] + postNotificationName:@"NSApplicationWillTerminateNotification" + object:nil]; +} + +std::string CocoaUtils::documentsPath() +{ + return std::string([[NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES) lastObject] UTF8String]); +} |