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 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300
|
* Anthy Input 饤֥λˡ *
* 饢ץꥱˤuimѤᤷޤ
饤֥Υץ -lanthyinput -lanthy -lanthydic
롼ɥե anthy/anthy.h anthy/input.h
(anthy/anthy.h ˥롼ɤ뤳)
* ǡγ *
anthy_input_config ѴʤɤѤ롣
饤֥Υ桼ȤߤƤϤʤ
anthy_input_context ϤΥƥȤ̤뤿Ѥ롣
饤֥Υ桼ȤߤƤϤʤ
anthy_input_preedit 饤֥꤫ץꥨǥåȤȤѤ롣
ץꥨǥåΤɽ
anthy_input_segment 饤֥꤫ץꥨǥåȤȤѤ롣
ȤˤѤ롣ʸɽ
char * ɤˤEUC-JPѤ롣
* ؿγ *
ؿʤ
anthy_input_init 饤֥ν
anthy_input_set_personality ѡʥƥ
ƥȤδ
anthy_input_create_context ϥƥȤκ
anthy_input_free_context ϥƥȤβ
anthy_input_create_config ǥեȤκ
anthy_input_free_config ǥեȤβ
anthy_input_edit_toggle_config ѿȤΰŪȥ˻Ȥѹ
anthy_input_edit_rk_config ʸбѹ
anthy_input_clear_rk_config ʸбǥեȤ᤹
anthy_input_change_config ѹ
ƥȤ(ľŪ)
anthy_input_str ʸɲ
anthy_input_next_candidate θ(ʸŬ)
anthy_input_prev_candidate θ(ʸŬ)
anthy_input_quit Ѵ(1ʳ)
anthy_input_erase_prev ʸ
anthy_input_erase_next ʸ
anthy_input_commit
anthy_input_move 롢ʸư
anthy_input_resize ʸĹѹ
anthy_input_beginning_of_line ץꥨǥåƬ˰ư
anthy_input_end_of_line ץꥨǥå˰ư
anthy_input_cut ʸڤ
ƥȤ(бư)
anthy_input_key 1ʸɲ
anthy_input_space ڡޤѴ(ƥȰ¸)
ƥȤ(¾)
anthy_input_get_state ߤξ֤μ
anthy_input_get_preedit ץꥨǥåȤ
anthy_input_map_select ̾Ѵޥåפؤ
anthy_input_get_selected_map ߤΥ̾Ѵޥåפμ
anthy_input_get_candidate ֹꤷƸ
anthy_input_select_candidate ֹꤷƸ
anthy_input_free_preedit ץꥨǥåȤβ
(°ʸṽ¤ΤƱ˲)
anthy_input_free_segment ʸβ
ѹ
anthy_input_map_edit ̾ѴޥåפԽ(̤б)
* *
Ե(1) ץꥨǥåȤ¸ߤʤ
Խ(2) ξ֡
֤ʸʸʤ
ʸϥ֤ʸؤƤ롣
Ѵ(3) Ѵξ֡
ʸ῭̾(4) ʸ῭ξ֡
ʸʹߤϤ٤ʿ̾ˤʤ롣
ʸƤޤȤưʸˤʤ롣
* ƴؿ *
int anthy_input_init(void);
: ̵
֤: 0 ʤ -1 ʤ鼺
饤֥롣anthy饤֥롣
struct anthy_input_config* anthy_input_create_config(void);
: ̵
֤: 깽¤ΤΥݥ
깽¤Τ롣깽¤ΤϥǥեͤǽƤ롣
void anthy_input_free_config(struct anthy_input_config* cfg);
: 깽¤ΤΥݥ
֤: ̵
깽¤Τ롣ͭƤϥƥ
Ȥ˲
anthy_input_set_personality(char *personality);
: personality ѡʥƥ̾
֤: ̵
struct anthy_input_context*
anthy_input_create_context(struct anthy_input_config* cfg);
: cfg 깽¤ΤΥݥ
֤: ϥƥȤΥݥ
ϥƥȤΥݥ롣Ϳ깽¤Τ
ŬѤϡϥƥȤäˤǤ⡢
ϥƥȤȿǤ롣
ƥȤԵ֤Ǻ롣
void anthy_input_free_context(struct anthy_input_context* ictx);
: ictx ϥƥ
֤: ʤ
ϥƥȤ롣
void anthy_input_str(struct anthy_input_context* ictx, char* str);
: ictx ƥȹ¤
str ɲäʸ
֤: ̵
ɲäʸϥ(Ⱦ)Ϥ롣
Ե֤Խ֤ǤϥץꥨǥåȤʸɲä롣
Ѵ֤ʸ῭֤̾ǤϥץꥨǥåȤξ֤dzꤷơ
strĥץꥨǥåȤ롣
ƽиԽ֤ˤʤ롣
void anthy_input_next_candidate(struct anthy_input_context* ictx);
: ictx ƥȹ¤
֤: ̵
Խ֤ǤʸѴѴ֤ˤϤ롣
Ѵ֤Ǥʸθθˤ롣
ʸ῭֤̾ǤʸʹߤѴѴ֤롣
void anthy_input_prev_candidate(struct anthy_input_context* ictx);
: ictx ƥȹ¤
֤: ̵
Խ֤ǤʸѴѴ֤ˤϤ롣
Ѵ֤Ǥʸθθˤ롣
ʸ῭֤̾ǤʸʹߤѴѴ֤롣
void anthy_input_quit(struct anthy_input_context* ictx);
: ictx ƥȹ¤
֤: ̵
Խ֤ǤԵ֤ˤʤ롣
Խ֤ʸ῭֤̾ǤԽ֤ˤʤ롣
void anthy_input_erase_prev(struct anthy_input_context* ictx);
: ictx ƥȹ¤
֤: ̵
Խ֤ͭ
1ʸä
ḁ̈ץꥨǥåȤʤʤСԵ֤ˤʤ롣
void anthy_input_erase_next(struct anthy_input_context* ictx);
: ictx ƥȹ¤
֤: ̵
Խ֤ͭ
θ1ʸä
ḁ̈ץꥨǥåȤʤʤСԵ֤ˤʤ롣
void anthy_input_commit(struct anthy_input_context* ictx);
: ictx ƥȹ¤
֤: ̵
ߤΥץꥨǥåȤξ֤dzꤹ롣
Ե֤롣
void anthy_input_move(struct anthy_input_context* ictx, int lr);
: ictx ƥȹ¤
lr ư
֤: ̵
Խ֤Ǥϥư롣
Ѵ֤Ǥʸư롣
ʸ῭֤̾ǤѴ֤ꡢʸư롣
lr = -1 Ǻư lr = 1 DZư
void anthy_input_resize(struct anthy_input_context* ictx, int lr);
: ictx ƥȹ¤
lr
֤: ̵
Ѵ֤Ǥʸ̤ʸ῭֤̾ˤʤ롣
ʸ῭֤̾Ǥʸ̤롣
lr = -1 ǽ̾ lr = 1 ǿĹ
void anthy_input_beginning_of_line(struct anthy_input_context* ictx);
: ictx ƥȹ¤
֤: ̵
Խ֤ͭ
ץꥨǥåȤƬ˰ư롣
void anthy_input_end_of_line(struct anthy_input_context* ictx);
: ictx ƥȹ¤
֤: ̵
Խ֤ͭ
ץꥨǥåȤ˰ư롣
void anthy_input_cut(struct anthy_input_context* ictx);
: ictx ƥȹ¤
֤: ̵
Խ֤ͭ
ʹߤʸääʸϵƤ롣
void anthy_input_str(struct anthy_input_context* ictx, char c);
: ictx ƥȹ¤
c ɲäʸ
֤: ̵
anthy_input_key ȤۤƱ 1 ʸɲä롣
void anthy_input_space(struct anthy_input_context* ictx);
: ictx ƥȹ¤
֤: ̵
ƥȤ˱ƶɲáѴΤɤ餫ˤʤ롣
struct anthy_input_preedit*
anthy_input_get_preedit(struct anthy_input_context* ictx);
: ictx ƥȹ¤
֤: ߤΥץꥨǥå
ߤΥץꥨǥåȤ롣ץꥨǥåȤƤϤʤ
ץꥨǥåȤȤϸҡ
int anthy_input_map_select(struct anthy_input_context* ictx, int map);
: ictx ƥȹ¤
map ޥåֹ
֤: 0 ʳ
Ѵޥåפѹ롣 map ˻ǤΤϰʲ
MAP_HIRAGANA Ҥ餬
MAP_KATAKANA
MAP_ALPHABET ե٥å
MAP_WALPHABET ѥե٥å
struct anthy_input_segment*
anthy_input_get_candidate(struct anthy_input_context* ictx, int cand_no);
: ictx ƥȹ¤
cand_no ֹ
֤: Ūθޤʸṽ¤
Ѵ֤Ǥͭ
ʸλꤷֹθ롣
anthy_input_get_candidate ǥץꥨǥåȤᤷϡ cand_no
μθ䤬֤롣
int anthy_input_select_candidate(struct anthy_input_context* ictx, int cand);
: ictx ƥȹ¤
cand_no ֹ
֤: 0 ʳ
Ѵ֤Ǥͭ
ʸλꤷֹθʸʸ˰ư롣
void anthy_input_free_preedit(struct anthy_input_preedit* pedit);
: pedit ץꥨǥåȹ¤
֤: ̵
ץꥨǥåȹ¤Τ롣
void anthy_input_free_segment(struct anthy_input_segment* cand);
: cand ʸṽ¤Ρ
֤: ̵
ʸṽ¤Τ롣
* ǡ *
struct anthy_input_preedit {
int state; /* */
char* commit; /* ʸ */
char* cut_buf; /* ڤäʸ */
struct anthy_input_segment* segment; /* ʸꥹ */
struct anthy_input_segment* cur_segment; /* ʸ */
};
state: ߤξ
ST_NONE Ե
ST_EDIT Խ
ST_CONV Ѵ
ST_CSEG ʸ῭̾
commit: NULL ǤʤСꤵ줿ʸäƤ롣
commit ϰ anthy_input_get_preedit Ⱦä롣
cut_buf: NULL ǤʤС anthy_input_cut ˤä줿ʸäƤ롣
cut_buf ϰ anthy_input_get_preedit Ⱦä롣
segment: Ѵ桢ʸ῭֤̾ǤʸΥꥹ
Խ֤Ǥϡʸʸʸᡢ
ʸΥꥹ
cur_segment: Τʸ
struct anthy_input_segment {
char* str; /* ʸ */
int cand_no; /* ֹ */
int noconv_len; /* ̵Ѵ֤ǤΥХȿ */
int nr_cand; /* */
int flag; /* ե饰 */
struct anthy_input_segment* next; /* ʸ */
};
str: ߤθʸ
(Խ֤ΡɽʸǤ NULL ˤʤäƤ)
cand_no: ֹ (0 nr_cand - 1,
γƤ줿ʸǤʤȤ̵ѴΤȤ -1)
noconv_len: ̵Ѵ֤ǤʸʸĹ (Хȿ)
nr_cand: (γƤ줿ʸǤʤȤ -1)
flag: ʸμɽե饰
SF_CURSOR ޤʸ
SF_ENUM Ϣ³ѴʤɤΤǡ
ɽ뤳Ȥ饤֥꤬ƤƤ롣
ȡ anthy_input_get_candidate
ȤäƸɽΤ˾ޤ
SF_ENUM_REVERSE θɽ뤳Ȥ饤֥꤬
ƤƤ
SF_EDITTING Խ֤ʸ
SF_PENDING ޤΤޤޤǡ̾ˤʤäƤʤʸ
SF_FOLLOWING ʸ῭֤̾ǡʸʸ
1 ʸˤʸ
|