kernel32: Use FIELD_OFFSET instead of pointer cast.
[wine/wine64.git] / include / dimm.idl
blob528c0c518e4a835497c42177899367c119a2a027
1 /*
2 * Copyright 2007 Jacek Caban for CodeWeavers
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 import "unknwn.idl";
21 cpp_quote("#include <imm.h>")
23 cpp_quote("#if 0")
25 typedef WORD LANGID;
27 typedef struct {
28 LPSTR lpReading;
29 LPSTR lpWord;
30 } REGISTERWORDA;
32 typedef struct {
33 LPWSTR lpReading;
34 LPWSTR lpWord;
35 } REGISTERWORDW;
37 #define LF_FACESIZE 32
39 typedef struct {
40 LONG lfHeight;
41 LONG lfWidth;
42 LONG lfEscapement;
43 LONG lfOrientation;
44 LONG lfWeight;
45 BYTE lfItalic;
46 BYTE lfUnderline;
47 BYTE lfStrikeOut;
48 BYTE lfCharSet;
49 BYTE lfOutPrecision;
50 BYTE lfClipPrecision;
51 BYTE lfQuality;
52 BYTE lfPitchAndFamily;
53 CHAR lfFaceName[LF_FACESIZE];
54 } LOGFONTA;
56 typedef struct {
57 LONG lfHeight;
58 LONG lfWidth;
59 LONG lfEscapement;
60 LONG lfOrientation;
61 LONG lfWeight;
62 BYTE lfItalic;
63 BYTE lfUnderline;
64 BYTE lfStrikeOut;
65 BYTE lfCharSet;
66 BYTE lfOutPrecision;
67 BYTE lfClipPrecision;
68 BYTE lfQuality;
69 BYTE lfPitchAndFamily;
70 WCHAR lfFaceName[LF_FACESIZE];
71 } LOGFONTW;
73 typedef DWORD HIMC;
74 typedef DWORD HIMCC;
76 typedef struct {
77 DWORD dwIndex;
78 DWORD dwStyle;
79 POINT ptCurrentPos;
80 RECT rcArea;
81 } CANDIDATEFORM;
83 typedef struct {
84 DWORD dwStyle;
85 POINT ptCurrentPos;
86 RECT rcArea;
87 } COMPOSITIONFORM;
89 typedef struct {
90 DWORD dwSize;
91 DWORD dwStyle;
92 DWORD dwCount;
93 DWORD dwSelection;
94 DWORD dwPageStart;
95 DWORD dwPageSize;
96 DWORD dwOffset[1];
97 } CANDIDATELIST;
99 #define STYLE_DESCRIPTION_SIZE 32
101 typedef struct {
102 DWORD dwStyle;
103 CHAR szDescription[STYLE_DESCRIPTION_SIZE];
104 } STYLEBUFA;
106 typedef struct {
107 DWORD dwStyle;
108 WCHAR szDescription[STYLE_DESCRIPTION_SIZE];
109 } STYLEBUFW;
111 typedef WORD ATOM;
113 #define IMEMENUITEM_STRING_SIZE 80
115 typedef struct {
116 UINT cbSize;
117 UINT fType;
118 UINT fState;
119 UINT wID;
120 HBITMAP hbmpChecked;
121 HBITMAP hbmpUnchecked;
122 DWORD dwItemData;
123 CHAR szString[IMEMENUITEM_STRING_SIZE];
124 HBITMAP hbmpItem;
125 } IMEMENUITEMINFOA;
127 typedef struct {
128 UINT cbSize;
129 UINT fType;
130 UINT fState;
131 UINT wID;
132 HBITMAP hbmpChecked;
133 HBITMAP hbmpUnchecked;
134 DWORD dwItemData;
135 WCHAR szString[IMEMENUITEM_STRING_SIZE];
136 HBITMAP hbmpItem;
137 } IMEMENUITEMINFOW;
139 cpp_quote("#endif")
142 object,
143 uuid(08c03412-f96b-11d0-a475-00aa006bcc59),
144 pointer_default(unique)
146 interface IEnumRegisterWordA : IUnknown
148 HRESULT Clone(
149 [out] IEnumRegisterWordA **ppEnum);
151 HRESULT Next(
152 [in] ULONG ulCount,
153 [out] REGISTERWORDA *rgRegisterword,
154 [out] ULONG *pcFetched);
156 HRESULT Reset();
158 HRESULT Skip(
159 [in] ULONG ulCount);
163 object,
164 uuid(4955dd31-b159-11d0-8fcf-00aa006bcc59),
165 pointer_default(unique)
167 interface IEnumRegisterWordW : IUnknown
169 HRESULT Clone(
170 [out] IEnumRegisterWordW **ppEnum);
172 HRESULT Next(
173 [in] ULONG ulCount,
174 [out] REGISTERWORDW *rgRegisterword,
175 [out] ULONG *pcFetched);
177 HRESULT Reset();
179 HRESULT Skip(
180 [in] ULONG ulCount);
184 object,
185 uuid(09b5eab0-f997-11d1-93d4-0060b067b86e),
186 pointer_default(unique)
188 interface IEnumInputContext : IUnknown
190 HRESULT Clone(
191 [out] IEnumInputContext **ppEnum);
193 HRESULT Next(
194 [in] ULONG ulCount,
195 [out] HIMC *rgInputContext,
196 [out] ULONG *pcFetched);
198 HRESULT Reset();
200 HRESULT Skip(
201 [in] ULONG ulCount);
205 object,
206 uuid(08c0e040-62d1-11d1-9326-0060b067b86e),
207 pointer_default(unique)
209 interface IActiveIMMApp : IUnknown
211 HRESULT AssociateContext(
212 [in] HWND hWnd,
213 [in] HIMC hIME,
214 [out] HIMC *phPrev);
216 HRESULT ConfigureIMEA(
217 [in] HKL hKL,
218 [in] HWND hwnd,
219 [in] DWORD dwMode,
220 [in] REGISTERWORDA *pData);
222 HRESULT ConfigureIMEW(
223 [in] HKL hKL,
224 [in] HWND hWnd,
225 [in] DWORD dwMode,
226 [in] REGISTERWORDW *pData);
228 HRESULT CreateContext(
229 [out] HIMC *phIMC);
231 HRESULT DestroyContext(
232 [in] HIMC hIME);
234 HRESULT EnumRegisterWordA(
235 [in] HKL hKL,
236 [in] LPSTR szReading,
237 [in] DWORD dwStyle,
238 [in] LPSTR szRegister,
239 [in] LPVOID pData,
240 [out] IEnumRegisterWordA **pEnum);
242 HRESULT EnumRegisterWordW(
243 [in] HKL hKL,
244 [in] LPWSTR szReading,
245 [in] DWORD dwStyle,
246 [in] LPWSTR szRegister,
247 [in] LPVOID pData,
248 [out] IEnumRegisterWordW **pEnum);
250 HRESULT EscapeA(
251 [in] HKL hKL,
252 [in] HIMC hIMC,
253 [in] UINT uEscape,
254 [in, out] LPVOID pData,
255 [out] LRESULT *plResult);
257 HRESULT EscapeW(
258 [in] HKL hKL,
259 [in] HIMC hIMC,
260 [in] UINT uEscape,
261 [in, out] LPVOID pData,
262 [out] LRESULT *plResult);
264 HRESULT GetCandidateListA(
265 [in] HIMC hIMC,
266 [in] DWORD dwIndex,
267 [in] UINT uBufLen,
268 [out] CANDIDATELIST *pCandList,
269 [out] UINT *puCopied);
271 HRESULT GetCandidateListW(
272 [in] HIMC hIMC,
273 [in] DWORD dwIndex,
274 [in] UINT uBufLen,
275 [out] CANDIDATELIST *pCandList,
276 [out] UINT *puCopied);
278 HRESULT GetCandidateListCountA(
279 [in] HIMC hIMC,
280 [out] DWORD *pdwListSize,
281 [out] DWORD *pdwBufLen);
283 HRESULT GetCandidateListCountW(
284 [in] HIMC hIMC,
285 [out] DWORD *pdwListSize,
286 [out] DWORD *pdwBufLen);
288 HRESULT GetCandidateWindow(
289 [in] HIMC hIMC,
290 [in] DWORD dwIndex,
291 [out] CANDIDATEFORM *pCandidate);
293 HRESULT GetCompositionFontA(
294 [in] HIMC hIMC,
295 [out] LOGFONTA *plf);
297 HRESULT GetCompositionFontW(
298 [in] HIMC hIMC,
299 [out] LOGFONTW *plf);
301 HRESULT GetCompositionStringA(
302 [in] HIMC hIMC,
303 [in] DWORD dwIndex,
304 [in] DWORD dwBufLen,
305 [out] LONG *plCopied,
306 [out] LPVOID pBuf);
308 HRESULT GetCompositionStringW(
309 [in] HIMC hIMC,
310 [in] DWORD dwIndex,
311 [in] DWORD dwBufLen,
312 [out] LONG *plCopied,
313 [out] LPVOID pBuf);
315 HRESULT GetCompositionWindow(
316 [in] HIMC hIMC,
317 [out] COMPOSITIONFORM *pCompForm);
319 HRESULT GetContext(
320 [in] HWND hwnd,
321 [out] HIMC *phIMC);
323 HRESULT GetConversionListA(
324 [in] HKL hKL,
325 [in] HIMC hIMC,
326 [in] LPSTR pSrc,
327 [in] UINT uBufLen,
328 [in] UINT uFlag,
329 [out] CANDIDATELIST *pDst,
330 [out] UINT *puCopied);
332 HRESULT GetConversionListW(
333 [in] HKL hKL,
334 [in] HIMC hIMC,
335 [in] LPWSTR pSrc,
336 [in] UINT uBufLen,
337 [in] UINT uFlag,
338 [out] CANDIDATELIST *pDst,
339 [out] UINT *puCopied);
341 HRESULT GetConversionStatus(
342 [in] HIMC hIMC,
343 [out] DWORD *pfdwConversion,
344 [out] DWORD *pfdwSentence);
346 HRESULT GetDefaultIMEWnd(
347 [in] HWND hWnd,
348 [out] HWND *phDefWnd);
350 HRESULT GetDescriptionA(
351 [in] HKL hKL,
352 [in] UINT uBufLen,
353 [out] LPSTR szDescription,
354 [out] UINT *puCopied);
356 HRESULT GetDescriptionW(
357 [in] HKL hKL,
358 [in] UINT uBufLen,
359 [out] LPWSTR szDescription,
360 [out] UINT *puCopied);
362 HRESULT GetGuideLineA(
363 [in] HIMC hIMC,
364 [in] DWORD dwIndex,
365 [in] DWORD dwBufLen,
366 [out] LPSTR pBuf,
367 [out] DWORD *pdwResult);
369 HRESULT GetGuideLineW(
370 [in] HIMC hIMC,
371 [in] DWORD dwIndex,
372 [in] DWORD dwBufLen,
373 [out] LPWSTR pBuf,
374 [out] DWORD *pdwResult);
376 HRESULT GetIMEFileNameA(
377 [in] HKL hKL,
378 [in] UINT uBufLen,
379 [out] LPSTR szFileName,
380 [out] UINT *puCopied);
382 HRESULT GetIMEFileNameW(
383 [in] HKL hKL,
384 [in] UINT uBufLen,
385 [out] LPWSTR szFileName,
386 [out] UINT *puCopied);
388 HRESULT GetOpenStatus(
389 [in] HIMC hIMC);
391 HRESULT GetProperty(
392 [in] HKL hKL,
393 [in] DWORD fdwIndex,
394 [out] DWORD *pdwProperty);
396 HRESULT GetRegisterWordStyleA(
397 [in] HKL hKL,
398 [in] UINT nItem,
399 [out] STYLEBUFA *pStyleBuf,
400 [out] UINT *puCopied);
402 HRESULT GetRegisterWordStyleW(
403 [in] HKL hKL,
404 [in] UINT nItem,
405 [out] STYLEBUFW *pStyleBuf,
406 [out] UINT *puCopied);
408 HRESULT GetStatusWindowPos(
409 [in] HIMC hIMC,
410 [out] POINT *pptPos);
412 HRESULT GetVirtualKey(
413 [in] HWND hWnd,
414 [out] UINT *puVirtualKey);
416 HRESULT InstallIMEA(
417 [in] LPSTR szIMEFileName,
418 [in] LPSTR szLayoutText,
419 [out] HKL *phKL);
421 HRESULT InstallIMEW(
422 [in] LPWSTR szIMEFileName,
423 [in] LPWSTR szLayoutText,
424 [out] HKL *phKL);
426 HRESULT IsIME(
427 [in] HKL hKL);
429 HRESULT IsUIMessageA(
430 [in] HWND hWndIME,
431 [in] UINT msg,
432 [in] WPARAM wParam,
433 [in] LPARAM lParam);
435 HRESULT IsUIMessageW(
436 [in] HWND hWndIME,
437 [in] UINT msg,
438 [in] WPARAM wParam,
439 [in] LPARAM lParam);
441 HRESULT NotifyIME(
442 [in] HIMC hIMC,
443 [in] DWORD dwAction,
444 [in] DWORD dwIndex,
445 [in] DWORD dwValue);
447 HRESULT RegisterWordA(
448 [in] HKL hKL,
449 [in] LPSTR szReading,
450 [in] DWORD dwStyle,
451 [in] LPSTR szRegister);
453 HRESULT RegisterWordW(
454 [in] HKL hKL,
455 [in] LPWSTR szReading,
456 [in] DWORD dwStyle,
457 [in] LPWSTR szRegister);
459 HRESULT ReleaseContext(
460 [in] HWND hWnd,
461 [in] HIMC hIMC);
463 HRESULT SetCandidateWindow(
464 [in] HIMC hIMC,
465 [in] CANDIDATEFORM *pCandidate);
467 HRESULT SetCompositionFontA(
468 [in] HIMC hIMC,
469 [in] LOGFONTA *plf);
471 HRESULT SetCompositionFontW(
472 [in] HIMC hIMC,
473 [in] LOGFONTW *plf);
475 HRESULT SetCompositionStringA(
476 [in] HIMC hIMC,
477 [in] DWORD dwIndex,
478 [in] LPVOID pComp,
479 [in] DWORD dwCompLen,
480 [in] LPVOID pRead,
481 [in] DWORD dwReadLen);
483 HRESULT SetCompositionStringW(
484 [in] HIMC hIMC,
485 [in] DWORD dwIndex,
486 [in] LPVOID pComp,
487 [in] DWORD dwCompLen,
488 [in] LPVOID pRead,
489 [in] DWORD dwReadLen);
491 HRESULT SetCompositionWindow(
492 [in] HIMC hIMC,
493 [in] COMPOSITIONFORM *pCompForm);
495 HRESULT SetConversionStatus(
496 [in] HIMC hIMC,
497 [in] DWORD fdwConversion,
498 [in] DWORD fdwSentence);
500 HRESULT SetOpenStatus(
501 [in] HIMC hIMC,
502 [in] BOOL fOpen);
504 HRESULT SetStatusWindowPos(
505 [in] HIMC hIMC,
506 [in] POINT *pptPos);
508 HRESULT SimulateHotKey(
509 [in] HWND hwnd,
510 [in] DWORD dwHotKeyID);
512 HRESULT UnregisterWordA(
513 [in] HKL hKL,
514 [in] LPSTR szReading,
515 [in] DWORD dwStyle,
516 [in] LPSTR szUnregister);
518 HRESULT UnregisterWordW(
519 [in] HKL hKL,
520 [in] LPWSTR szReading,
521 [in] DWORD dwStyle,
522 [in] LPWSTR szUnregister);
524 HRESULT Activate(
525 [in] BOOL fRestoreLayout);
527 HRESULT Deactivate();
529 HRESULT OnDefWindowProc(
530 [in] HWND hWnd,
531 [in] UINT Msg,
532 [in] WPARAM wParam,
533 [in] LPARAM lParam,
534 [out] LRESULT *plResult);
536 HRESULT FilterClientWindows(
537 [in] ATOM *aaClassList,
538 [in] UINT uSize);
540 HRESULT GetCodePageA(
541 [in] HKL hKL,
542 [out] UINT *uCodePage);
544 HRESULT GetLangId(
545 [in] HKL hKL,
546 [out] LANGID *plid);
548 HRESULT AssociateContextEx(
549 [in] HWND hWnd,
550 [in] HIMC hIMC,
551 [in] DWORD dwFlags);
553 HRESULT DisableIME(
554 [in] DWORD idThread);
556 HRESULT GetImeMenuItemsA(
557 [in] HIMC hIMC,
558 [in] DWORD dwFlags,
559 [in] DWORD dwType,
560 [in] IMEMENUITEMINFOA *pImeParentMenu,
561 [out] IMEMENUITEMINFOA *pImeMenu,
562 [in] DWORD dwSize,
563 [out] DWORD *pdwResult);
565 HRESULT GetImeMenuItemsW(
566 [in] HIMC hIMC,
567 [in] DWORD dwFlags,
568 [in] DWORD dwType,
569 [in] IMEMENUITEMINFOW *pImeParentMenu,
570 [out] IMEMENUITEMINFOW *pImeMenu,
571 [in] DWORD dwSize,
572 [out] DWORD *pdwResult);
574 HRESULT EnumInputContext(
575 [in] DWORD idThread,
576 [out] IEnumInputContext **ppEnum);
580 uuid(4955dd33-b159-11d0-8fcf-00aa006bcc59)
582 coclass CActiveIMM
584 [default] interface IActiveIMMApp;
585 /* interface IActiveIMMIME; */
586 /* interface IActiveIMMRegistrar; */
587 /* interface IActiveIMMMessagePumpOwner; */