ImmDev.pas
上传用户:wen198501
上传日期:2013-04-01
资源大小:335k
文件大小:37k
源码类别:

输入法编程

开发平台:

Delphi

  1.  {******************************************************}
  2.  {                                                      }
  3.  {    Copyright (c) 1993-1998 Microsoft Corporation     }
  4.  {                                                      }
  5.  {    Module Name:  Immdev.h ->>  ImmDev.pas            }
  6.  {                                                      }
  7.  {    Translator:  Liu_mazi@126.com, 2005-11-12         }
  8.  {                                                      }
  9.  {******************************************************}
  10. unit ImmDev;
  11. {$I Define.Inc}
  12. interface
  13. uses Windows;
  14. type
  15.   HImc  = DWord;
  16.   HImcc = DWord;
  17.   PHKL  = ^HKL;
  18. type
  19.   PCompositionForm = ^TCompositionForm;
  20.   TCompositionForm = record
  21.     dwStyle: DWord;
  22.     ptCurrentPos: TPoint;
  23.     rcArea: TRect;
  24.   end;
  25. type
  26.   PCandidateForm = ^TCandidateForm;
  27.   TCandidateForm = record
  28.     dwIndex: DWord;
  29.     dwStyle: DWord;
  30.     ptCurrentPos: TPoint;
  31.     rcArea: TRect;
  32.   end;
  33. type
  34.   PCandidateList = ^TCandidateList;
  35.   TCandidateList = record
  36.     dwSize: DWord;
  37.     dwStyle: DWord;
  38.     dwCount: DWord;
  39.     dwSelection: DWord;
  40.     dwPageStart: DWord;
  41.     dwPageSize: DWord;
  42.     dwOffset: array[0..0] of DWord;
  43.   end;
  44. type
  45.   PRegisterWordA = ^TRegisterWordA;
  46.   TRegisterWordA = record
  47.     lpReading: PAnsiChar;
  48.     lpWord: PAnsiChar;
  49.   end;
  50.   PRegisterWordW = ^TRegisterWordW;
  51.   TRegisterWordW = record
  52.     lpReading: PWideChar;
  53.     lpWord: PWideChar;
  54.   end;
  55.   TRegisterWord = TRegisterWordA;
  56.   PRegisterWord = PRegisterWordA;
  57. type
  58.   PReconvertString = ^TReconvertString;
  59.   TReconvertString = record
  60.     dwSize: DWord;
  61.     dwVersion: DWord;
  62.     dwStrLen: DWord;
  63.     dwStrOffset: DWord;
  64.     dwCompStrLen: DWord;
  65.     dwCompStrOffset: DWord;
  66.     dwTargetStrLen: DWord;
  67.     dwTargetStrOffset: DWord;
  68.   end;
  69. const
  70.   STYLE_DESCRIPTION_SIZE = 32;
  71. type
  72.   PStyleBufA = ^TStyleBufA;
  73.   TStyleBufA = record
  74.     dwStyle: DWord;
  75.     szDescription: array[0..STYLE_DESCRIPTION_SIZE-1] of AnsiChar;
  76.   end;
  77.   PStyleBufW = ^TStyleBufW;
  78.   TStyleBufW = record
  79.     dwStyle: DWord;
  80.     szDescription: array[0..STYLE_DESCRIPTION_SIZE-1] of WideChar;
  81.   end;
  82.   TStyleBuf = TStyleBufA;
  83.   PStyleBuf = PStyleBufA;
  84. const
  85.   IMEMENUITEM_STRING_SIZE = 80;
  86. type
  87.   PImeMenuItemInfoA = ^TImeMenuItemInfoA;
  88.   TImeMenuItemInfoA = record
  89.     cbSize: UInt;
  90.     fType: UInt;
  91.     fState: UInt;
  92.     wID: UInt;
  93.     hbmpChecked: HBitmap;
  94.     hbmpUnchecked: HBitmap;
  95.     dwItemData: DWord;
  96.     szString: array[0..IMEMENUITEM_STRING_SIZE-1] of AnsiChar;
  97.     hbmpItem: HBitmap;
  98.   end;
  99.   PImeMenuItemInfoW = ^TImeMenuItemInfoW;
  100.   TImeMenuItemInfoW = record
  101.     cbSize: UInt;
  102.     fType: UInt;
  103.     fState: UInt;
  104.     wID: UInt;
  105.     hbmpChecked: HBitmap;
  106.     hbmpUnchecked: HBitmap;
  107.     dwItemData: DWord;
  108.     szString: array[0..IMEMENUITEM_STRING_SIZE-1] of WideChar;
  109.     hbmpItem: HBitmap;
  110.   end;
  111.   TImeMenuItemInfo = TImeMenuItemInfoA;
  112.   PImeMenuItemInfo = PImeMenuItemInfoA;
  113. type
  114.   PImeCharPosition = ^TImeCharPosition;
  115.   TImeCharPosition = record
  116.     dwSize: DWord;
  117.     dwCharPos: DWord;
  118.     pt: TPoint;
  119.     cLineHeight: UInt;
  120.     rcDocument: TRect;
  121.   end;
  122. type
  123.   ImcEnumProc = function(hImc: HImc; lParam: LParam): Bool; stdcall;
  124.   
  125.   // prototype of IMM API ..
  126. function ImmInstallIME(lpszIMEFileName, lpszLayoutText: PChar): HKL; stdcall;
  127. function ImmInstallIMEA(lpszIMEFileName, lpszLayoutText: PAnsiChar): HKL; stdcall;
  128. function ImmInstallIMEW(lpszIMEFileName, lpszLayoutText: PWideChar): HKL; stdcall;
  129. function ImmGetDefaultIMEWnd(hWnd: HWnd): HWnd; stdcall;
  130. function ImmGetDescription(hKl: HKL; lpszDescription: PChar; uBufLen: UInt): UInt; stdcall;
  131. function ImmGetDescriptionA(hKl: HKL; lpszDescription: PAnsiChar; uBufLen: UInt): UInt; stdcall;
  132. function ImmGetDescriptionW(hKl: HKL; lpszDescription: PWideChar; uBufLen: UInt): UInt; stdcall;
  133. function ImmGetIMEFileName(hKl: HKL; lpszFileName: PChar; uBufLen: UInt): UInt; stdcall;
  134. function ImmGetIMEFileNameA(hKl: HKL; lpszFileName: PAnsiChar; uBufLen: UInt): UInt; stdcall;
  135. function ImmGetIMEFileNameW(hKl: HKL; lpszFileName: PWideChar; uBufLen: UInt): UInt; stdcall;
  136. function ImmGetProperty(hKl: HKL; fdwIndex: DWord): DWord; stdcall;
  137. function ImmIsIME(hKl: HKL): Bool; stdcall;
  138. function ImmSimulateHotKey(hWnd: HWnd; dwHotKeyID: DWord): Bool; stdcall;
  139. function ImmCreateContext(): HImc; stdcall;
  140. function ImmDestroyContext(hImc: HImc): Bool; stdcall;
  141. function ImmGetContext(hWnd: HWnd): HImc; stdcall;
  142. function ImmReleaseContext(hWnd: HWnd; hImc: HImc): Bool; stdcall;
  143. function ImmAssociateContext(hWnd: HWnd; hImc: HImc): HImc; stdcall;
  144. function ImmAssociateContextEx(hWnd: HWnd; hIMC: HImc; dwFlags: DWord): Bool; stdcall;
  145. function ImmGetCompositionString(hImc: HImc; dwIndex: DWord; lpBuf: Pointer; dwBufLen: DWord): LongInt; stdcall;
  146. function ImmGetCompositionStringA(hImc: HImc; dwIndex: DWord; lpBuf: Pointer; dwBufLen: DWord): LongInt; stdcall;
  147. function ImmGetCompositionStringW(hImc: HImc; dwIndex: DWord; lpBuf: Pointer; dwBufLen: DWord): LongInt; stdcall;
  148. function ImmSetCompositionString(hImc: HImc; dwIndex: DWord; lpComp: Pointer; dwCompLen: DWord; lpRead: Pointer; dwReadLen: DWord): Bool; stdcall;
  149. function ImmSetCompositionStringA(hImc: HImc; dwIndex: DWord; lpComp: Pointer; dwCompLen: DWord; lpRead: Pointer; dwReadLen: DWord): Bool; stdcall;
  150. function ImmSetCompositionStringW(hImc: HImc; dwIndex: DWord; lpComp: Pointer; dwCompLen: DWord; lpRead: Pointer; dwReadLen: DWord): Bool; stdcall;
  151. function ImmGetCandidateListCount(hImc: HImc; lpdwListCount: PDWord): DWord; stdcall;
  152. function ImmGetCandidateListCountA(hImc: HImc; lpdwListCount: PDWord): DWord; stdcall;
  153. function ImmGetCandidateListCountW(hImc: HImc; lpdwListCount: PDWord): DWord; stdcall;
  154. function ImmGetCandidateList(hImc: HImc; deIndex: DWord; lpCandidateList: PCandidateList; dwBufLen: DWord): DWord; stdcall;
  155. function ImmGetCandidateListA(hImc: HImc; deIndex: DWord; lpCandidateList: PCandidateList; dwBufLen: DWord): DWord; stdcall;
  156. function ImmGetCandidateListW(hImc: HImc; deIndex: DWord; lpCandidateList: PCandidateList; dwBufLen: DWord): DWord; stdcall;
  157. function ImmGetGuideLine(hImc: HImc; dwIndex: DWord; lpBuf: PChar; dwBufLen: DWord): DWord; stdcall;
  158. function ImmGetGuideLineA(hImc: HImc; dwIndex: DWord; lpBuf: PAnsiChar; dwBufLen: DWord): DWord; stdcall;
  159. function ImmGetGuideLineW(hImc: HImc; dwIndex: DWord; lpBuf: PWideChar; dwBufLen: DWord): DWord; stdcall;
  160. function ImmGetConversionStatus(hImc: HImc; lpfdwConversion, lpfdwSentence: PDWord): Bool; stdcall;
  161. function ImmSetConversionStatus(hImc: HImc; fdwConversion, fdwSentence: DWord): Bool; stdcall;
  162. function ImmGetOpenStatus(hImc: HImc): Bool; stdcall;
  163. function ImmSetOpenStatus(hImc: HImc; fOpen: Bool): Bool; stdcall;
  164. function ImmGetCompositionFont(hImc: HImc; lpLogfont: PLogFont): Bool; stdcall;
  165. function ImmGetCompositionFontA(hImc: HImc; lpLogfont: PLogFontA): Bool; stdcall;
  166. function ImmGetCompositionFontW(hImc: HImc; lpLogfont: PLogFontW): Bool; stdcall;
  167. function ImmSetCompositionFont(hImc: HImc; lpLogfont: PLogFont): Bool; stdcall;
  168. function ImmSetCompositionFontA(hImc: HImc; lpLogfont: PLogFontA): Bool; stdcall;
  169. function ImmSetCompositionFontW(hImc: HImc; lpLogfont: PLogFontW): Bool; stdcall;
  170. function ImmConfigureIME(hKl: HKL; hWnd: HWnd; dwMode: DWord; lpData: Pointer): Bool; stdcall;
  171. function ImmConfigureIMEA(hKl: HKL; hWnd: HWnd; dwMode: DWord; lpData: Pointer): Bool; stdcall;
  172. function ImmConfigureIMEW(hKl: HKL; hWnd: HWnd; dwMode: DWord; lpData: Pointer): Bool; stdcall;
  173. function ImmEscape(hKl: HKL; hImc: HImc; uEscape: UInt; lpData: Pointer): LResult; stdcall;
  174. function ImmEscapeA(hKl: HKL; hImc: HImc; uEscape: UInt; lpData: Pointer): LResult; stdcall;
  175. function ImmEscapeW(hKl: HKL; hImc: HImc; uEscape: UInt; lpData: Pointer): LResult; stdcall;
  176. function ImmGetConversionList(hKl: HKL; hImc: HImc; lpSrc: PChar; lpDst: PCandidateList; dwBufLen: DWord; uFlag: UInt): DWord; stdcall;
  177. function ImmGetConversionListA(hKl: HKL; hImc: HImc; lpSrc: PAnsiChar; lpDst: PCandidateList; dwBufLen: DWord; uFlag: UInt): DWord; stdcall;
  178. function ImmGetConversionListW(hKl: HKL; hImc: HImc; lpSrc: PWideChar; lpDst: PCandidateList; dwBufLen: DWord; uFlag: UInt): DWord; stdcall;
  179. function ImmNotifyIME(hImc: HImc; dwAction, dwIndex, dwValue: DWord): Bool; stdcall;
  180. function ImmGetStatusWindowPos(hImc: HImc; lpptPos: PPoint): Bool; stdcall;
  181. function ImmSetStatusWindowPos(hImc: HImc; lpptPos: PPoint): Bool; stdcall;
  182. function ImmGetCompositionWindow(hImc: HImc; lpCompForm: PCompositionForm): Bool; stdcall;
  183. function ImmSetCompositionWindow(hImc: HImc; lpCompForm: PCompositionForm): Bool; stdcall;
  184. function ImmGetCandidateWindow(hImc: HImc; dwBufLen: DWord; lpCandidate: PCandidateForm): Bool; stdcall;
  185. function ImmSetCandidateWindow(hImc: HImc; lpCandidate: PCandidateForm): Bool; stdcall;
  186. function ImmIsUIMessage(hWnd: HWnd; uMsg: UInt; wParam: WParam; lParam: LParam): Bool; stdcall;
  187. function ImmIsUIMessageA(hWnd: HWnd; uMsg: UInt; wParam: WParam; lParam: LParam): Bool; stdcall;
  188. function ImmIsUIMessageW(hWnd: HWnd; uMsg: UInt; wParam: WParam; lParam: LParam): Bool; stdcall;
  189. function ImmGetVirtualKey(hWnd: HWnd): UInt; stdcall;
  190. type
  191.   RegisterWordEnumProcA = function(lpszReading: PAnsiChar; dwStyle: DWord; lpszString: PAnsiChar; lpData: Pointer): UInt; stdcall;
  192.   RegisterWordEnumProcW = function(lpszReading: PWideChar; dwStyle: DWord; lpszString: PWideChar; lpData: Pointer): UInt; stdcall;
  193.   RegisterWordEnumProc  = RegisterWordEnumProcA;
  194. function ImmRegisterWord(hKl: HKL; lpszReading: PChar; dwStyle: DWord; lpszRegister: PChar): Bool; stdcall;
  195. function ImmRegisterWordA(hKl: HKL; lpszReading: PAnsiChar; dwStyle: DWord; lpszRegister: PAnsiChar): Bool; stdcall;
  196. function ImmRegisterWordW(hKl: HKL; lpszReading: PWideChar; dwStyle: DWord; lpszRegister: PWideChar): Bool; stdcall;
  197. function ImmUnregisterWord(hKl: HKL; lpszReading: PChar; dwStyle: DWord; lpszUnregister: PChar): Bool; stdcall;
  198. function ImmUnregisterWordA(hKl: HKL; lpszReading: PAnsiChar; dwStyle: DWord; lpszUnregister: PAnsiChar): Bool; stdcall;
  199. function ImmUnregisterWordW(hKl: HKL; lpszReading: PWideChar; dwStyle: DWord; lpszUnregister: PWideChar): Bool; stdcall;
  200. function ImmGetRegisterWordStyle(hKl: HKL; nItem: UInt; lpStyleBuf: PStyleBuf): UInt; stdcall;
  201. function ImmGetRegisterWordStyleA(hKl: HKL; nItem: UInt; lpStyleBuf: PStyleBufA): UInt; stdcall;
  202. function ImmGetRegisterWordStyleW(hKl: HKL; nItem: UInt; lpStyleBuf: PStyleBufW): UInt; stdcall;
  203. function ImmEnumRegisterWord(hKl: HKL; lpfnEnumProc: RegisterWordEnumProc; lpszReading: PChar; dwStyle: DWord; lpszRegister: PChar; lpData: Pointer): UInt; stdcall;
  204. function ImmEnumRegisterWordA(hKl: HKL; lpfnEnumProc: RegisterWordEnumProcA; lpszReading: PAnsiChar; dwStyle: DWord; lpszRegister: PAnsiChar; lpData: Pointer): UInt; stdcall;
  205. function ImmEnumRegisterWordW(hKl: HKL; lpfnEnumProc: RegisterWordEnumProcW; lpszReading: PWideChar; dwStyle: DWord; lpszRegister: PWideChar; lpData: Pointer): UInt; stdcall;
  206. function ImmDisableIME(idThread: DWord): Bool; stdcall;
  207. function ImmEnumInputContext(idThread: DWord; lpfn: ImcEnumProc; lParam: LParam): Bool; stdcall;
  208. function ImmGetImeMenuItems(hImc: HImc; dwFlags, dwType: DWord; lpImeParentMenu, lpImeMenu: PImeMenuItemInfo; dwSize: DWord): DWord; stdcall;
  209. function ImmGetImeMenuItemsA(hImc: HImc; dwFlags, dwType: DWord; lpImeParentMenu, lpImeMenu: PImeMenuItemInfoA; dwSize: DWord): DWord; stdcall;
  210. function ImmGetImeMenuItemsW(hImc: HImc; dwFlags, dwType: DWord; lpImeParentMenu, lpImeMenu: PImeMenuItemInfoW; dwSize: DWord): DWord; stdcall;
  211.   // wParam for WM_IME_CONTROL
  212. const
  213.   IMC_GETCANDIDATEPOS           =  $0007;
  214.   IMC_SETCANDIDATEPOS           =  $0008;
  215.   IMC_GETCOMPOSITIONFONT        =  $0009;
  216.   IMC_SETCOMPOSITIONFONT        =  $000A;
  217.   IMC_GETCOMPOSITIONWINDOW      =  $000B;
  218.   IMC_SETCOMPOSITIONWINDOW      =  $000C;
  219.   IMC_GETSTATUSWINDOWPOS        =  $000F;
  220.   IMC_SETSTATUSWINDOWPOS        =  $0010;
  221.   IMC_CLOSESTATUSWINDOW         =  $0021;
  222.   IMC_OPENSTATUSWINDOW          =  $0022;
  223.   // dwAction for ImmNotifyIME
  224. const
  225.   NI_OPENCANDIDATE              =  $0010;
  226.   NI_CLOSECANDIDATE             =  $0011;
  227.   NI_SELECTCANDIDATESTR         =  $0012;
  228.   NI_CHANGECANDIDATELIST        =  $0013;
  229.   NI_FINALIZECONVERSIONRESULT   =  $0014;
  230.   NI_COMPOSITIONSTR             =  $0015;
  231.   NI_SETCANDIDATE_PAGESTART     =  $0016;
  232.   NI_SETCANDIDATE_PAGESIZE      =  $0017;
  233.   NI_IMEMENUSELECTED            =  $0018;
  234.   // lParam for WM_IME_SETCONTEXT
  235. const
  236.   ISC_SHOWUICANDIDATEWINDOW     =  $00000001;
  237.   ISC_SHOWUICOMPOSITIONWINDOW   =  $80000000;
  238.   ISC_SHOWUIGUIDELINE           =  $40000000;
  239.   ISC_SHOWUIALLCANDIDATEWINDOW  =  $0000000F;
  240.   ISC_SHOWUIALL                 =  $C000000F;
  241.   // dwIndex for ImmNotifyIME/NI_COMPOSITIONSTR
  242. const
  243.   CPS_COMPLETE                  =  $0001;
  244.   CPS_CONVERT                   =  $0002;
  245.   CPS_REVERT                    =  $0003;
  246.   CPS_CANCEL                    =  $0004;
  247.   // the modifiers of hot key
  248. const
  249.   MOD_ALT                       =  $0001;
  250.   MOD_CONTROL                   =  $0002;
  251.   MOD_SHIFT                     =  $0004;
  252.   MOD_LEFT                      =  $8000;
  253.   MOD_RIGHT                     =  $4000;
  254.   MOD_ON_KEYUP                  =  $0800;
  255.   MOD_IGNORE_ALL_MODIFIER       =  $0400;
  256.   // Windows for Simplified Chinese Edition hot key ID from 0x10 - 0x2F
  257. const
  258.   IME_CHOTKEY_IME_NONIME_TOGGLE         =  $10;
  259.   IME_CHOTKEY_SHAPE_TOGGLE              =  $11;
  260.   IME_CHOTKEY_SYMBOL_TOGGLE             =  $12;
  261.   // Windows for Japanese Edition hot key ID from 0x30 - 0x4F
  262. const
  263.   IME_JHOTKEY_CLOSE_OPEN                =  $30;
  264.   // Windows for Korean Edition hot key ID from 0x50 - 0x6F
  265. const
  266.   IME_KHOTKEY_SHAPE_TOGGLE              =  $50;
  267.   IME_KHOTKEY_HANJACONVERT              =  $51;
  268.   IME_KHOTKEY_ENGLISH                   =  $52;
  269.   // Windows for Traditional Chinese Edition hot key ID from 0x70 - 0x8F
  270. const
  271.   IME_THOTKEY_IME_NONIME_TOGGLE         =  $70;
  272.   IME_THOTKEY_SHAPE_TOGGLE              =  $71;
  273.   IME_THOTKEY_SYMBOL_TOGGLE             =  $72;
  274.   // direct switch hot key ID from 0x100 - 0x11F
  275. const
  276.   IME_HOTKEY_DSWITCH_FIRST              =  $100;
  277.   IME_HOTKEY_DSWITCH_LAST               =  $11F;
  278.   // IME private hot key from 0x200 - 0x21F
  279. const
  280.   IME_HOTKEY_PRIVATE_FIRST              =  $200;
  281.   IME_ITHOTKEY_RESEND_RESULTSTR         =  $200;
  282.   IME_ITHOTKEY_PREVIOUS_COMPOSITION     =  $201;
  283.   IME_ITHOTKEY_UISTYLE_TOGGLE           =  $202;
  284.   IME_ITHOTKEY_RECONVERTSTRING          =  $203;
  285.   IME_HOTKEY_PRIVATE_LAST               =  $21F;
  286.   // parameter of ImmGetCompositionString
  287. const
  288.   GCS_COMPREADSTR               =  $0001;
  289.   GCS_COMPREADATTR              =  $0002;
  290.   GCS_COMPREADCLAUSE            =  $0004;
  291.   GCS_COMPSTR                   =  $0008;
  292.   GCS_COMPATTR                  =  $0010;
  293.   GCS_COMPCLAUSE                =  $0020;
  294.   GCS_CURSORPOS                 =  $0080;
  295.   GCS_DELTASTART                =  $0100;
  296.   GCS_RESULTREADSTR             =  $0200;
  297.   GCS_RESULTREADCLAUSE          =  $0400;
  298.   GCS_RESULTSTR                 =  $0800;
  299.   GCS_RESULTCLAUSE              =  $1000;
  300.   // style bit flags for WM_IME_COMPOSITION
  301. const
  302.   CS_INSERTCHAR                 =  $2000;
  303.   CS_NOMOVECARET                =  $4000;
  304.   // IME version constants
  305. const
  306.   IMEVER_0310                   =  $0003000A;
  307.   IMEVER_0400                   =  $00040000;
  308.   // IME property bits
  309. const
  310.   IME_PROP_AT_CARET             =  $00010000;
  311.   IME_PROP_SPECIAL_UI           =  $00020000;
  312.   IME_PROP_CANDLIST_START_FROM_1=  $00040000;
  313.   IME_PROP_UNICODE              =  $00080000;
  314.   IME_PROP_COMPLETE_ON_UNSELECT =  $00100000;
  315.   // IME UICapability bits
  316. const
  317.   UI_CAP_2700                   =  $00000001;
  318.   UI_CAP_ROT90                  =  $00000002;
  319.   UI_CAP_ROTANY                 =  $00000004;
  320.   // ImmSetCompositionString Capability bits
  321. const
  322.   SCS_CAP_COMPSTR               =  $00000001;
  323.   SCS_CAP_MAKEREAD              =  $00000002;
  324.   SCS_CAP_SETRECONVERTSTRING    =  $00000004;
  325.   // IME WM_IME_SELECT inheritance Capability bits
  326. const
  327.   SELECT_CAP_CONVERSION         =  $00000001;
  328.   SELECT_CAP_SENTENCE           =  $00000002;
  329.   // ID for deIndex of ImmGetGuideLine
  330. const
  331.   GGL_LEVEL                     =  $00000001;
  332.   GGL_INDEX                     =  $00000002;
  333.   GGL_STRING                    =  $00000003;
  334.   GGL_PRIVATE                   =  $00000004;
  335.   // ID for dwLevel of GUIDELINE Structure
  336. const
  337.   GL_LEVEL_NOGUIDELINE          =  $00000000;
  338.   GL_LEVEL_FATAL                =  $00000001;
  339.   GL_LEVEL_ERROR                =  $00000002;
  340.   GL_LEVEL_WARNING              =  $00000003;
  341.   GL_LEVEL_INFORMATION          =  $00000004;
  342.   // ID for dwIndex of GUIDELINE Structure
  343. const
  344.   GL_ID_UNKNOWN                 =  $00000000;
  345.   GL_ID_NOMODULE                =  $00000001;
  346.   GL_ID_NODICTIONARY            =  $00000010;
  347.   GL_ID_CANNOTSAVE              =  $00000011;
  348.   GL_ID_NOCONVERT               =  $00000020;
  349.   GL_ID_TYPINGERROR             =  $00000021;
  350.   GL_ID_TOOMANYSTROKE           =  $00000022;
  351.   GL_ID_READINGCONFLICT         =  $00000023;
  352.   GL_ID_INPUTREADING            =  $00000024;
  353.   GL_ID_INPUTRADICAL            =  $00000025;
  354.   GL_ID_INPUTCODE               =  $00000026;
  355.   GL_ID_INPUTSYMBOL             =  $00000027;
  356.   GL_ID_CHOOSECANDIDATE         =  $00000028;
  357.   GL_ID_REVERSECONVERSION       =  $00000029;
  358.   GL_ID_PRIVATE_FIRST           =  $00008000;
  359.   GL_ID_PRIVATE_LAST            =  $0000FFFF;
  360.   // ID for dwIndex of ImmGetProperty
  361. const
  362.   IGP_GETIMEVERSION             =  DWORD(-4);
  363.   IGP_PROPERTY                  =  $00000004;
  364.   IGP_CONVERSION                =  $00000008;
  365.   IGP_SENTENCE                  =  $0000000c;
  366.   IGP_UI                        =  $00000010;
  367.   IGP_SETCOMPSTR                =  $00000014;
  368.   IGP_SELECT                    =  $00000018;
  369.   // dwIndex for ImmSetCompositionString API
  370. const
  371.   SCS_SETSTR                    =  GCS_COMPREADSTR or GCS_COMPSTR;
  372.   SCS_CHANGEATTR                =  GCS_COMPREADATTR or GCS_COMPATTR;
  373.   SCS_CHANGECLAUSE              =  GCS_COMPREADCLAUSE or GCS_COMPCLAUSE;
  374.   SCS_SETRECONVERTSTRING        =  $00010000;
  375.   SCS_QUERYRECONVERTSTRING      =  $00020000;
  376.   // attribute for COMPOSITIONSTRING Structure
  377. const
  378.   ATTR_INPUT                    =  $00;
  379.   ATTR_TARGET_CONVERTED         =  $01;
  380.   ATTR_CONVERTED                =  $02;
  381.   ATTR_TARGET_NOTCONVERTED      =  $03;
  382.   ATTR_INPUT_ERROR              =  $04;
  383.   ATTR_FIXEDCONVERTED           =  $05;
  384.   // bit field for IMC_SETCOMPOSITIONWINDOW, IMC_SETCANDIDATEWINDOW
  385. const
  386.   CFS_DEFAULT                   =  $0000;
  387.   CFS_RECT                      =  $0001;
  388.   CFS_POINT                     =  $0002;
  389.   CFS_FORCE_POSITION            =  $0020;
  390.   CFS_CANDIDATEPOS              =  $0040;
  391.   CFS_EXCLUDE                   =  $0080;
  392.   // conversion direction for ImmGetConversionList
  393. const
  394.   GCL_CONVERSION                =  $0001;
  395.   GCL_REVERSECONVERSION         =  $0002;
  396.   GCL_REVERSE_LENGTH            =  $0003;
  397.   // bit field for conversion mode
  398. const
  399.   IME_CMODE_ALPHANUMERIC        =  $0000;
  400.   IME_CMODE_NATIVE              =  $0001;
  401.   IME_CMODE_CHINESE             =  IME_CMODE_NATIVE;
  402.   IME_CMODE_HANGEUL             =  IME_CMODE_NATIVE;
  403.   IME_CMODE_HANGUL              =  IME_CMODE_NATIVE;
  404.   IME_CMODE_JAPANESE            =  IME_CMODE_NATIVE;
  405.   IME_CMODE_KATAKANA            =  $0002;  // only effect under IME_CMODE_NATIVE
  406.   IME_CMODE_LANGUAGE            =  $0003;
  407.   IME_CMODE_FULLSHAPE           =  $0008;
  408.   IME_CMODE_ROMAN               =  $0010;
  409.   IME_CMODE_CHARCODE            =  $0020;
  410.   IME_CMODE_HANJACONVERT        =  $0040;
  411.   IME_CMODE_SOFTKBD             =  $0080;
  412.   IME_CMODE_NOCONVERSION        =  $0100;
  413.   IME_CMODE_EUDC                =  $0200;
  414.   IME_CMODE_SYMBOL              =  $0400;
  415.   IME_CMODE_FIXED               =  $0800;
  416.   // bit field for sentence mode
  417. const
  418.   IME_SMODE_NONE                =  $0000;
  419.   IME_SMODE_PLAURALCLAUSE       =  $0001;
  420.   IME_SMODE_SINGLECONVERT       =  $0002;
  421.   IME_SMODE_AUTOMATIC           =  $0004;
  422.   IME_SMODE_PHRASEPREDICT       =  $0008;
  423.   IME_SMODE_CONVERSATION        =  $0010;
  424.   // style of candidate
  425. const
  426.   IME_CAND_UNKNOWN              =  $0000;
  427.   IME_CAND_READ                 =  $0001;
  428.   IME_CAND_CODE                 =  $0002;
  429.   IME_CAND_MEANING              =  $0003;
  430.   IME_CAND_RADICAL              =  $0004;
  431.   IME_CAND_STROKE               =  $0005;
  432.   // wParam of report message WM_IME_NOTIFY
  433. const
  434.   IMN_CLOSESTATUSWINDOW         =  $0001;
  435.   IMN_OPENSTATUSWINDOW          =  $0002;
  436.   IMN_CHANGECANDIDATE           =  $0003;
  437.   IMN_CLOSECANDIDATE            =  $0004;
  438.   IMN_OPENCANDIDATE             =  $0005;
  439.   IMN_SETCONVERSIONMODE         =  $0006;
  440.   IMN_SETSENTENCEMODE           =  $0007;
  441.   IMN_SETOPENSTATUS             =  $0008;
  442.   IMN_SETCANDIDATEPOS           =  $0009;
  443.   IMN_SETCOMPOSITIONFONT        =  $000A;
  444.   IMN_SETCOMPOSITIONWINDOW      =  $000B;
  445.   IMN_SETSTATUSWINDOWPOS        =  $000C;
  446.   IMN_GUIDELINE                 =  $000D;
  447.   IMN_PRIVATE                   =  $000E;
  448.   // wParam of report message WM_IME_REQUEST
  449. const
  450.   IMR_COMPOSITIONWINDOW         =  $0001;
  451.   IMR_CANDIDATEWINDOW           =  $0002;
  452.   IMR_COMPOSITIONFONT           =  $0003;
  453.   IMR_RECONVERTSTRING           =  $0004;
  454.   IMR_CONFIRMRECONVERTSTRING    =  $0005;
  455.   IMR_QUERYCHARPOSITION         =  $0006;
  456.   IMR_DOCUMENTFEED              =  $0007;
  457.   // error code of ImmGetCompositionString
  458. const
  459.   IMM_ERROR_NODATA              =  -1;
  460.   IMM_ERROR_GENERAL             =  -2;
  461.   // dialog mode of ImmConfigureIME
  462. const
  463.   IME_CONFIG_GENERAL            =  1;
  464.   IME_CONFIG_REGISTERWORD       =  2;
  465.   IME_CONFIG_SELECTDICTIONARY   =  3;
  466.   // flags for ImmEscape
  467. const
  468.   IME_ESC_QUERY_SUPPORT         =  $0003;
  469.   IME_ESC_RESERVED_FIRST        =  $0004;
  470.   IME_ESC_RESERVED_LAST         =  $07FF;
  471.   IME_ESC_PRIVATE_FIRST         =  $0800;
  472.   IME_ESC_PRIVATE_LAST          =  $0FFF;
  473.   IME_ESC_SEQUENCE_TO_INTERNAL  =  $1001;
  474.   IME_ESC_GET_EUDC_DICTIONARY   =  $1003;
  475.   IME_ESC_SET_EUDC_DICTIONARY   =  $1004;
  476.   IME_ESC_MAX_KEY               =  $1005;
  477.   IME_ESC_IME_NAME              =  $1006;
  478.   IME_ESC_SYNC_HOTKEY           =  $1007;
  479.   IME_ESC_HANJA_MODE            =  $1008;
  480.   IME_ESC_AUTOMATA              =  $1009;
  481.   IME_ESC_PRIVATE_HOTKEY        =  $100a;
  482.   IME_ESC_GETHELPFILENAME       =  $100b;
  483.   // style of word registration
  484. const
  485.   IME_REGWORD_STYLE_EUDC        =  $00000001;
  486.   IME_REGWORD_STYLE_USER_FIRST  =  $80000000;
  487.   IME_REGWORD_STYLE_USER_LAST   =  $FFFFFFFF;
  488.   // dwFlags for ImmAssociateContextEx
  489. const
  490.   IACE_CHILDREN                 =  $0001;
  491.   IACE_DEFAULT                  =  $0010;
  492.   IACE_IGNORENOCONTEXT          =  $0020;
  493.   // dwFlags for ImmGetImeMenuItems
  494. const
  495.   IGIMIF_RIGHTMENU              =  $0001;
  496.   // dwType for ImmGetImeMenuItems
  497. const
  498.   IGIMII_CMODE                  =  $0001;
  499.   IGIMII_SMODE                  =  $0002;
  500.   IGIMII_CONFIGURE              =  $0004;
  501.   IGIMII_TOOLS                  =  $0008;
  502.   IGIMII_HELP                   =  $0010;
  503.   IGIMII_OTHER                  =  $0020;
  504.   IGIMII_INPUTTOOLS             =  $0040;
  505.   // fType of IMEMENUITEMINFO structure
  506. const
  507.   IMFT_RADIOCHECK   =  $00001;
  508.   IMFT_SEPARATOR    =  $00002;
  509.   IMFT_SUBMENU      =  $00004;
  510.   // fState of IMEMENUITEMINFO structure
  511. const
  512.   IMFS_GRAYED       =  MFS_GRAYED;
  513.   IMFS_DISABLED     =  MFS_DISABLED;
  514.   IMFS_CHECKED      =  MFS_CHECKED;
  515.   IMFS_HILITE       =  MFS_HILITE;
  516.   IMFS_ENABLED      =  MFS_ENABLED;
  517.   IMFS_UNCHECKED    =  MFS_UNCHECKED;
  518.   IMFS_UNHILITE     =  MFS_UNHILITE;
  519.   IMFS_DEFAULT      =  MFS_DEFAULT;
  520.   // type of soft keyboard
  521. const
  522.   SOFTKEYBOARD_TYPE_T1   = $0001;  // for Windows Tranditional Chinese Edition
  523.   SOFTKEYBOARD_TYPE_C1   = $0002;  // for Windows Simplified Chinese Edition
  524. type
  525.   PCompositionString = ^TCompositionString;
  526.   TCompositionString = record
  527.     dwSize: DWord;
  528.     dwCompReadAttrLen: DWord;
  529.     dwCompReadAttrOffset: DWord;
  530.     dwCompReadClauseLen: DWord;
  531.     dwCompReadClauseOffset: DWord;
  532.     dwCompReadStrLen: DWord;
  533.     dwCompReadStrOffset: DWord;
  534.     dwCompAttrLen: DWord;
  535.     dwCompAttrOffset: DWord;
  536.     dwCompClauseLen: DWord;
  537.     dwCompClauseOffset: DWord;
  538.     dwCompStrLen: DWord;
  539.     dwCompStrOffset: DWord;
  540.     dwCursorPos: DWord;
  541.     dwDeltaStart: DWord;
  542.     dwResultReadClauseLen: DWord;
  543.     dwResultReadClauseOffset: DWord;
  544.     dwResultReadStrLen: DWord;
  545.     dwResultReadStrOffset: DWord;
  546.     dwResultClauseLen: DWord;
  547.     dwResultClauseOffset: DWord;
  548.     dwResultStrLen: DWord;
  549.     dwResultStrOffset: DWord;
  550.     dwPrivateSize: DWord;
  551.     dwPrivateOffset: DWord;
  552.   end;
  553. type
  554.   PGuideLine = ^TGuideLine;
  555.   TGuideLine = record
  556.     dwSize: DWord;
  557.     dwLevel: DWord;
  558.     dwIndex: DWord;
  559.     dwStrLen: DWord;
  560.     dwStrOffset: DWord;
  561.     dwPrivateSize: DWord;
  562.     dwPrivateOffset: DWord;
  563.   end;
  564. type
  565.   PTransMsg = ^TTransMsg;
  566.   TTransMsg = record
  567.     message: uInt;
  568.     wParam: WParam;
  569.     lParam: LParam;
  570.   end;
  571.   PTransMsgList = ^TTransMsgList;
  572.   TTransMsgList = record
  573.     uMsgCount: uInt;
  574.     TransMsg: array[0..0] of TTransMsg;
  575.   end;
  576. type
  577.   PCandidateInfo = ^TCandidateInfo;
  578.   TCandidateInfo = record
  579.     dwSize: DWord;
  580.     dwCount: DWord;
  581.     dwOffset: array[0..31] of DWord;
  582.     dwPrivateSize: DWord;
  583.     dwPrivateOffset: DWord;
  584.   end;
  585. type
  586.   PInputContext = ^TInputContext;
  587.   TInputContext = record
  588.     hWnd: HWnd;
  589.     fOpen: Bool;
  590.     ptStatusWndPos: TPoint;
  591.     ptSoftKbdPos: TPoint;
  592.     fdwConversion: DWord;
  593.     fdwSentence: DWord;
  594.     lfFont: record
  595.       case Integer of
  596.         0: (A: TLogFontA);
  597.         1: (W: TLogFontW);
  598.     end;
  599.     cfCompForm: TCompositionForm;
  600.     cfCandForm: array[0..3] of TCandidateForm;
  601.     hCompStr: HImcc;
  602.     hCandInfo: HImcc;
  603.     hGuideLine: HImcc;
  604.     hPrivate: HImcc;
  605.     dwNumMsgBuf: DWord;
  606.     hMsgBuf: HImcc;
  607.     fdwInit: DWord;
  608.     dwReserve: array[0..2] of DWord;
  609.   end;
  610. type
  611.   PImeInfo = ^TImeInfo;
  612.   TImeInfo = record
  613.     dwPrivateDataSize: DWord;
  614.     fdwProperty: DWord;
  615.     fdwConversionCaps: DWord;
  616.     fdwSentenceCaps: DWord;
  617.     fdwUICaps: DWord;
  618.     fdwSCSCaps: DWord;
  619.     fdwSelectCaps: DWord;
  620.   end;
  621. type
  622.   PSoftKbdData = ^TSoftKbdData;
  623.   TSoftKbdData = record
  624.     uCount: UInt;
  625.     wCode: array[0..0, 0..255] of Word;
  626.   end;
  627. function ImmGetHotKey(dwHotKeyID: DWord; lpuModifiers, lpuVKey: PUInt; lphKL: PHKL): Bool; stdcall;
  628. function ImmSetHotKey(dwHotKeyID: DWord; uModifiers, uVKey: UInt; hKL: HKL): Bool; stdcall;
  629. function ImmGenerateMessage(hIMC: HImc): Bool; stdcall;
  630. function ImmRequestMessage(hImc: HImc; wParam: WParam; lParam: LParam): LResult; stdcall;
  631. function ImmRequestMessageA(hImc: HImc; wParam: WParam; lParam: LParam): LResult; stdcall;
  632. function ImmRequestMessageW(hImc: HImc; wParam: WParam; lParam: LParam): LResult; stdcall;
  633.   // Prototype of soft keyboard APIs ..
  634. function ImmCreateSoftKeyboard(uType: UInt; hOwner: HWnd; x, y: Integer): HWnd; stdcall;
  635. function ImmDestroySoftKeyboard(hSoftKbdWnd: HWnd): Bool; stdcall;
  636. function ImmShowSoftKeyboard(hSoftKbdWnd: HWnd; nCmdShow: Integer): Bool; stdcall;
  637. function ImmLockIMC(hIMC: HImc): PInputContext; stdcall;
  638. function ImmUnlockIMC(hIMC: HImc): Bool; stdcall;
  639. function ImmGetIMCLockCount(hIMC: HImc): DWord; stdcall;
  640. function ImmCreateIMCC(dwSize: DWord): HImcc; stdcall;
  641. function ImmDestroyIMCC(hIMCC: HImcc): HImcc; stdcall;
  642. function ImmLockIMCC(hIMCC: HImcc): Pointer; stdcall;
  643. function ImmUnlockIMCC(hIMCC: HImcc): Bool; stdcall;
  644. function ImmGetIMCCLockCount(hImcc: HImcc): DWord; stdcall;
  645. function ImmReSizeIMCC(hIMCC: HImcc; dwSize: DWord): HImcc; stdcall;
  646. function ImmGetIMCCSize(hIMCC: HImcc): DWord; stdcall;
  647.   // the window extra offset
  648. const
  649.   IMMGWL_IMC                    =  0;
  650.   IMMGWL_PRIVATE                =  SizeOf(Cardinal);
  651.   IMMGWLP_IMC                   =  0;
  652.   IMMGWLP_PRIVATE               =  SizeOf(Cardinal);
  653.   // for NI_CONTEXTUPDATED
  654. const
  655.   IMC_SETCONVERSIONMODE         =  $0002;
  656.   IMC_SETSENTENCEMODE           =  $0004;
  657.   IMC_SETOPENSTATUS             =  $0006;
  658.   // wParam for WM_IME_CONTROL to the soft keyboard
  659. const
  660.   IMC_GETSOFTKBDFONT            =  $0011;
  661.   IMC_SETSOFTKBDFONT            =  $0012;
  662.   IMC_GETSOFTKBDPOS             =  $0013;
  663.   IMC_SETSOFTKBDPOS             =  $0014;
  664.   IMC_GETSOFTKBDSUBTYPE         =  $0015;
  665.   IMC_SETSOFTKBDSUBTYPE         =  $0016;
  666.   IMC_SETSOFTKBDDATA            =  $0018;
  667.   // dwAction for ImmNotifyIME
  668. const
  669.   NI_CONTEXTUPDATED             =  $0003;
  670.   // dwSystemInfoFlags bits
  671. const
  672.   IME_SYSINFO_WINLOGON          =  $0001;
  673.   IME_SYSINFO_WOW16             =  $0002;
  674.   // parameter of ImmGetCompositionString, **
  675. const
  676.   GCS_COMP                      =  GCS_COMPSTR or GCS_COMPATTR or GCS_COMPCLAUSE;
  677.   GCS_COMPREAD                  =  GCS_COMPREADSTR or GCS_COMPREADATTR or GCS_COMPREADCLAUSE;
  678.   GCS_RESULT                    =  GCS_RESULTSTR or GCS_RESULTCLAUSE;
  679.   GCS_RESULTREAD                =  GCS_RESULTREADSTR or GCS_RESULTREADCLAUSE;
  680.   // bits of fdwInit of INPUTCONTEXT
  681. const
  682.   INIT_STATUSWNDPOS             =  $00000001;
  683.   INIT_CONVERSION               =  $00000002;
  684.   INIT_SENTENCE                 =  $00000004;
  685.   INIT_LOGFONT                  =  $00000008;
  686.   INIT_COMPFORM                 =  $00000010;
  687.   INIT_SOFTKBDPOS               =  $00000020;
  688.   // IME property bits
  689. const
  690.   IME_PROP_END_UNLOAD           =  $00000001;
  691.   IME_PROP_KBD_CHAR_FIRST       =  $00000002;
  692.   IME_PROP_IGNORE_UPKEYS        =  $00000004;
  693.   IME_PROP_NEED_ALTKEY          =  $00000008;
  694.   IME_PROP_NO_KEYS_ON_CLOSE     =  $00000010;
  695.   IME_PROP_ACCEPT_WIDE_VKEY     =  $00000020;
  696.   // IME UICapability bits
  697. const
  698.   UI_CAP_SOFTKBD                =  $00010000;
  699. const
  700.   IMN_SOFTKBDDESTROYED          =  $0011;
  701.   // flags for ImmEscape
  702. const
  703.   IME_ESC_PENAUXDATA            =  $100c;
  704.   // Pen Input support
  705. type
  706.   PImePenData = ^TImePenData;
  707.   TImePenData = record
  708.     dwVersion: DWord;
  709.     dwFlags: DWord;
  710.     dwCount: DWord;
  711.     lpExtraInfo: Pointer;
  712.     ulReserve: uLong;
  713.     wd: record
  714.       lpSymbol: PDWord;
  715.       lpSkip: PWord;
  716.       lpScore: PWord;
  717.     end;
  718.   end;
  719. const
  720.   IME_PEN_SYMBOL                =  $00000010;
  721.   IME_PEN_SKIP                  =  $00000020;
  722.   IME_PEN_SCORE                 =  $00000040;
  723. implementation
  724. const Imm32 = 'Imm32.dll';
  725. function ImmInstallIME; external Imm32 name 'ImmInstallIMEA';
  726. function ImmInstallIMEA; external Imm32 name 'ImmInstallIMEA';
  727. function ImmInstallIMEW; external Imm32 name 'ImmInstallIMEW';
  728. function ImmGetDefaultIMEWnd; external Imm32 name 'ImmGetDefaultIMEWnd';
  729. function ImmGetDescription; external Imm32 name 'ImmGetDescriptionA';
  730. function ImmGetDescriptionA; external Imm32 name 'ImmGetDescriptionA';
  731. function ImmGetDescriptionW; external Imm32 name 'ImmGetDescriptionW';
  732. function ImmGetIMEFileName; external Imm32 name 'ImmGetIMEFileNameA';
  733. function ImmGetIMEFileNameA; external Imm32 name 'ImmGetIMEFileNameA';
  734. function ImmGetIMEFileNameW; external Imm32 name 'ImmGetIMEFileNameW';
  735. function ImmGetProperty; external Imm32 name 'ImmGetProperty';
  736. function ImmIsIME; external Imm32 name 'ImmIsIME';
  737. function ImmSimulateHotKey; external Imm32 name 'ImmSimulateHotKey';
  738. function ImmCreateContext; external Imm32 name 'ImmCreateContext';
  739. function ImmDestroyContext; external Imm32 name 'ImmDestroyContext';
  740. function ImmGetContext; external Imm32 name 'ImmGetContext';
  741. function ImmReleaseContext; external Imm32 name 'ImmReleaseContext';
  742. function ImmAssociateContext; external Imm32 name 'ImmAssociateContext';
  743. function ImmAssociateContextEx; external Imm32 name 'ImmAssociateContextEx';
  744. function ImmGetCompositionString; external Imm32 name 'ImmGetCompositionStringA';
  745. function ImmGetCompositionStringA; external Imm32 name 'ImmGetCompositionStringA';
  746. function ImmGetCompositionStringW; external Imm32 name 'ImmGetCompositionStringW';
  747. function ImmSetCompositionString; external Imm32 name 'ImmSetCompositionStringA';
  748. function ImmSetCompositionStringA; external Imm32 name 'ImmSetCompositionStringA';
  749. function ImmSetCompositionStringW; external Imm32 name 'ImmSetCompositionStringW';
  750. function ImmGetCandidateListCount; external Imm32 name 'ImmGetCandidateListCountA';
  751. function ImmGetCandidateListCountA; external Imm32 name 'ImmGetCandidateListCountA';
  752. function ImmGetCandidateListCountW; external Imm32 name 'ImmGetCandidateListCountW';
  753. function ImmGetCandidateList; external Imm32 name 'ImmGetCandidateListA';
  754. function ImmGetCandidateListA; external Imm32 name 'ImmGetCandidateListA';
  755. function ImmGetCandidateListW; external Imm32 name 'ImmGetCandidateListW';
  756. function ImmGetGuideLine; external Imm32 name 'ImmGetGuideLineA';
  757. function ImmGetGuideLineA; external Imm32 name 'ImmGetGuideLineA';
  758. function ImmGetGuideLineW; external Imm32 name 'ImmGetGuideLineW';
  759. function ImmGetConversionStatus; external Imm32 name 'ImmGetConversionStatus';
  760. function ImmSetConversionStatus; external Imm32 name 'ImmSetConversionStatus';
  761. function ImmGetOpenStatus; external Imm32 name 'ImmGetOpenStatus';
  762. function ImmSetOpenStatus; external Imm32 name 'ImmSetOpenStatus';
  763. function ImmGetCompositionFont; external Imm32 name 'ImmGetCompositionFontA';
  764. function ImmGetCompositionFontA; external Imm32 name 'ImmGetCompositionFontA';
  765. function ImmGetCompositionFontW; external Imm32 name 'ImmGetCompositionFontW';
  766. function ImmSetCompositionFont; external Imm32 name 'ImmSetCompositionFontA';
  767. function ImmSetCompositionFontA; external Imm32 name 'ImmSetCompositionFontA';
  768. function ImmSetCompositionFontW; external Imm32 name 'ImmSetCompositionFontW';
  769. function ImmConfigureIME; external Imm32 name 'ImmConfigureIMEA';
  770. function ImmConfigureIMEA; external Imm32 name 'ImmConfigureIMEA';
  771. function ImmConfigureIMEW; external Imm32 name 'ImmConfigureIMEW';
  772. function ImmEscape; external Imm32 name 'ImmEscapeA';
  773. function ImmEscapeA; external Imm32 name 'ImmEscapeA';
  774. function ImmEscapeW; external Imm32 name 'ImmEscapeW';
  775. function ImmGetConversionList; external Imm32 name 'ImmGetConversionListA';
  776. function ImmGetConversionListA; external Imm32 name 'ImmGetConversionListA';
  777. function ImmGetConversionListW; external Imm32 name 'ImmGetConversionListW';
  778. function ImmNotifyIME; external Imm32 name 'ImmNotifyIME';
  779. function ImmGetStatusWindowPos; external Imm32 name 'ImmGetStatusWindowPos';
  780. function ImmSetStatusWindowPos; external Imm32 name 'ImmSetStatusWindowPos';
  781. function ImmGetCompositionWindow; external Imm32 name 'ImmGetCompositionWindow';
  782. function ImmSetCompositionWindow; external Imm32 name 'ImmSetCompositionWindow';
  783. function ImmGetCandidateWindow; external Imm32 name 'ImmGetCandidateWindow';
  784. function ImmSetCandidateWindow; external Imm32 name 'ImmSetCandidateWindow';
  785. function ImmIsUIMessage; external Imm32 name 'ImmIsUIMessageA';
  786. function ImmIsUIMessageA; external Imm32 name 'ImmIsUIMessageA';
  787. function ImmIsUIMessageW; external Imm32 name 'ImmIsUIMessageW';
  788. function ImmGetVirtualKey; external Imm32 name 'ImmGetVirtualKey';
  789. function ImmRegisterWord; external Imm32 name 'ImmRegisterWordA';
  790. function ImmRegisterWordA; external Imm32 name 'ImmRegisterWordA';
  791. function ImmRegisterWordW; external Imm32 name 'ImmRegisterWordW';
  792. function ImmUnregisterWord; external Imm32 name 'ImmUnregisterWordA';
  793. function ImmUnregisterWordA; external Imm32 name 'ImmUnregisterWordA';
  794. function ImmUnregisterWordW; external Imm32 name 'ImmUnregisterWordW';
  795. function ImmGetRegisterWordStyle; external Imm32 name 'ImmGetRegisterWordStyleA';
  796. function ImmGetRegisterWordStyleA; external Imm32 name 'ImmGetRegisterWordStyleA';
  797. function ImmGetRegisterWordStyleW; external Imm32 name 'ImmGetRegisterWordStyleW';
  798. function ImmEnumRegisterWord; external Imm32 name 'ImmEnumRegisterWordA';
  799. function ImmEnumRegisterWordA; external Imm32 name 'ImmEnumRegisterWordA';
  800. function ImmEnumRegisterWordW; external Imm32 name 'ImmEnumRegisterWordW';
  801. function ImmDisableIME; external Imm32 name 'ImmDisableIME';
  802. function ImmEnumInputContext; external Imm32 name 'ImmEnumInputContext';
  803. function ImmGetImeMenuItems; external Imm32 name 'ImmGetImeMenuItemsA';
  804. function ImmGetImeMenuItemsA; external Imm32 name 'ImmGetImeMenuItemsA';
  805. function ImmGetImeMenuItemsW; external Imm32 name 'ImmGetImeMenuItemsW';
  806. function ImmGetHotKey; external Imm32 name 'ImmGetHotKey';
  807. function ImmSetHotKey; external Imm32 name 'ImmSetHotKey';
  808. function ImmGenerateMessage; external Imm32 name 'ImmGenerateMessage';
  809. function ImmRequestMessage; external Imm32 name 'ImmRequestMessageA';
  810. function ImmRequestMessageA; external Imm32 name 'ImmRequestMessageA';
  811. function ImmRequestMessageW; external Imm32 name 'ImmRequestMessageW';
  812. function ImmCreateSoftKeyboard; external Imm32 name 'ImmCreateSoftKeyboard';
  813. function ImmDestroySoftKeyboard; external Imm32 name 'ImmDestroySoftKeyboard';
  814. function ImmShowSoftKeyboard; external Imm32 name 'ImmShowSoftKeyboard';
  815. function ImmLockIMC; external Imm32 name 'ImmLockIMC';
  816. function ImmUnlockIMC; external Imm32 name 'ImmUnlockIMC';
  817. function ImmGetIMCLockCount; external Imm32 name 'ImmGetIMCLockCount';
  818. function ImmCreateIMCC; external Imm32 name 'ImmCreateIMCC';
  819. function ImmDestroyIMCC; external Imm32 name 'ImmDestroyIMCC';
  820. function ImmLockIMCC; external Imm32 name 'ImmLockIMCC';
  821. function ImmUnlockIMCC; external Imm32 name 'ImmUnlockIMCC';
  822. function ImmGetIMCCLockCount; external Imm32 name 'ImmGetIMCCLockCount';
  823. function ImmReSizeIMCC; external Imm32 name 'ImmReSizeIMCC';
  824. function ImmGetIMCCSize; external Imm32 name 'ImmGetIMCCSize';
  825. end.