1 #ifndef _main_h_included_
2 #define _main_h_included_
4 #include <anthy/xstr.h>
6 #include <anthy/splitter.h>
7 #include <anthy/segment.h>
8 #include <anthy/ordering.h>
9 #include <anthy/prediction.h>
12 ͽ¬ÊÑ´¹¤Î¸õÊä¤Î¥¥ã¥Ã¥·¥å
14 struct prediction_cache {
17 /* ͽ¬¤µ¤ì¤¿¸õÊä¤Î¿ô */
20 struct prediction_t* predictions;
23 /** Anthy¤ÎÊÑ´¹¥³¥ó¥Æ¥¥¹¥È
24 * ÊÑ´¹Ãæ¤Îʸ»úÎó¤Ê¤É¤¬Æþ¤Ã¤Æ¤¤¤ë
26 struct anthy_context {
27 /** ¥³¥ó¥Æ¥¥¹¥È¤Î»ý¤Äʸ»úÎó */
30 struct segment_list seg_list;
32 dic_session_t dic_session;
34 struct splitter_context split_info;
35 /** ¸õÊä¤ÎʤÓÂؤ¨¾ðÊó */
36 struct ordering_context_wrapper ordering_info;
38 struct prediction_cache prediction;
39 /** ¥¨¥ó¥³¡¼¥Ç¥£¥ó¥° */
42 int reconversion_mode;
47 void anthy_init_contexts(void);
48 void anthy_quit_contexts(void);
49 void anthy_init_personality(void);
50 void anthy_quit_personality(void);
51 int anthy_do_set_personality(const char *id);
52 struct anthy_context *anthy_do_create_context(int);
53 int anthy_do_context_set_str(struct anthy_context *c, xstr *x, int is_reverse);
54 void anthy_do_reset_context(struct anthy_context *c);
55 void anthy_do_release_context(struct anthy_context *c);
57 void anthy_do_resize_segment(struct anthy_context *c,int nth,int resize);
59 int anthy_do_set_prediction_str(struct anthy_context *c, xstr *x);
60 void anthy_release_segment_list(struct anthy_context *ac);
61 void anthy_save_history(const char *fn, struct anthy_context *ac);
64 void anthy_do_print_context(struct anthy_context *c, int encoding);
68 /* ¤Ê¤ë¤Ù¤¯³¬Áؤò¥Õ¥é¥Ã¥È¤Ë¤¹¤ë¤è¤í¤· */