Module: wine Branch: master Commit: e669ffe6e52d6f5193dd3a71c372ca9bfc42a621 URL: http://source.winehq.org/git/wine.git/?a=commit;h=e669ffe6e52d6f5193dd3a71c3...
Author: Aric Stewart aric@codeweavers.com Date: Thu Mar 18 10:39:00 2010 -0500
msctf: Add stub for ITfDisplayAttributeMgr.
---
dlls/msctf/Makefile.in | 1 + dlls/msctf/displayattributemgr.c | 139 ++++++++++++++++++++++++++++++++++++++ dlls/msctf/msctf.c | 1 + dlls/msctf/msctf_internal.h | 1 + dlls/msctf/regsvr.c | 7 ++ dlls/uuid/uuid.c | 1 + include/msctf.idl | 2 +- 7 files changed, 151 insertions(+), 1 deletions(-)
diff --git a/dlls/msctf/Makefile.in b/dlls/msctf/Makefile.in index 2e52b09..bb1c35a 100644 --- a/dlls/msctf/Makefile.in +++ b/dlls/msctf/Makefile.in @@ -9,6 +9,7 @@ C_SRCS = \ categorymgr.c \ compartmentmgr.c \ context.c \ + displayattributemgr.c \ documentmgr.c \ inputprocessor.c \ langbarmgr.c \ diff --git a/dlls/msctf/displayattributemgr.c b/dlls/msctf/displayattributemgr.c new file mode 100644 index 0000000..75248cd --- /dev/null +++ b/dlls/msctf/displayattributemgr.c @@ -0,0 +1,139 @@ +/* + * ITfDisplayAttributeMgr implementation + * + * Copyright 2010 CodeWeavers, Aric Stewart + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#define COBJMACROS + +#include "wine/debug.h" +#include "winbase.h" +#include "winreg.h" +#include "shlwapi.h" + +#include "msctf.h" +#include "msctf_internal.h" + +WINE_DEFAULT_DEBUG_CHANNEL(msctf); + +typedef struct tagDisplayAttributeMgr { + const ITfDisplayAttributeMgrVtbl *DisplayAttributeMgrVtbl; + + LONG refCount; + +} DisplayAttributeMgr; + +static void DisplayAttributeMgr_Destructor(DisplayAttributeMgr *This) +{ + TRACE("destroying %p\n", This); + + HeapFree(GetProcessHeap(),0,This); +} + +static HRESULT WINAPI DisplayAttributeMgr_QueryInterface(ITfDisplayAttributeMgr *iface, REFIID iid, LPVOID *ppvOut) +{ + DisplayAttributeMgr *This = (DisplayAttributeMgr *)iface; + *ppvOut = NULL; + + if (IsEqualIID(iid, &IID_IUnknown) || IsEqualIID(iid, &IID_ITfDisplayAttributeMgr)) + { + *ppvOut = This; + } + + if (*ppvOut) + { + IUnknown_AddRef(iface); + return S_OK; + } + + WARN("unsupported interface: %s\n", debugstr_guid(iid)); + return E_NOINTERFACE; +} + +static ULONG WINAPI DisplayAttributeMgr_AddRef(ITfDisplayAttributeMgr *iface) +{ + DisplayAttributeMgr *This = (DisplayAttributeMgr *)iface; + return InterlockedIncrement(&This->refCount); +} + +static ULONG WINAPI DisplayAttributeMgr_Release(ITfDisplayAttributeMgr *iface) +{ + DisplayAttributeMgr *This = (DisplayAttributeMgr *)iface; + ULONG ret; + + ret = InterlockedDecrement(&This->refCount); + if (ret == 0) + DisplayAttributeMgr_Destructor(This); + return ret; +} + +/***************************************************** + * ITfDisplayAttributeMgr functions + *****************************************************/ + +static HRESULT WINAPI DisplayAttributeMgr_OnUpdateInfo(ITfDisplayAttributeMgr *iface) +{ + DisplayAttributeMgr *This = (DisplayAttributeMgr *)iface; + + FIXME("STUB:(%p)\n",This); + return E_NOTIMPL; +} + +static HRESULT WINAPI DisplayAttributeMgr_EnumDisplayAttributeInfo(ITfDisplayAttributeMgr *iface, IEnumTfDisplayAttributeInfo **ppEnum) +{ + DisplayAttributeMgr *This = (DisplayAttributeMgr *)iface; + + FIXME("STUB:(%p)\n",This); + return E_NOTIMPL; +} + +static HRESULT WINAPI DisplayAttributeMgr_GetDisplayAttributeInfo(ITfDisplayAttributeMgr *iface, REFGUID guid, ITfDisplayAttributeInfo **ppInfo, CLSID *pclsidOwner) +{ + DisplayAttributeMgr *This = (DisplayAttributeMgr *)iface; + + FIXME("STUB:(%p)\n",This); + return E_NOTIMPL; +} + +static const ITfDisplayAttributeMgrVtbl DisplayAttributeMgr_DisplayAttributeMgrVtbl = +{ + DisplayAttributeMgr_QueryInterface, + DisplayAttributeMgr_AddRef, + DisplayAttributeMgr_Release, + + DisplayAttributeMgr_OnUpdateInfo, + DisplayAttributeMgr_EnumDisplayAttributeInfo, + DisplayAttributeMgr_GetDisplayAttributeInfo +}; + +HRESULT DisplayAttributeMgr_Constructor(IUnknown *pUnkOuter, IUnknown **ppOut) +{ + DisplayAttributeMgr *This; + if (pUnkOuter) + return CLASS_E_NOAGGREGATION; + + This = HeapAlloc(GetProcessHeap(),0,sizeof(DisplayAttributeMgr)); + if (This == NULL) + return E_OUTOFMEMORY; + + This->DisplayAttributeMgrVtbl= &DisplayAttributeMgr_DisplayAttributeMgrVtbl; + This->refCount = 1; + + TRACE("returning %p\n", This); + *ppOut = (IUnknown *)This; + return S_OK; +} diff --git a/dlls/msctf/msctf.c b/dlls/msctf/msctf.c index 62d1ff2..759fe7e 100644 --- a/dlls/msctf/msctf.c +++ b/dlls/msctf/msctf.c @@ -88,6 +88,7 @@ static const struct { {&CLSID_TF_InputProcessorProfiles, InputProcessorProfiles_Constructor}, {&CLSID_TF_CategoryMgr, CategoryMgr_Constructor}, {&CLSID_TF_LangBarMgr, LangBarMgr_Constructor}, + {&CLSID_TF_DisplayAttributeMgr, DisplayAttributeMgr_Constructor}, {NULL, NULL} };
diff --git a/dlls/msctf/msctf_internal.h b/dlls/msctf/msctf_internal.h index 57423e9..9aaaad0 100644 --- a/dlls/msctf/msctf_internal.h +++ b/dlls/msctf/msctf_internal.h @@ -41,6 +41,7 @@ extern HRESULT Range_Constructor(ITfContext *context, ITextStoreACP *textstore, extern HRESULT CompartmentMgr_Constructor(IUnknown *pUnkOuter, REFIID riid, IUnknown **ppOut); extern HRESULT CompartmentMgr_Destructor(ITfCompartmentMgr *This); extern HRESULT LangBarMgr_Constructor(IUnknown *pUnkOuter, IUnknown **ppOut); +extern HRESULT DisplayAttributeMgr_Constructor(IUnknown *pUnkOuter, IUnknown **ppOut);
extern HRESULT Context_Initialize(ITfContext *cxt, ITfDocumentMgr *manager); extern HRESULT Context_Uninitialize(ITfContext *cxt); diff --git a/dlls/msctf/regsvr.c b/dlls/msctf/regsvr.c index 2af1f24..65ebb1d 100644 --- a/dlls/msctf/regsvr.c +++ b/dlls/msctf/regsvr.c @@ -469,6 +469,13 @@ static struct regsvr_coclass const coclass_list[] = { "msctf.dll", "Apartment" }, + { + &CLSID_TF_DisplayAttributeMgr, + "TF_DisplayAttributeMgr", + NULL, + "msctf.dll", + "Apartment" + }, { NULL } /* list terminator */ };
diff --git a/dlls/uuid/uuid.c b/dlls/uuid/uuid.c index e27dcac..5a1a255 100644 --- a/dlls/uuid/uuid.c +++ b/dlls/uuid/uuid.c @@ -121,6 +121,7 @@ DEFINE_GUID(CLSID_TF_ThreadMgr, 0x529a9e6b,0x6587,0x4f23,0xab,0x9e,0x9 DEFINE_GUID(CLSID_TF_InputProcessorProfiles, 0x33c53a50,0xf456,0x4884,0xb0,0x49,0x85,0xfd,0x64,0x3e,0xcf,0xed); DEFINE_GUID(CLSID_TF_CategoryMgr, 0xA4B544A1,0x438D,0x4B41,0x93,0x25,0x86,0x95,0x23,0xE2,0xD6,0xC7); DEFINE_GUID(CLSID_TF_LangBarMgr, 0xebb08c45,0x6c4a,0x4fdc,0xae,0x53,0x4e,0xb8,0xc4,0xc7,0xdb,0x8e); +DEFINE_GUID(CLSID_TF_DisplayAttributeMgr, 0x3ce74de4,0x53d3,0x4d74,0x8b,0x83,0x43,0x1b,0x38,0x28,0xba,0x53); DEFINE_GUID(CLSID_TaskbarList, 0x56fdf344,0xfd6d,0x11d0,0x95,0x8a,0x00,0x60,0x97,0xc9,0xa0,0x90); DEFINE_GUID(GUID_TFCAT_TIP_KEYBOARD, 0x34745c63,0xb2f0,0x4784,0x8b,0x67,0x5e,0x12,0xc8,0x70,0x1a,0x31); DEFINE_GUID(GUID_TFCAT_TIP_SPEECH, 0xB5A73CD1,0x8355,0x426B,0xA1,0x61,0x25,0x98,0x08,0xF2,0x6B,0x14); diff --git a/include/msctf.idl b/include/msctf.idl index fcb568e..2ed3866 100644 --- a/include/msctf.idl +++ b/include/msctf.idl @@ -44,7 +44,7 @@ cpp_quote("EXTERN_C const CLSID CLSID_TF_ThreadMgr;") cpp_quote("EXTERN_C const CLSID CLSID_TF_InputProcessorProfiles;") cpp_quote("EXTERN_C const CLSID CLSID_TF_LangBarMgr;") cpp_quote("EXTERN_C const CLSID CLSID_TF_CategoryMgr;") -cpp_quote("DEFINE_GUID(CLSID_TF_DisplayAttributeMgr,0x3ce74de4,0x53d3,0x4d74,0x8b,0x83,0x43,0x1b,0x38,0x28,0xba,0x53);") +cpp_quote("EXTERN_C const CLSID CLSID_TF_DisplayAttributeMgr;")
/* GUIDs for Compartments */ cpp_quote("EXTERN_C const GUID GUID_COMPARTMENT_KEYBOARD_DISABLED;")