source: trunk/CPFPerianPrefPaneController.h @ 1126

Revision 1126, 4.2 KB checked in by astrange, 5 years ago (diff)

Add a opener app so we have something to define public.movie UTI for new file types.

Refs #163.

Line 
1/*
2 * CPFPerianPrefPaneController.h
3 *
4 * This file is part of Perian.
5 *
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2.1 of the License, or (at your option) any later version.
10 *
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
14 * Lesser General Public License for more details.
15 *
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with FFmpeg; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
19 */
20
21#import <Cocoa/Cocoa.h>
22#import <PreferencePanes/NSPreferencePane.h>
23#import <Security/Security.h>
24
25#define ComponentInfoPlist @"ComponentInfo.plist"
26#define ObsoletesKey @"obsoletes"
27#define HumanReadableNameKey @"HumanReadableName"
28#define PERIAN_NO_BUNDLE_ID_FORMAT @"org.perian.No.Bundle.ID.%@"
29
30#define ComponentInfoDictionaryKey      @"Components"
31#define AppsToRegisterDictionaryKey @"ApplicationsToRegister"
32
33#define BundleVersionKey @"CFBundleVersion"
34#define BundleIdentifierKey @"CFBundleIdentifier"
35
36#define ComponentNameKey @"Name"
37#define ComponentArchiveNameKey @"ArchiveName"
38#define ComponentTypeKey @"Type"
39
40typedef enum
41{
42        InstallStatusInstalledInWrongLocation = 0,
43        InstallStatusNotInstalled = 1,
44        InstallStatusOutdatedWithAnotherInWrongLocation = 2,
45        InstallStatusOutdated = 3,
46        InstallStatusInstalledInBothLocations = 4,
47        InstallStatusInstalled = 5
48} InstallStatus;
49
50InstallStatus inline currentInstallStatus(InstallStatus status)
51{
52        return (status | 1);
53}
54
55BOOL inline isWrongLocationInstalled(InstallStatus status)
56{
57        return ((status & 1) == 0);
58}
59
60InstallStatus inline setWrongLocationInstalled(InstallStatus status)
61{
62        return (status & ~1);
63}
64
65typedef enum
66{
67        ComponentTypeQuickTime,
68        ComponentTypeCoreAudio,
69        ComponentTypeFramework
70} ComponentType;
71
72@interface CPFPerianPrefPaneController : NSPreferencePane
73{
74        //General Pane
75        IBOutlet NSButton                                       *button_install;
76        IBOutlet NSTextField                            *textField_installStatus;
77       
78        IBOutlet NSTextField                            *textField_currentVersion;
79        IBOutlet NSTextField                            *textField_updateStatus;
80        IBOutlet NSButton                                       *button_updateCheck;
81        IBOutlet NSButton                                       *button_autoUpdateCheck;
82       
83        //AC3 Settings in General Pane
84        IBOutlet NSPopUpButton                          *popup_ac3DynamicRangeType;
85        IBOutlet NSPopUpButton                          *popup_outputMode;
86       
87        IBOutlet NSWindow                                       *window_dynRangeSheet;
88    IBOutlet NSTextField                *textField_ac3DynamicRangeValue;
89    IBOutlet NSSlider                   *slider_ac3DynamicRangeSlider;
90       
91        IBOutlet NSButton                                       *button_loadExternalSubtitles;
92       
93        IBOutlet NSWindow                                       *window_multiChannelSheet;
94        IBOutlet NSTextField                            *textField_multiChannelText;
95        IBOutlet NSButton                                       *button_multiChannelNeverShow;
96       
97        //About
98        IBOutlet NSTextView                                     *textView_about;
99        IBOutlet NSButton                                       *button_website;
100        IBOutlet NSButton                                       *button_donate;
101        IBOutlet NSButton                                       *button_forum;
102       
103        InstallStatus                                           installStatus; //This is only marked as installed if everything is installed
104        BOOL                                                            userInstalled;
105        AuthorizationRef                                        auth;
106        NSMutableString                                         *errorString;
107       
108        NSArray                                                         *componentReplacementInfo;
109       
110        NSURL                                                           *perianForumURL;
111        NSURL                                                           *perianDonateURL;
112        NSURL                                                           *perianWebSiteURL;
113       
114        CFStringRef                                                     perianAppID;
115        CFStringRef                                                     a52AppID;
116       
117        float                                                           nextDynValue;
118}
119//General Pane
120- (IBAction)installUninstall:(id)sender;
121- (IBAction)updateCheck:(id)sender;
122- (IBAction)setAutoUpdateCheck:(id)sender;
123- (IBAction)setLoadExternalSubtitles:(id)sender;
124
125//AC3 Settings
126- (IBAction)setAC3DynamicRangePopup:(id)sender;
127- (IBAction)set2ChannelModePopup:(id)sender;
128
129- (IBAction)setAC3DynamicRangeValue:(id)sender;
130- (IBAction)setAC3DynamicRangeSlider:(id)sender;
131- (IBAction)cancelDynRangeSheet:(id)sender;
132- (IBAction)saveDynRangeSheet:(id)sender;
133
134- (IBAction)dismissMultiChannelSheet:(id)sender;
135
136//Component List
137- (NSString *)checkComponentStatusByBundleIdentifier:(NSString *)bundleID;
138
139//About
140- (IBAction)launchWebsite:(id)sender;
141- (IBAction)launchDonate:(id)sender;
142- (IBAction)launchForum:(id)sender;
143
144@end
Note: See TracBrowser for help on using the repository browser.