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#import "CustomTableView.h"
12
13// Constants definition
14static const NSString* const keyForceBootConfigPath = @"forceBootConfigPath";
15static const NSString* const keySwapHD01 = @"swapHD01";
16static const NSString* const keySwapHD02 = @"swapHD02";
17static const NSString* const keyUseFrozenParts = @"useFrozenParts";
18static const NSString* const keyPartitionsList = @"partitionsList";
19static const NSString* const kPreferencesFilePath = @"/Library/Preferences/com.chameleon.prefPane.plist";
20static 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:
32IBOutlet CustomTableView *mPartitionsTable;
33IBOutlet NSTableColumn *mPartitionImgColumn;
34IBOutlet NSTableColumn *mFileSystemColumn;
35IBOutlet NSTableColumn *mPartitionNameColumn;
36IBOutlet NSTableColumn *mPartitionIDColumn;
37IBOutlet NSButton *mSleepButton;
38IBOutlet NSButton *mShutDownButton;
39IBOutlet NSButton *mRestartButton;
40IBOutlet NSTextField*mStatusText;
41IBOutlet NSBox*mOptions;
42
43
44NSMutableDictionary*mOptionsDict;
45NSMutableDictionary*mPartitionsDict;
46
47NSImage*mMacOSXImage;
48NSImage*mWindowsImage;
49NSImage*mLinuxImage;
50NSImage*mUnknownImage;
51NSImage*mCDROMImage;
52NSString*mOptionsPlistPath;
53intmPreferenceFileVersion;
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

Archive Download this file

Revision: 71