Open Chinese Convert
0.4.3
A project for conversion between Traditional and Simplified Chinese
|
00001 /* 00002 * Open Chinese Convert 00003 * 00004 * Copyright 2010-2013 BYVoid <byvoid@byvoid.com> 00005 * 00006 * Licensed under the Apache License, Version 2.0 (the "License"); 00007 * you may not use this file except in compliance with the License. 00008 * You may obtain a copy of the License at 00009 * 00010 * http://www.apache.org/licenses/LICENSE-2.0 00011 * 00012 * Unless required by applicable law or agreed to in writing, software 00013 * distributed under the License is distributed on an "AS IS" BASIS, 00014 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 00015 * See the License for the specific language governing permissions and 00016 * limitations under the License. 00017 */ 00018 00019 #ifndef __OPENCC_TYPES_H_ 00020 #define __OPENCC_TYPES_H_ 00021 00022 #ifdef __cplusplus 00023 extern "C" { 00024 #endif // ifdef __cplusplus 00025 00026 #include <stddef.h> 00027 #include <stdint.h> 00028 00029 typedef void* opencc_t; 00030 00031 typedef uint32_t ucs4_t; 00032 00033 enum _opencc_error { 00034 OPENCC_ERROR_VOID, 00035 OPENCC_ERROR_DICTLOAD, 00036 OPENCC_ERROR_CONFIG, 00037 OPENCC_ERROR_ENCODING, 00038 OPENCC_ERROR_ENCODIND = OPENCC_ERROR_ENCODING, 00039 OPENCC_ERROR_CONVERTER 00040 }; 00041 typedef enum _opencc_error opencc_error; 00042 00043 enum _opencc_dictionary_type { 00044 OPENCC_DICTIONARY_TYPE_TEXT, 00045 OPENCC_DICTIONARY_TYPE_DATRIE 00046 }; 00047 typedef enum _opencc_dictionary_type opencc_dictionary_type; 00048 00049 enum _opencc_conversion_mode { 00050 OPENCC_CONVERSION_FAST = 0, 00051 OPENCC_CONVERSION_SEGMENT_ONLY = 1, 00052 OPENCC_CONVERSION_LIST_CANDIDATES = 2 00053 }; 00054 typedef enum _opencc_conversion_mode opencc_conversion_mode; 00055 00056 #ifdef __cplusplus 00057 } 00058 #endif // ifdef __cplusplus 00059 00060 #endif /* __OPENCC_TYPES_H_ */