00001
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031 #ifndef UNIHAN_ENUM_H_
00032 #define UNIHAN_ENUM_H_
00033 #include <glib.h>
00034 #include <sqlite3.h>
00035
00082 typedef enum{
00083 UNIHAN_FIELD_NOT_INSTALLED=-2,
00084 UNIHAN_INVALID_FIELD=-1,
00085 UNIHAN_FIELD_CODE,
00086 UNIHAN_FIELD_kACCOUNTINGNUMERIC,
00087 UNIHAN_FIELD_kBIGFIVE,
00088 UNIHAN_FIELD_kCANGJIE,
00089 UNIHAN_FIELD_kCANTONESE,
00090 UNIHAN_FIELD_kCCCII,
00091 UNIHAN_FIELD_kCHEUNGBAUER,
00092 UNIHAN_FIELD_kCHEUNGBAUERINDEX,
00093 UNIHAN_FIELD_kCIHAIT,
00094 UNIHAN_FIELD_kCNS1986,
00095 UNIHAN_FIELD_kCNS1992,
00096 UNIHAN_FIELD_kCOMPATIBILITYVARIANT,
00097 UNIHAN_FIELD_kCOWLES,
00098 UNIHAN_FIELD_kDAEJAWEON,
00099 UNIHAN_FIELD_kDEFINITION,
00100 UNIHAN_FIELD_kEACC,
00101 UNIHAN_FIELD_kFENN,
00102 UNIHAN_FIELD_kFENNINDEX,
00103 UNIHAN_FIELD_kFOURCORNERCODE,
00104 UNIHAN_FIELD_kFREQUENCY,
00105 UNIHAN_FIELD_kGB0,
00106 UNIHAN_FIELD_kGB1,
00107 UNIHAN_FIELD_kGB3,
00108 UNIHAN_FIELD_kGB5,
00109 UNIHAN_FIELD_kGB7,
00110 UNIHAN_FIELD_kGB8,
00111
00112 UNIHAN_FIELD_kGRADELEVEL,
00113 UNIHAN_FIELD_kGSR,
00114 UNIHAN_FIELD_kHANGUL,
00115 UNIHAN_FIELD_kHANYU,
00116 UNIHAN_FIELD_kHANYUPINLU,
00117 UNIHAN_FIELD_kHDZRADBREAK,
00118 UNIHAN_FIELD_kHKGLYPH,
00119 UNIHAN_FIELD_kHKSCS,
00120 UNIHAN_FIELD_kIBMJAPAN,
00121 UNIHAN_FIELD_kIICORE,
00122 UNIHAN_FIELD_kIRGDAEJAWEON,
00123 UNIHAN_FIELD_kIRGDAIKANWAZITEN,
00124 UNIHAN_FIELD_kIRGHANYUDAZIDIAN,
00125 UNIHAN_FIELD_kIRGKANGXI,
00126 UNIHAN_FIELD_kIRG_GSOURCE,
00127 UNIHAN_FIELD_kIRG_HSOURCE,
00128 UNIHAN_FIELD_kIRG_JSOURCE,
00129 UNIHAN_FIELD_kIRG_KPSOURCE,
00130 UNIHAN_FIELD_kIRG_KSOURCE,
00131 UNIHAN_FIELD_kIRG_TSOURCE,
00132 UNIHAN_FIELD_kIRG_USOURCE,
00133 UNIHAN_FIELD_kIRG_VSOURCE,
00134 UNIHAN_FIELD_kJAPANESEKUN,
00135 UNIHAN_FIELD_kJAPANESEON,
00136 UNIHAN_FIELD_kJIS0213,
00137 UNIHAN_FIELD_kJIS0,
00138 UNIHAN_FIELD_kJIS1,
00139 UNIHAN_FIELD_kKANGXI,
00140 UNIHAN_FIELD_kKARLGREN,
00141 UNIHAN_FIELD_kKOREAN,
00142 UNIHAN_FIELD_kKPS0,
00143 UNIHAN_FIELD_kKPS1,
00144 UNIHAN_FIELD_kKSC0,
00145 UNIHAN_FIELD_kKSC1,
00146 UNIHAN_FIELD_kLAU,
00147 UNIHAN_FIELD_kMAINLANDTELEGRAPH,
00148 UNIHAN_FIELD_kMANDARIN,
00149 UNIHAN_FIELD_kMATTHEWS,
00150 UNIHAN_FIELD_kMEYERWEMPE,
00151 UNIHAN_FIELD_kMOROHASHI,
00152 UNIHAN_FIELD_kNELSON,
00153 UNIHAN_FIELD_kOTHERNUMERIC,
00154 UNIHAN_FIELD_kPHONETIC,
00155 UNIHAN_FIELD_kPRIMARYNUMERIC,
00156 UNIHAN_FIELD_kPSEUDOGB1,
00157 UNIHAN_FIELD_kRSADOBE_JAPAN1_6,
00158 UNIHAN_FIELD_kRSJAPANESE,
00159 UNIHAN_FIELD_kRSKANGXI,
00160 UNIHAN_FIELD_kRSKANWA,
00161 UNIHAN_FIELD_kRSKOREAN,
00162 UNIHAN_FIELD_kRSUNICODE,
00163 UNIHAN_FIELD_kSBGY,
00164 UNIHAN_FIELD_kSEMANTICVARIANT,
00165 UNIHAN_FIELD_kSIMPLIFIEDVARIANT,
00166 UNIHAN_FIELD_kSPECIALIZEDSEMANTICVARIANT,
00167 UNIHAN_FIELD_kTAIWANTELEGRAPH,
00168 UNIHAN_FIELD_kTANG,
00169 UNIHAN_FIELD_kTOTALSTROKES,
00170 UNIHAN_FIELD_kTRADITIONALVARIANT,
00171 UNIHAN_FIELD_kVIETNAMESE,
00172 UNIHAN_FIELD_kXEROX,
00173 UNIHAN_FIELD_kXHC1983,
00174 UNIHAN_FIELD_kZVARIANT,
00175
00184 UNIHAN_FIELD_DICT_VOLUME,
00185 UNIHAN_FIELD_DICT_PAGE,
00186 UNIHAN_FIELD_DICT_POSITION,
00187 UNIHAN_FIELD_DICT_VIRTUAL,
00188 UNIHAN_FIELD_DICT_VARIANT_SERIAL,
00189 UNIHAN_FIELD_DICT_UNENCODED,
00190
00204 UNIHAN_FIELD_IRG_GSOURCE,
00205 UNIHAN_FIELD_IRG_HSOURCE,
00206 UNIHAN_FIELD_IRG_JSOURCE,
00207 UNIHAN_FIELD_IRG_KPSOURCE,
00208 UNIHAN_FIELD_IRG_KSOURCE,
00209 UNIHAN_FIELD_IRG_TSOURCE,
00210 UNIHAN_FIELD_IRG_USOURCE,
00211 UNIHAN_FIELD_IRG_VSOURCE,
00212 UNIHAN_FIELD_IRG_SOURCE_MAPPING,
00213
00225 UNIHAN_FIELD_PINYIN,
00226 UNIHAN_FIELD_PINYIN_BASE,
00227 UNIHAN_FIELD_PINYIN_TONE,
00228 UNIHAN_FIELD_PINYIN_FREQ,
00229 UNIHAN_FIELD_ZHUYIN,
00230
00245 UNIHAN_FIELD_ADOBE_CID_CV,
00246 UNIHAN_FIELD_ADOBE_CID,
00247 UNIHAN_FIELD_ADOBE_CID_RADICAL_STROKE_COUNT,
00248 UNIHAN_FIELD_RADICAL_INDEX,
00249 UNIHAN_FIELD_ADDITIONAL_STROKE_COUNT,
00250 UNIHAN_FIELD_RADICAL_IS_SIMPLIFIED,
00251
00263 UNIHAN_FIELD_SEMANTICVARIANT,
00264 UNIHAN_FIELD_SPECIALIZEDSEMANTICVARIANT,
00265 UNIHAN_FIELD_FROM_DICT,
00266 UNIHAN_FIELD_SEMANTIC_T,
00267 UNIHAN_FIELD_SEMANTIC_B,
00268 UNIHAN_FIELD_SEMANTIC_Z,
00269
00270
00271 UNIHAN_FIELD_ZVARIANT,
00272 UNIHAN_FIELD_ZVARIANT_SOURCE,
00273
00285 UNIHAN_FIELD_FREQ_RANK,
00286
00287 UNIHAN_FIELD_SCALAR_VALUE,
00288
00289 UNIHAN_FIELD_SERIAL,
00290 UNIHAN_FIELD_SERIAL_NO_JOIN,
00291
00292 UNIHAN_FIELD_UTF8,
00293
00299 UNIHAN_FIELD_3RD_PARTY
00300 } UnihanField;
00301
00305 #define UNIHAN_FIELDS_COUNT UNIHAN_FIELD_3RD_PARTY
00306
00326
00327 #define UNIHAN_FIELDFLAG_INTEGER 0x2
00328 #define UNIHAN_FIELDFLAG_UCS4 0x4
00329 #define UNIHAN_FIELDFLAG_HEXADECIMAL_16 0x8
00330 #define UNIHAN_FIELDFLAG_0_PADDED_2 0x10
00331 #define UNIHAN_FIELDFLAG_0_PADDED_4 0x10
00332 #define UNIHAN_FIELDFLAG_UPPERCASE 0x20
00333 #define UNIHAN_FIELDFLAG_LOWERCASE 0x40
00334 #define UNIHAN_FIELDFLAG_MULTIROWS 0x80
00335 #define UNIHAN_FIELDFLAG_NO_INDEX 0x100
00336 #define UNIHAN_FIELDFLAG_NO_PRIMARYKEY 0x200
00337 #define UNIHAN_FIELDFLAG_SINGLETON 0x400
00338 #define UNIHAN_FIELDFLAG_MANDARIN 0x800
00339
00340
00351 typedef struct {
00352 const gchar *fieldName;
00353 guint flags;
00354 } FieldProperties;
00355
00356
00357
00358
00412 typedef enum{
00413 UNIHAN_TABLE_NOT_INSTALLED=-3,
00414 UNIHAN_INVALID_TABLE=-2,
00415 UNIHAN_AMBIGUOUS_TABLE=-1,
00416 UNIHAN_TABLE_kACCOUNTINGNUMERIC,
00417 UNIHAN_TABLE_kBIGFIVE,
00418 UNIHAN_TABLE_kCANGJIE,
00419 UNIHAN_TABLE_kCANTONESE,
00420 UNIHAN_TABLE_kCCCII,
00421 UNIHAN_TABLE_kCHEUNGBAUER,
00422 UNIHAN_TABLE_kCHEUNGBAUERINDEX,
00423 UNIHAN_TABLE_kCIHAIT,
00424 UNIHAN_TABLE_kCNS1986,
00425 UNIHAN_TABLE_kCNS1992,
00426 UNIHAN_TABLE_kCOMPATIBILITYVARIANT,
00427 UNIHAN_TABLE_kCOWLES,
00428 UNIHAN_TABLE_kDAEJAWEON,
00429 UNIHAN_TABLE_kDEFINITION,
00430 UNIHAN_TABLE_kEACC,
00431 UNIHAN_TABLE_kFENN,
00432 UNIHAN_TABLE_kFENNINDEX,
00433 UNIHAN_TABLE_kFOURCORNERCODE,
00434 UNIHAN_TABLE_kFREQUENCY,
00435 UNIHAN_TABLE_kGB0,
00436 UNIHAN_TABLE_kGB1,
00437 UNIHAN_TABLE_kGB3,
00438 UNIHAN_TABLE_kGB5,
00439 UNIHAN_TABLE_kGB7,
00440 UNIHAN_TABLE_kGB8,
00441 UNIHAN_TABLE_kGRADELEVEL,
00442 UNIHAN_TABLE_kGSR,
00443 UNIHAN_TABLE_kHANGUL,
00444 UNIHAN_TABLE_kHANYU,
00445 UNIHAN_TABLE_kHANYUPINLU,
00446 UNIHAN_TABLE_kHDZRADBREAK,
00447 UNIHAN_TABLE_kHKGLYPH,
00448 UNIHAN_TABLE_kHKSCS,
00449 UNIHAN_TABLE_kIBMJAPAN,
00450 UNIHAN_TABLE_kIICORE,
00451 UNIHAN_TABLE_kIRG_GSOURCE,
00452 UNIHAN_TABLE_kIRG_GSOURCE_EXTRA,
00453 UNIHAN_TABLE_kIRG_HSOURCE,
00454 UNIHAN_TABLE_kIRG_HSOURCE_EXTRA,
00455 UNIHAN_TABLE_kIRG_JSOURCE,
00456 UNIHAN_TABLE_kIRG_JSOURCE_EXTRA,
00457 UNIHAN_TABLE_kIRG_KPSOURCE,
00458 UNIHAN_TABLE_kIRG_KPSOURCE_EXTRA,
00459 UNIHAN_TABLE_kIRG_KSOURCE,
00460 UNIHAN_TABLE_kIRG_KSOURCE_EXTRA,
00461 UNIHAN_TABLE_kIRG_TSOURCE,
00462 UNIHAN_TABLE_kIRG_TSOURCE_EXTRA,
00463 UNIHAN_TABLE_kIRG_USOURCE,
00464 UNIHAN_TABLE_kIRG_USOURCE_EXTRA,
00465 UNIHAN_TABLE_kIRG_VSOURCE,
00466 UNIHAN_TABLE_kIRG_VSOURCE_EXTRA,
00467
00468 UNIHAN_TABLE_kIRGDAEJAWEON,
00469 UNIHAN_TABLE_kIRGDAIKANWAZITEN,
00470 UNIHAN_TABLE_kIRGHANYUDAZIDIAN,
00471 UNIHAN_TABLE_kIRGKANGXI,
00472 UNIHAN_TABLE_kJAPANESEKUN,
00473 UNIHAN_TABLE_kJAPANESEON,
00474 UNIHAN_TABLE_kJIS0213,
00475 UNIHAN_TABLE_kJIS0,
00476 UNIHAN_TABLE_kJIS1,
00477 UNIHAN_TABLE_kKANGXI,
00478 UNIHAN_TABLE_kKARLGREN,
00479 UNIHAN_TABLE_kKOREAN,
00480 UNIHAN_TABLE_kKPS0,
00481 UNIHAN_TABLE_kKPS1,
00482 UNIHAN_TABLE_kKSC0,
00483 UNIHAN_TABLE_kKSC1,
00484 UNIHAN_TABLE_kLAU,
00485 UNIHAN_TABLE_kMAINLANDTELEGRAPH,
00486 UNIHAN_TABLE_kMANDARIN,
00487 UNIHAN_TABLE_kMATTHEWS,
00488 UNIHAN_TABLE_kMEYERWEMPE,
00489 UNIHAN_TABLE_kMOROHASHI,
00490 UNIHAN_TABLE_kNELSON,
00491 UNIHAN_TABLE_kOTHERNUMERIC,
00492 UNIHAN_TABLE_kPHONETIC,
00493 UNIHAN_TABLE_kPRIMARYNUMERIC,
00494 UNIHAN_TABLE_kPSEUDOGB1,
00495 UNIHAN_TABLE_kRSADOBE_JAPAN1_6,
00496 UNIHAN_TABLE_kRSJAPANESE,
00497 UNIHAN_TABLE_kRSKANGXI,
00498 UNIHAN_TABLE_kRSKANWA,
00499 UNIHAN_TABLE_kRSKOREAN,
00500 UNIHAN_TABLE_kRSUNICODE,
00501 UNIHAN_TABLE_kSBGY,
00502 UNIHAN_TABLE_kSEMANTICVARIANT,
00503 UNIHAN_TABLE_kSEMANTICVARIANT_EXTRA,
00504 UNIHAN_TABLE_kSIMPLIFIEDVARIANT,
00505 UNIHAN_TABLE_kSPECIALIZEDSEMANTICVARIANT,
00506 UNIHAN_TABLE_kSPECIALIZEDSEMANTICVARIANT_EXTRA,
00507 UNIHAN_TABLE_kTAIWANTELEGRAPH,
00508 UNIHAN_TABLE_kTANG,
00509 UNIHAN_TABLE_kTOTALSTROKES,
00510 UNIHAN_TABLE_kTRADITIONALVARIANT,
00511 UNIHAN_TABLE_kVIETNAMESE,
00512 UNIHAN_TABLE_kXEROX,
00513 UNIHAN_TABLE_kXHC1983,
00514 UNIHAN_TABLE_kZVARIANT,
00515 UNIHAN_TABLE_kZVARIANT_EXTRA,
00516
00517 UNIHAN_TABLE_CODE,
00518 UNIHAN_TABLE_3RD_PARTY
00519 } UnihanTable;
00520
00524 #define UNIHAN_TABLES_COUNT UNIHAN_TABLE_3RD_PARTY
00525
00534 typedef enum{
00535 UNIHAN_INVALID_IRG_SOURCE=-1,
00536 UNIHAN_IRG_SOURCE_G,
00537 UNIHAN_IRG_SOURCE_H,
00538 UNIHAN_IRG_SOURCE_J,
00539 UNIHAN_IRG_SOURCE_KP,
00540 UNIHAN_IRG_SOURCE_K,
00541 UNIHAN_IRG_SOURCE_T,
00542 UNIHAN_IRG_SOURCE_U,
00543 UNIHAN_IRG_SOURCE_V
00544 } UnihanIRG_Source;
00545
00549 #define UNIHAN_IRG_SOURCES_COUNT UNIHAN_IRG_SOURCE_V+1
00550
00558 typedef enum{
00559 UNIHAN_INVALID_SOURCEID=-1,
00560 UNIHAN_SOURCE_G0,
00561 UNIHAN_SOURCE_G1,
00562 UNIHAN_SOURCE_G3,
00563 UNIHAN_SOURCE_G5,
00564 UNIHAN_SOURCE_G7,
00565 UNIHAN_SOURCE_GS,
00566 UNIHAN_SOURCE_G8,
00567 UNIHAN_SOURCE_GE,
00568 UNIHAN_SOURCE_G9,
00569 UNIHAN_SOURCE_G4K,
00570 UNIHAN_SOURCE_GBK,
00571 UNIHAN_SOURCE_GCH,
00572 UNIHAN_SOURCE_GCY,
00573 UNIHAN_SOURCE_GFZ,
00574 UNIHAN_SOURCE_GFZ_BK,
00575 UNIHAN_SOURCE_GHC,
00576 UNIHAN_SOURCE_GHZ,
00577 UNIHAN_SOURCE_GKX,
00578
00579 UNIHAN_SOURCE_H,
00580 UNIHAN_SOURCE_J0,
00581 UNIHAN_SOURCE_J1,
00582 UNIHAN_SOURCE_JA,
00583 UNIHAN_SOURCE_J3,
00584 UNIHAN_SOURCE_J3A,
00585 UNIHAN_SOURCE_J4,
00586
00587 UNIHAN_SOURCE_KP0,
00588 UNIHAN_SOURCE_KP1,
00589
00590 UNIHAN_SOURCE_K0,
00591 UNIHAN_SOURCE_K1,
00592 UNIHAN_SOURCE_K2,
00593 UNIHAN_SOURCE_K3,
00594 UNIHAN_SOURCE_K4,
00595
00596 UNIHAN_SOURCE_T1,
00597 UNIHAN_SOURCE_T2,
00598 UNIHAN_SOURCE_T3,
00599 UNIHAN_SOURCE_T4,
00600 UNIHAN_SOURCE_T5,
00601 UNIHAN_SOURCE_T6,
00602 UNIHAN_SOURCE_T7,
00603 UNIHAN_SOURCE_TF,
00604
00605 UNIHAN_SOURCE_U,
00606
00607 UNIHAN_SOURCE_V0,
00608 UNIHAN_SOURCE_V1,
00609 UNIHAN_SOURCE_V2,
00610 UNIHAN_SOURCE_V3,
00611 } UnihanIRG_SourceId;
00612
00616 #define UNIHAN_SOURCES_COUNT UNIHAN_SOURCE_V3+1
00617
00618
00622 typedef enum{
00623 UNIHAN_INVALID_LOCALE=-1,
00624 UNIHAN_LOCALE_JA_JP,
00625 UNIHAN_LOCALE_KO_KP,
00626 UNIHAN_LOCALE_KO_KR,
00627 UNIHAN_LOCALE_ZH_CN,
00628 UNIHAN_LOCALE_ZH_HK,
00629 UNIHAN_LOCALE_ZH_SG,
00630 UNIHAN_LOCALE_ZH_TW,
00631 UNIHAN_LOCALE_VI_VN,
00632 } UnihanLocale;
00636 #define UNIHAN_LOCALES_COUNT UNIHAN_LOCALE_VI_VN+1
00637
00647 typedef enum{
00648 UNIHAN_INVALID_RANGE=-1,
00649 UNIHAN_RANGE_CJK_UNIFIED_IDEOGRAPHS_EXT_A,
00650 UNIHAN_RANGE_CJK_UNIFIED_IDEOGRAPHS,
00651 UNIHAN_RANGE_CJK_UNIFIED_IDEOGRAPHS_4_1,
00652 UNIHAN_RANGE_CJK_UNIFIED_IDEOGRAPHS_5_1,
00653 UNIHAN_RANGE_CJK_COMPATIBILITY_UNIFIED_IDEOGRAPHS_A,
00654 UNIHAN_RANGE_CJK_COMPATIBILITY_UNIFIED_IDEOGRAPHS_B,
00655 UNIHAN_RANGE_CJK_COMPATIBILITY_UNIFIED_IDEOGRAPHS_4_1,
00656 UNIHAN_RANGE_CJK_UNIFIED_IDEOGRAPHS_EXT_B,
00657 UNIHAN_RANGE_CJK_COMPATIBILITY_SUPPLEMENT
00658 } UnihanRange;
00662 #define UNIHAN_RANGES_COUNT UNIHAN_RANGE_CJK_COMPATIBILITY_SUPPLEMENT+1
00663
00672 #define LOCALE_JA_JP_SOURCES_COMMON UNIHAN_SOURCE_J0, UNIHAN_INVALID_SOURCEID
00673
00677 #define LOCALE_KO_KP_SOURCES_COMMON UNIHAN_SOURCE_KP0, UNIHAN_INVALID_SOURCEID
00678
00682 #define LOCALE_KO_KR_SOURCES_COMMON UNIHAN_SOURCE_K0, UNIHAN_INVALID_SOURCEID
00683
00687 #define LOCALE_ZH_CN_SOURCES_COMMON UNIHAN_SOURCE_G0, UNIHAN_INVALID_SOURCEID
00688
00692 #define LOCALE_ZH_HK_SOURCES_COMMON UNIHAN_SOURCE_T1, UNIHAN_SOURCE_T2, UNIHAN_SOURCE_H, UNIHAN_INVALID_SOURCEID
00693
00697 #define LOCALE_ZH_SG_SOURCES_COMMON UNIHAN_SOURCE_G0, UNIHAN_SOURCE_GS, UNIHAN_INVALID_SOURCEID
00698
00702 #define LOCALE_ZH_TW_SOURCES_COMMON UNIHAN_SOURCE_T1, UNIHAN_SOURCE_T2, UNIHAN_INVALID_SOURCEID
00703
00707 #define LOCALE_VI_VN_SOURCES_COMMON UNIHAN_SOURCE_V0, UNIHAN_INVALID_SOURCEID
00708
00709 #endif
00710