From: Choe Hwanjin Date: Wed, 23 Nov 2011 14:37:33 +0000 (+0900) Subject: Doxygen으로 생성된 문서 추가 X-Git-Tag: accepted/tizen/common/20140826.160730~20 X-Git-Url: http://review.tizen.org/git/?p=platform%2Fcore%2Fuifw%2Flibhangul.git;a=commitdiff_plain;h=aad92b2be3ecbe84453e9fcd0fe938f2ba7fa0df Doxygen으로 생성된 문서 추가 libhangul API 0.1.0 Change-Id: I386811ed7284a7b3e0b418def8898e906711ccb5 --- diff --git a/doc/html/deprecated.html b/doc/html/deprecated.html new file mode 100644 index 0000000..6a0f80f --- /dev/null +++ b/doc/html/deprecated.html @@ -0,0 +1,25 @@ + + +libhangul: 잘못된 코드 목록 + + + + +
+ +
+

잘못된 코드 목록

+
전역 hangul_syllable_to_jaso
+
이 함수 대신 hangul_syllable_to_jamo함수를 사용한다.
+
+
생성시간 : Wed Nov 23 23:31:45 2011, 프로젝트명 : libhangul, 생성자 :   + +doxygen 1.5.3-20071008
+ + diff --git a/doc/html/dir_74e344cbec9860085ddf79a94754a2b6.html b/doc/html/dir_74e344cbec9860085ddf79a94754a2b6.html new file mode 100644 index 0000000..bf0db26 --- /dev/null +++ b/doc/html/dir_74e344cbec9860085ddf79a94754a2b6.html @@ -0,0 +1,35 @@ + + +libhangul: /home/krisna/work/libhangul/doc/hangul/ 디렉토리 참조 + + + + +
+ +
+ +

hangul 디렉토리 참조

+ + + + + + + + + + +

파일들

파일  hangul.h [코드]
파일  hangulctype.c
파일  hangulinputcontext.c
파일  hanja.c
+
생성시간 : Wed Nov 23 23:31:45 2011, 프로젝트명 : libhangul, 생성자 :   + +doxygen 1.5.3-20071008
+ + diff --git a/doc/html/dirs.html b/doc/html/dirs.html new file mode 100644 index 0000000..b3f1df6 --- /dev/null +++ b/doc/html/dirs.html @@ -0,0 +1,24 @@ + + +libhangul: 디렉토리 계통도 + + + + +
+ +
+

libhangul 디렉토리

