45e9809aff7304721fddb95654901b32195c9c7avboxsync/*
45e9809aff7304721fddb95654901b32195c9c7avboxsync * Copyright (c) 2002-2003 Torrey T. Lyons. All Rights Reserved.
45e9809aff7304721fddb95654901b32195c9c7avboxsync *
45e9809aff7304721fddb95654901b32195c9c7avboxsync * Permission is hereby granted, free of charge, to any person obtaining a
45e9809aff7304721fddb95654901b32195c9c7avboxsync * copy of this software and associated documentation files (the
45e9809aff7304721fddb95654901b32195c9c7avboxsync * "Software"), to deal in the Software without restriction, including
45e9809aff7304721fddb95654901b32195c9c7avboxsync * without limitation the rights to use, copy, modify, merge, publish,
45e9809aff7304721fddb95654901b32195c9c7avboxsync * distribute, sublicense, and/or sell copies of the Software, and to
45e9809aff7304721fddb95654901b32195c9c7avboxsync * permit persons to whom the Software is furnished to do so, subject to
45e9809aff7304721fddb95654901b32195c9c7avboxsync * the following conditions:
45e9809aff7304721fddb95654901b32195c9c7avboxsync *
45e9809aff7304721fddb95654901b32195c9c7avboxsync * The above copyright notice and this permission notice shall be included
45e9809aff7304721fddb95654901b32195c9c7avboxsync * in all copies or substantial portions of the Software.
45e9809aff7304721fddb95654901b32195c9c7avboxsync *
45e9809aff7304721fddb95654901b32195c9c7avboxsync * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
45e9809aff7304721fddb95654901b32195c9c7avboxsync * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
45e9809aff7304721fddb95654901b32195c9c7avboxsync * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
45e9809aff7304721fddb95654901b32195c9c7avboxsync * IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT HOLDER(S) BE LIABLE FOR ANY
45e9809aff7304721fddb95654901b32195c9c7avboxsync * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
45e9809aff7304721fddb95654901b32195c9c7avboxsync * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
45e9809aff7304721fddb95654901b32195c9c7avboxsync * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
45e9809aff7304721fddb95654901b32195c9c7avboxsync *
45e9809aff7304721fddb95654901b32195c9c7avboxsync * Except as contained in this notice, the name(s) of the above copyright
45e9809aff7304721fddb95654901b32195c9c7avboxsync * holders shall not be used in advertising or otherwise to promote the
45e9809aff7304721fddb95654901b32195c9c7avboxsync * sale, use or other dealings in this Software without prior written
45e9809aff7304721fddb95654901b32195c9c7avboxsync * authorization.
45e9809aff7304721fddb95654901b32195c9c7avboxsync */
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsync#import <Cocoa/Cocoa.h>
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsync@interface Preferences : NSObject
45e9809aff7304721fddb95654901b32195c9c7avboxsync{
45e9809aff7304721fddb95654901b32195c9c7avboxsync IBOutlet NSPanel *window;
45e9809aff7304721fddb95654901b32195c9c7avboxsync IBOutlet id displayField;
45e9809aff7304721fddb95654901b32195c9c7avboxsync IBOutlet id dockSwitchButton;
45e9809aff7304721fddb95654901b32195c9c7avboxsync IBOutlet id fakeButton;
45e9809aff7304721fddb95654901b32195c9c7avboxsync IBOutlet id button2ModifiersMatrix;
45e9809aff7304721fddb95654901b32195c9c7avboxsync IBOutlet id button3ModifiersMatrix;
45e9809aff7304721fddb95654901b32195c9c7avboxsync IBOutlet id switchKeyButton;
45e9809aff7304721fddb95654901b32195c9c7avboxsync IBOutlet id keymapFileField;
45e9809aff7304721fddb95654901b32195c9c7avboxsync IBOutlet id modeMatrix;
45e9809aff7304721fddb95654901b32195c9c7avboxsync IBOutlet id modeWindowButton;
45e9809aff7304721fddb95654901b32195c9c7avboxsync IBOutlet id startupHelpButton;
45e9809aff7304721fddb95654901b32195c9c7avboxsync IBOutlet id systemBeepButton;
45e9809aff7304721fddb95654901b32195c9c7avboxsync IBOutlet id mouseAccelChangeButton;
45e9809aff7304721fddb95654901b32195c9c7avboxsync IBOutlet id useXineramaButton;
45e9809aff7304721fddb95654901b32195c9c7avboxsync IBOutlet id addToPathButton;
45e9809aff7304721fddb95654901b32195c9c7avboxsync IBOutlet id addToPathField;
45e9809aff7304721fddb95654901b32195c9c7avboxsync IBOutlet id useDefaultShellMatrix;
45e9809aff7304721fddb95654901b32195c9c7avboxsync IBOutlet id useOtherShellField;
45e9809aff7304721fddb95654901b32195c9c7avboxsync IBOutlet id depthButton;
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsync BOOL isGettingKeyCode;
45e9809aff7304721fddb95654901b32195c9c7avboxsync int keyCode;
45e9809aff7304721fddb95654901b32195c9c7avboxsync int modifiers;
45e9809aff7304721fddb95654901b32195c9c7avboxsync NSMutableString *switchString;
45e9809aff7304721fddb95654901b32195c9c7avboxsync}
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsync- (IBAction)close:(id)sender;
45e9809aff7304721fddb95654901b32195c9c7avboxsync- (IBAction)pickFile:(id)sender;
45e9809aff7304721fddb95654901b32195c9c7avboxsync- (IBAction)saveChanges:(id)sender;
45e9809aff7304721fddb95654901b32195c9c7avboxsync- (IBAction)setKey:(id)sender;
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsync- (BOOL)sendEvent:(NSEvent *)anEvent;
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsync- (void)awakeFromNib;
45e9809aff7304721fddb95654901b32195c9c7avboxsync- (void)windowWillClose:(NSNotification *)aNotification;
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsync+ (void)setUseKeymapFile:(BOOL)newUseKeymapFile;
45e9809aff7304721fddb95654901b32195c9c7avboxsync+ (void)setKeymapFile:(NSString *)newFile;
45e9809aff7304721fddb95654901b32195c9c7avboxsync+ (void)setSwitchString:(NSString *)newString;
45e9809aff7304721fddb95654901b32195c9c7avboxsync+ (void)setKeyCode:(int)newKeyCode;
45e9809aff7304721fddb95654901b32195c9c7avboxsync+ (void)setModifiers:(int)newModifiers;
45e9809aff7304721fddb95654901b32195c9c7avboxsync+ (void)setDisplay:(int)newDisplay;
45e9809aff7304721fddb95654901b32195c9c7avboxsync+ (void)setDockSwitch:(BOOL)newDockSwitch;
45e9809aff7304721fddb95654901b32195c9c7avboxsync+ (void)setFakeButtons:(BOOL)newFakeButtons;
45e9809aff7304721fddb95654901b32195c9c7avboxsync+ (void)setButton2Mask:(int)newFakeMask;
45e9809aff7304721fddb95654901b32195c9c7avboxsync+ (void)setButton3Mask:(int)newFakeMask;
45e9809aff7304721fddb95654901b32195c9c7avboxsync+ (void)setMouseAccelChange:(BOOL)newMouseAccelChange;
45e9809aff7304721fddb95654901b32195c9c7avboxsync+ (void)setUseQDCursor:(int)newUseQDCursor;
45e9809aff7304721fddb95654901b32195c9c7avboxsync+ (void)setRootless:(BOOL)newRootless;
45e9809aff7304721fddb95654901b32195c9c7avboxsync+ (void)setUseAGL:(BOOL)newUseAGL;
45e9809aff7304721fddb95654901b32195c9c7avboxsync+ (void)setModeWindow:(BOOL)newModeWindow;
45e9809aff7304721fddb95654901b32195c9c7avboxsync+ (void)setStartupHelp:(BOOL)newStartupHelp;
45e9809aff7304721fddb95654901b32195c9c7avboxsync+ (void)setSystemBeep:(BOOL)newSystemBeep;
45e9809aff7304721fddb95654901b32195c9c7avboxsync+ (void)setEnableKeyEquivalents:(BOOL)newKeyEquivs;
45e9809aff7304721fddb95654901b32195c9c7avboxsync+ (void)setXinerama:(BOOL)newXinerama;
45e9809aff7304721fddb95654901b32195c9c7avboxsync+ (void)setAddToPath:(BOOL)newAddToPath;
45e9809aff7304721fddb95654901b32195c9c7avboxsync+ (void)setAddToPathString:(NSString *)newAddToPathString;
45e9809aff7304721fddb95654901b32195c9c7avboxsync+ (void)setUseDefaultShell:(BOOL)newUseDefaultShell;
45e9809aff7304721fddb95654901b32195c9c7avboxsync+ (void)setShellString:(NSString *)newShellString;
45e9809aff7304721fddb95654901b32195c9c7avboxsync+ (void)setDepth:(int)newDepth;
45e9809aff7304721fddb95654901b32195c9c7avboxsync+ (void)setDisplayModeBundles:(NSArray *)newBundles;
45e9809aff7304721fddb95654901b32195c9c7avboxsync+ (void)saveToDisk;
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsync+ (BOOL)useKeymapFile;
45e9809aff7304721fddb95654901b32195c9c7avboxsync+ (NSString *)keymapFile;
45e9809aff7304721fddb95654901b32195c9c7avboxsync+ (NSString *)switchString;
45e9809aff7304721fddb95654901b32195c9c7avboxsync+ (unsigned int)keyCode;
45e9809aff7304721fddb95654901b32195c9c7avboxsync+ (unsigned int)modifiers;
45e9809aff7304721fddb95654901b32195c9c7avboxsync+ (int)display;
45e9809aff7304721fddb95654901b32195c9c7avboxsync+ (BOOL)dockSwitch;
45e9809aff7304721fddb95654901b32195c9c7avboxsync+ (BOOL)fakeButtons;
45e9809aff7304721fddb95654901b32195c9c7avboxsync+ (int)button2Mask;
45e9809aff7304721fddb95654901b32195c9c7avboxsync+ (int)button3Mask;
45e9809aff7304721fddb95654901b32195c9c7avboxsync+ (BOOL)mouseAccelChange;
45e9809aff7304721fddb95654901b32195c9c7avboxsync+ (int)useQDCursor;
45e9809aff7304721fddb95654901b32195c9c7avboxsync+ (BOOL)rootless;
45e9809aff7304721fddb95654901b32195c9c7avboxsync+ (BOOL)useAGL;
45e9809aff7304721fddb95654901b32195c9c7avboxsync+ (BOOL)modeWindow;
45e9809aff7304721fddb95654901b32195c9c7avboxsync+ (BOOL)startupHelp;
45e9809aff7304721fddb95654901b32195c9c7avboxsync+ (BOOL)systemBeep;
45e9809aff7304721fddb95654901b32195c9c7avboxsync+ (BOOL)enableKeyEquivalents;
45e9809aff7304721fddb95654901b32195c9c7avboxsync+ (BOOL)xinerama;
45e9809aff7304721fddb95654901b32195c9c7avboxsync+ (BOOL)addToPath;
45e9809aff7304721fddb95654901b32195c9c7avboxsync+ (NSString *)addToPathString;
45e9809aff7304721fddb95654901b32195c9c7avboxsync+ (BOOL)useDefaultShell;
45e9809aff7304721fddb95654901b32195c9c7avboxsync+ (NSString *)shellString;
45e9809aff7304721fddb95654901b32195c9c7avboxsync+ (int)depth;
45e9809aff7304721fddb95654901b32195c9c7avboxsync+ (NSArray *)displayModeBundles;
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsync@end
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsync// Possible settings for useQDCursor
45e9809aff7304721fddb95654901b32195c9c7avboxsyncenum {
45e9809aff7304721fddb95654901b32195c9c7avboxsync qdCursor_Never, // never use QuickDraw cursor
45e9809aff7304721fddb95654901b32195c9c7avboxsync qdCursor_Not8Bit, // don't try to use QuickDraw with 8-bit depth
45e9809aff7304721fddb95654901b32195c9c7avboxsync qdCursor_Always // always try to use QuickDraw cursor
45e9809aff7304721fddb95654901b32195c9c7avboxsync};
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsync// Possible settings for depth
45e9809aff7304721fddb95654901b32195c9c7avboxsyncenum {
45e9809aff7304721fddb95654901b32195c9c7avboxsync depth_Current,
45e9809aff7304721fddb95654901b32195c9c7avboxsync depth_8Bit,
45e9809aff7304721fddb95654901b32195c9c7avboxsync depth_15Bit,
45e9809aff7304721fddb95654901b32195c9c7avboxsync depth_24Bit
45e9809aff7304721fddb95654901b32195c9c7avboxsync};