Back to index

im-sdk  12.3.91
hangul.h
Go to the documentation of this file.
00001 /*
00002  * Copyright (C) 2003   Choe Hwanjin <krisna@kldp.org>
00003  *
00004  * This library is free software; you can redistribute it and/or
00005  * modify it under the terms of the GNU Library General Public
00006  * License as published by the Free Software Foundation; either
00007  * version 2 of the License, or (at your option) any later version.
00008  *
00009  * This library is distributed in the hope that it will be useful,
00010  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00011  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00012  * Library General Public License for more details.
00013  *
00014  * You should have received a copy of the GNU Library General Public
00015  * License along with this library; if not, write to the
00016  * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
00017  * Boston, MA 02111-1307, USA.
00018  */
00019 
00020 #ifndef __HANGUL_H_
00021 #define __HANGUL_H_
00022 
00023 #include <stddef.h>
00024 
00025 #define HCF   0x115f        /* hangul choseong  filler */
00026 #define HJF   0x1160        /* hangul jungseong filler */
00027 
00028 #define hangul_is_choseong(ch)     ((ch) >= 0x1100 && (ch) <= 0x1159)
00029 #define hangul_is_jungseong(ch)    ((ch) >= 0x1161 && (ch) <= 0x11a2)
00030 #define hangul_is_jongseong(ch)    ((ch) >= 0x11a7 && (ch) <= 0x11f9)
00031 
00032 wchar_t hangul_choseong_to_cjamo(wchar_t ch);
00033 wchar_t hangul_jungseong_to_cjamo(wchar_t ch);
00034 wchar_t hangul_jongseong_to_cjamo(wchar_t ch);
00035 
00036 wchar_t hangul_choseong_to_jongseong(wchar_t ch);
00037 wchar_t hangul_jongseong_to_choseong(wchar_t ch);
00038 void    hangul_jongseong_dicompose(wchar_t ch, wchar_t* jong, wchar_t* cho);
00039 
00040 wchar_t hangul_jamo_to_syllable(wchar_t choseong,
00041                             wchar_t jungseong,
00042                             wchar_t jongseong);
00043 wchar_t hangul_ucs_to_ksc(wchar_t choseong,
00044                        wchar_t jungseong,
00045                        wchar_t jongseong);
00046 
00047 #endif /* __HANGUL_H_ */