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.

254 lines
5.5 KiB

  1. /****************************** Module Header ******************************\
  2. * Module Name: immstruc.h
  3. *
  4. * Copyright (c) 1985 - 1999, Microsoft Corporation
  5. *
  6. * This header file contains the internal IMM structure definitions
  7. *
  8. * used by both Client and Kernel
  9. *
  10. * History:
  11. * 28-Dec-1995 WKwok Created.
  12. \***************************************************************************/
  13. #ifndef _IMMSTRUC_
  14. #define _IMMSTRUC_
  15. #include <imm.h>
  16. #include <immp.h>
  17. #include <ime.h>
  18. #include <imep.h>
  19. //#include "winnls32.h"
  20. //#include "winnls3p.h"
  21. #define NULL_HIMC (HIMC) 0
  22. #define INVALID_HIMC (HIMC) -1
  23. #define NULL_HIMCC (HIMCC) 0
  24. #define INVALID_HIMCC (HIMCC)-1
  25. /*
  26. * dwFlags for tagIMC.
  27. */
  28. #define IMCF_UNICODE 0x0001
  29. #define IMCF_ACTIVE 0x0002
  30. #define IMCF_CHGMSG 0x0004
  31. #define IMCF_SAVECTRL 0x0008
  32. #define IMCF_PROCESSEVENT 0x0010
  33. #define IMCF_FIRSTSELECT 0x0020
  34. #define IMCF_INDESTROY 0x0040
  35. #define IMCF_WINNLSDISABLE 0x0080
  36. #define IMCF_DEFAULTIMC 0x0100
  37. /*
  38. * dwFlag for ImmGetSaveContext().
  39. */
  40. #define IGSC_DEFIMCFALLBACK 0x0001
  41. #define IGSC_WINNLSCHECK 0x0002
  42. /*
  43. * dwFlag for ImmFreeLayout().
  44. */
  45. #define IFL_DEACTIVATEIME 0x0001
  46. #define IFL_UNLOADIME 0x0002
  47. #define IS_IME_KBDLAYOUT(hkl) ((HIWORD((ULONG_PTR)(hkl)) & 0xf000) == 0xe000)
  48. /*
  49. * Load flag for loading IME.DLL
  50. */
  51. #define IMEF_NONLOAD 0x0000
  52. #define IMEF_LOADERROR 0x0001
  53. #define IMEF_LOADED 0x0002
  54. #define IM_DESC_SIZE 50
  55. #define IM_FILE_SIZE 80
  56. #define IM_OPTIONS_SIZE 30
  57. #define IM_UI_CLASS_SIZE 16
  58. #define IM_USRFONT_SIZE 80
  59. /*
  60. * hotkey related defines that are common both client and kernel side
  61. */
  62. #define MOD_MODIFY_KEYS (MOD_ALT|MOD_CONTROL|MOD_SHIFT|MOD_WIN)
  63. #define MOD_BOTH_SIDES (MOD_LEFT|MOD_RIGHT)
  64. #define ISHK_REMOVE 1
  65. #define ISHK_ADD 2
  66. #define ISHK_INITIALIZE 3
  67. typedef struct _tagIMEHOTKEY {
  68. DWORD dwHotKeyID; // hot key ID
  69. UINT uVKey; // hot key vkey
  70. UINT uModifiers; // combination keys with the vkey
  71. HKL hKL; // target keyboard layout (IME)
  72. } IMEHOTKEY;
  73. typedef IMEHOTKEY *PIMEHOTKEY;
  74. typedef IMEHOTKEY CONST *PCIMEHOTKEY;
  75. typedef struct _tagIMEHOTKEYOBJ {
  76. struct _tagIMEHOTKEYOBJ *pNext;
  77. IMEHOTKEY hk;
  78. } IMEHOTKEYOBJ, *PIMEHOTKEYOBJ;
  79. /*
  80. * Extended IME information.
  81. */
  82. typedef struct tagIMEINFOEX {
  83. HKL hkl;
  84. IMEINFO ImeInfo;
  85. WCHAR wszUIClass[IM_UI_CLASS_SIZE];
  86. DWORD fdwInitConvMode; // Check this later
  87. BOOL fInitOpen; // Check this later
  88. BOOL fLoadFlag;
  89. DWORD dwProdVersion;
  90. DWORD dwImeWinVersion;
  91. WCHAR wszImeDescription[IM_DESC_SIZE];
  92. WCHAR wszImeFile[IM_FILE_SIZE];
  93. } IMEINFOEX, *PIMEINFOEX;
  94. #ifndef W32KAPI
  95. #define W32KAPI DECLSPEC_ADDRSAFE
  96. #endif
  97. /*
  98. * IMM related kernel calls
  99. */
  100. W32KAPI
  101. HIMC
  102. NtUserCreateInputContext(
  103. IN ULONG_PTR dwClientImcData);
  104. W32KAPI
  105. BOOL
  106. NtUserDestroyInputContext(
  107. IN HIMC hImc);
  108. typedef enum _AIC_STATUS {
  109. AIC_SUCCESS,
  110. AIC_FOCUSCONTEXTCHANGED,
  111. AIC_ERROR,
  112. } AIC_STATUS;
  113. W32KAPI
  114. AIC_STATUS
  115. NtUserAssociateInputContext(
  116. IN HWND hwnd,
  117. IN HIMC hImc,
  118. IN DWORD dwFlag);
  119. typedef enum _UPDATEINPUTCONTEXTCLASS {
  120. UpdateClientInputContext,
  121. UpdateInUseImeWindow,
  122. } UPDATEINPUTCONTEXTCLASS;
  123. W32KAPI
  124. BOOL
  125. NtUserUpdateInputContext(
  126. IN HIMC hImc,
  127. IN UPDATEINPUTCONTEXTCLASS UpdateType,
  128. IN ULONG_PTR UpdateValue);
  129. typedef enum _INPUTCONTEXTINFOCLASS {
  130. InputContextProcess,
  131. InputContextThread,
  132. InputContextDefaultImeWindow,
  133. InputContextDefaultInputContext,
  134. } INPUTCONTEXTINFOCLASS;
  135. W32KAPI
  136. ULONG_PTR
  137. NtUserQueryInputContext(
  138. IN HIMC hImc,
  139. IN INPUTCONTEXTINFOCLASS InputContextInfo);
  140. W32KAPI
  141. NTSTATUS
  142. NtUserBuildHimcList(
  143. IN DWORD idThread,
  144. IN UINT cHimcMax,
  145. OUT HIMC *phimcFirst,
  146. OUT PUINT pcHimcNeeded);
  147. typedef enum _IMEINFOEXCLASS {
  148. ImeInfoExKeyboardLayout,
  149. #if defined(CUAS_ENABLE)
  150. ImeInfoExKeyboardLayoutWithCUAS,
  151. #endif
  152. ImeInfoExImeWindow,
  153. ImeInfoExImeFileName,
  154. } IMEINFOEXCLASS;
  155. W32KAPI
  156. BOOL
  157. NtUserGetImeInfoEx(
  158. IN OUT PIMEINFOEX piiex,
  159. IN IMEINFOEXCLASS SearchType);
  160. W32KAPI
  161. BOOL
  162. NtUserSetImeInfoEx(
  163. IN PIMEINFOEX piiex);
  164. W32KAPI
  165. BOOL
  166. NtUserGetImeHotKey(
  167. IN DWORD dwID,
  168. OUT PUINT puModifiers,
  169. OUT PUINT puVKey,
  170. OUT HKL *phkl);
  171. W32KAPI
  172. BOOL
  173. NtUserSetImeHotKey(
  174. IN DWORD dwID,
  175. IN UINT uModifiers,
  176. IN UINT uVKey,
  177. IN HKL hkl,
  178. IN DWORD dwAction);
  179. W32KAPI
  180. DWORD
  181. NtUserCheckImeHotKey(
  182. IN UINT uVKey,
  183. IN LPARAM lParam);
  184. W32KAPI
  185. BOOL
  186. NtUserSetAppImeLevel(
  187. IN HWND hWnd,
  188. IN DWORD dwLevel);
  189. W32KAPI
  190. DWORD
  191. NtUserGetAppImeLevel(
  192. IN HWND hWnd );
  193. W32KAPI
  194. BOOL
  195. NtUserSetImeOwnerWindow(
  196. IN HWND hwndIme,
  197. IN HWND hwndFocus);
  198. W32KAPI
  199. VOID
  200. NtUserSetThreadLayoutHandles(
  201. IN HKL hklNew,
  202. IN HKL hklOld);
  203. W32KAPI
  204. VOID
  205. NtUserNotifyIMEStatus(
  206. IN HWND hwnd,
  207. IN DWORD dwOpenStatus,
  208. IN DWORD dwConversion);
  209. W32KAPI
  210. BOOL
  211. NtUserDisableThreadIme(
  212. IN DWORD dwThreadId);
  213. #endif // _IMMSTRUC_