1 /*
2   Hatari - PrefsController.h
3 
4   This file is distributed under the GNU General Public License, version 2
5   or at your option any later version. Read the file gpl.txt for details.
6 */
7 
8 #import <Cocoa/Cocoa.h>
9 
10 
11 #if (!defined MAC_OS_X_VERSION_10_12) || MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_12
12 #define NSAlertStyleInformational NSInformationalAlertStyle
13 #endif
14 
15 @interface PrefsController : NSObject
16 {
17 	// Preferences window
18 	IBOutlet NSWindow *window ;
19 	IBOutlet NSView   *partage ;
20 	IBOutlet NSView   *hartage ;
21 
22 	// Disks
23 	IBOutlet NSTextField *floppyImageA;
24 	IBOutlet NSButton    *enableDriveA;
25 	IBOutlet NSButton    *driveA_NumberOfHeads;
26 	IBOutlet NSTextField *floppyImageB;
27 	IBOutlet NSButton    *enableDriveB;
28 	IBOutlet NSButton    *driveB_NumberOfHeads;
29 	IBOutlet NSButton    *autoInsertB;
30 	IBOutlet NSButton    *fastFDC;
31 	IBOutlet NSMatrix    *floppyWriteProtection;
32 	IBOutlet NSTextField *defaultImagesLocation;
33 	IBOutlet NSTextField *hdImage;
34 	IBOutlet NSTextField *ideMasterHdImage;
35 	IBOutlet NSTextField *ideSlaveHdImage;
36 	IBOutlet NSTextField *gemdosImage;
37 	IBOutlet NSButton    *bootFromHD ;
38 	IBOutlet NSMatrix    *HDWriteProtection;
39 
40 	IBOutlet NSButton *bFilenameConversion;
41 	IBOutlet NSButton *nGemdosDrive;
42 	// ROM
43 	IBOutlet NSTextField *tosImage;
44 	IBOutlet NSTextField *cartridgeImage;
45 
46 	// Atari screen
47 	IBOutlet NSMatrix *monitor;
48 	IBOutlet NSButton *useBorders;
49 	IBOutlet NSButton *falconTTRatio;
50 	IBOutlet NSButton *zoomSTLowRes;
51 	IBOutlet NSButton *useVDIResolution;
52 	IBOutlet NSMatrix *resolution;
53 	IBOutlet NSMatrix *colorDepth;
54 
55 	// Display
56 	IBOutlet NSButton *showStatusBar;
57 	IBOutlet NSButton *fullScreen;
58 	IBOutlet NSButton *ledDisks;
59 	IBOutlet NSPopUpButton *frameSkip;
60 	IBOutlet NSTextField *maxZoomedWidth;				// N
61 	IBOutlet NSTextField *maxZoomedHeight;				// N
62 	IBOutlet NSButton *keepDesktopResolution;
63 	IBOutlet NSButton *SDL2UseLinearScaling;
64 	IBOutlet NSButton *SDL2Resizable ;
65 	IBOutlet NSButton *SDL2UseVSync ;
66 
67 	// Hidestatus, Capture only, Avi codec, Avi FPS
68 	// Sound
69 	IBOutlet NSButton *enableSound;
70 	IBOutlet NSMatrix *playbackQuality;
71 	IBOutlet NSMatrix *YMVoicesMixing;
72 
73 	// System
74 
75 	IBOutlet NSMatrix *cpuType;
76 	IBOutlet NSMatrix *cpuClock;
77 	IBOutlet NSMatrix *machineType;
78 	IBOutlet NSMatrix *ramSize;					// ram size
79 	IBOutlet NSButton *compatibleCpu; 			// bCompatibleCpu
80 	IBOutlet NSButton *blitter;
81 	IBOutlet NSButton *realTime;
82 	IBOutlet NSButton *patchTimerD;
83 	IBOutlet NSButton *FastBootPatch;
84 	IBOutlet NSPopUpButton *videoTiming;
85 	// for ENABLE_WINUAE_CPU CORE
86 	IBOutlet NSButton *cycleExactCPU;			//bCycleExactCpu
87 	IBOutlet NSButton *MMU_Emulation;
88 	IBOutlet NSButton *adressSpace24;			// bAddressSpace24
89 	IBOutlet NSStepper *TTRAMSizeStepper; 		// MS 12-2016
90 	IBOutlet NSTextField *TTRAMSizeValue;		// MS 12-2016
91 	//IBOutlet NSButton *CompatibleFPU;
92 	IBOutlet NSMatrix *FPUType;
93 
94 	IBOutlet NSButtonCell *bCell68060;
95 
96 	// load/save state
97 	IBOutlet NSPopUpButton *enableDSP;
98 
99 	// Joysticks
100 	IBOutlet NSPopUpButton *currentJoystick;
101 	IBOutlet NSMatrix *joystickMode;
102 	IBOutlet NSPopUpButton *realJoystick;
103 	IBOutlet NSPopUpButton *joystickUp;
104 	IBOutlet NSPopUpButton *joystickRight;
105 	IBOutlet NSPopUpButton *joystickDown;
106 	IBOutlet NSPopUpButton *joystickLeft;
107 	IBOutlet NSPopUpButton *joystickFire;
108 	IBOutlet NSButton *enableAutoFire;
109 
110 	// Keyboard
111 	IBOutlet NSMatrix *keyboardMapping;
112 	IBOutlet NSTextField *keyboardMappingFile;
113         // T
114 		// Disable Key Repeat
115 
116 	// Peripheral
117 	IBOutlet NSButton *enablePrinter;
118 	IBOutlet NSTextField *printToFile;					// T
119 	IBOutlet NSButton *enableRS232;
120 	IBOutlet NSTextField *writeRS232ToFile;				// T
121 	IBOutlet NSTextField *readRS232FromFile;			// T
122 	IBOutlet NSButton *enableMidi;
123 	IBOutlet NSTextField *writeMidiToFile;				// T
124 	__unsafe_unretained IBOutlet NSPopUpButton *midiInPort;
125 	__unsafe_unretained IBOutlet NSPopUpButton *midiOutPort;
126 
127 	// Other
128 
129 	__unsafe_unretained IBOutlet NSButtonCell *confirmQuit;
130 	IBOutlet NSButton *captureOnChange;
131 	IBOutlet NSButton *interleaved;
132 	IBOutlet NSSlider *nSpec512Treshold;
133 	IBOutlet NSStepper *widthStepper;
134 	IBOutlet NSStepper *heightStepper;
135 	IBOutlet NSTextField *configFile;		// T ??
136 
137 	BOOL		bInitialized;
138 	int			cRealJoysticks;
139 	int			nCurrentJoystick;
140 
141 	BOOL		applyChanges ;							// moved from
142 	NSOpenPanel	*opnPanel ;
143 	NSSavePanel *savPanel ;
144 
145 	NSMutableString		*cartridge ;
146 	NSMutableString		*imgeDir ;
147 	NSMutableString		*floppyA ;
148 	NSMutableString		*floppyB ;
149 	NSMutableString		*gemdos ;
150 	NSMutableString		*hrdDisk ;
151 	NSMutableString		*masterIDE ;
152 	NSMutableString		*slaveIDE ;
153 	NSMutableString		*keyboard ;
154 	NSMutableString		*midiOut ;
155 	NSMutableString		*printit ;
156 	NSMutableString		*rs232In ;
157 	NSMutableString		*rs232Out ;
158 	NSMutableString		*TOS ;
159 	NSMutableString		*configNm ;
160 }
161 - (IBAction)changeViewedJoystick:(id)sender;
162 - (IBAction)chooseCartridgeImage:(id)sender;
163 - (IBAction)chooseDefaultImagesLocation:(id)sender;
164 - (IBAction)chooseFloppyImageA:(id)sender;
165 - (IBAction)chooseFloppyImageB:(id)sender;
166 - (IBAction)chooseGemdosImage:(id)sender;
167 - (IBAction)chooseHdImage:(id)sender;
168 - (IBAction)chooseIdeMasterHdImage:(id)sender;
169 - (IBAction)chooseIdeSlaveHdImage:(id)sender;
170 - (IBAction)chooseKeyboardMappingFile:(id)sender;
171 - (IBAction)chooseMidiOutputFile:(id)sender;
172 - (IBAction)choosePrintToFile:(id)sender;
173 - (IBAction)chooseRS232InputFile:(id)sender;
174 - (IBAction)chooseRS232OutputFile:(id)sender;
175 - (IBAction)chooseTosImage:(id)sender;
176 - (IBAction)commitAndClose:(id)sender;
177 - (IBAction)ejectFloppyA:(id)sender;
178 - (IBAction)ejectFloppyB:(id)sender;
179 - (IBAction)ejectGemdosImage:(id)sender;
180 - (IBAction)ejectHdImage:(id)sender;
181 - (IBAction)ejectIdeMasterHdImage:(id)sender;
182 - (IBAction)ejectIdeSlaveHdImage:(id)sender;
183 - (IBAction)loadPrefs:(id)sender;
184 - (IBAction)saveConfigAs:(id)sender;
185 - (IBAction)loadConfigFrom:(id)sender;
186 - (IBAction)aller:(id)sender ;						// add
187 - (IBAction)halle:(id)sender ;						// add
188 - (IBAction)finished:(id)sender;					// add
189 
190 - (void)setAllControls;
191 - (void)saveAllControls;
192 - (void)insertFloppyImageIntoDrive:(int)drive forTextField:(NSTextField*)floppyTextField  realPath:(NSMutableString *)realPath ;
193 - (BOOL)choosePathForControl:(NSTextField*)textField chooseDirectories:(BOOL)chooseDirectories defaultInitialDir:(NSString*)defaultInitialDir
194 																					mutString:(NSMutableString *)mutString what:(NSArray *)what ;
195 - (void)initKeysDropDown:(NSPopUpButton*)dropDown;
196 - (void)setJoystickControls;
197 - (void)saveJoystickControls;
198 - (IBAction)updateEnabledStates:(id)sender;
199 - (IBAction)setWidth:(id)sender;
200 - (IBAction)setHeight:(id)sender;
201 //System RAM Stepper
202 - (IBAction)setTTRAMSize:(id)sender;
203 
204 
205 +(PrefsController*)prefs ;
206 
207 @end
208