source: trunk/include/win/imm.h@ 10367

Last change on this file since 10367 was 7953, checked in by phaller, 24 years ago

Added missing prototypes

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