이 디렉토리 목록은 완전하진 않지만, (대략적으로) 알파벳순으로 정렬되어있습니다.: +
생성시간 : Wed Nov 23 23:31:45 2011, 프로젝트명 : libhangul, 생성자 :   + +doxygen 1.5.3-20071008
+ + diff --git a/doc/html/doxygen.css b/doc/html/doxygen.css new file mode 100644 index 0000000..e261cf6 --- /dev/null +++ b/doc/html/doxygen.css @@ -0,0 +1,359 @@ +BODY,H1,H2,H3,H4,H5,H6,P,CENTER,TD,TH,UL,DL,DIV { + font-family: Geneva, Arial, Helvetica, sans-serif; +} +BODY,TD { + font-size: 90%; +} +H1 { + text-align: center; + font-size: 160%; +} +H2 { + font-size: 120%; +} +H3 { + font-size: 100%; +} +CAPTION { font-weight: bold } +DIV.qindex { + width: 100%; + background-color: #e8eef2; + border: 1px solid #84b0c7; + text-align: center; + margin: 2px; + padding: 2px; + line-height: 140%; +} +DIV.nav { + width: 100%; + background-color: #e8eef2; + border: 1px solid #84b0c7; + text-align: center; + margin: 2px; + padding: 2px; + line-height: 140%; +} +DIV.navtab { + background-color: #e8eef2; + border: 1px solid #84b0c7; + text-align: center; + margin: 2px; + margin-right: 15px; + padding: 2px; +} +TD.navtab { + font-size: 70%; +} +A.qindex { + text-decoration: none; + font-weight: bold; + color: #1A419D; +} +A.qindex:visited { + text-decoration: none; + font-weight: bold; + color: #1A419D +} +A.qindex:hover { + text-decoration: none; + background-color: #ddddff; +} +A.qindexHL { + text-decoration: none; + font-weight: bold; + background-color: #6666cc; + color: #ffffff; + border: 1px double #9295C2; +} +A.qindexHL:hover { + text-decoration: none; + background-color: #6666cc; + color: #ffffff; +} +A.qindexHL:visited { text-decoration: none; background-color: #6666cc; color: #ffffff } +A.el { text-decoration: none; font-weight: bold } +A.elRef { font-weight: bold } +A.code:link { text-decoration: none; font-weight: normal; color: #0000FF} +A.code:visited { text-decoration: none; font-weight: normal; color: #0000FF} +A.codeRef:link { font-weight: normal; color: #0000FF} +A.codeRef:visited { font-weight: normal; color: #0000FF} +A:hover { text-decoration: none; background-color: #f2f2ff } +DL.el { margin-left: -1cm } +.fragment { + font-family: monospace, fixed; + font-size: 95%; +} +PRE.fragment { + border: 1px solid #CCCCCC; + background-color: #f5f5f5; + margin-top: 4px; + margin-bottom: 4px; + margin-left: 2px; + margin-right: 8px; + padding-left: 6px; + padding-right: 6px; + padding-top: 4px; + padding-bottom: 4px; +} +DIV.ah { background-color: black; font-weight: bold; color: #ffffff; margin-bottom: 3px; margin-top: 3px } + +DIV.groupHeader { + margin-left: 16px; + margin-top: 12px; + margin-bottom: 6px; + font-weight: bold; +} +DIV.groupText { margin-left: 16px; font-style: italic; font-size: 90% } +BODY { + background: white; + color: black; + margin-right: 20px; + margin-left: 20px; +} +TD.indexkey { + background-color: #e8eef2; + font-weight: bold; + padding-right : 10px; + padding-top : 2px; + padding-left : 10px; + padding-bottom : 2px; + margin-left : 0px; + margin-right : 0px; + margin-top : 2px; + margin-bottom : 2px; + border: 1px solid #CCCCCC; +} +TD.indexvalue { + background-color: #e8eef2; + font-style: italic; + padding-right : 10px; + padding-top : 2px; + padding-left : 10px; + padding-bottom : 2px; + margin-left : 0px; + margin-right : 0px; + margin-top : 2px; + margin-bottom : 2px; + border: 1px solid #CCCCCC; +} +TR.memlist { + background-color: #f0f0f0; +} +P.formulaDsp { text-align: center; } +IMG.formulaDsp { } +IMG.formulaInl { vertical-align: middle; } +SPAN.keyword { color: #008000 } +SPAN.keywordtype { color: #604020 } +SPAN.keywordflow { color: #e08000 } +SPAN.comment { color: #800000 } +SPAN.preprocessor { color: #806020 } +SPAN.stringliteral { color: #002080 } +SPAN.charliteral { color: #008080 } +.mdescLeft { + padding: 0px 8px 4px 8px; + font-size: 80%; + font-style: italic; + background-color: #FAFAFA; + border-top: 1px none #E0E0E0; + border-right: 1px none #E0E0E0; + border-bottom: 1px none #E0E0E0; + border-left: 1px none #E0E0E0; + margin: 0px; +} +.mdescRight { + padding: 0px 8px 4px 8px; + font-size: 80%; + font-style: italic; + background-color: #FAFAFA; + border-top: 1px none #E0E0E0; + border-right: 1px none #E0E0E0; + border-bottom: 1px none #E0E0E0; + border-left: 1px none #E0E0E0; + margin: 0px; +} +.memItemLeft { + padding: 1px 0px 0px 8px; + margin: 4px; + border-top-width: 1px; + border-right-width: 1px; + border-bottom-width: 1px; + border-left-width: 1px; + border-top-color: #E0E0E0; + border-right-color: #E0E0E0; + border-bottom-color: #E0E0E0; + border-left-color: #E0E0E0; + border-top-style: solid; + border-right-style: none; + border-bottom-style: none; + border-left-style: none; + background-color: #FAFAFA; + font-size: 80%; +} +.memItemRight { + padding: 1px 8px 0px 8px; + margin: 4px; + border-top-width: 1px; + border-right-width: 1px; + border-bottom-width: 1px; + border-left-width: 1px; + border-top-color: #E0E0E0; + border-right-color: #E0E0E0; + border-bottom-color: #E0E0E0; + border-left-color: #E0E0E0; + border-top-style: solid; + border-right-style: none; + border-bottom-style: none; + border-left-style: none; + background-color: #FAFAFA; + font-size: 80%; +} +.memTemplItemLeft { + padding: 1px 0px 0px 8px; + margin: 4px; + border-top-width: 1px; + border-right-width: 1px; + border-bottom-width: 1px; + border-left-width: 1px; + border-top-color: #E0E0E0; + border-right-color: #E0E0E0; + border-bottom-color: #E0E0E0; + border-left-color: #E0E0E0; + border-top-style: none; + border-right-style: none; + border-bottom-style: none; + border-left-style: none; + background-color: #FAFAFA; + font-size: 80%; +} +.memTemplItemRight { + padding: 1px 8px 0px 8px; + margin: 4px; + border-top-width: 1px; + border-right-width: 1px; + border-bottom-width: 1px; + border-left-width: 1px; + border-top-color: #E0E0E0; + border-right-color: #E0E0E0; + border-bottom-color: #E0E0E0; + border-left-color: #E0E0E0; + border-top-style: none; + border-right-style: none; + border-bottom-style: none; + border-left-style: none; + background-color: #FAFAFA; + font-size: 80%; +} +.memTemplParams { + padding: 1px 0px 0px 8px; + margin: 4px; + border-top-width: 1px; + border-right-width: 1px; + border-bottom-width: 1px; + border-left-width: 1px; + border-top-color: #E0E0E0; + border-right-color: #E0E0E0; + border-bottom-color: #E0E0E0; + border-left-color: #E0E0E0; + border-top-style: solid; + border-right-style: none; + border-bottom-style: none; + border-left-style: none; + color: #606060; + background-color: #FAFAFA; + font-size: 80%; +} +.search { color: #003399; + font-weight: bold; +} +FORM.search { + margin-bottom: 0px; + margin-top: 0px; +} +INPUT.search { font-size: 75%; + color: #000080; + font-weight: normal; + background-color: #e8eef2; +} +TD.tiny { font-size: 75%; +} +a { + color: #1A41A8; +} +a:visited { + color: #2A3798; +} +.dirtab { padding: 4px; + border-collapse: collapse; + border: 1px solid #84b0c7; +} +TH.dirtab { background: #e8eef2; + font-weight: bold; +} +HR { height: 1px; + border: none; + border-top: 1px solid black; +} + +/* Style for detailed member documentation */ +.memtemplate { + font-size: 80%; + color: #606060; + font-weight: normal; + margin-left: 3px; +} +.memnav { + background-color: #e8eef2; + border: 1px solid #84b0c7; + text-align: center; + margin: 2px; + margin-right: 15px; + padding: 2px; +} +.memitem { + padding: 4px; + background-color: #eef3f5; + border-width: 1px; + border-style: solid; + border-color: #dedeee; + -moz-border-radius: 8px 8px 8px 8px; +} +.memname { + white-space: nowrap; + font-weight: bold; +} +.memdoc{ + padding-left: 10px; +} +.memproto { + background-color: #d5e1e8; + width: 100%; + border-width: 1px; + border-style: solid; + border-color: #84b0c7; + font-weight: bold; + -moz-border-radius: 8px 8px 8px 8px; +} +.paramkey { + text-align: right; +} +.paramtype { + white-space: nowrap; +} +.paramname { + color: #602020; + font-style: italic; + white-space: nowrap; +} +/* End Styling for detailed member documentation */ + +/* for the tree view */ +.ftvtree { + font-family: sans-serif; + margin:0.5em; +} +.directory { font-size: 9pt; font-weight: bold; } +.directory h3 { margin: 0px; margin-top: 1em; font-size: 11pt; } +.directory > h3 { margin-top: 0; } +.directory p { margin: 0px; white-space: nowrap; } +.directory div { display: none; margin: 0px; } +.directory img { vertical-align: -30%; } diff --git a/doc/html/doxygen.png b/doc/html/doxygen.png new file mode 100644 index 0000000..f0a274b Binary files /dev/null and b/doc/html/doxygen.png differ diff --git a/doc/html/files.html b/doc/html/files.html new file mode 100644 index 0000000..625e3d7 --- /dev/null +++ b/doc/html/files.html @@ -0,0 +1,33 @@ + + +libhangul: 파일 색인 + + + + +
+ +
+
+ +
+

libhangul 파일 목록

다음은 문서화된 모든 파일에 대한 목록입니다. (간략한 설명만을 보여줍니다) : + + + + +
hangul.h [코드]
hangulctype.c
hangulinputcontext.c
hanja.c
+
생성시간 : Wed Nov 23 23:31:45 2011, 프로젝트명 : libhangul, 생성자 :   + +doxygen 1.5.3-20071008
+ + diff --git a/doc/html/globals.html b/doc/html/globals.html new file mode 100644 index 0000000..53c168f --- /dev/null +++ b/doc/html/globals.html @@ -0,0 +1,136 @@ + + +libhangul: 데이타 필드 + + + + +
+ +
+
+ +
+
+ +
+
+ +
+ +

+다음은 문서화된 모든 함수, 변수, 매크로, 열거형, 타입정의들의 목록입니다. 각 항목은 그들에 대한 문서화 페이지의 링크를 가지고 있습니다. : +

+

- h -

+
생성시간 : Wed Nov 23 23:31:45 2011, 프로젝트명 : libhangul, 생성자 :   + +doxygen 1.5.3-20071008
+ + diff --git a/doc/html/globals_func.html b/doc/html/globals_func.html new file mode 100644 index 0000000..aa76677 --- /dev/null +++ b/doc/html/globals_func.html @@ -0,0 +1,136 @@ + + +libhangul: 데이타 필드 + + + + +
+ +
+
+ +
+
+ +
+
+ +
+ +

+  +

+

- h -

+
생성시간 : Wed Nov 23 23:31:45 2011, 프로젝트명 : libhangul, 생성자 :   + +doxygen 1.5.3-20071008
+ + diff --git a/doc/html/group__hangulctype.html b/doc/html/group__hangulctype.html new file mode 100644 index 0000000..2d5419b --- /dev/null +++ b/doc/html/group__hangulctype.html @@ -0,0 +1,576 @@ + + +libhangul: 한글 글자 조작 + + + + +
+ +
+

한글 글자 조작

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

타입정의

typedef uint32_t ucschar
 UCS4 코드 단위의 글자 코드 값

함수

bool hangul_is_choseong (ucschar c)
 ì´ˆì„±ì¸ì§€ 확인하는 함수
bool hangul_is_jungseong (ucschar c)
 ì¤‘성인지 확인하는 함수
bool hangul_is_jongseong (ucschar c)
 ì¢…성인지 확인하는 함수
+bool hangul_is_choseong_conjoinable (ucschar c)
 ì´ˆì„±ì´ê³  조합 가능한지 확인
+bool hangul_is_jungseong_conjoinable (ucschar c)
 ì¤‘성이고 조합 가능한지 확인
+bool hangul_is_jongseong_conjoinable (ucschar c)
 ì¢…성이고 조합 가능한지 확인
bool hangul_is_syllable (ucschar c)
 í•œê¸€ 음절 인지 확
bool hangul_is_jamo (ucschar c)
 ìžëª¨ 인지 확인
bool hangul_is_cjamo (ucschar c)
 í˜¸í™˜ 자모인지 확인
ucschar hangul_jamo_to_cjamo (ucschar c)
 ìžëª¨ 코드를 대응하는 호환 자모로 변환
ucschar hangul_jamo_to_syllable (ucschar choseong, ucschar jungseong, ucschar jongseong)
 ìžëª¨ 코드를 조합하여 한글 음절로 변환
void hangul_syllable_to_jamo (ucschar syllable, ucschar *choseong, ucschar *jungseong, ucschar *jongseong)
 ìŒì ˆì„ 자모로 분해
int hangul_syllable_len (const ucschar *str, int max_len)
 í•œ 음절에 해당하는 코드의 갯수를 구하는 함수
const ucscharhangul_syllable_iterator_prev (const ucschar *iter, const ucschar *begin)
 iter를 기준으로 이전 음절의 첫자모 글자에 대한 포인터를 구하는 함수
const ucscharhangul_syllable_iterator_next (const ucschar *iter, const ucschar *end)
 iter를 기준으로 다음 음절의 첫자모 글자에 대한 포인터를 구하는 함수
int hangul_jamos_to_syllables (ucschar *dest, int destlen, const ucschar *src, int srclen)
 ìžëª¨ 스트링을 음절 스트링으로 변환
+

상세한 설명

+

+한글 글자 조작

+libhangul은 한글 각 글자를 구분하고 조작하는데 사용할 수 있는 몇가지 함수를 제공한다. libhangul의 글자 구분 함수의 인터페이스에서 글자의 기본 단위는 UCS4 코드값이다.

타입정의 문서화

+ +
+
+ + + + +
ucschar
+
+
+ +

+UCS4 코드 단위의 글자 코드 값 +

+UCS4 코드 값을 저장한다. libhangul에서 사용하는 문자열의 기본단위이다. preedit 문자열과 commit 문자열 모두 ucschar 포인터 형으로 전달된다. 이 스트링은 C 스트링과 유사하게 0으로 끝난다. 유니코드 값이 한글의 어떤 범주에 속하는지 확인하는 함수도 모두 ucschar 형을 사용한다. +

+

+


함수 문서화

+ +
+
+ + + + + + + + + +
bool hangul_is_choseong (ucschar  c  ) 
+
+
+ +

+초성인지 확인하는 함수 +

+

매개변수:
+ + +
c UCS4 코드 값
+
+
반환값:
c 가 초성에 해당하면 true를 리턴함, 아니면 false
+c 로 주어진 UCS4 코드가 초성인지 확인한다. Unicode 5.2 지원 +
+

+ +

+
+ + + + + + + + + +
bool hangul_is_cjamo (ucschar  c  ) 
+
+
+ +

+호환 자모인지 확인 +

+

매개변수:
+ + +
c UCS4 코드 값
+
+
반환값:
c가 호환자모이면 true, 그 외에는 false
+이 함수는 c로 주어진 UCS4 코드가 호환 자모인지 확인한다. +
+

+ +

+
+ + + + + + + + + +
bool hangul_is_jamo (ucschar  c  ) 
+
+
+ +

+자모 인지 확인 +

+

매개변수:
+ + +
c UCS4 코드 값
+
+
반환값:
c 가 자모 코드이면 true를 리턴, 그외에는 false
+c 로 주어진 UCS4 코드가 자모 코드인지 확인한다. Unicode 5.2 지원 +
+

+ +

+
+ + + + + + + + + +
bool hangul_is_jongseong (ucschar  c  ) 
+
+
+ +

+종성인지 확인하는 함수 +

+

매개변수:
+ + +
c UCS4 코드 값
+
+
반환값:
c 가 종성에 해당하면 true를 리턴함, 아니면 false
+c 로 주어진 UCS4 코드가 종성인지 확인한다. Unicode 5.2 지원 +
+

+ +

+
+ + + + + + + + + +
bool hangul_is_jungseong (ucschar  c  ) 
+
+
+ +

+중성인지 확인하는 함수 +

+

매개변수:
+ + +
c UCS4 코드 값
+
+
반환값:
c 가 중성에 해당하면 true를 리턴함, 아니면 false
+c 로 주어진 UCS4 코드가 중성인지 확인한다. Unicode 5.2 지원 +
+

+ +

+
+ + + + + + + + + +
bool hangul_is_syllable (ucschar  c  ) 
+
+
+ +

+한글 음절 인지 확 +

+

매개변수:
+ + +
c UCS4 코드 값
+
+
반환값:
c가 한글 음절 코드이면 true, 그 외에는 false
+이 함수는 c로 주어진 UCS4 코드가 현대 한글 음절에 해당하는지 확인한다. +
+

+ +

+
+ + + + + + + + + +
ucschar hangul_jamo_to_cjamo (ucschar  c  ) 
+
+
+ +

+자모 코드를 대응하는 호환 자모로 변환 +

+

매개변수:
+ + +
c ë³€í™˜í•  UCS4 코드 값
+
+
반환값:
c 에 대응되는 호환 자모 값, or c
+이 함수는 c 로 주어진 자모 코드와 같은 형태를 가진 호환 자모 값을 리턴한다. 자모와 같은 형태를 가진 호환 자모가 없는 경우에는 c 의 값을 그대로 리턴한다. +
+

+ +

+
+ + + + + + + + + + + + + + + + + + + + + + + + +
ucschar hangul_jamo_to_syllable (ucschar  choseong,
ucschar  jungseong,
ucschar  jongseong 
)
+
+
+ +

+자모 코드를 조합하여 한글 음절로 변환 +

+

매개변수:
+ + + + +
choseong ì´ˆì„±ì´ 될 UCS4 코드 값
jungseong ì¤‘성이 될 UCS4 코드 값
jongseong ì¢…성이 될 UCS4 코드 값
+
+
반환값:
choseong jungseong jongseong을 조합한 현대 한글 음절 코드, 또는 0
+이 함수는 choseong jungseong jongseong으로 주어진 코드 값을 각각 초성, 중성, 종성으로 하는 현대 한글 음절 코드를 구한다. choseong jungseong jongseong 이 조합 가능한 코드가 아니라면 0을 리턴한다. 종성이 없는 글자를 만들기 위해서는 jongseong에 0을 주면 된다. +
+

+ +

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
int hangul_jamos_to_syllables (ucschar dest,
int  destlen,
const ucschar src,
int  srclen 
)
+
+
+ +

+자모 스트링을 음절 스트링으로 변환 +

+

매개변수:
+ + + + + +
dest ìŒì ˆí˜•ìœ¼ë¡œ 변환된 결과가 저장될 버퍼
destlen ê²°ê³¼ë¥¼ 저장할 버퍼의 길이(ucschar 코드 단위)
src ë³€í™˜í•  자모 스트링
srclen ë³€í™˜í•  자모 스트링의 길이(ucschar 코드 단위)
+
+
반환값:
destlen 에 저장한 코드의 갯수
+이 함수는 L+V+T*M? 패턴에 따라 자모 스트링 변환을 시도한다. 한 음절을 판단하는 기준은 hangul_syllable_len 을 참조한다. 만일 src 가 적절한 음절형태로 변환이 불가능한 경우에는 자모 스트링이 그대로 복사된다.

+이 함수는 자모 스트링 src 를 음절형으로 변환하여 dest 에 저장한다. srclen 에 지정된 갯수만큼 읽고, destlen 에 지정된 길이 이상 쓰지 않는다. srclen 이 -1이라면 src 는 0으로 끝나는 스트링으로 가정하고 0을 제외한 길이까지 변환을 시도한다. 따라서 변환된 결과 스트링은 0으로 끝나지 않는다. 만일 0으로 끝나는 스트링을 만들고 싶다면 다음과 같이 한다.

+

 int n = hangul_jamos_to_syllables(dest, destlen, src, srclen);
+ dest[n] = 0;
+
+
+

+ +

+
+ + + + + + + + + + + + + + + + + + +
const ucschar* hangul_syllable_iterator_next (const ucschar iter,
const ucschar end 
)
+
+
+ +

+iter를 기준으로 다음 음절의 첫자모 글자에 대한 포인터를 구하는 함수 +

+

매개변수:
+ + + +
iter í˜„재 위치
end ìŠ¤íŠ¸ë§ì˜ 끝위치, 포인터가 이동할 한계값
+
+
반환값:
다음 음절의 첫번째 자모에 대한 포인터
+이 함수는 iter로 주어진 자모 스트링의 포인터를 기준으로 다음 음절의 첫번째 자모에 대한 포인터를 리턴한다. 음절을 찾기위해서 end를 넘어 이동하지 않는다.

+한 음절이라고 판단하는 기준은 L*V*T+M? 패턴에 따른다. +

+

+ +

+
+ + + + + + + + + + + + + + + + + + +
const ucschar* hangul_syllable_iterator_prev (const ucschar iter,
const ucschar begin 
)
+
+
+ +

+iter를 기준으로 이전 음절의 첫자모 글자에 대한 포인터를 구하는 함수 +

+

매개변수:
+ + + +
iter í˜„재 위치
begin ìŠ¤íŠ¸ë§ì˜ 시작위치, 포인터가 이동할 한계값
+
+
반환값:
이전 음절의 첫번째 자모에 대한 포인터
+이 함수는 iter로 주어진 자모 스트링의 포인터를 기준으로 이전 음절의 첫번째 자모에 대한 포인터를 리턴한다. 음절을 찾기위해서 begin보다 앞쪽으로 이동하지 않는다.

+한 음절이라고 판단하는 기준은 L*V*T+M? 패턴에 따른다. +

+

+ +

+
+ + + + + + + + + + + + + + + + + + +
int hangul_syllable_len (const ucschar str,
int  max_len 
)
+
+
+ +

+한 음절에 해당하는 코드의 갯수를 구하는 함수 +

+

매개변수:
+ + + +
str ìŒì ˆì˜ 길이를 구할 스트링
max_len str 에서 읽을 길이의 제한값
+
+
반환값:
한 음절에 해당하는 코드의 갯수
+이 함수는 str 에서 한 음절에 해당하는 코드의 갯수를 구한다. 한 음절에 해당하는 코드의 갯수가 max_len 보다 많다면 max_len 을 반환한다. 한 음절이라고 판단하는 기준은 L*V*T+ 패턴에 따른다. 이 패턴은 regular expression의 컨벤션을 따른 것으로, 1개 이상의 초성과 중성, 0개 이상의 종성이 모인 자모 스트링을 한 음절로 인식한다는 뜻이다. 예를 들면 다음과 같은 자모 스트링도 한 음절로 인식한다.

+예) "ㅂ ㅂ ㅜ ㅔ ㄹ ㄱ" -> "쀍"

