Move enums to the top of the file.

This commit is contained in:
Lukhnos D. Liu 2012-05-06 15:56:21 -07:00
parent 6f2d617bcb
commit c48d478b4e
1 changed files with 12 additions and 12 deletions

View File

@ -79,6 +79,18 @@ static NSString *const kCandidateTextFontName = @"CandidateTextFontName";
static NSString *const kCandidateKeyLabelFontName = @"CandidateKeyLabelFontName";
static NSString *const kCandidateKeys = @"CandidateKeys";
// key code enums
enum {
kUpKeyCode = 126,
kDownKeyCode = 125,
kLeftKeyCode = 123,
kRightKeyCode = 124,
kPageUpKeyCode = 116,
kPageDownKeyCode = 121,
kHomeKeyCode = 115,
kEndKeyCode = 119
};
// a global object for saving the "learned" user candidate selections
NSMutableDictionary *gCandidateLearningDictionary = nil;
NSString *gUserCandidatesDictionaryPath = nil;
@ -445,18 +457,6 @@ public:
NSBeep();
}
enum {
kUpKeyCode = 126,
kDownKeyCode = 125,
kLeftKeyCode = 123,
kRightKeyCode = 124,
kPageUpKeyCode = 116,
kPageDownKeyCode = 121,
kHomeKeyCode = 115,
kEndKeyCode = 119
};
- (BOOL)inputText:(NSString*)inputText key:(NSInteger)keyCode modifiers:(NSUInteger)flags client:(id)client
{
NSRect textFrame = NSZeroRect;