2 * ITfInputProcessorProfiles implementation
4 * Copyright 2009 Aric Stewart, CodeWeavers
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
27 #include "wine/debug.h"
36 #include "wine/unicode.h"
39 #include "msctf_internal.h"
41 WINE_DEFAULT_DEBUG_CHANNEL(msctf);
43 typedef struct tagInputProcessorProfiles {
44 const ITfInputProcessorProfilesVtbl *InputProcessorProfilesVtbl;
46 } InputProcessorProfiles;
48 static void InputProcessorProfiles_Destructor(InputProcessorProfiles *This)
50 TRACE("destroying %p\n", This);
51 HeapFree(GetProcessHeap(),0,This);
54 static HRESULT WINAPI InputProcessorProfiles_QueryInterface(ITfInputProcessorProfiles *iface, REFIID iid, LPVOID *ppvOut)
56 InputProcessorProfiles *This = (InputProcessorProfiles *)iface;
59 if (IsEqualIID(iid, &IID_IUnknown) || IsEqualIID(iid, &IID_ITfInputProcessorProfiles))
66 IUnknown_AddRef(iface);
70 WARN("unsupported interface: %s\n", debugstr_guid(iid));
74 static ULONG WINAPI InputProcessorProfiles_AddRef(ITfInputProcessorProfiles *iface)
76 InputProcessorProfiles *This = (InputProcessorProfiles *)iface;
77 return InterlockedIncrement(&This->refCount);
80 static ULONG WINAPI InputProcessorProfiles_Release(ITfInputProcessorProfiles *iface)
82 InputProcessorProfiles *This = (InputProcessorProfiles *)iface;
85 ret = InterlockedDecrement(&This->refCount);
87 InputProcessorProfiles_Destructor(This);
91 /*****************************************************
92 * ITfInputProcessorProfiles functions
93 *****************************************************/
94 static HRESULT WINAPI InputProcessorProfiles_Register(
95 ITfInputProcessorProfiles *iface, REFCLSID rclsid)
97 InputProcessorProfiles *This = (InputProcessorProfiles*)iface;
98 FIXME("STUB:(%p)\n",This);
102 static HRESULT WINAPI InputProcessorProfiles_Unregister(
103 ITfInputProcessorProfiles *iface, REFCLSID rclsid)
105 InputProcessorProfiles *This = (InputProcessorProfiles*)iface;
106 FIXME("STUB:(%p)\n",This);
110 static HRESULT WINAPI InputProcessorProfiles_AddLanguageProfile(
111 ITfInputProcessorProfiles *iface, REFCLSID rclsid,
112 LANGID langid, REFGUID guidProfile, const WCHAR *pchDesc,
113 ULONG cchDesc, const WCHAR *pchIconFile, ULONG cchFile,
116 InputProcessorProfiles *This = (InputProcessorProfiles*)iface;
117 FIXME("STUB:(%p)\n",This);
121 static HRESULT WINAPI InputProcessorProfiles_RemoveLanguageProfile(
122 ITfInputProcessorProfiles *iface, REFCLSID rclsid, LANGID langid,
125 InputProcessorProfiles *This = (InputProcessorProfiles*)iface;
126 FIXME("STUB:(%p)\n",This);
130 static HRESULT WINAPI InputProcessorProfiles_EnumInputProcessorInfo(
131 ITfInputProcessorProfiles *iface, IEnumGUID **ppEnum)
133 InputProcessorProfiles *This = (InputProcessorProfiles*)iface;
134 FIXME("STUB:(%p)\n",This);
138 static HRESULT WINAPI InputProcessorProfiles_GetDefaultLanguageProfile(
139 ITfInputProcessorProfiles *iface, LANGID langid, REFGUID catid,
140 CLSID *pclsid, GUID *pguidProfile)
142 InputProcessorProfiles *This = (InputProcessorProfiles*)iface;
143 FIXME("STUB:(%p)\n",This);
147 static HRESULT WINAPI InputProcessorProfiles_SetDefaultLanguageProfile(
148 ITfInputProcessorProfiles *iface, LANGID langid, REFCLSID rclsid,
149 REFGUID guidProfiles)
151 InputProcessorProfiles *This = (InputProcessorProfiles*)iface;
152 FIXME("STUB:(%p)\n",This);
156 static HRESULT WINAPI InputProcessorProfiles_ActivateLanguageProfile(
157 ITfInputProcessorProfiles *iface, REFCLSID rclsid, LANGID langid,
158 REFGUID guidProfiles)
160 InputProcessorProfiles *This = (InputProcessorProfiles*)iface;
161 FIXME("STUB:(%p)\n",This);
165 static HRESULT WINAPI InputProcessorProfiles_GetActiveLanguageProfile(
166 ITfInputProcessorProfiles *iface, REFCLSID rclsid, LANGID *plangid,
169 InputProcessorProfiles *This = (InputProcessorProfiles*)iface;
170 FIXME("STUB:(%p)\n",This);
174 static HRESULT WINAPI InputProcessorProfiles_GetLanguageProfileDescription(
175 ITfInputProcessorProfiles *iface, REFCLSID rclsid, LANGID langid,
176 REFGUID guidProfile, BSTR *pbstrProfile)
178 InputProcessorProfiles *This = (InputProcessorProfiles*)iface;
179 FIXME("STUB:(%p)\n",This);
183 static HRESULT WINAPI InputProcessorProfiles_GetCurrentLanguage(
184 ITfInputProcessorProfiles *iface, LANGID *plangid)
186 InputProcessorProfiles *This = (InputProcessorProfiles*)iface;
187 FIXME("STUB:(%p)\n",This);
191 static HRESULT WINAPI InputProcessorProfiles_ChangeCurrentLanguage(
192 ITfInputProcessorProfiles *iface, LANGID langid)
194 InputProcessorProfiles *This = (InputProcessorProfiles*)iface;
195 FIXME("STUB:(%p)\n",This);
199 static HRESULT WINAPI InputProcessorProfiles_GetLanguageList(
200 ITfInputProcessorProfiles *iface, LANGID **ppLangId, ULONG *pulCount)
202 InputProcessorProfiles *This = (InputProcessorProfiles*)iface;
203 FIXME("STUB:(%p)\n",This);
207 static HRESULT WINAPI InputProcessorProfiles_EnumLanguageProfiles(
208 ITfInputProcessorProfiles *iface, LANGID langid,
209 IEnumTfLanguageProfiles **ppEnum)
211 InputProcessorProfiles *This = (InputProcessorProfiles*)iface;
212 FIXME("STUB:(%p)\n",This);
216 static HRESULT WINAPI InputProcessorProfiles_EnableLanguageProfile(
217 ITfInputProcessorProfiles *iface, REFCLSID rclsid, LANGID langid,
218 REFGUID guidProfile, BOOL fEnable)
220 InputProcessorProfiles *This = (InputProcessorProfiles*)iface;
221 FIXME("STUB:(%p)\n",This);
225 static HRESULT WINAPI InputProcessorProfiles_IsEnabledLanguageProfile(
226 ITfInputProcessorProfiles *iface, REFCLSID rclsid, LANGID langid,
227 REFGUID guidProfile, BOOL *pfEnable)
229 InputProcessorProfiles *This = (InputProcessorProfiles*)iface;
230 FIXME("STUB:(%p)\n",This);
234 static HRESULT WINAPI InputProcessorProfiles_EnableLanguageProfileByDefault(
235 ITfInputProcessorProfiles *iface, REFCLSID rclsid, LANGID langid,
236 REFGUID guidProfile, BOOL fEnable)
238 InputProcessorProfiles *This = (InputProcessorProfiles*)iface;
239 FIXME("STUB:(%p)\n",This);
243 static HRESULT WINAPI InputProcessorProfiles_SubstituteKeyboardLayout(
244 ITfInputProcessorProfiles *iface, REFCLSID rclsid, LANGID langid,
245 REFGUID guidProfile, HKL hKL)
247 InputProcessorProfiles *This = (InputProcessorProfiles*)iface;
248 FIXME("STUB:(%p)\n",This);
253 static const ITfInputProcessorProfilesVtbl InputProcessorProfiles_InputProcessorProfilesVtbl =
255 InputProcessorProfiles_QueryInterface,
256 InputProcessorProfiles_AddRef,
257 InputProcessorProfiles_Release,
259 InputProcessorProfiles_Register,
260 InputProcessorProfiles_Unregister,
261 InputProcessorProfiles_AddLanguageProfile,
262 InputProcessorProfiles_RemoveLanguageProfile,
263 InputProcessorProfiles_EnumInputProcessorInfo,
264 InputProcessorProfiles_GetDefaultLanguageProfile,
265 InputProcessorProfiles_SetDefaultLanguageProfile,
266 InputProcessorProfiles_ActivateLanguageProfile,
267 InputProcessorProfiles_GetActiveLanguageProfile,
268 InputProcessorProfiles_GetLanguageProfileDescription,
269 InputProcessorProfiles_GetCurrentLanguage,
270 InputProcessorProfiles_ChangeCurrentLanguage,
271 InputProcessorProfiles_GetLanguageList,
272 InputProcessorProfiles_EnumLanguageProfiles,
273 InputProcessorProfiles_EnableLanguageProfile,
274 InputProcessorProfiles_IsEnabledLanguageProfile,
275 InputProcessorProfiles_EnableLanguageProfileByDefault,
276 InputProcessorProfiles_SubstituteKeyboardLayout
279 HRESULT InputProcessorProfiles_Constructor(IUnknown *pUnkOuter, IUnknown **ppOut)
281 InputProcessorProfiles *This;
283 return CLASS_E_NOAGGREGATION;
285 This = HeapAlloc(GetProcessHeap(),HEAP_ZERO_MEMORY,sizeof(InputProcessorProfiles));
287 return E_OUTOFMEMORY;
289 This->InputProcessorProfilesVtbl= &InputProcessorProfiles_InputProcessorProfilesVtbl;
292 TRACE("returning %p\n", This);
293 *ppOut = (IUnknown *)This;