+따라서 위 경우에는 6을 반환하게 된다.

+일반적으로는 방점(U+302E, U+302F)까지 한 음절로 인식하겠지만, 이 함수는 음절과 자모간 변환을 편리하게 하기 위해 구현된 것으로 방점은 다른 음절로 인식한다.

+str 이 자모 코드에 해당하지 않는 경우에는 1을 반환한다.

+이 함수는 자모 스트링에서 총 음절의 갯수를 구하는 함수가 아님에 주의한다. +

+

+ +

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
void hangul_syllable_to_jamo (ucschar  syllable,
ucschar choseong,
ucschar jungseong,
ucschar jongseong 
)
+
+
+ +

+음절을 자모로 분해 +

+

매개변수:
+ + +
syllable ë¶„í•´í•  음절
+
+
반환값:
+ + + + +
choseong ìŒì ˆì—ì„œ 초성 부분의 코드
jungseong ìŒì ˆì—ì„œ 중성 부분의 코드
jongseong ìŒì ˆì—ì„œ 종성 부분의 코드, 종성이 없으면 0을 반환한다
+
+
반환값:
없음
+이 함수는 syllable 로 주어진 음절 코드를 분해하여 자모 코드를 반환한다. 반환하는 값은 choseong, jungseong, jongseong 의 포인터에 대입하여 리턴한다. 종성이 없는 음절인 경우에는 jongseong 에 0을 반환한다. +
+

+


생성시간 : Wed Nov 23 23:31:45 2011, 프로젝트명 : libhangul, 생성자 :   + +doxygen 1.5.3-20071008
+ + diff --git a/doc/html/group__hangulic.html b/doc/html/group__hangulic.html new file mode 100644 index 0000000..deee36d --- /dev/null +++ b/doc/html/group__hangulic.html @@ -0,0 +1,608 @@ + + +libhangul: 한글 입력 기능 구현 + + + + +
+ +
+

한글 입력 기능 구현

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

타입정의

typedef struct _HangulInputContext HangulInputContext
 í•œê¸€ 입력 상태를 관리하기 위한 오브젝트

함수

bool hangul_ic_process (HangulInputContext *hic, int ascii)
 í‚¤ 입력을 처리하여 실제로 한글 조합을 하는 함수
const ucscharhangul_ic_get_preedit_string (HangulInputContext *hic)
 í˜„재 상태의 preedit string을 구하는 함수
const ucscharhangul_ic_get_commit_string (HangulInputContext *hic)
 í˜„재 상태의 commit string을 구하는 함수
void hangul_ic_reset (HangulInputContext *hic)
 HangulInputContext를 초기상태로 되돌리는 함수
const ucscharhangul_ic_flush (HangulInputContext *hic)
 HangulInputContext의 입력 상태를 완료하는 함수
bool hangul_ic_backspace (HangulInputContext *hic)
 HangulInputContext가 backspace 키를 처리하도록 하는 함수
bool hangul_ic_is_empty (HangulInputContext *hic)
 HangulInputContext가 조합중인 글자를 가지고 있는지 확인하는 함수
bool hangul_ic_has_choseong (HangulInputContext *hic)
 HangulInputContext가 조합중인 초성을 가지고 있는지 확인하는 함수
bool hangul_ic_has_jungseong (HangulInputContext *hic)
 HangulInputContext가 조합중인 중성을 가지고 있는지 확인하는 함수
bool hangul_ic_has_jongseong (HangulInputContext *hic)
 HangulInputContext가 조합중인 종성을 가지고 있는지 확인하는 함수
void hangul_ic_select_keyboard (HangulInputContext *hic, const char *id)
 HangulInputContext의 자판 배열을 바꾸는 함수
HangulInputContexthangul_ic_new (const char *keyboard)
 HangulInputContext 오브젝트를 생성한다.
void hangul_ic_delete (HangulInputContext *hic)
 HangulInputContext를 삭제하는 함수
bool hangul_ic_is_transliteration (HangulInputContext *hic)
 ì£¼ì–´ì§„ hic가 transliteration method인지 판별
+

상세한 설명

+

+Hangul Input Context의 사용법

+이 섹션에서는 한글 입력 기능을 구현하는 핵심 기능에 대해 설명한다.

+먼저 preedit string과 commit string 이 두 용어에 대해서 설멍하겠다. 이 두가지 용어는 Unix 계열의 입력기 framework에서 널리 쓰이는 표현이다.

+preedit string은 아직 조합중으로 어플리케이션에 완전히 입력되지 않은 스트링을 가리킨다. 일반적으로 한글 입력기에서는 역상으로 보이고 일본 중국어 입력기에서는 underline이 붙어 나타난다. 아직 완성이 되지 않은 스트링이므로 어플리케이션에 전달이 되지 않고 사라질 수도 있다.

+commit string은 조합이 완료되어 어플리케이션에 전달되는 스트링이다. 이 스트링은 실제 어플리케이션의 텍스트로 인식이 되므로 이 이후에는 더이상 입력기가 관리할 수 있는 데이터가 아니다.

+한글 입력과정은 다음과 같은 과정을 거치게 된다. 입력된 영문 키를 그에 해댱하는 한글 자모로 변환한후 한글 자모를 모아 하나의 음절을 만든다. 여기까지 이루어지는 과정을 preedit string 형태로 사용자에게 계속 보이게 하는 것이 필요하다. 그리고는 한글 음절이 완성되고나면 그 글자를 어플리케이션에 commit string 형태로 보내여 입력을 완료하는 것이다. 다음 키를 받게 되면 이 과정을 반복해서 수행한다.

+libhangul에서 한글 조합 기능은 HangulInputContext를 이용해서 구현하게 되는데 기본 적인 방법은 HangulInputContext에 사용자로부터의 입력을 순서대로 전달하면서 그 상태가 바뀜에 따라서 preedit 나 commit 스트링을 상황에 맞게 변화시키는 것이다.

+입력 코드들은 GUI 코드와 밀접하게 붙어 있어서 키 이벤트를 받아서 처리하도록 구현하는 것이 보통이다. 그런데 유닉스에는 많은 입력 프레임웍들이 난립하고 있는 상황이어서 매 입력 프레임웍마다 한글 조합 루틴을 작성해서 넣는 것은 비효율적이다. 간단한 API를 구현하여 여러 프레임웍에서 바로 사용할 수 있도록 구현하는 편이 사용성이 높아지게 된다.

+그래서 libhangul에서는 키 이벤트를 따로 재정의하지 않고 ASCII 코드를 직접 사용하는 방향으로 재정의된 데이터가 많지 않도록 하였다. 실제 사용 방법은 말로 설명하는 것보다 샘플 코드를 사용하는 편이 이해가 빠를 것이다. 그래서 대략적인 진행 과정을 샘플 코드로 작성하였다.

+아래 예제는 실제로는 존재하지 않는 GUI 라이브러리 코드를 사용하였다. 실제 GUI 코드를 사용하면 코드가 너무 길어져서 설명이 어렵고 코드가 길어지면 핵심을 놓치기 쉽기 때문에 가공의 함수를 사용하였다. 또한 텍스트의 encoding conversion 관련된 부분도 생략하였다. 여기서 사용한 가공의 GUI 코드는 TWin으로 시작하게 하였다.

+

    HangulInputContext* hic = hangul_ic_new("2");
