Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

247 lines
8.7 KiB

  1. /*++
  2. Copyright (c) 1985 - 1999, Microsoft Corporation
  3. Module Name:
  4. delay.h
  5. Abstract:
  6. This file defines the IMM32 Namespace.
  7. Author:
  8. Revision History:
  9. Notes:
  10. --*/
  11. #ifndef _DELAY_H_
  12. #define _DELAY_H_
  13. namespace imm32 {
  14. BOOL FreeLibrary(VOID);
  15. /*
  16. * IMM32 Input Context (hIMC) API Interface.
  17. */
  18. HIMC WINAPI ImmCreateContext(void);
  19. BOOL WINAPI ImmDestroyContext(IN HIMC);
  20. HIMC WINAPI ImmAssociateContext(IN HWND, IN HIMC);
  21. BOOL WINAPI ImmAssociateContextEx(IN HWND, IN HIMC, IN DWORD);
  22. HIMC WINAPI ImmGetContext(IN HWND);
  23. BOOL WINAPI ImmReleaseContext(IN HWND, IN HIMC);
  24. DWORD WINAPI ImmGetIMCLockCount(IN HIMC);
  25. LPINPUTCONTEXT WINAPI ImmLockIMC(IN HIMC);
  26. BOOL WINAPI ImmUnlockIMC(IN HIMC);
  27. /*
  28. * IMM32 Input Context Components (hIMCC) API Interface.
  29. */
  30. HIMCC WINAPI ImmCreateIMCC(IN DWORD);
  31. HIMCC WINAPI ImmDestroyIMCC(IN HIMCC);
  32. DWORD WINAPI ImmGetIMCCSize(IN HIMCC);
  33. HIMCC WINAPI ImmReSizeIMCC(IN HIMCC, IN DWORD);
  34. DWORD WINAPI ImmGetIMCCLockCount(IN HIMCC);
  35. LPVOID WINAPI ImmLockIMCC(IN HIMCC);
  36. BOOL WINAPI ImmUnlockIMCC(IN HIMCC);
  37. /*
  38. * IMM32 Composition String API Interface
  39. */
  40. LONG WINAPI ImmGetCompositionStringA(IN HIMC, IN DWORD, OUT LPVOID, IN DWORD);
  41. LONG WINAPI ImmGetCompositionStringW(IN HIMC, IN DWORD, OUT LPVOID, IN DWORD);
  42. BOOL WINAPI ImmSetCompositionStringA(IN HIMC, IN DWORD dwIndex, IN LPVOID lpComp, IN DWORD, IN LPVOID lpRead, IN DWORD);
  43. BOOL WINAPI ImmSetCompositionStringW(IN HIMC, IN DWORD dwIndex, IN LPVOID lpComp, IN DWORD, IN LPVOID lpRead, IN DWORD);
  44. /*
  45. * IMM32 Composition Font API Interface
  46. */
  47. BOOL WINAPI ImmGetCompositionFontA(IN HIMC, OUT LPLOGFONTA);
  48. BOOL WINAPI ImmGetCompositionFontW(IN HIMC, OUT LPLOGFONTW);
  49. BOOL WINAPI ImmSetCompositionFontA(IN HIMC, IN LPLOGFONTA);
  50. BOOL WINAPI ImmSetCompositionFontW(IN HIMC, IN LPLOGFONTW);
  51. /*
  52. * IMM32 Open Status API Interface
  53. */
  54. BOOL WINAPI ImmGetOpenStatus(IN HIMC);
  55. BOOL WINAPI ImmSetOpenStatus(IN HIMC, IN BOOL);
  56. /*
  57. * IMM32 Conversion Status API Interface
  58. */
  59. BOOL WINAPI ImmGetConversionStatus(IN HIMC, OUT LPDWORD, OUT LPDWORD);
  60. BOOL WINAPI ImmSetConversionStatus(IN HIMC, IN DWORD, IN DWORD);
  61. /*
  62. * IMM32 Status Window Pos API Interface
  63. */
  64. BOOL WINAPI ImmGetStatusWindowPos(IN HIMC, OUT LPPOINT);
  65. BOOL WINAPI ImmSetStatusWindowPos(IN HIMC, IN LPPOINT);
  66. /*
  67. * IMM32 Composition Window API Interface
  68. */
  69. BOOL WINAPI ImmGetCompositionWindow(IN HIMC, OUT LPCOMPOSITIONFORM);
  70. BOOL WINAPI ImmSetCompositionWindow(IN HIMC, IN LPCOMPOSITIONFORM);
  71. /*
  72. * IMM32 Candidate API Interface
  73. */
  74. BOOL WINAPI ImmGetCandidateWindow(IN HIMC, IN DWORD, OUT LPCANDIDATEFORM);
  75. BOOL WINAPI ImmSetCandidateWindow(IN HIMC, IN LPCANDIDATEFORM);
  76. DWORD WINAPI ImmGetCandidateListA(IN HIMC, IN DWORD dwIndex, OUT LPCANDIDATELIST, IN DWORD dwBufLen);
  77. DWORD WINAPI ImmGetCandidateListW(IN HIMC, IN DWORD dwIndex, OUT LPCANDIDATELIST, IN DWORD dwBufLen);
  78. DWORD WINAPI ImmGetCandidateListCountA(IN HIMC, OUT LPDWORD lpdwListCount);
  79. DWORD WINAPI ImmGetCandidateListCountW(IN HIMC, OUT LPDWORD lpdwListCount);
  80. /*
  81. * IMM32 Generate Message API Interface
  82. */
  83. BOOL WINAPI ImmGenerateMessage(IN HIMC);
  84. /*
  85. * IMM32 Notify IME API Interface
  86. */
  87. BOOL WINAPI ImmNotifyIME(IN HIMC, IN DWORD dwAction, IN DWORD dwIndex, IN DWORD dwValue);
  88. /*
  89. * IMM32 Guide Line IME API Interface
  90. */
  91. DWORD WINAPI ImmGetGuideLineA(IN HIMC, IN DWORD dwIndex, OUT LPSTR, IN DWORD dwBufLen);
  92. DWORD WINAPI ImmGetGuideLineW(IN HIMC, IN DWORD dwIndex, OUT LPWSTR, IN DWORD dwBufLen);
  93. /*
  94. * IMM32 Menu items API Interface
  95. */
  96. DWORD WINAPI ImmGetImeMenuItemsA(IN HIMC, IN DWORD, IN DWORD, OUT LPIMEMENUITEMINFOA, OUT LPIMEMENUITEMINFOA, IN DWORD);
  97. DWORD WINAPI ImmGetImeMenuItemsW(IN HIMC, IN DWORD, IN DWORD, OUT LPIMEMENUITEMINFOW, OUT LPIMEMENUITEMINFOW, IN DWORD);
  98. /*
  99. * IMM32 Default IME Window API Interface
  100. */
  101. HWND WINAPI ImmGetDefaultIMEWnd(IN HWND);
  102. UINT WINAPI ImmGetVirtualKey(IN HWND);
  103. /*
  104. * IMM32 UI message API Interface
  105. */
  106. BOOL WINAPI ImmIsUIMessageA(HWND hWnd, UINT u, WPARAM wParam, LPARAM lParam);
  107. BOOL WINAPI ImmIsUIMessageW(HWND hWnd, UINT u, WPARAM wParam, LPARAM lParam);
  108. /*
  109. * IMM32 Simulate hotkey API Interface
  110. */
  111. BOOL WINAPI ImmSimulateHotKey(HWND hWnd, DWORD dwHotKeyID);
  112. BOOL WINAPI ImmGetHotKey(DWORD dwHotKeyId, LPUINT lpuModifiers, LPUINT lpuVKey, LPHKL lphKL);
  113. BOOL WINAPI ImmSetHotKey(DWORD dwHotKeyId, UINT uModifiers, UINT uVKey, HKL hKL);
  114. /*
  115. * IMM32 Property API Interface
  116. */
  117. DWORD WINAPI ImmGetProperty(IN HKL, IN DWORD);
  118. /*
  119. * IMM32 Description API Interface
  120. */
  121. UINT WINAPI ImmGetDescriptionA(IN HKL, OUT LPSTR, IN UINT uBufLen);
  122. UINT WINAPI ImmGetDescriptionW(IN HKL, OUT LPWSTR, IN UINT uBufLen);
  123. UINT WINAPI ImmGetIMEFileNameA(HKL hKL, LPSTR lpszFileName, UINT uBufLen);
  124. UINT WINAPI ImmGetIMEFileNameW(HKL hKL, LPWSTR lpszFileName, UINT uBufLen);
  125. /*
  126. * IMM32 Conversion List API Interface
  127. */
  128. DWORD WINAPI ImmGetConversionListA(HKL hKL, HIMC hIMC, LPCSTR psz, LPCANDIDATELIST pCL, DWORD dwBufLen, UINT uFlag);
  129. DWORD WINAPI ImmGetConversionListW(HKL hKL, HIMC hIMC, LPCWSTR psz, LPCANDIDATELIST pCL, DWORD dwBufLen, UINT uFlag);
  130. /*
  131. * IMM32 IsIME API Interface
  132. */
  133. BOOL WINAPI ImmIsIME(HKL hKL);
  134. /*
  135. * IMM32 Escape API Interface
  136. */
  137. LRESULT WINAPI ImmEscapeA(IN HKL, IN HIMC, IN UINT, IN LPVOID);
  138. LRESULT WINAPI ImmEscapeW(IN HKL, IN HIMC, IN UINT, IN LPVOID);
  139. /*
  140. * IMM32 Configure IME Interface
  141. */
  142. BOOL WINAPI ImmConfigureIMEA(HKL hKL, HWND hWnd, DWORD dw, LPVOID pv);
  143. BOOL WINAPI ImmConfigureIMEW(HKL hKL, HWND hWnd, DWORD dw, LPVOID pv);
  144. /*
  145. * IMM32 Register Word IME Interface
  146. */
  147. BOOL WINAPI ImmRegisterWordA(HKL hKL, LPCSTR lpszReading, DWORD dw, LPCSTR lpszRegister);
  148. BOOL WINAPI ImmRegisterWordW(HKL hKL, LPCWSTR lpszReading, DWORD dw, LPCWSTR lpszRegister);
  149. BOOL WINAPI ImmUnregisterWordA(HKL hKL, LPCSTR lpszReading, DWORD dw, LPCSTR lpszUnregister);
  150. BOOL WINAPI ImmUnregisterWordW(HKL hKL, LPCWSTR lpszReading, DWORD dw, LPCWSTR lpszUnregister);
  151. UINT WINAPI ImmGetRegisterWordStyleA(HKL hKL, UINT nItem, LPSTYLEBUFA lpStyleBuf);
  152. UINT WINAPI ImmGetRegisterWordStyleW(HKL hKL, UINT nItem, LPSTYLEBUFW lpStyleBuf);
  153. /*
  154. * IMM32 soft kbd API
  155. */
  156. HWND WINAPI ImmCreateSoftKeyboard(UINT uType, HWND hOwner, int x, int y);
  157. BOOL WINAPI ImmDestroySoftKeyboard(HWND hSoftKbdWnd);
  158. BOOL WINAPI ImmShowSoftKeyboard(HWND hSoftKbdWnd, int nCmdShow);
  159. /*
  160. * IMM32 Enumurate Input Context API
  161. */
  162. BOOL WINAPI ImmEnumInputContext(DWORD idThread, IMCENUMPROC lpfn, LPARAM lParam);
  163. /*
  164. * IMM32 win98/nt5 apis
  165. */
  166. BOOL WINAPI ImmDisableIME(DWORD dwId);
  167. LRESULT WINAPI ImmRequestMessageA(HIMC hIMC, WPARAM wParam, LPARAM lParam);
  168. LRESULT WINAPI ImmRequestMessageW(HIMC hIMC, WPARAM wParam, LPARAM lParam);
  169. HKL WINAPI ImmInstallIMEA(IN LPCSTR lpszIMEFileName, IN LPCSTR lpszLayoutText);
  170. HKL WINAPI ImmInstallIMEW(IN LPCWSTR lpszIMEFileName, IN LPCWSTR lpszLayoutText);
  171. }
  172. namespace imm32prev {
  173. BOOL FreeLibrary(VOID);
  174. /*
  175. * IMM32 Private functions.
  176. */
  177. HRESULT WINAPI CtfImmGetGuidAtom(IN HIMC hIMC, IN BYTE bAttr, OUT DWORD* pGuidAtom);
  178. BOOL WINAPI CtfImmIsGuidMapEnable(IN HIMC hIMC);
  179. BOOL WINAPI CtfImmIsCiceroEnabled(VOID);
  180. BOOL WINAPI CtfImmIsCiceroStartedInThread(VOID);
  181. HRESULT WINAPI CtfImmSetCiceroStartInThread(IN BOOL fSet);
  182. UINT WINAPI GetKeyboardLayoutCP(IN HKL hKL);
  183. DWORD WINAPI ImmGetAppCompatFlags(IN HIMC hIMC);
  184. VOID WINAPI CtfImmSetAppCompatFlags(IN DWORD dwFlag);
  185. HRESULT WINAPI CtfAImmActivate(HMODULE* phMod);
  186. HRESULT WINAPI CtfAImmDeactivate(HMODULE hMod);
  187. BOOL WINAPI CtfAImmIsIME(HKL hkl);
  188. }
  189. //
  190. // ole32
  191. //
  192. HRESULT STDAPICALLTYPE Internal_CoCreateInstance(REFCLSID rclsid, LPUNKNOWN pUnkOuter, DWORD dwClsContext, REFIID riid, LPVOID* ppv);
  193. #define CoCreateInstance Internal_CoCreateInstance
  194. LPVOID STDAPICALLTYPE Internal_CoTaskMemAlloc(ULONG cb);
  195. #define CoTaskMemAlloc Internal_CoTaskMemAlloc
  196. LPVOID STDAPICALLTYPE Internal_CoTaskMemRealloc(LPVOID pv, ULONG cb);
  197. #define CoTaskMemRealloc Internal_CoTaskMemRealloc
  198. void STDAPICALLTYPE Internal_CoTaskMemFree(void* pv);
  199. #define CoTaskMemFree Internal_CoTaskMemFree
  200. #endif // _DELAY_H_