2021-01-26 12:08:45 -08:00
|
|
|
#import <Foundation/Foundation.h>
|
|
|
|
#import "SearchProvider.h"
|
|
|
|
|
2021-02-11 12:00:26 -08:00
|
|
|
typedef NS_ENUM(NSInteger, ViewLocation) {
|
|
|
|
ViewLocationWindow = 0,
|
|
|
|
ViewLocationTab,
|
|
|
|
ViewLocationEditor
|
|
|
|
};
|
|
|
|
|
|
|
|
typedef NS_ENUM(NSInteger, TabLocation) {
|
|
|
|
TabLocationTop = 0,
|
|
|
|
TabLocationRight,
|
|
|
|
TabLocationBottom,
|
2021-03-09 11:54:10 -08:00
|
|
|
TabLocationLeft,
|
|
|
|
TabLocationNone
|
2021-02-11 12:00:26 -08:00
|
|
|
};
|
|
|
|
|
2021-04-07 12:59:38 -07:00
|
|
|
typedef NS_ENUM(NSInteger, UrlBarButtonType) {
|
|
|
|
UrlBarButtonTypeText = 0,
|
|
|
|
UrlBarButtonTypeImage
|
|
|
|
};
|
|
|
|
|
2021-03-01 11:56:56 -08:00
|
|
|
// Certain preferences will notify that they have been updated using this key.
|
|
|
|
#define PreferencesUpdatedNotificationName @"PreferencesUpdatedNotification"
|
|
|
|
typedef NS_ENUM(NSInteger, PreferenceType) {
|
2021-03-03 11:39:24 -08:00
|
|
|
PreferenceTypeAlwaysShowTabs = 0,
|
2021-03-22 13:04:22 -07:00
|
|
|
PreferenceTypeTabLocation,
|
2021-04-07 12:59:38 -07:00
|
|
|
PreferenceTypeShowUrlSuggestions,
|
|
|
|
PreferenceTypeUrlBarButtonType
|
2021-03-01 11:56:56 -08:00
|
|
|
};
|
|
|
|
|
2021-01-26 12:08:45 -08:00
|
|
|
@interface Preferences: NSObject {
|
|
|
|
NSUserDefaults *defaults;
|
|
|
|
}
|
|
|
|
|
|
|
|
-(NSString*)startupUrl;
|
|
|
|
-(void)setStartupUrl: (NSString*)aUrl;
|
|
|
|
|
|
|
|
-(BOOL)searchFromUrlBar;
|
|
|
|
-(void)setSearchFromUrlBar: (BOOL)value;
|
|
|
|
|
|
|
|
-(SearchProvider*)searchProvider;
|
|
|
|
-(void)setSearchProvider: (SearchProvider*)aProvider;
|
|
|
|
|
|
|
|
-(BOOL)removeDownloadsOnComplete;
|
|
|
|
-(void)setRemoveDownloadsOnComplete: (BOOL)value;
|
|
|
|
|
|
|
|
-(BOOL)confirmBeforeOverwriting;
|
|
|
|
-(void)setConfirmBeforeOverwriting: (BOOL)value;
|
|
|
|
|
|
|
|
-(NSString*)downloadLocationPath;
|
|
|
|
-(void)setDownloadLocationPath: (NSString*)aPath;
|
2021-01-27 12:04:36 -08:00
|
|
|
|
2021-03-01 11:56:56 -08:00
|
|
|
-(BOOL)alwaysShowTabs;
|
|
|
|
-(void)setAlwaysShowTabs: (BOOL)value;
|
2021-02-11 12:00:26 -08:00
|
|
|
|
2021-03-02 11:40:45 -08:00
|
|
|
-(BOOL)switchTabImmediately;
|
2021-03-22 13:04:22 -07:00
|
|
|
-(void)setSwitchTabImmediately: (BOOL)value;
|
2021-02-11 12:00:26 -08:00
|
|
|
|
2021-03-03 11:17:21 -08:00
|
|
|
-(BOOL)blankNewTabs;
|
|
|
|
-(void)setBlankNewTabs: (BOOL)value;
|
|
|
|
|
2021-03-03 11:39:24 -08:00
|
|
|
-(TabLocation)tabLocation;
|
|
|
|
-(void)setTabLocation: (TabLocation)value;
|
|
|
|
|
2021-03-16 13:03:47 -07:00
|
|
|
-(ViewLocation)developerViewLocation;
|
|
|
|
-(void)setDeveloperViewLocation: (ViewLocation)value;
|
|
|
|
|
2021-03-22 13:04:22 -07:00
|
|
|
-(BOOL)showUrlSuggestions;
|
|
|
|
-(void)setShowUrlSuggestions: (BOOL)value;
|
|
|
|
|
2021-04-07 12:59:38 -07:00
|
|
|
-(UrlBarButtonType)urlBarButtonType;
|
|
|
|
-(void)setUrlBarButtonType: (UrlBarButtonType)buttonType;
|
|
|
|
|
2021-01-27 12:04:36 -08:00
|
|
|
+(Preferences*)defaultPreferences;
|
2021-03-01 11:56:56 -08:00
|
|
|
@end
|