/
HangulComposer.h
74 lines (60 loc) · 2.32 KB
/
HangulComposer.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
//
// HangulComposer.h
// CharmIM
//
// Created by youknowone on 11. 9. 1..
// Copyright 2011 youknowone.org. All rights reserved.
//
#import <Hangul/HGCharacter.h>
#import <Hangul/HGHanja.h>
#import "CIMComposer.h"
typedef enum {
// 채움 문자는 모두 지우고 결합해 표현한다.
HangulCharacterCombinationWithoutFiller = 0,
// 없는 자소가 있더라도 모두 채움 문자와 결합해 표현한다.
HangulCharacterCombinationWithFiller = 1,
// 중성이 빠졌을 경우만 채움 문자를 이용한다.
HangulCharacterCombinationWithOnlyJungseongFiller = 2,
// 채움 문자 뒤는 숨긴다.
HangulCharacterCombinationHiddenOnFiller = 3,
// 중성 채움 문자 뒤는 숨긴다.
HangulCharacterCombinationHiddenOnJungseongFiller = 4,
} HangulCharacterCombinationMode;
#define HangulCharacterCombinationModeCount 5
@class HGInputContext;
/*!
@brief libhangul을 사용하는 합성기
libhangul의 input context를 사용하는 합성기이다. -init 로는 두벌식 합성기가 설정된다.
@coclass HGInputContext
*/
@interface HangulComposer : NSObject<CIMComposerDelegate> {
HGInputContext *_inputContext;
NSMutableString *_commitString;
HGUCSChar buffer[64]; // hangulinputcontext.c
}
@property(nonatomic, readonly) HGInputContext *inputContext;
/*!
@brief libhangul의 input context를 사용하는 합성기를 초기화한다.
@param identifier libhangul의 @ref hangul_ic_select_keyboard 를 참고한다.
*/
- (id)initWithKeyboardIdentifier:(NSString *)identifier;
/*!
@brief 현재 context의 배열을 바꾼다.
@param identifier libhangul의 @ref hangul_ic_select_keyboard 를 참고한다.
*/
- (void)setKeyboardWithIdentifier:(NSString *)identifier;
@end
@interface HanjaComposer : CIMComposer {
NSMutableArray *_candidates;
NSMutableString *bufferedString;
NSString *composedString;
NSString *commitString;
BOOL _mode;
}
- (void)updateHanjaCandidates;
- (void)updateFromClientSelectedRange:(id)client;
@property(nonatomic, readonly) HangulComposer *hangulComposer;
@property(nonatomic, readonly) HGHanjaTable *characterTable, *wordTable, *reversedTable, *MSSymbolTable, *emoticonTable, *emoticonReversedTable;
@property(nonatomic, retain) NSArray *candidates;
@property(nonatomic, assign) BOOL mode;
@end