+    ...
+
+    // 아래는 키 입력만 처리하는 이벤트 루프이다.
+    // 실제 GUI코드는 이렇게 단순하진 않지만
+    // 편의상 키 입력만 처리하는 코드로 작성하였다.
+
+    TWinKeyEvent event = TWinGetKeyEvent(); // 키이벤트를 받는 이런 함수가
+                                            // 있다고 치자
+    while (ascii != 0) {
+        bool res;
+        if (event.isBackspace()) {
+            // backspace를 ascii로 변환하기가 좀 꺼림직해서
+            // libhangul에서는 backspace 처리를 위한 
+            // 함수를 따로 만들었다.
+            res = hangul_ic_backspace(hic);
+        } else {
+            // 키 입력을 해당하는 ascii 코드로 변환한다.
+            // libhangul에서는 이 ascii 코드가 키 이벤트
+            // 코드와 마찬가지다.
+            int ascii = event.getAscii();
+
+            // 키 입력을 받았으면 이것을 hic에 먼저 보낸다.
+            // 그래야 hic가 이 키를 사용할 것인지 아닌지를 판단할 수 있다.
+            // 함수가 true를 리턴하면 이 키를 사용했다는 의미이므로 
+            // GUI 코드가 이 키 입력을 프로세싱하지 않도록 해야 한다.
+            // 그렇지 않으면 한 키입력이 두번 프로세싱된다.
+            res = hangul_ic_process(hic, ascii);
+        }
+        
+        // hic는 한번 키입력을 받고 나면 내부 상태 변화가 일어나고
+        // 완성된 글자를 어플리케이션에 보내야 하는 상황이 있을 수 있다.
+        // 이것을 HangulInputContext에서는 commit 스트링이 있는지로
+        // 판단한다. commit 스트링을 받아봐서 스트링이 있다면 
+        // 그 스트링으로 입력이 완료된 걸로 본다.
+        const ucschar commit;
+        commit = hangul_ic_get_commit_string(hic);
+        if (commit[0] != 0) {   // 스트링의 길이를 재서 commit 스트링이 있는지
+                                // 판단한다.
+            TWinInputUnicodeChars(commit);
+        }
+
+        // 키입력 후에는 preedit string도 역시 변화하게 되는데
+        // 입력기 프레임웍에서는 이 스트링을 화면에 보여주어야
+        // 조합중인 글자가 화면에 표시가 되는 것이다.
+        const ucschar preedit;
+        preedit = hangul_ic_get_preedit_string(hic);
+        // 이 경우에는 스트링의 길이에 관계없이 항상 업데이트를 
+        // 해야 한다. 왜냐하면 이전에 조합중이던 글자가 있다가
+        // 조합이 완료되면서 조합중인 상태의 글자가 없어질 수도 있기 때문에
+        // 스트링의 길이에 관계없이 현재 상태의 스트링을 preedit 
+        // 스트링으로 보여주면 되는 것이다.
+        TWinUpdatePreeditString(preedit);
+
+        // 위 두작업이 끝난후에는 키 이벤트를 계속 프로세싱해야 하는지 
+        // 아닌지를 처리해야 한다.
+        // hic가 키 이벤트를 사용하지 않았다면 기본 GUI 코드에 계속해서
+        // 키 이벤트 프로세싱을 진행하도록 해야 한다.
+        if (!res)
+            TWinForwardKeyEventToUI(ascii);
+
+        ascii = GetKeyEvent();
+    }
+
+    hangul_ic_delete(hic);
+

타입정의 문서화

+ +
+
+ + + + +
HangulInputContext
+
+
+ +

+한글 입력 상태를 관리하기 위한 오브젝트 +

+libhangul에서 제공하는 한글 조합 루틴에서 상태 정보를 저장하는 opaque 데이타 오브젝트이다. 이 오브젝트에 키입력 정보를 순차적으로 보내주면서 preedit 스트링이나, commit 스트링을 받아서 처리하면 한글 입력 기능을 손쉽게 구현할 수 있다. 내부의 데이터 멤버는 공개되어 있지 않다. 각각의 멤버는 accessor 함수로만 참조하여야 한다. +

+

+


함수 문서화

+ +
+
+ + + + + + + + + +
bool hangul_ic_backspace (HangulInputContext hic  ) 
+
+
+ +

+HangulInputContext가 backspace 키를 처리하도록 하는 함수 +

+

매개변수:
+ + +
hic HangulInputContext를 가리키는 포인터
+
+
반환값:
hic가 키를 사용했으면 true, 사용하지 않았으면 false
+이 함수는 hic가 가리키는 HangulInputContext의 조합중이던 글자를 뒤에서부터 하나 지우는 기능을 한다. backspace 키를 눌렀을 때 발생하는 동작을 한다. 따라서 이 함수를 부르고 나면 preedit string이 바뀌므로 반드시 업데이트를 해야 한다.

+

Remarks:
이 함수는 HangulInputContext의 상태를 변화 시킨다.
+ +
+

+ +

+
+ + + + + + + + + +
void hangul_ic_delete (HangulInputContext hic  ) 
+
+
+ +

+HangulInputContext를 삭제하는 함수 +

+

매개변수:
+ + +
hic HangulInputContext 오브젝트
+
+hic가 가리키는 HangulInputContext 오브젝트의 메모리를 해제한다. hangul_ic_new() 함수로 생성된 모든 HangulInputContext 오브젝트는 이 함수로 메모리해제를 해야 한다. 메모리 해제 과정에서 상태 변화는 일어나지 않으므로 마지막 입력된 조합중이던 내용은 사라지게 된다. +
+

+ +

+
+ + + + + + + + + +
const ucschar* hangul_ic_flush (HangulInputContext hic  ) 
+
+
+ +

+HangulInputContext의 입력 상태를 완료하는 함수 +

+

매개변수:
+ + +
hic HangulInputContext를 가리키는 포인터
+
+
반환값:
조합 완료된 스트링, 스트링의 길이가 0이면 조합 완료된 스트링이 없는 것
+이 함수는 hic가 가리키는 HangulInputContext의 입력 상태를 완료한다. 조합중이던 스트링을 완성하여 리턴한다. 그리고 입력 상태가 초기 상태로 되돌아 간다. 조합중이던 글자를 강제로 commit하고 싶을때 사용하는 함수다. 보통의 경우 입력 framework에서 focus가 나갈때 이 함수를 불러서 마지막 상태를 완료해야 조합중이던 글자를 잃어버리지 않게 된다.

+비교: hangul_ic_reset()

+

Remarks:
이 함수는 HangulInputContext의 상태를 변화 시킨다.
+ +
+

+ +

+
+ + + + + + + + + +
const ucschar* hangul_ic_get_commit_string (HangulInputContext hic  ) 
+
+
+ +

+현재 상태의 commit string을 구하는 함수 +

+

매개변수:
+ + +
hic commit string을 구하고자하는 입력 상태 object
+
+
반환값:
UCS4 commit 스트링, 이 스트링은 hic 내부의 데이터이므로 수정하거나 free해서는 안된다.
+이 함수는 hic 내부의 현재 상태의 commit string을 리턴한다. 따라서 hic가 다른 키 이벤트를 처리하고 나면 그 내용이 바뀔 수 있다.

+

Remarks:
이 함수는 HangulInputContext의 상태를 변화 시키지 않는다.
+ +
+

+ +

+
+ + + + + + + + + +
const ucschar* hangul_ic_get_preedit_string (HangulInputContext hic  ) 
+
+
+ +

+현재 상태의 preedit string을 구하는 함수 +

+

매개변수:
+ + +
hic preedit string을 구하고자하는 입력 상태 object
+
+
반환값:
UCS4 preedit 스트링, 이 스트링은 hic 내부의 데이터이므로 수정하거나 free해서는 안된다.
+이 함수는 hic 내부의 현재 상태의 preedit string을 리턴한다. 따라서 hic가 다른 키 이벤트를 처리하고 나면 그 내용이 바뀔 수 있다.

+

Remarks:
이 함수는 HangulInputContext의 상태를 변화 시키지 않는다.
+ +
+

+ +

+
+ + + + + + + + + +
bool hangul_ic_has_choseong (HangulInputContext hic  ) 
+
+
+ +

+HangulInputContext가 조합중인 초성을 가지고 있는지 확인하는 함수 +

+

매개변수:
+ + +
hic HangulInputContext를 가리키는 포인터
+
+HangulInputContext가 조합중인 글자가 초성이 있으면 true를 리턴한다.

+

Remarks:
이 함수는 HangulInputContext의 상태를 변화 시키지 않는다.
+ +
+

+ +

+
+ + + + + + + + + +
bool hangul_ic_has_jongseong (HangulInputContext hic  ) 
+
+
+ +

+HangulInputContext가 조합중인 종성을 가지고 있는지 확인하는 함수 +

+

매개변수:
+ + +
hic HangulInputContext를 가리키는 포인터
+
+HangulInputContext가 조합중인 글자가 종성이 있으면 true를 리턴한다.

+

Remarks:
이 함수는 HangulInputContext의 상태를 변화 시키지 않는다.
+ +
+

+ +

+
+ + + + + + + + + +
bool hangul_ic_has_jungseong (HangulInputContext hic  ) 
+
+
+ +

+HangulInputContext가 조합중인 중성을 가지고 있는지 확인하는 함수 +

+

매개변수:
+ + +
hic HangulInputContext를 가리키는 포인터
+
+HangulInputContext가 조합중인 글자가 중성이 있으면 true를 리턴한다.

+

Remarks:
이 함수는 HangulInputContext의 상태를 변화 시키지 않는다.
+ +
+

+ +

+
+ + + + + + + + + +
bool hangul_ic_is_empty (HangulInputContext hic  ) 
+
+
+ +

+HangulInputContext가 조합중인 글자를 가지고 있는지 확인하는 함수 +

+

매개변수:
+ + +
hic HangulInputContext를 가리키는 포인터
+
+HangulInputContext가 조합중인 글자가 있으면 true를 리턴한다.

+

Remarks:
이 함수는 HangulInputContext의 상태를 변화 시키지 않는다.
+ +
+

+ +

+
+ + + + + + + + + +
bool hangul_ic_is_transliteration (HangulInputContext hic  ) 
+
+
+ +

+주어진 hic가 transliteration method인지 판별 +

+

매개변수:
+ + +
hic ìƒíƒœë¥¼ 알고자 하는 HangulInputContext 포인터
+
+
반환값:
hic가 transliteration method인 경우 true를 리턴, 아니면 false
+이 함수는 hic 가 transliteration method인지 판별하는 함수다. 이 함수가 false를 리턴할 경우에는 process 함수에 keycode를 넘기기 전에 키보드 자판 배열에 독립적인 값으로 변환한 후 넘겨야 한다. 그렇지 않으면 유럽어 자판과 한국어 자판을 같이 쓸때 한글 입력이 제대로 되지 않는다. +
+

+ +

+
+ + + + + + + + + +
HangulInputContext* hangul_ic_new (const char *  keyboard  ) 
+
+
+ +

+HangulInputContext 오브젝트를 생성한다. +

+

매개변수:
+ + +
keyboard ì‚¬ìš©í•˜ê³ ìž 하는 키보드, 사용 가능한 값에 대해서는 hangul_ic_select_keyboard() 함수 설명을 참조한다.
+
+
반환값:
새로 생성된 HangulInputContext에 대한 포인터
+이 함수는 한글 조합 기능을 제공하는 HangulInputContext 오브젝트를 생성한다. 생성할때 지정한 자판은 나중에 hangul_ic_select_keyboard() 함수로 다른 자판으로 변경이 가능하다. 더이상 사용하지 않을 때에는 hangul_ic_delete() 함수로 삭제해야 한다. +
+

