diff options
author | Choe Hwanjin <choe.hwanjin@gmail.com> | 2010-04-26 22:49:45 +0900 |
---|---|---|
committer | Choe Hwanjin <choe.hwanjin@gmail.com> | 2010-04-26 22:49:45 +0900 |
commit | df86a096abfcad9bdf99c108822f2df721021ad1 (patch) | |
tree | 0907d50df10eea725d04f3034e0942127c0ca538 | |
parent | 35f3b865311752b6d6dc309c80f94f414b6afbc3 (diff) | |
download | libhangul-df86a096abfcad9bdf99c108822f2df721021ad1.tar.gz |
안마태 자판 구현 추가 #315248
* Homin Lee님의 패치를 약간 수정하여 적용함
일부 대분자에 임의로 할당된 기호 글자들 제거
주석 포맷이 틀린곳 수정
git-svn-id: http://kldp.net/svn/hangul/libhangul/trunk@221 8f00fcd2-89fc-0310-932e-b01be5b65e01
-rw-r--r-- | hangul/hangulinputcontext.c | 15 | ||||
-rw-r--r-- | hangul/hangulkeyboard.h | 214 |
2 files changed, 229 insertions, 0 deletions
diff --git a/hangul/hangulinputcontext.c b/hangul/hangulinputcontext.c index 6e47da2..c8a3ff5 100644 --- a/hangul/hangulinputcontext.c +++ b/hangul/hangulinputcontext.c @@ -272,6 +272,11 @@ static const HangulKeyboard hangul_keyboard_romaja = { (ucschar*)hangul_keyboard_table_romaja }; +static const HangulKeyboard hangul_keyboard_an = { + HANGUL_KEYBOARD_TYPE_JASO, + (ucschar*)hangul_keyboard_table_an +}; + static const HangulCombination hangul_combination_default = { N_ELEMENTS(hangul_combination_table_default), (HangulCombinationItem*)hangul_combination_table_default @@ -287,6 +292,11 @@ static const HangulCombination hangul_combination_full = { (HangulCombinationItem*)hangul_combination_table_full }; +static const HangulCombination hangul_combination_an = { + N_ELEMENTS(hangul_combination_table_an), + (HangulCombinationItem*)hangul_combination_table_an +}; + static void hangul_buffer_push(HangulBuffer *buffer, ucschar ch); static ucschar hangul_buffer_pop (HangulBuffer *buffer); static ucschar hangul_buffer_peek(HangulBuffer *buffer); @@ -1630,6 +1640,11 @@ hangul_ic_select_keyboard(HangulInputContext *hic, const char* id) hic->combination = &hangul_combination_romaja; hic->output_mode = HANGUL_OUTPUT_SYLLABLE; hic->use_jamo_mode_only = FALSE; + } else if (strcmp(id, "an") == 0) { + hic->keyboard = &hangul_keyboard_an; + hic->combination = &hangul_combination_an; + hic->output_mode = HANGUL_OUTPUT_SYLLABLE; + hic->use_jamo_mode_only = FALSE; } else { hic->keyboard = &hangul_keyboard_2; hic->combination = &hangul_combination_default; diff --git a/hangul/hangulkeyboard.h b/hangul/hangulkeyboard.h index e3cccd4..42a3da2 100644 --- a/hangul/hangulkeyboard.h +++ b/hangul/hangulkeyboard.h @@ -915,6 +915,137 @@ static const ucschar hangul_keyboard_table_romaja[] = { 0x0000 /* 0x7F delete */ }; +static const ucschar hangul_keyboard_table_an[] = { + 0x0000, /* 0x00 null */ + 0x0000, /* 0x01 start of heading */ + 0x0000, /* 0x02 start of text */ + 0x0000, /* 0x03 end of text */ + 0x0000, /* 0x04 end of transmission */ + 0x0000, /* 0x05 enquiry */ + 0x0000, /* 0x06 acknowledge */ + 0x0000, /* 0x07 bell */ + 0x0000, /* 0x08 backspace */ + 0x0000, /* 0x09 character tabulation */ + 0x0000, /* 0x0A line feed (lf) */ + 0x0000, /* 0x0B line tabulation */ + 0x0000, /* 0x0C form feed (ff) */ + 0x0000, /* 0x0D carriage return (cr) */ + 0x0000, /* 0x0E shift out */ + 0x0000, /* 0x0F shift in */ + 0x0000, /* 0x10 data link escape */ + 0x0000, /* 0x11 device control one */ + 0x0000, /* 0x12 device control two */ + 0x0000, /* 0x13 device control three */ + 0x0000, /* 0x14 device control four */ + 0x0000, /* 0x15 negative acknowledge */ + 0x0000, /* 0x16 synchronous idle */ + 0x0000, /* 0x17 end of transmission block */ + 0x0000, /* 0x18 cancel */ + 0x0000, /* 0x19 end of medium */ + 0x0000, /* 0x1A substitute */ + 0x0000, /* 0x1B escape */ + 0x0000, /* 0x1C information separator four */ + 0x0000, /* 0x1D information separator three */ + 0x0000, /* 0x1E information separator two */ + 0x0000, /* 0x1F information separator one */ + 0x0000, /* 0x20 space */ + 0x0021, /* 0x21 exclam: exclamation mark */ + 0x0022, /* 0x22 quotedbl: quotation mark */ + 0x0023, /* 0x23 numbersign: number sign */ + 0x0024, /* 0x24 dollar: dollar sign */ + 0x0025, /* 0x25 percent: percent sign */ + 0x0026, /* 0x26 ampersand: ampersand */ + 0x002e, /* 0x27 apostrophe: period */ + 0x0028, /* 0x28 parenleft: left parenthesis */ + 0x0029, /* 0x29 parenright: right parenthesis */ + 0x002a, /* 0x2A asterisk: asterisk */ + 0x002b, /* 0x2B plus: plus sign */ + 0x11b7, /* 0x2C comma: jongseong mieum */ + 0x002d, /* 0x2D minus: minus sign */ + 0x11af, /* 0x2E period: jongseong rieul */ + 0x11c2, /* 0x2F slash: jongseong hieuh */ + 0x0030, /* 0x30 0: 0 */ + 0x0031, /* 0x31 1: 1 */ + 0x0032, /* 0x32 2: 2 */ + 0x0033, /* 0x33 3: 3 */ + 0x0034, /* 0x34 4: 4 */ + 0x0035, /* 0x35 5: 5 */ + 0x0036, /* 0x36 6: 6 */ + 0x0037, /* 0x37 7: 7 */ + 0x0038, /* 0x38 8: 8 */ + 0x0039, /* 0x39 9: 9 */ + 0x003a, /* 0x3A colon: colon */ + 0x116e, /* 0x3B semicolon: jungseong u */ + 0x003c, /* 0x3C less: less-than sign */ + 0x003d, /* 0x3D equal: equals sign */ + 0x003e, /* 0x3E greater: greater-than sign */ + 0x11f9, /* 0x3F question: jongseong yet hieuh */ + 0x0040, /* 0x40 at: commercial at */ + 0x0041, /* 0x41 A: A */ + 0x11f0, /* 0x42 B: jongseong yet ieung */ + 0x0043, /* 0x43 C: C */ + 0x201c, /* 0x44 D: left double quotation mark */ + 0x0045, /* 0x45 E: E */ + 0x201d, /* 0x46 F: right double quotation mark */ + 0x114c, /* 0x47 G: choseong yet ieung */ + 0x00b7, /* 0x48 H: middle dot */ + 0x002f, /* 0x49 I: slash */ + 0x119e, /* 0x4A J: jungseong araea */ + 0x002c, /* 0x4B K: comma */ + 0x002e, /* 0x4C L: dot */ + 0x004D, /* 0x4D M: M */ + 0x11eb, /* 0x4E N: jongsung ban siot */ + 0x004f, /* 0x4F O: O */ + 0x0050, /* 0x50 P: P */ + 0x0051, /* 0x51 Q: Q */ + 0x0052, /* 0x52 R: R */ + 0x203b, /* 0x53 S: dangujang mark */ + 0x1159, /* 0x54 T: chosung yet hiheuh */ + 0x0027, /* 0x55 U: apostrophe */ + 0x0056, /* 0x56 V: V */ + 0x1140, /* 0x57 W: chosung ban siot */ + 0x0058, /* 0x58 X: X */ + 0x003b, /* 0x59 Y: semicolon */ + 0x005A, /* 0x5A Z: Z */ + 0x002c, /* 0x5B bracketleft: comma */ + 0x005c, /* 0x5C backslash: backslash */ + 0x003f, /* 0x5D bracketright: qustion mark */ + 0x005e, /* 0x5E asciicircum: circumflex accent */ + 0x005f, /* 0x5F underscore: underscore */ + 0x0060, /* 0x60 quoteleft: grave accent */ + 0x1107, /* 0x61 a: choseong pieup */ + 0x11bc, /* 0x62 b: jongseong ieung */ + 0x11b8, /* 0x63 c: jongseong pieup */ + 0x1103, /* 0x64 d: choseong digeud */ + 0x1102, /* 0x65 e: choseong nieun */ + 0x1100, /* 0x66 f: choseong kiyeok */ + 0x110b, /* 0x67 g: choseong ieung */ + 0x1165, /* 0x68 h: jungseong eo */ + 0x1173, /* 0x69 i: jungseong eu */ + 0x1161, /* 0x6A j: jungseong a */ + 0x1175, /* 0x6B k: jungseong i */ + 0x1169, /* 0x6C l: jungseong o */ + 0x11ab, /* 0x6D m: jongseong nieun */ + 0x11ba, /* 0x6E n: jongseong siot */ + 0x116d, /* 0x6F o: jungseong yo */ + 0x1172, /* 0x70 p: jungseong yu */ + 0x1106, /* 0x71 q: choseong mieum */ + 0x1105, /* 0x72 r: choseong rieul */ + 0x110c, /* 0x73 s: choseong jieut */ + 0x1112, /* 0x74 t: choseong hieuh */ + 0x1163, /* 0x75 u: jungseong ya */ + 0x11a8, /* 0x76 v: jongseong kiyok */ + 0x1109, /* 0x77 w: choseong siot */ + 0x11ae, /* 0x78 x: jongseong digeut */ + 0x1167, /* 0x79 y: jungseong yeo */ + 0x11bd, /* 0x7A z: jongseong jieut */ + 0x007b, /* 0x7B braceleft: left brace */ + 0x007c, /* 0x7C bar: vertical bar */ + 0x007d, /* 0x7D braceright: right brace */ + 0x007e, /* 0x7E asciitilde: tilde */ + 0x0000 /* 0x7F delete */ +}; + static const HangulCombinationItem hangul_combination_table_default[] = { { 0x11001100, 0x1101 }, /* choseong kiyeok + kiyeok = ssangkiyeok */ { 0x11031103, 0x1104 }, /* choseong tikeut + tikeut = ssangtikeut */ @@ -1180,3 +1311,86 @@ static const HangulCombinationItem hangul_combination_table_full[] = { { 0x11f011ba, 0x11f1 }, /* jongseong yesieung-sios = yesieung + sios */ { 0x11f011eb, 0x11f2 }, /* jongseong yesieung-pansios = yesieung + pansios */ }; + +static const HangulCombinationItem hangul_combination_table_an[] = { + { 0x11001103, 0x1104 }, /* choseong kiyeok + tikeut = ssangtikeut */ + { 0x1100110b, 0x1101 }, /* choseong kiyeok + ieung = ssangkiyeok */ + { 0x11001112, 0x110f }, /* choseong kiyeok + hieuh = khieukh */ + { 0x11021109, 0x110a }, /* choseong nieun + sios = ssangsios */ + { 0x11031100, 0x1104 }, /* choseong tikeut + kiyeok = ssangtikeut */ + { 0x1103110c, 0x110d }, /* choseong tikeut + cieuc = ssangcieuc */ + { 0x11031112, 0x1110 }, /* choseong tikeut + hieuh = thieuth */ + { 0x1107110c, 0x1108 }, /* choseong pieup + cieuc = ssangpieup */ + { 0x11071112, 0x1111 }, /* choseong pieup + hieuh = phieuph */ + { 0x11091102, 0x110a }, /* choseong sios + nieun = ssangsios */ + { 0x110b1100, 0x1101 }, /* choseong ieung + kiyeok = ssangkiyeok */ + { 0x110c1103, 0x110d }, /* choseong cieuc + tikeut = ssangcieuc */ + { 0x110c1107, 0x1108 }, /* choseong cieuc + pieup = ssangpieup */ + { 0x110c1112, 0x110e }, /* choseong cieuc + hieuh = chieuch */ + { 0x11121100, 0x110f }, /* choseong hieuh + kiyeok = khieukh */ + { 0x11121103, 0x1110 }, /* choseong hieuh + tikeut = thieuth */ + { 0x11121107, 0x1111 }, /* choseong hieuh + pieup = phieuph */ + { 0x1112110c, 0x110e }, /* choseong hieuh + cieuc = chieuch */ + { 0x11611169, 0x116a }, /* jungseong a + o = wa */ + { 0x11611175, 0x1162 }, /* jungseong a + i = ae */ + { 0x11621169, 0x116b }, /* jungseong ae + o = wae */ + { 0x11631175, 0x1164 }, /* jungseong ya + i = yae */ + { 0x1165116e, 0x116f }, /* jungseong eo + u = weo */ + { 0x11651175, 0x1166 }, /* jungseong eo + i = e */ + { 0x1166116e, 0x1170 }, /* jungseong e + u = we */ + { 0x11671175, 0x1168 }, /* jungseong yeo + i = ye */ + { 0x11691161, 0x116a }, /* jungseong o + a = wa */ + { 0x11691175, 0x116c }, /* jungseong o + i = oe */ + { 0x116a1175, 0x116b }, /* jungseong wa + i = wae */ + { 0x116c1161, 0x116b }, /* jungseong oe + a = wae */ + { 0x116e1165, 0x116f }, /* jungseong u + eo = weo */ + { 0x116e1175, 0x1171 }, /* jungseong u + i = wi */ + { 0x116f1175, 0x1170 }, /* jungseong weo + i = we */ + { 0x11711165, 0x1170 }, /* jungseong wi + eo = we */ + { 0x11731175, 0x1174 }, /* jungseong eu + i = yi */ + { 0x11751161, 0x1162 }, /* jungseong i + a = ae */ + { 0x11751163, 0x1164 }, /* jungseong i + ya = yae */ + { 0x11751165, 0x1166 }, /* jungseong i + eo = e */ + { 0x11751167, 0x1168 }, /* jungseong i + yeo = ye */ + { 0x11751169, 0x116c }, /* jungseong i + o = oe */ + { 0x1175116e, 0x1171 }, /* jungseong i + u = wi */ + { 0x11751173, 0x1174 }, /* jungseong i + eu = yi */ + { 0x11a811af, 0x11b0 }, /* jongseong kiyeok + rieul = rieul-kiyeok */ + { 0x11a811ba, 0x11aa }, /* jongseong kiyeok + sios = kiyeok-sios */ + { 0x11a811bc, 0x11a9 }, /* jongseong kiyeok + ieung = ssangkiyeok */ + { 0x11a811c2, 0x11bf }, /* jongseong kiyeok + hieuh = khieukh */ + { 0x11ab11ba, 0x11bb }, /* jongseong nieun + sios = ssangsios */ + { 0x11ab11bd, 0x11ac }, /* jongseong nieun + cieuc = nieun-cieuc */ + { 0x11ab11c2, 0x11ad }, /* jongseong nieun + hieuh = nieun-hieuh */ + { 0x11ae11af, 0x11ce }, /* jongseong tikeut + rieul = rieul-tikeut */ + { 0x11ae11c2, 0x11c0 }, /* jongseong tikeut + hieuh = thieuth */ + { 0x11af11a8, 0x11b0 }, /* jongseong rieul + kiyeok = rieul-kiyeok */ + { 0x11af11ae, 0x11ce }, /* jongseong rieul + tikeut = rieul-tikeut */ + { 0x11af11b7, 0x11b1 }, /* jongseong rieul + mieum = rieul-mieum */ + { 0x11af11b8, 0x11b2 }, /* jongseong rieul + pieup = rieul-pieup */ + { 0x11af11ba, 0x11b3 }, /* jongseong rieul + sios = rieul-sios */ + { 0x11af11c2, 0x11b6 }, /* jongseong rieul + hieuh = rieul-hieuh */ + { 0x11b211c2, 0x11b5 }, /* jongseong rieul-pieup + hieuh = rieul-phieuph */ + { 0x11b611ae, 0x11b4 }, /* jongseong rieul-hieuh + tikeut = rieul-thieuth */ + { 0x11b611b8, 0x11b5 }, /* jongseong rieul-hieuh + pieup = rieul-phieuph */ + { 0x11b711af, 0x11b1 }, /* jongseong mieum + rieul = rieul-mieum */ + { 0x11b811af, 0x11b2 }, /* jongseong pieup + rieul = rieul-pieup */ + { 0x11b811ba, 0x11b9 }, /* jongseong pieup + sios = pieup-sios */ + { 0x11b811c2, 0x11c1 }, /* jongseong pieup + hieuh = phieuph */ + { 0x11ba11a8, 0x11aa }, /* jongseong sios + kiyeok = kiyeok-sios */ + { 0x11ba11ab, 0x11bb }, /* jongseong sios + nieun = ssangsios */ + { 0x11ba11af, 0x11b3 }, /* jongseong sios + rieul = rieul-sios */ + { 0x11ba11b8, 0x11b9 }, /* jongseong sios + pieup = pieup-sios */ + { 0x11bc11a8, 0x11a9 }, /* jongseong ieung + kiyeok = ssangkiyeok */ + { 0x11bd11ab, 0x11ac }, /* jongseong cieuc + nieun = nieun-cieuc */ + { 0x11bd11c2, 0x11be }, /* jongseong cieuc + hieuh = chieuch */ + { 0x11c011af, 0x11b4 }, /* jongseong thieuth + rieul = rieul-thieuth */ + { 0x11c111af, 0x11b5 }, /* jongseong phieuph + rieul = rieul-phieuph */ + { 0x11c211a8, 0x11bf }, /* jongseong hieuh + kiyeok = khieukh */ + { 0x11c211ab, 0x11ad }, /* jongseong hieuh + nieun = nieun-hieuh */ + { 0x11c211ae, 0x11c0 }, /* jongseong hieuh + tikeut = thieuth */ + { 0x11c211af, 0x11b6 }, /* jongseong hieuh + rieul = rieul-hieuh */ + { 0x11c211b8, 0x11c1 }, /* jongseong hieuh + pieup = phieuph */ + { 0x11c211bd, 0x11be }, /* jongseong hieuh + cieuc = chieuch */ + { 0x11ce11c2, 0x11b4 }, /* jongseong rieul-tikeut + hieuh = rieul-thieuth */ +}; |