dmime/tests: Avoid discarding old notifications in test.
[wine.git] / include / immdev.h
blob4141e9350c05aeac4520988b5a05f1552ebc38a1
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 #define INIT_STATUSWNDPOS 0x00000001
138 #define INIT_CONVERSION 0x00000002
139 #define INIT_SENTENCE 0x00000004
140 #define INIT_LOGFONT 0x00000008
141 #define INIT_COMPFORM 0x00000010
142 #define INIT_SOFTKBDPOS 0x00000020
144 /* IME Property bits */
145 #define IME_PROP_END_UNLOAD 0x0001
146 #define IME_PROP_KBD_CHAR_FIRST 0x0002
147 #define IME_PROP_IGNORE_UPKEYS 0x0004
148 #define IME_PROP_NEED_ALTKEY 0x0008
149 #define IME_PROP_NO_KEYS_ON_CLOSE 0x0010
151 /* for NI_CONTEXTUPDATED */
152 #define IMC_SETCONVERSIONMODE 0x0002
153 #define IMC_SETSENTENCEMODE 0x0004
154 #define IMC_SETOPENSTATUS 0x0006
156 /* dwAction for ImmNotifyIME */
157 #define NI_CONTEXTUPDATED 0x0003
158 #define NI_OPENCANDIDATE 0x0010
159 #define NI_CLOSECANDIDATE 0x0011
160 #define NI_SELECTCANDIDATESTR 0x0012
161 #define NI_CHANGECANDIDATELIST 0x0013
162 #define NI_FINALIZECONVERSIONRESULT 0x0014
163 #define NI_COMPOSITIONSTR 0x0015
164 #define NI_SETCANDIDATE_PAGESTART 0x0016
165 #define NI_SETCANDIDATE_PAGESIZE 0x0017
166 #define NI_IMEMENUSELECTED 0x0018
168 BOOL WINAPI ImmGetHotKey(DWORD,UINT*,UINT*,HKL*);
169 BOOL WINAPI ImmSetHotKey(DWORD,UINT,UINT,HKL);
170 BOOL WINAPI ImmGenerateMessage(HIMC);
171 LRESULT WINAPI ImmRequestMessageA(HIMC, WPARAM, LPARAM);
172 LRESULT WINAPI ImmRequestMessageW(HIMC, WPARAM, LPARAM);
173 #define ImmRequestMessage WINELIB_NAME_AW(ImmRequestMessage)
174 BOOL WINAPI ImmTranslateMessage(HWND, UINT, WPARAM, LPARAM);
175 HWND WINAPI ImmCreateSoftKeyboard(UINT, UINT, int, int);
176 BOOL WINAPI ImmDestroySoftKeyboard(HWND);
177 BOOL WINAPI ImmShowSoftKeyboard(HWND, int);
179 BOOL WINAPI ImeInquire(LPIMEINFO, LPWSTR, DWORD);
180 BOOL WINAPI ImeConfigure (HKL, HWND, DWORD, LPVOID);
181 DWORD WINAPI ImeConversionList(HIMC, LPCWSTR, LPCANDIDATELIST,DWORD,UINT);
182 BOOL WINAPI ImeDestroy(UINT);
183 LRESULT WINAPI ImeEscape(HIMC, UINT, LPVOID);
184 BOOL WINAPI ImeProcessKey(HIMC, UINT, LPARAM, const LPBYTE);
185 BOOL WINAPI ImeSelect(HIMC, BOOL);
186 BOOL WINAPI ImeSetActiveContext(HIMC, BOOL);
187 UINT WINAPI ImeToAsciiEx(UINT, UINT, const LPBYTE, LPTRANSMSGLIST, UINT, HIMC);
188 BOOL WINAPI NotifyIME(HIMC, DWORD, DWORD, DWORD);
189 BOOL WINAPI ImeRegisterWord(LPCWSTR, DWORD, LPCWSTR);
190 BOOL WINAPI ImeUnregisterWord(LPCWSTR, DWORD, LPCWSTR);
191 UINT WINAPI ImeGetRegisterWordStyle(UINT, LPSTYLEBUFW);
192 UINT WINAPI ImeEnumRegisterWord(REGISTERWORDENUMPROCW, LPCWSTR, DWORD, LPCWSTR, LPVOID);
193 BOOL WINAPI ImeSetCompositionString(HIMC, DWORD, LPCVOID, DWORD, LPCVOID, DWORD);
194 DWORD WINAPI ImeGetImeMenuItems(HIMC, DWORD, DWORD, LPIMEMENUITEMINFOW, LPIMEMENUITEMINFOW, DWORD);
196 #ifdef __cplusplus
197 } /* extern "C" */
198 #endif
200 #endif /* __WINE_IMMDEV_H */