symbian-qemu-0.9.1-12/python-2.6.1/Mac/PythonLauncher/FileSettings.h
changeset 1 2fb8b9db1c86
equal deleted inserted replaced
0:ffa851df0825 1:2fb8b9db1c86
       
     1 //
       
     2 //  FileSettings.h
       
     3 //  PythonLauncher
       
     4 //
       
     5 //  Created by Jack Jansen on Sun Jul 21 2002.
       
     6 //  Copyright (c) 2002 __MyCompanyName__. All rights reserved.
       
     7 //
       
     8 
       
     9 #import <Foundation/Foundation.h>
       
    10 
       
    11 @protocol FileSettingsSource
       
    12 - (NSString *) interpreter;
       
    13 - (BOOL) honourhashbang;
       
    14 - (BOOL) debug;
       
    15 - (BOOL) verbose;
       
    16 - (BOOL) inspect;
       
    17 - (BOOL) optimize;
       
    18 - (BOOL) nosite;
       
    19 - (BOOL) tabs;
       
    20 - (NSString *) others;
       
    21 - (BOOL) with_terminal;
       
    22 - (NSString *) scriptargs;
       
    23 @end
       
    24 
       
    25 @interface FileSettings : NSObject <FileSettingsSource>
       
    26 {
       
    27     NSString *interpreter;	// The pathname of the interpreter to use
       
    28     NSArray *interpreters;	// List of known interpreters
       
    29     BOOL honourhashbang;	// #! line overrides interpreter
       
    30     BOOL debug;			// -d option: debug parser
       
    31     BOOL verbose;		// -v option: verbose import
       
    32     BOOL inspect;		// -i option: interactive mode after script
       
    33     BOOL optimize;		// -O option: optimize bytecode
       
    34     BOOL nosite;		// -S option: don't import site.py
       
    35     BOOL tabs;			// -t option: warn about inconsistent tabs
       
    36     NSString *others;		// other options
       
    37     NSString *scriptargs;	// script arguments (not for preferences)
       
    38     BOOL with_terminal;		// Run in terminal window
       
    39 
       
    40     FileSettings *origsource;
       
    41     NSString *prefskey;
       
    42 }
       
    43 
       
    44 + (id)getDefaultsForFileType: (NSString *)filetype;
       
    45 + (id)getFactorySettingsForFileType: (NSString *)filetype;
       
    46 + (id)newSettingsForFileType: (NSString *)filetype;
       
    47 
       
    48 //- (id)init;
       
    49 - (id)initForFileType: (NSString *)filetype;
       
    50 - (id)initForFSDefaultFileType: (NSString *)filetype;
       
    51 - (id)initForDefaultFileType: (NSString *)filetype;
       
    52 //- (id)initWithFileSettings: (FileSettings *)source;
       
    53 
       
    54 - (void)updateFromSource: (id <FileSettingsSource>)source;
       
    55 - (NSString *)commandLineForScript: (NSString *)script;
       
    56 
       
    57 //- (void)applyFactorySettingsForFileType: (NSString *)filetype;
       
    58 //- (void)saveDefaults;
       
    59 //- (void)applyUserDefaults: (NSString *)filetype;
       
    60 - (void)applyValuesFromDict: (NSDictionary *)dict;
       
    61 - (void)reset;
       
    62 - (NSArray *) interpreters;
       
    63 
       
    64 @end