* Anthy饤֥λˡ *

饤֥Υץ	-lanthy -lanthydic
(⤷pkg-configanthyꤹ)
󥯥롼ɥե	anthy/anthy.h
+anthy_ ǻϤޤؿ̾ϥ饤֥λѤΤͽ󤵤Ƥ

* ǡ *
anthy_conv_stat ߤѴξ֤뤿Ѥ
 ʸĤʸʬ䤵줿뤳ȤǤ
anthy_segment_stat ʸξ֤뤿Ѥ
 ʸ᤬ĤѴäƤ뤫뤳ȤǤ
 ʸĹ뤳ȤǤ(ƥ)
anthy_prediction_stat ͽ¬ο뤳ȤǤ
anthy_context_t ѴΥƥȤ̤뤿Ѥ
 ݥ󥿷Ǥ
char * ǥեȤǤϥ󥳡ɤˤEUC-JPѤ롣

* ؿγ *
ؿ
 anthy_init                   Anthyν
 anthy_conf_override          ι
 anthy_set_personality        ѡʥƥ
 anthy_quit                   Anthyνλ
ƥȤδ
 anthy_create_context         ѴƥȤκ
 anthy_reset_context          ѴƥȤΥꥻå
 anthy_release_context        ѴƥȲ
ƥȤФ
 anthy_set_string             Ѵʸ
 anthy_resize_segment         ʸο
Ѵ̤μ
 anthy_get_stat               Ѵ̤ʸμ
 anthy_get_segment_stat       ʸФμ
 anthy_get_segment            μ
̤Υߥå
 anthy_commit_segment	      Ѵ̤Υߥå
ͽ¬
 anthy_set_prediction_string  ͽ¬Ϥʸ
 anthy_get_prediction_stat    ͽ¬Ϥξ֤μ
 anthy_get_prediction         ͽ¬ʸμ
 anthy_commit_prediction      ͽ¬ʸγ
Ѵ
 anthy_set_reconversion_mode  Ѵ⡼ɤ
󥳡ǥ
 anthy_context_set_encoding   󥳡ǥ󥰤
¾
 anthy_print_context          ѴƥȤƤɽ
 anthy_get_version_string     AnthyΥС
 anthy_set_logger             Ѥδؿ򥻥åȤ

