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