xref: /reactos/dll/win32/imm32/ctf.c (revision 7e22dc05)
1 /*
2  * PROJECT:     ReactOS IMM32
3  * LICENSE:     LGPL-2.1-or-later (https://spdx.org/licenses/LGPL-2.1-or-later)
4  * PURPOSE:     Implementing IMM32 Cicero (modern input method)
5  * COPYRIGHT:   Copyright 2022 Katayama Hirofumi MZ <katayama.hirofumi.mz@gmail.com>
6  */
7 
8 #include "precomp.h"
9 
10 WINE_DEFAULT_DEBUG_CHANNEL(imm);
11 
12 // Win: LoadCtfIme
13 HMODULE APIENTRY Imm32LoadCtfIme(VOID)
14 {
15     FIXME("()\n");
16     return NULL;
17 }
18 
19 // Win: Internal_CtfImeDestroyInputContext
20 HRESULT APIENTRY Imm32CtfImeDestroyInputContext(HIMC hIMC)
21 {
22     if (!Imm32LoadCtfIme())
23         return E_FAIL;
24 #if 1
25     FIXME("(%p)\n", hIMC);
26     return E_NOTIMPL;
27 #else
28     return g_pfnCtfImeDestroyInputContext(hIMC);
29 #endif
30 }
31 
32 // Win: CtfImmTIMDestroyInputContext
33 HRESULT APIENTRY CtfImmTIMDestroyInputContext(HIMC hIMC)
34 {
35     if (!Imm32IsCiceroMode() || (GetWin32ClientInfo()->dwCompatFlags2 & 2))
36         return E_NOINTERFACE;
37 
38     return Imm32CtfImeDestroyInputContext(hIMC);
39 }
40 
41 // Win: CtfImmTIMCreateInputContext
42 HRESULT APIENTRY CtfImmTIMCreateInputContext(HIMC hIMC)
43 {
44     FIXME("(%p)\n", hIMC);
45     return E_NOTIMPL;
46 }
47 
48 /***********************************************************************
49  *		CtfImmIsCiceroEnabled (IMM32.@)
50  */
51 BOOL WINAPI CtfImmIsCiceroEnabled(VOID)
52 {
53     return Imm32IsCiceroMode();
54 }
55 
56 /***********************************************************************
57  *		CtfImmIsTextFrameServiceDisabled(IMM32.@)
58  */
59 BOOL WINAPI CtfImmIsTextFrameServiceDisabled(VOID)
60 {
61     return !!(GetWin32ClientInfo()->CI_flags & CI_TFSDISABLED);
62 }
63 
64 /***********************************************************************
65  *		CtfImmTIMActivate(IMM32.@)
66  */
67 HRESULT WINAPI CtfImmTIMActivate(HKL hKL)
68 {
69     FIXME("(%p)\n", hKL);
70     return E_NOTIMPL;
71 }
72 
73 /***********************************************************************
74  *		CtfImmRestoreToolbarWnd(IMM32.@)
75  */
76 VOID WINAPI CtfImmRestoreToolbarWnd(DWORD dwStatus)
77 {
78     FIXME("(0x%lx)\n", dwStatus);
79 }
80 
81 /***********************************************************************
82  *		CtfImmHideToolbarWnd(IMM32.@)
83  */
84 DWORD WINAPI CtfImmHideToolbarWnd(VOID)
85 {
86     FIXME("()\n");
87     return 0;
88 }
89 
90 /***********************************************************************
91  *		CtfImmDispatchDefImeMessage(IMM32.@)
92  */
93 LRESULT WINAPI CtfImmDispatchDefImeMessage(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
94 {
95     FIXME("(%p, %u, %p, %p)\n", hWnd, uMsg, wParam, lParam);
96     return 0;
97 }
98