1 OSXPlatform : UnixPlatform
3 var <>preferencesAction;
4 var <>sleepAction, <>wakeAction, <>isSleeping=false;
8 recordingsDir = "~/Music/SuperCollider Recordings".standardizePath;
9 this.declareFeature(\unixPipes); // pipes are possible (can't declare in UnixPlatform since IPhonePlatform is unixy yet can't support pipes)
10 if (Platform.ideName == "scapp") { this.setDeferredTaskInterval(1/60); }
16 var filename = "startup.rtf";
17 var deprecated = [this.systemAppSupportDir +/+ filename, this.userAppSupportDir +/+ filename];
18 Platform.deprecatedStartupFiles(deprecated);
19 ^(deprecated ++ super.startupFiles)
23 Server.program = "exec %/scsynth".format(String.scDir.shellQuote);
25 Score.program = Server.program;
27 if(Platform.ideName == "scapp") {
28 Document.implementationClass.startup;
30 this.loadStartupFiles;
31 if(Platform.ideName == "scapp") {
33 Server.internal.makeWindow;
34 Server.local.makeWindow;
38 HIDDeviceService.releaseDeviceList;
39 if(Platform.ideName == "scapp"){
40 CocoaMenuItem.clearCustomItems;
44 // Prefer qt but fall back to cocoa if qt not installed.
45 defaultGUIScheme { if (GUI.get(\qt).notNil) {^\qt} {^\cocoa} }
46 defaultHIDScheme { ^\osx_hid }
48 setDeferredTaskInterval { |interval| _SetDeferredTaskInterval }
50 findHelpFile { | string |
55 ^this.prGetMouseCoords(Point.new);
58 prGetMouseCoords {|point|
63 // for now just write syntax colours. Could be other things.
65 var theme, file, string;
66 theme = Document.theme;
67 SCDoc.helpTargetDir.mkdir;
68 file = File.open(SCDoc.helpTargetDir ++ "/frontend.css", "w");
69 string = ".str { color: %; } /* strings */
70 .kwd { color: %; } /* special values like true, nil.. */
71 .com { color: %; } /* comments */
72 .typ { color: %; } /* class names */
73 .lit { color: %; } /* numbers and character literals */
74 .pun { color: %; } /* punctuation */
75 .pln { color: %; } /* plain text, methods and variable names */
76 .tag { color: %; } /* special variables like super, thisProcess... */
77 .dec { color: %; } /* declarations like var, const... */
78 .atn { color: %; } /* symbols */
79 .atv { color: %; } /* environment vars */".format(
80 theme.stringColor.hexString,
81 theme.specialValsColor.hexString,
82 theme.commentColor.hexString,
83 theme.classColor.hexString,
84 theme.numberColor.hexString,
85 theme.puncColor.hexString,
86 theme.textColor.hexString,
87 theme.specialVarsColor.hexString,
88 theme.declColor.hexString,
89 theme.symbolColor.hexString,
90 theme.environColor.hexString
92 file.putString(string);