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#import "RoundedBox.h"
13
14
15// Constants definition
16static NSString* keyForceBootConfigPath = @"forceBootConfigPath";
17static NSString* keySwapHD01 = @"swapHD01";
18static NSString* keySwapHD02 = @"swapHD02";
19static NSString* keyUseFrozenParts = @"useFrozenParts";
20static NSString* keyPartitionsList = @"partitionsList";
21static NSString* kPreferencesFilePath = @"/Library/Preferences/org.chameleon.prefPane.plist";
22static NSString* const keyPreferencesFileVersion = @"version"; // for future back compatibility
23
24// Interface
25
26@interface ChameleonPrefPane : NSPreferencePane
27{
28@public
29 IBOutlet SFAuthorizationView *authView;
30
31IBOutlet RoundedBox * box;
32IBOutlet RoundedBox * footer;
33 IBOutlet NSColorWell *gradientStartColorWell;
34 IBOutlet NSColorWell *gradientEndColorWell;
35 IBOutlet NSColorWell *backgroundColorWell;
36 IBOutlet NSColorWell *borderColorWell;
37IBOutlet NSView *mainView;
38
39@private
40// Objects corresponding to the interface mapping:
41IBOutlet NSButton *mSleepButton;
42IBOutlet NSButton *mShutDownButton;
43IBOutlet NSButton *mRestartButton;
44IBOutlet NSTextField*mStatusText;
45IBOutlet NSBox*mOptions;
46
47
48NSMutableDictionary*mOptionsDict;
49NSMutableDictionary*mPartitionsDict;
50
51intmPreferenceFileVersion;
52}
53
54+ (ChameleonPrefPane*) instance; // return the current instance
55- (void) loadPreferences;
56- (bool) savePreferences: (NSDictionary*) dict;
57- (NSMutableDictionary*) preferencesFile;
58- (NSMutableDictionary*) preferencesParts;
59
60- (IBAction)onRestart: (id)sender;
61- (IBAction)onShutdown: (id)sender;
62- (IBAction)onSleep: (id)sender;
63
64- (void)awakeFromNib;
65- (void)initBootConfig;
66- (void) selectDefaultPartition;
67
68- (bool)isUnlocked;
69- (void) refreshLockStates;
70- (AuthorizationRef) auth;
71
72
73@end
74

Archive Download this file

Revision: 385