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