+ +

+
+ + + + + + + + + + + + + + + + + + +
bool hangul_ic_process (HangulInputContext hic,
int  ascii 
)
+
+
+ +

+키 입력을 처리하여 실제로 한글 조합을 하는 함수 +

+

매개변수:
+ + + +
hic HangulInputContext 오브젝트
ascii í‚¤ 이벤트
+
+
반환값:
HangulInputContext가 이 키를 사용했으면 true, 사용하지 않았으면 false
+ascii 값으로 주어진 키 이벤트를 받아서 내부의 한글 조합 상태를 변화시키고, preedit, commit 스트링을 저장한다.

+libhangul의 키 이벤트 프로세스는 ASCII 코드 값을 기준으로 처리한다. 이 키 값은 US Qwerty 자판 배열에서의 키 값에 해당한다. 따라서 유럽어 자판을 사용하는 경우에는 해당 키의 ASCII 코드를 직접 전달하면 안되고, 그 키가 US Qwerty 자판이었을 경우에 발생할 수 있는 ASCII 코드 값을 주어야 한다. 또한 ASCII 코드 이므로 Shift 상태는 대문자로 전달이 된다. Capslock이 눌린 경우에는 대소문자를 뒤바꾸어 보내주지 않으면 마치 Shift가 눌린 것 처럼 동작할 수 있으므로 주의한다. preedit, commit 스트링은 hangul_ic_get_preedit_string(), hangul_ic_get_commit_string() 함수를 이용하여 구할 수 있다.

+이 함수의 사용법에 대한 설명은 Hangul Input Context의 사용법 부분을 참조한다.

+

Remarks:
이 함수는 HangulInputContext의 상태를 변화 시킨다.
+ +
+

+ +

+
+ + + + + + + + + +
void hangul_ic_reset (HangulInputContext hic  ) 
+
+
+ +

+HangulInputContext를 초기상태로 되돌리는 함수 +

+

매개변수:
+ + +
hic HangulInputContext를 가리키는 포인터
+
+이 함수는 hic가 가리키는 HangulInputContext의 상태를 처음 상태로 되돌린다. preedit 스트링, commit 스트링, flush 스트링이 없어지고, 입력되었던 키에 대한 기록이 없어진다. 영어 상태로 바뀌는 것이 아니다.

+비교: hangul_ic_flush()

+

Remarks:
이 함수는 HangulInputContext의 상태를 변화 시킨다.
+ +
+

+ +

+
+ + + + + + + + + + + + + + + + + + +
void hangul_ic_select_keyboard (HangulInputContext hic,
const char *  id 
)
+
+
+ +

+HangulInputContext의 자판 배열을 바꾸는 함수 +

+

매개변수:
+ + + +
hic HangulInputContext 오브젝트
id ì„ íƒí•˜ê³ ìž 하는 자판, 아래와 같은 값을 선택할 수 있다.
    +
  • "2" 두벌식 자판
  • +
  • "32" 세벌식 자판으로 두벌식의 배열을 가진 자판. 두벌식 사용자가 쉽게 세벌식 테스트를 할 수 있다. shift를 누르면 자음이 종성으로 동작한다.
  • +
  • "3f" 세벌식 최종
  • +
  • "39" 세벌식 390
  • +
  • "3s" 세벌식 순아래
  • +
  • "3y" 세벌식 옛글
  • +
  • "ro" 로마자 방식 자판
  • +
+
+
+
반환값:
없음
+이 함수는 HangulInputContext의 자판을 id로 지정된 것으로 변경한다.

+

Remarks:
이 함수는 HangulInputContext의 내부 조합 상태에는 영향을 미치지 않는다. 따라서 입력 중간에 자판을 변경하더라도 조합 상태는 유지된다.
+ +
+

+


생성시간 : Wed Nov 23 23:31:45 2011, 프로젝트명 : libhangul, 생성자 :   + +doxygen 1.5.3-20071008
+ + diff --git a/doc/html/group__hanjadictionary.html b/doc/html/group__hanjadictionary.html new file mode 100644 index 0000000..09eee0b --- /dev/null +++ b/doc/html/group__hanjadictionary.html @@ -0,0 +1,608 @@ + + +libhangul: 한자 사전 검색 기능 + + + + +
+ +
+

한자 사전 검색 기능

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

타입정의

typedef struct _Hanja Hanja
 í•œìž 사전 검색 결과의 최소 단위
typedef struct _HanjaList HanjaList
 í•œìž 사전의 검색 결과를 전달하는데 사용하는 오브젝트
typedef struct _HanjaTable HanjaTable
 í•œìž 사전을 관리하는데 사용하는 오브젝트

함수

const char * hanja_get_key (const Hanja *hanja)
 Hanja의 키를 찾아본다.
const char * hanja_get_value (const Hanja *hanja)
 Hanja의 값을 찾아본다.
const char * hanja_get_comment (const Hanja *hanja)
 Hanja의 설명을 찾아본다.
HanjaTablehanja_table_load (const char *filename)
 í•œìž 사전 파일을 로딩하는 함수
void hanja_table_delete (HanjaTable *table)
 í•œìž 사전 object를 free하는 함수
HanjaListhanja_table_match_exact (const HanjaTable *table, const char *key)
 í•œìž 사전에서 매치되는 키를 가진 엔트리를 찾는 함수
HanjaListhanja_table_match_prefix (const HanjaTable *table, const char *key)
 í•œìž 사전에서 앞부분이 매치되는 키를 가진 엔트리를 찾는 함수
HanjaListhanja_table_match_suffix (const HanjaTable *table, const char *key)
 í•œìž 사전에서 뒷부분이 매치되는 키를 가진 엔트리를 찾는 함수
+int hanja_list_get_size (const HanjaList *list)
 HanjaList가 가지고 있는 아이템의 갯수를 구하는 함수
const char * hanja_list_get_key (const HanjaList *list)
 HanjaList가 생성될때 검색함수에서 사용한 키를 구하는 함수
const Hanjahanja_list_get_nth (const HanjaList *list, unsigned int n)
 HanjaList 의 n번째 Hanja 아이템의 포인터를 구하는 함수
const char * hanja_list_get_nth_key (const HanjaList *list, unsigned int n)
 HanjaList 의 n번째 아이템의 키를 구하는 함수
const char * hanja_list_get_nth_value (const HanjaList *list, unsigned int n)
 HanjaList의 n번째 아이템의 값를 구하는 함수
const char * hanja_list_get_nth_comment (const HanjaList *list, unsigned int n)
 HanjaList의 n번째 아이템의 설명을 구하는 함수
void hanja_list_delete (HanjaList *list)
 í•œìž 사전 검색 함수가 리턴한 결과를 free하는 함수
+

상세한 설명

+

+한자 사전 루틴의 사용 방법

+libhangul에서는 한자 사전 파일과 그 사전 파일을 검색할 수 있는 몇가지 함수의 셋을 제공한다. 여기에서 사용되는 모든 스트링은 UTF-8 인코딩을 사용한다. libhangul에서 사용하는 한자 사전 파일의 포맷은 HanjaTable 섹션을 참조한다.

+그 개략적인 사용 방법은 다음과 같다.

+

    // 지정된 위치의 한자 사전 파일을 로딩한다.
+    // 아래 코드에서는 libhangul의 한자 사전 파일을 로딩하기 위해서
+    // NULL을 argument로 준다.
+    HanjaTable* table = hanja_table_load(NULL);
+
+    // "삼국사기"에 해당하는 한자를 찾는다.
+    HanjaList* list = hanja_table_match_exact(table, "삼국사기");
+    if (list != NULL) {
+        int i;
+        int n = hanja_list_get_size(list);
+        for (i = 0; i < n; ++i) {
+            const char* hanja = hanja_list_get_nth_value(list);
+            printf("한자: %s\n", hanja);
+        }
+        hanja_list_delete(list);
+    }
+    
+    hanja_table_delete(table);
+

타입정의 문서화

+ +
+
+ + + + +
Hanja
+
+
+ +

+한자 사전 검색 결과의 최소 단위 +

+Hanja 오브젝트는 한자 사전 파일의 각 엔트리에 해당한다. 각 엔트리는 키(key), 밸류(value) 페어로 볼 수 있는데, libhangul에서는 약간 확장을 하여 설명(comment)도 포함하고 있다. 한자 사전 포맷은 HanjaTable 부분을 참조한다.

+한자 사전을 검색하면 결과는 Hanja 오브젝트의 리스트 형태로 전달된다. HanjaList에서 각 엔트리의 내용을 하나씩 확인할 수 있다. Hanja의 멤버는 직접 참조할 수 없고, hanja_get_key(), hanja_get_value(), hanja_get_comment() 함수로 찾아볼 수 있다. char 스트링으로 전달되는 내용은 모두 UTF-8 인코딩으로 되어 있다. +

+

+ +

+
+ + + + +
HanjaList
+
+
+ +

+한자 사전의 검색 결과를 전달하는데 사용하는 오브젝트 +

+한자 사전의 검색 함수를 사용하면 이 타입으로 결과를 리턴한다. 이 오브젝트에서 hanja_list_get_nth()함수를 이용하여 검색 결과를 이터레이션할 수 있다. 내부 구현 내용은 외부로 노출되어 있지 않다. HanjaList가 가지고 있는 아이템들은 accessor 함수들을 이용해서 참조한다.

+참조: hanja_list_get_nth(), hanja_list_get_nth_key(), hanja_list_get_nth_value(), hanja_list_get_nth_comment() +

+

+ +

+
+ + + + +
HanjaTable
+
+
+ +

+한자 사전을 관리하는데 사용하는 오브젝트 +

+libhangul에서 한자 사전을 관리하는데 사용하는 오브젝트로 내부 구현 내용은 외부로 노출되어 있지 않다.

+libhangul에서 사용하는 한자 사전 파일의 포맷은 다음과 같은 형식이다.

+

 # comment
+ key1:value1:comment1
+ key2:value2:comment2
+ key3:value3:comment3
+ ...
+

+각 필드는 : 으로 구분하고, 첫번째 필드는 각 한자를 찾을 키값이고 두번째 필드는 그 키값에 해당하는 한자 스트링, 세번째 필드는 이 키와 값에 대한 설명이다. #으로 시작하는 라인은 주석으로 무시된다.

+실제 예를 들면 다음과 같은 식이다.

+

 삼국사기:三國史記:삼국사기
+ 한자:漢字:한자
+

+그 내용은 키값에 대해서 sorting 되어야 있어야 한다. 파일의 인코딩은 UTF-8이어야 한다. +

+

+


함수 문서화

+ +
+
+ + + + + + + + + +
const char* hanja_get_comment (const Hanja hanja  ) 
+
+
+ +

+Hanja의 설명을 찾아본다. +

+

반환값:
hanja 오브젝트의 comment 필드, UTF-8
+일반적으로 Hanja 아이템의 설명은 한글과 그 한자에 대한 설명이다. 파일에 따라서 내용이 없을 수 있다. 리턴되는 스트링은 hanja 오브젝트 내부적으로 관리하는 데이터로 수정하거나 free되어서는 안된다. +
+

+ +

+
+ + + + + + + + + +
const char* hanja_get_key (const Hanja hanja  ) 
+
+
+ +

