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