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 NSPanel*mAboutDlg;
33IBOutlet CustomTableView *mPartitionsTable;
34IBOutlet NSTableColumn *mPartitionImgColumn;
35IBOutlet NSTableColumn *mFileSystemColumn;
36IBOutlet NSTableColumn *mPartitionNameColumn;
37IBOutlet NSTableColumn *mPartitionIDColumn;
38IBOutlet NSButton *mSleepButton;
39IBOutlet NSButton *mShutDownButton;
40IBOutlet NSButton *mRestartButton;
41IBOutlet NSTextField*mStatusText;
42IBOutlet NSBox*mOptions;
43
44
45NSMutableDictionary*mOptionsDict;
46NSMutableDictionary*mPartitionsDict;
47
48NSImage*mMacOSXImage;
49NSImage*mWindowsImage;
50NSImage*mLinuxImage;
51NSImage*mUnknownImage;
52NSImage*mCDROMImage;
53NSString*mOptionsPlistPath;
54intmPreferenceFileVersion;
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

Archive Download this file

Revision: 69