+Hanja의 키를 찾아본다. +

+

반환값:
hanja 오브젝트의 키, UTF-8
+일반적으로 Hanja 아이템의 키는 한글이다. 리턴되는 스트링은 hanja 오브젝트 내부적으로 관리하는 데이터로 수정하거나 free 되어서는 안된다. +
+

+ +

+
+ + + + + + + + + +
const char* hanja_get_value (const Hanja hanja  ) 
+
+
+ +

+Hanja의 값을 찾아본다. +

+

반환값:
hanja 오브젝트의 값, UTF-8
+일반적으로 Hanja 아이템의 값은 key에 대응되는 한자다. 리턴되는 스트링은 hanja 오브젝트 내부적으로 관리하는 데이터로 수정하거나 free되어서는 안된다. +
+

+ +

+
+ + + + + + + + + +
void hanja_list_delete (HanjaList list  ) 
+
+
+ +

+한자 사전 검색 함수가 리턴한 결과를 free하는 함수 +

+

매개변수:
+ + +
list free할 HanjaList
+
+libhangul의 모든 한자 사전 검색 루틴이 리턴한 결과는 반드시 이 함수로 free해야 한다. +
+

+ +

+
+ + + + + + + + + +
const char* hanja_list_get_key (const HanjaList list  ) 
+
+
+ +

+HanjaList가 생성될때 검색함수에서 사용한 키를 구하는 함수 +

+

반환값:
HanjaList의 key 스트링
+한자 사전 검색 함수로 HanjaList를 생성하면 HanjaList는 그 검색할때 사용한 키를 기억하고 있다. 이 값을 확인할때 사용한다. 주의할 점은, 각 Hanja 아이템들은 각각의 키를 가지고 있지만, 이것이 반드시 HanjaList와 일치하지는 않는다는 것이다. 검색할 당시에 사용한 함수가 prefix나 suffix계열이면 더 짧은 키로도 검색하기 때문에 HanjaList의 키와 검색 결과의 키와 다른 것들도 가지고 있게 된다.

+리턴된 스트링 포인터는 HanjaList에서 관리하는 스트링으로 수정하거나 free해서는 안된다. +

+

+ +

+
+ + + + + + + + + + + + + + + + + + +
const Hanja* hanja_list_get_nth (const HanjaList list,
unsigned int  n 
)
+
+
+ +

+HanjaList 의 n번째 Hanja 아이템의 포인터를 구하는 함수 +

+

매개변수:
+ + + +
list HanjaList를 가리키는 포인터
n ì°¸ì¡°í•  아이템의 인덱스
+
+
반환값:
Hanja를 가리키는 포인터
+이 함수는 list가 가리키는 HanjaList의 n번째 Hanja 오브젝트를 가리키는 포인터를 리턴한다. HanjaList 의 각 아이템은 정수형 인덱스로 각각 참조할 수 있다. HanjaList 가 가진 엔트리 갯수를 넘어서는 인덱스를 주면 NULL을 리턴한다. 리턴된 Hanja 오브젝트는 HanjaList가 관리하는 오브젝트로 free하거나 수정해서는 안된다.

+다음의 예제는 list로 주어진 HanjaList 의 모든 값을 프린트 하는 코드다.

+

 int i;
+ int n = hanja_list_get_size(list);
+ for (i = 0; i < n; i++) {
+        Hanja* hanja = hanja_list_get_nth(i);
+        const char* value = hanja_get_value(hanja);
+        printf("Hanja: %s\n", value);
+        // 또는 hanja에서 다른 정보를 참조하거나
+        // 다른 작업을 할 수도 있다.
+ }
+
+
+

+ +

+
+ + + + + + + + + + + + + + + + + + +
const char* hanja_list_get_nth_comment (const HanjaList list,
unsigned int  n 
)
+
+
+ +

+HanjaList의 n번째 아이템의 설명을 구하는 함수 +

+

반환값:
n번째 아이템의 설명(comment), UTF-8
+HanjaList_get_nth()의 convenient 함수 +
+

+ +

+
+ + + + + + + + + + + + + + + + + + +
const char* hanja_list_get_nth_key (const HanjaList list,
unsigned int  n 
)
+
+
+ +

+HanjaList 의 n번째 아이템의 키를 구하는 함수 +

+

반환값:
n번째 아이템의 키, UTF-8
+HanjaList_get_nth()의 convenient 함수 +
+

+ +

+
+ + + + + + + + + + + + + + + + + + +
const char* hanja_list_get_nth_value (const HanjaList list,
unsigned int  n 
)
+
+
+ +

+HanjaList의 n번째 아이템의 값를 구하는 함수 +

+

반환값:
n번째 아이템의 값(value), UTF-8
+HanjaList_get_nth()의 convenient 함수 +
+

+ +

+
+ + + + + + + + + +
void hanja_table_delete (HanjaTable table  ) 
+
+
+ +

+한자 사전 object를 free하는 함수 +

+

매개변수:
+ + +
table free할 한자 사전 object
+
+ +
+

+ +

+
+ + + + + + + + + +
HanjaTable* hanja_table_load (const char *  filename  ) 
+
+
+ +

+한자 사전 파일을 로딩하는 함수 +

+

매개변수:
+ + +
filename ë¡œë”©í•  사전 파일의 위치, 또는 NULL
+
+
반환값:
한자 사전 object 또는 NULL
+이 함수는 한자 사전 파일을 로딩하는 함수로 filename으로 지정된 파일을 로딩한다. 한자 사전 파일은 libhangul에서 사용하는 포맷이어야 한다. 한자 사전 파일의 포맷에 대한 정보는 HanjaTable을 참조한다.

+filename은 locale에 따른 인코딩으로 되어 있어야 한다. UTF-8이 아닐 수 있으므로 주의한다.

+filename 에 NULL을 주면 libhangul에서 디폴트로 배포하는 사전을 로딩한다. 파일이 없거나, 포맷이 맞지 않으면 로딩에 실패하고 NULL을 리턴한다. 한자 사전이 더이상 필요없으면 hanja_table_delete() 함수로 삭제해야 한다. +

+

+ +

+
+ + + + + + + + + + + + + + + + + + +
HanjaList* hanja_table_match_exact (const HanjaTable table,
const char *  key 
)
+
+
+ +

+한자 사전에서 매치되는 키를 가진 엔트리를 찾는 함수 +

+

매개변수:
+ + + +
table í•œìž 사전 object
key ì°¾ì„ 키, UTF-8 인코딩
+
+
반환값:
찾은 결과를 HanjaList object로 리턴한다. 찾은 것이 없거나 에러가 있으면 NULL을 리턴한다.
+key 값과 같은 키를 가진 엔트리를 검색한다. 리턴된 결과는 다 사용하고 나면 반드시 hanja_list_delete() 함수로 free해야 한다. +
+

+ +

+
+ + + + + + + + + + + + + + + + + + +
HanjaList* hanja_table_match_prefix (const HanjaTable table,
const char *  key 
)
+
+
+ +

+한자 사전에서 앞부분이 매치되는 키를 가진 엔트리를 찾는 함수 +

+

매개변수:
+ + + +
table í•œìž 사전 object
key ì°¾ì„ 키, UTF-8 인코딩
+
+
반환값:
찾은 결과를 HanjaList object로 리턴한다. 찾은 것이 없거나 에러가 있으면 NULL을 리턴한다.
+key 값과 같거나 앞부분이 같은 키를 가진 엔트리를 검색한다. 그리고 key를 뒤에서부터 한자씩 줄여가면서 검색을 계속한다. 예로 들면 "삼국사기"를 검색하면 "삼국사기", "삼국사", "삼국", "삼"을 각각 모두 검색한다. 리턴된 결과는 다 사용하고 나면 반드시 hanja_list_delete() 함수로 free해야 한다. +
+

+ +

+
+ + + + + + + + + + + + + + + + + + +
HanjaList* hanja_table_match_suffix (const HanjaTable table,
const char *  key 
)
+
+
+ +

+한자 사전에서 뒷부분이 매치되는 키를 가진 엔트리를 찾는 함수 +

+

매개변수:
+ + + +
table í•œìž 사전 object
key ì°¾ì„ 키, UTF-8 인코딩
+
+
반환값:
찾은 결과를 HanjaList object로 리턴한다. 찾은 것이 없거나 에러가 있으면 NULL을 리턴한다.
+key 값과 같거나 뒷부분이 같은 키를 가진 엔트리를 검색한다. 그리고 key를 앞에서부터 한자씩 줄여가면서 검색을 계속한다. 예로 들면 "삼국사기"를 검색하면 "삼국사기", "국사기", "사기", "기"를 각각 모두 검색한다. 리턴된 결과는 다 사용하고 나면 반드시 hanja_list_delete() 함수로 free해야 한다. +
+

+


생성시간 : Wed Nov 23 23:31:45 2011, 프로젝트명 : libhangul, 생성자 :   + +doxygen 1.5.3-20071008
+ + diff --git a/doc/html/hangul_8h-source.html b/doc/html/hangul_8h-source.html new file mode 100644 index 0000000..bd32178 --- /dev/null +++ b/doc/html/hangul_8h-source.html @@ -0,0 +1,185 @@ + + +libhangul: hangul.h 소스 파일 + + + + +
+ +
+ +

hangul.h

