-
Notifications
You must be signed in to change notification settings - Fork 3
/
RidmikInputController.h
29 lines (22 loc) · 1.09 KB
/
RidmikInputController.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
#import <Cocoa/Cocoa.h>
#import <InputMethodKit/InputMethodKit.h>
@interface RidmikInputController : IMKInputController {
//_composedBuffer contains text that the input method has converted
NSMutableString* _composedBuffer;
//_original buffer contains the text has it was received from user input.
NSMutableString* _originalBuffer;
//used to mark where text is being inserted in the _composedBuffer
NSInteger _insertionIndex;
//This flag indicates that the original text was converted once in response to a trigger (space key)
//the next time the trigger is received the composition will be committed.
BOOL _didConvert;
}
// These are simple methods for managing our composition and original buffers.
// They are all simple wrappers around basic NSString methods.
-(NSMutableString*)composedBuffer;
-(void)setComposedBuffer:(NSString*)string;
-(NSMutableString*)originalBuffer;
-(void)originalBufferAppend:(NSString*)string client:(id)sender;
-(void)setOriginalBuffer:(NSString*)string;
- (BOOL)convert:(NSString*)trigger key:(NSInteger)keyCode client:(id)sender;
@end