d3dx9: Use wine_dbgstr_rect() in some more places.
[wine/multimedia.git] / dlls / msimtf / activeimmapp.c
bloba9c259a90685bf1bddabc702ad9d484a95418de7
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 "dimm.h"
35 #include "imm.h"
37 #include "wine/unicode.h"
39 #include "wine/debug.h"
41 WINE_DEFAULT_DEBUG_CHANNEL(msimtf);
43 typedef struct tagActiveIMMApp {
44 IActiveIMMApp IActiveIMMApp_iface;
45 LONG refCount;
46 } ActiveIMMApp;
48 static inline ActiveIMMApp *impl_from_IActiveIMMApp(IActiveIMMApp *iface)
50 return CONTAINING_RECORD(iface, ActiveIMMApp, IActiveIMMApp_iface);
53 static void ActiveIMMApp_Destructor(ActiveIMMApp* This)
55 TRACE("\n");
56 HeapFree(GetProcessHeap(),0,This);
59 static HRESULT WINAPI ActiveIMMApp_QueryInterface (IActiveIMMApp* iface,
60 REFIID iid, LPVOID *ppvOut)
62 ActiveIMMApp *This = impl_from_IActiveIMMApp(iface);
63 *ppvOut = NULL;
65 if (IsEqualIID(iid, &IID_IUnknown) || IsEqualIID(iid, &IID_IActiveIMMApp))
67 *ppvOut = This;
70 if (*ppvOut)
72 IUnknown_AddRef(iface);
73 return S_OK;
76 WARN("unsupported interface: %s\n", debugstr_guid(iid));
77 return E_NOINTERFACE;
80 static ULONG WINAPI ActiveIMMApp_AddRef(IActiveIMMApp* iface)
82 ActiveIMMApp *This = impl_from_IActiveIMMApp(iface);
83 return InterlockedIncrement(&This->refCount);
86 static ULONG WINAPI ActiveIMMApp_Release(IActiveIMMApp* iface)
88 ActiveIMMApp *This = impl_from_IActiveIMMApp(iface);
89 ULONG ret;
91 ret = InterlockedDecrement(&This->refCount);
92 if (ret == 0)
93 ActiveIMMApp_Destructor(This);
94 return ret;
97 static HRESULT WINAPI ActiveIMMApp_AssociateContext(IActiveIMMApp* iface,
98 HWND hWnd, HIMC hIME, HIMC *phPrev)
100 *phPrev = ImmAssociateContext(hWnd,hIME);
101 return S_OK;
104 static HRESULT WINAPI ActiveIMMApp_ConfigureIMEA(IActiveIMMApp* This,
105 HKL hKL, HWND hwnd, DWORD dwMode, REGISTERWORDA *pData)
107 BOOL rc;
109 rc = ImmConfigureIMEA(hKL, hwnd, dwMode, pData);
110 if (rc)
111 return E_FAIL;
112 else
113 return S_OK;
116 static HRESULT WINAPI ActiveIMMApp_ConfigureIMEW(IActiveIMMApp* This,
117 HKL hKL, HWND hWnd, DWORD dwMode, REGISTERWORDW *pData)
119 BOOL rc;
121 rc = ImmConfigureIMEW(hKL, hWnd, dwMode, pData);
122 if (rc)
123 return E_FAIL;
124 else
125 return S_OK;
128 static HRESULT WINAPI ActiveIMMApp_CreateContext(IActiveIMMApp* This,
129 HIMC *phIMC)
131 *phIMC = ImmCreateContext();
132 if (*phIMC)
133 return S_OK;
134 else
135 return E_FAIL;
138 static HRESULT WINAPI ActiveIMMApp_DestroyContext(IActiveIMMApp* This,
139 HIMC hIME)
141 BOOL rc;
143 rc = ImmDestroyContext(hIME);
144 if (rc)
145 return S_OK;
146 else
147 return E_FAIL;
150 static HRESULT WINAPI ActiveIMMApp_EnumRegisterWordA(IActiveIMMApp* This,
151 HKL hKL, LPSTR szReading, DWORD dwStyle, LPSTR szRegister,
152 LPVOID pData, IEnumRegisterWordA **pEnum)
154 FIXME("Stub\n");
155 return E_NOTIMPL;
158 static HRESULT WINAPI ActiveIMMApp_EnumRegisterWordW(IActiveIMMApp* This,
159 HKL hKL, LPWSTR szReading, DWORD dwStyle, LPWSTR szRegister,
160 LPVOID pData, IEnumRegisterWordW **pEnum)
162 FIXME("Stub\n");
163 return E_NOTIMPL;
166 static HRESULT WINAPI ActiveIMMApp_EscapeA(IActiveIMMApp* This,
167 HKL hKL, HIMC hIMC, UINT uEscape, LPVOID pData, LRESULT *plResult)
169 *plResult = ImmEscapeA(hKL, hIMC, uEscape, pData);
170 return S_OK;
173 static HRESULT WINAPI ActiveIMMApp_EscapeW(IActiveIMMApp* This,
174 HKL hKL, HIMC hIMC, UINT uEscape, LPVOID pData, LRESULT *plResult)
176 *plResult = ImmEscapeW(hKL, hIMC, uEscape, pData);
177 return S_OK;
180 static HRESULT WINAPI ActiveIMMApp_GetCandidateListA(IActiveIMMApp* This,
181 HIMC hIMC, DWORD dwIndex, UINT uBufLen, CANDIDATELIST *pCandList,
182 UINT *puCopied)
184 *puCopied = ImmGetCandidateListA(hIMC, dwIndex, pCandList, uBufLen);
185 return S_OK;
188 static HRESULT WINAPI ActiveIMMApp_GetCandidateListW(IActiveIMMApp* This,
189 HIMC hIMC, DWORD dwIndex, UINT uBufLen, CANDIDATELIST *pCandList,
190 UINT *puCopied)
192 *puCopied = ImmGetCandidateListW(hIMC, dwIndex, pCandList, uBufLen);
193 return S_OK;
196 static HRESULT WINAPI ActiveIMMApp_GetCandidateListCountA(IActiveIMMApp* This,
197 HIMC hIMC, DWORD *pdwListSize, DWORD *pdwBufLen)
199 *pdwBufLen = ImmGetCandidateListCountA(hIMC, pdwListSize);
200 return S_OK;
203 static HRESULT WINAPI ActiveIMMApp_GetCandidateListCountW(IActiveIMMApp* This,
204 HIMC hIMC, DWORD *pdwListSize, DWORD *pdwBufLen)
206 *pdwBufLen = ImmGetCandidateListCountA(hIMC, pdwListSize);
207 return S_OK;
210 static HRESULT WINAPI ActiveIMMApp_GetCandidateWindow(IActiveIMMApp* This,
211 HIMC hIMC, DWORD dwIndex, CANDIDATEFORM *pCandidate)
213 BOOL rc;
214 rc = ImmGetCandidateWindow(hIMC,dwIndex,pCandidate);
215 if (rc)
216 return S_OK;
217 else
218 return E_FAIL;
221 static HRESULT WINAPI ActiveIMMApp_GetCompositionFontA(IActiveIMMApp* This,
222 HIMC hIMC, LOGFONTA *plf)
224 BOOL rc;
225 rc = ImmGetCompositionFontA(hIMC,plf);
226 if (rc)
227 return S_OK;
228 else
229 return E_FAIL;
232 static HRESULT WINAPI ActiveIMMApp_GetCompositionFontW(IActiveIMMApp* This,
233 HIMC hIMC, LOGFONTW *plf)
235 BOOL rc;
236 rc = ImmGetCompositionFontW(hIMC,plf);
237 if (rc)
238 return S_OK;
239 else
240 return E_FAIL;
243 static HRESULT WINAPI ActiveIMMApp_GetCompositionStringA(IActiveIMMApp* This,
244 HIMC hIMC, DWORD dwIndex, DWORD dwBufLen, LONG *plCopied, LPVOID pBuf)
246 *plCopied = ImmGetCompositionStringA(hIMC, dwIndex, pBuf, dwBufLen);
247 return S_OK;
250 static HRESULT WINAPI ActiveIMMApp_GetCompositionStringW(IActiveIMMApp* This,
251 HIMC hIMC, DWORD dwIndex, DWORD dwBufLen, LONG *plCopied, LPVOID pBuf)
253 *plCopied = ImmGetCompositionStringW(hIMC, dwIndex, pBuf, dwBufLen);
254 return S_OK;
257 static HRESULT WINAPI ActiveIMMApp_GetCompositionWindow(IActiveIMMApp* This,
258 HIMC hIMC, COMPOSITIONFORM *pCompForm)
260 BOOL rc;
262 rc = ImmGetCompositionWindow(hIMC,pCompForm);
264 if (rc)
265 return S_OK;
266 else
267 return E_FAIL;
270 static HRESULT WINAPI ActiveIMMApp_GetContext(IActiveIMMApp* This,
271 HWND hwnd, HIMC *phIMC)
273 *phIMC = ImmGetContext(hwnd);
274 return S_OK;
277 static HRESULT WINAPI ActiveIMMApp_GetConversionListA(IActiveIMMApp* This,
278 HKL hKL, HIMC hIMC, LPSTR pSrc, UINT uBufLen, UINT uFlag,
279 CANDIDATELIST *pDst, UINT *puCopied)
281 *puCopied = ImmGetConversionListA(hKL, hIMC, pSrc, pDst, uBufLen, uFlag);
282 return S_OK;
285 static HRESULT WINAPI ActiveIMMApp_GetConversionListW(IActiveIMMApp* This,
286 HKL hKL, HIMC hIMC, LPWSTR pSrc, UINT uBufLen, UINT uFlag,
287 CANDIDATELIST *pDst, UINT *puCopied)
289 *puCopied = ImmGetConversionListW(hKL, hIMC, pSrc, pDst, uBufLen, uFlag);
290 return S_OK;
293 static HRESULT WINAPI ActiveIMMApp_GetConversionStatus(IActiveIMMApp* This,
294 HIMC hIMC, DWORD *pfdwConversion, DWORD *pfdwSentence)
296 BOOL rc;
298 rc = ImmGetConversionStatus(hIMC, pfdwConversion, pfdwSentence);
300 if (rc)
301 return S_OK;
302 else
303 return E_FAIL;
306 static HRESULT WINAPI ActiveIMMApp_GetDefaultIMEWnd(IActiveIMMApp* This,
307 HWND hWnd, HWND *phDefWnd)
309 *phDefWnd = ImmGetDefaultIMEWnd(hWnd);
310 return S_OK;
313 static HRESULT WINAPI ActiveIMMApp_GetDescriptionA(IActiveIMMApp* This,
314 HKL hKL, UINT uBufLen, LPSTR szDescription, UINT *puCopied)
316 *puCopied = ImmGetDescriptionA(hKL, szDescription, uBufLen);
317 return S_OK;
320 static HRESULT WINAPI ActiveIMMApp_GetDescriptionW(IActiveIMMApp* This,
321 HKL hKL, UINT uBufLen, LPWSTR szDescription, UINT *puCopied)
323 *puCopied = ImmGetDescriptionW(hKL, szDescription, uBufLen);
324 return S_OK;
327 static HRESULT WINAPI ActiveIMMApp_GetGuideLineA(IActiveIMMApp* This,
328 HIMC hIMC, DWORD dwIndex, DWORD dwBufLen, LPSTR pBuf,
329 DWORD *pdwResult)
331 *pdwResult = ImmGetGuideLineA(hIMC, dwIndex, pBuf, dwBufLen);
332 return S_OK;
335 static HRESULT WINAPI ActiveIMMApp_GetGuideLineW(IActiveIMMApp* This,
336 HIMC hIMC, DWORD dwIndex, DWORD dwBufLen, LPWSTR pBuf,
337 DWORD *pdwResult)
339 *pdwResult = ImmGetGuideLineW(hIMC, dwIndex, pBuf, dwBufLen);
340 return S_OK;
343 static HRESULT WINAPI ActiveIMMApp_GetIMEFileNameA(IActiveIMMApp* This,
344 HKL hKL, UINT uBufLen, LPSTR szFileName, UINT *puCopied)
346 *puCopied = ImmGetIMEFileNameA(hKL, szFileName, uBufLen);
347 return S_OK;
350 static HRESULT WINAPI ActiveIMMApp_GetIMEFileNameW(IActiveIMMApp* This,
351 HKL hKL, UINT uBufLen, LPWSTR szFileName, UINT *puCopied)
353 *puCopied = ImmGetIMEFileNameW(hKL, szFileName, uBufLen);
354 return S_OK;
357 static HRESULT WINAPI ActiveIMMApp_GetOpenStatus(IActiveIMMApp* This,
358 HIMC hIMC)
360 return ImmGetOpenStatus(hIMC);
363 static HRESULT WINAPI ActiveIMMApp_GetProperty(IActiveIMMApp* This,
364 HKL hKL, DWORD fdwIndex, DWORD *pdwProperty)
366 *pdwProperty = ImmGetProperty(hKL, fdwIndex);
367 return S_OK;
370 static HRESULT WINAPI ActiveIMMApp_GetRegisterWordStyleA(IActiveIMMApp* This,
371 HKL hKL, UINT nItem, STYLEBUFA *pStyleBuf, UINT *puCopied)
373 *puCopied = ImmGetRegisterWordStyleA(hKL, nItem, pStyleBuf);
374 return S_OK;
377 static HRESULT WINAPI ActiveIMMApp_GetRegisterWordStyleW(IActiveIMMApp* This,
378 HKL hKL, UINT nItem, STYLEBUFW *pStyleBuf, UINT *puCopied)
380 *puCopied = ImmGetRegisterWordStyleW(hKL, nItem, pStyleBuf);
381 return S_OK;
384 static HRESULT WINAPI ActiveIMMApp_GetStatusWindowPos(IActiveIMMApp* This,
385 HIMC hIMC, POINT *pptPos)
387 BOOL rc;
388 rc = ImmGetStatusWindowPos(hIMC, pptPos);
390 if (rc)
391 return S_OK;
392 else
393 return E_FAIL;
396 static HRESULT WINAPI ActiveIMMApp_GetVirtualKey(IActiveIMMApp* This,
397 HWND hWnd, UINT *puVirtualKey)
399 *puVirtualKey = ImmGetVirtualKey(hWnd);
400 return S_OK;
403 static HRESULT WINAPI ActiveIMMApp_InstallIMEA(IActiveIMMApp* This,
404 LPSTR szIMEFileName, LPSTR szLayoutText, HKL *phKL)
406 *phKL = ImmInstallIMEA(szIMEFileName,szLayoutText);
407 return S_OK;
410 static HRESULT WINAPI ActiveIMMApp_InstallIMEW(IActiveIMMApp* This,
411 LPWSTR szIMEFileName, LPWSTR szLayoutText, HKL *phKL)
413 *phKL = ImmInstallIMEW(szIMEFileName,szLayoutText);
414 return S_OK;
417 static HRESULT WINAPI ActiveIMMApp_IsIME(IActiveIMMApp* This,
418 HKL hKL)
420 return ImmIsIME(hKL);
423 static HRESULT WINAPI ActiveIMMApp_IsUIMessageA(IActiveIMMApp* This,
424 HWND hWndIME, UINT msg, WPARAM wParam, LPARAM lParam)
426 return ImmIsUIMessageA(hWndIME,msg,wParam,lParam);
429 static HRESULT WINAPI ActiveIMMApp_IsUIMessageW(IActiveIMMApp* This,
430 HWND hWndIME, UINT msg, WPARAM wParam, LPARAM lParam)
432 return ImmIsUIMessageW(hWndIME,msg,wParam,lParam);
435 static HRESULT WINAPI ActiveIMMApp_NotifyIME(IActiveIMMApp* This,
436 HIMC hIMC, DWORD dwAction, DWORD dwIndex, DWORD dwValue)
438 BOOL rc;
440 rc = ImmNotifyIME(hIMC,dwAction,dwIndex,dwValue);
442 if (rc)
443 return S_OK;
444 else
445 return E_FAIL;
448 static HRESULT WINAPI ActiveIMMApp_RegisterWordA(IActiveIMMApp* This,
449 HKL hKL, LPSTR szReading, DWORD dwStyle, LPSTR szRegister)
451 BOOL rc;
453 rc = ImmRegisterWordA(hKL,szReading,dwStyle,szRegister);
455 if (rc)
456 return S_OK;
457 else
458 return E_FAIL;
461 static HRESULT WINAPI ActiveIMMApp_RegisterWordW(IActiveIMMApp* This,
462 HKL hKL, LPWSTR szReading, DWORD dwStyle, LPWSTR szRegister)
464 BOOL rc;
466 rc = ImmRegisterWordW(hKL,szReading,dwStyle,szRegister);
468 if (rc)
469 return S_OK;
470 else
471 return E_FAIL;
474 static HRESULT WINAPI ActiveIMMApp_ReleaseContext(IActiveIMMApp* This,
475 HWND hWnd, HIMC hIMC)
477 BOOL rc;
479 rc = ImmReleaseContext(hWnd,hIMC);
481 if (rc)
482 return S_OK;
483 else
484 return E_FAIL;
487 static HRESULT WINAPI ActiveIMMApp_SetCandidateWindow(IActiveIMMApp* This,
488 HIMC hIMC, CANDIDATEFORM *pCandidate)
490 BOOL rc;
492 rc = ImmSetCandidateWindow(hIMC,pCandidate);
494 if (rc)
495 return S_OK;
496 else
497 return E_FAIL;
500 static HRESULT WINAPI ActiveIMMApp_SetCompositionFontA(IActiveIMMApp* This,
501 HIMC hIMC, LOGFONTA *plf)
503 BOOL rc;
505 rc = ImmSetCompositionFontA(hIMC,plf);
507 if (rc)
508 return S_OK;
509 else
510 return E_FAIL;
513 static HRESULT WINAPI ActiveIMMApp_SetCompositionFontW(IActiveIMMApp* This,
514 HIMC hIMC, LOGFONTW *plf)
516 BOOL rc;
518 rc = ImmSetCompositionFontW(hIMC,plf);
520 if (rc)
521 return S_OK;
522 else
523 return E_FAIL;
526 static HRESULT WINAPI ActiveIMMApp_SetCompositionStringA(IActiveIMMApp* This,
527 HIMC hIMC, DWORD dwIndex, LPVOID pComp, DWORD dwCompLen,
528 LPVOID pRead, DWORD dwReadLen)
530 BOOL rc;
532 rc = ImmSetCompositionStringA(hIMC,dwIndex,pComp,dwCompLen,pRead,dwReadLen);
534 if (rc)
535 return S_OK;
536 else
537 return E_FAIL;
540 static HRESULT WINAPI ActiveIMMApp_SetCompositionStringW(IActiveIMMApp* This,
541 HIMC hIMC, DWORD dwIndex, LPVOID pComp, DWORD dwCompLen,
542 LPVOID pRead, DWORD dwReadLen)
544 BOOL rc;
546 rc = ImmSetCompositionStringW(hIMC,dwIndex,pComp,dwCompLen,pRead,dwReadLen);
548 if (rc)
549 return S_OK;
550 else
551 return E_FAIL;
554 static HRESULT WINAPI ActiveIMMApp_SetCompositionWindow(IActiveIMMApp* This,
555 HIMC hIMC, COMPOSITIONFORM *pCompForm)
557 BOOL rc;
559 rc = ImmSetCompositionWindow(hIMC,pCompForm);
561 if (rc)
562 return S_OK;
563 else
564 return E_FAIL;
567 static HRESULT WINAPI ActiveIMMApp_SetConversionStatus(IActiveIMMApp* This,
568 HIMC hIMC, DWORD fdwConversion, DWORD fdwSentence)
570 BOOL rc;
572 rc = ImmSetConversionStatus(hIMC,fdwConversion,fdwSentence);
574 if (rc)
575 return S_OK;
576 else
577 return E_FAIL;
580 static HRESULT WINAPI ActiveIMMApp_SetOpenStatus(IActiveIMMApp* This,
581 HIMC hIMC, BOOL fOpen)
583 BOOL rc;
585 rc = ImmSetOpenStatus(hIMC,fOpen);
587 if (rc)
588 return S_OK;
589 else
590 return E_FAIL;
593 static HRESULT WINAPI ActiveIMMApp_SetStatusWindowPos(IActiveIMMApp* This,
594 HIMC hIMC, POINT *pptPos)
596 BOOL rc;
598 rc = ImmSetStatusWindowPos(hIMC,pptPos);
600 if (rc)
601 return S_OK;
602 else
603 return E_FAIL;
606 static HRESULT WINAPI ActiveIMMApp_SimulateHotKey(IActiveIMMApp* This,
607 HWND hwnd, DWORD dwHotKeyID)
609 BOOL rc;
611 rc = ImmSimulateHotKey(hwnd,dwHotKeyID);
613 if (rc)
614 return S_OK;
615 else
616 return E_FAIL;
619 static HRESULT WINAPI ActiveIMMApp_UnregisterWordA(IActiveIMMApp* This,
620 HKL hKL, LPSTR szReading, DWORD dwStyle, LPSTR szUnregister)
622 BOOL rc;
624 rc = ImmUnregisterWordA(hKL,szReading,dwStyle,szUnregister);
626 if (rc)
627 return S_OK;
628 else
629 return E_FAIL;
633 static HRESULT WINAPI ActiveIMMApp_UnregisterWordW(IActiveIMMApp* This,
634 HKL hKL, LPWSTR szReading, DWORD dwStyle, LPWSTR szUnregister)
636 BOOL rc;
638 rc = ImmUnregisterWordW(hKL,szReading,dwStyle,szUnregister);
640 if (rc)
641 return S_OK;
642 else
643 return E_FAIL;
646 static HRESULT WINAPI ActiveIMMApp_Activate(IActiveIMMApp* This,
647 BOOL fRestoreLayout)
649 FIXME("Stub\n");
650 return S_OK;
653 static HRESULT WINAPI ActiveIMMApp_Deactivate(IActiveIMMApp* This)
655 FIXME("Stub\n");
656 return S_OK;
659 static HRESULT WINAPI ActiveIMMApp_OnDefWindowProc(IActiveIMMApp* This,
660 HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam, LRESULT *plResult)
662 FIXME("Stub (%p %x %lx %lx)\n",hWnd,Msg,wParam,lParam);
663 return E_FAIL;
666 static HRESULT WINAPI ActiveIMMApp_FilterClientWindows(IActiveIMMApp* This,
667 ATOM *aaClassList, UINT uSize)
669 FIXME("Stub\n");
670 return S_OK;
673 static HRESULT WINAPI ActiveIMMApp_GetCodePageA(IActiveIMMApp* This,
674 HKL hKL, UINT *uCodePage)
676 FIXME("Stub\n");
677 return E_NOTIMPL;
680 static HRESULT WINAPI ActiveIMMApp_GetLangId(IActiveIMMApp* This,
681 HKL hKL, LANGID *plid)
683 FIXME("Stub\n");
684 return E_NOTIMPL;
687 static HRESULT WINAPI ActiveIMMApp_AssociateContextEx(IActiveIMMApp* This,
688 HWND hWnd, HIMC hIMC, DWORD dwFlags)
690 BOOL rc;
692 rc = ImmAssociateContextEx(hWnd,hIMC,dwFlags);
694 if (rc)
695 return S_OK;
696 else
697 return E_FAIL;
700 static HRESULT WINAPI ActiveIMMApp_DisableIME(IActiveIMMApp* This,
701 DWORD idThread)
703 BOOL rc;
705 rc = ImmDisableIME(idThread);
707 if (rc)
708 return S_OK;
709 else
710 return E_FAIL;
713 static HRESULT WINAPI ActiveIMMApp_GetImeMenuItemsA(IActiveIMMApp* This,
714 HIMC hIMC, DWORD dwFlags, DWORD dwType,
715 IMEMENUITEMINFOA *pImeParentMenu, IMEMENUITEMINFOA *pImeMenu,
716 DWORD dwSize, DWORD *pdwResult)
718 *pdwResult = ImmGetImeMenuItemsA(hIMC,dwFlags,dwType,pImeParentMenu,pImeMenu,dwSize);
719 return S_OK;
722 static HRESULT WINAPI ActiveIMMApp_GetImeMenuItemsW(IActiveIMMApp* This,
723 HIMC hIMC, DWORD dwFlags, DWORD dwType,
724 IMEMENUITEMINFOW *pImeParentMenu, IMEMENUITEMINFOW *pImeMenu,
725 DWORD dwSize, DWORD *pdwResult)
727 *pdwResult = ImmGetImeMenuItemsW(hIMC,dwFlags,dwType,pImeParentMenu,pImeMenu,dwSize);
728 return S_OK;
731 static HRESULT WINAPI ActiveIMMApp_EnumInputContext(IActiveIMMApp* This,
732 DWORD idThread, IEnumInputContext **ppEnum)
734 FIXME("Stub\n");
735 return E_NOTIMPL;
738 static const IActiveIMMAppVtbl ActiveIMMAppVtbl =
740 ActiveIMMApp_QueryInterface,
741 ActiveIMMApp_AddRef,
742 ActiveIMMApp_Release,
744 ActiveIMMApp_AssociateContext,
745 ActiveIMMApp_ConfigureIMEA,
746 ActiveIMMApp_ConfigureIMEW,
747 ActiveIMMApp_CreateContext,
748 ActiveIMMApp_DestroyContext,
749 ActiveIMMApp_EnumRegisterWordA,
750 ActiveIMMApp_EnumRegisterWordW,
751 ActiveIMMApp_EscapeA,
752 ActiveIMMApp_EscapeW,
753 ActiveIMMApp_GetCandidateListA,
754 ActiveIMMApp_GetCandidateListW,
755 ActiveIMMApp_GetCandidateListCountA,
756 ActiveIMMApp_GetCandidateListCountW,
757 ActiveIMMApp_GetCandidateWindow,
758 ActiveIMMApp_GetCompositionFontA,
759 ActiveIMMApp_GetCompositionFontW,
760 ActiveIMMApp_GetCompositionStringA,
761 ActiveIMMApp_GetCompositionStringW,
762 ActiveIMMApp_GetCompositionWindow,
763 ActiveIMMApp_GetContext,
764 ActiveIMMApp_GetConversionListA,
765 ActiveIMMApp_GetConversionListW,
766 ActiveIMMApp_GetConversionStatus,
767 ActiveIMMApp_GetDefaultIMEWnd,
768 ActiveIMMApp_GetDescriptionA,
769 ActiveIMMApp_GetDescriptionW,
770 ActiveIMMApp_GetGuideLineA,
771 ActiveIMMApp_GetGuideLineW,
772 ActiveIMMApp_GetIMEFileNameA,
773 ActiveIMMApp_GetIMEFileNameW,
774 ActiveIMMApp_GetOpenStatus,
775 ActiveIMMApp_GetProperty,
776 ActiveIMMApp_GetRegisterWordStyleA,
777 ActiveIMMApp_GetRegisterWordStyleW,
778 ActiveIMMApp_GetStatusWindowPos,
779 ActiveIMMApp_GetVirtualKey,
780 ActiveIMMApp_InstallIMEA,
781 ActiveIMMApp_InstallIMEW,
782 ActiveIMMApp_IsIME,
783 ActiveIMMApp_IsUIMessageA,
784 ActiveIMMApp_IsUIMessageW,
785 ActiveIMMApp_NotifyIME,
786 ActiveIMMApp_RegisterWordA,
787 ActiveIMMApp_RegisterWordW,
788 ActiveIMMApp_ReleaseContext,
789 ActiveIMMApp_SetCandidateWindow,
790 ActiveIMMApp_SetCompositionFontA,
791 ActiveIMMApp_SetCompositionFontW,
792 ActiveIMMApp_SetCompositionStringA,
793 ActiveIMMApp_SetCompositionStringW,
794 ActiveIMMApp_SetCompositionWindow,
795 ActiveIMMApp_SetConversionStatus,
796 ActiveIMMApp_SetOpenStatus,
797 ActiveIMMApp_SetStatusWindowPos,
798 ActiveIMMApp_SimulateHotKey,
799 ActiveIMMApp_UnregisterWordA,
800 ActiveIMMApp_UnregisterWordW,
802 ActiveIMMApp_Activate,
803 ActiveIMMApp_Deactivate,
804 ActiveIMMApp_OnDefWindowProc,
805 ActiveIMMApp_FilterClientWindows,
806 ActiveIMMApp_GetCodePageA,
807 ActiveIMMApp_GetLangId,
808 ActiveIMMApp_AssociateContextEx,
809 ActiveIMMApp_DisableIME,
810 ActiveIMMApp_GetImeMenuItemsA,
811 ActiveIMMApp_GetImeMenuItemsW,
812 ActiveIMMApp_EnumInputContext
815 DECLSPEC_HIDDEN HRESULT ActiveIMMApp_Constructor(IUnknown *pUnkOuter, IUnknown **ppOut)
817 ActiveIMMApp *This;
818 if (pUnkOuter)
819 return CLASS_E_NOAGGREGATION;
821 This = HeapAlloc(GetProcessHeap(),HEAP_ZERO_MEMORY,sizeof(ActiveIMMApp));
822 if (This == NULL)
823 return E_OUTOFMEMORY;
825 This->IActiveIMMApp_iface.lpVtbl = &ActiveIMMAppVtbl;
826 This->refCount = 1;
828 TRACE("returning %p\n",This);
829 *ppOut = (IUnknown *)This;
830 return S_OK;