-
Notifications
You must be signed in to change notification settings - Fork 20
/
Copy pathWLGlobalConfig.h
165 lines (136 loc) · 4.71 KB
/
WLGlobalConfig.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
//
// WLGlobalConfig.h
// Welly
//
// YLLGlobalConfig.h
// MacBlueTelnet
//
// Created by Yung-Luen Lan on 2006/11/12.
// Copyright 2006 yllan.org. All rights reserved.
//
#import <Cocoa/Cocoa.h>
#import <ApplicationServices/ApplicationServices.h>
#import "CommonType.h"
#import "WLEncoder.h"
#define NUM_COLOR 10
extern NSString *const WLRestoreConnectionKeyName;
extern NSString *const WLCommandRHotkeyEnabledKeyName;
extern NSString *const WLConfirmOnCloseEnabledKeyName;
extern NSString *const WLSafePasteEnabledKeyName;
extern NSString *const WLCoverFlowModeEnabledKeyName;
extern NSString *const WLCellWidthKeyName;
extern NSString *const WLCellHeightKeyName;
extern NSString *const WLChineseFontSizeKeyName;
extern NSString *const WLEnglishFontSizeKeyName;
@interface WLGlobalConfig : NSObject {
int _messageCount;
int _row;
int _column;
CGFloat _cellWidth;
CGFloat _cellHeight;
BOOL _showsHiddenText;
BOOL _blinkTicker;
BOOL _shouldSmoothFonts;
BOOL _shouldDetectDoubleByte;
BOOL _shouldEnableMouse;
BOOL _shouldAutoReply;
BOOL _shouldRepeatBounce;
WLEncoding _defaultEncoding;
YLANSIColorKey _defaultANSIColorKey;
CGFloat _chineseFontSize;
CGFloat _englishFontSize;
CGFloat _chineseFontPaddingLeft;
CGFloat _englishFontPaddingLeft;
CGFloat _chineseFontPaddingBottom;
CGFloat _englishFontPaddingBottom;
NSString *_chineseFontName;
NSString *_englishFontName;
@public
int _bgColorIndex;
int _fgColorIndex;
CTFontRef _cCTFont;
CTFontRef _eCTFont;
CGFontRef _cCGFont;
CGFontRef _eCGFont;
NSColor *_colorTable[2][NUM_COLOR];
CFDictionaryRef _cCTAttribute[2][NUM_COLOR];
CFDictionaryRef _eCTAttribute[2][NUM_COLOR];
}
@property (readwrite, assign) int messageCount;
@property (readwrite, assign) int row;
@property (readwrite, assign) int column;
@property (readwrite, assign) CGFloat cellWidth;
@property (readwrite, assign) CGFloat cellHeight;
@property (readwrite, assign, nonatomic) BOOL showsHiddenText;
@property (readwrite, assign, nonatomic) BOOL shouldSmoothFonts;
@property (readwrite, assign, nonatomic) BOOL shouldDetectDoubleByte;
@property (readwrite, assign, nonatomic) BOOL shouldEnableMouse;
@property (readwrite, assign, nonatomic) BOOL shouldRepeatBounce;
@property (readwrite, assign, nonatomic) WLEncoding defaultEncoding;
@property (readwrite, assign, nonatomic) YLANSIColorKey defaultANSIColorKey;
@property (readwrite, assign) BOOL blinkTicker;
@property (readwrite, assign, nonatomic) CGFloat chineseFontSize;
@property (readwrite, assign, nonatomic) CGFloat englishFontSize;
@property (readwrite, assign, nonatomic) CGFloat chineseFontPaddingLeft;
@property (readwrite, assign, nonatomic) CGFloat englishFontPaddingLeft;
@property (readwrite, assign, nonatomic) CGFloat chineseFontPaddingBottom;
@property (readwrite, assign, nonatomic) CGFloat englishFontPaddingBottom;
@property (readwrite, copy, nonatomic) NSString *chineseFontName;
@property (readwrite, copy, nonatomic) NSString *englishFontName;
+ (WLGlobalConfig *)sharedInstance;
- (void)refreshFont;
- (NSColor *)colorAtIndex:(int)i
hilite:(BOOL)h;
- (NSColor *)bgColorAtIndex:(int)i
hilite:(BOOL)h;
- (void)setColor:(NSColor *)c
hilite:(BOOL)h
atIndex:(int)i;
- (void)updateBlinkTicker;
- (NSSize)contentSize;
/* Set font size */
- (void)setFontSizeRatio:(CGFloat)ratio;
/* Color */
- (NSColor *)colorBlack;
- (void)setColorBlack:(NSColor *)c;
- (NSColor *)colorBlackHilite;
- (void)setColorBlackHilite:(NSColor *)c;
- (NSColor *)colorRed;
- (void)setColorRed:(NSColor *)c;
- (NSColor *)colorRedHilite;
- (void)setColorRedHilite:(NSColor *)c;
- (NSColor *)colorGreen;
- (void)setColorGreen:(NSColor *)c;
- (NSColor *)colorGreenHilite;
- (void)setColorGreenHilite:(NSColor *)c;
- (NSColor *)colorYellow;
- (void)setColorYellow:(NSColor *)c;
- (NSColor *)colorYellowHilite;
- (void)setColorYellowHilite:(NSColor *)c;
- (NSColor *)colorBlue;
- (void)setColorBlue:(NSColor *)c;
- (NSColor *)colorBlueHilite;
- (void)setColorBlueHilite:(NSColor *)c;
- (NSColor *)colorMagenta;
- (void)setColorMagenta:(NSColor *)c;
- (NSColor *)colorMagentaHilite;
- (void)setColorMagentaHilite:(NSColor *)c;
- (NSColor *)colorCyan;
- (void)setColorCyan:(NSColor *)c;
- (NSColor *)colorCyanHilite;
- (void)setColorCyanHilite:(NSColor *)c;
- (NSColor *)colorWhite;
- (void)setColorWhite:(NSColor *)c;
- (NSColor *)colorWhiteHilite;
- (void)setColorWhiteHilite:(NSColor *)c;
- (NSColor *)colorBG;
- (void)setColorBG:(NSColor *)c;
- (NSColor *)colorBGHilite;
- (void)setColorBGHilite:(NSColor *)c;
+ (void)initializeCache;
+ (NSString *)cacheDirectory;
+ (BOOL)shouldEnableCoverFlow;
- (void)restoreSettings;
- (NSDictionary *)sizeParameters;
- (void)setSizeParameters:(NSDictionary *)sizeParameters;
@end