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 | // Constants definition␊ |
15 | static const NSString* const keyForceBootConfigPath = @"forceBootConfigPath";␊ |
16 | static const NSString* const keySwapHD01 = @"swapHD01";␊ |
17 | static const NSString* const keySwapHD02 = @"swapHD02";␊ |
18 | static const NSString* const keyUseFrozenParts = @"useFrozenParts";␊ |
19 | static const NSString* const keyPartitionsList = @"partitionsList";␊ |
20 | static const NSString* const kPreferencesFilePath = @"/Library/Preferences/com.chameleon.prefPane.plist";␊ |
21 | static const NSString* const keyPreferencesFileVersion = @"version"; // for future back compatibility␊ |
22 | ␊ |
23 | // Interface␊ |
24 | ␊ |
25 | @interface ChameleonPrefPane : NSPreferencePane ␊ |
26 | {␊ |
27 | @public␊ |
28 | IBOutlet SFAuthorizationView *authView;␊ |
29 | ␉IBOutlet RoundedBox * box;␊ |
30 | IBOutlet NSColorWell *gradientStartColorWell;␊ |
31 | IBOutlet NSColorWell *gradientEndColorWell;␊ |
32 | IBOutlet NSColorWell *backgroundColorWell;␊ |
33 | IBOutlet NSColorWell *borderColorWell;␊ |
34 | ␉␊ |
35 | @private␊ |
36 | ␉// Objects corresponding to the interface mapping:␊ |
37 | ␉IBOutlet CustomTableView *␉mPartitionsTable;␊ |
38 | ␉IBOutlet NSTableColumn *␉mPartitionImgColumn;␊ |
39 | ␉IBOutlet NSTableColumn *␉mFileSystemColumn;␊ |
40 | ␉IBOutlet NSTableColumn *␉mPartitionNameColumn;␊ |
41 | ␉IBOutlet NSTableColumn *␉mPartitionIDColumn;␊ |
42 | ␉IBOutlet NSButton *␉␉␉mSleepButton;␊ |
43 | ␉IBOutlet NSButton *␉␉␉mShutDownButton;␊ |
44 | ␉IBOutlet NSButton *␉␉␉mRestartButton;␊ |
45 | ␉IBOutlet NSTextField*␉␉mStatusText;␊ |
46 | ␉IBOutlet NSBox*␉␉␉␉mOptions;␊ |
47 | ␉␊ |
48 | ␊ |
49 | ␊ |
50 | ␉NSMutableDictionary*␉␉mOptionsDict;␊ |
51 | ␉NSMutableDictionary*␉␉mPartitionsDict;␊ |
52 | ␊ |
53 | ␉NSImage*␉␉␉␉␉mMacOSXImage;␊ |
54 | ␉NSImage*␉␉␉␉␉mWindowsImage;␊ |
55 | ␉NSImage*␉␉␉␉␉mLinuxImage;␊ |
56 | ␉NSImage*␉␉␉␉␉mUnknownImage;␊ |
57 | ␉NSImage*␉␉␉␉␉mCDROMImage;␊ |
58 | ␉NSString*␉␉␉␉␉mOptionsPlistPath;␊ |
59 | ␉int␉␉␉␉␉␉␉mPreferenceFileVersion; ␊ |
60 | }␊ |
61 | ␊ |
62 | + (ChameleonPrefPane*) instance; // return the current instance␊ |
63 | - (void) loadPreferences;␊ |
64 | - (bool) savePreferences: (NSDictionary*) dict;␊ |
65 | - (NSMutableDictionary*) preferencesFile;␊ |
66 | - (NSMutableDictionary*) preferencesParts;␊ |
67 | ␊ |
68 | - (NSTableView*) partitionsTable;␊ |
69 | ␊ |
70 | - (IBAction)onRestart: (id)sender;␊ |
71 | - (IBAction)onShutdown: (id)sender;␊ |
72 | - (IBAction)onSleep: (id)sender;␊ |
73 | ␊ |
74 | - (void)awakeFromNib;␊ |
75 | - (void)initBootConfig;␊ |
76 | - (id) getImageResource: (NSString *) str ofType: (NSString*) sType;␊ |
77 | ␊ |
78 | - (void)tableViewSelectionDidChange:(NSNotification *)notification;␊ |
79 | - (void) selectDefaultPartition;␊ |
80 | ␊ |
81 | - (bool)isUnlocked;␊ |
82 | - (void) refreshLockStates;␊ |
83 | - (void)tableViewSelectionDidChange:(NSNotification *)notification;␊ |
84 | - (␉AuthorizationRef) auth;␊ |
85 | ␊ |
86 | @end␊ |
87 | |