imm32: Create the IME UI as child of the IME default window.
[wine.git] / include / immdev.h
blob92f2a47c167028673e59b0ea946cdb8a9f6c0907
1 /*
2 * Copyright (C) 2007 CodeWeavers, Aric Stewart
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2.1 of the License, or (at your option) any later version.
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
19 #ifndef __WINE_IMMDEV_H
20 #define __WINE_IMMDEV_H
22 #ifdef __cplusplus
23 extern "C" {
24 #endif
26 typedef struct tagINPUTCONTEXT
28 HWND hWnd;
29 BOOL fOpen;
30 POINT ptStatusWndPos;
31 POINT ptSoftKbdPos;
32 DWORD fdwConversion;
33 DWORD fdwSentence;
34 union {
35 LOGFONTA A;
36 LOGFONTW W;
37 } lfFont;
38 COMPOSITIONFORM cfCompForm;
39 CANDIDATEFORM cfCandForm[4];
40 HIMCC hCompStr;
41 HIMCC hCandInfo;
42 HIMCC hGuideLine;
43 HIMCC hPrivate;
44 DWORD dwNumMsgBuf;
45 HIMCC hMsgBuf;
46 DWORD fdwInit;
47 DWORD dwReserve[3];
48 } INPUTCONTEXT, *LPINPUTCONTEXT;
50 typedef struct tagIMEINFO
52 DWORD dwPrivateDataSize;
53 DWORD fdwProperty;
54 DWORD fdwConversionCaps;
55 DWORD fdwSentenceCaps;
56 DWORD fdwUICaps;
57 DWORD fdwSCSCaps;
58 DWORD fdwSelectCaps;
59 } IMEINFO, *LPIMEINFO;
61 typedef struct tagCOMPOSITIONSTRING
63 DWORD dwSize;
64 DWORD dwCompReadAttrLen;
65 DWORD dwCompReadAttrOffset;
66 DWORD dwCompReadClauseLen;
67 DWORD dwCompReadClauseOffset;
68 DWORD dwCompReadStrLen;
69 DWORD dwCompReadStrOffset;
70 DWORD dwCompAttrLen;
71 DWORD dwCompAttrOffset;
72 DWORD dwCompClauseLen;
73 DWORD dwCompClauseOffset;
74 DWORD dwCompStrLen;
75 DWORD dwCompStrOffset;
76 DWORD dwCursorPos;
77 DWORD dwDeltaStart;
78 DWORD dwResultReadClauseLen;
79 DWORD dwResultReadClauseOffset;
80 DWORD dwResultReadStrLen;
81 DWORD dwResultReadStrOffset;
82 DWORD dwResultClauseLen;
83 DWORD dwResultClauseOffset;
84 DWORD dwResultStrLen;
85 DWORD dwResultStrOffset;
86 DWORD dwPrivateSize;
87 DWORD dwPrivateOffset;
88 } COMPOSITIONSTRING, *LPCOMPOSITIONSTRING;
90 typedef struct tagGUIDELINE
92 DWORD dwSize;
93 DWORD dwLevel;
94 DWORD dwIndex;
95 DWORD dwStrLen;
96 DWORD dwStrOffset;
97 DWORD dwPrivateSize;
98 DWORD dwPrivateOffset;
99 } GUIDELINE, *LPGUIDELINE;
101 typedef struct tagCANDIDATEINFO
103 DWORD dwSize;
104 DWORD dwCount;
105 DWORD dwOffset[32];
106 DWORD dwPrivateSize;
107 DWORD dwPrivateOffset;
108 } CANDIDATEINFO, *LPCANDIDATEINFO;
110 typedef struct tagTRANSMSG
112 UINT message;
113 WPARAM wParam;
114 LPARAM lParam;
115 } TRANSMSG, *LPTRANSMSG;
117 typedef struct tagTRANSMSGLIST
119 UINT uMsgCount;
120 TRANSMSG TransMsg[1];
121 } TRANSMSGLIST, *LPTRANSMSGLIST;
123 LPINPUTCONTEXT WINAPI ImmLockIMC(HIMC);
124 BOOL WINAPI ImmUnlockIMC(HIMC);
125 DWORD WINAPI ImmGetIMCLockCount(HIMC);
126 HIMCC WINAPI ImmCreateIMCC(DWORD);
127 HIMCC WINAPI ImmDestroyIMCC(HIMCC);
128 LPVOID WINAPI ImmLockIMCC(HIMCC);
129 BOOL WINAPI ImmUnlockIMCC(HIMCC);
130 DWORD WINAPI ImmGetIMCCLockCount(HIMCC);
131 HIMCC WINAPI ImmReSizeIMCC(HIMCC, DWORD);
132 DWORD WINAPI ImmGetIMCCSize(HIMCC);
134 #define IMMGWL_IMC 0
135 #define IMMGWL_PRIVATE (sizeof(LONG_PTR))
137 /* IME Property bits */
138 #define IME_PROP_END_UNLOAD 0x0001
139 #define IME_PROP_KBD_CHAR_FIRST 0x0002
140 #define IME_PROP_IGNORE_UPKEYS 0x0004
141 #define IME_PROP_NEED_ALTKEY 0x0008
142 #define IME_PROP_NO_KEYS_ON_CLOSE 0x0010
144 /* for NI_CONTEXTUPDATED */
145 #define IMC_SETCONVERSIONMODE 0x0002
146 #define IMC_SETSENTENCEMODE 0x0004
147 #define IMC_SETOPENSTATUS 0x0006
149 /* dwAction for ImmNotifyIME */
150 #define NI_CONTEXTUPDATED 0x0003
151 #define NI_OPENCANDIDATE 0x0010
152 #define NI_CLOSECANDIDATE 0x0011
153 #define NI_SELECTCANDIDATESTR 0x0012
154 #define NI_CHANGECANDIDATELIST 0x0013
155 #define NI_FINALIZECONVERSIONRESULT 0x0014
156 #define NI_COMPOSITIONSTR 0x0015
157 #define NI_SETCANDIDATE_PAGESTART 0x0016
158 #define NI_SETCANDIDATE_PAGESIZE 0x0017
159 #define NI_IMEMENUSELECTED 0x0018
161 BOOL WINAPI ImmGetHotKey(DWORD,UINT*,UINT*,HKL*);
162 BOOL WINAPI ImmSetHotKey(DWORD,UINT,UINT,HKL);
163 BOOL WINAPI ImmGenerateMessage(HIMC);
164 LRESULT WINAPI ImmRequestMessageA(HIMC, WPARAM, LPARAM);
165 LRESULT WINAPI ImmRequestMessageW(HIMC, WPARAM, LPARAM);
166 #define ImmRequestMessage WINELIB_NAME_AW(ImmRequestMessage)
167 BOOL WINAPI ImmTranslateMessage(HWND, UINT, WPARAM, LPARAM);
168 HWND WINAPI ImmCreateSoftKeyboard(UINT, UINT, int, int);
169 BOOL WINAPI ImmDestroySoftKeyboard(HWND);
170 BOOL WINAPI ImmShowSoftKeyboard(HWND, int);
172 BOOL WINAPI ImeInquire(LPIMEINFO, LPWSTR, DWORD);
173 BOOL WINAPI ImeConfigure (HKL, HWND, DWORD, LPVOID);
174 DWORD WINAPI ImeConversionList(HIMC, LPCWSTR, LPCANDIDATELIST,DWORD,UINT);
175 BOOL WINAPI ImeDestroy(UINT);
176 LRESULT WINAPI ImeEscape(HIMC, UINT, LPVOID);
177 BOOL WINAPI ImeProcessKey(HIMC, UINT, LPARAM, const LPBYTE);
178 BOOL WINAPI ImeSelect(HIMC, BOOL);
179 BOOL WINAPI ImeSetActiveContext(HIMC, BOOL);
180 UINT WINAPI ImeToAsciiEx(UINT, UINT, const LPBYTE, LPTRANSMSGLIST, UINT, HIMC);
181 BOOL WINAPI NotifyIME(HIMC, DWORD, DWORD, DWORD);
182 BOOL WINAPI ImeRegisterWord(LPCWSTR, DWORD, LPCWSTR);
183 BOOL WINAPI ImeUnregisterWord(LPCWSTR, DWORD, LPCWSTR);
184 UINT WINAPI ImeGetRegisterWordStyle(UINT, LPSTYLEBUFW);
185 UINT WINAPI ImeEnumRegisterWord(REGISTERWORDENUMPROCW, LPCWSTR, DWORD, LPCWSTR, LPVOID);
186 BOOL WINAPI ImeSetCompositionString(HIMC, DWORD, LPCVOID, DWORD, LPCVOID, DWORD);
187 DWORD WINAPI ImeGetImeMenuItems(HIMC, DWORD, DWORD, LPIMEMENUITEMINFOW, LPIMEMENUITEMINFOW, DWORD);
189 #ifdef __cplusplus
190 } /* extern "C" */
191 #endif
193 #endif /* __WINE_IMMDEV_H */