1 /*
2  *  libpinyin
3  *  Library to deal with pinyin.
4  *
5  *  Copyright (C) 2011 Peng Wu <alexepico@gmail.com>
6  *
7  *  This program is free software: you can redistribute it and/or modify
8  *  it under the terms of the GNU General Public License as published by
9  *  the Free Software Foundation, either version 3 of the License, or
10  *  (at your option) any later version.
11  *
12  *  This program is distributed in the hope that it will be useful,
13  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
14  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15  *  GNU General Public License for more details.
16  *
17  *  You should have received a copy of the GNU General Public License
18  *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
19  */
20 
21 #ifndef PINYIN_CUSTOM2_H
22 #define PINYIN_CUSTOM2_H
23 
24 #include <glib.h>
25 
26 G_BEGIN_DECLS
27 
28 /**
29  * PinyinTableFlag:
30  */
31 enum PinyinTableFlag{
32     IS_PINYIN = 1U << 1,
33     IS_ZHUYIN = 1U << 2,
34     PINYIN_INCOMPLETE = 1U << 3,
35     ZHUYIN_INCOMPLETE = 1U << 4,
36     USE_TONE = 1U << 5,
37     FORCE_TONE = 1U << 6,
38     USE_DIVIDED_TABLE = 1U << 7,
39     USE_RESPLIT_TABLE = 1U << 8,
40     DYNAMIC_ADJUST = 1U << 9
41 };
42 
43 /**
44  * PinyinAmbiguity2:
45  *
46  * The enums of pinyin ambiguities.
47  *
48  */
49 enum PinyinAmbiguity2{
50     PINYIN_AMB_C_CH = 1U << 10,
51     PINYIN_AMB_S_SH = 1U << 11,
52     PINYIN_AMB_Z_ZH = 1U << 12,
53     PINYIN_AMB_F_H = 1U << 13,
54     PINYIN_AMB_G_K = 1U << 14,
55     PINYIN_AMB_L_N = 1U << 15,
56     PINYIN_AMB_L_R = 1U << 16,
57     PINYIN_AMB_AN_ANG = 1U << 17,
58     PINYIN_AMB_EN_ENG = 1U << 18,
59     PINYIN_AMB_IN_ING = 1U << 19,
60     PINYIN_AMB_ALL = 0x3FFU << 10
61 };
62 
63 /**
64  * PinyinCorrection2:
65  *
66  * The enums of pinyin corrections.
67  *
68  */
69 
70 enum PinyinCorrection2{
71     PINYIN_CORRECT_GN_NG = 1U << 21,
72     PINYIN_CORRECT_MG_NG = 1U << 22,
73     PINYIN_CORRECT_IOU_IU = 1U << 23,
74     PINYIN_CORRECT_UEI_UI = 1U << 24,
75     PINYIN_CORRECT_UEN_UN = 1U << 25,
76     PINYIN_CORRECT_UE_VE = 1U << 26,
77     PINYIN_CORRECT_V_U = 1U << 27,
78     PINYIN_CORRECT_ON_ONG = 1U << 28,
79     PINYIN_CORRECT_ALL = 0xFFU << 21
80 };
81 
82 /**
83  * PinyinCorrection2:
84  *
85  * The enums of pinyin corrections.
86  *
87  */
88 enum ZhuyinCorrection2{
89     ZHUYIN_CORRECT_HSU = 1U << 29,
90     ZHUYIN_CORRECT_ETEN26 = 1U << 30,
91     ZHUYIN_CORRECT_SHUFFLE = 1U << 31,
92     ZHUYIN_CORRECT_ALL = 0x7U << 29
93 };
94 
95 /**
96  * @brief enums of Full Pinyin Schemes.
97  */
98 enum FullPinyinScheme
99 {
100     FULL_PINYIN_HANYU = 1,
101     FULL_PINYIN_LUOMA = 2,
102     FULL_PINYIN_SECONDARY_ZHUYIN = 3,
103     FULL_PINYIN_DEFAULT = FULL_PINYIN_HANYU
104 };
105 
106 /**
107  * @brief enums of Double Pinyin Schemes.
108  */
109 enum DoublePinyinScheme
110 {
111     DOUBLE_PINYIN_ZRM        = 1,
112     DOUBLE_PINYIN_MS         = 2,
113     DOUBLE_PINYIN_ZIGUANG    = 3,
114     DOUBLE_PINYIN_ABC        = 4,
115     DOUBLE_PINYIN_PYJJ       = 5,
116     DOUBLE_PINYIN_XHE        = 6,
117     DOUBLE_PINYIN_CUSTOMIZED = 30,        /* for user's keyboard */
118     DOUBLE_PINYIN_DEFAULT    = DOUBLE_PINYIN_MS
119 };
120 
121 /**
122  * @brief enums of Zhuyin Schemes.
123  */
124 enum ZhuyinScheme
125 {
126     ZHUYIN_STANDARD = 1,
127     ZHUYIN_HSU      = 2,
128     ZHUYIN_IBM      = 3,
129     ZHUYIN_GINYIEH  = 4,
130     ZHUYIN_ETEN     = 5,
131     ZHUYIN_ETEN26   = 6,
132     ZHUYIN_STANDARD_DVORAK = 7,
133     ZHUYIN_HSU_DVORAK = 8,
134     ZHUYIN_DACHEN_CP26 = 9,
135     ZHUYIN_DEFAULT  = ZHUYIN_STANDARD
136 };
137 
138 G_END_DECLS
139 
140 #endif
141