blob: 769d3f5ea3e6d41cc9131a329013ac13024d0dce [file] [log] [blame]
Alexandre Julliarda0d77311998-09-13 16:32:00 +00001/*
Alexandre Julliard0799c1a2002-03-09 23:29:33 +00002 * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
Alexandre Julliarda0d77311998-09-13 16:32:00 +000019 */
20
21#ifndef __WINE_IMM_H
22#define __WINE_IMM_H
23
Paul Quinnea1640f1999-03-10 18:03:53 +000024#ifdef __cplusplus
25extern "C" {
26#endif
27
Alexandre Julliarda3960291999-02-26 11:11:13 +000028typedef HANDLE HIMC;
29typedef HANDLE HIMCC;
Alexandre Julliarda0d77311998-09-13 16:32:00 +000030
Alexandre Julliarda0d77311998-09-13 16:32:00 +000031
Patrik Stridvallf94462f2002-01-31 23:22:07 +000032typedef int (CALLBACK *REGISTERWORDENUMPROCA)(LPCSTR, DWORD, LPCSTR, LPVOID);
33typedef int (CALLBACK *REGISTERWORDENUMPROCW)(LPCWSTR, DWORD, LPCWSTR, LPVOID);
Alexandre Julliarda0d77311998-09-13 16:32:00 +000034
Paul Quinnea1640f1999-03-10 18:03:53 +000035typedef struct tagCANDIDATEFORM
36{
37 DWORD dwIndex;
38 DWORD dwStyle;
39 POINT ptCurrentPos;
40 RECT rcArea;
41} CANDIDATEFORM, *LPCANDIDATEFORM;
Alexandre Julliarda0d77311998-09-13 16:32:00 +000042
Paul Quinnea1640f1999-03-10 18:03:53 +000043typedef struct tagCANDIDATELIST
44{
45 DWORD dwSize;
46 DWORD dwStyle;
47 DWORD dwCount;
48 DWORD dwSelection;
49 DWORD dwPageStart;
50 DWORD dwPageSize;
51 DWORD dwOffset[1];
52} CANDIDATELIST, *LPCANDIDATELIST;
Alexandre Julliarda0d77311998-09-13 16:32:00 +000053
Paul Quinnea1640f1999-03-10 18:03:53 +000054typedef struct tagSTYLEBUFA
55{
56 DWORD dwStyle;
57 CHAR szDescription[32];
58} STYLEBUFA, *LPSTYLEBUFA;
59
60typedef struct tagSTYLEBUFW
61{
62 DWORD dwStyle;
63 WCHAR szDescription[32];
64} STYLEBUFW, *LPSTYLEBUFW;
65
66DECL_WINELIB_TYPE_AW(STYLEBUF)
67DECL_WINELIB_TYPE_AW(LPSTYLEBUF)
68
Hidenori Takeshima14d6c022000-12-05 20:45:45 +000069typedef struct tagRECONVERTSTRING
70{
71 DWORD dwSize;
72 DWORD dwVersion;
73 DWORD dwStrLen;
74 DWORD dwStrOffset;
75 DWORD dwCompStrLen;
76 DWORD dwCompStrOffset;
77 DWORD dwTargetStrLen;
78 DWORD dwTargetStrOffset;
79} RECONVERTSTRING, *LPRECONVERTSTRING;
80
81
82#define IMEMENUITEM_STRING_SIZE 80
83
84typedef struct tagIMEMENUITEMINFOA
85{
86 UINT cbSize;
87 UINT fType;
88 UINT fState;
89 UINT wID;
90 HBITMAP hbmpChecked;
91 HBITMAP hbmpUnchecked;
92 DWORD dwItemData;
93 CHAR szString[IMEMENUITEM_STRING_SIZE];
94 HBITMAP hbmpItem;
95} IMEMENUITEMINFOA, *LPIMEMENUITEMINFOA;
96
97typedef struct tagIMEMENUITEMINFOW
98{
99 UINT cbSize;
100 UINT fType;
101 UINT fState;
102 UINT wID;
103 HBITMAP hbmpChecked;
104 HBITMAP hbmpUnchecked;
105 DWORD dwItemData;
106 WCHAR szString[IMEMENUITEM_STRING_SIZE];
107 HBITMAP hbmpItem;
108} IMEMENUITEMINFOW, *LPIMEMENUITEMINFOW;
109
110DECL_WINELIB_TYPE_AW(IMEMENUITEMINFO)
111DECL_WINELIB_TYPE_AW(LPIMEMENUITEMINFO)
112
Hidenori Takeshima14d6c022000-12-05 20:45:45 +0000113
Paul Quinnea1640f1999-03-10 18:03:53 +0000114typedef struct _tagCOMPOSITIONFORM
115{
116 DWORD dwStyle;
117 POINT ptCurrentPos;
118 RECT rcArea;
119} COMPOSITIONFORM, *LPCOMPOSITIONFORM;
120
Patrik Stridvall0f8bc5b1999-04-22 16:27:50 +0000121/* wParam for WM_IME_CONTROL */
Paul Quinnea1640f1999-03-10 18:03:53 +0000122#define IMC_GETCANDIDATEPOS 0x0007
123#define IMC_SETCANDIDATEPOS 0x0008
124#define IMC_GETCOMPOSITIONFONT 0x0009
125#define IMC_SETCOMPOSITIONFONT 0x000A
126#define IMC_GETCOMPOSITIONWINDOW 0x000B
127#define IMC_SETCOMPOSITIONWINDOW 0x000C
128#define IMC_GETSTATUSWINDOWPOS 0x000F
129#define IMC_SETSTATUSWINDOWPOS 0x0010
130#define IMC_CLOSESTATUSWINDOW 0x0021
131#define IMC_OPENSTATUSWINDOW 0x0022
132
Patrik Stridvall0f8bc5b1999-04-22 16:27:50 +0000133/*
134 * wParam for WM_IME_CONTROL to the soft keyboard
135 * dwAction for ImmNotifyIME
136 */
Paul Quinnea1640f1999-03-10 18:03:53 +0000137#define NI_OPENCANDIDATE 0x0010
138#define NI_CLOSECANDIDATE 0x0011
139#define NI_SELECTCANDIDATESTR 0x0012
140#define NI_CHANGECANDIDATELIST 0x0013
141#define NI_FINALIZECONVERSIONRESULT 0x0014
142#define NI_COMPOSITIONSTR 0x0015
143#define NI_SETCANDIDATE_PAGESTART 0x0016
144#define NI_SETCANDIDATE_PAGESIZE 0x0017
Hidenori Takeshima14d6c022000-12-05 20:45:45 +0000145#define NI_IMEMENUSELECTED 0x0018
Paul Quinnea1640f1999-03-10 18:03:53 +0000146
Patrik Stridvall0f8bc5b1999-04-22 16:27:50 +0000147/* lParam for WM_IME_SETCONTEXT */
Paul Quinnea1640f1999-03-10 18:03:53 +0000148#define ISC_SHOWUICANDIDATEWINDOW 0x00000001
149#define ISC_SHOWUICOMPOSITIONWINDOW 0x80000000
150#define ISC_SHOWUIGUIDELINE 0x40000000
151#define ISC_SHOWUIALLCANDIDATEWINDOW 0x0000000F
152#define ISC_SHOWUIALL 0xC000000F
153
154
Patrik Stridvall0f8bc5b1999-04-22 16:27:50 +0000155/* dwIndex for ImmNotifyIME/NI_COMPOSITIONSTR */
Paul Quinnea1640f1999-03-10 18:03:53 +0000156#define CPS_COMPLETE 0x0001
157#define CPS_CONVERT 0x0002
158#define CPS_REVERT 0x0003
159#define CPS_CANCEL 0x0004
160
161
Patrik Stridvall0f8bc5b1999-04-22 16:27:50 +0000162/* the modifiers of hot key */
Paul Quinnea1640f1999-03-10 18:03:53 +0000163#define MOD_ALT 0x0001
164#define MOD_CONTROL 0x0002
165#define MOD_SHIFT 0x0004
166
167#define MOD_LEFT 0x8000
168#define MOD_RIGHT 0x4000
169
170#define MOD_ON_KEYUP 0x0800
171#define MOD_IGNORE_ALL_MODIFIER 0x0400
172
173
Patrik Stridvall0f8bc5b1999-04-22 16:27:50 +0000174/* Windows for Simplified Chinese Edition hot key ID from 0x10 - 0x2F */
Paul Quinnea1640f1999-03-10 18:03:53 +0000175#define IME_CHOTKEY_IME_NONIME_TOGGLE 0x10
176#define IME_CHOTKEY_SHAPE_TOGGLE 0x11
177#define IME_CHOTKEY_SYMBOL_TOGGLE 0x12
178
Patrik Stridvall0f8bc5b1999-04-22 16:27:50 +0000179/* Windows for Japanese Edition hot key ID from 0x30 - 0x4F */
Paul Quinnea1640f1999-03-10 18:03:53 +0000180#define IME_JHOTKEY_CLOSE_OPEN 0x30
181
Patrik Stridvall0f8bc5b1999-04-22 16:27:50 +0000182/* Windows for Korean Edition hot key ID from 0x50 - 0x6F */
Paul Quinnea1640f1999-03-10 18:03:53 +0000183#define IME_KHOTKEY_SHAPE_TOGGLE 0x50
184#define IME_KHOTKEY_HANJACONVERT 0x51
185#define IME_KHOTKEY_ENGLISH 0x52
Patrik Stridvall0f8bc5b1999-04-22 16:27:50 +0000186/* Windows for Tranditional Chinese Edition hot key ID from 0x70 - 0x8F */
Paul Quinnea1640f1999-03-10 18:03:53 +0000187#define IME_THOTKEY_IME_NONIME_TOGGLE 0x70
188#define IME_THOTKEY_SHAPE_TOGGLE 0x71
189#define IME_THOTKEY_SYMBOL_TOGGLE 0x72
190
Patrik Stridvall0f8bc5b1999-04-22 16:27:50 +0000191/* direct switch hot key ID from 0x100 - 0x11F */
Paul Quinnea1640f1999-03-10 18:03:53 +0000192#define IME_HOTKEY_DSWITCH_FIRST 0x100
193#define IME_HOTKEY_DSWITCH_LAST 0x11F
194
Patrik Stridvall0f8bc5b1999-04-22 16:27:50 +0000195/* IME private hot key from 0x200 - 0x21F */
Paul Quinnea1640f1999-03-10 18:03:53 +0000196#define IME_HOTKEY_PRIVATE_FIRST 0x200
197#define IME_ITHOTKEY_RESEND_RESULTSTR 0x200
198#define IME_ITHOTKEY_PREVIOUS_COMPOSITION 0x201
199#define IME_ITHOTKEY_UISTYLE_TOGGLE 0x202
Hidenori Takeshima14d6c022000-12-05 20:45:45 +0000200#define IME_ITHOTKEY_RECONVERTSTRING 0x203
Paul Quinnea1640f1999-03-10 18:03:53 +0000201#define IME_HOTKEY_PRIVATE_LAST 0x21F
202
203
Patrik Stridvall0f8bc5b1999-04-22 16:27:50 +0000204/*
205 * dwSystemInfoFlags bits
206 * parameter of ImmGetCompositionString
207 */
Paul Quinnea1640f1999-03-10 18:03:53 +0000208#define GCS_COMPREADSTR 0x0001
209#define GCS_COMPREADATTR 0x0002
210#define GCS_COMPREADCLAUSE 0x0004
211#define GCS_COMPSTR 0x0008
212#define GCS_COMPATTR 0x0010
213#define GCS_COMPCLAUSE 0x0020
214#define GCS_CURSORPOS 0x0080
215#define GCS_DELTASTART 0x0100
216#define GCS_RESULTREADSTR 0x0200
217#define GCS_RESULTREADCLAUSE 0x0400
218#define GCS_RESULTSTR 0x0800
219#define GCS_RESULTCLAUSE 0x1000
220
Patrik Stridvall0f8bc5b1999-04-22 16:27:50 +0000221/* style bit flags for WM_IME_COMPOSITION */
Paul Quinnea1640f1999-03-10 18:03:53 +0000222#define CS_INSERTCHAR 0x2000
223#define CS_NOMOVECARET 0x4000
224
225
Patrik Stridvall0f8bc5b1999-04-22 16:27:50 +0000226/*
227 * bits of fdwInit of INPUTCONTEXT
228 * IME version constants
229 */
Paul Quinnea1640f1999-03-10 18:03:53 +0000230#define IMEVER_0310 0x0003000A
231#define IMEVER_0400 0x00040000
232
233
Patrik Stridvall0f8bc5b1999-04-22 16:27:50 +0000234/* IME property bits */
Paul Quinnea1640f1999-03-10 18:03:53 +0000235#define IME_PROP_AT_CARET 0x00010000
236#define IME_PROP_SPECIAL_UI 0x00020000
237#define IME_PROP_CANDLIST_START_FROM_1 0x00040000
238#define IME_PROP_UNICODE 0x00080000
Hidenori Takeshima14d6c022000-12-05 20:45:45 +0000239#define IME_PROP_COMPLETE_ON_UNSELECT 0x00100000
Paul Quinnea1640f1999-03-10 18:03:53 +0000240
241
Patrik Stridvall0f8bc5b1999-04-22 16:27:50 +0000242/* IME UICapability bits */
Paul Quinnea1640f1999-03-10 18:03:53 +0000243#define UI_CAP_2700 0x00000001
244#define UI_CAP_ROT90 0x00000002
245#define UI_CAP_ROTANY 0x00000004
Patrik Stridvall0f8bc5b1999-04-22 16:27:50 +0000246/* ImmSetCompositionString Capability bits */
Paul Quinnea1640f1999-03-10 18:03:53 +0000247#define SCS_CAP_COMPSTR 0x00000001
248#define SCS_CAP_MAKEREAD 0x00000002
Hidenori Takeshima14d6c022000-12-05 20:45:45 +0000249#define SCS_CAP_SETRECONVERTSTRING 0x00000004
Paul Quinnea1640f1999-03-10 18:03:53 +0000250
251
Patrik Stridvall0f8bc5b1999-04-22 16:27:50 +0000252/* IME WM_IME_SELECT inheritance Capability bits */
Paul Quinnea1640f1999-03-10 18:03:53 +0000253#define SELECT_CAP_CONVERSION 0x00000001
254#define SELECT_CAP_SENTENCE 0x00000002
255
256
Patrik Stridvall0f8bc5b1999-04-22 16:27:50 +0000257/* ID for deIndex of ImmGetGuideLine */
Paul Quinnea1640f1999-03-10 18:03:53 +0000258#define GGL_LEVEL 0x00000001
259#define GGL_INDEX 0x00000002
260#define GGL_STRING 0x00000003
261#define GGL_PRIVATE 0x00000004
262
Patrik Stridvall0f8bc5b1999-04-22 16:27:50 +0000263/* ID for dwLevel of GUIDELINE Structure */
Paul Quinnea1640f1999-03-10 18:03:53 +0000264#define GL_LEVEL_NOGUIDELINE 0x00000000
265#define GL_LEVEL_FATAL 0x00000001
266#define GL_LEVEL_ERROR 0x00000002
267#define GL_LEVEL_WARNING 0x00000003
268#define GL_LEVEL_INFORMATION 0x00000004
269
Patrik Stridvall0f8bc5b1999-04-22 16:27:50 +0000270/* ID for dwIndex of GUIDELINE Structure */
Paul Quinnea1640f1999-03-10 18:03:53 +0000271#define GL_ID_UNKNOWN 0x00000000
272#define GL_ID_NOMODULE 0x00000001
273#define GL_ID_NODICTIONARY 0x00000010
274#define GL_ID_CANNOTSAVE 0x00000011
275#define GL_ID_NOCONVERT 0x00000020
276#define GL_ID_TYPINGERROR 0x00000021
277#define GL_ID_TOOMANYSTROKE 0x00000022
278#define GL_ID_READINGCONFLICT 0x00000023
279#define GL_ID_INPUTREADING 0x00000024
280#define GL_ID_INPUTRADICAL 0x00000025
281#define GL_ID_INPUTCODE 0x00000026
282#define GL_ID_INPUTSYMBOL 0x00000027
283#define GL_ID_CHOOSECANDIDATE 0x00000028
284#define GL_ID_REVERSECONVERSION 0x00000029
285#define GL_ID_PRIVATE_FIRST 0x00008000
286#define GL_ID_PRIVATE_LAST 0x0000FFFF
287
Patrik Stridvall0f8bc5b1999-04-22 16:27:50 +0000288/* ID for dwIndex of ImmGetProperty */
Paul Quinnea1640f1999-03-10 18:03:53 +0000289#define IGP_GETIMEVERSION (DWORD)(-4)
290#define IGP_PROPERTY 0x00000004
291#define IGP_CONVERSION 0x00000008
292#define IGP_SENTENCE 0x0000000c
293#define IGP_UI 0x00000010
294#define IGP_SETCOMPSTR 0x00000014
295#define IGP_SELECT 0x00000018
296
297
Patrik Stridvall0f8bc5b1999-04-22 16:27:50 +0000298/* dwIndex for ImmSetCompositionString API */
Paul Quinnea1640f1999-03-10 18:03:53 +0000299#define SCS_SETSTR (GCS_COMPREADSTR|GCS_COMPSTR)
300#define SCS_CHANGEATTR (GCS_COMPREADATTR|GCS_COMPATTR)
301#define SCS_CHANGECLAUSE (GCS_COMPREADCLAUSE|GCS_COMPCLAUSE)
Hidenori Takeshima14d6c022000-12-05 20:45:45 +0000302#define SCS_SETRECONVERTSTRING 0x00010000
303#define SCS_QUERYRECONVERTSTRING 0x00020000
304
Patrik Stridvall0f8bc5b1999-04-22 16:27:50 +0000305/* attribute for COMPOSITIONSTRING Structure */
Paul Quinnea1640f1999-03-10 18:03:53 +0000306#define ATTR_INPUT 0x00
307#define ATTR_TARGET_CONVERTED 0x01
308#define ATTR_CONVERTED 0x02
309#define ATTR_TARGET_NOTCONVERTED 0x03
310#define ATTR_INPUT_ERROR 0x04
Hidenori Takeshima14d6c022000-12-05 20:45:45 +0000311#define ATTR_FIXEDCONVERTED 0x05
Paul Quinnea1640f1999-03-10 18:03:53 +0000312
313
Patrik Stridvall0f8bc5b1999-04-22 16:27:50 +0000314/* bit field for IMC_SETCOMPOSITIONWINDOW, IMC_SETCANDIDATEWINDOW */
Paul Quinnea1640f1999-03-10 18:03:53 +0000315#define CFS_DEFAULT 0x0000
316#define CFS_RECT 0x0001
317#define CFS_POINT 0x0002
318#define CFS_FORCE_POSITION 0x0020
319#define CFS_CANDIDATEPOS 0x0040
320#define CFS_EXCLUDE 0x0080
321
Patrik Stridvall0f8bc5b1999-04-22 16:27:50 +0000322/* conversion direction for ImmGetConversionList */
Paul Quinnea1640f1999-03-10 18:03:53 +0000323#define GCL_CONVERSION 0x0001
324#define GCL_REVERSECONVERSION 0x0002
325#define GCL_REVERSE_LENGTH 0x0003
326
327
Patrik Stridvall0f8bc5b1999-04-22 16:27:50 +0000328/* bit field for conversion mode */
Paul Quinnea1640f1999-03-10 18:03:53 +0000329#define IME_CMODE_ALPHANUMERIC 0x0000
330#define IME_CMODE_NATIVE 0x0001
331#define IME_CMODE_CHINESE IME_CMODE_NATIVE
Patrik Stridvall0f8bc5b1999-04-22 16:27:50 +0000332/* IME_CMODE_HANGEUL is old name of IME_CMODE_HANGUL. It will be gone eventually. */
Paul Quinnea1640f1999-03-10 18:03:53 +0000333#define IME_CMODE_HANGEUL IME_CMODE_NATIVE
334#define IME_CMODE_HANGUL IME_CMODE_NATIVE
335#define IME_CMODE_JAPANESE IME_CMODE_NATIVE
Patrik Stridvall0f8bc5b1999-04-22 16:27:50 +0000336#define IME_CMODE_KATAKANA 0x0002 /* only effect under IME_CMODE_NATIVE */
Paul Quinnea1640f1999-03-10 18:03:53 +0000337#define IME_CMODE_LANGUAGE 0x0003
338#define IME_CMODE_FULLSHAPE 0x0008
339#define IME_CMODE_ROMAN 0x0010
340#define IME_CMODE_CHARCODE 0x0020
341#define IME_CMODE_HANJACONVERT 0x0040
342#define IME_CMODE_SOFTKBD 0x0080
343#define IME_CMODE_NOCONVERSION 0x0100
344#define IME_CMODE_EUDC 0x0200
345#define IME_CMODE_SYMBOL 0x0400
Hidenori Takeshima14d6c022000-12-05 20:45:45 +0000346#define IME_CMODE_FIXED 0x0800
Paul Quinnea1640f1999-03-10 18:03:53 +0000347
348
349#define IME_SMODE_NONE 0x0000
350#define IME_SMODE_PLAURALCLAUSE 0x0001
351#define IME_SMODE_SINGLECONVERT 0x0002
352#define IME_SMODE_AUTOMATIC 0x0004
353#define IME_SMODE_PHRASEPREDICT 0x0008
Hidenori Takeshima14d6c022000-12-05 20:45:45 +0000354#define IME_SMODE_CONVERSATION 0x0010
Paul Quinnea1640f1999-03-10 18:03:53 +0000355
Patrik Stridvall0f8bc5b1999-04-22 16:27:50 +0000356/* style of candidate */
Paul Quinnea1640f1999-03-10 18:03:53 +0000357#define IME_CAND_UNKNOWN 0x0000
358#define IME_CAND_READ 0x0001
359#define IME_CAND_CODE 0x0002
360#define IME_CAND_MEANING 0x0003
361#define IME_CAND_RADICAL 0x0004
362#define IME_CAND_STROKE 0x0005
363
364
Patrik Stridvall0f8bc5b1999-04-22 16:27:50 +0000365/* wParam of report message WM_IME_NOTIFY */
Paul Quinnea1640f1999-03-10 18:03:53 +0000366#define IMN_CLOSESTATUSWINDOW 0x0001
367#define IMN_OPENSTATUSWINDOW 0x0002
368#define IMN_CHANGECANDIDATE 0x0003
369#define IMN_CLOSECANDIDATE 0x0004
370#define IMN_OPENCANDIDATE 0x0005
371#define IMN_SETCONVERSIONMODE 0x0006
372#define IMN_SETSENTENCEMODE 0x0007
373#define IMN_SETOPENSTATUS 0x0008
374#define IMN_SETCANDIDATEPOS 0x0009
375#define IMN_SETCOMPOSITIONFONT 0x000A
376#define IMN_SETCOMPOSITIONWINDOW 0x000B
377#define IMN_SETSTATUSWINDOWPOS 0x000C
378#define IMN_GUIDELINE 0x000D
379#define IMN_PRIVATE 0x000E
380
381
Hidenori Takeshima14d6c022000-12-05 20:45:45 +0000382/* wParam of report message WM_IME_REQUEST */
383#define IMR_COMPOSITIONWINDOW 0x0001
384#define IMR_CANDIDATEWINDOW 0x0002
385#define IMR_COMPOSITIONFONT 0x0003
386#define IMR_RECONVERTSTRING 0x0004
387#define IMR_CONFIRMRECONVERTSTRING 0x0005
388
Hidenori Takeshima14d6c022000-12-05 20:45:45 +0000389
Patrik Stridvall0f8bc5b1999-04-22 16:27:50 +0000390/* error code of ImmGetCompositionString */
Paul Quinnea1640f1999-03-10 18:03:53 +0000391#define IMM_ERROR_NODATA (-1)
392#define IMM_ERROR_GENERAL (-2)
393
394
Patrik Stridvall0f8bc5b1999-04-22 16:27:50 +0000395/* dialog mode of ImmConfigureIME */
Paul Quinnea1640f1999-03-10 18:03:53 +0000396#define IME_CONFIG_GENERAL 1
397#define IME_CONFIG_REGISTERWORD 2
398#define IME_CONFIG_SELECTDICTIONARY 3
399
Patrik Stridvall0f8bc5b1999-04-22 16:27:50 +0000400/* dialog mode of ImmEscape */
Paul Quinnea1640f1999-03-10 18:03:53 +0000401#define IME_ESC_QUERY_SUPPORT 0x0003
402#define IME_ESC_RESERVED_FIRST 0x0004
403#define IME_ESC_RESERVED_LAST 0x07FF
404#define IME_ESC_PRIVATE_FIRST 0x0800
405#define IME_ESC_PRIVATE_LAST 0x0FFF
406#define IME_ESC_SEQUENCE_TO_INTERNAL 0x1001
407#define IME_ESC_GET_EUDC_DICTIONARY 0x1003
408#define IME_ESC_SET_EUDC_DICTIONARY 0x1004
409#define IME_ESC_MAX_KEY 0x1005
410#define IME_ESC_IME_NAME 0x1006
411#define IME_ESC_SYNC_HOTKEY 0x1007
412#define IME_ESC_HANJA_MODE 0x1008
413#define IME_ESC_AUTOMATA 0x1009
414#define IME_ESC_PRIVATE_HOTKEY 0x100a
Hidenori Takeshima14d6c022000-12-05 20:45:45 +0000415#define IME_ESC_GETHELPFILENAME 0x100b
Paul Quinnea1640f1999-03-10 18:03:53 +0000416
417
Patrik Stridvall0f8bc5b1999-04-22 16:27:50 +0000418/* style of word registration */
Paul Quinnea1640f1999-03-10 18:03:53 +0000419#define IME_REGWORD_STYLE_EUDC 0x00000001
420#define IME_REGWORD_STYLE_USER_FIRST 0x80000000
421#define IME_REGWORD_STYLE_USER_LAST 0xFFFFFFFF
422
Hidenori Takeshima14d6c022000-12-05 20:45:45 +0000423
Hidenori Takeshima14d6c022000-12-05 20:45:45 +0000424/* dwFlags for ImmAssociateContextEx */
425#define IACE_CHILDREN 0x0001
426#define IACE_DEFAULT 0x0010
427#define IACE_IGNORENOCONTEXT 0x0020
428
429/* dwFlags for ImmGetImeMenuItems */
430#define IGIMIF_RIGHTMENU 0x0001
431
432/* dwType for ImmGetImeMenuItems */
433#define IGIMII_CMODE 0x0001
434#define IGIMII_SMODE 0x0002
435#define IGIMII_CONFIGURE 0x0004
436#define IGIMII_TOOLS 0x0008
437#define IGIMII_HELP 0x0010
438#define IGIMII_OTHER 0x0020
439#define IGIMII_INPUTTOOLS 0x0040
440
441/* fType of IMEMENUITEMINFO structure */
442#define IMFT_RADIOCHECK 0x00001
443#define IMFT_SEPARATOR 0x00002
444#define IMFT_SUBMENU 0x00004
445
446/* fState of IMEMENUITEMINFO structure */
447#define IMFS_GRAYED MFS_GRAYED
448#define IMFS_DISABLED MFS_DISABLED
449#define IMFS_CHECKED MFS_CHECKED
450#define IMFS_HILITE MFS_HILITE
451#define IMFS_ENABLED MFS_ENABLED
452#define IMFS_UNCHECKED MFS_UNCHECKED
453#define IMFS_UNHILITE MFS_UNHILITE
454#define IMFS_DEFAULT MFS_DEFAULT
455
Hidenori Takeshima14d6c022000-12-05 20:45:45 +0000456
Patrik Stridvall0f8bc5b1999-04-22 16:27:50 +0000457/*
458 * type of soft keyboard
459 * for Windows Tranditional Chinese Edition
460 */
Paul Quinnea1640f1999-03-10 18:03:53 +0000461#define SOFTKEYBOARD_TYPE_T1 0x0001
Patrik Stridvall0f8bc5b1999-04-22 16:27:50 +0000462/* for Windows Simplified Chinese Edition */
Paul Quinnea1640f1999-03-10 18:03:53 +0000463#define SOFTKEYBOARD_TYPE_C1 0x0002
464
465
466HIMC WINAPI ImmAssociateContext(HWND, HIMC);
Alexandre Julliard6677ac42003-08-21 21:32:48 +0000467BOOL WINAPI ImmAssociateContextEx(HWND, HIMC, DWORD);
Paul Quinnea1640f1999-03-10 18:03:53 +0000468BOOL WINAPI ImmConfigureIMEA(HKL, HWND, DWORD, LPVOID);
469BOOL WINAPI ImmConfigureIMEW(HKL, HWND, DWORD, LPVOID);
470#define ImmConfigureIME WINELIB_NAME_AW(ImmConfigureIME)
471HIMC WINAPI ImmCreateContext();
472BOOL WINAPI ImmDestroyContext(HIMC hIMC);
Eric Kohl231f2592002-01-29 18:02:13 +0000473BOOL WINAPI ImmDisableIME(DWORD idThread);
Paul Quinnea1640f1999-03-10 18:03:53 +0000474UINT WINAPI ImmEnumRegisterWordA(HKL, REGISTERWORDENUMPROCA, LPCSTR, DWORD, LPCSTR, LPVOID);
475UINT WINAPI ImmEnumRegisterWordW(HKL, REGISTERWORDENUMPROCW, LPCWSTR, DWORD, LPCWSTR, LPVOID);
476#define ImmEnumRegisterWord WINELIB_NAME_AW(ImmEnumRegisterWord)
477LRESULT WINAPI ImmEscapeA(HKL, HIMC, UINT, LPVOID);
478LRESULT WINAPI ImmEscapeW(HKL, HIMC, UINT, LPVOID);
479#define ImmEscape WINELIB_NAME_AW(ImmEscape)
480DWORD WINAPI ImmGetCandidateListA(HIMC, DWORD, LPCANDIDATELIST, DWORD);
481DWORD WINAPI ImmGetCandidateListW(HIMC, DWORD, LPCANDIDATELIST, DWORD);
482#define ImmGetCandidateList WINELIB_NAME_AW(ImmGetCandidateList)
483DWORD WINAPI ImmGetCandidateListCountA(HIMC, LPDWORD);
484DWORD WINAPI ImmGetCandidateListCountW(HIMC, LPDWORD);
485#define ImmGetCandidateListCount WINELIB_NAME_AW(ImmGetCandidateListCount)
486BOOL WINAPI ImmGetCandidateWindow(HIMC, DWORD, LPCANDIDATEFORM);
Dimitrie O. Paun4e6fca02004-04-12 22:02:54 +0000487#ifndef NOGDI
Paul Quinnea1640f1999-03-10 18:03:53 +0000488BOOL WINAPI ImmGetCompositionFontA(HIMC, LPLOGFONTA);
489BOOL WINAPI ImmGetCompositionFontW(HIMC, LPLOGFONTW);
490#define ImmGetCompositionFont WINELIB_NAME_AW(ImmGetCompositionFont)
Dimitrie O. Paun4e6fca02004-04-12 22:02:54 +0000491BOOL WINAPI ImmSetCompositionFontA(HIMC, LPLOGFONTA);
492BOOL WINAPI ImmSetCompositionFontW(HIMC, LPLOGFONTW);
493#define ImmSetCompositionFont WINELIB_NAME_AW(ImmSetCompositionFont)
494#endif
Paul Quinnea1640f1999-03-10 18:03:53 +0000495LONG WINAPI ImmGetCompositionStringA(HIMC, DWORD, LPVOID, DWORD);
496LONG WINAPI ImmGetCompositionStringW(HIMC, DWORD, LPVOID, DWORD);
497#define ImmGetCompositionString WINELIB_NAME_AW(ImmGetCompositionString)
498BOOL WINAPI ImmGetCompositionWindow(HIMC, LPCOMPOSITIONFORM);
499HIMC WINAPI ImmGetContext(HWND);
500DWORD WINAPI ImmGetConversionListA(HKL, HIMC, LPCSTR, LPCANDIDATELIST, DWORD, UINT);
501DWORD WINAPI ImmGetConversionListW(HKL, HIMC, LPCWSTR, LPCANDIDATELIST, DWORD, UINT);
502#define ImmGetConversionList WINELIB_NAME_AW(ImmGetConversionList)
503BOOL WINAPI ImmGetConversionStatus(HIMC, LPDWORD, LPDWORD);
504HWND WINAPI ImmGetDefaultIMEWnd(HWND);
505UINT WINAPI ImmGetDescriptionA(HKL, LPSTR, UINT);
506UINT WINAPI ImmGetDescriptionW(HKL, LPWSTR, UINT);
507#define ImmGetDescription WINELIB_NAME_AW(ImmGetDescription)
508DWORD WINAPI ImmGetGuideLineA(HIMC, DWORD, LPSTR, DWORD);
509DWORD WINAPI ImmGetGuideLineW(HIMC, DWORD, LPWSTR, DWORD);
510#define ImmGetGuideLine WINELIB_NAME_AW(ImmGetGuideLine)
511UINT WINAPI ImmGetIMEFileNameA(HKL, LPSTR, UINT);
512UINT WINAPI ImmGetIMEFileNameW(HKL, LPWSTR, UINT);
513#define ImmGetIMEFileName WINELIB_NAME_AW(ImmGetIMEFileName)
514BOOL WINAPI ImmGetOpenStatus(HIMC);
515DWORD WINAPI ImmGetProperty(HKL, DWORD);
516UINT WINAPI ImmGetRegisterWordStyleA(HKL, UINT, LPSTYLEBUFA);
517UINT WINAPI ImmGetRegisterWordStyleW(HKL, UINT, LPSTYLEBUFW);
518#define ImmGetRegisterWordStyle WINELIB_NAME_AW(ImmGetRegisterWordStyle)
519BOOL WINAPI ImmGetStatusWindowPos(HIMC, LPPOINT);
520UINT WINAPI ImmGetVirtualKey(HWND);
521HKL WINAPI ImmInstallIMEA(LPCSTR, LPCSTR);
522HKL WINAPI ImmInstallIMEW(LPCWSTR, LPCWSTR);
523#define ImmInstallIME WINELIB_NAME_AW(ImmInstallIME)
524BOOL WINAPI ImmIsIME(HKL);
525BOOL WINAPI ImmIsUIMessageA(HWND, UINT, WPARAM, LPARAM);
526BOOL WINAPI ImmIsUIMessageW(HWND, UINT, WPARAM, LPARAM);
527#define ImmIsUIMessage WINELIB_NAME_AW(ImmIsUIMessage)
528BOOL WINAPI ImmNotifyIME(HIMC, DWORD, DWORD, DWORD);
529BOOL WINAPI ImmRegisterWordA(HKL, LPCSTR, DWORD, LPCSTR);
530BOOL WINAPI ImmRegisterWordW(HKL, LPCWSTR, DWORD, LPCWSTR);
531#define ImmRegisterWord WINELIB_NAME_AW(ImmRegisterWord)
532BOOL WINAPI ImmReleaseContext(HWND, HIMC);
533BOOL WINAPI ImmSetCandidateWindow(HIMC, LPCANDIDATEFORM);
Paul Quinnea1640f1999-03-10 18:03:53 +0000534BOOL WINAPI ImmSetCompositionStringA(HIMC, DWORD, LPCVOID, DWORD, LPCVOID, DWORD);
535BOOL WINAPI ImmSetCompositionStringW(HIMC, DWORD, LPCVOID, DWORD, LPCVOID, DWORD);
536#define ImmSetCompositionString WINELIB_NAME_AW(ImmSetCompositionString)
537BOOL WINAPI ImmSetCompositionWindow(HIMC, LPCOMPOSITIONFORM);
538BOOL WINAPI ImmSetConversionStatus(HIMC, DWORD, DWORD);
539BOOL WINAPI ImmSetOpenStatus(HIMC, BOOL);
540BOOL WINAPI ImmSetStatusWindowPos(HIMC, LPPOINT);
541BOOL WINAPI ImmSimulateHotKey(HWND, DWORD);
542BOOL WINAPI ImmUnregisterWordA(HKL, LPCSTR, DWORD, LPCSTR);
543BOOL WINAPI ImmUnregisterWordW(HKL, LPCWSTR, DWORD, LPCWSTR);
544#define ImmUnregisterWord WINELIB_NAME_AW(ImmUnregisterWord)
545
Hidenori Takeshima14d6c022000-12-05 20:45:45 +0000546
Paul Quinnea1640f1999-03-10 18:03:53 +0000547#ifdef __cplusplus
548}
549#endif
Alexandre Julliarda0d77311998-09-13 16:32:00 +0000550
551#endif /* __WINE_IMM_H */