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 if(Platform.ideName == "scapp") {
26 Document.implementationClass.startup;
28 this.loadStartupFiles;
29 if(Platform.ideName == "scapp") {
31 Server.internal.makeWindow;
32 Server.local.makeWindow;
36 HIDDeviceService.releaseDeviceList;
37 if(Platform.ideName == "scapp"){
38 CocoaMenuItem.clearCustomItems;
42 // Prefer qt but fall back to cocoa if qt not installed.
43 defaultGUIScheme { if (GUI.get(\qt).notNil) {^\qt} {^\cocoa} }
44 defaultHIDScheme { ^\osx_hid }
46 setDeferredTaskInterval { |interval| _SetDeferredTaskInterval }
48 findHelpFile { | string |
53 ^this.prGetMouseCoords(Point.new);
56 prGetMouseCoords {|point|
61 // for now just write syntax colours. Could be other things.
63 var theme, file, string;
64 theme = Document.theme;
65 SCDoc.helpTargetDir.mkdir;
66 file = File.open(SCDoc.helpTargetDir ++ "/frontend.css", "w");
67 string = ".str { color: %; } /* strings */
68 .kwd { color: %; } /* special values like true, nil.. */
69 .com { color: %; } /* comments */
70 .typ { color: %; } /* class names */
71 .lit { color: %; } /* numbers and character literals */
72 .pun { color: %; } /* punctuation */
73 .pln { color: %; } /* plain text, methods and variable names */
74 .tag { color: %; } /* special variables like super, thisProcess... */
75 .dec { color: %; } /* declarations like var, const... */
76 .atn { color: %; } /* symbols */
77 .atv { color: %; } /* environment vars */".format(
78 theme.stringColor.hexString,
79 theme.specialValsColor.hexString,
80 theme.commentColor.hexString,
81 theme.classColor.hexString,
82 theme.numberColor.hexString,
83 theme.puncColor.hexString,
84 theme.textColor.hexString,
85 theme.specialVarsColor.hexString,
86 theme.declColor.hexString,
87 theme.symbolColor.hexString,
88 theme.environColor.hexString
90 file.putString(string);