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 NSPanel*␉␉␉mAboutDlg;␊ |
33 | ␉IBOutlet CustomTableView *␉mPartitionsTable;␊ |
34 | ␉IBOutlet NSTableColumn *␉mPartitionImgColumn;␊ |
35 | ␉IBOutlet NSTableColumn *␉mFileSystemColumn;␊ |
36 | ␉IBOutlet NSTableColumn *␉mPartitionNameColumn;␊ |
37 | ␉IBOutlet NSTableColumn *␉mPartitionIDColumn;␊ |
38 | ␉IBOutlet NSButton *␉␉␉mSleepButton;␊ |
39 | ␉IBOutlet NSButton *␉␉␉mShutDownButton;␊ |
40 | ␉IBOutlet NSButton *␉␉␉mRestartButton;␊ |
41 | ␉IBOutlet NSTextField*␉␉mStatusText;␊ |
42 | ␉IBOutlet NSBox*␉␉␉␉mOptions;␊ |
43 | ␊ |
44 | ␊ |
45 | ␉NSMutableDictionary*␉␉mOptionsDict;␊ |
46 | ␉NSMutableDictionary*␉␉mPartitionsDict;␊ |
47 | ␊ |
48 | ␉NSImage*␉␉␉␉␉mMacOSXImage;␊ |
49 | ␉NSImage*␉␉␉␉␉mWindowsImage;␊ |
50 | ␉NSImage*␉␉␉␉␉mLinuxImage;␊ |
51 | ␉NSImage*␉␉␉␉␉mUnknownImage;␊ |
52 | ␉NSImage*␉␉␉␉␉mCDROMImage;␊ |
53 | ␉NSString*␉␉␉␉␉mOptionsPlistPath;␊ |
54 | ␉int␉␉␉␉␉␉␉mPreferenceFileVersion; ␊ |
55 | }␊ |
56 | ␊ |
57 | + (ChameleonPrefPane*) instance; // return the current instance␊ |
58 | - (void) loadPreferences;␊ |
59 | - (bool) savePreferences: (NSDictionary*) dict;␊ |
60 | - (NSMutableDictionary*) preferencesFile;␊ |
61 | - (NSMutableDictionary*) preferencesParts;␊ |
62 | ␊ |
63 | - (NSTableView*) partitionsTable;␊ |
64 | ␊ |
65 | - (IBAction)onRestart: (id)sender;␊ |
66 | - (IBAction)onShutdown: (id)sender;␊ |
67 | - (IBAction)onSleep: (id)sender;␊ |
68 | - (IBAction)onAbout: (id)sender;␊ |
69 | ␊ |
70 | - (void)awakeFromNib;␊ |
71 | - (void)initBootConfig;␊ |
72 | - (id) getImageResource: (NSString *) str ofType: (NSString*) sType;␊ |
73 | ␊ |
74 | - (void)tableViewSelectionDidChange:(NSNotification *)notification;␊ |
75 | - (void) selectDefaultPartition;␊ |
76 | ␊ |
77 | - (bool)isUnlocked;␊ |
78 | - (void) refreshLockStates;␊ |
79 | - (void)tableViewSelectionDidChange:(NSNotification *)notification;␊ |
80 | - (␉AuthorizationRef) auth;␊ |
81 | ␊ |
82 | @end␊ |
83 | |