* ƴؿ *
 int anthy_init(void)
 : ̵
 ֤: 0 ʤ -1ʤ鼺
 anthyΤνԤanthy_conf_override()ʳδؿ
 ƤƤФʤȤʤ


 void anthy_conf_override(char *var, char *val);
 : var ѿ̾
       val 
 ֤: ̵
 *ѿˤĤƤϽҤ٤ʤ
 *anthy_init˸Ƥ֤ȤˤäơưѤ뤳ȤǤ롣


 int anthy_set_personality(char *id);
 : var ѿ̾
 ֤: ˤ0Իˤ-1
 *personalityѹ롣ǽcontextޤǤ
 ٤Ǥ롣
 *ѤǤʸϥե̾˻ȤʸƱ


 void anthy_quit(void);
 : ̵
 ֤: ̵
 *Anthy libraryǳݤʤɤΥ꥽
 *ǤϼƤʤ
 *ץꥱλ˸ƽФɬפ̵


 anthy_context_t anthy_create_context(void);
 : ̵
 ֤: ƥ Ԥʤ0
 *ѴƥȤ롣


 void anthy_reset_context(anthy_context_t ac);
 : ac ƥ
 ֤: ̵
 *ѴƥȤꥻåȤ롣


 void anthy_release_context(anthy_context_t ac);
 : ac ƥ
 ֤: ̵
 *ѴƥȤ롣
 *ΥƥȤϤʹ߻Ȥʤ


 int anthy_set_string(anthy_context_t ac, char *str);
 : ac ƥ
       str Ѵоݤʸ
 ֤: ˤ0Իˤ-1
 *ѴƥȤʸꤹ롣
 *ΥƥȤ˴Ϣ뤽ޤǤξ˴롣
 *strEUC-JPͿ롣
 *ʺʸϤ硢ƴöҤ餬ʤѴ
  ѴԤ


 void anthy_resize_segment(anthy_context_t ac, int nth, int resize);
 : ac ƥ
       nth ʸΥǥå 0Ϥޤ
       resize ʸʸФ
 ֤: ̵
 *ʸ򿭽̤롣
 *resizeοͿ뤳Ȥˤäʸ̤뤳ȤǤ롣
 *̵ξ̵뤵롣


 int anthy_get_stat(anthy_context_t ac, struct anthy_conv_stat *cs);
 : ac ƥ
       cs anthy_conv_stat
 ֤: ξ0
 *ߤΥƥȤξ֤롣
 *ƥȤꤷʸ󤬤Ĥʸʬ䤵줿Τ뤳ȤǤ롣


 int anthy_get_segment_stat(anthy_context_t ac, int n, struct anthy_segment_stat *ss);
 : ac ƥ
       n ʸֹ 0Ϥޤ
       ss anthy_segment_stat
 ֤: ξ0
 *ߤΥƥȤnܤʸξ֤롣
 *ʸˤĤθ䤬뤫Τ뤳ȤǤ롣


 int anthy_get_segment(anthy_context_t ac, int s, int n, char *buf, int len);
 : ac ƥ
       s ʸֹ 0Ϥޤ
       n ֹ 0Ϥޤ
       buf ʸХåե
       len ХåեĹ
       nNTH_UNCONVERTED_CANDIDATEꤹ
       ѴΤҤ餬ʸ뤳ȤǤ(Ѵ
       (anthy_set_string)Ԥʤä硢٤Ҥ餬ʤ
       Ѵ줿ʸоݤȤʤ)
       ¾ˤ⼡θֹ椬Ǥ
        NTH_KATAKANA_CANDIDATE ʤθ
        NTH_HIRAGANA_CANDIDATE ʿ̾θ
        NTH_HALFKANA_CANDIDATE Ⱦѥʤθ
       NTH_HALFKANA_CANDIDATE˸¤ꤷƤؽϹԤʤ
 ֤: Ԥξ -1ξʸ(nullϴޤޤʤ)֤
 *sܤʸnܤθ뤳ȤǤ롣
 *̤buf˺Ǹnull terminateޤǴޤlenХȤޤǳݤ롣
 *⤷buf  nullǤз̤ΥԡϹԤʤ
  (ѤƳݤ٤ХåեΥɤ)


 int anthy_commit_segment(anthy_context_t ac, int s, int n);
 : ac ƥ
       s ʸֹ
       n ֹ
 *ƥsܤʸnܤθǳꤹ롣
 *٤Ƥʸ᤬ꤷȤ˳ؽʤɤʤ롣


 int anthy_set_prediction_string(anthy_context_t ac, const char *str);
 int anthy_get_prediction_stat(anthy_context_tm struct anthy_prediction_stat *aps);
 int anthy_get_prediction(anthy_context_t ac, int nth, char *buf, int buf_len);
 int anthy_commit_prediction(anthy_context_t ac, int nth);


 int anthy_set_reconversion_mode(anthy_context_t ac, int mode);
 : ac ƥ
       mode ѴΥ⡼
       modeˤϼǤ롣
       ANTHY_RECONVERT_AUTO äƤ˵ѴԤʤ
       ANTHY_RECONVERT_DISABLE ˽ѴԤʤ
       ANTHY_RECONVERT_ALWAYS ˵ѴԤʤ
       ǥեȤǤANTHY_RECONVERT_AUTOꤷ֤ư
 ֤: ꤵ줿⡼
 *ꤷƥȤεѴˡꤹ롣


 int anthy_context_set_encoding(anthy_context_t ac, int encoding);
 : ac ƥ
       encoding 󥳡ǥ
       encodingˤϼΤ줫ꤹ롣
       ANTHY_COMPILED_ENCODING (Ǥư)
       ANTHY_EUC_JP_ENCODING EUC-JPѤޤ
       ANTHY_UTF8_ENCODING UTF8Ѥޤ
 ֤: ꤵ줿󥳡ǥ
 *ѴƥȤAPIƤӽФ˻ѤʸΥ󥳡ǥ󥰤
  ꤹ롣
 *ǥեȤǤANTHY_EUC_JP_ENCODINGꤵ줿֤ư


 int anthy_print_context(anthy_context_t ac);
 : ac ƥ
 ѴƥȤƤɸϤ˽񤭽Ф
 ϼ¸


 char *anthy_get_version_string (void);
 ֤: AnthyΥСɽʸ
 AnthyΥС


 void anthy_set_logger(anthy_logger logger, int level);
