Sync with trunk (r48545)
[reactos.git] / include / psdk / imm.h
1 /*
2 * Declarations for IMM32
3 *
4 * Copyright (C) the Wine project
5 *
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2.1 of the License, or (at your option) any later version.
10 *
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
15 *
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with this library; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
19 */
20
21 #ifndef __WINE_IMM_H
22 #define __WINE_IMM_H
23
24 #ifdef __cplusplus
25 extern "C" {
26 #endif
27
28 typedef HANDLE HIMC;
29 typedef HANDLE HIMCC;
30
31 typedef struct tagREGISTERWORDA {
32 LPSTR lpReading;
33 LPSTR lpWord;
34 } REGISTERWORDA, *PREGISTERWORDA, *NPREGISTERWORDA, *LPREGISTERWORDA;
35
36 typedef struct tagREGISTERWORDW {
37 LPWSTR lpReading;
38 LPWSTR lpWord;
39 } REGISTERWORDW, *PREGISTERWORDW, *NPREGISTERWORDW, *LPREGISTERWORDW;
40
41 typedef int (CALLBACK *REGISTERWORDENUMPROCA)(LPCSTR, DWORD, LPCSTR, LPVOID);
42 typedef int (CALLBACK *REGISTERWORDENUMPROCW)(LPCWSTR, DWORD, LPCWSTR, LPVOID);
43
44 typedef struct tagCANDIDATEFORM
45 {
46 DWORD dwIndex;
47 DWORD dwStyle;
48 POINT ptCurrentPos;
49 RECT rcArea;
50 } CANDIDATEFORM, *LPCANDIDATEFORM;
51
52 typedef struct tagCANDIDATELIST
53 {
54 DWORD dwSize;
55 DWORD dwStyle;
56 DWORD dwCount;
57 DWORD dwSelection;
58 DWORD dwPageStart;
59 DWORD dwPageSize;
60 DWORD dwOffset[1];
61 } CANDIDATELIST, *LPCANDIDATELIST;
62
63 typedef struct tagSTYLEBUFA
64 {
65 DWORD dwStyle;
66 CHAR szDescription[32];
67 } STYLEBUFA, *LPSTYLEBUFA;
68
69 typedef struct tagSTYLEBUFW
70 {
71 DWORD dwStyle;
72 WCHAR szDescription[32];
73 } STYLEBUFW, *LPSTYLEBUFW;
74
75 DECL_WINELIB_TYPE_AW(STYLEBUF)
76 DECL_WINELIB_TYPE_AW(LPSTYLEBUF)
77
78 typedef struct tagRECONVERTSTRING
79 {
80 DWORD dwSize;
81 DWORD dwVersion;
82 DWORD dwStrLen;
83 DWORD dwStrOffset;
84 DWORD dwCompStrLen;
85 DWORD dwCompStrOffset;
86 DWORD dwTargetStrLen;
87 DWORD dwTargetStrOffset;
88 } RECONVERTSTRING, *LPRECONVERTSTRING;
89
90
91 #define IMEMENUITEM_STRING_SIZE 80
92
93 typedef struct tagIMEMENUITEMINFOA
94 {
95 UINT cbSize;
96 UINT fType;
97 UINT fState;
98 UINT wID;
99 HBITMAP hbmpChecked;
100 HBITMAP hbmpUnchecked;
101 DWORD dwItemData;
102 CHAR szString[IMEMENUITEM_STRING_SIZE];
103 HBITMAP hbmpItem;
104 } IMEMENUITEMINFOA, *LPIMEMENUITEMINFOA;
105
106 typedef struct tagIMEMENUITEMINFOW
107 {
108 UINT cbSize;
109 UINT fType;
110 UINT fState;
111 UINT wID;
112 HBITMAP hbmpChecked;
113 HBITMAP hbmpUnchecked;
114 DWORD dwItemData;
115 WCHAR szString[IMEMENUITEM_STRING_SIZE];
116 HBITMAP hbmpItem;
117 } IMEMENUITEMINFOW, *LPIMEMENUITEMINFOW;
118
119 DECL_WINELIB_TYPE_AW(IMEMENUITEMINFO)
120 DECL_WINELIB_TYPE_AW(LPIMEMENUITEMINFO)
121
122 typedef struct _tagCOMPOSITIONFORM
123 {
124 DWORD dwStyle;
125 POINT ptCurrentPos;
126 RECT rcArea;
127 } COMPOSITIONFORM, *LPCOMPOSITIONFORM;
128
129 typedef struct _tagIMEINFO {
130 DWORD dwPrivateDataSize;
131 DWORD fdwProperty;
132 DWORD fdwConversionCaps;
133 DWORD fdwSentenceCaps;
134 DWORD fdwUICaps;
135 DWORD fdwSCSCaps;
136 DWORD fdwSelectCaps;
137 } IMEINFO, *LPIMEINFO;
138
139 typedef struct tagCOMPOSITIONSTRING {
140 DWORD dwSize;
141 DWORD dwCompReadAttrLen;
142 DWORD dwCompReadAttrOffset;
143 DWORD dwCompReadClauseLen;
144 DWORD dwCompReadClauseOffset;
145 DWORD dwCompReadStrLen;
146 DWORD dwCompReadStrOffset;
147 DWORD dwCompAttrLen;
148 DWORD dwCompAttrOffset;
149 DWORD dwCompClauseLen;
150 DWORD dwCompClauseOffset;
151 DWORD dwCompStrLen;
152 DWORD dwCompStrOffset;
153 DWORD dwCursorPos;
154 DWORD dwDeltaStart;
155 DWORD dwResultReadClauseLen;
156 DWORD dwResultReadClauseOffset;
157 DWORD dwResultReadStrLen;
158 DWORD dwResultReadStrOffset;
159 DWORD dwResultClauseLen;
160 DWORD dwResultClauseOffset;
161 DWORD dwResultStrLen;
162 DWORD dwResultStrOffset;
163 DWORD dwPrivateSize;
164 DWORD dwPrivateOffset;
165 } COMPOSITIONSTRING, *LPCOMPOSITIONSTRING;
166
167 typedef struct tagGUIDELINE {
168 DWORD dwSize;
169 DWORD dwLevel;
170 DWORD dwIndex;
171 DWORD dwStrLen;
172 DWORD dwStrOffset;
173 DWORD dwPrivateSize;
174 DWORD dwPrivateOffset;
175 } GUIDELINE, *LPGUIDELINE;
176
177 typedef struct tagCANDIDATEINFO {
178 DWORD dwSize;
179 DWORD dwCount;
180 DWORD dwOffset[32];
181 DWORD dwPrivateSize;
182 DWORD dwPrivateOffset;
183 } CANDIDATEINFO, *LPCANDIDATEINFO;
184
185 #define IMMGWL_IMC 0
186 #define IMMGWL_PRIVATE (sizeof(LONG))
187
188 /* IME Property bits */
189 #define IME_PROP_END_UNLOAD 0x0001
190 #define IME_PROP_KBD_CHAR_FIRST 0x0002
191 #define IME_PROP_IGNORE_UPKEYS 0x0004
192 #define IME_PROP_NEED_ALTKEY 0x0008
193 #define IME_PROP_NO_KEYS_ON_CLOSE 0x0010
194
195 /* for NI_CONTEXTUPDATED */
196 #define IMC_SETCONVERSIONMODE 0x0002
197 #define IMC_SETSENTENCEMODE 0x0004
198 #define IMC_SETOPENSTATUS 0x0006
199
200 /* dwAction for ImmNotifyIME */
201 #define NI_CONTEXTUPDATED 0x0003
202 #define NI_OPENCANDIDATE 0x0010
203 #define NI_CLOSECANDIDATE 0x0011
204 #define NI_SELECTCANDIDATESTR 0x0012
205 #define NI_CHANGECANDIDATELIST 0x0013
206 #define NI_FINALIZECONVERSIONRESULT 0x0014
207 #define NI_COMPOSITIONSTR 0x0015
208 #define NI_SETCANDIDATE_PAGESTART 0x0016
209 #define NI_SETCANDIDATE_PAGESIZE 0x0017
210 #define NI_IMEMENUSELECTED 0x0018
211
212 BOOL WINAPI ImmUnlockIMC(HIMC);
213 DWORD WINAPI ImmGetIMCLockCount(HIMC);
214 HIMCC WINAPI ImmCreateIMCC(DWORD);
215 HIMCC WINAPI ImmDestroyIMCC(HIMCC);
216 LPVOID WINAPI ImmLockIMCC(HIMCC);
217 BOOL WINAPI ImmUnlockIMCC(HIMCC);
218 DWORD WINAPI ImmGetIMCCLockCount(HIMCC);
219 HIMCC WINAPI ImmReSizeIMCC(HIMCC, DWORD);
220 DWORD WINAPI ImmGetIMCCSize(HIMCC);
221
222 BOOL WINAPI ImmGenerateMessage(HIMC);
223 LRESULT WINAPI ImmRequestMessageA(HIMC, WPARAM, LPARAM);
224 LRESULT WINAPI ImmRequestMessageW(HIMC, WPARAM, LPARAM);
225 #define ImmRequestMessage WINELIB_NAME_AW(ImmRequestMessage);
226 BOOL WINAPI ImmTranslateMessage(HWND, UINT, WPARAM, LPARAM);
227 HWND WINAPI ImmCreateSoftKeyboard(UINT, UINT, int, int);
228 BOOL WINAPI ImmDestroySoftKeyboard(HWND);
229 BOOL WINAPI ImmShowSoftKeyboard(HWND, int);
230
231 BOOL WINAPI ImeInquire(LPIMEINFO, LPWSTR, LPCWSTR lpszOptions);
232 BOOL WINAPI ImeConfigure (HKL, HWND, DWORD, LPVOID);
233 DWORD WINAPI ImeConversionList(HIMC, LPCWSTR, LPCANDIDATELIST,DWORD,UINT);
234 BOOL WINAPI ImeDestroy(UINT);
235 LRESULT WINAPI ImeEscape(HIMC, UINT, LPVOID);
236 BOOL WINAPI ImeProcessKey(HIMC, UINT, LPARAM, CONST LPBYTE);
237 BOOL WINAPI ImeSelect(HIMC, BOOL);
238 BOOL WINAPI ImeSetActiveContext(HIMC, BOOL);
239 UINT WINAPI ImeToAsciiEx(UINT, UINT, CONST LPBYTE, LPDWORD, UINT, HIMC);
240 BOOL WINAPI NotifyIME(HIMC, DWORD, DWORD, DWORD);
241 BOOL WINAPI ImeRegisterWord(LPCWSTR, DWORD, LPCWSTR);
242 BOOL WINAPI ImeUnregisterWord(LPCWSTR, DWORD, LPCWSTR);
243 UINT WINAPI ImeGetRegisterWordStyle(UINT, LPSTYLEBUFW);
244 UINT WINAPI ImeEnumRegisterWord(REGISTERWORDENUMPROCW, LPCWSTR, DWORD, LPCWSTR, LPVOID);
245 BOOL WINAPI ImeSetCompositionString(HIMC, DWORD, LPCVOID, DWORD, LPCVOID, DWORD);
246 DWORD WINAPI ImeGetImeMenuItems(HIMC, DWORD, DWORD, LPIMEMENUITEMINFOW, LPIMEMENUITEMINFOW, DWORD);
247
248 /* wParam for WM_IME_CONTROL */
249 #define IMC_GETCANDIDATEPOS 0x0007
250 #define IMC_SETCANDIDATEPOS 0x0008
251 #define IMC_GETCOMPOSITIONFONT 0x0009
252 #define IMC_SETCOMPOSITIONFONT 0x000A
253 #define IMC_GETCOMPOSITIONWINDOW 0x000B
254 #define IMC_SETCOMPOSITIONWINDOW 0x000C
255 #define IMC_GETSTATUSWINDOWPOS 0x000F
256 #define IMC_SETSTATUSWINDOWPOS 0x0010
257 #define IMC_CLOSESTATUSWINDOW 0x0021
258 #define IMC_OPENSTATUSWINDOW 0x0022
259
260 /*
261 * wParam for WM_IME_CONTROL to the soft keyboard
262 * dwAction for ImmNotifyIME
263 */
264 #define NI_OPENCANDIDATE 0x0010
265 #define NI_CLOSECANDIDATE 0x0011
266 #define NI_SELECTCANDIDATESTR 0x0012
267 #define NI_CHANGECANDIDATELIST 0x0013
268 #define NI_FINALIZECONVERSIONRESULT 0x0014
269 #define NI_COMPOSITIONSTR 0x0015
270 #define NI_SETCANDIDATE_PAGESTART 0x0016
271 #define NI_SETCANDIDATE_PAGESIZE 0x0017
272 #define NI_IMEMENUSELECTED 0x0018
273
274 /* lParam for WM_IME_SETCONTEXT */
275 #define ISC_SHOWUICANDIDATEWINDOW 0x00000001
276 #define ISC_SHOWUICOMPOSITIONWINDOW 0x80000000
277 #define ISC_SHOWUIGUIDELINE 0x40000000
278 #define ISC_SHOWUIALLCANDIDATEWINDOW 0x0000000F
279 #define ISC_SHOWUIALL 0xC000000F
280
281
282 /* dwIndex for ImmNotifyIME/NI_COMPOSITIONSTR */
283 #define CPS_COMPLETE 0x0001
284 #define CPS_CONVERT 0x0002
285 #define CPS_REVERT 0x0003
286 #define CPS_CANCEL 0x0004
287
288
289 /* the modifiers of hot key */
290 #define MOD_ALT 0x0001
291 #define MOD_CONTROL 0x0002
292 #define MOD_SHIFT 0x0004
293
294 #define MOD_LEFT 0x8000
295 #define MOD_RIGHT 0x4000
296
297 #define MOD_ON_KEYUP 0x0800
298 #define MOD_IGNORE_ALL_MODIFIER 0x0400
299
300
301 /* Windows for Simplified Chinese Edition hot key ID from 0x10 - 0x2F */
302 #define IME_CHOTKEY_IME_NONIME_TOGGLE 0x10
303 #define IME_CHOTKEY_SHAPE_TOGGLE 0x11
304 #define IME_CHOTKEY_SYMBOL_TOGGLE 0x12
305
306 /* Windows for Japanese Edition hot key ID from 0x30 - 0x4F */
307 #define IME_JHOTKEY_CLOSE_OPEN 0x30
308
309 /* Windows for Korean Edition hot key ID from 0x50 - 0x6F */
310 #define IME_KHOTKEY_SHAPE_TOGGLE 0x50
311 #define IME_KHOTKEY_HANJACONVERT 0x51
312 #define IME_KHOTKEY_ENGLISH 0x52
313 /* Windows for Tranditional Chinese Edition hot key ID from 0x70 - 0x8F */
314 #define IME_THOTKEY_IME_NONIME_TOGGLE 0x70
315 #define IME_THOTKEY_SHAPE_TOGGLE 0x71
316 #define IME_THOTKEY_SYMBOL_TOGGLE 0x72
317
318 /* direct switch hot key ID from 0x100 - 0x11F */
319 #define IME_HOTKEY_DSWITCH_FIRST 0x100
320 #define IME_HOTKEY_DSWITCH_LAST 0x11F
321
322 /* IME private hot key from 0x200 - 0x21F */
323 #define IME_HOTKEY_PRIVATE_FIRST 0x200
324 #define IME_ITHOTKEY_RESEND_RESULTSTR 0x200
325 #define IME_ITHOTKEY_PREVIOUS_COMPOSITION 0x201
326 #define IME_ITHOTKEY_UISTYLE_TOGGLE 0x202
327 #define IME_ITHOTKEY_RECONVERTSTRING 0x203
328 #define IME_HOTKEY_PRIVATE_LAST 0x21F
329
330
331 /*
332 * dwSystemInfoFlags bits
333 * parameter of ImmGetCompositionString
334 */
335 #define GCS_COMPREADSTR 0x0001
336 #define GCS_COMPREADATTR 0x0002
337 #define GCS_COMPREADCLAUSE 0x0004
338 #define GCS_COMPSTR 0x0008
339 #define GCS_COMPATTR 0x0010
340 #define GCS_COMPCLAUSE 0x0020
341 #define GCS_CURSORPOS 0x0080
342 #define GCS_DELTASTART 0x0100
343 #define GCS_RESULTREADSTR 0x0200
344 #define GCS_RESULTREADCLAUSE 0x0400
345 #define GCS_RESULTSTR 0x0800
346 #define GCS_RESULTCLAUSE 0x1000
347
348 /* style bit flags for WM_IME_COMPOSITION */
349 #define CS_INSERTCHAR 0x2000
350 #define CS_NOMOVECARET 0x4000
351
352
353 /*
354 * bits of fdwInit of INPUTCONTEXT
355 * IME version constants
356 */
357 #define IMEVER_0310 0x0003000A
358 #define IMEVER_0400 0x00040000
359
360
361 /* IME property bits */
362 #define IME_PROP_AT_CARET 0x00010000
363 #define IME_PROP_SPECIAL_UI 0x00020000
364 #define IME_PROP_CANDLIST_START_FROM_1 0x00040000
365 #define IME_PROP_UNICODE 0x00080000
366 #define IME_PROP_COMPLETE_ON_UNSELECT 0x00100000
367
368
369 /* IME UICapability bits */
370 #define UI_CAP_2700 0x00000001
371 #define UI_CAP_ROT90 0x00000002
372 #define UI_CAP_ROTANY 0x00000004
373 /* ImmSetCompositionString Capability bits */
374 #define SCS_CAP_COMPSTR 0x00000001
375 #define SCS_CAP_MAKEREAD 0x00000002
376 #define SCS_CAP_SETRECONVERTSTRING 0x00000004
377
378
379 /* IME WM_IME_SELECT inheritance Capability bits */
380 #define SELECT_CAP_CONVERSION 0x00000001
381 #define SELECT_CAP_SENTENCE 0x00000002
382
383
384 /* ID for deIndex of ImmGetGuideLine */
385 #define GGL_LEVEL 0x00000001
386 #define GGL_INDEX 0x00000002
387 #define GGL_STRING 0x00000003
388 #define GGL_PRIVATE 0x00000004
389
390 /* ID for dwLevel of GUIDELINE Structure */
391 #define GL_LEVEL_NOGUIDELINE 0x00000000
392 #define GL_LEVEL_FATAL 0x00000001
393 #define GL_LEVEL_ERROR 0x00000002
394 #define GL_LEVEL_WARNING 0x00000003
395 #define GL_LEVEL_INFORMATION 0x00000004
396
397 /* ID for dwIndex of GUIDELINE Structure */
398 #define GL_ID_UNKNOWN 0x00000000
399 #define GL_ID_NOMODULE 0x00000001
400 #define GL_ID_NODICTIONARY 0x00000010
401 #define GL_ID_CANNOTSAVE 0x00000011
402 #define GL_ID_NOCONVERT 0x00000020
403 #define GL_ID_TYPINGERROR 0x00000021
404 #define GL_ID_TOOMANYSTROKE 0x00000022
405 #define GL_ID_READINGCONFLICT 0x00000023
406 #define GL_ID_INPUTREADING 0x00000024
407 #define GL_ID_INPUTRADICAL 0x00000025
408 #define GL_ID_INPUTCODE 0x00000026
409 #define GL_ID_INPUTSYMBOL 0x00000027
410 #define GL_ID_CHOOSECANDIDATE 0x00000028
411 #define GL_ID_REVERSECONVERSION 0x00000029
412 #define GL_ID_PRIVATE_FIRST 0x00008000
413 #define GL_ID_PRIVATE_LAST 0x0000FFFF
414
415 /* ID for dwIndex of ImmGetProperty */
416 #define IGP_GETIMEVERSION (DWORD)(-4)
417 #define IGP_PROPERTY 0x00000004
418 #define IGP_CONVERSION 0x00000008
419 #define IGP_SENTENCE 0x0000000c
420 #define IGP_UI 0x00000010
421 #define IGP_SETCOMPSTR 0x00000014
422 #define IGP_SELECT 0x00000018
423
424
425 /* dwIndex for ImmSetCompositionString API */
426 #define SCS_SETSTR (GCS_COMPREADSTR|GCS_COMPSTR)
427 #define SCS_CHANGEATTR (GCS_COMPREADATTR|GCS_COMPATTR)
428 #define SCS_CHANGECLAUSE (GCS_COMPREADCLAUSE|GCS_COMPCLAUSE)
429 #define SCS_SETRECONVERTSTRING 0x00010000
430 #define SCS_QUERYRECONVERTSTRING 0x00020000
431
432 /* attribute for COMPOSITIONSTRING Structure */
433 #define ATTR_INPUT 0x00
434 #define ATTR_TARGET_CONVERTED 0x01
435 #define ATTR_CONVERTED 0x02
436 #define ATTR_TARGET_NOTCONVERTED 0x03
437 #define ATTR_INPUT_ERROR 0x04
438 #define ATTR_FIXEDCONVERTED 0x05
439
440
441 /* bit field for IMC_SETCOMPOSITIONWINDOW, IMC_SETCANDIDATEWINDOW */
442 #define CFS_DEFAULT 0x0000
443 #define CFS_RECT 0x0001
444 #define CFS_POINT 0x0002
445 #define CFS_FORCE_POSITION 0x0020
446 #define CFS_CANDIDATEPOS 0x0040
447 #define CFS_EXCLUDE 0x0080
448
449 /* conversion direction for ImmGetConversionList */
450 #define GCL_CONVERSION 0x0001
451 #define GCL_REVERSECONVERSION 0x0002
452 #define GCL_REVERSE_LENGTH 0x0003
453
454
455 /* bit field for conversion mode */
456 #define IME_CMODE_ALPHANUMERIC 0x0000
457 #define IME_CMODE_NATIVE 0x0001
458 #define IME_CMODE_CHINESE IME_CMODE_NATIVE
459 /* IME_CMODE_HANGEUL is old name of IME_CMODE_HANGUL. It will be gone eventually. */
460 #define IME_CMODE_HANGEUL IME_CMODE_NATIVE
461 #define IME_CMODE_HANGUL IME_CMODE_NATIVE
462 #define IME_CMODE_JAPANESE IME_CMODE_NATIVE
463 #define IME_CMODE_KATAKANA 0x0002 /* only effect under IME_CMODE_NATIVE */
464 #define IME_CMODE_LANGUAGE 0x0003
465 #define IME_CMODE_FULLSHAPE 0x0008
466 #define IME_CMODE_ROMAN 0x0010
467 #define IME_CMODE_CHARCODE 0x0020
468 #define IME_CMODE_HANJACONVERT 0x0040
469 #define IME_CMODE_SOFTKBD 0x0080
470 #define IME_CMODE_NOCONVERSION 0x0100
471 #define IME_CMODE_EUDC 0x0200
472 #define IME_CMODE_SYMBOL 0x0400
473 #define IME_CMODE_FIXED 0x0800
474
475
476 #define IME_SMODE_NONE 0x0000
477 #define IME_SMODE_PLAURALCLAUSE 0x0001
478 #define IME_SMODE_SINGLECONVERT 0x0002
479 #define IME_SMODE_AUTOMATIC 0x0004
480 #define IME_SMODE_PHRASEPREDICT 0x0008
481 #define IME_SMODE_CONVERSATION 0x0010
482
483 /* style of candidate */
484 #define IME_CAND_UNKNOWN 0x0000
485 #define IME_CAND_READ 0x0001
486 #define IME_CAND_CODE 0x0002
487 #define IME_CAND_MEANING 0x0003
488 #define IME_CAND_RADICAL 0x0004
489 #define IME_CAND_STROKE 0x0005
490
491
492 /* wParam of report message WM_IME_NOTIFY */
493 #define IMN_CLOSESTATUSWINDOW 0x0001
494 #define IMN_OPENSTATUSWINDOW 0x0002
495 #define IMN_CHANGECANDIDATE 0x0003
496 #define IMN_CLOSECANDIDATE 0x0004
497 #define IMN_OPENCANDIDATE 0x0005
498 #define IMN_SETCONVERSIONMODE 0x0006
499 #define IMN_SETSENTENCEMODE 0x0007
500 #define IMN_SETOPENSTATUS 0x0008
501 #define IMN_SETCANDIDATEPOS 0x0009
502 #define IMN_SETCOMPOSITIONFONT 0x000A
503 #define IMN_SETCOMPOSITIONWINDOW 0x000B
504 #define IMN_SETSTATUSWINDOWPOS 0x000C
505 #define IMN_GUIDELINE 0x000D
506 #define IMN_PRIVATE 0x000E
507
508
509 /* wParam of report message WM_IME_REQUEST */
510 #define IMR_COMPOSITIONWINDOW 0x0001
511 #define IMR_CANDIDATEWINDOW 0x0002
512 #define IMR_COMPOSITIONFONT 0x0003
513 #define IMR_RECONVERTSTRING 0x0004
514 #define IMR_CONFIRMRECONVERTSTRING 0x0005
515 #define IMR_QUERYCHARPOSITION 0x0006
516 #define IMR_DOCUMENTFEED 0x0007
517
518
519 /* error code of ImmGetCompositionString */
520 #define IMM_ERROR_NODATA (-1)
521 #define IMM_ERROR_GENERAL (-2)
522
523
524 /* dialog mode of ImmConfigureIME */
525 #define IME_CONFIG_GENERAL 1
526 #define IME_CONFIG_REGISTERWORD 2
527 #define IME_CONFIG_SELECTDICTIONARY 3
528
529 /* dialog mode of ImmEscape */
530 #define IME_ESC_QUERY_SUPPORT 0x0003
531 #define IME_ESC_RESERVED_FIRST 0x0004
532 #define IME_ESC_RESERVED_LAST 0x07FF
533 #define IME_ESC_PRIVATE_FIRST 0x0800
534 #define IME_ESC_PRIVATE_LAST 0x0FFF
535 #define IME_ESC_SEQUENCE_TO_INTERNAL 0x1001
536 #define IME_ESC_GET_EUDC_DICTIONARY 0x1003
537 #define IME_ESC_SET_EUDC_DICTIONARY 0x1004
538 #define IME_ESC_MAX_KEY 0x1005
539 #define IME_ESC_IME_NAME 0x1006
540 #define IME_ESC_SYNC_HOTKEY 0x1007
541 #define IME_ESC_HANJA_MODE 0x1008
542 #define IME_ESC_AUTOMATA 0x1009
543 #define IME_ESC_PRIVATE_HOTKEY 0x100a
544 #define IME_ESC_GETHELPFILENAME 0x100b
545
546
547 /* style of word registration */
548 #define IME_REGWORD_STYLE_EUDC 0x00000001
549 #define IME_REGWORD_STYLE_USER_FIRST 0x80000000
550 #define IME_REGWORD_STYLE_USER_LAST 0xFFFFFFFF
551
552
553 /* dwFlags for ImmAssociateContextEx */
554 #define IACE_CHILDREN 0x0001
555 #define IACE_DEFAULT 0x0010
556 #define IACE_IGNORENOCONTEXT 0x0020
557
558 /* dwFlags for ImmGetImeMenuItems */
559 #define IGIMIF_RIGHTMENU 0x0001
560
561 /* dwType for ImmGetImeMenuItems */
562 #define IGIMII_CMODE 0x0001
563 #define IGIMII_SMODE 0x0002
564 #define IGIMII_CONFIGURE 0x0004
565 #define IGIMII_TOOLS 0x0008
566 #define IGIMII_HELP 0x0010
567 #define IGIMII_OTHER 0x0020
568 #define IGIMII_INPUTTOOLS 0x0040
569
570 /* fType of IMEMENUITEMINFO structure */
571 #define IMFT_RADIOCHECK 0x00001
572 #define IMFT_SEPARATOR 0x00002
573 #define IMFT_SUBMENU 0x00004
574
575 /* fState of IMEMENUITEMINFO structure */
576 #define IMFS_GRAYED MFS_GRAYED
577 #define IMFS_DISABLED MFS_DISABLED
578 #define IMFS_CHECKED MFS_CHECKED
579 #define IMFS_HILITE MFS_HILITE
580 #define IMFS_ENABLED MFS_ENABLED
581 #define IMFS_UNCHECKED MFS_UNCHECKED
582 #define IMFS_UNHILITE MFS_UNHILITE
583 #define IMFS_DEFAULT MFS_DEFAULT
584
585
586 /*
587 * type of soft keyboard
588 * for Windows Tranditional Chinese Edition
589 */
590 #define SOFTKEYBOARD_TYPE_T1 0x0001
591 /* for Windows Simplified Chinese Edition */
592 #define SOFTKEYBOARD_TYPE_C1 0x0002
593
594
595 HIMC WINAPI ImmAssociateContext(HWND, HIMC);
596 BOOL WINAPI ImmAssociateContextEx(HWND, HIMC, DWORD);
597 BOOL WINAPI ImmConfigureIMEA(HKL, HWND, DWORD, LPVOID);
598 BOOL WINAPI ImmConfigureIMEW(HKL, HWND, DWORD, LPVOID);
599 #define ImmConfigureIME WINELIB_NAME_AW(ImmConfigureIME)
600 HIMC WINAPI ImmCreateContext(void);
601 BOOL WINAPI ImmDestroyContext(HIMC hIMC);
602 BOOL WINAPI ImmDisableIME(DWORD idThread);
603 UINT WINAPI ImmEnumRegisterWordA(HKL, REGISTERWORDENUMPROCA, LPCSTR, DWORD, LPCSTR, LPVOID);
604 UINT WINAPI ImmEnumRegisterWordW(HKL, REGISTERWORDENUMPROCW, LPCWSTR, DWORD, LPCWSTR, LPVOID);
605 #define ImmEnumRegisterWord WINELIB_NAME_AW(ImmEnumRegisterWord)
606 LRESULT WINAPI ImmEscapeA(HKL, HIMC, UINT, LPVOID);
607 LRESULT WINAPI ImmEscapeW(HKL, HIMC, UINT, LPVOID);
608 #define ImmEscape WINELIB_NAME_AW(ImmEscape)
609 DWORD WINAPI ImmGetCandidateListA(HIMC, DWORD, LPCANDIDATELIST, DWORD);
610 DWORD WINAPI ImmGetCandidateListW(HIMC, DWORD, LPCANDIDATELIST, DWORD);
611 #define ImmGetCandidateList WINELIB_NAME_AW(ImmGetCandidateList)
612 DWORD WINAPI ImmGetCandidateListCountA(HIMC, LPDWORD);
613 DWORD WINAPI ImmGetCandidateListCountW(HIMC, LPDWORD);
614 #define ImmGetCandidateListCount WINELIB_NAME_AW(ImmGetCandidateListCount)
615 BOOL WINAPI ImmGetCandidateWindow(HIMC, DWORD, LPCANDIDATEFORM);
616 #if defined(_WINGDI_) && !defined(NOGDI)
617 BOOL WINAPI ImmGetCompositionFontA(HIMC, LPLOGFONTA);
618 BOOL WINAPI ImmGetCompositionFontW(HIMC, LPLOGFONTW);
619 #define ImmGetCompositionFont WINELIB_NAME_AW(ImmGetCompositionFont)
620 BOOL WINAPI ImmSetCompositionFontA(HIMC, LPLOGFONTA);
621 BOOL WINAPI ImmSetCompositionFontW(HIMC, LPLOGFONTW);
622 #define ImmSetCompositionFont WINELIB_NAME_AW(ImmSetCompositionFont)
623 #endif
624 LONG WINAPI ImmGetCompositionStringA(HIMC, DWORD, LPVOID, DWORD);
625 LONG WINAPI ImmGetCompositionStringW(HIMC, DWORD, LPVOID, DWORD);
626 #define ImmGetCompositionString WINELIB_NAME_AW(ImmGetCompositionString)
627 BOOL WINAPI ImmGetCompositionWindow(HIMC, LPCOMPOSITIONFORM);
628 HIMC WINAPI ImmGetContext(HWND);
629 DWORD WINAPI ImmGetConversionListA(HKL, HIMC, LPCSTR, LPCANDIDATELIST, DWORD, UINT);
630 DWORD WINAPI ImmGetConversionListW(HKL, HIMC, LPCWSTR, LPCANDIDATELIST, DWORD, UINT);
631 #define ImmGetConversionList WINELIB_NAME_AW(ImmGetConversionList)
632 BOOL WINAPI ImmGetConversionStatus(HIMC, LPDWORD, LPDWORD);
633 HWND WINAPI ImmGetDefaultIMEWnd(HWND);
634 UINT WINAPI ImmGetDescriptionA(HKL, LPSTR, UINT);
635 UINT WINAPI ImmGetDescriptionW(HKL, LPWSTR, UINT);
636 #define ImmGetDescription WINELIB_NAME_AW(ImmGetDescription)
637 DWORD WINAPI ImmGetGuideLineA(HIMC, DWORD, LPSTR, DWORD);
638 DWORD WINAPI ImmGetGuideLineW(HIMC, DWORD, LPWSTR, DWORD);
639 #define ImmGetGuideLine WINELIB_NAME_AW(ImmGetGuideLine)
640 UINT WINAPI ImmGetIMEFileNameA(HKL, LPSTR, UINT);
641 UINT WINAPI ImmGetIMEFileNameW(HKL, LPWSTR, UINT);
642 #define ImmGetIMEFileName WINELIB_NAME_AW(ImmGetIMEFileName)
643 DWORD WINAPI ImmGetImeMenuItemsA(HIMC, DWORD, DWORD, LPIMEMENUITEMINFOA, LPIMEMENUITEMINFOA, DWORD);
644 DWORD WINAPI ImmGetImeMenuItemsW(HIMC, DWORD, DWORD, LPIMEMENUITEMINFOW, LPIMEMENUITEMINFOW, DWORD);
645 #define ImmGetImeMenuItems WINELIB_NAME_AW(ImmGetImeMenuItems)
646 BOOL WINAPI ImmGetOpenStatus(HIMC);
647 DWORD WINAPI ImmGetProperty(HKL, DWORD);
648 UINT WINAPI ImmGetRegisterWordStyleA(HKL, UINT, LPSTYLEBUFA);
649 UINT WINAPI ImmGetRegisterWordStyleW(HKL, UINT, LPSTYLEBUFW);
650 #define ImmGetRegisterWordStyle WINELIB_NAME_AW(ImmGetRegisterWordStyle)
651 BOOL WINAPI ImmGetStatusWindowPos(HIMC, LPPOINT);
652 UINT WINAPI ImmGetVirtualKey(HWND);
653 HKL WINAPI ImmInstallIMEA(LPCSTR, LPCSTR);
654 HKL WINAPI ImmInstallIMEW(LPCWSTR, LPCWSTR);
655 #define ImmInstallIME WINELIB_NAME_AW(ImmInstallIME)
656 BOOL WINAPI ImmIsIME(HKL);
657 BOOL WINAPI ImmIsUIMessageA(HWND, UINT, WPARAM, LPARAM);
658 BOOL WINAPI ImmIsUIMessageW(HWND, UINT, WPARAM, LPARAM);
659 #define ImmIsUIMessage WINELIB_NAME_AW(ImmIsUIMessage)
660 BOOL WINAPI ImmNotifyIME(HIMC, DWORD, DWORD, DWORD);
661 BOOL WINAPI ImmProcessKey(HWND, HKL, UINT, LPARAM, DWORD);
662 BOOL WINAPI ImmRegisterWordA(HKL, LPCSTR, DWORD, LPCSTR);
663 BOOL WINAPI ImmRegisterWordW(HKL, LPCWSTR, DWORD, LPCWSTR);
664 #define ImmRegisterWord WINELIB_NAME_AW(ImmRegisterWord)
665 BOOL WINAPI ImmReleaseContext(HWND, HIMC);
666 BOOL WINAPI ImmSetCandidateWindow(HIMC, LPCANDIDATEFORM);
667 BOOL WINAPI ImmSetCompositionStringA(HIMC, DWORD, LPCVOID, DWORD, LPCVOID, DWORD);
668 BOOL WINAPI ImmSetCompositionStringW(HIMC, DWORD, LPCVOID, DWORD, LPCVOID, DWORD);
669 #define ImmSetCompositionString WINELIB_NAME_AW(ImmSetCompositionString)
670 BOOL WINAPI ImmSetCompositionWindow(HIMC, LPCOMPOSITIONFORM);
671 BOOL WINAPI ImmSetConversionStatus(HIMC, DWORD, DWORD);
672 BOOL WINAPI ImmSetOpenStatus(HIMC, BOOL);
673 BOOL WINAPI ImmSetStatusWindowPos(HIMC, LPPOINT);
674 BOOL WINAPI ImmSimulateHotKey(HWND, DWORD);
675 BOOL WINAPI ImmUnregisterWordA(HKL, LPCSTR, DWORD, LPCSTR);
676 BOOL WINAPI ImmUnregisterWordW(HKL, LPCWSTR, DWORD, LPCWSTR);
677 #define ImmUnregisterWord WINELIB_NAME_AW(ImmUnregisterWord)
678
679
680 #ifdef __cplusplus
681 }
682 #endif
683
684 #endif /* __WINE_IMM_H */