Release 1.1.37.
[wine/gsoc-2012-control.git] / dlls / msimtf / activeimmapp.c
blob73ce0758c70924c4fd791b36c4bd1f53775cdaad
1 /*
2 * ActiveIMMApp Interface
4 * Copyright 2008 CodeWeavers, Aric Stewart
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.
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.
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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
21 #include "config.h"
23 #include <stdarg.h>
25 #define COBJMACROS
27 #include "windef.h"
28 #include "winbase.h"
29 #include "wingdi.h"
30 #include "winreg.h"
31 #include "winuser.h"
32 #include "winerror.h"
33 #include "objbase.h"
34 #include "advpub.h"
35 #include "dimm.h"
36 #include "imm.h"
38 #include "wine/unicode.h"
40 #include "wine/debug.h"
42 WINE_DEFAULT_DEBUG_CHANNEL(msimtf);
44 typedef struct tagActiveIMMApp {
45 const IActiveIMMAppVtbl *vtbl;
46 LONG refCount;
47 } ActiveIMMApp;
49 static void ActiveIMMApp_Destructor(ActiveIMMApp* This)
51 TRACE("\n");
52 HeapFree(GetProcessHeap(),0,This);
55 static HRESULT WINAPI ActiveIMMApp_QueryInterface (IActiveIMMApp* iface,
56 REFIID iid, LPVOID *ppvOut)
58 ActiveIMMApp *This = (ActiveIMMApp*)iface;
59 *ppvOut = NULL;
61 if (IsEqualIID(iid, &IID_IUnknown) || IsEqualIID(iid, &IID_IActiveIMMApp))
63 *ppvOut = This;
66 if (*ppvOut)
68 IUnknown_AddRef(iface);
69 return S_OK;
72 WARN("unsupported interface: %s\n", debugstr_guid(iid));
73 return E_NOINTERFACE;
76 static ULONG WINAPI ActiveIMMApp_AddRef(IActiveIMMApp* iface)
78 ActiveIMMApp *This = (ActiveIMMApp*)iface;
79 return InterlockedIncrement(&This->refCount);
82 static ULONG WINAPI ActiveIMMApp_Release(IActiveIMMApp* iface)
84 ActiveIMMApp *This = (ActiveIMMApp*)iface;
85 ULONG ret;
87 ret = InterlockedDecrement(&This->refCount);
88 if (ret == 0)
89 ActiveIMMApp_Destructor(This);
90 return ret;
93 static HRESULT WINAPI ActiveIMMApp_AssociateContext(IActiveIMMApp* iface,
94 HWND hWnd, HIMC hIME, HIMC *phPrev)
96 *phPrev = ImmAssociateContext(hWnd,hIME);
97 return S_OK;
100 static HRESULT WINAPI ActiveIMMApp_ConfigureIMEA(IActiveIMMApp* This,
101 HKL hKL, HWND hwnd, DWORD dwMode, REGISTERWORDA *pData)
103 BOOL rc;
105 rc = ImmConfigureIMEA(hKL, hwnd, dwMode, pData);
106 if (rc)
107 return E_FAIL;
108 else
109 return S_OK;
112 static HRESULT WINAPI ActiveIMMApp_ConfigureIMEW(IActiveIMMApp* This,
113 HKL hKL, HWND hWnd, DWORD dwMode, REGISTERWORDW *pData)
115 BOOL rc;
117 rc = ImmConfigureIMEW(hKL, hWnd, dwMode, pData);
118 if (rc)
119 return E_FAIL;
120 else
121 return S_OK;
124 static HRESULT WINAPI ActiveIMMApp_CreateContext(IActiveIMMApp* This,
125 HIMC *phIMC)
127 *phIMC = ImmCreateContext();
128 if (*phIMC)
129 return S_OK;
130 else
131 return E_FAIL;
134 static HRESULT WINAPI ActiveIMMApp_DestroyContext(IActiveIMMApp* This,
135 HIMC hIME)
137 BOOL rc;
139 rc = ImmDestroyContext(hIME);
140 if (rc)
141 return S_OK;
142 else
143 return E_FAIL;
146 static HRESULT WINAPI ActiveIMMApp_EnumRegisterWordA(IActiveIMMApp* This,
147 HKL hKL, LPSTR szReading, DWORD dwStyle, LPSTR szRegister,
148 LPVOID pData, IEnumRegisterWordA **pEnum)
150 FIXME("Stub\n");
151 return E_NOTIMPL;
154 static HRESULT WINAPI ActiveIMMApp_EnumRegisterWordW(IActiveIMMApp* This,
155 HKL hKL, LPWSTR szReading, DWORD dwStyle, LPWSTR szRegister,
156 LPVOID pData, IEnumRegisterWordW **pEnum)
158 FIXME("Stub\n");
159 return E_NOTIMPL;
162 static HRESULT WINAPI ActiveIMMApp_EscapeA(IActiveIMMApp* This,
163 HKL hKL, HIMC hIMC, UINT uEscape, LPVOID pData, LRESULT *plResult)
165 *plResult = ImmEscapeA(hKL, hIMC, uEscape, pData);
166 return S_OK;
169 static HRESULT WINAPI ActiveIMMApp_EscapeW(IActiveIMMApp* This,
170 HKL hKL, HIMC hIMC, UINT uEscape, LPVOID pData, LRESULT *plResult)
172 *plResult = ImmEscapeW(hKL, hIMC, uEscape, pData);
173 return S_OK;
176 static HRESULT WINAPI ActiveIMMApp_GetCandidateListA(IActiveIMMApp* This,
177 HIMC hIMC, DWORD dwIndex, UINT uBufLen, CANDIDATELIST *pCandList,
178 UINT *puCopied)
180 *puCopied = ImmGetCandidateListA(hIMC, dwIndex, pCandList, uBufLen);
181 return S_OK;
184 static HRESULT WINAPI ActiveIMMApp_GetCandidateListW(IActiveIMMApp* This,
185 HIMC hIMC, DWORD dwIndex, UINT uBufLen, CANDIDATELIST *pCandList,
186 UINT *puCopied)
188 *puCopied = ImmGetCandidateListW(hIMC, dwIndex, pCandList, uBufLen);
189 return S_OK;
192 static HRESULT WINAPI ActiveIMMApp_GetCandidateListCountA(IActiveIMMApp* This,
193 HIMC hIMC, DWORD *pdwListSize, DWORD *pdwBufLen)
195 *pdwBufLen = ImmGetCandidateListCountA(hIMC, pdwListSize);
196 return S_OK;
199 static HRESULT WINAPI ActiveIMMApp_GetCandidateListCountW(IActiveIMMApp* This,
200 HIMC hIMC, DWORD *pdwListSize, DWORD *pdwBufLen)
202 *pdwBufLen = ImmGetCandidateListCountA(hIMC, pdwListSize);
203 return S_OK;
206 static HRESULT WINAPI ActiveIMMApp_GetCandidateWindow(IActiveIMMApp* This,
207 HIMC hIMC, DWORD dwIndex, CANDIDATEFORM *pCandidate)
209 BOOL rc;
210 rc = ImmGetCandidateWindow(hIMC,dwIndex,pCandidate);
211 if (rc)
212 return S_OK;
213 else
214 return E_FAIL;
217 static HRESULT WINAPI ActiveIMMApp_GetCompositionFontA(IActiveIMMApp* This,
218 HIMC hIMC, LOGFONTA *plf)
220 BOOL rc;
221 rc = ImmGetCompositionFontA(hIMC,plf);
222 if (rc)
223 return S_OK;
224 else
225 return E_FAIL;
228 static HRESULT WINAPI ActiveIMMApp_GetCompositionFontW(IActiveIMMApp* This,
229 HIMC hIMC, LOGFONTW *plf)
231 BOOL rc;
232 rc = ImmGetCompositionFontW(hIMC,plf);
233 if (rc)
234 return S_OK;
235 else
236 return E_FAIL;
239 static HRESULT WINAPI ActiveIMMApp_GetCompositionStringA(IActiveIMMApp* This,
240 HIMC hIMC, DWORD dwIndex, DWORD dwBufLen, LONG *plCopied, LPVOID pBuf)
242 *plCopied = ImmGetCompositionStringA(hIMC, dwIndex, pBuf, dwBufLen);
243 return S_OK;
246 static HRESULT WINAPI ActiveIMMApp_GetCompositionStringW(IActiveIMMApp* This,
247 HIMC hIMC, DWORD dwIndex, DWORD dwBufLen, LONG *plCopied, LPVOID pBuf)
249 *plCopied = ImmGetCompositionStringW(hIMC, dwIndex, pBuf, dwBufLen);
250 return S_OK;
253 static HRESULT WINAPI ActiveIMMApp_GetCompositionWindow(IActiveIMMApp* This,
254 HIMC hIMC, COMPOSITIONFORM *pCompForm)
256 BOOL rc;
258 rc = ImmGetCompositionWindow(hIMC,pCompForm);
260 if (rc)
261 return S_OK;
262 else
263 return E_FAIL;
266 static HRESULT WINAPI ActiveIMMApp_GetContext(IActiveIMMApp* This,
267 HWND hwnd, HIMC *phIMC)
269 *phIMC = ImmGetContext(hwnd);
270 return S_OK;
273 static HRESULT WINAPI ActiveIMMApp_GetConversionListA(IActiveIMMApp* This,
274 HKL hKL, HIMC hIMC, LPSTR pSrc, UINT uBufLen, UINT uFlag,
275 CANDIDATELIST *pDst, UINT *puCopied)
277 *puCopied = ImmGetConversionListA(hKL, hIMC, pSrc, pDst, uBufLen, uFlag);
278 return S_OK;
281 static HRESULT WINAPI ActiveIMMApp_GetConversionListW(IActiveIMMApp* This,
282 HKL hKL, HIMC hIMC, LPWSTR pSrc, UINT uBufLen, UINT uFlag,
283 CANDIDATELIST *pDst, UINT *puCopied)
285 *puCopied = ImmGetConversionListW(hKL, hIMC, pSrc, pDst, uBufLen, uFlag);
286 return S_OK;
289 static HRESULT WINAPI ActiveIMMApp_GetConversionStatus(IActiveIMMApp* This,
290 HIMC hIMC, DWORD *pfdwConversion, DWORD *pfdwSentence)
292 BOOL rc;
294 rc = ImmGetConversionStatus(hIMC, pfdwConversion, pfdwSentence);
296 if (rc)
297 return S_OK;
298 else
299 return E_FAIL;
302 static HRESULT WINAPI ActiveIMMApp_GetDefaultIMEWnd(IActiveIMMApp* This,
303 HWND hWnd, HWND *phDefWnd)
305 *phDefWnd = ImmGetDefaultIMEWnd(hWnd);
306 return S_OK;
309 static HRESULT WINAPI ActiveIMMApp_GetDescriptionA(IActiveIMMApp* This,
310 HKL hKL, UINT uBufLen, LPSTR szDescription, UINT *puCopied)
312 *puCopied = ImmGetDescriptionA(hKL, szDescription, uBufLen);
313 return S_OK;
316 static HRESULT WINAPI ActiveIMMApp_GetDescriptionW(IActiveIMMApp* This,
317 HKL hKL, UINT uBufLen, LPWSTR szDescription, UINT *puCopied)
319 *puCopied = ImmGetDescriptionW(hKL, szDescription, uBufLen);
320 return S_OK;
323 static HRESULT WINAPI ActiveIMMApp_GetGuideLineA(IActiveIMMApp* This,
324 HIMC hIMC, DWORD dwIndex, DWORD dwBufLen, LPSTR pBuf,
325 DWORD *pdwResult)
327 *pdwResult = ImmGetGuideLineA(hIMC, dwIndex, pBuf, dwBufLen);
328 return S_OK;
331 static HRESULT WINAPI ActiveIMMApp_GetGuideLineW(IActiveIMMApp* This,
332 HIMC hIMC, DWORD dwIndex, DWORD dwBufLen, LPWSTR pBuf,
333 DWORD *pdwResult)
335 *pdwResult = ImmGetGuideLineW(hIMC, dwIndex, pBuf, dwBufLen);
336 return S_OK;
339 static HRESULT WINAPI ActiveIMMApp_GetIMEFileNameA(IActiveIMMApp* This,
340 HKL hKL, UINT uBufLen, LPSTR szFileName, UINT *puCopied)
342 *puCopied = ImmGetIMEFileNameA(hKL, szFileName, uBufLen);
343 return S_OK;
346 static HRESULT WINAPI ActiveIMMApp_GetIMEFileNameW(IActiveIMMApp* This,
347 HKL hKL, UINT uBufLen, LPWSTR szFileName, UINT *puCopied)
349 *puCopied = ImmGetIMEFileNameW(hKL, szFileName, uBufLen);
350 return S_OK;
353 static HRESULT WINAPI ActiveIMMApp_GetOpenStatus(IActiveIMMApp* This,
354 HIMC hIMC)
356 return ImmGetOpenStatus(hIMC);
359 static HRESULT WINAPI ActiveIMMApp_GetProperty(IActiveIMMApp* This,
360 HKL hKL, DWORD fdwIndex, DWORD *pdwProperty)
362 *pdwProperty = ImmGetProperty(hKL, fdwIndex);
363 return S_OK;
366 static HRESULT WINAPI ActiveIMMApp_GetRegisterWordStyleA(IActiveIMMApp* This,
367 HKL hKL, UINT nItem, STYLEBUFA *pStyleBuf, UINT *puCopied)
369 *puCopied = ImmGetRegisterWordStyleA(hKL, nItem, pStyleBuf);
370 return S_OK;
373 static HRESULT WINAPI ActiveIMMApp_GetRegisterWordStyleW(IActiveIMMApp* This,
374 HKL hKL, UINT nItem, STYLEBUFW *pStyleBuf, UINT *puCopied)
376 *puCopied = ImmGetRegisterWordStyleW(hKL, nItem, pStyleBuf);
377 return S_OK;
380 static HRESULT WINAPI ActiveIMMApp_GetStatusWindowPos(IActiveIMMApp* This,
381 HIMC hIMC, POINT *pptPos)
383 BOOL rc;
384 rc = ImmGetStatusWindowPos(hIMC, pptPos);
386 if (rc)
387 return S_OK;
388 else
389 return E_FAIL;
392 static HRESULT WINAPI ActiveIMMApp_GetVirtualKey(IActiveIMMApp* This,
393 HWND hWnd, UINT *puVirtualKey)
395 *puVirtualKey = ImmGetVirtualKey(hWnd);
396 return S_OK;
399 static HRESULT WINAPI ActiveIMMApp_InstallIMEA(IActiveIMMApp* This,
400 LPSTR szIMEFileName, LPSTR szLayoutText, HKL *phKL)
402 *phKL = ImmInstallIMEA(szIMEFileName,szLayoutText);
403 return S_OK;
406 static HRESULT WINAPI ActiveIMMApp_InstallIMEW(IActiveIMMApp* This,
407 LPWSTR szIMEFileName, LPWSTR szLayoutText, HKL *phKL)
409 *phKL = ImmInstallIMEW(szIMEFileName,szLayoutText);
410 return S_OK;
413 static HRESULT WINAPI ActiveIMMApp_IsIME(IActiveIMMApp* This,
414 HKL hKL)
416 return ImmIsIME(hKL);
419 static HRESULT WINAPI ActiveIMMApp_IsUIMessageA(IActiveIMMApp* This,
420 HWND hWndIME, UINT msg, WPARAM wParam, LPARAM lParam)
422 return ImmIsUIMessageA(hWndIME,msg,wParam,lParam);
425 static HRESULT WINAPI ActiveIMMApp_IsUIMessageW(IActiveIMMApp* This,
426 HWND hWndIME, UINT msg, WPARAM wParam, LPARAM lParam)
428 return ImmIsUIMessageW(hWndIME,msg,wParam,lParam);
431 static HRESULT WINAPI ActiveIMMApp_NotifyIME(IActiveIMMApp* This,
432 HIMC hIMC, DWORD dwAction, DWORD dwIndex, DWORD dwValue)
434 BOOL rc;
436 rc = ImmNotifyIME(hIMC,dwAction,dwIndex,dwValue);
438 if (rc)
439 return S_OK;
440 else
441 return E_FAIL;
444 static HRESULT WINAPI ActiveIMMApp_RegisterWordA(IActiveIMMApp* This,
445 HKL hKL, LPSTR szReading, DWORD dwStyle, LPSTR szRegister)
447 BOOL rc;
449 rc = ImmRegisterWordA(hKL,szReading,dwStyle,szRegister);
451 if (rc)
452 return S_OK;
453 else
454 return E_FAIL;
457 static HRESULT WINAPI ActiveIMMApp_RegisterWordW(IActiveIMMApp* This,
458 HKL hKL, LPWSTR szReading, DWORD dwStyle, LPWSTR szRegister)
460 BOOL rc;
462 rc = ImmRegisterWordW(hKL,szReading,dwStyle,szRegister);
464 if (rc)
465 return S_OK;
466 else
467 return E_FAIL;
470 static HRESULT WINAPI ActiveIMMApp_ReleaseContext(IActiveIMMApp* This,
471 HWND hWnd, HIMC hIMC)
473 BOOL rc;
475 rc = ImmReleaseContext(hWnd,hIMC);
477 if (rc)
478 return S_OK;
479 else
480 return E_FAIL;
483 static HRESULT WINAPI ActiveIMMApp_SetCandidateWindow(IActiveIMMApp* This,
484 HIMC hIMC, CANDIDATEFORM *pCandidate)
486 BOOL rc;
488 rc = ImmSetCandidateWindow(hIMC,pCandidate);
490 if (rc)
491 return S_OK;
492 else
493 return E_FAIL;
496 static HRESULT WINAPI ActiveIMMApp_SetCompositionFontA(IActiveIMMApp* This,
497 HIMC hIMC, LOGFONTA *plf)
499 BOOL rc;
501 rc = ImmSetCompositionFontA(hIMC,plf);
503 if (rc)
504 return S_OK;
505 else
506 return E_FAIL;
509 static HRESULT WINAPI ActiveIMMApp_SetCompositionFontW(IActiveIMMApp* This,
510 HIMC hIMC, LOGFONTW *plf)
512 BOOL rc;
514 rc = ImmSetCompositionFontW(hIMC,plf);
516 if (rc)
517 return S_OK;
518 else
519 return E_FAIL;
522 static HRESULT WINAPI ActiveIMMApp_SetCompositionStringA(IActiveIMMApp* This,
523 HIMC hIMC, DWORD dwIndex, LPVOID pComp, DWORD dwCompLen,
524 LPVOID pRead, DWORD dwReadLen)
526 BOOL rc;
528 rc = ImmSetCompositionStringA(hIMC,dwIndex,pComp,dwCompLen,pRead,dwReadLen);
530 if (rc)
531 return S_OK;
532 else
533 return E_FAIL;
536 static HRESULT WINAPI ActiveIMMApp_SetCompositionStringW(IActiveIMMApp* This,
537 HIMC hIMC, DWORD dwIndex, LPVOID pComp, DWORD dwCompLen,
538 LPVOID pRead, DWORD dwReadLen)
540 BOOL rc;
542 rc = ImmSetCompositionStringW(hIMC,dwIndex,pComp,dwCompLen,pRead,dwReadLen);
544 if (rc)
545 return S_OK;
546 else
547 return E_FAIL;
550 static HRESULT WINAPI ActiveIMMApp_SetCompositionWindow(IActiveIMMApp* This,
551 HIMC hIMC, COMPOSITIONFORM *pCompForm)
553 BOOL rc;
555 rc = ImmSetCompositionWindow(hIMC,pCompForm);
557 if (rc)
558 return S_OK;
559 else
560 return E_FAIL;
563 static HRESULT WINAPI ActiveIMMApp_SetConversionStatus(IActiveIMMApp* This,
564 HIMC hIMC, DWORD fdwConversion, DWORD fdwSentence)
566 BOOL rc;
568 rc = ImmSetConversionStatus(hIMC,fdwConversion,fdwSentence);
570 if (rc)
571 return S_OK;
572 else
573 return E_FAIL;
576 static HRESULT WINAPI ActiveIMMApp_SetOpenStatus(IActiveIMMApp* This,
577 HIMC hIMC, BOOL fOpen)
579 BOOL rc;
581 rc = ImmSetOpenStatus(hIMC,fOpen);
583 if (rc)
584 return S_OK;
585 else
586 return E_FAIL;
589 static HRESULT WINAPI ActiveIMMApp_SetStatusWindowPos(IActiveIMMApp* This,
590 HIMC hIMC, POINT *pptPos)
592 BOOL rc;
594 rc = ImmSetStatusWindowPos(hIMC,pptPos);
596 if (rc)
597 return S_OK;
598 else
599 return E_FAIL;
602 static HRESULT WINAPI ActiveIMMApp_SimulateHotKey(IActiveIMMApp* This,
603 HWND hwnd, DWORD dwHotKeyID)
605 BOOL rc;
607 rc = ImmSimulateHotKey(hwnd,dwHotKeyID);
609 if (rc)
610 return S_OK;
611 else
612 return E_FAIL;
615 static HRESULT WINAPI ActiveIMMApp_UnregisterWordA(IActiveIMMApp* This,
616 HKL hKL, LPSTR szReading, DWORD dwStyle, LPSTR szUnregister)
618 BOOL rc;
620 rc = ImmUnregisterWordA(hKL,szReading,dwStyle,szUnregister);
622 if (rc)
623 return S_OK;
624 else
625 return E_FAIL;
629 static HRESULT WINAPI ActiveIMMApp_UnregisterWordW(IActiveIMMApp* This,
630 HKL hKL, LPWSTR szReading, DWORD dwStyle, LPWSTR szUnregister)
632 BOOL rc;
634 rc = ImmUnregisterWordW(hKL,szReading,dwStyle,szUnregister);
636 if (rc)
637 return S_OK;
638 else
639 return E_FAIL;
642 static HRESULT WINAPI ActiveIMMApp_Activate(IActiveIMMApp* This,
643 BOOL fRestoreLayout)
645 FIXME("Stub\n");
646 return S_OK;
649 static HRESULT WINAPI ActiveIMMApp_Deactivate(IActiveIMMApp* This)
651 FIXME("Stub\n");
652 return S_OK;
655 static HRESULT WINAPI ActiveIMMApp_OnDefWindowProc(IActiveIMMApp* This,
656 HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam, LRESULT *plResult)
658 FIXME("Stub (%p %x %lx %lx)\n",hWnd,Msg,wParam,lParam);
659 return E_FAIL;
662 static HRESULT WINAPI ActiveIMMApp_FilterClientWindows(IActiveIMMApp* This,
663 ATOM *aaClassList, UINT uSize)
665 FIXME("Stub\n");
666 return S_OK;
669 static HRESULT WINAPI ActiveIMMApp_GetCodePageA(IActiveIMMApp* This,
670 HKL hKL, UINT *uCodePage)
672 FIXME("Stub\n");
673 return E_NOTIMPL;
676 static HRESULT WINAPI ActiveIMMApp_GetLangId(IActiveIMMApp* This,
677 HKL hKL, LANGID *plid)
679 FIXME("Stub\n");
680 return E_NOTIMPL;
683 static HRESULT WINAPI ActiveIMMApp_AssociateContextEx(IActiveIMMApp* This,
684 HWND hWnd, HIMC hIMC, DWORD dwFlags)
686 BOOL rc;
688 rc = ImmAssociateContextEx(hWnd,hIMC,dwFlags);
690 if (rc)
691 return S_OK;
692 else
693 return E_FAIL;
696 static HRESULT WINAPI ActiveIMMApp_DisableIME(IActiveIMMApp* This,
697 DWORD idThread)
699 BOOL rc;
701 rc = ImmDisableIME(idThread);
703 if (rc)
704 return S_OK;
705 else
706 return E_FAIL;
709 static HRESULT WINAPI ActiveIMMApp_GetImeMenuItemsA(IActiveIMMApp* This,
710 HIMC hIMC, DWORD dwFlags, DWORD dwType,
711 IMEMENUITEMINFOA *pImeParentMenu, IMEMENUITEMINFOA *pImeMenu,
712 DWORD dwSize, DWORD *pdwResult)
714 *pdwResult = ImmGetImeMenuItemsA(hIMC,dwFlags,dwType,pImeParentMenu,pImeMenu,dwSize);
715 return S_OK;
718 static HRESULT WINAPI ActiveIMMApp_GetImeMenuItemsW(IActiveIMMApp* This,
719 HIMC hIMC, DWORD dwFlags, DWORD dwType,
720 IMEMENUITEMINFOW *pImeParentMenu, IMEMENUITEMINFOW *pImeMenu,
721 DWORD dwSize, DWORD *pdwResult)
723 *pdwResult = ImmGetImeMenuItemsW(hIMC,dwFlags,dwType,pImeParentMenu,pImeMenu,dwSize);
724 return S_OK;
727 static HRESULT WINAPI ActiveIMMApp_EnumInputContext(IActiveIMMApp* This,
728 DWORD idThread, IEnumInputContext **ppEnum)
730 FIXME("Stub\n");
731 return E_NOTIMPL;
734 static const IActiveIMMAppVtbl ActiveIMMAppVtbl =
736 ActiveIMMApp_QueryInterface,
737 ActiveIMMApp_AddRef,
738 ActiveIMMApp_Release,
740 ActiveIMMApp_AssociateContext,
741 ActiveIMMApp_ConfigureIMEA,
742 ActiveIMMApp_ConfigureIMEW,
743 ActiveIMMApp_CreateContext,
744 ActiveIMMApp_DestroyContext,
745 ActiveIMMApp_EnumRegisterWordA,
746 ActiveIMMApp_EnumRegisterWordW,
747 ActiveIMMApp_EscapeA,
748 ActiveIMMApp_EscapeW,
749 ActiveIMMApp_GetCandidateListA,
750 ActiveIMMApp_GetCandidateListW,
751 ActiveIMMApp_GetCandidateListCountA,
752 ActiveIMMApp_GetCandidateListCountW,
753 ActiveIMMApp_GetCandidateWindow,
754 ActiveIMMApp_GetCompositionFontA,
755 ActiveIMMApp_GetCompositionFontW,
756 ActiveIMMApp_GetCompositionStringA,
757 ActiveIMMApp_GetCompositionStringW,
758 ActiveIMMApp_GetCompositionWindow,
759 ActiveIMMApp_GetContext,
760 ActiveIMMApp_GetConversionListA,
761 ActiveIMMApp_GetConversionListW,
762 ActiveIMMApp_GetConversionStatus,
763 ActiveIMMApp_GetDefaultIMEWnd,
764 ActiveIMMApp_GetDescriptionA,
765 ActiveIMMApp_GetDescriptionW,
766 ActiveIMMApp_GetGuideLineA,
767 ActiveIMMApp_GetGuideLineW,
768 ActiveIMMApp_GetIMEFileNameA,
769 ActiveIMMApp_GetIMEFileNameW,
770 ActiveIMMApp_GetOpenStatus,
771 ActiveIMMApp_GetProperty,
772 ActiveIMMApp_GetRegisterWordStyleA,
773 ActiveIMMApp_GetRegisterWordStyleW,
774 ActiveIMMApp_GetStatusWindowPos,
775 ActiveIMMApp_GetVirtualKey,
776 ActiveIMMApp_InstallIMEA,
777 ActiveIMMApp_InstallIMEW,
778 ActiveIMMApp_IsIME,
779 ActiveIMMApp_IsUIMessageA,
780 ActiveIMMApp_IsUIMessageW,
781 ActiveIMMApp_NotifyIME,
782 ActiveIMMApp_RegisterWordA,
783 ActiveIMMApp_RegisterWordW,
784 ActiveIMMApp_ReleaseContext,
785 ActiveIMMApp_SetCandidateWindow,
786 ActiveIMMApp_SetCompositionFontA,
787 ActiveIMMApp_SetCompositionFontW,
788 ActiveIMMApp_SetCompositionStringA,
789 ActiveIMMApp_SetCompositionStringW,
790 ActiveIMMApp_SetCompositionWindow,
791 ActiveIMMApp_SetConversionStatus,
792 ActiveIMMApp_SetOpenStatus,
793 ActiveIMMApp_SetStatusWindowPos,
794 ActiveIMMApp_SimulateHotKey,
795 ActiveIMMApp_UnregisterWordA,
796 ActiveIMMApp_UnregisterWordW,
798 ActiveIMMApp_Activate,
799 ActiveIMMApp_Deactivate,
800 ActiveIMMApp_OnDefWindowProc,
801 ActiveIMMApp_FilterClientWindows,
802 ActiveIMMApp_GetCodePageA,
803 ActiveIMMApp_GetLangId,
804 ActiveIMMApp_AssociateContextEx,
805 ActiveIMMApp_DisableIME,
806 ActiveIMMApp_GetImeMenuItemsA,
807 ActiveIMMApp_GetImeMenuItemsW,
808 ActiveIMMApp_EnumInputContext
811 HRESULT ActiveIMMApp_Constructor(IUnknown *pUnkOuter, IUnknown **ppOut)
813 ActiveIMMApp *This;
814 if (pUnkOuter)
815 return CLASS_E_NOAGGREGATION;
817 This = HeapAlloc(GetProcessHeap(),HEAP_ZERO_MEMORY,sizeof(ActiveIMMApp));
818 if (This == NULL)
819 return E_OUTOFMEMORY;
821 This->vtbl = &ActiveIMMAppVtbl;
822 This->refCount = 1;
824 TRACE("returning %p\n",This);
825 *ppOut = (IUnknown *)This;
826 return S_OK;