0
0
mirror of https://github.com/python/cpython.git synced 2024-11-28 08:20:55 +01:00
cpython/Mac/OSX/PythonLauncher/FileSettings.h
Jack Jansen 2095c06cec Lots of restructuring, mostly suggested by Bill Bumgarner. Main
externally visible difference is that the factory defaults are
now in a plist file in the bundle, in stead of being hard-coded in
the application.
2002-11-25 13:11:06 +00:00

59 lines
1.7 KiB
Objective-C
Executable File

//
// FileSettings.h
// PythonLauncher
//
// Created by Jack Jansen on Sun Jul 21 2002.
// Copyright (c) 2002 __MyCompanyName__. All rights reserved.
//
#import <Foundation/Foundation.h>
@protocol FileSettingsSource
- (NSString *) interpreter;
- (BOOL) debug;
- (BOOL) verbose;
- (BOOL) inspect;
- (BOOL) optimize;
- (BOOL) nosite;
- (BOOL) tabs;
- (NSString *) others;
- (BOOL) with_terminal;
@end
@interface FileSettings : NSObject <FileSettingsSource>
{
NSString *interpreter; // The pathname of the interpreter to use
BOOL debug; // -d option: debug parser
BOOL verbose; // -v option: verbose import
BOOL inspect; // -i option: interactive mode after script
BOOL optimize; // -O option: optimize bytecode
BOOL nosite; // -S option: don't import site.py
BOOL tabs; // -t option: warn about inconsistent tabs
NSString *others; // other options
BOOL with_terminal; // Run in terminal window
FileSettings *origsource;
NSString *prefskey;
}
+ (id)getDefaultsForFileType: (NSString *)filetype;
+ (id)getFactorySettingsForFileType: (NSString *)filetype;
+ (id)newSettingsForFileType: (NSString *)filetype;
//- (id)init;
- (id)initForFileType: (NSString *)filetype;
- (id)initForFSDefaultFileType: (NSString *)filetype;
- (id)initForDefaultFileType: (NSString *)filetype;
//- (id)initWithFileSettings: (FileSettings *)source;
- (void)updateFromSource: (id <FileSettingsSource>)source;
- (NSString *)commandLineForScript: (NSString *)script;
//- (void)applyFactorySettingsForFileType: (NSString *)filetype;
//- (void)saveDefaults;
//- (void)applyUserDefaults: (NSString *)filetype;
- (void)applyValuesFromDict: (NSDictionary *)dict;
- (void)reset;
@end