Data.pas
资源名称:Wingb_Mz.rar [点击查看]
上传用户:wen198501
上传日期:2013-04-01
资源大小:335k
文件大小:7k
源码类别:
输入法编程
开发平台:
Delphi
- {******************************************************}
- { }
- { Copyright (c) 1990-1999 Microsoft Corporation }
- { }
- { Module Name: Data.c ->> Data.pas }
- { }
- { Translator: Liu_mazi@126.com, 2005-11-15 }
- { }
- {******************************************************}
- unit Data;
- {$I Define.Inc}
- interface
- uses Windows, ImmDev, ImeDefs;
- const
- SKLayout: array[0..NumsSK-1, 0..MAXSOFTKEYS*2-1] of Char =
- (
- ' 0123456789abcdefghijklmnopqrstuvwxyz;=,-./`[\]'',
- ' κχυμγνξοθπρ ωψι αδλεηφβτζσ ',
- ' лъшнвопржстуьызиагмдёщбчецф э юя й кх',
- ' ㄦㄉ ㄓ ㄚㄞㄢㄇㄖㄏㄎㄍㄑㄕㄘㄛㄨㄜㄠㄩㄙㄟㄣㄆㄐㄋㄔㄧㄒㄊ ㄗㄈㄤ ㄝ ㄡㄥㄅ ',
- ' ē ǔěǎè īǒíǐìǘǖò āàé óùáúōū ǚ ǜü ê ',
- ' ぃぅぇぉかきくけこなもむぬすねのはつひふへゅゃってさせにそちめしみたまほ ょんゎをぁと ゐゑ',
- ' ケィゥヴェォカヵキクナモムヌスネノハツヒフヘュャッテサセニソチメシミタマホコョヶヮヲァトンヰヱ',
- ' ˉ,、;:?!…—·〔(【〈“〉《》∶「」『[)"'‘”〕々‖】’〗~〖』¨]ˇ{}。`〃|.',
- ' ⅪⅡⅢⅣⅤⅥⅦⅧⅨⅩ㈠⑸⑶㈢⒊㈣㈤㈥⒏㈦㈧㈨⑺⑹⒐⒑⒈⒋㈡⒌⒎⑷⒉⑵⒍⑴㈩ ⑻Ⅻ⑼⑽Ⅰ ',
- ' ≡≠=≤≥<>≮≯∧⊙∠∑-∏∪∩∫∈ ∵∽≌∮∝±×∨÷ ⌒+∥/⊥∴ ∷√ ≈∞ ',
- ' ¤°′″$£¥‰%℃百 毫万二亿兆吉七太拍艾 八九○三千四六微一厘五分 ¢ 十 ',
- ' ┄┍┎┏┐┑┒┓ ─┬╀┾┮┞┯┰┱┣┲┳ ╂╁ │├┟┭┠┢┿┝┽┡┼ ╃┈ ┌┆ ┊ ',
- ' ■^@▲☆※→←◇↑↓〓 ̄_◆□§★△○◎\№&●# '
- );
- SKLayoutS: array[0..NumsSK-1, 0..MAXSOFTKEYS*2-1] of Char =
- (
- ' )!@#$%^&*(ABCDEFGHIJKLMNOPQRSTUVWXYZ:+<_>?~{|}"',
- ' ΚΧΥΜΓΝΞΟΘΠΡ ΩΨΙ ΑΔΛΕΗΦΒΤΖΣ ',
- ' ЛЪШНВОПРЖСТУЬЫЗИАГМДЁЩБЧЕЦФ Э ЮЯ Й КХ',
- ' ',
- ' ',
- ' いうえおがぎぐげごぱろるぷずぺぽぼづびぶべゆや でざぜぴぞぢれじりだらぼ よ わ あど ',
- ' ゲイウ エオガ ギグパロルプズペポバヅビブベユヤ デザゼピゾヂレジリダラボゴヨ ワ アド ',
- ' ',
- ' ①⒂⒀③⒔④⑤⑥⒙⑦⑧⑨⒄⒃⒚⒛⒒⒕②⒖⒘⒁⒓⑿⒗⑾⑩ ⒅ ⒆⒇ ',
- ' ',
- ' 佰 贰 柒 扒玖零叁仟肆陆 壹 伍 拾 ',
- ' ┅┕┖┗┘┙┚┛ ━┴╈╆┶┦┷┸┹┫┺┻ ╊╉ ┃┤┧┵┨┪╇┥╅┩╄ ╋┉ └┇ ┋ ',
- ' '
- );
- var
- sImeG: TImeG;
- sImeL: TImeL;
- var
- uStartComp: uInt = 0;
- uOpenCand: uInt = 0;
- uCaps: uInt = 0;
- SaTC_Trace: DWord;
- var
- szUIClassName: array[0..CLASS_LEN] of Char;
- szCompClassName: array[0..CLASS_LEN] of Char;
- szCandClassName: array[0..CLASS_LEN] of Char;
- szStatusClassName: array[0..CLASS_LEN] of Char;
- szCMenuClassName: array[0..CLASS_LEN] of Char;
- szSoftkeyMenuClassName: array[0..CLASS_LEN] of Char;
- const
- szHandCursor: PChar = 'Hand';
- szChinese: PChar = 'Chinese';
- szEnglish: PChar = 'English';
- var
- szImeName: array[0..MAX_PATH] of Char;
- szImeRegName: array[0..MAX_PATH] of Char;
- const
- szCode: PChar = 'Code';
- szEudc: PChar = 'Eudc';
- szFullShape: PChar = 'FullShape';
- szHalfShape: PChar = 'HalfShape';
- szSymbol: PChar = 'Symbol';
- szNoSymbol: PChar = 'NoSymbol';
- szNone: PChar = 'None';
- szSoftKBD: PChar = 'SoftKBD';
- szNoSoftKBD: PChar = 'NoSoftKBD';
- szDigit: PChar = '01234567890';
- szCandInf: PChar = ' 数字键';
- szTrace: PChar = '光标跟随';
- szWarnTitle: PChar = '警告';
- szErrorTitle: PChar = '错误';
- const
- szRegIMESetting: PChar = 'Control PanelInput Method';
- szPara: PChar = 'Parallel Distance';
- szPerp: PChar = 'Perpendicular Distance';
- szParaTol: PChar = 'Parallel Tolerance';
- szPerpTol: PChar = 'Perpendicular Tolerance';
- // decide UI offset base on escapement
- const
- ncUIEsc: array[0..3] of TNearCaret =
- (
- (iLogFontFacX: 0; iLogFontFacY: 1; iParaFacX: 1; iPerpFacX: 0; iParaFacY: 0; iPerpFacY: 1), // 0
- (iLogFontFacX: 1; iLogFontFacY: 0; iParaFacX: 0; iPerpFacX: 1; iParaFacY: 1; iPerpFacY: 0), // 900
- (iLogFontFacX: 0; iLogFontFacY: 0; iParaFacX: -1; iPerpFacX: 0; iParaFacY: 0; iPerpFacY: 1), // 1800
- (iLogFontFacX: -1; iLogFontFacY: 0; iParaFacX: 0; iPerpFacX: -1; iParaFacY: -1; iPerpFacY: 0) // 2700
- );
- // decide another UI offset base on escapement
- const
- ncAltUIEsc: array[0..3] of TNearCaret =
- (
- (iLogFontFacX: 0; iLogFontFacY: 0; iParaFacX: 1; iPerpFacX: 0; iParaFacY: 0; iPerpFacY: -1), // 0
- (iLogFontFacX: 0; iLogFontFacY: 0; iParaFacX: 0; iPerpFacX: -1; iParaFacY: 1; iPerpFacY: 0), // 900
- (iLogFontFacX: 0; iLogFontFacY: 0; iParaFacX: -1; iPerpFacX: 0; iParaFacY: 0; iPerpFacY: -1), // 1800
- (iLogFontFacX: 0; iLogFontFacY: 0; iParaFacX: 0; iPerpFacX: 1; iParaFacY: -1; iPerpFacY: 0) // 2700
- );
- // decide input rectangle base on escapement
- const
- ptInputEsc: array[0..3] of TPoint =
- (
- (X: 1; Y: 1), // 0
- (X: 1; Y: -1), // 900
- (X: 1; Y: 1), // 1800
- (X: -1; Y: 1) // 2700
- );
- // decide another input rectangle base on escapement
- const
- ptAltInputEsc: array[0..3] of TPoint =
- (
- (X: 1; Y: -1), // 0
- (X: -1; Y: -1), // 900
- (X: 1; Y: -1), // 1800
- (X: 1; Y: 1) // 2700
- );
- var
- VirtKey48Map: array[0..47] of Byte =
- (
- $20, $30, $31, $32, $33, $34, $35, $36, $37, $38,
- $39, $41, $42, $43, $44, $45, $46, $47, $48, $49,
- $4a, $4b, $4c, $4d, $4e, $4f, $50, $51, $52, $53,
- $54, $55, $56, $57, $58, $59, $5a, $ba, $bb, $bc,
- $bd, $be, $bf, $c0, $db, $dc, $dd, $de
- );
- implementation
- end.