Chameleon Applications

Chameleon Applications Svn Source Tree

Root/trunk/ChameleonPrefPane/Sources/ChameleonPrefPane.h

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

Archive Download this file

Revision: 47