1/*
2 * Copyright (C) 2008-2012  OMRON SOFTWARE Co., Ltd.
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 *      http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17#ifndef _NJX_LIB_H_
18#define _NJX_LIB_H_
19
20
21#define NJD_MAX_CONNECT_CNT     6
22
23typedef struct {
24    NJ_UINT16 f_hinsi;
25    NJ_UINT16 b_hinsi;
26    NJ_UINT8  yomi_len;
27    NJ_UINT8  hyouki_len;
28    NJ_CHAR   yomi[NJ_MAX_LEN +NJ_TERM_LEN];
29    NJ_CHAR   hyouki[NJ_MAX_RESULT_LEN + NJ_TERM_LEN];
30    NJ_UINT16 stem_b_hinsi;
31    NJ_UINT8  fzk_yomi_len;
32} NJ_LEARN_WORD_INFO;
33
34
35typedef struct word_que {
36    NJ_UINT16  entry;
37    NJ_UINT8   type;
38    NJ_UINT16  mae_hinsi;
39    NJ_UINT16  ato_hinsi;
40    NJ_UINT8   yomi_len;
41    NJ_UINT8   hyouki_len;
42    NJ_UINT8   yomi_byte;
43    NJ_UINT8   hyouki_byte;
44    NJ_UINT8   next_flag;
45} NJ_WQUE;
46
47
48typedef struct {
49    NJ_LEARN_WORD_INFO  selection_data;
50    NJ_UINT8            count;
51} NJ_PREVIOUS_SELECTION_INFO;
52
53typedef struct {
54
55
56
57
58    NJ_WQUE que_tmp;
59
60
61
62
63
64    NJ_PREVIOUS_SELECTION_INFO previous_selection;
65
66
67
68
69
70    NJ_CHAR learn_string_tmp[NJ_MAX_RESULT_LEN + NJ_TERM_LEN];
71
72    NJ_CHAR muhenkan_tmp[NJ_MAX_RESULT_LEN + NJ_TERM_LEN];
73
74
75
76
77    NJ_DIC_SET dic_set;
78
79    struct {
80        NJ_UINT8   commit_status;
81        NJ_UINT16  save_top;
82        NJ_UINT16  save_bottom;
83        NJ_UINT16  save_count;
84    } learndic_status;
85
86} NJ_CLASS;
87
88#endif
89