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 const NSString* const keyForceBootConfigPath = @"forceBootConfigPath";
17static const NSString* const keySwapHD01 = @"swapHD01";
18static const NSString* const keySwapHD02 = @"swapHD02";
19static const NSString* const keyUseFrozenParts = @"useFrozenParts";
20static const NSString* const keyPartitionsList = @"partitionsList";
21static const NSString* const kPreferencesFilePath = @"/Library/Preferences/org.chameleon.prefPane.plist";
22static const 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@private
39// Objects corresponding to the interface mapping:
40IBOutlet NSButton *mSleepButton;
41IBOutlet NSButton *mShutDownButton;
42IBOutlet NSButton *mRestartButton;
43IBOutlet NSTextField*mStatusText;
44IBOutlet NSBox*mOptions;
45
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: 313