00001 /* libhangul
+00002  * Copyright (C) 2004 - 2007 Choe Hwanjin
+00003  *
+00004  * This library is free software; you can redistribute it and/or
+00005  * modify it under the terms of the GNU Lesser General Public
+00006  * License as published by the Free Software Foundation; either
+00007  * version 2.1 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  * Lesser General Public License for more details.
+00013  *
+00014  * You should have received a copy of the GNU Lesser General Public
+00015  * License along with this library; if not, write to the Free Software
+00016  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+00017  */
+00018 
+00019 #ifndef libhangul_hangul_h
+00020 #define libhangul_hangul_h
+00021 
+00022 #include <stdbool.h>
+00023 #include <inttypes.h>
+00024 
+00025 #ifdef __GNUC__
+00026 #define LIBHANGUL_DEPRECATED __attribute__((deprecated));
+00027 #else
+00028 #define LIBHANGUL_DEPRECATED
+00029 #endif
+00030 
+00031 #ifdef __cplusplus
+00032 extern "C" {
+00033 #endif
+00034 
+00035 /* hangulctype.c */
+00036 enum {
+00037     HANGUL_CHOSEONG_FILLER  = 0x115f,   /* hangul choseong filler */
+00038     HANGUL_JUNGSEONG_FILLER = 0x1160    /* hangul jungseong filler */
+00039 };
+00040 
+00041 typedef uint32_t ucschar;
+00042 
+00043 bool hangul_is_choseong(ucschar c);
+00044 bool hangul_is_jungseong(ucschar c);
+00045 bool hangul_is_jongseong(ucschar c);
+00046 bool hangul_is_choseong_conjoinable(ucschar c);
+00047 bool hangul_is_jungseong_conjoinable(ucschar c);
+00048 bool hangul_is_jongseong_conjoinable(ucschar c);
+00049 bool hangul_is_syllable(ucschar c);
+00050 bool hangul_is_jamo(ucschar c);
+00051 bool hangul_is_cjamo(ucschar c);
+00052 
+00053 ucschar hangul_jamo_to_cjamo(ucschar ch);
+00054 
+00055 const ucschar* hangul_syllable_iterator_prev(const ucschar* str,
+00056                                              const ucschar* begin);
+00057 const ucschar* hangul_syllable_iterator_next(const ucschar* str,
+00058                                              const ucschar* end);
+00059 
+00060 int     hangul_syllable_len(const ucschar* str, int max_len);
+00061 
+00062 ucschar hangul_jamo_to_syllable(ucschar choseong,
+00063                                 ucschar jungseong,
+00064                                 ucschar jongseong);
+00065 void    hangul_syllable_to_jamo(ucschar syllable,
+00066                                 ucschar* choseong,
+00067                                 ucschar* jungseong,
+00068                                 ucschar* jongseong);
+00069 int     hangul_jamos_to_syllables(ucschar* dest, int destlen,
+00070                                   const ucschar* src, int srclen);
+00071 
+00072 /* hangulinputcontext.c */
+00073 typedef struct _HangulKeyboard        HangulKeyboard;
+00074 typedef struct _HangulCombination     HangulCombination;
+00075 typedef struct _HangulBuffer          HangulBuffer;
+00076 typedef struct _HangulInputContext    HangulInputContext;
+00077 
+00078 enum {
+00079     HANGUL_OUTPUT_SYLLABLE,
+00080     HANGUL_OUTPUT_JAMO
+00081 };
+00082 
+00083 enum {
+00084     HANGUL_KEYBOARD_TYPE_JAMO,
+00085     HANGUL_KEYBOARD_TYPE_JASO,
+00086     HANGUL_KEYBOARD_TYPE_ROMAJA
+00087 };
+00088 
+00089 /* keyboard */
+00090 HangulKeyboard* hangul_keyboard_new(void);
+00091 void    hangul_keyboard_delete(HangulKeyboard *keyboard);
+00092 void    hangul_keyboard_set_value(HangulKeyboard *keyboard,
+00093                                   int key, ucschar value);
+00094 void    hangul_keyboard_set_type(HangulKeyboard *keyboard, int type);
+00095 
+00096 /* combination */
+00097 HangulCombination* hangul_combination_new(void);
+00098 void hangul_combination_delete(HangulCombination *combination);
+00099 bool hangul_combination_set_data(HangulCombination* combination, 
+00100                      ucschar* first, ucschar* second, ucschar* result, unsigned int n);
+00101 
+00102 /* input context */
+00103 HangulInputContext* hangul_ic_new(const char* keyboard);
+00104 void hangul_ic_delete(HangulInputContext *hic);
+00105 bool hangul_ic_process(HangulInputContext *hic, int ascii);
+00106 void hangul_ic_reset(HangulInputContext *hic);
+00107 bool hangul_ic_backspace(HangulInputContext *hic);
+00108 
+00109 bool hangul_ic_is_empty(HangulInputContext *hic);
+00110 bool hangul_ic_has_choseong(HangulInputContext *hic);
+00111 bool hangul_ic_has_jungseong(HangulInputContext *hic);
+00112 bool hangul_ic_has_jongseong(HangulInputContext *hic);
+00113 bool hangul_ic_is_transliteration(HangulInputContext *hic);
+00114 
+00115 void hangul_ic_set_output_mode(HangulInputContext *hic, int mode);
+00116 void hangul_ic_set_keyboard(HangulInputContext *hic,
+00117                             const HangulKeyboard *keyboard);
+00118 void hangul_ic_select_keyboard(HangulInputContext *hic,
+00119                                const char* id);
+00120 void hangul_ic_set_combination(HangulInputContext *hic,
+00121                                const HangulCombination *combination);
+00122 void hangul_ic_connect_callback(HangulInputContext* hic, const char* event,
+00123                                 void* callback, void* user_data);
+00124 
+00125 unsigned    hangul_ic_get_n_keyboards();
+00126 const char* hangul_ic_get_keyboard_id(unsigned index_);
+00127 const char* hangul_ic_get_keyboard_name(unsigned index_);
+00128 
+00129 const ucschar* hangul_ic_get_preedit_string(HangulInputContext *hic);
+00130 const ucschar* hangul_ic_get_commit_string(HangulInputContext *hic);
+00131 const ucschar* hangul_ic_flush(HangulInputContext *hic);
+00132 
+00133 /* hanja.c */
+00134 typedef struct _Hanja Hanja;
+00135 typedef struct _HanjaList HanjaList;
+00136 typedef struct _HanjaTable HanjaTable;
+00137 
+00138 HanjaTable*  hanja_table_load(const char *filename);
+00139 HanjaList*   hanja_table_match_exact(const HanjaTable* table, const char *key);
+00140 HanjaList*   hanja_table_match_prefix(const HanjaTable* table, const char *key);
+00141 HanjaList*   hanja_table_match_suffix(const HanjaTable* table, const char *key);
+00142 void         hanja_table_delete(HanjaTable *table);
+00143 
+00144 int          hanja_list_get_size(const HanjaList *list);
+00145 const char*  hanja_list_get_key(const HanjaList *list);
+00146 const Hanja* hanja_list_get_nth(const HanjaList *list, unsigned int n);
+00147 const char*  hanja_list_get_nth_key(const HanjaList *list, unsigned int n);
+00148 const char*  hanja_list_get_nth_value(const HanjaList *list, unsigned int n);
+00149 const char*  hanja_list_get_nth_comment(const HanjaList *list, unsigned int n);
+00150 void         hanja_list_delete(HanjaList *list);
+00151 
+00152 const char*  hanja_get_key(const Hanja* hanja);
+00153 const char*  hanja_get_value(const Hanja* hanja);
+00154 const char*  hanja_get_comment(const Hanja* hanja);
+00155 
+00156 #ifdef __cplusplus
+00157 }
+00158 #endif
+00159 
+00160 #undef LIBHANGUL_DEPRECATED
+00161 
+00162 #endif /* libhangul_hangul_h */
+

생성시간 : Wed Nov 23 23:31:45 2011, 프로젝트명 : libhangul, 생성자 :   + +doxygen 1.5.3-20071008
+ + diff --git a/doc/html/hangulctype_8c.html b/doc/html/hangulctype_8c.html new file mode 100644 index 0000000..8761cc1 --- /dev/null +++ b/doc/html/hangulctype_8c.html @@ -0,0 +1,144 @@ + + +libhangul: hangulctype.c 파일 참조 + + + + +
+ +
+ +

hangulctype.c 파일 참조

#include <stdlib.h>
+#include "hangul.h"
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

함수

bool hangul_is_choseong (ucschar c)
 ì´ˆì„±ì¸ì§€ 확인하는 함수
bool hangul_is_jungseong (ucschar c)
 ì¤‘성인지 확인하는 함수
bool hangul_is_jongseong (ucschar c)
 ì¢…성인지 확인하는 함수
+bool hangul_is_combining_mark (ucschar c)
+bool hangul_is_choseong_conjoinable (ucschar c)
 ì´ˆì„±ì´ê³  조합 가능한지 확인
+bool hangul_is_jungseong_conjoinable (ucschar c)
 ì¤‘성이고 조합 가능한지 확인
+bool hangul_is_jongseong_conjoinable (ucschar c)
 ì¢…성이고 조합 가능한지 확인
bool hangul_is_syllable (ucschar c)
 í•œê¸€ 음절 인지 확
bool hangul_is_jamo (ucschar c)
 ìžëª¨ 인지 확인
bool hangul_is_cjamo (ucschar c)
 í˜¸í™˜ 자모인지 확인
ucschar hangul_jamo_to_cjamo (ucschar c)
 ìžëª¨ 코드를 대응하는 호환 자모로 변환
+ucschar hangul_choseong_to_jongseong (ucschar c)
+ucschar hangul_jongseong_to_choseong (ucschar c)
+void hangul_jongseong_decompose (ucschar c, ucschar *jong, ucschar *cho)
+void hangul_jongseong_dicompose (ucschar c, ucschar *jong, ucschar *cho)
+ucschar hangul_jongseong_get_diff (ucschar prevjong, ucschar jong)
ucschar hangul_jamo_to_syllable (ucschar choseong, ucschar jungseong, ucschar jongseong)
 ìžëª¨ 코드를 조합하여 한글 음절로 변환
void hangul_syllable_to_jamo (ucschar syllable, ucschar *choseong, ucschar *jungseong, ucschar *jongseong)
 ìŒì ˆì„ 자모로 분해
void hangul_syllable_to_jaso (ucschar syllable, ucschar *choseong, ucschar *jungseong, ucschar *jongseong)
int hangul_syllable_len (const ucschar *str, int max_len)
 í•œ 음절에 해당하는 코드의 갯수를 구하는 함수
const ucscharhangul_syllable_iterator_prev (const ucschar *iter, const ucschar *begin)
 iter를 기준으로 이전 음절의 첫자모 글자에 대한 포인터를 구하는 함수
const ucscharhangul_syllable_iterator_next (const ucschar *iter, const ucschar *end)
 iter를 기준으로 다음 음절의 첫자모 글자에 대한 포인터를 구하는 함수
int hangul_jamos_to_syllables (ucschar *dest, int destlen, const ucschar *src, int srclen)
 ìžëª¨ 스트링을 음절 스트링으로 변환
+

상세한 설명

+

함수 문서화

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
void hangul_syllable_to_jaso (ucschar  syllable,
ucschar choseong,
ucschar jungseong,
ucschar jongseong 
)
+
+
+ +

+

잘못된 코드:
이 함수 대신 hangul_syllable_to_jamo함수를 사용한다.
+ +
+

+


생성시간 : Wed Nov 23 23:31:45 2011, 프로젝트명 : libhangul, 생성자 :   + +doxygen 1.5.3-20071008
+ + diff --git a/doc/html/hangulinputcontext_8c.html b/doc/html/hangulinputcontext_8c.html new file mode 100644 index 0000000..4bc0f8c --- /dev/null +++ b/doc/html/hangulinputcontext_8c.html @@ -0,0 +1,151 @@ + + +libhangul: hangulinputcontext.c 파일 참조 + + + + +
+ +
+ +

hangulinputcontext.c 파일 참조

#include <stdlib.h>
+#include <string.h>
+#include <ctype.h>
+#include <inttypes.h>
+#include <limits.h>
+#include "hangul-gettext.h"
+#include "hangul.h"
+#include "hangulinternals.h"
+#include "hangulkeyboard.h"
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

매크로

+#define TRUE   1
+#define FALSE   0
+#define HANGUL_KEYBOARD_TABLE_SIZE   0x80

타입정의

+typedef void(* HangulOnTranslate )(HangulInputContext *, int, ucschar *, void *)
+typedef bool(* HangulOnTransition )(HangulInputContext *, ucschar, const ucschar *, void *)
+typedef struct
+_HangulCombinationItem 
HangulCombinationItem

함수

+HangulKeyboard * hangul_keyboard_new ()
+void hangul_keyboard_set_value (HangulKeyboard *keyboard, int key, ucschar value)
+void hangul_keyboard_set_type (HangulKeyboard *keyboard, int type)
+void hangul_keyboard_delete (HangulKeyboard *keyboard)
+HangulCombination * hangul_combination_new ()
+void hangul_combination_delete (HangulCombination *combination)
+bool hangul_combination_set_data (HangulCombination *combination, ucschar *first, ucschar *second, ucschar *result, unsigned int n)
+ucschar hangul_combination_combine (const HangulCombination *combination, ucschar first, ucschar second)
bool hangul_ic_process (HangulInputContext *hic, int ascii)
 í‚¤ 입력을 처리하여 실제로 한글 조합을 하는 함수
