Removed another bad assert and two no longer needed ones.
[wine/multimedia.git] / include / imm.h
blob856d396d712c170cfbce08823727f21ce1e5056c
1 /*
2 * imm.h - Declarations for IMM32
3 */
5 #ifndef __WINE_IMM_H
6 #define __WINE_IMM_H
8 #include "windef.h"
10 #ifdef __cplusplus
11 extern "C" {
12 #endif
14 typedef HANDLE HIMC;
15 typedef HANDLE HIMCC;
18 typedef int CALLBACK (*REGISTERWORDENUMPROCA)(LPCSTR, DWORD, LPCSTR, LPVOID);
19 typedef int CALLBACK (*REGISTERWORDENUMPROCW)(LPCWSTR, DWORD, LPCWSTR, LPVOID);
21 typedef struct tagCANDIDATEFORM
23 DWORD dwIndex;
24 DWORD dwStyle;
25 POINT ptCurrentPos;
26 RECT rcArea;
27 } CANDIDATEFORM, *LPCANDIDATEFORM;
29 typedef struct tagCANDIDATELIST
31 DWORD dwSize;
32 DWORD dwStyle;
33 DWORD dwCount;
34 DWORD dwSelection;
35 DWORD dwPageStart;
36 DWORD dwPageSize;
37 DWORD dwOffset[1];
38 } CANDIDATELIST, *LPCANDIDATELIST;
40 typedef struct tagSTYLEBUFA
42 DWORD dwStyle;
43 CHAR szDescription[32];
44 } STYLEBUFA, *LPSTYLEBUFA;
46 typedef struct tagSTYLEBUFW
48 DWORD dwStyle;
49 WCHAR szDescription[32];
50 } STYLEBUFW, *LPSTYLEBUFW;
52 DECL_WINELIB_TYPE_AW(STYLEBUF)
53 DECL_WINELIB_TYPE_AW(LPSTYLEBUF)
55 typedef struct _tagCOMPOSITIONFORM
57 DWORD dwStyle;
58 POINT ptCurrentPos;
59 RECT rcArea;
60 } COMPOSITIONFORM, *LPCOMPOSITIONFORM;
62 /* wParam for WM_IME_CONTROL */
63 #define IMC_GETCANDIDATEPOS 0x0007
64 #define IMC_SETCANDIDATEPOS 0x0008
65 #define IMC_GETCOMPOSITIONFONT 0x0009
66 #define IMC_SETCOMPOSITIONFONT 0x000A
67 #define IMC_GETCOMPOSITIONWINDOW 0x000B
68 #define IMC_SETCOMPOSITIONWINDOW 0x000C
69 #define IMC_GETSTATUSWINDOWPOS 0x000F
70 #define IMC_SETSTATUSWINDOWPOS 0x0010
71 #define IMC_CLOSESTATUSWINDOW 0x0021
72 #define IMC_OPENSTATUSWINDOW 0x0022
75 * wParam for WM_IME_CONTROL to the soft keyboard
76 * dwAction for ImmNotifyIME
78 #define NI_OPENCANDIDATE 0x0010
79 #define NI_CLOSECANDIDATE 0x0011
80 #define NI_SELECTCANDIDATESTR 0x0012
81 #define NI_CHANGECANDIDATELIST 0x0013
82 #define NI_FINALIZECONVERSIONRESULT 0x0014
83 #define NI_COMPOSITIONSTR 0x0015
84 #define NI_SETCANDIDATE_PAGESTART 0x0016
85 #define NI_SETCANDIDATE_PAGESIZE 0x0017
87 /* lParam for WM_IME_SETCONTEXT */
88 #define ISC_SHOWUICANDIDATEWINDOW 0x00000001
89 #define ISC_SHOWUICOMPOSITIONWINDOW 0x80000000
90 #define ISC_SHOWUIGUIDELINE 0x40000000
91 #define ISC_SHOWUIALLCANDIDATEWINDOW 0x0000000F
92 #define ISC_SHOWUIALL 0xC000000F
95 /* dwIndex for ImmNotifyIME/NI_COMPOSITIONSTR */
96 #define CPS_COMPLETE 0x0001
97 #define CPS_CONVERT 0x0002
98 #define CPS_REVERT 0x0003
99 #define CPS_CANCEL 0x0004
102 /* the modifiers of hot key */
103 #define MOD_ALT 0x0001
104 #define MOD_CONTROL 0x0002
105 #define MOD_SHIFT 0x0004
107 #define MOD_LEFT 0x8000
108 #define MOD_RIGHT 0x4000
110 #define MOD_ON_KEYUP 0x0800
111 #define MOD_IGNORE_ALL_MODIFIER 0x0400
114 /* Windows for Simplified Chinese Edition hot key ID from 0x10 - 0x2F */
115 #define IME_CHOTKEY_IME_NONIME_TOGGLE 0x10
116 #define IME_CHOTKEY_SHAPE_TOGGLE 0x11
117 #define IME_CHOTKEY_SYMBOL_TOGGLE 0x12
119 /* Windows for Japanese Edition hot key ID from 0x30 - 0x4F */
120 #define IME_JHOTKEY_CLOSE_OPEN 0x30
122 /* Windows for Korean Edition hot key ID from 0x50 - 0x6F */
123 #define IME_KHOTKEY_SHAPE_TOGGLE 0x50
124 #define IME_KHOTKEY_HANJACONVERT 0x51
125 #define IME_KHOTKEY_ENGLISH 0x52
126 /* Windows for Tranditional Chinese Edition hot key ID from 0x70 - 0x8F */
127 #define IME_THOTKEY_IME_NONIME_TOGGLE 0x70
128 #define IME_THOTKEY_SHAPE_TOGGLE 0x71
129 #define IME_THOTKEY_SYMBOL_TOGGLE 0x72
131 /* direct switch hot key ID from 0x100 - 0x11F */
132 #define IME_HOTKEY_DSWITCH_FIRST 0x100
133 #define IME_HOTKEY_DSWITCH_LAST 0x11F
135 /* IME private hot key from 0x200 - 0x21F */
136 #define IME_HOTKEY_PRIVATE_FIRST 0x200
137 #define IME_ITHOTKEY_RESEND_RESULTSTR 0x200
138 #define IME_ITHOTKEY_PREVIOUS_COMPOSITION 0x201
139 #define IME_ITHOTKEY_UISTYLE_TOGGLE 0x202
140 #define IME_HOTKEY_PRIVATE_LAST 0x21F
144 * dwSystemInfoFlags bits
145 * parameter of ImmGetCompositionString
147 #define GCS_COMPREADSTR 0x0001
148 #define GCS_COMPREADATTR 0x0002
149 #define GCS_COMPREADCLAUSE 0x0004
150 #define GCS_COMPSTR 0x0008
151 #define GCS_COMPATTR 0x0010
152 #define GCS_COMPCLAUSE 0x0020
153 #define GCS_CURSORPOS 0x0080
154 #define GCS_DELTASTART 0x0100
155 #define GCS_RESULTREADSTR 0x0200
156 #define GCS_RESULTREADCLAUSE 0x0400
157 #define GCS_RESULTSTR 0x0800
158 #define GCS_RESULTCLAUSE 0x1000
160 /* style bit flags for WM_IME_COMPOSITION */
161 #define CS_INSERTCHAR 0x2000
162 #define CS_NOMOVECARET 0x4000
166 * bits of fdwInit of INPUTCONTEXT
167 * IME version constants
169 #define IMEVER_0310 0x0003000A
170 #define IMEVER_0400 0x00040000
173 /* IME property bits */
174 #define IME_PROP_AT_CARET 0x00010000
175 #define IME_PROP_SPECIAL_UI 0x00020000
176 #define IME_PROP_CANDLIST_START_FROM_1 0x00040000
177 #define IME_PROP_UNICODE 0x00080000
180 /* IME UICapability bits */
181 #define UI_CAP_2700 0x00000001
182 #define UI_CAP_ROT90 0x00000002
183 #define UI_CAP_ROTANY 0x00000004
184 /* ImmSetCompositionString Capability bits */
185 #define SCS_CAP_COMPSTR 0x00000001
186 #define SCS_CAP_MAKEREAD 0x00000002
189 /* IME WM_IME_SELECT inheritance Capability bits */
190 #define SELECT_CAP_CONVERSION 0x00000001
191 #define SELECT_CAP_SENTENCE 0x00000002
194 /* ID for deIndex of ImmGetGuideLine */
195 #define GGL_LEVEL 0x00000001
196 #define GGL_INDEX 0x00000002
197 #define GGL_STRING 0x00000003
198 #define GGL_PRIVATE 0x00000004
200 /* ID for dwLevel of GUIDELINE Structure */
201 #define GL_LEVEL_NOGUIDELINE 0x00000000
202 #define GL_LEVEL_FATAL 0x00000001
203 #define GL_LEVEL_ERROR 0x00000002
204 #define GL_LEVEL_WARNING 0x00000003
205 #define GL_LEVEL_INFORMATION 0x00000004
207 /* ID for dwIndex of GUIDELINE Structure */
208 #define GL_ID_UNKNOWN 0x00000000
209 #define GL_ID_NOMODULE 0x00000001
210 #define GL_ID_NODICTIONARY 0x00000010
211 #define GL_ID_CANNOTSAVE 0x00000011
212 #define GL_ID_NOCONVERT 0x00000020
213 #define GL_ID_TYPINGERROR 0x00000021
214 #define GL_ID_TOOMANYSTROKE 0x00000022
215 #define GL_ID_READINGCONFLICT 0x00000023
216 #define GL_ID_INPUTREADING 0x00000024
217 #define GL_ID_INPUTRADICAL 0x00000025
218 #define GL_ID_INPUTCODE 0x00000026
219 #define GL_ID_INPUTSYMBOL 0x00000027
220 #define GL_ID_CHOOSECANDIDATE 0x00000028
221 #define GL_ID_REVERSECONVERSION 0x00000029
222 #define GL_ID_PRIVATE_FIRST 0x00008000
223 #define GL_ID_PRIVATE_LAST 0x0000FFFF
225 /* ID for dwIndex of ImmGetProperty */
226 #define IGP_GETIMEVERSION (DWORD)(-4)
227 #define IGP_PROPERTY 0x00000004
228 #define IGP_CONVERSION 0x00000008
229 #define IGP_SENTENCE 0x0000000c
230 #define IGP_UI 0x00000010
231 #define IGP_SETCOMPSTR 0x00000014
232 #define IGP_SELECT 0x00000018
235 /* dwIndex for ImmSetCompositionString API */
236 #define SCS_SETSTR (GCS_COMPREADSTR|GCS_COMPSTR)
237 #define SCS_CHANGEATTR (GCS_COMPREADATTR|GCS_COMPATTR)
238 #define SCS_CHANGECLAUSE (GCS_COMPREADCLAUSE|GCS_COMPCLAUSE)
239 /* attribute for COMPOSITIONSTRING Structure */
240 #define ATTR_INPUT 0x00
241 #define ATTR_TARGET_CONVERTED 0x01
242 #define ATTR_CONVERTED 0x02
243 #define ATTR_TARGET_NOTCONVERTED 0x03
244 #define ATTR_INPUT_ERROR 0x04
247 /* bit field for IMC_SETCOMPOSITIONWINDOW, IMC_SETCANDIDATEWINDOW */
248 #define CFS_DEFAULT 0x0000
249 #define CFS_RECT 0x0001
250 #define CFS_POINT 0x0002
251 #define CFS_FORCE_POSITION 0x0020
252 #define CFS_CANDIDATEPOS 0x0040
253 #define CFS_EXCLUDE 0x0080
255 /* conversion direction for ImmGetConversionList */
256 #define GCL_CONVERSION 0x0001
257 #define GCL_REVERSECONVERSION 0x0002
258 #define GCL_REVERSE_LENGTH 0x0003
261 /* bit field for conversion mode */
262 #define IME_CMODE_ALPHANUMERIC 0x0000
263 #define IME_CMODE_NATIVE 0x0001
264 #define IME_CMODE_CHINESE IME_CMODE_NATIVE
265 /* IME_CMODE_HANGEUL is old name of IME_CMODE_HANGUL. It will be gone eventually. */
266 #define IME_CMODE_HANGEUL IME_CMODE_NATIVE
267 #define IME_CMODE_HANGUL IME_CMODE_NATIVE
268 #define IME_CMODE_JAPANESE IME_CMODE_NATIVE
269 #define IME_CMODE_KATAKANA 0x0002 /* only effect under IME_CMODE_NATIVE */
270 #define IME_CMODE_LANGUAGE 0x0003
271 #define IME_CMODE_FULLSHAPE 0x0008
272 #define IME_CMODE_ROMAN 0x0010
273 #define IME_CMODE_CHARCODE 0x0020
274 #define IME_CMODE_HANJACONVERT 0x0040
275 #define IME_CMODE_SOFTKBD 0x0080
276 #define IME_CMODE_NOCONVERSION 0x0100
277 #define IME_CMODE_EUDC 0x0200
278 #define IME_CMODE_SYMBOL 0x0400
281 #define IME_SMODE_NONE 0x0000
282 #define IME_SMODE_PLAURALCLAUSE 0x0001
283 #define IME_SMODE_SINGLECONVERT 0x0002
284 #define IME_SMODE_AUTOMATIC 0x0004
285 #define IME_SMODE_PHRASEPREDICT 0x0008
287 /* style of candidate */
288 #define IME_CAND_UNKNOWN 0x0000
289 #define IME_CAND_READ 0x0001
290 #define IME_CAND_CODE 0x0002
291 #define IME_CAND_MEANING 0x0003
292 #define IME_CAND_RADICAL 0x0004
293 #define IME_CAND_STROKE 0x0005
296 /* wParam of report message WM_IME_NOTIFY */
297 #define IMN_CLOSESTATUSWINDOW 0x0001
298 #define IMN_OPENSTATUSWINDOW 0x0002
299 #define IMN_CHANGECANDIDATE 0x0003
300 #define IMN_CLOSECANDIDATE 0x0004
301 #define IMN_OPENCANDIDATE 0x0005
302 #define IMN_SETCONVERSIONMODE 0x0006
303 #define IMN_SETSENTENCEMODE 0x0007
304 #define IMN_SETOPENSTATUS 0x0008
305 #define IMN_SETCANDIDATEPOS 0x0009
306 #define IMN_SETCOMPOSITIONFONT 0x000A
307 #define IMN_SETCOMPOSITIONWINDOW 0x000B
308 #define IMN_SETSTATUSWINDOWPOS 0x000C
309 #define IMN_GUIDELINE 0x000D
310 #define IMN_PRIVATE 0x000E
313 /* error code of ImmGetCompositionString */
314 #define IMM_ERROR_NODATA (-1)
315 #define IMM_ERROR_GENERAL (-2)
318 /* dialog mode of ImmConfigureIME */
319 #define IME_CONFIG_GENERAL 1
320 #define IME_CONFIG_REGISTERWORD 2
321 #define IME_CONFIG_SELECTDICTIONARY 3
323 /* dialog mode of ImmEscape */
324 #define IME_ESC_QUERY_SUPPORT 0x0003
325 #define IME_ESC_RESERVED_FIRST 0x0004
326 #define IME_ESC_RESERVED_LAST 0x07FF
327 #define IME_ESC_PRIVATE_FIRST 0x0800
328 #define IME_ESC_PRIVATE_LAST 0x0FFF
329 #define IME_ESC_SEQUENCE_TO_INTERNAL 0x1001
330 #define IME_ESC_GET_EUDC_DICTIONARY 0x1003
331 #define IME_ESC_SET_EUDC_DICTIONARY 0x1004
332 #define IME_ESC_MAX_KEY 0x1005
333 #define IME_ESC_IME_NAME 0x1006
334 #define IME_ESC_SYNC_HOTKEY 0x1007
335 #define IME_ESC_HANJA_MODE 0x1008
336 #define IME_ESC_AUTOMATA 0x1009
337 #define IME_ESC_PRIVATE_HOTKEY 0x100a
340 /* style of word registration */
341 #define IME_REGWORD_STYLE_EUDC 0x00000001
342 #define IME_REGWORD_STYLE_USER_FIRST 0x80000000
343 #define IME_REGWORD_STYLE_USER_LAST 0xFFFFFFFF
346 * type of soft keyboard
347 * for Windows Tranditional Chinese Edition
349 #define SOFTKEYBOARD_TYPE_T1 0x0001
350 /* for Windows Simplified Chinese Edition */
351 #define SOFTKEYBOARD_TYPE_C1 0x0002
354 HIMC WINAPI ImmAssociateContext(HWND, HIMC);
355 BOOL WINAPI ImmConfigureIMEA(HKL, HWND, DWORD, LPVOID);
356 BOOL WINAPI ImmConfigureIMEW(HKL, HWND, DWORD, LPVOID);
357 #define ImmConfigureIME WINELIB_NAME_AW(ImmConfigureIME)
358 HIMC WINAPI ImmCreateContext();
359 BOOL WINAPI ImmDestroyContext(HIMC hIMC);
360 UINT WINAPI ImmEnumRegisterWordA(HKL, REGISTERWORDENUMPROCA, LPCSTR, DWORD, LPCSTR, LPVOID);
361 UINT WINAPI ImmEnumRegisterWordW(HKL, REGISTERWORDENUMPROCW, LPCWSTR, DWORD, LPCWSTR, LPVOID);
362 #define ImmEnumRegisterWord WINELIB_NAME_AW(ImmEnumRegisterWord)
363 LRESULT WINAPI ImmEscapeA(HKL, HIMC, UINT, LPVOID);
364 LRESULT WINAPI ImmEscapeW(HKL, HIMC, UINT, LPVOID);
365 #define ImmEscape WINELIB_NAME_AW(ImmEscape)
366 DWORD WINAPI ImmGetCandidateListA(HIMC, DWORD, LPCANDIDATELIST, DWORD);
367 DWORD WINAPI ImmGetCandidateListW(HIMC, DWORD, LPCANDIDATELIST, DWORD);
368 #define ImmGetCandidateList WINELIB_NAME_AW(ImmGetCandidateList)
369 DWORD WINAPI ImmGetCandidateListCountA(HIMC, LPDWORD);
370 DWORD WINAPI ImmGetCandidateListCountW(HIMC, LPDWORD);
371 #define ImmGetCandidateListCount WINELIB_NAME_AW(ImmGetCandidateListCount)
372 BOOL WINAPI ImmGetCandidateWindow(HIMC, DWORD, LPCANDIDATEFORM);
373 BOOL WINAPI ImmGetCompositionFontA(HIMC, LPLOGFONTA);
374 BOOL WINAPI ImmGetCompositionFontW(HIMC, LPLOGFONTW);
375 #define ImmGetCompositionFont WINELIB_NAME_AW(ImmGetCompositionFont)
376 LONG WINAPI ImmGetCompositionStringA(HIMC, DWORD, LPVOID, DWORD);
377 LONG WINAPI ImmGetCompositionStringW(HIMC, DWORD, LPVOID, DWORD);
378 #define ImmGetCompositionString WINELIB_NAME_AW(ImmGetCompositionString)
379 BOOL WINAPI ImmGetCompositionWindow(HIMC, LPCOMPOSITIONFORM);
380 HIMC WINAPI ImmGetContext(HWND);
381 DWORD WINAPI ImmGetConversionListA(HKL, HIMC, LPCSTR, LPCANDIDATELIST, DWORD, UINT);
382 DWORD WINAPI ImmGetConversionListW(HKL, HIMC, LPCWSTR, LPCANDIDATELIST, DWORD, UINT);
383 #define ImmGetConversionList WINELIB_NAME_AW(ImmGetConversionList)
384 BOOL WINAPI ImmGetConversionStatus(HIMC, LPDWORD, LPDWORD);
385 HWND WINAPI ImmGetDefaultIMEWnd(HWND);
386 UINT WINAPI ImmGetDescriptionA(HKL, LPSTR, UINT);
387 UINT WINAPI ImmGetDescriptionW(HKL, LPWSTR, UINT);
388 #define ImmGetDescription WINELIB_NAME_AW(ImmGetDescription)
389 DWORD WINAPI ImmGetGuideLineA(HIMC, DWORD, LPSTR, DWORD);
390 DWORD WINAPI ImmGetGuideLineW(HIMC, DWORD, LPWSTR, DWORD);
391 #define ImmGetGuideLine WINELIB_NAME_AW(ImmGetGuideLine)
392 UINT WINAPI ImmGetIMEFileNameA(HKL, LPSTR, UINT);
393 UINT WINAPI ImmGetIMEFileNameW(HKL, LPWSTR, UINT);
394 #define ImmGetIMEFileName WINELIB_NAME_AW(ImmGetIMEFileName)
395 BOOL WINAPI ImmGetOpenStatus(HIMC);
396 DWORD WINAPI ImmGetProperty(HKL, DWORD);
397 UINT WINAPI ImmGetRegisterWordStyleA(HKL, UINT, LPSTYLEBUFA);
398 UINT WINAPI ImmGetRegisterWordStyleW(HKL, UINT, LPSTYLEBUFW);
399 #define ImmGetRegisterWordStyle WINELIB_NAME_AW(ImmGetRegisterWordStyle)
400 BOOL WINAPI ImmGetStatusWindowPos(HIMC, LPPOINT);
401 UINT WINAPI ImmGetVirtualKey(HWND);
402 HKL WINAPI ImmInstallIMEA(LPCSTR, LPCSTR);
403 HKL WINAPI ImmInstallIMEW(LPCWSTR, LPCWSTR);
404 #define ImmInstallIME WINELIB_NAME_AW(ImmInstallIME)
405 BOOL WINAPI ImmIsIME(HKL);
406 BOOL WINAPI ImmIsUIMessageA(HWND, UINT, WPARAM, LPARAM);
407 BOOL WINAPI ImmIsUIMessageW(HWND, UINT, WPARAM, LPARAM);
408 #define ImmIsUIMessage WINELIB_NAME_AW(ImmIsUIMessage)
409 BOOL WINAPI ImmNotifyIME(HIMC, DWORD, DWORD, DWORD);
410 BOOL WINAPI ImmRegisterWordA(HKL, LPCSTR, DWORD, LPCSTR);
411 BOOL WINAPI ImmRegisterWordW(HKL, LPCWSTR, DWORD, LPCWSTR);
412 #define ImmRegisterWord WINELIB_NAME_AW(ImmRegisterWord)
413 BOOL WINAPI ImmReleaseContext(HWND, HIMC);
414 BOOL WINAPI ImmSetCandidateWindow(HIMC, LPCANDIDATEFORM);
415 BOOL WINAPI ImmSetCompositionFontA(HIMC, LPLOGFONTA);
416 BOOL WINAPI ImmSetCompositionFontW(HIMC, LPLOGFONTW);
417 #define ImmSetCompositionFont WINELIB_NAME_AW(ImmSetCompositionFont)
418 BOOL WINAPI ImmSetCompositionStringA(HIMC, DWORD, LPCVOID, DWORD, LPCVOID, DWORD);
419 BOOL WINAPI ImmSetCompositionStringW(HIMC, DWORD, LPCVOID, DWORD, LPCVOID, DWORD);
420 #define ImmSetCompositionString WINELIB_NAME_AW(ImmSetCompositionString)
421 BOOL WINAPI ImmSetCompositionWindow(HIMC, LPCOMPOSITIONFORM);
422 BOOL WINAPI ImmSetConversionStatus(HIMC, DWORD, DWORD);
423 BOOL WINAPI ImmSetOpenStatus(HIMC, BOOL);
424 BOOL WINAPI ImmSetStatusWindowPos(HIMC, LPPOINT);
425 BOOL WINAPI ImmSimulateHotKey(HWND, DWORD);
426 BOOL WINAPI ImmUnregisterWordA(HKL, LPCSTR, DWORD, LPCSTR);
427 BOOL WINAPI ImmUnregisterWordW(HKL, LPCWSTR, DWORD, LPCWSTR);
428 #define ImmUnregisterWord WINELIB_NAME_AW(ImmUnregisterWord)
430 #ifdef __cplusplus
432 #endif
434 #endif /* __WINE_IMM_H */