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

Last change on this file since 4 was 4, checked in by ktk, 26 years ago

Import

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