wordpad: Remove untranslated resources from the Turkish translation.
[wine/testsucceed.git] / dlls / msctf / langbarmgr.c
blob272a8168727c6a8f1228066573173c1cfef3495c
1 /*
2 * ITfLangBarMgr implementation
4 * Copyright 2010 Justin Chevrier
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 #define COBJMACROS
23 #include "wine/debug.h"
24 #include "winbase.h"
25 #include "winreg.h"
26 #include "shlwapi.h"
28 #include "msctf.h"
29 #include "msctf_internal.h"
31 WINE_DEFAULT_DEBUG_CHANNEL(msctf);
33 typedef struct tagLangBarMgr {
34 const ITfLangBarMgrVtbl *LangBarMgrVtbl;
36 LONG refCount;
38 } LangBarMgr;
40 static void LangBarMgr_Destructor(LangBarMgr *This)
42 TRACE("destroying %p\n", This);
44 HeapFree(GetProcessHeap(),0,This);
47 static HRESULT WINAPI LangBarMgr_QueryInterface(ITfLangBarMgr *iface, REFIID iid, LPVOID *ppvOut)
49 LangBarMgr *This = (LangBarMgr *)iface;
50 *ppvOut = NULL;
52 if (IsEqualIID(iid, &IID_IUnknown) || IsEqualIID(iid, &IID_ITfLangBarMgr))
54 *ppvOut = This;
57 if (*ppvOut)
59 IUnknown_AddRef(iface);
60 return S_OK;
63 WARN("unsupported interface: %s\n", debugstr_guid(iid));
64 return E_NOINTERFACE;
67 static ULONG WINAPI LangBarMgr_AddRef(ITfLangBarMgr *iface)
69 LangBarMgr *This = (LangBarMgr *)iface;
70 return InterlockedIncrement(&This->refCount);
73 static ULONG WINAPI LangBarMgr_Release(ITfLangBarMgr *iface)
75 LangBarMgr *This = (LangBarMgr *)iface;
76 ULONG ret;
78 ret = InterlockedDecrement(&This->refCount);
79 if (ret == 0)
80 LangBarMgr_Destructor(This);
81 return ret;
84 /*****************************************************
85 * ITfLangBarMgr functions
86 *****************************************************/
88 static HRESULT WINAPI LangBarMgr_AdviseEventSink( ITfLangBarMgr* iface, ITfLangBarEventSink *pSink, HWND hwnd, DWORD dwflags, DWORD *pdwCookie)
90 LangBarMgr *This = (LangBarMgr *)iface;
92 FIXME("STUB:(%p)\n",This);
93 return E_NOTIMPL;
96 static HRESULT WINAPI LangBarMgr_UnAdviseEventSink( ITfLangBarMgr* iface, DWORD dwCookie)
98 LangBarMgr *This = (LangBarMgr *)iface;
100 FIXME("STUB:(%p)\n",This);
101 return E_NOTIMPL;
104 static HRESULT WINAPI LangBarMgr_GetThreadMarshalInterface( ITfLangBarMgr* iface, DWORD dwThreadId, DWORD dwType, REFIID riid, IUnknown **ppunk)
106 LangBarMgr *This = (LangBarMgr *)iface;
108 FIXME("STUB:(%p)\n",This);
109 return E_NOTIMPL;
112 static HRESULT WINAPI LangBarMgr_GetThreadLangBarItemMgr( ITfLangBarMgr* iface, DWORD dwThreadId, ITfLangBarItemMgr **pplbi, DWORD *pdwThreadid)
114 LangBarMgr *This = (LangBarMgr *)iface;
116 FIXME("STUB:(%p)\n",This);
117 return E_NOTIMPL;
120 static HRESULT WINAPI LangBarMgr_GetInputProcessorProfiles( ITfLangBarMgr* iface, DWORD dwThreadId, ITfInputProcessorProfiles **ppaip, DWORD *pdwThreadid)
122 LangBarMgr *This = (LangBarMgr *)iface;
124 FIXME("STUB:(%p)\n",This);
125 return E_NOTIMPL;
128 static HRESULT WINAPI LangBarMgr_RestoreLastFocus( ITfLangBarMgr* iface, DWORD *dwThreadId, BOOL fPrev)
130 LangBarMgr *This = (LangBarMgr *)iface;
132 FIXME("STUB:(%p)\n",This);
133 return E_NOTIMPL;
136 static HRESULT WINAPI LangBarMgr_SetModalInput( ITfLangBarMgr* iface, ITfLangBarEventSink *pSink, DWORD dwThreadId, DWORD dwFlags)
138 LangBarMgr *This = (LangBarMgr *)iface;
140 FIXME("STUB:(%p)\n",This);
141 return E_NOTIMPL;
144 static HRESULT WINAPI LangBarMgr_ShowFloating( ITfLangBarMgr* iface, DWORD dwFlags)
146 LangBarMgr *This = (LangBarMgr *)iface;
148 FIXME("STUB:(%p)\n",This);
149 return E_NOTIMPL;
152 static HRESULT WINAPI LangBarMgr_GetShowFloatingStatus( ITfLangBarMgr* iface, DWORD *pdwFlags)
154 LangBarMgr *This = (LangBarMgr *)iface;
156 FIXME("STUB:(%p)\n",This);
157 return E_NOTIMPL;
160 static const ITfLangBarMgrVtbl LangBarMgr_LangBarMgrVtbl =
162 LangBarMgr_QueryInterface,
163 LangBarMgr_AddRef,
164 LangBarMgr_Release,
166 LangBarMgr_AdviseEventSink,
167 LangBarMgr_UnAdviseEventSink,
168 LangBarMgr_GetThreadMarshalInterface,
169 LangBarMgr_GetThreadLangBarItemMgr,
170 LangBarMgr_GetInputProcessorProfiles,
171 LangBarMgr_RestoreLastFocus,
172 LangBarMgr_SetModalInput,
173 LangBarMgr_ShowFloating,
174 LangBarMgr_GetShowFloatingStatus
177 HRESULT LangBarMgr_Constructor(IUnknown *pUnkOuter, IUnknown **ppOut)
179 LangBarMgr *This;
180 if (pUnkOuter)
181 return CLASS_E_NOAGGREGATION;
183 This = HeapAlloc(GetProcessHeap(),0,sizeof(LangBarMgr));
184 if (This == NULL)
185 return E_OUTOFMEMORY;
187 This->LangBarMgrVtbl= &LangBarMgr_LangBarMgrVtbl;
188 This->refCount = 1;
190 TRACE("returning %p\n", This);
191 *ppOut = (IUnknown *)This;
192 return S_OK;