forked from rime/squirrel
-
Notifications
You must be signed in to change notification settings - Fork 0
/
SquirrelInputController.h
41 lines (35 loc) · 1.31 KB
/
SquirrelInputController.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
#import <Cocoa/Cocoa.h>
#import <InputMethodKit/InputMethodKit.h>
#import <rime_api.h>
@interface SquirrelInputController : IMKInputController {
id _currentClient; // the current active client
NSString *_preeditString; // the cached preedit string
NSRange _selRange;
NSUInteger _caretPos;
NSArray *_candidates;
NSUInteger _lastModifier;
NSEventType _lastEventType;
RimeSessionId _session;
NSString *_schemaId;
BOOL _inlinePreedit;
// for chord-typing
char _chord[128];
NSTimer *_chordTimer;
NSString *_currentApp;
}
-(void)commitString:(NSString*)string;
-(void)showPreeditString:(NSString*)string
selRange:(NSRange)range
caretPos:(NSUInteger)pos;
-(void)showPreedit:(NSString*)preedit
withSelRange:(NSRange)selRange
atCaretPos:(NSUInteger)caretPos
andCandidates:(NSArray*)candidates
andComments:(NSArray*)comments
withLabels:(NSString*)labels
highlighted:(NSUInteger)index;
-(BOOL)processKey:(int)rime_keycode modifiers:(int)rime_modifiers;
-(void)onChordTimer:(NSTimer *)timer;
-(void)updateChord:(int)ch;
-(void)clearChord;
@end