blob: 85848e6374945aea169ec7216533023fe7f6d029 [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
Jonathan Ernst360a3f92006-05-18 14:49:52 +020018 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, 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
Jacek Cabana82428b2007-10-14 19:10:58 +020031typedef struct tagREGISTERWORDA {
32 LPSTR lpReading;
33 LPSTR lpWord;
34} REGISTERWORDA, *PREGISTERWORDA, *NPREGISTERWORDA, *LPREGISTERWORDA;
35
36typedef struct tagREGISTERWORDW {
37 LPWSTR lpReading;
38 LPWSTR lpWord;
39} REGISTERWORDW, *PREGISTERWORDW, *NPREGISTERWORDW, *LPREGISTERWORDW;
Alexandre Julliarda0d77311998-09-13 16:32:00 +000040
Patrik Stridvallf94462f2002-01-31 23:22:07 +000041typedef int (CALLBACK *REGISTERWORDENUMPROCA)(LPCSTR, DWORD, LPCSTR, LPVOID);
42typedef int (CALLBACK *REGISTERWORDENUMPROCW)(LPCWSTR, DWORD, LPCWSTR, LPVOID);
Alexandre Julliarda0d77311998-09-13 16:32:00 +000043
Paul Quinnea1640f1999-03-10 18:03:53 +000044typedef struct tagCANDIDATEFORM
45{
46 DWORD dwIndex;
47 DWORD dwStyle;
48 POINT ptCurrentPos;
49 RECT rcArea;
50} CANDIDATEFORM, *LPCANDIDATEFORM;
Alexandre Julliarda0d77311998-09-13 16:32:00 +000051
Paul Quinnea1640f1999-03-10 18:03:53 +000052typedef 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;
Alexandre Julliarda0d77311998-09-13 16:32:00 +000062
Paul Quinnea1640f1999-03-10 18:03:53 +000063typedef struct tagSTYLEBUFA
64{
65 DWORD dwStyle;
66 CHAR szDescription[32];
67} STYLEBUFA, *LPSTYLEBUFA;
68
69typedef struct tagSTYLEBUFW
70{
71 DWORD dwStyle;
72 WCHAR szDescription[32];
73} STYLEBUFW, *LPSTYLEBUFW;
74
75DECL_WINELIB_TYPE_AW(STYLEBUF)
76DECL_WINELIB_TYPE_AW(LPSTYLEBUF)
77
Hidenori Takeshima14d6c022000-12-05 20:45:45 +000078typedef 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
93typedef 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
106typedef 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
119DECL_WINELIB_TYPE_AW(IMEMENUITEMINFO)
120DECL_WINELIB_TYPE_AW(LPIMEMENUITEMINFO)
121
Hidenori Takeshima14d6c022000-12-05 20:45:45 +0000122
Paul Quinnea1640f1999-03-10 18:03:53 +0000123typedef struct _tagCOMPOSITIONFORM
124{
125 DWORD dwStyle;
126 POINT ptCurrentPos;
127 RECT rcArea;
128} COMPOSITIONFORM, *LPCOMPOSITIONFORM;
129
Patrik Stridvall0f8bc5b1999-04-22 16:27:50 +0000130/* wParam for WM_IME_CONTROL */
Paul Quinnea1640f1999-03-10 18:03:53 +0000131#define IMC_GETCANDIDATEPOS 0x0007
132#define IMC_SETCANDIDATEPOS 0x0008
133#define IMC_GETCOMPOSITIONFONT 0x0009
134#define IMC_SETCOMPOSITIONFONT 0x000A
135#define IMC_GETCOMPOSITIONWINDOW 0x000B
136#define IMC_SETCOMPOSITIONWINDOW 0x000C
137#define IMC_GETSTATUSWINDOWPOS 0x000F
138#define IMC_SETSTATUSWINDOWPOS 0x0010
139#define IMC_CLOSESTATUSWINDOW 0x0021
140#define IMC_OPENSTATUSWINDOW 0x0022
141
Patrik Stridvall0f8bc5b1999-04-22 16:27:50 +0000142/*
143 * wParam for WM_IME_CONTROL to the soft keyboard
144 * dwAction for ImmNotifyIME
145 */
Paul Quinnea1640f1999-03-10 18:03:53 +0000146#define NI_OPENCANDIDATE 0x0010
147#define NI_CLOSECANDIDATE 0x0011
148#define NI_SELECTCANDIDATESTR 0x0012
149#define NI_CHANGECANDIDATELIST 0x0013
150#define NI_FINALIZECONVERSIONRESULT 0x0014
151#define NI_COMPOSITIONSTR 0x0015
152#define NI_SETCANDIDATE_PAGESTART 0x0016
153#define NI_SETCANDIDATE_PAGESIZE 0x0017
Hidenori Takeshima14d6c022000-12-05 20:45:45 +0000154#define NI_IMEMENUSELECTED 0x0018
Paul Quinnea1640f1999-03-10 18:03:53 +0000155
Patrik Stridvall0f8bc5b1999-04-22 16:27:50 +0000156/* lParam for WM_IME_SETCONTEXT */
Paul Quinnea1640f1999-03-10 18:03:53 +0000157#define ISC_SHOWUICANDIDATEWINDOW 0x00000001
158#define ISC_SHOWUICOMPOSITIONWINDOW 0x80000000
159#define ISC_SHOWUIGUIDELINE 0x40000000
160#define ISC_SHOWUIALLCANDIDATEWINDOW 0x0000000F
161#define ISC_SHOWUIALL 0xC000000F
162
163
Patrik Stridvall0f8bc5b1999-04-22 16:27:50 +0000164/* dwIndex for ImmNotifyIME/NI_COMPOSITIONSTR */
Paul Quinnea1640f1999-03-10 18:03:53 +0000165#define CPS_COMPLETE 0x0001
166#define CPS_CONVERT 0x0002
167#define CPS_REVERT 0x0003
168#define CPS_CANCEL 0x0004
169
170
Patrik Stridvall0f8bc5b1999-04-22 16:27:50 +0000171/* the modifiers of hot key */
Paul Quinnea1640f1999-03-10 18:03:53 +0000172#define MOD_ALT 0x0001
173#define MOD_CONTROL 0x0002
174#define MOD_SHIFT 0x0004
175
176#define MOD_LEFT 0x8000
177#define MOD_RIGHT 0x4000
178
179#define MOD_ON_KEYUP 0x0800
180#define MOD_IGNORE_ALL_MODIFIER 0x0400
181
182
Patrik Stridvall0f8bc5b1999-04-22 16:27:50 +0000183/* Windows for Simplified Chinese Edition hot key ID from 0x10 - 0x2F */
Paul Quinnea1640f1999-03-10 18:03:53 +0000184#define IME_CHOTKEY_IME_NONIME_TOGGLE 0x10
185#define IME_CHOTKEY_SHAPE_TOGGLE 0x11
186#define IME_CHOTKEY_SYMBOL_TOGGLE 0x12
187
Patrik Stridvall0f8bc5b1999-04-22 16:27:50 +0000188/* Windows for Japanese Edition hot key ID from 0x30 - 0x4F */
Paul Quinnea1640f1999-03-10 18:03:53 +0000189#define IME_JHOTKEY_CLOSE_OPEN 0x30
190
Patrik Stridvall0f8bc5b1999-04-22 16:27:50 +0000191/* Windows for Korean Edition hot key ID from 0x50 - 0x6F */
Paul Quinnea1640f1999-03-10 18:03:53 +0000192#define IME_KHOTKEY_SHAPE_TOGGLE 0x50
193#define IME_KHOTKEY_HANJACONVERT 0x51
194#define IME_KHOTKEY_ENGLISH 0x52
Patrik Stridvall0f8bc5b1999-04-22 16:27:50 +0000195/* Windows for Tranditional Chinese Edition hot key ID from 0x70 - 0x8F */
Paul Quinnea1640f1999-03-10 18:03:53 +0000196#define IME_THOTKEY_IME_NONIME_TOGGLE 0x70
197#define IME_THOTKEY_SHAPE_TOGGLE 0x71
198#define IME_THOTKEY_SYMBOL_TOGGLE 0x72
199
Patrik Stridvall0f8bc5b1999-04-22 16:27:50 +0000200/* direct switch hot key ID from 0x100 - 0x11F */
Paul Quinnea1640f1999-03-10 18:03:53 +0000201#define IME_HOTKEY_DSWITCH_FIRST 0x100
202#define IME_HOTKEY_DSWITCH_LAST 0x11F
203
Patrik Stridvall0f8bc5b1999-04-22 16:27:50 +0000204/* IME private hot key from 0x200 - 0x21F */
Paul Quinnea1640f1999-03-10 18:03:53 +0000205#define IME_HOTKEY_PRIVATE_FIRST 0x200
206#define IME_ITHOTKEY_RESEND_RESULTSTR 0x200
207#define IME_ITHOTKEY_PREVIOUS_COMPOSITION 0x201
208#define IME_ITHOTKEY_UISTYLE_TOGGLE 0x202
Hidenori Takeshima14d6c022000-12-05 20:45:45 +0000209#define IME_ITHOTKEY_RECONVERTSTRING 0x203
Paul Quinnea1640f1999-03-10 18:03:53 +0000210#define IME_HOTKEY_PRIVATE_LAST 0x21F
211
212
Patrik Stridvall0f8bc5b1999-04-22 16:27:50 +0000213/*
214 * dwSystemInfoFlags bits
215 * parameter of ImmGetCompositionString
216 */
Paul Quinnea1640f1999-03-10 18:03:53 +0000217#define GCS_COMPREADSTR 0x0001
218#define GCS_COMPREADATTR 0x0002
219#define GCS_COMPREADCLAUSE 0x0004
220#define GCS_COMPSTR 0x0008
221#define GCS_COMPATTR 0x0010
222#define GCS_COMPCLAUSE 0x0020
223#define GCS_CURSORPOS 0x0080
224#define GCS_DELTASTART 0x0100
225#define GCS_RESULTREADSTR 0x0200
226#define GCS_RESULTREADCLAUSE 0x0400
227#define GCS_RESULTSTR 0x0800
228#define GCS_RESULTCLAUSE 0x1000
229
Patrik Stridvall0f8bc5b1999-04-22 16:27:50 +0000230/* style bit flags for WM_IME_COMPOSITION */
Paul Quinnea1640f1999-03-10 18:03:53 +0000231#define CS_INSERTCHAR 0x2000
232#define CS_NOMOVECARET 0x4000
233
234
Patrik Stridvall0f8bc5b1999-04-22 16:27:50 +0000235/*
236 * bits of fdwInit of INPUTCONTEXT
237 * IME version constants
238 */
Paul Quinnea1640f1999-03-10 18:03:53 +0000239#define IMEVER_0310 0x0003000A
240#define IMEVER_0400 0x00040000
241
242
Patrik Stridvall0f8bc5b1999-04-22 16:27:50 +0000243/* IME property bits */
Paul Quinnea1640f1999-03-10 18:03:53 +0000244#define IME_PROP_AT_CARET 0x00010000
245#define IME_PROP_SPECIAL_UI 0x00020000
246#define IME_PROP_CANDLIST_START_FROM_1 0x00040000
247#define IME_PROP_UNICODE 0x00080000
Hidenori Takeshima14d6c022000-12-05 20:45:45 +0000248#define IME_PROP_COMPLETE_ON_UNSELECT 0x00100000
Paul Quinnea1640f1999-03-10 18:03:53 +0000249
250
Patrik Stridvall0f8bc5b1999-04-22 16:27:50 +0000251/* IME UICapability bits */
Paul Quinnea1640f1999-03-10 18:03:53 +0000252#define UI_CAP_2700 0x00000001
253#define UI_CAP_ROT90 0x00000002
254#define UI_CAP_ROTANY 0x00000004
Patrik Stridvall0f8bc5b1999-04-22 16:27:50 +0000255/* ImmSetCompositionString Capability bits */
Paul Quinnea1640f1999-03-10 18:03:53 +0000256#define SCS_CAP_COMPSTR 0x00000001
257#define SCS_CAP_MAKEREAD 0x00000002
Hidenori Takeshima14d6c022000-12-05 20:45:45 +0000258#define SCS_CAP_SETRECONVERTSTRING 0x00000004
Paul Quinnea1640f1999-03-10 18:03:53 +0000259
260
Patrik Stridvall0f8bc5b1999-04-22 16:27:50 +0000261/* IME WM_IME_SELECT inheritance Capability bits */
Paul Quinnea1640f1999-03-10 18:03:53 +0000262#define SELECT_CAP_CONVERSION 0x00000001
263#define SELECT_CAP_SENTENCE 0x00000002
264
265
Patrik Stridvall0f8bc5b1999-04-22 16:27:50 +0000266/* ID for deIndex of ImmGetGuideLine */
Paul Quinnea1640f1999-03-10 18:03:53 +0000267#define GGL_LEVEL 0x00000001
268#define GGL_INDEX 0x00000002
269#define GGL_STRING 0x00000003
270#define GGL_PRIVATE 0x00000004
271
Patrik Stridvall0f8bc5b1999-04-22 16:27:50 +0000272/* ID for dwLevel of GUIDELINE Structure */
Paul Quinnea1640f1999-03-10 18:03:53 +0000273#define GL_LEVEL_NOGUIDELINE 0x00000000
274#define GL_LEVEL_FATAL 0x00000001
275#define GL_LEVEL_ERROR 0x00000002
276#define GL_LEVEL_WARNING 0x00000003
277#define GL_LEVEL_INFORMATION 0x00000004
278
Patrik Stridvall0f8bc5b1999-04-22 16:27:50 +0000279/* ID for dwIndex of GUIDELINE Structure */
Paul Quinnea1640f1999-03-10 18:03:53 +0000280#define GL_ID_UNKNOWN 0x00000000
281#define GL_ID_NOMODULE 0x00000001
282#define GL_ID_NODICTIONARY 0x00000010
283#define GL_ID_CANNOTSAVE 0x00000011
284#define GL_ID_NOCONVERT 0x00000020
285#define GL_ID_TYPINGERROR 0x00000021
286#define GL_ID_TOOMANYSTROKE 0x00000022
287#define GL_ID_READINGCONFLICT 0x00000023
288#define GL_ID_INPUTREADING 0x00000024
289#define GL_ID_INPUTRADICAL 0x00000025
290#define GL_ID_INPUTCODE 0x00000026
291#define GL_ID_INPUTSYMBOL 0x00000027
292#define GL_ID_CHOOSECANDIDATE 0x00000028
293#define GL_ID_REVERSECONVERSION 0x00000029
294#define GL_ID_PRIVATE_FIRST 0x00008000
295#define GL_ID_PRIVATE_LAST 0x0000FFFF
296
Patrik Stridvall0f8bc5b1999-04-22 16:27:50 +0000297/* ID for dwIndex of ImmGetProperty */
Paul Quinnea1640f1999-03-10 18:03:53 +0000298#define IGP_GETIMEVERSION (DWORD)(-4)
299#define IGP_PROPERTY 0x00000004
300#define IGP_CONVERSION 0x00000008
301#define IGP_SENTENCE 0x0000000c
302#define IGP_UI 0x00000010
303#define IGP_SETCOMPSTR 0x00000014
304#define IGP_SELECT 0x00000018
305
306
Patrik Stridvall0f8bc5b1999-04-22 16:27:50 +0000307/* dwIndex for ImmSetCompositionString API */
Paul Quinnea1640f1999-03-10 18:03:53 +0000308#define SCS_SETSTR (GCS_COMPREADSTR|GCS_COMPSTR)
309#define SCS_CHANGEATTR (GCS_COMPREADATTR|GCS_COMPATTR)
310#define SCS_CHANGECLAUSE (GCS_COMPREADCLAUSE|GCS_COMPCLAUSE)
Hidenori Takeshima14d6c022000-12-05 20:45:45 +0000311#define SCS_SETRECONVERTSTRING 0x00010000
312#define SCS_QUERYRECONVERTSTRING 0x00020000
313
Patrik Stridvall0f8bc5b1999-04-22 16:27:50 +0000314/* attribute for COMPOSITIONSTRING Structure */
Paul Quinnea1640f1999-03-10 18:03:53 +0000315#define ATTR_INPUT 0x00
316#define ATTR_TARGET_CONVERTED 0x01
317#define ATTR_CONVERTED 0x02
318#define ATTR_TARGET_NOTCONVERTED 0x03
319#define ATTR_INPUT_ERROR 0x04
Hidenori Takeshima14d6c022000-12-05 20:45:45 +0000320#define ATTR_FIXEDCONVERTED 0x05
Paul Quinnea1640f1999-03-10 18:03:53 +0000321
322
Patrik Stridvall0f8bc5b1999-04-22 16:27:50 +0000323/* bit field for IMC_SETCOMPOSITIONWINDOW, IMC_SETCANDIDATEWINDOW */
Paul Quinnea1640f1999-03-10 18:03:53 +0000324#define CFS_DEFAULT 0x0000
325#define CFS_RECT 0x0001
326#define CFS_POINT 0x0002
327#define CFS_FORCE_POSITION 0x0020
328#define CFS_CANDIDATEPOS 0x0040
329#define CFS_EXCLUDE 0x0080
330
Patrik Stridvall0f8bc5b1999-04-22 16:27:50 +0000331/* conversion direction for ImmGetConversionList */
Paul Quinnea1640f1999-03-10 18:03:53 +0000332#define GCL_CONVERSION 0x0001
333#define GCL_REVERSECONVERSION 0x0002
334#define GCL_REVERSE_LENGTH 0x0003
335
336
Patrik Stridvall0f8bc5b1999-04-22 16:27:50 +0000337/* bit field for conversion mode */
Paul Quinnea1640f1999-03-10 18:03:53 +0000338#define IME_CMODE_ALPHANUMERIC 0x0000
339#define IME_CMODE_NATIVE 0x0001
340#define IME_CMODE_CHINESE IME_CMODE_NATIVE
Patrik Stridvall0f8bc5b1999-04-22 16:27:50 +0000341/* IME_CMODE_HANGEUL is old name of IME_CMODE_HANGUL. It will be gone eventually. */
Paul Quinnea1640f1999-03-10 18:03:53 +0000342#define IME_CMODE_HANGEUL IME_CMODE_NATIVE
343#define IME_CMODE_HANGUL IME_CMODE_NATIVE
344#define IME_CMODE_JAPANESE IME_CMODE_NATIVE
Patrik Stridvall0f8bc5b1999-04-22 16:27:50 +0000345#define IME_CMODE_KATAKANA 0x0002 /* only effect under IME_CMODE_NATIVE */
Paul Quinnea1640f1999-03-10 18:03:53 +0000346#define IME_CMODE_LANGUAGE 0x0003
347#define IME_CMODE_FULLSHAPE 0x0008
348#define IME_CMODE_ROMAN 0x0010
349#define IME_CMODE_CHARCODE 0x0020
350#define IME_CMODE_HANJACONVERT 0x0040
351#define IME_CMODE_SOFTKBD 0x0080
352#define IME_CMODE_NOCONVERSION 0x0100
353#define IME_CMODE_EUDC 0x0200
354#define IME_CMODE_SYMBOL 0x0400
Hidenori Takeshima14d6c022000-12-05 20:45:45 +0000355#define IME_CMODE_FIXED 0x0800
Paul Quinnea1640f1999-03-10 18:03:53 +0000356
357
358#define IME_SMODE_NONE 0x0000
359#define IME_SMODE_PLAURALCLAUSE 0x0001
360#define IME_SMODE_SINGLECONVERT 0x0002
361#define IME_SMODE_AUTOMATIC 0x0004
362#define IME_SMODE_PHRASEPREDICT 0x0008
Hidenori Takeshima14d6c022000-12-05 20:45:45 +0000363#define IME_SMODE_CONVERSATION 0x0010
Paul Quinnea1640f1999-03-10 18:03:53 +0000364
Patrik Stridvall0f8bc5b1999-04-22 16:27:50 +0000365/* style of candidate */
Paul Quinnea1640f1999-03-10 18:03:53 +0000366#define IME_CAND_UNKNOWN 0x0000
367#define IME_CAND_READ 0x0001
368#define IME_CAND_CODE 0x0002
369#define IME_CAND_MEANING 0x0003
370#define IME_CAND_RADICAL 0x0004
371#define IME_CAND_STROKE 0x0005
372
373
Patrik Stridvall0f8bc5b1999-04-22 16:27:50 +0000374/* wParam of report message WM_IME_NOTIFY */
Paul Quinnea1640f1999-03-10 18:03:53 +0000375#define IMN_CLOSESTATUSWINDOW 0x0001
376#define IMN_OPENSTATUSWINDOW 0x0002
377#define IMN_CHANGECANDIDATE 0x0003
378#define IMN_CLOSECANDIDATE 0x0004
379#define IMN_OPENCANDIDATE 0x0005
380#define IMN_SETCONVERSIONMODE 0x0006
381#define IMN_SETSENTENCEMODE 0x0007
382#define IMN_SETOPENSTATUS 0x0008
383#define IMN_SETCANDIDATEPOS 0x0009
384#define IMN_SETCOMPOSITIONFONT 0x000A
385#define IMN_SETCOMPOSITIONWINDOW 0x000B
386#define IMN_SETSTATUSWINDOWPOS 0x000C
387#define IMN_GUIDELINE 0x000D
388#define IMN_PRIVATE 0x000E
389
390
Hidenori Takeshima14d6c022000-12-05 20:45:45 +0000391/* wParam of report message WM_IME_REQUEST */
392#define IMR_COMPOSITIONWINDOW 0x0001
393#define IMR_CANDIDATEWINDOW 0x0002
394#define IMR_COMPOSITIONFONT 0x0003
395#define IMR_RECONVERTSTRING 0x0004
396#define IMR_CONFIRMRECONVERTSTRING 0x0005
397
Hidenori Takeshima14d6c022000-12-05 20:45:45 +0000398
Patrik Stridvall0f8bc5b1999-04-22 16:27:50 +0000399/* error code of ImmGetCompositionString */
Paul Quinnea1640f1999-03-10 18:03:53 +0000400#define IMM_ERROR_NODATA (-1)
401#define IMM_ERROR_GENERAL (-2)
402
403
Patrik Stridvall0f8bc5b1999-04-22 16:27:50 +0000404/* dialog mode of ImmConfigureIME */
Paul Quinnea1640f1999-03-10 18:03:53 +0000405#define IME_CONFIG_GENERAL 1
406#define IME_CONFIG_REGISTERWORD 2
407#define IME_CONFIG_SELECTDICTIONARY 3
408
Patrik Stridvall0f8bc5b1999-04-22 16:27:50 +0000409/* dialog mode of ImmEscape */
Paul Quinnea1640f1999-03-10 18:03:53 +0000410#define IME_ESC_QUERY_SUPPORT 0x0003
411#define IME_ESC_RESERVED_FIRST 0x0004
412#define IME_ESC_RESERVED_LAST 0x07FF
413#define IME_ESC_PRIVATE_FIRST 0x0800
414#define IME_ESC_PRIVATE_LAST 0x0FFF
415#define IME_ESC_SEQUENCE_TO_INTERNAL 0x1001
416#define IME_ESC_GET_EUDC_DICTIONARY 0x1003
417#define IME_ESC_SET_EUDC_DICTIONARY 0x1004
418#define IME_ESC_MAX_KEY 0x1005
419#define IME_ESC_IME_NAME 0x1006
420#define IME_ESC_SYNC_HOTKEY 0x1007
421#define IME_ESC_HANJA_MODE 0x1008
422#define IME_ESC_AUTOMATA 0x1009
423#define IME_ESC_PRIVATE_HOTKEY 0x100a
Hidenori Takeshima14d6c022000-12-05 20:45:45 +0000424#define IME_ESC_GETHELPFILENAME 0x100b
Paul Quinnea1640f1999-03-10 18:03:53 +0000425
426
Patrik Stridvall0f8bc5b1999-04-22 16:27:50 +0000427/* style of word registration */
Paul Quinnea1640f1999-03-10 18:03:53 +0000428#define IME_REGWORD_STYLE_EUDC 0x00000001
429#define IME_REGWORD_STYLE_USER_FIRST 0x80000000
430#define IME_REGWORD_STYLE_USER_LAST 0xFFFFFFFF
431
Hidenori Takeshima14d6c022000-12-05 20:45:45 +0000432
Hidenori Takeshima14d6c022000-12-05 20:45:45 +0000433/* dwFlags for ImmAssociateContextEx */
434#define IACE_CHILDREN 0x0001
435#define IACE_DEFAULT 0x0010
436#define IACE_IGNORENOCONTEXT 0x0020
437
438/* dwFlags for ImmGetImeMenuItems */
439#define IGIMIF_RIGHTMENU 0x0001
440
441/* dwType for ImmGetImeMenuItems */
442#define IGIMII_CMODE 0x0001
443#define IGIMII_SMODE 0x0002
444#define IGIMII_CONFIGURE 0x0004
445#define IGIMII_TOOLS 0x0008
446#define IGIMII_HELP 0x0010
447#define IGIMII_OTHER 0x0020
448#define IGIMII_INPUTTOOLS 0x0040
449
450/* fType of IMEMENUITEMINFO structure */
451#define IMFT_RADIOCHECK 0x00001
452#define IMFT_SEPARATOR 0x00002
453#define IMFT_SUBMENU 0x00004
454
455/* fState of IMEMENUITEMINFO structure */
456#define IMFS_GRAYED MFS_GRAYED
457#define IMFS_DISABLED MFS_DISABLED
458#define IMFS_CHECKED MFS_CHECKED
459#define IMFS_HILITE MFS_HILITE
460#define IMFS_ENABLED MFS_ENABLED
461#define IMFS_UNCHECKED MFS_UNCHECKED
462#define IMFS_UNHILITE MFS_UNHILITE
463#define IMFS_DEFAULT MFS_DEFAULT
464
Hidenori Takeshima14d6c022000-12-05 20:45:45 +0000465
Patrik Stridvall0f8bc5b1999-04-22 16:27:50 +0000466/*
467 * type of soft keyboard
468 * for Windows Tranditional Chinese Edition
469 */
Paul Quinnea1640f1999-03-10 18:03:53 +0000470#define SOFTKEYBOARD_TYPE_T1 0x0001
Patrik Stridvall0f8bc5b1999-04-22 16:27:50 +0000471/* for Windows Simplified Chinese Edition */
Paul Quinnea1640f1999-03-10 18:03:53 +0000472#define SOFTKEYBOARD_TYPE_C1 0x0002
473
474
475HIMC WINAPI ImmAssociateContext(HWND, HIMC);
Alexandre Julliard6677ac42003-08-21 21:32:48 +0000476BOOL WINAPI ImmAssociateContextEx(HWND, HIMC, DWORD);
Paul Quinnea1640f1999-03-10 18:03:53 +0000477BOOL WINAPI ImmConfigureIMEA(HKL, HWND, DWORD, LPVOID);
478BOOL WINAPI ImmConfigureIMEW(HKL, HWND, DWORD, LPVOID);
479#define ImmConfigureIME WINELIB_NAME_AW(ImmConfigureIME)
Eric Pouech4056d7e2004-12-13 21:19:01 +0000480HIMC WINAPI ImmCreateContext(void);
Paul Quinnea1640f1999-03-10 18:03:53 +0000481BOOL WINAPI ImmDestroyContext(HIMC hIMC);
Eric Kohl231f2592002-01-29 18:02:13 +0000482BOOL WINAPI ImmDisableIME(DWORD idThread);
Paul Quinnea1640f1999-03-10 18:03:53 +0000483UINT WINAPI ImmEnumRegisterWordA(HKL, REGISTERWORDENUMPROCA, LPCSTR, DWORD, LPCSTR, LPVOID);
484UINT WINAPI ImmEnumRegisterWordW(HKL, REGISTERWORDENUMPROCW, LPCWSTR, DWORD, LPCWSTR, LPVOID);
485#define ImmEnumRegisterWord WINELIB_NAME_AW(ImmEnumRegisterWord)
486LRESULT WINAPI ImmEscapeA(HKL, HIMC, UINT, LPVOID);
487LRESULT WINAPI ImmEscapeW(HKL, HIMC, UINT, LPVOID);
488#define ImmEscape WINELIB_NAME_AW(ImmEscape)
489DWORD WINAPI ImmGetCandidateListA(HIMC, DWORD, LPCANDIDATELIST, DWORD);
490DWORD WINAPI ImmGetCandidateListW(HIMC, DWORD, LPCANDIDATELIST, DWORD);
491#define ImmGetCandidateList WINELIB_NAME_AW(ImmGetCandidateList)
492DWORD WINAPI ImmGetCandidateListCountA(HIMC, LPDWORD);
493DWORD WINAPI ImmGetCandidateListCountW(HIMC, LPDWORD);
494#define ImmGetCandidateListCount WINELIB_NAME_AW(ImmGetCandidateListCount)
495BOOL WINAPI ImmGetCandidateWindow(HIMC, DWORD, LPCANDIDATEFORM);
Francois Gougetcb7decd2007-10-18 17:12:30 +0200496#if defined(_WINGDI_) && !defined(NOGDI)
Paul Quinnea1640f1999-03-10 18:03:53 +0000497BOOL WINAPI ImmGetCompositionFontA(HIMC, LPLOGFONTA);
498BOOL WINAPI ImmGetCompositionFontW(HIMC, LPLOGFONTW);
499#define ImmGetCompositionFont WINELIB_NAME_AW(ImmGetCompositionFont)
Dimitrie O. Paun4e6fca02004-04-12 22:02:54 +0000500BOOL WINAPI ImmSetCompositionFontA(HIMC, LPLOGFONTA);
501BOOL WINAPI ImmSetCompositionFontW(HIMC, LPLOGFONTW);
502#define ImmSetCompositionFont WINELIB_NAME_AW(ImmSetCompositionFont)
503#endif
Paul Quinnea1640f1999-03-10 18:03:53 +0000504LONG WINAPI ImmGetCompositionStringA(HIMC, DWORD, LPVOID, DWORD);
505LONG WINAPI ImmGetCompositionStringW(HIMC, DWORD, LPVOID, DWORD);
506#define ImmGetCompositionString WINELIB_NAME_AW(ImmGetCompositionString)
507BOOL WINAPI ImmGetCompositionWindow(HIMC, LPCOMPOSITIONFORM);
508HIMC WINAPI ImmGetContext(HWND);
509DWORD WINAPI ImmGetConversionListA(HKL, HIMC, LPCSTR, LPCANDIDATELIST, DWORD, UINT);
510DWORD WINAPI ImmGetConversionListW(HKL, HIMC, LPCWSTR, LPCANDIDATELIST, DWORD, UINT);
511#define ImmGetConversionList WINELIB_NAME_AW(ImmGetConversionList)
512BOOL WINAPI ImmGetConversionStatus(HIMC, LPDWORD, LPDWORD);
513HWND WINAPI ImmGetDefaultIMEWnd(HWND);
514UINT WINAPI ImmGetDescriptionA(HKL, LPSTR, UINT);
515UINT WINAPI ImmGetDescriptionW(HKL, LPWSTR, UINT);
516#define ImmGetDescription WINELIB_NAME_AW(ImmGetDescription)
517DWORD WINAPI ImmGetGuideLineA(HIMC, DWORD, LPSTR, DWORD);
518DWORD WINAPI ImmGetGuideLineW(HIMC, DWORD, LPWSTR, DWORD);
519#define ImmGetGuideLine WINELIB_NAME_AW(ImmGetGuideLine)
520UINT WINAPI ImmGetIMEFileNameA(HKL, LPSTR, UINT);
521UINT WINAPI ImmGetIMEFileNameW(HKL, LPWSTR, UINT);
522#define ImmGetIMEFileName WINELIB_NAME_AW(ImmGetIMEFileName)
Francois Gougetf6848fb2007-08-09 10:41:02 +0200523DWORD WINAPI ImmGetImeMenuItemsA(HIMC, DWORD, DWORD, LPIMEMENUITEMINFOA, LPIMEMENUITEMINFOA, DWORD);
524DWORD WINAPI ImmGetImeMenuItemsW(HIMC, DWORD, DWORD, LPIMEMENUITEMINFOW, LPIMEMENUITEMINFOW, DWORD);
525#define ImmGetImeMenuItems WINELIB_NAME_AW(ImmGetImeMenuItems)
Paul Quinnea1640f1999-03-10 18:03:53 +0000526BOOL WINAPI ImmGetOpenStatus(HIMC);
527DWORD WINAPI ImmGetProperty(HKL, DWORD);
528UINT WINAPI ImmGetRegisterWordStyleA(HKL, UINT, LPSTYLEBUFA);
529UINT WINAPI ImmGetRegisterWordStyleW(HKL, UINT, LPSTYLEBUFW);
530#define ImmGetRegisterWordStyle WINELIB_NAME_AW(ImmGetRegisterWordStyle)
531BOOL WINAPI ImmGetStatusWindowPos(HIMC, LPPOINT);
532UINT WINAPI ImmGetVirtualKey(HWND);
533HKL WINAPI ImmInstallIMEA(LPCSTR, LPCSTR);
534HKL WINAPI ImmInstallIMEW(LPCWSTR, LPCWSTR);
535#define ImmInstallIME WINELIB_NAME_AW(ImmInstallIME)
536BOOL WINAPI ImmIsIME(HKL);
537BOOL WINAPI ImmIsUIMessageA(HWND, UINT, WPARAM, LPARAM);
538BOOL WINAPI ImmIsUIMessageW(HWND, UINT, WPARAM, LPARAM);
539#define ImmIsUIMessage WINELIB_NAME_AW(ImmIsUIMessage)
540BOOL WINAPI ImmNotifyIME(HIMC, DWORD, DWORD, DWORD);
541BOOL WINAPI ImmRegisterWordA(HKL, LPCSTR, DWORD, LPCSTR);
542BOOL WINAPI ImmRegisterWordW(HKL, LPCWSTR, DWORD, LPCWSTR);
543#define ImmRegisterWord WINELIB_NAME_AW(ImmRegisterWord)
544BOOL WINAPI ImmReleaseContext(HWND, HIMC);
545BOOL WINAPI ImmSetCandidateWindow(HIMC, LPCANDIDATEFORM);
Paul Quinnea1640f1999-03-10 18:03:53 +0000546BOOL WINAPI ImmSetCompositionStringA(HIMC, DWORD, LPCVOID, DWORD, LPCVOID, DWORD);
547BOOL WINAPI ImmSetCompositionStringW(HIMC, DWORD, LPCVOID, DWORD, LPCVOID, DWORD);
548#define ImmSetCompositionString WINELIB_NAME_AW(ImmSetCompositionString)
549BOOL WINAPI ImmSetCompositionWindow(HIMC, LPCOMPOSITIONFORM);
550BOOL WINAPI ImmSetConversionStatus(HIMC, DWORD, DWORD);
551BOOL WINAPI ImmSetOpenStatus(HIMC, BOOL);
552BOOL WINAPI ImmSetStatusWindowPos(HIMC, LPPOINT);
553BOOL WINAPI ImmSimulateHotKey(HWND, DWORD);
554BOOL WINAPI ImmUnregisterWordA(HKL, LPCSTR, DWORD, LPCSTR);
555BOOL WINAPI ImmUnregisterWordW(HKL, LPCWSTR, DWORD, LPCWSTR);
556#define ImmUnregisterWord WINELIB_NAME_AW(ImmUnregisterWord)
557
Hidenori Takeshima14d6c022000-12-05 20:45:45 +0000558
Paul Quinnea1640f1999-03-10 18:03:53 +0000559#ifdef __cplusplus
560}
561#endif
Alexandre Julliarda0d77311998-09-13 16:32:00 +0000562
563#endif /* __WINE_IMM_H */