1 | /*
|
---|
2 | * Copyright (c) 2002-2003 Torrey T. Lyons. All Rights Reserved.
|
---|
3 | *
|
---|
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:
|
---|
11 | *
|
---|
12 | * The above copyright notice and this permission notice shall be included
|
---|
13 | * in all copies or substantial portions of the Software.
|
---|
14 | *
|
---|
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.
|
---|
22 | *
|
---|
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
|
---|
26 | * authorization.
|
---|
27 | */
|
---|
28 | /* $XFree86: xc/programs/Xserver/hw/darwin/quartz/Preferences.h,v 1.2 2003/01/15 02:34:05 torrey Exp $ */
|
---|
29 |
|
---|
30 | #import <Cocoa/Cocoa.h>
|
---|
31 |
|
---|
32 | @interface Preferences : NSObject
|
---|
33 | {
|
---|
34 | IBOutlet NSPanel *window;
|
---|
35 | IBOutlet id displayField;
|
---|
36 | IBOutlet id dockSwitchButton;
|
---|
37 | IBOutlet id fakeButton;
|
---|
38 | IBOutlet id button2ModifiersMatrix;
|
---|
39 | IBOutlet id button3ModifiersMatrix;
|
---|
40 | IBOutlet id switchKeyButton;
|
---|
41 | IBOutlet id keymapFileField;
|
---|
42 | IBOutlet id modeMatrix;
|
---|
43 | IBOutlet id modeWindowButton;
|
---|
44 | IBOutlet id startupHelpButton;
|
---|
45 | IBOutlet id systemBeepButton;
|
---|
46 | IBOutlet id mouseAccelChangeButton;
|
---|
47 | IBOutlet id useXineramaButton;
|
---|
48 | IBOutlet id addToPathButton;
|
---|
49 | IBOutlet id addToPathField;
|
---|
50 | IBOutlet id useDefaultShellMatrix;
|
---|
51 | IBOutlet id useOtherShellField;
|
---|
52 | IBOutlet id depthButton;
|
---|
53 |
|
---|
54 | BOOL isGettingKeyCode;
|
---|
55 | int keyCode;
|
---|
56 | int modifiers;
|
---|
57 | NSMutableString *switchString;
|
---|
58 | }
|
---|
59 |
|
---|
60 | - (IBAction)close:(id)sender;
|
---|
61 | - (IBAction)pickFile:(id)sender;
|
---|
62 | - (IBAction)saveChanges:(id)sender;
|
---|
63 | - (IBAction)setKey:(id)sender;
|
---|
64 |
|
---|
65 | - (BOOL)sendEvent:(NSEvent *)anEvent;
|
---|
66 |
|
---|
67 | - (void)awakeFromNib;
|
---|
68 | - (void)windowWillClose:(NSNotification *)aNotification;
|
---|
69 |
|
---|
70 | + (void)setUseKeymapFile:(BOOL)newUseKeymapFile;
|
---|
71 | + (void)setKeymapFile:(NSString *)newFile;
|
---|
72 | + (void)setSwitchString:(NSString *)newString;
|
---|
73 | + (void)setKeyCode:(int)newKeyCode;
|
---|
74 | + (void)setModifiers:(int)newModifiers;
|
---|
75 | + (void)setDisplay:(int)newDisplay;
|
---|
76 | + (void)setDockSwitch:(BOOL)newDockSwitch;
|
---|
77 | + (void)setFakeButtons:(BOOL)newFakeButtons;
|
---|
78 | + (void)setButton2Mask:(int)newFakeMask;
|
---|
79 | + (void)setButton3Mask:(int)newFakeMask;
|
---|
80 | + (void)setMouseAccelChange:(BOOL)newMouseAccelChange;
|
---|
81 | + (void)setUseQDCursor:(int)newUseQDCursor;
|
---|
82 | + (void)setRootless:(BOOL)newRootless;
|
---|
83 | + (void)setUseAGL:(BOOL)newUseAGL;
|
---|
84 | + (void)setModeWindow:(BOOL)newModeWindow;
|
---|
85 | + (void)setStartupHelp:(BOOL)newStartupHelp;
|
---|
86 | + (void)setSystemBeep:(BOOL)newSystemBeep;
|
---|
87 | + (void)setEnableKeyEquivalents:(BOOL)newKeyEquivs;
|
---|
88 | + (void)setXinerama:(BOOL)newXinerama;
|
---|
89 | + (void)setAddToPath:(BOOL)newAddToPath;
|
---|
90 | + (void)setAddToPathString:(NSString *)newAddToPathString;
|
---|
91 | + (void)setUseDefaultShell:(BOOL)newUseDefaultShell;
|
---|
92 | + (void)setShellString:(NSString *)newShellString;
|
---|
93 | + (void)setDepth:(int)newDepth;
|
---|
94 | + (void)setDisplayModeBundles:(NSArray *)newBundles;
|
---|
95 | + (void)saveToDisk;
|
---|
96 |
|
---|
97 | + (BOOL)useKeymapFile;
|
---|
98 | + (NSString *)keymapFile;
|
---|
99 | + (NSString *)switchString;
|
---|
100 | + (unsigned int)keyCode;
|
---|
101 | + (unsigned int)modifiers;
|
---|
102 | + (int)display;
|
---|
103 | + (BOOL)dockSwitch;
|
---|
104 | + (BOOL)fakeButtons;
|
---|
105 | + (int)button2Mask;
|
---|
106 | + (int)button3Mask;
|
---|
107 | + (BOOL)mouseAccelChange;
|
---|
108 | + (int)useQDCursor;
|
---|
109 | + (BOOL)rootless;
|
---|
110 | + (BOOL)useAGL;
|
---|
111 | + (BOOL)modeWindow;
|
---|
112 | + (BOOL)startupHelp;
|
---|
113 | + (BOOL)systemBeep;
|
---|
114 | + (BOOL)enableKeyEquivalents;
|
---|
115 | + (BOOL)xinerama;
|
---|
116 | + (BOOL)addToPath;
|
---|
117 | + (NSString *)addToPathString;
|
---|
118 | + (BOOL)useDefaultShell;
|
---|
119 | + (NSString *)shellString;
|
---|
120 | + (int)depth;
|
---|
121 | + (NSArray *)displayModeBundles;
|
---|
122 |
|
---|
123 | @end
|
---|
124 |
|
---|
125 | // Possible settings for useQDCursor
|
---|
126 | enum {
|
---|
127 | qdCursor_Never, // never use QuickDraw cursor
|
---|
128 | qdCursor_Not8Bit, // don't try to use QuickDraw with 8-bit depth
|
---|
129 | qdCursor_Always // always try to use QuickDraw cursor
|
---|
130 | };
|
---|
131 |
|
---|
132 | // Possible settings for depth
|
---|
133 | enum {
|
---|
134 | depth_Current,
|
---|
135 | depth_8Bit,
|
---|
136 | depth_15Bit,
|
---|
137 | depth_24Bit
|
---|
138 | };
|
---|