2 * Copyright (c) 2002-2003 Torrey T. Lyons. All Rights Reserved.
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the
6 * "Software"), to deal in the Software without restriction, including
7 * without limitation the rights to use, copy, modify, merge, publish,
8 * distribute, sublicense, and/or sell copies of the Software, and to
9 * permit persons to whom the Software is furnished to do so, subject to
10 * the following conditions:
12 * The above copyright notice and this permission notice shall be included
13 * in all copies or substantial portions of the Software.
15 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
16 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
17 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
18 * IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT HOLDER(S) BE LIABLE FOR ANY
19 * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
20 * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
21 * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
23 * Except as contained in this notice, the name(s) of the above copyright
24 * holders shall not be used in advertising or otherwise to promote the
25 * sale, use or other dealings in this Software without prior written
29 #import <Cocoa/Cocoa.h>
31 @interface Preferences
: NSObject
33 IBOutlet NSPanel
*window
;
34 IBOutlet id displayField
;
35 IBOutlet id dockSwitchButton
;
36 IBOutlet id fakeButton
;
37 IBOutlet id button2ModifiersMatrix
;
38 IBOutlet id button3ModifiersMatrix
;
39 IBOutlet id switchKeyButton
;
40 IBOutlet id keymapFileField
;
41 IBOutlet id modeMatrix
;
42 IBOutlet id modeWindowButton
;
43 IBOutlet id startupHelpButton
;
44 IBOutlet id systemBeepButton
;
45 IBOutlet id mouseAccelChangeButton
;
46 IBOutlet id useXineramaButton
;
47 IBOutlet id addToPathButton
;
48 IBOutlet id addToPathField
;
49 IBOutlet id useDefaultShellMatrix
;
50 IBOutlet id useOtherShellField
;
51 IBOutlet id depthButton
;
53 BOOL isGettingKeyCode
;
56 NSMutableString
*switchString
;
59 - (IBAction
)close
:(id
)sender
;
60 - (IBAction
)pickFile
:(id
)sender
;
61 - (IBAction
)saveChanges
:(id
)sender
;
62 - (IBAction
)setKey
:(id
)sender
;
64 - (BOOL
)sendEvent
:(NSEvent
*)anEvent
;
67 - (void)windowWillClose
:(NSNotification
*)aNotification
;
69 + (void)setUseKeymapFile
:(BOOL
)newUseKeymapFile
;
70 + (void)setKeymapFile
:(NSString
*)newFile
;
71 + (void)setSwitchString
:(NSString
*)newString
;
72 + (void)setKeyCode
:(int)newKeyCode
;
73 + (void)setModifiers
:(int)newModifiers
;
74 + (void)setDisplay
:(int)newDisplay
;
75 + (void)setDockSwitch
:(BOOL
)newDockSwitch
;
76 + (void)setFakeButtons
:(BOOL
)newFakeButtons
;
77 + (void)setButton2Mask
:(int)newFakeMask
;
78 + (void)setButton3Mask
:(int)newFakeMask
;
79 + (void)setMouseAccelChange
:(BOOL
)newMouseAccelChange
;
80 + (void)setUseQDCursor
:(int)newUseQDCursor
;
81 + (void)setRootless
:(BOOL
)newRootless
;
82 + (void)setUseAGL
:(BOOL
)newUseAGL
;
83 + (void)setModeWindow
:(BOOL
)newModeWindow
;
84 + (void)setStartupHelp
:(BOOL
)newStartupHelp
;
85 + (void)setSystemBeep
:(BOOL
)newSystemBeep
;
86 + (void)setEnableKeyEquivalents
:(BOOL
)newKeyEquivs
;
87 + (void)setXinerama
:(BOOL
)newXinerama
;
88 + (void)setAddToPath
:(BOOL
)newAddToPath
;
89 + (void)setAddToPathString
:(NSString
*)newAddToPathString
;
90 + (void)setUseDefaultShell
:(BOOL
)newUseDefaultShell
;
91 + (void)setShellString
:(NSString
*)newShellString
;
92 + (void)setDepth
:(int)newDepth
;
93 + (void)setDisplayModeBundles
:(NSArray
*)newBundles
;
96 + (BOOL
)useKeymapFile
;
97 + (NSString
*)keymapFile
;
98 + (NSString
*)switchString
;
99 + (unsigned int)keyCode
;
100 + (unsigned int)modifiers
;
106 + (BOOL
)mouseAccelChange
;
113 + (BOOL
)enableKeyEquivalents
;
116 + (NSString
*)addToPathString
;
117 + (BOOL
)useDefaultShell
;
118 + (NSString
*)shellString
;
120 + (NSArray
*)displayModeBundles
;
124 // Possible settings for useQDCursor
126 qdCursor_Never
, // never use QuickDraw cursor
127 qdCursor_Not8Bit
, // don't try to use QuickDraw with 8-bit depth
128 qdCursor_Always
// always try to use QuickDraw cursor
131 // Possible settings for depth