1 #ifndef _dic_main_h_included_
2 #define _dic_main_h_included_
5 #include <anthy/word_dic.h>
6 #include <anthy/wtype.h>
7 #include <anthy/xstr.h>
10 /* ¼½ñÃæ¤ÎÉÑÅÙ¤ËÂФ·¤ÆÆâÉô¤ÎÉÑÅÙ¤ÎÇÜΨ */
15 int anthy_init_dic_cache(void);
16 struct seq_ent *anthy_cache_get_seq_ent(xstr *x, int is_reverse);
20 /* ¼½ñ¸¡º÷¤Î¥¡¼¤Ë»ÈÍѤ¹¤ëÉôʬʸ»úÎó */
25 /* ¾Ê¥á¥â¥ê¤Î¤¿¤á¤Ëunion¤Ë¤·¤Æ¤¤¤ë */
27 struct gang_elm *next;
30 struct seq_ent *anthy_cache_get_seq_ent(xstr *xs, int is_reverse);
31 struct seq_ent *anthy_validate_seq_ent(struct seq_ent *seq, xstr *xs,
36 void anthy_init_word_dic(void);
37 struct word_dic* anthy_create_word_dic(void);
38 void anthy_release_word_dic(struct word_dic *);
39 void anthy_gang_fill_seq_ent(struct word_dic *wd,
40 struct gang_elm **array, int nr,
45 void anthy_init_use_dic(void);
46 void anthy_quit_use_dic(void);
47 int anthy_word_dic_check_word_relation(struct word_dic *,
50 struct dic_session *anthy_create_session(void);
51 void anthy_activate_session(struct dic_session *);
52 void anthy_release_session(struct dic_session *);
53 int anthy_get_current_session_mask(void);
56 void anthy_init_mem_dic(void);
57 void anthy_quit_mem_dic(void);
58 struct mem_dic * anthy_create_mem_dic(void);
59 void anthy_release_mem_dic(struct mem_dic * );
60 /* node ¤¬¤Ê¤±¤ì¤Ðºî¤ë */
61 struct seq_ent *anthy_mem_dic_alloc_seq_ent_by_xstr(struct mem_dic * d,
62 xstr *, int is_reverse);
63 /* node ¤¬¤Ê¤±¤ì¤Ðºî¤é¤Ê¤¤ */
64 struct seq_ent *anthy_mem_dic_find_seq_ent_by_xstr(struct mem_dic * d,
65 xstr *, int is_reverse);
67 void anthy_mem_dic_push_back_dic_ent(struct seq_ent *se, int is_compound,
69 const char *wt_name, int freq,
71 void anthy_mem_dic_release_seq_ent(struct mem_dic * d, xstr *, int is_reverse);
75 void anthy_init_private_dic(const char *id);
76 void anthy_copy_words_from_private_dic(struct seq_ent *seq, xstr *xs,
78 void anthy_release_private_dic(void);
79 void anthy_check_user_dir(void);
80 void anthy_priv_dic_lock(void);
81 void anthy_priv_dic_unlock(void);
82 void anthy_priv_dic_update(void);
88 int anthy_parse_word_line(const char *line, struct word_line *res);
90 void anthy_ask_scan(void (*request_scan)(struct textdict *, void *),