const ucscharhangul_ic_get_preedit_string (HangulInputContext *hic)
 í˜„재 상태의 preedit string을 구하는 함수
const ucscharhangul_ic_get_commit_string (HangulInputContext *hic)
 í˜„재 상태의 commit string을 구하는 함수
void hangul_ic_reset (HangulInputContext *hic)
 HangulInputContext를 초기상태로 되돌리는 함수
const ucscharhangul_ic_flush (HangulInputContext *hic)
 HangulInputContext의 입력 상태를 완료하는 함수
bool hangul_ic_backspace (HangulInputContext *hic)
 HangulInputContext가 backspace 키를 처리하도록 하는 함수
bool hangul_ic_is_empty (HangulInputContext *hic)
 HangulInputContext가 조합중인 글자를 가지고 있는지 확인하는 함수
bool hangul_ic_has_choseong (HangulInputContext *hic)
 HangulInputContext가 조합중인 초성을 가지고 있는지 확인하는 함수
bool hangul_ic_has_jungseong (HangulInputContext *hic)
 HangulInputContext가 조합중인 중성을 가지고 있는지 확인하는 함수
bool hangul_ic_has_jongseong (HangulInputContext *hic)
 HangulInputContext가 조합중인 종성을 가지고 있는지 확인하는 함수
+void hangul_ic_set_output_mode (HangulInputContext *hic, int mode)
+void hangul_ic_connect_translate (HangulInputContext *hic, HangulOnTranslate callback, void *user_data)
+void hangul_ic_connect_transition (HangulInputContext *hic, HangulOnTransition callback, void *user_data)
+void hangul_ic_connect_callback (HangulInputContext *hic, const char *event, void *callback, void *user_data)
+void hangul_ic_set_keyboard (HangulInputContext *hic, const HangulKeyboard *keyboard)
void hangul_ic_select_keyboard (HangulInputContext *hic, const char *id)
 HangulInputContext의 자판 배열을 바꾸는 함수
+void hangul_ic_set_combination (HangulInputContext *hic, const HangulCombination *combination)
HangulInputContexthangul_ic_new (const char *keyboard)
 HangulInputContext 오브젝트를 생성한다.
void hangul_ic_delete (HangulInputContext *hic)
 HangulInputContext를 삭제하는 함수
+unsigned int hangul_ic_get_n_keyboards ()
+const char * hangul_ic_get_keyboard_id (unsigned index_)
+const char * hangul_ic_get_keyboard_name (unsigned index_)
bool hangul_ic_is_transliteration (HangulInputContext *hic)
 ì£¼ì–´ì§„ hic가 transliteration method인지 판별
+

상세한 설명

+
생성시간 : Wed Nov 23 23:31:45 2011, 프로젝트명 : libhangul, 생성자 :   + +doxygen 1.5.3-20071008
+ + diff --git a/doc/html/hanja_8c.html b/doc/html/hanja_8c.html new file mode 100644 index 0000000..2c55b9b --- /dev/null +++ b/doc/html/hanja_8c.html @@ -0,0 +1,107 @@ + + +libhangul: hanja.c 파일 참조 + + + + +
+ +
+ +

hanja.c 파일 참조

#include <sys/types.h>
+#include <sys/stat.h>
+#include <unistd.h>
+#include <limits.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include "hangul.h"
+#include "hangulinternals.h"
+#include "hanjacompatible.h"
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

매크로

+#define TRUE   1
+#define FALSE   0

타입정의

+typedef struct _HanjaIndex HanjaIndex
+typedef struct _HanjaPair HanjaPair
+typedef struct _HanjaPairArray HanjaPairArray

함수

const char * hanja_get_key (const Hanja *hanja)
 Hanja의 키를 찾아본다.
const char * hanja_get_value (const Hanja *hanja)
 Hanja의 값을 찾아본다.
const char * hanja_get_comment (const Hanja *hanja)
 Hanja의 설명을 찾아본다.
HanjaTablehanja_table_load (const char *filename)
 í•œìž 사전 파일을 로딩하는 함수
void hanja_table_delete (HanjaTable *table)
 í•œìž 사전 object를 free하는 함수
HanjaListhanja_table_match_exact (const HanjaTable *table, const char *key)
 í•œìž 사전에서 매치되는 키를 가진 엔트리를 찾는 함수
HanjaListhanja_table_match_prefix (const HanjaTable *table, const char *key)
 í•œìž 사전에서 앞부분이 매치되는 키를 가진 엔트리를 찾는 함수
HanjaListhanja_table_match_suffix (const HanjaTable *table, const char *key)
 í•œìž 사전에서 뒷부분이 매치되는 키를 가진 엔트리를 찾는 함수
+int hanja_list_get_size (const HanjaList *list)
 HanjaList가 가지고 있는 아이템의 갯수를 구하는 함수
const char * hanja_list_get_key (const HanjaList *list)
 HanjaList가 생성될때 검색함수에서 사용한 키를 구하는 함수
const Hanjahanja_list_get_nth (const HanjaList *list, unsigned int n)
 HanjaList 의 n번째 Hanja 아이템의 포인터를 구하는 함수
const char * hanja_list_get_nth_key (const HanjaList *list, unsigned int n)
 HanjaList 의 n번째 아이템의 키를 구하는 함수
const char * hanja_list_get_nth_value (const HanjaList *list, unsigned int n)
 HanjaList의 n번째 아이템의 값를 구하는 함수
const char * hanja_list_get_nth_comment (const HanjaList *list, unsigned int n)
 HanjaList의 n번째 아이템의 설명을 구하는 함수
void hanja_list_delete (HanjaList *list)
 í•œìž 사전 검색 함수가 리턴한 결과를 free하는 함수
+size_t hanja_compatibility_form (ucschar *hanja, const ucschar *hangul, size_t n)
+size_t hanja_unified_form (ucschar *str, size_t n)
+

상세한 설명

+
생성시간 : Wed Nov 23 23:31:45 2011, 프로젝트명 : libhangul, 생성자 :   + +doxygen 1.5.3-20071008
+ + diff --git a/doc/html/index.html b/doc/html/index.html new file mode 100644 index 0000000..c5490d4 --- /dev/null +++ b/doc/html/index.html @@ -0,0 +1,51 @@ + + +libhangul: 메인 페이지 + + + + +
+ +
+

libhangul 문서화

+

+

Version 0.1.0

+libhangul 소개

+libhangul은 기본적인 한글 관련 루틴들을 구현한 라이브러리입니다. 주로 한글 입력기능을 구현한 것으로 이 라이브러리를 사용하면 비교적 손쉽게 한글 입력기를 구현할 수 있습니다. 현재 많은 linux의 입력기들이 이 라이브러리로 구현되어 있습니다.

+개발 문서

+libhangul에서 제공하는 기능들은 다음 레퍼런스에서 찾아볼 수 있습니다. +

+다운로드

+최근 릴리스들은 libhangul의 프로젝트 페이지에서 받을 수 있습니다. +개발버젼의 소스는 github의 repository에서 받을 수 있습니다. +

+버그리포트

+libhangul의 버그는 Google code의 버그트래커로 관리하고 있습니다.

+

+

+웹주소

+libhangul은 Google code에서 호스팅되고 있습니다. +
생성시간 : Wed Nov 23 23:31:45 2011, 프로젝트명 : libhangul, 생성자 :   + +doxygen 1.5.3-20071008
+ + diff --git a/doc/html/modules.html b/doc/html/modules.html new file mode 100644 index 0000000..70d64cb --- /dev/null +++ b/doc/html/modules.html @@ -0,0 +1,26 @@ + + +libhangul: 모듈 색인 + + + + +
+ +
+

libhangul 모듈

다음은 모든 모듈들의 목록입니다.: +
생성시간 : Wed Nov 23 23:31:45 2011, 프로젝트명 : libhangul, 생성자 :   + +doxygen 1.5.3-20071008
+ + diff --git a/doc/html/pages.html b/doc/html/pages.html new file mode 100644 index 0000000..4c07a5e --- /dev/null +++ b/doc/html/pages.html @@ -0,0 +1,25 @@ + + +libhangul: 페이지 색인 + + + + +
+ +
+

libhangul 관련된 페이지

다음은 관련된 모든 문서화 페이지들의 목록입니다.: +
생성시간 : Wed Nov 23 23:31:45 2011, 프로젝트명 : libhangul, 생성자 :   + +doxygen 1.5.3-20071008
+ + diff --git a/doc/html/tab_b.gif b/doc/html/tab_b.gif new file mode 100644 index 0000000..0d62348 Binary files /dev/null and b/doc/html/tab_b.gif differ diff --git a/doc/html/tab_l.gif b/doc/html/tab_l.gif new file mode 100644 index 0000000..9b1e633 Binary files /dev/null and b/doc/html/tab_l.gif differ diff --git a/doc/html/tab_r.gif b/doc/html/tab_r.gif new file mode 100644 index 0000000..ce9dd9f Binary files /dev/null and b/doc/html/tab_r.gif differ diff --git a/doc/html/tabs.css b/doc/html/tabs.css new file mode 100644 index 0000000..c37faaf --- /dev/null +++ b/doc/html/tabs.css @@ -0,0 +1,102 @@ +/* tabs styles, based on http://www.alistapart.com/articles/slidingdoors */ + +DIV.tabs +{ + float : left; + width : 100%; + background : url("tab_b.gif") repeat-x bottom; + margin-bottom : 4px; +} + +DIV.tabs UL +{ + margin : 0px; + padding-left : 10px; + list-style : none; +} + +DIV.tabs LI, DIV.tabs FORM +{ + display : inline; + margin : 0px; + padding : 0px; +} + +DIV.tabs FORM +{ + float : right; +} + +DIV.tabs A +{ + float : left; + background : url("tab_r.gif") no-repeat right top; + border-bottom : 1px solid #84B0C7; + font-size : x-small; + font-weight : bold; + text-decoration : none; +} + +DIV.tabs A:hover +{ + background-position: 100% -150px; +} + +DIV.tabs A:link, DIV.tabs A:visited, +DIV.tabs A:active, DIV.tabs A:hover +{ + color: #1A419D; +} + +DIV.tabs SPAN +{ + float : left; + display : block; + background : url("tab_l.gif") no-repeat left top; + padding : 5px 9px; + white-space : nowrap; +} + +DIV.tabs INPUT +{ + float : right; + display : inline; + font-size : 1em; +} + +DIV.tabs TD +{ + font-size : x-small; + font-weight : bold; + text-decoration : none; +} + + + +/* Commented Backslash Hack hides rule from IE5-Mac \*/ +DIV.tabs SPAN {float : none;} +/* End IE5-Mac hack */ + +DIV.tabs A:hover SPAN +{ + background-position: 0% -150px; +} + +DIV.tabs LI.current A +{ + background-position: 100% -150px; + border-width : 0px; +} + +DIV.tabs LI.current SPAN +{ + background-position: 0% -150px; + padding-bottom : 6px; +} + +DIV.nav +{ + background : none; + border : none; + border-bottom : 1px solid #84B0C7; +}