6 #define WM_CONVERTREQUESTEX 0x108
7 #define WM_IME_STARTCOMPOSITION 0x10D
8 #define WM_IME_ENDCOMPOSITION 0x10E
9 #define WM_IME_COMPOSITION 0x10F
10 #define WM_IME_KEYLAST 0x10F
11 #define WM_IME_SETCONTEXT 0x281
12 #define WM_IME_NOTIFY 0x282
13 #define WM_IME_CONTROL 0x283
14 #define WM_IME_COMPOSITIONFULL 0x284
15 #define WM_IME_SELECT 0x285
16 #define WM_IME_CHAR 0x286
17 #define WM_IME_KEYDOWN 0x290
18 #define WM_IME_KEYUP 0x291
19 #define IMC_GETCANDIDATEPOS 7
20 #define IMC_SETCANDIDATEPOS 8
21 #define IMC_GETCOMPOSITIONFONT 9
22 #define IMC_SETCOMPOSITIONFONT 10
23 #define IMC_GETCOMPOSITIONWINDOW 11
24 #define IMC_SETCOMPOSITIONWINDOW 12
25 #define IMC_GETSTATUSWINDOWPOS 15
26 #define IMC_SETSTATUSWINDOWPOS 16
27 #define IMC_CLOSESTATUSWINDOW 0x21
28 #define IMC_OPENSTATUSWINDOW 0x22
29 #define IMN_CLOSESTATUSWINDOW 1
30 #define IMN_OPENSTATUSWINDOW 2
31 #define IMN_CHANGECANDIDATE 3
32 #define IMN_CLOSECANDIDATE 4
33 #define IMN_OPENCANDIDATE 5
34 #define IMN_SETCONVERSIONMODE 6
35 #define IMN_SETSENTENCEMODE 7
36 #define IMN_SETOPENSTATUS 8
37 #define IMN_SETCANDIDATEPOS 9
38 #define IMN_SETCOMPOSITIONFONT 10
39 #define IMN_SETCOMPOSITIONWINDOW 11
40 #define IMN_SETSTATUSWINDOWPOS 12
41 #define IMN_GUIDELINE 13
42 #define IMN_PRIVATE 14
43 #define NI_OPENCANDIDATE 16
44 #define NI_CLOSECANDIDATE 17
45 #define NI_SELECTCANDIDATESTR 18
46 #define NI_CHANGECANDIDATELIST 19
47 #define NI_FINALIZECONVERSIONRESULT 20
48 #define NI_COMPOSITIONSTR 21
49 #define NI_SETCANDIDATE_PAGESTART 22
50 #define NI_SETCANDIDATE_PAGESIZE 23
51 #define NI_IMEMENUSELECTED 24
52 #define ISC_SHOWUICANDIDATEWINDOW 1
53 #define ISC_SHOWUICOMPOSITIONWINDOW 0x80000000
54 #define ISC_SHOWUIGUIDELINE 0x40000000
55 #define ISC_SHOWUIALLCANDIDATEWINDOW 15
56 #define ISC_SHOWUIALL 0xC000000F
57 #define CPS_COMPLETE 1
61 #define IME_CHOTKEY_IME_NONIME_TOGGLE 16
62 #define IME_CHOTKEY_SHAPE_TOGGLE 17
63 #define IME_CHOTKEY_SYMBOL_TOGGLE 18
64 #define IME_JHOTKEY_CLOSE_OPEN 0x30
65 #define IME_KHOTKEY_SHAPE_TOGGLE 0x50
66 #define IME_KHOTKEY_HANJACONVERT 0x51
67 #define IME_KHOTKEY_ENGLISH 0x52
68 #define IME_THOTKEY_IME_NONIME_TOGGLE 0x70
69 #define IME_THOTKEY_SHAPE_TOGGLE 0x71
70 #define IME_THOTKEY_SYMBOL_TOGGLE 0x72
71 #define IME_HOTKEY_DSWITCH_FIRST 256
72 #define IME_HOTKEY_DSWITCH_LAST 0x11F
73 #define IME_ITHOTKEY_RESEND_RESULTSTR 512
74 #define IME_ITHOTKEY_PREVIOUS_COMPOSITION 513
75 #define IME_ITHOTKEY_UISTYLE_TOGGLE 514
76 #define GCS_COMPREADSTR 1
77 #define GCS_COMPREADATTR 2
78 #define GCS_COMPREADCLAUSE 4
80 #define GCS_COMPATTR 16
81 #define GCS_COMPCLAUSE 32
82 #define GCS_CURSORPOS 128
83 #define GCS_DELTASTART 256
84 #define GCS_RESULTREADSTR 512
85 #define GCS_RESULTREADCLAUSE 1024
86 #define GCS_RESULTSTR 2048
87 #define GCS_RESULTCLAUSE 4096
88 #define CS_INSERTCHAR 0x2000
89 #define CS_NOMOVECARET 0x4000
90 #define IMEVER_0310 0x3000A
91 #define IMEVER_0400 0x40000
92 #define IME_PROP_AT_CARET 0x10000
93 #define IME_PROP_SPECIAL_UI 0x20000
94 #define IME_PROP_CANDLIST_START_FROM_1 0x40000
95 #define IME_PROP_UNICODE 0x80000
97 #define UI_CAP_ROT90 2
98 #define UI_CAP_ROTANY 4
99 #define SCS_CAP_COMPSTR 1
100 #define SCS_CAP_MAKEREAD 2
101 #define SELECT_CAP_CONVERSION 1
102 #define SELECT_CAP_SENTENCE 2
106 #define GGL_PRIVATE 4
107 #define GL_LEVEL_NOGUIDELINE 0
108 #define GL_LEVEL_FATAL 1
109 #define GL_LEVEL_ERROR 2
110 #define GL_LEVEL_WARNING 3
111 #define GL_LEVEL_INFORMATION 4
112 #define GL_ID_UNKNOWN 0
113 #define GL_ID_NOMODULE 1
114 #define GL_ID_NODICTIONARY 16
115 #define GL_ID_CANNOTSAVE 17
116 #define GL_ID_NOCONVERT 32
117 #define GL_ID_TYPINGERROR 33
118 #define GL_ID_TOOMANYSTROKE 34
119 #define GL_ID_READINGCONFLICT 35
120 #define GL_ID_INPUTREADING 36
121 #define GL_ID_INPUTRADICAL 37
122 #define GL_ID_INPUTCODE 38
123 #define GL_ID_INPUTSYMBOL 39
124 #define GL_ID_CHOOSECANDIDATE 40
125 #define GL_ID_REVERSECONVERSION 41
126 #define GL_ID_PRIVATE_FIRST 0x8000
127 #define GL_ID_PRIVATE_LAST 0xFFFF
128 #define IGP_GETIMEVERSION (DWORD)(-4)
129 #define IGP_PROPERTY 4
130 #define IGP_CONVERSION 8
131 #define IGP_SENTENCE 12
133 #define IGP_SETCOMPSTR 0x14
134 #define IGP_SELECT 0x18
135 #define SCS_SETSTR (GCS_COMPREADSTR|GCS_COMPSTR)
136 #define SCS_CHANGEATTR (GCS_COMPREADATTR|GCS_COMPATTR)
137 #define SCS_CHANGECLAUSE (GCS_COMPREADCLAUSE|GCS_COMPCLAUSE)
139 #define ATTR_TARGET_CONVERTED 1
140 #define ATTR_CONVERTED 2
141 #define ATTR_TARGET_NOTCONVERTED 3
142 #define ATTR_INPUT_ERROR 4
143 #define ATTR_FIXEDCONVERTED 5
144 #define CFS_DEFAULT 0
148 #define CFS_FORCE_POSITION 32
149 #define CFS_CANDIDATEPOS 64
150 #define CFS_EXCLUDE 128
151 #define GCL_CONVERSION 1
152 #define GCL_REVERSECONVERSION 2
153 #define GCL_REVERSE_LENGTH 3
154 #define IME_CMODE_ALPHANUMERIC 0
155 #define IME_CMODE_NATIVE 1
156 #define IME_CMODE_CHINESE IME_CMODE_NATIVE
157 #define IME_CMODE_HANGEUL IME_CMODE_NATIVE
158 #define IME_CMODE_HANGUL IME_CMODE_NATIVE
159 #define IME_CMODE_JAPANESE IME_CMODE_NATIVE
160 #define IME_CMODE_KATAKANA 2
161 #define IME_CMODE_LANGUAGE 3
162 #define IME_CMODE_FULLSHAPE 8
163 #define IME_CMODE_ROMAN 16
164 #define IME_CMODE_CHARCODE 32
165 #define IME_CMODE_HANJACONVERT 64
166 #define IME_CMODE_SOFTKBD 128
167 #define IME_CMODE_NOCONVERSION 256
168 #define IME_CMODE_EUDC 512
169 #define IME_CMODE_SYMBOL 1024
170 #define IME_CMODE_FIXED 2048
171 #define IME_SMODE_NONE 0
172 #define IME_SMODE_PLAURALCLAUSE 1
173 #define IME_SMODE_SINGLECONVERT 2
174 #define IME_SMODE_AUTOMATIC 4
175 #define IME_SMODE_PHRASEPREDICT 8
176 #define IME_CAND_UNKNOWN 0
177 #define IME_CAND_READ 1
178 #define IME_CAND_CODE 2
179 #define IME_CAND_MEANING 3
180 #define IME_CAND_RADICAL 4
181 #define IME_CAND_STROKE 5
182 #define IMM_ERROR_NODATA (-1)
183 #define IMM_ERROR_GENERAL (-2)
184 #define IME_CONFIG_GENERAL 1
185 #define IME_CONFIG_REGISTERWORD 2
186 #define IME_CONFIG_SELECTDICTIONARY 3
187 #define IME_ESC_QUERY_SUPPORT 3
188 #define IME_ESC_RESERVED_FIRST 4
189 #define IME_ESC_RESERVED_LAST 0x7FF
190 #define IME_ESC_PRIVATE_FIRST 0x800
191 #define IME_ESC_PRIVATE_LAST 0xFFF
192 #define IME_ESC_SEQUENCE_TO_INTERNAL 0x1001
193 #define IME_ESC_GET_EUDC_DICTIONARY 0x1003
194 #define IME_ESC_SET_EUDC_DICTIONARY 0x1004
195 #define IME_ESC_MAX_KEY 0x1005
196 #define IME_ESC_IME_NAME 0x1006
197 #define IME_ESC_SYNC_HOTKEY 0x1007
198 #define IME_ESC_HANJA_MODE 0x1008
199 #define IME_ESC_AUTOMATA 0x1009
200 #define IME_REGWORD_STYLE_EUDC 1
201 #define IME_REGWORD_STYLE_USER_FIRST 0x80000000
202 #define IME_REGWORD_STYLE_USER_LAST 0xFFFFFFFF
203 #define SOFTKEYBOARD_TYPE_T1 1
204 #define SOFTKEYBOARD_TYPE_C1 2
205 #define IMEMENUITEM_STRING_SIZE 80
207 #define MOD_CONTROL 2
210 #define MOD_IGNORE_ALL_MODIFIER 1024
211 #define MOD_ON_KEYUP 2048
212 #define MOD_RIGHT 16384
213 #define MOD_LEFT 32768
214 #define IACE_CHILDREN 1
215 #define IACE_DEFAULT 16
216 #define IACE_IGNORENOCONTEXT 32
217 #define IGIMIF_RIGHTMENU 1
218 #define IGIMII_CMODE 1
219 #define IGIMII_SMODE 2
220 #define IGIMII_CONFIGURE 4
221 #define IGIMII_TOOLS 8
222 #define IGIMII_HELP 16
223 #define IGIMII_OTHER 32
224 #define IGIMII_INPUTTOOLS 64
225 #define IMFT_RADIOCHECK 1
226 #define IMFT_SEPARATOR 2
227 #define IMFT_SUBMENU 4
228 #define IMFS_GRAYED MFS_GRAYED
229 #define IMFS_DISABLED MFS_DISABLED
230 #define IMFS_CHECKED MFS_CHECKED
231 #define IMFS_HILITE MFS_HILITE
232 #define IMFS_ENABLED MFS_ENABLED
233 #define IMFS_UNCHECKED MFS_UNCHECKED
234 #define IMFS_UNHILITE MFS_UNHILITE
235 #define IMFS_DEFAULT MFS_DEFAULT
236 #ifndef VK_PROCESSKEY
237 #define VK_PROCESSKEY 0x0E5
239 #define STYLE_DESCRIPTION_SIZE 32
243 typedef struct tagCOMPOSITIONFORM
{
247 } COMPOSITIONFORM
,*PCOMPOSITIONFORM
,*LPCOMPOSITIONFORM
;
248 typedef struct tagCANDIDATEFORM
{
253 } CANDIDATEFORM
,*PCANDIDATEFORM
,*LPCANDIDATEFORM
;
254 typedef struct tagCANDIDATELIST
{
262 } CANDIDATELIST
,*PCANDIDATELIST
,*LPCANDIDATELIST
;
263 typedef struct tagREGISTERWORDA
{
266 } REGISTERWORDA
,*PREGISTERWORDA
,*LPREGISTERWORDA
;
267 typedef struct tagREGISTERWORDW
{
270 } REGISTERWORDW
,*PREGISTERWORDW
,*LPREGISTERWORDW
;
271 typedef struct tagSTYLEBUFA
{
273 CHAR szDescription
[STYLE_DESCRIPTION_SIZE
];
274 } STYLEBUFA
,*PSTYLEBUFA
,*LPSTYLEBUFA
;
275 typedef struct tagSTYLEBUFW
{
277 WCHAR szDescription
[STYLE_DESCRIPTION_SIZE
];
278 } STYLEBUFW
,*PSTYLEBUFW
,*LPSTYLEBUFW
;
279 typedef struct tagIMEMENUITEMINFOA
{
285 HBITMAP hbmpUnchecked
;
287 CHAR szString
[IMEMENUITEM_STRING_SIZE
];
289 } IMEMENUITEMINFOA
,*PIMEMENUITEMINFOA
,*LPIMEMENUITEMINFOA
;
290 typedef struct tagIMEMENUITEMINFOW
{
296 HBITMAP hbmpUnchecked
;
298 WCHAR szString
[IMEMENUITEM_STRING_SIZE
];
300 } IMEMENUITEMINFOW
,*PIMEMENUITEMINFOW
,*LPIMEMENUITEMINFOW
;
301 typedef int (CALLBACK
*REGISTERWORDENUMPROCA
)(LPCSTR
, DWORD
, LPCSTR
, LPVOID
);
302 typedef int (CALLBACK
*REGISTERWORDENUMPROCW
)(LPCWSTR
, DWORD
, LPCWSTR
, LPVOID
);
304 #define REGISTERWORDENUMPROC REGISTERWORDENUMPROCW
305 typedef REGISTERWORDW REGISTERWORD
,*PREGISTERWORD
,*LPREGISTERWORD
;
306 typedef STYLEBUFW STYLEBUF
,*PSTYLEBUF
,*LPSTYLEBUF
;
307 typedef IMEMENUITEMINFOW IMEMENUITEMINFO
,*PIMEMENUITEMINFO
,*LPIMEMENUITEMINFO
;
309 #define REGISTERWORDENUMPROC REGISTERWORDENUMPROCA
310 typedef REGISTERWORDA REGISTERWORD
,*PREGISTERWORD
,*LPREGISTERWORD
;
311 typedef STYLEBUFA STYLEBUF
,*PSTYLEBUF
,*LPSTYLEBUF
;
312 typedef IMEMENUITEMINFOA IMEMENUITEMINFO
,*PIMEMENUITEMINFO
,*LPIMEMENUITEMINFO
;
314 HKL WINAPI
ImmInstallIMEA(LPCSTR
,LPCSTR
);
315 HKL WINAPI
ImmInstallIMEW(LPCWSTR
,LPCWSTR
);
316 HWND WINAPI
ImmGetDefaultIMEWnd(HWND
);
317 UINT WINAPI
ImmGetDescriptionA(HKL
,LPSTR
,UINT
);
318 UINT WINAPI
ImmGetDescriptionW(HKL
,LPWSTR
,UINT
);
319 UINT WINAPI
ImmGetIMEFileNameA(HKL
,LPSTR
,UINT
);
320 UINT WINAPI
ImmGetIMEFileNameW(HKL
,LPWSTR
,UINT
);
321 DWORD WINAPI
ImmGetProperty(HKL
,DWORD
);
322 BOOL WINAPI
ImmIsIME(HKL
);
323 BOOL WINAPI
ImmSimulateHotKey(HWND
,DWORD
);
324 HIMC WINAPI
ImmCreateContext(void);
325 BOOL WINAPI
ImmDestroyContext(HIMC
);
326 HIMC WINAPI
ImmGetContext(HWND
);
327 BOOL WINAPI
ImmReleaseContext(HWND
,HIMC
);
328 HIMC WINAPI
ImmAssociateContext(HWND
,HIMC
);
329 LONG WINAPI
ImmGetCompositionStringA(HIMC
,DWORD
,PVOID
,DWORD
);
330 LONG WINAPI
ImmGetCompositionStringW(HIMC
,DWORD
,PVOID
,DWORD
);
331 BOOL WINAPI
ImmSetCompositionStringA(HIMC
,DWORD
,PCVOID
,DWORD
,PCVOID
,DWORD
);
332 BOOL WINAPI
ImmSetCompositionStringW(HIMC
,DWORD
,PCVOID
,DWORD
,PCVOID
,DWORD
);
333 DWORD WINAPI
ImmGetCandidateListCountA(HIMC
,PDWORD
);
334 DWORD WINAPI
ImmGetCandidateListCountW(HIMC
,PDWORD
);
335 DWORD WINAPI
ImmGetCandidateListA(HIMC
,DWORD
,PCANDIDATELIST
,DWORD
);
336 DWORD WINAPI
ImmGetCandidateListW(HIMC
,DWORD
,PCANDIDATELIST
,DWORD
);
337 DWORD WINAPI
ImmGetGuideLineA(HIMC
,DWORD
,LPSTR
,DWORD
);
338 DWORD WINAPI
ImmGetGuideLineW(HIMC
,DWORD
,LPWSTR
,DWORD
);
339 BOOL WINAPI
ImmGetConversionStatus(HIMC
,LPDWORD
,PDWORD
);
340 BOOL WINAPI
ImmSetConversionStatus(HIMC
,DWORD
,DWORD
);
341 BOOL WINAPI
ImmGetOpenStatus(HIMC
);
342 BOOL WINAPI
ImmSetOpenStatus(HIMC
,BOOL
);
343 BOOL WINAPI
ImmGetCompositionFontA(HIMC
,LPLOGFONTA
);
344 BOOL WINAPI
ImmGetCompositionFontW(HIMC
,LPLOGFONTW
);
345 BOOL WINAPI
ImmSetCompositionFontA(HIMC
,LPLOGFONTA
);
346 BOOL WINAPI
ImmSetCompositionFontW(HIMC
,LPLOGFONTW
);
347 BOOL WINAPI
ImmConfigureIMEA(HKL
,HWND
,DWORD
,PVOID
);
348 BOOL WINAPI
ImmConfigureIMEW(HKL
,HWND
,DWORD
,PVOID
);
349 LRESULT WINAPI
ImmEscapeA(HKL
,HIMC
,UINT
,PVOID
);
350 LRESULT WINAPI
ImmEscapeW(HKL
,HIMC
,UINT
,PVOID
);
351 DWORD WINAPI
ImmGetConversionListA(HKL
,HIMC
,LPCSTR
,PCANDIDATELIST
,DWORD
,UINT
);
352 DWORD WINAPI
ImmGetConversionListW(HKL
,HIMC
,LPCWSTR
,PCANDIDATELIST
,DWORD
,UINT
);
353 BOOL WINAPI
ImmNotifyIME(HIMC
,DWORD
,DWORD
,DWORD
);
354 BOOL WINAPI
ImmGetStatusWindowPos(HIMC
,LPPOINT
);
355 BOOL WINAPI
ImmSetStatusWindowPos(HIMC
,LPPOINT
);
356 BOOL WINAPI
ImmGetCompositionWindow(HIMC
,PCOMPOSITIONFORM
);
357 BOOL WINAPI
ImmSetCompositionWindow(HIMC
,PCOMPOSITIONFORM
);
358 BOOL WINAPI
ImmGetCandidateWindow(HIMC
,DWORD
,PCANDIDATEFORM
);
359 BOOL WINAPI
ImmSetCandidateWindow(HIMC
,PCANDIDATEFORM
);
360 BOOL WINAPI
ImmIsUIMessageA(HWND
,UINT
,WPARAM
,LPARAM
);
361 BOOL WINAPI
ImmIsUIMessageW(HWND
,UINT
,WPARAM
,LPARAM
);
362 UINT WINAPI
ImmGetVirtualKey(HWND
);
363 BOOL WINAPI
ImmRegisterWordA(HKL
,LPCSTR
,DWORD
,LPCSTR
);
364 BOOL WINAPI
ImmRegisterWordW(HKL
,LPCWSTR
,DWORD
,LPCWSTR
);
365 BOOL WINAPI
ImmUnregisterWordA(HKL
,LPCSTR
,DWORD
,LPCSTR
);
366 BOOL WINAPI
ImmUnregisterWordW(HKL
,LPCWSTR
,DWORD
,LPCWSTR
);
367 UINT WINAPI
ImmGetRegisterWordStyleA(HKL
,UINT
,PSTYLEBUFA
);
368 UINT WINAPI
ImmGetRegisterWordStyleW(HKL
,UINT
,PSTYLEBUFW
);
369 UINT WINAPI
ImmEnumRegisterWordA(HKL
,REGISTERWORDENUMPROCA
,LPCSTR
,DWORD
,LPCSTR
,PVOID
);
370 UINT WINAPI
ImmEnumRegisterWordW(HKL
,REGISTERWORDENUMPROCW
,LPCWSTR
,DWORD
,LPCWSTR
,PVOID
);
371 BOOL WINAPI
EnableEUDC(BOOL
);
372 BOOL WINAPI
ImmDisableIME(DWORD
);
373 DWORD WINAPI
ImmGetImeMenuItemsA(HIMC
,DWORD
,DWORD
,LPIMEMENUITEMINFOA
,LPIMEMENUITEMINFOA
,DWORD
);
374 DWORD WINAPI
ImmGetImeMenuItemsW(HIMC
,DWORD
,DWORD
,LPIMEMENUITEMINFOW
,LPIMEMENUITEMINFOW
,DWORD
);
377 #define ImmEnumRegisterWord ImmEnumRegisterWordW
378 #define ImmGetRegisterWordStyle ImmGetRegisterWordStyleW
379 #define ImmUnregisterWord ImmUnregisterWordW
380 #define ImmRegisterWord ImmRegisterWordW
381 #define ImmInstallIME ImmInstallIMEW
382 #define ImmIsUIMessage ImmIsUIMessageW
383 #define ImmGetConversionList ImmGetConversionListW
384 #define ImmEscape ImmEscapeW
385 #define ImmConfigureIME ImmConfigureIMEW
386 #define ImmSetCompositionFont ImmSetCompositionFontW
387 #define ImmGetCompositionFont ImmGetCompositionFontW
388 #define ImmGetGuideLine ImmGetGuideLineW
389 #define ImmGetCandidateList ImmGetCandidateListW
390 #define ImmGetCandidateListCount ImmGetCandidateListCountW
391 #define ImmSetCompositionString ImmSetCompositionStringW
392 #define ImmGetCompositionString ImmGetCompositionStringW
393 #define ImmGetDescription ImmGetDescriptionW
394 #define ImmGetIMEFileName ImmGetIMEFileNameW
395 #define ImmGetImeMenuItems ImmGetImeMenuItemsW
397 #define ImmEnumRegisterWord ImmEnumRegisterWordA
398 #define ImmGetRegisterWordStyle ImmGetRegisterWordStyleA
399 #define ImmUnregisterWord ImmUnregisterWordA
400 #define ImmRegisterWord ImmRegisterWordA
401 #define ImmInstallIME ImmInstallIMEA
402 #define ImmIsUIMessage ImmIsUIMessageA
403 #define ImmGetConversionList ImmGetConversionListA
404 #define ImmEscape ImmEscapeA
405 #define ImmConfigureIME ImmConfigureIMEA
406 #define ImmSetCompositionFont ImmSetCompositionFontA
407 #define ImmGetCompositionFont ImmGetCompositionFontA
408 #define ImmGetGuideLine ImmGetGuideLineA
409 #define ImmGetCandidateList ImmGetCandidateListA
410 #define ImmGetCandidateListCount ImmGetCandidateListCountA
411 #define ImmSetCompositionString ImmSetCompositionStringA
412 #define ImmGetCompositionString ImmGetCompositionStringA
413 #define ImmGetDescription ImmGetDescriptionA
414 #define ImmGetIMEFileName ImmGetIMEFileNameA
415 #define ImmGetImeMenuItems ImmGetImeMenuItemsW