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.

239 lines
6.8 KiB

  1. /*++ BUILD Version: 0004 // Increment this if a change has global effects
  2. Copyright (c) Microsoft Corporation. All rights reserved.
  3. Module Name:
  4. ime.h
  5. Abstract:
  6. Procedure declarations, constant definitions and macros for the IME
  7. component.
  8. --*/
  9. #ifndef _IME_
  10. #define _IME_
  11. #ifdef __cplusplus
  12. extern "C" {
  13. #endif /* __cplusplus */
  14. #ifndef _WINDEF_
  15. typedef unsigned int UINT;
  16. #endif // _WINDEF_
  17. #define IME_MAXPROCESS 32
  18. LRESULT WINAPI SendIMEMessageExA( IN HWND, IN LPARAM);
  19. LRESULT WINAPI SendIMEMessageExW( IN HWND, IN LPARAM);
  20. #ifdef UNICODE
  21. #define SendIMEMessageEx SendIMEMessageExW
  22. #else
  23. #define SendIMEMessageEx SendIMEMessageExA
  24. #endif // !UNICODE
  25. //
  26. // IMESTRUCT structure for SendIMEMessageEx
  27. //
  28. typedef struct tagIMESTRUCT {
  29. UINT fnc; // function code
  30. WPARAM wParam; // word parameter
  31. UINT wCount; // word counter
  32. UINT dchSource; // offset to Source from top of memory object
  33. UINT dchDest; // offset to Desrination from top of memory object
  34. LPARAM lParam1;
  35. LPARAM lParam2;
  36. LPARAM lParam3;
  37. } IMESTRUCT,*PIMESTRUCT,NEAR *NPIMESTRUCT,FAR *LPIMESTRUCT;
  38. #define CP_HWND 0
  39. #define CP_OPEN 1
  40. #define CP_DIRECT 2
  41. #define CP_LEVEL 3
  42. //
  43. // Virtual Keys
  44. //
  45. #if !defined(VK_DBE_ALPHANUMERIC)
  46. #define VK_DBE_ALPHANUMERIC 0x0f0
  47. #define VK_DBE_KATAKANA 0x0f1
  48. #define VK_DBE_HIRAGANA 0x0f2
  49. #define VK_DBE_SBCSCHAR 0x0f3
  50. #define VK_DBE_DBCSCHAR 0x0f4
  51. #define VK_DBE_ROMAN 0x0f5
  52. #define VK_DBE_NOROMAN 0x0f6
  53. #define VK_DBE_ENTERWORDREGISTERMODE 0x0f7
  54. #define VK_DBE_ENTERIMECONFIGMODE 0x0f8
  55. #define VK_DBE_FLUSHSTRING 0x0f9
  56. #define VK_DBE_CODEINPUT 0x0fa
  57. #define VK_DBE_NOCODEINPUT 0x0fb
  58. #define VK_DBE_DETERMINESTRING 0x0fc
  59. #define VK_DBE_ENTERDLGCONVERSIONMODE 0x0fd
  60. #endif
  61. //
  62. // switch for wParam of IME_SETCONVERSIONWINDOW
  63. //
  64. #define MCW_DEFAULT 0x00
  65. #define MCW_RECT 0x01
  66. #define MCW_WINDOW 0x02
  67. #define MCW_SCREEN 0x04
  68. #define MCW_VERTICAL 0x08
  69. #define MCW_HIDDEN 0x10
  70. //
  71. // switch for wParam of IME_SETCONVERSIONMODE
  72. // and IME_GETCONVERSIONMODE
  73. //
  74. #define IME_MODE_ALPHANUMERIC 0x0001
  75. #ifdef KOREA // BeomOh - 9/29/92
  76. #define IME_MODE_SBCSCHAR 0x0002
  77. #else
  78. #define IME_MODE_SBCSCHAR 0x0008
  79. #endif
  80. #define IME_MODE_KATAKANA 0x0002
  81. #define IME_MODE_HIRAGANA 0x0004
  82. #define IME_MODE_HANJACONVERT 0x0004
  83. #define IME_MODE_DBCSCHAR 0x0010
  84. #define IME_MODE_ROMAN 0x0020
  85. #define IME_MODE_NOROMAN 0x0040
  86. #define IME_MODE_CODEINPUT 0x0080
  87. #define IME_MODE_NOCODEINPUT 0x0100
  88. //
  89. //
  90. //
  91. // IME APIs
  92. //
  93. #define IME_GETIMECAPS 0x03
  94. #define IME_SETOPEN 0x04
  95. #define IME_GETOPEN 0x05
  96. #define IME_GETVERSION 0x07
  97. #define IME_SETCONVERSIONWINDOW 0x08
  98. #define IME_MOVEIMEWINDOW IME_SETCONVERSIONWINDOW // KOREA only
  99. #define IME_SETCONVERSIONMODE 0x10
  100. #define IME_GETCONVERSIONMODE 0x11
  101. #define IME_SET_MODE 0x12 // KOREA only
  102. #define IME_SENDVKEY 0x13
  103. #define IME_ENTERWORDREGISTERMODE 0x18
  104. #define IME_SETCONVERSIONFONTEX 0x19
  105. //
  106. // IME_CODECONVERT subfunctions
  107. //
  108. #define IME_BANJAtoJUNJA 0x13 // KOREA only
  109. #define IME_JUNJAtoBANJA 0x14 // KOREA only
  110. #define IME_JOHABtoKS 0x15 // KOREA only
  111. #define IME_KStoJOHAB 0x16 // KOREA only
  112. //
  113. // IME_AUTOMATA subfunctions
  114. //
  115. #define IMEA_INIT 0x01 // KOREA only
  116. #define IMEA_NEXT 0x02 // KOREA only
  117. #define IMEA_PREV 0x03 // KOREA only
  118. //
  119. // IME_HANJAMODE subfunctions
  120. //
  121. #define IME_REQUEST_CONVERT 0x01 // KOREA only
  122. #define IME_ENABLE_CONVERT 0x02 // KOREA only
  123. //
  124. // IME_MOVEIMEWINDOW subfunctions
  125. //
  126. #define INTERIM_WINDOW 0x00 // KOREA only
  127. #define MODE_WINDOW 0x01 // KOREA only
  128. #define HANJA_WINDOW 0x02 // KOREA only
  129. //
  130. // error code
  131. //
  132. #define IME_RS_ERROR 0x01 // genetal error
  133. #define IME_RS_NOIME 0x02 // IME is not installed
  134. #define IME_RS_TOOLONG 0x05 // given string is too long
  135. #define IME_RS_ILLEGAL 0x06 // illegal charactor(s) is string
  136. #define IME_RS_NOTFOUND 0x07 // no (more) candidate
  137. #define IME_RS_NOROOM 0x0a // no disk/memory space
  138. #define IME_RS_DISKERROR 0x0e // disk I/O error
  139. #define IME_RS_INVALID 0x11 // Win3.1/NT
  140. #define IME_RS_NEST 0x12 // called nested
  141. #define IME_RS_SYSTEMMODAL 0x13 // called when system mode
  142. //
  143. // report messge from IME to WinApps
  144. //
  145. #define WM_IME_REPORT 0x0280
  146. //
  147. // report message parameter for WM_IME_REPORT
  148. //
  149. #define IR_STRINGSTART 0x100
  150. #define IR_STRINGEND 0x101
  151. #define IR_OPENCONVERT 0x120
  152. #define IR_CHANGECONVERT 0x121
  153. #define IR_CLOSECONVERT 0x122
  154. #define IR_FULLCONVERT 0x123
  155. #define IR_IMESELECT 0x130
  156. #define IR_STRING 0x140
  157. #define IR_DBCSCHAR 0x160
  158. #define IR_UNDETERMINE 0x170
  159. #define IR_STRINGEX 0x180 // New for 3.1
  160. #define IR_MODEINFO 0x190
  161. //#define WM_CONVERTREQUESTEX 0x0109
  162. #define WM_WNT_CONVERTREQUESTEX 0x0109 /* WM_CONVERTREQUESTEX: 109 for NT, 108 for OT */
  163. #define WM_CONVERTREQUEST 0x010A
  164. #define WM_CONVERTRESULT 0x010B
  165. #define WM_INTERIM 0x010C
  166. #define WM_IMEKEYDOWN 0x290
  167. #define WM_IMEKEYUP 0x291
  168. //
  169. // UNDETERMINESTRING structure for IR_UNDETERMINE
  170. //
  171. typedef struct tagUNDETERMINESTRUCT {
  172. DWORD dwSize;
  173. UINT uDefIMESize;
  174. UINT uDefIMEPos;
  175. UINT uUndetTextLen;
  176. UINT uUndetTextPos;
  177. UINT uUndetAttrPos;
  178. UINT uCursorPos;
  179. UINT uDeltaStart;
  180. UINT uDetermineTextLen;
  181. UINT uDetermineTextPos;
  182. UINT uDetermineDelimPos;
  183. UINT uYomiTextLen;
  184. UINT uYomiTextPos;
  185. UINT uYomiDelimPos;
  186. } UNDETERMINESTRUCT,*PUNDETERMINESTRUCT,NEAR *NPUNDETERMINESTRUCT,FAR *LPUNDETERMINESTRUCT;
  187. typedef struct tagSTRINGEXSTRUCT {
  188. DWORD dwSize;
  189. UINT uDeterminePos;
  190. UINT uDetermineDelimPos;
  191. UINT uYomiPos;
  192. UINT uYomiDelimPos;
  193. } STRINGEXSTRUCT,NEAR *NPSTRINGEXSTRUCT,FAR *LPSTRINGEXSTRUCT;
  194. #ifdef __cplusplus
  195. }
  196. #endif /* __cplusplus */
  197. #endif // _IME_