1 | //␊ |
2 | // ChameleonPrefPane.h␊ |
3 | // ChameleonPrefPane␊ |
4 | //␊ |
5 | // Created by Rekursor on 1/16/10.␊ |
6 | //␊ |
7 | ␊ |
8 | #import <PreferencePanes/PreferencePanes.h>␊ |
9 | #import <SecurityFoundation/SFAuthorization.h>␊ |
10 | #import <SecurityInterface/SFAuthorizationView.h>␊ |
11 | #import "CustomTableView.h"␊ |
12 | #import "RoundedBox.h"␊ |
13 | ␊ |
14 | ␊ |
15 | // Constants definition␊ |
16 | #define keyForceBootConfigPath @"forceBootConfigPath"␊ |
17 | #define keyCdBootPath @"CdBootPath"␊ |
18 | #define keySwapHD01 @"swapHD01"␊ |
19 | #define keySwapHD02 @"swapHD02"␊ |
20 | #define keyUseFrozenParts @"useFrozenParts"␊ |
21 | #define keyPartitionsList @"partitionsList"␊ |
22 | #define kPreferencesFilePath @"/Library/Preferences/org.chameleon.prefPane.plist"␊ |
23 | #define keyPreferencesFileVersion @"version" // for future back compatibility␊ |
24 | ␊ |
25 | // Interface␊ |
26 | ␊ |
27 | @interface ChameleonPrefPane : NSPreferencePane ␊ |
28 | {␊ |
29 | @public␊ |
30 | IBOutlet SFAuthorizationView *authView;␊ |
31 | ␉␊ |
32 | ␉IBOutlet RoundedBox * box;␊ |
33 | ␉IBOutlet RoundedBox * footer;␊ |
34 | IBOutlet NSColorWell *gradientStartColorWell;␊ |
35 | IBOutlet NSColorWell *gradientEndColorWell;␊ |
36 | IBOutlet NSColorWell *backgroundColorWell;␊ |
37 | IBOutlet NSColorWell *borderColorWell;␊ |
38 | ␉IBOutlet NSView *mainView;␊ |
39 | ␊ |
40 | @private␊ |
41 | ␉// Objects corresponding to the interface mapping:␊ |
42 | ␉IBOutlet NSButton *␉␉␉mSleepButton;␊ |
43 | ␉IBOutlet NSButton *␉␉␉mShutDownButton;␊ |
44 | ␉IBOutlet NSButton *␉␉␉mRestartButton;␊ |
45 | ␉IBOutlet NSTextField*␉␉mStatusText;␊ |
46 | ␉IBOutlet NSBox*␉␉␉␉mOptions;␊ |
47 | ␊ |
48 | ␊ |
49 | ␉NSMutableDictionary*␉␉mOptionsDict;␊ |
50 | ␉NSMutableDictionary*␉␉mPartitionsDict;␊ |
51 | ␊ |
52 | ␉int␉␉␉␉␉␉␉mPreferenceFileVersion; ␊ |
53 | }␊ |
54 | ␊ |
55 | + (ChameleonPrefPane*) instance; // return the current instance␊ |
56 | - (void) loadPreferences;␊ |
57 | - (bool) savePreferences: (NSDictionary*) dict;␊ |
58 | - (NSMutableDictionary*) preferencesFile;␊ |
59 | - (NSMutableDictionary*) preferencesParts;␊ |
60 | ␊ |
61 | - (IBAction)onRestart: (id)sender;␊ |
62 | - (IBAction)onShutdown: (id)sender;␊ |
63 | - (IBAction)onSleep: (id)sender;␊ |
64 | ␊ |
65 | - (void)awakeFromNib;␊ |
66 | - (void)initBootConfig;␊ |
67 | - (void) selectDefaultPartition;␊ |
68 | ␊ |
69 | - (bool)isUnlocked;␊ |
70 | - (void) refreshLockStates;␊ |
71 | - (␉AuthorizationRef) auth;␊ |
72 | ␊ |
73 | ␊ |
74 | @end␊ |
75 | |