ime.h 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175
  1. /**
  2. * This file has no copyright assigned and is placed in the Public Domain.
  3. * This file is part of the mingw-w64 runtime package.
  4. * No warranty is given; refer to the file DISCLAIMER.PD within this package.
  5. */
  6. #ifndef _IME_
  7. #define _IME_
  8. #include <_mingw_unicode.h>
  9. #ifdef __cplusplus
  10. extern "C" {
  11. #endif
  12. #ifndef _WINDEF_
  13. typedef unsigned int UINT;
  14. #endif
  15. #define IME_MAXPROCESS 32
  16. #define SendIMEMessageEx __MINGW_NAME_AW(SendIMEMessageEx)
  17. LRESULT WINAPI SendIMEMessageExA(HWND,LPARAM);
  18. LRESULT WINAPI SendIMEMessageExW(HWND,LPARAM);
  19. typedef struct tagIMESTRUCT {
  20. UINT fnc;
  21. WPARAM wParam;
  22. UINT wCount;
  23. UINT dchSource;
  24. UINT dchDest;
  25. LPARAM lParam1;
  26. LPARAM lParam2;
  27. LPARAM lParam3;
  28. } IMESTRUCT,*PIMESTRUCT,*NPIMESTRUCT,*LPIMESTRUCT;
  29. #define CP_HWND 0
  30. #define CP_OPEN 1
  31. #define CP_DIRECT 2
  32. #define CP_LEVEL 3
  33. #if !defined(VK_DBE_ALPHANUMERIC)
  34. #define VK_DBE_ALPHANUMERIC 0x0f0
  35. #define VK_DBE_KATAKANA 0x0f1
  36. #define VK_DBE_HIRAGANA 0x0f2
  37. #define VK_DBE_SBCSCHAR 0x0f3
  38. #define VK_DBE_DBCSCHAR 0x0f4
  39. #define VK_DBE_ROMAN 0x0f5
  40. #define VK_DBE_NOROMAN 0x0f6
  41. #define VK_DBE_ENTERWORDREGISTERMODE 0x0f7
  42. #define VK_DBE_ENTERIMECONFIGMODE 0x0f8
  43. #define VK_DBE_FLUSHSTRING 0x0f9
  44. #define VK_DBE_CODEINPUT 0x0fa
  45. #define VK_DBE_NOCODEINPUT 0x0fb
  46. #define VK_DBE_DETERMINESTRING 0x0fc
  47. #define VK_DBE_ENTERDLGCONVERSIONMODE 0x0fd
  48. #endif
  49. #define MCW_DEFAULT 0x00
  50. #define MCW_RECT 0x01
  51. #define MCW_WINDOW 0x02
  52. #define MCW_SCREEN 0x04
  53. #define MCW_VERTICAL 0x08
  54. #define MCW_HIDDEN 0x10
  55. #define IME_MODE_ALPHANUMERIC 0x0001
  56. #ifdef KOREA
  57. #define IME_MODE_SBCSCHAR 0x0002
  58. #else
  59. #define IME_MODE_SBCSCHAR 0x0008
  60. #endif
  61. #define IME_MODE_KATAKANA 0x0002
  62. #define IME_MODE_HIRAGANA 0x0004
  63. #define IME_MODE_HANJACONVERT 0x0004
  64. #define IME_MODE_DBCSCHAR 0x0010
  65. #define IME_MODE_ROMAN 0x0020
  66. #define IME_MODE_NOROMAN 0x0040
  67. #define IME_MODE_CODEINPUT 0x0080
  68. #define IME_MODE_NOCODEINPUT 0x0100
  69. #define IME_GETIMECAPS 0x03
  70. #define IME_SETOPEN 0x04
  71. #define IME_GETOPEN 0x05
  72. #define IME_GETVERSION 0x07
  73. #define IME_SETCONVERSIONWINDOW 0x08
  74. #define IME_MOVEIMEWINDOW IME_SETCONVERSIONWINDOW
  75. #define IME_SETCONVERSIONMODE 0x10
  76. #define IME_GETCONVERSIONMODE 0x11
  77. #define IME_SET_MODE 0x12
  78. #define IME_SENDVKEY 0x13
  79. #define IME_ENTERWORDREGISTERMODE 0x18
  80. #define IME_SETCONVERSIONFONTEX 0x19
  81. #define IME_BANJAtoJUNJA 0x13
  82. #define IME_JUNJAtoBANJA 0x14
  83. #define IME_JOHABtoKS 0x15
  84. #define IME_KStoJOHAB 0x16
  85. #define IMEA_INIT 0x01
  86. #define IMEA_NEXT 0x02
  87. #define IMEA_PREV 0x03
  88. #define IME_REQUEST_CONVERT 0x01
  89. #define IME_ENABLE_CONVERT 0x02
  90. #define INTERIM_WINDOW 0x00
  91. #define MODE_WINDOW 0x01
  92. #define HANJA_WINDOW 0x02
  93. #define IME_RS_ERROR 0x01
  94. #define IME_RS_NOIME 0x02
  95. #define IME_RS_TOOLONG 0x05
  96. #define IME_RS_ILLEGAL 0x06
  97. #define IME_RS_NOTFOUND 0x07
  98. #define IME_RS_NOROOM 0x0a
  99. #define IME_RS_DISKERROR 0x0e
  100. #define IME_RS_INVALID 0x11
  101. #define IME_RS_NEST 0x12
  102. #define IME_RS_SYSTEMMODAL 0x13
  103. #define WM_IME_REPORT 0x0280
  104. #define IR_STRINGSTART 0x100
  105. #define IR_STRINGEND 0x101
  106. #define IR_OPENCONVERT 0x120
  107. #define IR_CHANGECONVERT 0x121
  108. #define IR_CLOSECONVERT 0x122
  109. #define IR_FULLCONVERT 0x123
  110. #define IR_IMESELECT 0x130
  111. #define IR_STRING 0x140
  112. #define IR_DBCSCHAR 0x160
  113. #define IR_UNDETERMINE 0x170
  114. #define IR_STRINGEX 0x180
  115. #define IR_MODEINFO 0x190
  116. #define WM_WNT_CONVERTREQUESTEX 0x0109
  117. #define WM_CONVERTREQUEST 0x010A
  118. #define WM_CONVERTRESULT 0x010B
  119. #define WM_INTERIM 0x010C
  120. #define WM_IMEKEYDOWN 0x290
  121. #define WM_IMEKEYUP 0x291
  122. typedef struct tagUNDETERMINESTRUCT {
  123. DWORD dwSize;
  124. UINT uDefIMESize;
  125. UINT uDefIMEPos;
  126. UINT uUndetTextLen;
  127. UINT uUndetTextPos;
  128. UINT uUndetAttrPos;
  129. UINT uCursorPos;
  130. UINT uDeltaStart;
  131. UINT uDetermineTextLen;
  132. UINT uDetermineTextPos;
  133. UINT uDetermineDelimPos;
  134. UINT uYomiTextLen;
  135. UINT uYomiTextPos;
  136. UINT uYomiDelimPos;
  137. } UNDETERMINESTRUCT,*PUNDETERMINESTRUCT,*NPUNDETERMINESTRUCT,*LPUNDETERMINESTRUCT;
  138. typedef struct tagSTRINGEXSTRUCT {
  139. DWORD dwSize;
  140. UINT uDeterminePos;
  141. UINT uDetermineDelimPos;
  142. UINT uYomiPos;
  143. UINT uYomiDelimPos;
  144. } STRINGEXSTRUCT,*NPSTRINGEXSTRUCT,*LPSTRINGEXSTRUCT;
  145. #ifdef __cplusplus
  146. }
  147. #endif
  148. #endif