Author: akhaldi Date: Fri Jan 27 17:31:52 2012 New Revision: 55250 URL: http://svn.reactos.org/svn/reactos?rev=55250&view=rev Log: [MSCTF] * Sync to Wine 1.3.37.
Added: trunk/reactos/dll/win32/msctf/msctf.rgs (with props) trunk/reactos/dll/win32/msctf/msctf_classes.idl (with props) Modified: trunk/reactos/dll/win32/msctf/CMakeLists.txt trunk/reactos/dll/win32/msctf/categorymgr.c trunk/reactos/dll/win32/msctf/compartmentmgr.c trunk/reactos/dll/win32/msctf/context.c trunk/reactos/dll/win32/msctf/displayattributemgr.c trunk/reactos/dll/win32/msctf/documentmgr.c trunk/reactos/dll/win32/msctf/inputprocessor.c trunk/reactos/dll/win32/msctf/langbarmgr.c trunk/reactos/dll/win32/msctf/msctf.c trunk/reactos/dll/win32/msctf/msctf.rbuild trunk/reactos/dll/win32/msctf/msctf_internal.h trunk/reactos/dll/win32/msctf/range.c trunk/reactos/dll/win32/msctf/threadmgr.c trunk/reactos/dll/win32/msctf/version.rc trunk/reactos/media/doc/README.WINE Modified: trunk/reactos/dll/win32/msctf/CMakeLists.txt URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msctf/CMakeLists.txt?rev=55250&r1=55249&r2=55250&view=diff ============================================================================== --- trunk/reactos/dll/win32/msctf/CMakeLists.txt [iso-8859-1] (original) +++ trunk/reactos/dll/win32/msctf/CMakeLists.txt [iso-8859-1] Fri Jan 27 17:31:52 2012 @@ -20,7 +20,6 @@ langbarmgr.c msctf.c range.c - regsvr.c threadmgr.c version.rc ${CMAKE_CURRENT_BINARY_DIR}/msctf_stubs.c Modified: trunk/reactos/dll/win32/msctf/categorymgr.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msctf/categorymgr.c?rev=55250&r1=55249&r2=55250&view=diff ============================================================================== --- trunk/reactos/dll/win32/msctf/categorymgr.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/msctf/categorymgr.c [iso-8859-1] Fri Jan 27 17:31:52 2012 @@ -41,10 +41,15 @@ WINE_DEFAULT_DEBUG_CHANNEL(msctf); typedef struct tagCategoryMgr { - const ITfCategoryMgrVtbl *CategoryMgrVtbl; + ITfCategoryMgr ITfCategoryMgr_iface; LONG refCount; } CategoryMgr; +static inline CategoryMgr *impl_from_ITfCategoryMgr(ITfCategoryMgr *iface) +{ + return CONTAINING_RECORD(iface, CategoryMgr, ITfCategoryMgr_iface); +} + static void CategoryMgr_Destructor(CategoryMgr *This) { TRACE("destroying %p\n", This); @@ -53,7 +58,7 @@ static HRESULT WINAPI CategoryMgr_QueryInterface(ITfCategoryMgr *iface, REFIID iid, LPVOID *ppvOut) { - CategoryMgr *This = (CategoryMgr *)iface; + CategoryMgr *This = impl_from_ITfCategoryMgr(iface); *ppvOut = NULL; if (IsEqualIID(iid, &IID_IUnknown) || IsEqualIID(iid, &IID_ITfCategoryMgr)) @@ -73,13 +78,13 @@ static ULONG WINAPI CategoryMgr_AddRef(ITfCategoryMgr *iface) { - CategoryMgr *This = (CategoryMgr *)iface; + CategoryMgr *This = impl_from_ITfCategoryMgr(iface); return InterlockedIncrement(&This->refCount); } static ULONG WINAPI CategoryMgr_Release(ITfCategoryMgr *iface) { - CategoryMgr *This = (CategoryMgr *)iface; + CategoryMgr *This = impl_from_ITfCategoryMgr(iface); ULONG ret; ret = InterlockedDecrement(&This->refCount); @@ -100,7 +105,7 @@ WCHAR buf2[39]; ULONG res; HKEY tipkey,catkey,itmkey; - CategoryMgr *This = (CategoryMgr*)iface; + CategoryMgr *This = impl_from_ITfCategoryMgr(iface); static const WCHAR ctg[] = {'C','a','t','e','g','o','r','y',0}; static const WCHAR itm[] = {'I','t','e','m',0}; @@ -148,7 +153,7 @@ WCHAR buf[39]; WCHAR buf2[39]; HKEY tipkey; - CategoryMgr *This = (CategoryMgr*)iface; + CategoryMgr *This = impl_from_ITfCategoryMgr(iface); static const WCHAR ctg[] = {'C','a','t','e','g','o','r','y',0}; static const WCHAR itm[] = {'I','t','e','m',0}; @@ -180,7 +185,7 @@ static HRESULT WINAPI CategoryMgr_EnumCategoriesInItem ( ITfCategoryMgr *iface, REFGUID rguid, IEnumGUID **ppEnum) { - CategoryMgr *This = (CategoryMgr*)iface; + CategoryMgr *This = impl_from_ITfCategoryMgr(iface); FIXME("STUB:(%p)\n",This); return E_NOTIMPL; } @@ -188,7 +193,7 @@ static HRESULT WINAPI CategoryMgr_EnumItemsInCategory ( ITfCategoryMgr *iface, REFGUID rcatid, IEnumGUID **ppEnum) { - CategoryMgr *This = (CategoryMgr*)iface; + CategoryMgr *This = impl_from_ITfCategoryMgr(iface); FIXME("STUB:(%p)\n",This); return E_NOTIMPL; } @@ -198,12 +203,12 @@ { static const WCHAR fmt[] = { '%','s','\\','%','s','\\','C','a','t','e','g','o','r','y','\\','I','t','e','m','\\','%','s',0}; - WCHAR fullkey[110]; + WCHAR fullkey[120]; WCHAR buf[39]; HKEY key; HRESULT hr = S_FALSE; INT index = 0; - CategoryMgr *This = (CategoryMgr*)iface; + CategoryMgr *This = impl_from_ITfCategoryMgr(iface); TRACE("(%p)\n",This); @@ -263,7 +268,7 @@ ITfCategoryMgr *iface, REFCLSID rclsid, REFGUID rguid, const WCHAR *pchDesc, ULONG cch) { - CategoryMgr *This = (CategoryMgr*)iface; + CategoryMgr *This = impl_from_ITfCategoryMgr(iface); FIXME("STUB:(%p)\n",This); return E_NOTIMPL; } @@ -271,7 +276,7 @@ static HRESULT WINAPI CategoryMgr_UnregisterGUIDDescription ( ITfCategoryMgr *iface, REFCLSID rclsid, REFGUID rguid) { - CategoryMgr *This = (CategoryMgr*)iface; + CategoryMgr *This = impl_from_ITfCategoryMgr(iface); FIXME("STUB:(%p)\n",This); return E_NOTIMPL; } @@ -279,7 +284,7 @@ static HRESULT WINAPI CategoryMgr_GetGUIDDescription ( ITfCategoryMgr *iface, REFGUID rguid, BSTR *pbstrDesc) { - CategoryMgr *This = (CategoryMgr*)iface; + CategoryMgr *This = impl_from_ITfCategoryMgr(iface); FIXME("STUB:(%p)\n",This); return E_NOTIMPL; } @@ -287,7 +292,7 @@ static HRESULT WINAPI CategoryMgr_RegisterGUIDDWORD ( ITfCategoryMgr *iface, REFCLSID rclsid, REFGUID rguid, DWORD dw) { - CategoryMgr *This = (CategoryMgr*)iface; + CategoryMgr *This = impl_from_ITfCategoryMgr(iface); FIXME("STUB:(%p)\n",This); return E_NOTIMPL; } @@ -295,7 +300,7 @@ static HRESULT WINAPI CategoryMgr_UnregisterGUIDDWORD ( ITfCategoryMgr *iface, REFCLSID rclsid, REFGUID rguid) { - CategoryMgr *This = (CategoryMgr*)iface; + CategoryMgr *This = impl_from_ITfCategoryMgr(iface); FIXME("STUB:(%p)\n",This); return E_NOTIMPL; } @@ -303,7 +308,7 @@ static HRESULT WINAPI CategoryMgr_GetGUIDDWORD ( ITfCategoryMgr *iface, REFGUID rguid, DWORD *pdw) { - CategoryMgr *This = (CategoryMgr*)iface; + CategoryMgr *This = impl_from_ITfCategoryMgr(iface); FIXME("STUB:(%p)\n",This); return E_NOTIMPL; } @@ -315,7 +320,7 @@ DWORD index; GUID *checkguid; DWORD id; - CategoryMgr *This = (CategoryMgr*)iface; + CategoryMgr *This = impl_from_ITfCategoryMgr(iface); TRACE("(%p) %s %p\n",This,debugstr_guid(rguid),pguidatom); @@ -350,7 +355,7 @@ static HRESULT WINAPI CategoryMgr_GetGUID ( ITfCategoryMgr *iface, TfGuidAtom guidatom, GUID *pguid) { - CategoryMgr *This = (CategoryMgr*)iface; + CategoryMgr *This = impl_from_ITfCategoryMgr(iface); TRACE("(%p) %i\n",This,guidatom); @@ -368,7 +373,7 @@ static HRESULT WINAPI CategoryMgr_IsEqualTfGuidAtom ( ITfCategoryMgr *iface, TfGuidAtom guidatom, REFGUID rguid, BOOL *pfEqual) { - CategoryMgr *This = (CategoryMgr*)iface; + CategoryMgr *This = impl_from_ITfCategoryMgr(iface); TRACE("(%p) %i %s %p\n",This,guidatom,debugstr_guid(rguid),pfEqual); @@ -418,7 +423,7 @@ if (This == NULL) return E_OUTOFMEMORY; - This->CategoryMgrVtbl= &CategoryMgr_CategoryMgrVtbl; + This->ITfCategoryMgr_iface.lpVtbl = &CategoryMgr_CategoryMgrVtbl; This->refCount = 1; TRACE("returning %p\n", This); Modified: trunk/reactos/dll/win32/msctf/compartmentmgr.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msctf/compartmentmgr.c?rev=55250&r1=55249&r2=55250&view=diff ============================================================================== --- trunk/reactos/dll/win32/msctf/compartmentmgr.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/msctf/compartmentmgr.c [iso-8859-1] Fri Jan 27 17:31:52 2012 @@ -284,7 +284,7 @@ } /************************************************** - * IEnumGUID implementaion for ITfCompartmentMgr::EnumCompartments + * IEnumGUID implementation for ITfCompartmentMgr::EnumCompartments **************************************************/ static void CompartmentEnumGuid_Destructor(CompartmentEnumGuid *This) { Modified: trunk/reactos/dll/win32/msctf/context.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msctf/context.c?rev=55250&r1=55249&r2=55250&view=diff ============================================================================== --- trunk/reactos/dll/win32/msctf/context.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/msctf/context.c [iso-8859-1] Fri Jan 27 17:31:52 2012 @@ -262,7 +262,7 @@ if (!This->pITextStoreACP) { - FIXME("No ITextStoreACP avaliable\n"); + FIXME("No ITextStoreACP available\n"); *phrSession = E_FAIL; return E_FAIL; } Modified: trunk/reactos/dll/win32/msctf/displayattributemgr.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msctf/displayattributemgr.c?rev=55250&r1=55249&r2=55250&view=diff ============================================================================== --- trunk/reactos/dll/win32/msctf/displayattributemgr.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/msctf/displayattributemgr.c [iso-8859-1] Fri Jan 27 17:31:52 2012 @@ -31,11 +31,16 @@ WINE_DEFAULT_DEBUG_CHANNEL(msctf); typedef struct tagDisplayAttributeMgr { - const ITfDisplayAttributeMgrVtbl *DisplayAttributeMgrVtbl; + ITfDisplayAttributeMgr ITfDisplayAttributeMgr_iface; LONG refCount; } DisplayAttributeMgr; + +static inline DisplayAttributeMgr *impl_from_ITfDisplayAttributeMgr(ITfDisplayAttributeMgr *iface) +{ + return CONTAINING_RECORD(iface, DisplayAttributeMgr, ITfDisplayAttributeMgr_iface); +} static void DisplayAttributeMgr_Destructor(DisplayAttributeMgr *This) { @@ -46,7 +51,7 @@ static HRESULT WINAPI DisplayAttributeMgr_QueryInterface(ITfDisplayAttributeMgr *iface, REFIID iid, LPVOID *ppvOut) { - DisplayAttributeMgr *This = (DisplayAttributeMgr *)iface; + DisplayAttributeMgr *This = impl_from_ITfDisplayAttributeMgr(iface); *ppvOut = NULL; if (IsEqualIID(iid, &IID_IUnknown) || IsEqualIID(iid, &IID_ITfDisplayAttributeMgr)) @@ -66,13 +71,13 @@ static ULONG WINAPI DisplayAttributeMgr_AddRef(ITfDisplayAttributeMgr *iface) { - DisplayAttributeMgr *This = (DisplayAttributeMgr *)iface; + DisplayAttributeMgr *This = impl_from_ITfDisplayAttributeMgr(iface); return InterlockedIncrement(&This->refCount); } static ULONG WINAPI DisplayAttributeMgr_Release(ITfDisplayAttributeMgr *iface) { - DisplayAttributeMgr *This = (DisplayAttributeMgr *)iface; + DisplayAttributeMgr *This = impl_from_ITfDisplayAttributeMgr(iface); ULONG ret; ret = InterlockedDecrement(&This->refCount); @@ -87,7 +92,7 @@ static HRESULT WINAPI DisplayAttributeMgr_OnUpdateInfo(ITfDisplayAttributeMgr *iface) { - DisplayAttributeMgr *This = (DisplayAttributeMgr *)iface; + DisplayAttributeMgr *This = impl_from_ITfDisplayAttributeMgr(iface); FIXME("STUB:(%p)\n",This); return E_NOTIMPL; @@ -95,7 +100,7 @@ static HRESULT WINAPI DisplayAttributeMgr_EnumDisplayAttributeInfo(ITfDisplayAttributeMgr *iface, IEnumTfDisplayAttributeInfo **ppEnum) { - DisplayAttributeMgr *This = (DisplayAttributeMgr *)iface; + DisplayAttributeMgr *This = impl_from_ITfDisplayAttributeMgr(iface); FIXME("STUB:(%p)\n",This); return E_NOTIMPL; @@ -103,7 +108,7 @@ static HRESULT WINAPI DisplayAttributeMgr_GetDisplayAttributeInfo(ITfDisplayAttributeMgr *iface, REFGUID guid, ITfDisplayAttributeInfo **ppInfo, CLSID *pclsidOwner) { - DisplayAttributeMgr *This = (DisplayAttributeMgr *)iface; + DisplayAttributeMgr *This = impl_from_ITfDisplayAttributeMgr(iface); FIXME("STUB:(%p)\n",This); return E_NOTIMPL; @@ -130,7 +135,7 @@ if (This == NULL) return E_OUTOFMEMORY; - This->DisplayAttributeMgrVtbl= &DisplayAttributeMgr_DisplayAttributeMgrVtbl; + This->ITfDisplayAttributeMgr_iface.lpVtbl = &DisplayAttributeMgr_DisplayAttributeMgrVtbl; This->refCount = 1; TRACE("returning %p\n", This); Modified: trunk/reactos/dll/win32/msctf/documentmgr.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msctf/documentmgr.c?rev=55250&r1=55249&r2=55250&view=diff ============================================================================== --- trunk/reactos/dll/win32/msctf/documentmgr.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/msctf/documentmgr.c [iso-8859-1] Fri Jan 27 17:31:52 2012 @@ -41,8 +41,8 @@ WINE_DEFAULT_DEBUG_CHANNEL(msctf); typedef struct tagDocumentMgr { - const ITfDocumentMgrVtbl *DocumentMgrVtbl; - const ITfSourceVtbl *SourceVtbl; + ITfDocumentMgr ITfDocumentMgr_iface; + ITfSource ITfSource_iface; LONG refCount; /* Aggregation */ @@ -53,7 +53,7 @@ } DocumentMgr; typedef struct tagEnumTfContext { - const IEnumTfContextsVtbl *Vtbl; + IEnumTfContexts IEnumTfContexts_iface; LONG refCount; DWORD index; @@ -62,9 +62,19 @@ static HRESULT EnumTfContext_Constructor(DocumentMgr* mgr, IEnumTfContexts **ppOut); -static inline DocumentMgr *impl_from_ITfSourceVtbl(ITfSource *iface) -{ - return (DocumentMgr *)((char *)iface - FIELD_OFFSET(DocumentMgr,SourceVtbl)); +static inline DocumentMgr *impl_from_ITfDocumentMgr(ITfDocumentMgr *iface) +{ + return CONTAINING_RECORD(iface, DocumentMgr, ITfDocumentMgr_iface); +} + +static inline DocumentMgr *impl_from_ITfSource(ITfSource *iface) +{ + return CONTAINING_RECORD(iface, DocumentMgr, ITfSource_iface); +} + +static inline EnumTfContext *impl_from_IEnumTfContexts(IEnumTfContexts *iface)\ +{ + return CONTAINING_RECORD(iface, EnumTfContext, IEnumTfContexts_iface); } static void DocumentMgr_Destructor(DocumentMgr *This) @@ -73,7 +83,7 @@ TRACE("destroying %p\n", This); TF_GetThreadMgr(&tm); - ThreadMgr_OnDocumentMgrDestruction(tm, (ITfDocumentMgr*)This); + ThreadMgr_OnDocumentMgrDestruction(tm, &This->ITfDocumentMgr_iface); if (This->contextStack[0]) ITfContext_Release(This->contextStack[0]); @@ -85,7 +95,7 @@ static HRESULT WINAPI DocumentMgr_QueryInterface(ITfDocumentMgr *iface, REFIID iid, LPVOID *ppvOut) { - DocumentMgr *This = (DocumentMgr *)iface; + DocumentMgr *This = impl_from_ITfDocumentMgr(iface); *ppvOut = NULL; if (IsEqualIID(iid, &IID_IUnknown) || IsEqualIID(iid, &IID_ITfDocumentMgr)) @@ -94,7 +104,7 @@ } else if (IsEqualIID(iid, &IID_ITfSource)) { - *ppvOut = &This->SourceVtbl; + *ppvOut = &This->ITfSource_iface; } else if (IsEqualIID(iid, &IID_ITfCompartmentMgr)) { @@ -113,13 +123,13 @@ static ULONG WINAPI DocumentMgr_AddRef(ITfDocumentMgr *iface) { - DocumentMgr *This = (DocumentMgr *)iface; + DocumentMgr *This = impl_from_ITfDocumentMgr(iface); return InterlockedIncrement(&This->refCount); } static ULONG WINAPI DocumentMgr_Release(ITfDocumentMgr *iface) { - DocumentMgr *This = (DocumentMgr *)iface; + DocumentMgr *This = impl_from_ITfDocumentMgr(iface); ULONG ret; ret = InterlockedDecrement(&This->refCount); @@ -136,14 +146,14 @@ DWORD dwFlags, IUnknown *punk, ITfContext **ppic, TfEditCookie *pecTextStore) { - DocumentMgr *This = (DocumentMgr *)iface; + DocumentMgr *This = impl_from_ITfDocumentMgr(iface); TRACE("(%p) 0x%x 0x%x %p %p %p\n",This,tidOwner,dwFlags,punk,ppic,pecTextStore); return Context_Constructor(tidOwner, punk, iface, ppic, pecTextStore); } static HRESULT WINAPI DocumentMgr_Push(ITfDocumentMgr *iface, ITfContext *pic) { - DocumentMgr *This = (DocumentMgr *)iface; + DocumentMgr *This = impl_from_ITfDocumentMgr(iface); ITfContext *check; TRACE("(%p) %p\n",This,pic); @@ -168,7 +178,7 @@ static HRESULT WINAPI DocumentMgr_Pop(ITfDocumentMgr *iface, DWORD dwFlags) { - DocumentMgr *This = (DocumentMgr *)iface; + DocumentMgr *This = impl_from_ITfDocumentMgr(iface); TRACE("(%p) 0x%x\n",This,dwFlags); if (dwFlags == TF_POPF_ALL) @@ -210,7 +220,7 @@ static HRESULT WINAPI DocumentMgr_GetTop(ITfDocumentMgr *iface, ITfContext **ppic) { - DocumentMgr *This = (DocumentMgr *)iface; + DocumentMgr *This = impl_from_ITfDocumentMgr(iface); TRACE("(%p)\n",This); if (!ppic) return E_INVALIDARG; @@ -225,7 +235,7 @@ static HRESULT WINAPI DocumentMgr_GetBase(ITfDocumentMgr *iface, ITfContext **ppic) { - DocumentMgr *This = (DocumentMgr *)iface; + DocumentMgr *This = impl_from_ITfDocumentMgr(iface); ITfContext *tgt; TRACE("(%p)\n",This); @@ -247,7 +257,7 @@ static HRESULT WINAPI DocumentMgr_EnumContexts(ITfDocumentMgr *iface, IEnumTfContexts **ppEnum) { - DocumentMgr *This = (DocumentMgr *)iface; + DocumentMgr *This = impl_from_ITfDocumentMgr(iface); TRACE("(%p) %p\n",This,ppEnum); return EnumTfContext_Constructor(This, ppEnum); } @@ -269,20 +279,20 @@ static HRESULT WINAPI Source_QueryInterface(ITfSource *iface, REFIID iid, LPVOID *ppvOut) { - DocumentMgr *This = impl_from_ITfSourceVtbl(iface); - return DocumentMgr_QueryInterface((ITfDocumentMgr*)This, iid, *ppvOut); + DocumentMgr *This = impl_from_ITfSource(iface); + return DocumentMgr_QueryInterface(&This->ITfDocumentMgr_iface, iid, *ppvOut); } static ULONG WINAPI Source_AddRef(ITfSource *iface) { - DocumentMgr *This = impl_from_ITfSourceVtbl(iface); - return DocumentMgr_AddRef((ITfDocumentMgr*)This); + DocumentMgr *This = impl_from_ITfSource(iface); + return DocumentMgr_AddRef(&This->ITfDocumentMgr_iface); } static ULONG WINAPI Source_Release(ITfSource *iface) { - DocumentMgr *This = impl_from_ITfSourceVtbl(iface); - return DocumentMgr_Release((ITfDocumentMgr*)This); + DocumentMgr *This = impl_from_ITfSource(iface); + return DocumentMgr_Release(&This->ITfDocumentMgr_iface); } /***************************************************** @@ -291,14 +301,14 @@ static HRESULT WINAPI DocumentMgrSource_AdviseSink(ITfSource *iface, REFIID riid, IUnknown *punk, DWORD *pdwCookie) { - DocumentMgr *This = impl_from_ITfSourceVtbl(iface); + DocumentMgr *This = impl_from_ITfSource(iface); FIXME("STUB:(%p)\n",This); return E_NOTIMPL; } static HRESULT WINAPI DocumentMgrSource_UnadviseSink(ITfSource *iface, DWORD pdwCookie) { - DocumentMgr *This = impl_from_ITfSourceVtbl(iface); + DocumentMgr *This = impl_from_ITfSource(iface); FIXME("STUB:(%p)\n",This); return E_NOTIMPL; } @@ -321,20 +331,20 @@ if (This == NULL) return E_OUTOFMEMORY; - This->DocumentMgrVtbl= &DocumentMgr_DocumentMgrVtbl; - This->SourceVtbl = &DocumentMgr_SourceVtbl; + This->ITfDocumentMgr_iface.lpVtbl = &DocumentMgr_DocumentMgrVtbl; + This->ITfSource_iface.lpVtbl = &DocumentMgr_SourceVtbl; This->refCount = 1; This->ThreadMgrSink = ThreadMgrSink; CompartmentMgr_Constructor((IUnknown*)This, &IID_IUnknown, (IUnknown**)&This->CompartmentMgr); TRACE("returning %p\n", This); - *ppOut = (ITfDocumentMgr*)This; + *ppOut = &This->ITfDocumentMgr_iface; return S_OK; } /************************************************** - * IEnumTfContexts implementaion + * IEnumTfContexts implementation **************************************************/ static void EnumTfContext_Destructor(EnumTfContext *This) { @@ -344,7 +354,7 @@ static HRESULT WINAPI EnumTfContext_QueryInterface(IEnumTfContexts *iface, REFIID iid, LPVOID *ppvOut) { - EnumTfContext *This = (EnumTfContext *)iface; + EnumTfContext *This = impl_from_IEnumTfContexts(iface); *ppvOut = NULL; if (IsEqualIID(iid, &IID_IUnknown) || IsEqualIID(iid, &IID_IEnumTfContexts)) @@ -364,13 +374,13 @@ static ULONG WINAPI EnumTfContext_AddRef(IEnumTfContexts *iface) { - EnumTfContext *This = (EnumTfContext*)iface; + EnumTfContext *This = impl_from_IEnumTfContexts(iface); return InterlockedIncrement(&This->refCount); } static ULONG WINAPI EnumTfContext_Release(IEnumTfContexts *iface) { - EnumTfContext *This = (EnumTfContext *)iface; + EnumTfContext *This = impl_from_IEnumTfContexts(iface); ULONG ret; ret = InterlockedDecrement(&This->refCount); @@ -382,7 +392,7 @@ static HRESULT WINAPI EnumTfContext_Next(IEnumTfContexts *iface, ULONG ulCount, ITfContext **rgContext, ULONG *pcFetched) { - EnumTfContext *This = (EnumTfContext *)iface; + EnumTfContext *This = impl_from_IEnumTfContexts(iface); ULONG fetched = 0; TRACE("(%p)\n",This); @@ -411,7 +421,7 @@ static HRESULT WINAPI EnumTfContext_Skip( IEnumTfContexts* iface, ULONG celt) { - EnumTfContext *This = (EnumTfContext *)iface; + EnumTfContext *This = impl_from_IEnumTfContexts(iface); TRACE("(%p)\n",This); This->index += celt; return S_OK; @@ -419,7 +429,7 @@ static HRESULT WINAPI EnumTfContext_Reset( IEnumTfContexts* iface) { - EnumTfContext *This = (EnumTfContext *)iface; + EnumTfContext *This = impl_from_IEnumTfContexts(iface); TRACE("(%p)\n",This); This->index = 0; return S_OK; @@ -428,7 +438,7 @@ static HRESULT WINAPI EnumTfContext_Clone( IEnumTfContexts *iface, IEnumTfContexts **ppenum) { - EnumTfContext *This = (EnumTfContext *)iface; + EnumTfContext *This = impl_from_IEnumTfContexts(iface); HRESULT res; TRACE("(%p)\n",This); @@ -438,7 +448,7 @@ res = EnumTfContext_Constructor(This->docmgr, ppenum); if (SUCCEEDED(res)) { - EnumTfContext *new_This = (EnumTfContext *)*ppenum; + EnumTfContext *new_This = impl_from_IEnumTfContexts(*ppenum); new_This->index = This->index; } return res; @@ -463,11 +473,11 @@ if (This == NULL) return E_OUTOFMEMORY; - This->Vtbl= &IEnumTfContexts_Vtbl; + This->IEnumTfContexts_iface.lpVtbl = &IEnumTfContexts_Vtbl; This->refCount = 1; This->docmgr = mgr; TRACE("returning %p\n", This); - *ppOut = (IEnumTfContexts*)This; - return S_OK; -} + *ppOut = &This->IEnumTfContexts_iface; + return S_OK; +} Modified: trunk/reactos/dll/win32/msctf/inputprocessor.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msctf/inputprocessor.c?rev=55250&r1=55249&r2=55250&view=diff ============================================================================== --- trunk/reactos/dll/win32/msctf/inputprocessor.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/msctf/inputprocessor.c [iso-8859-1] Fri Jan 27 17:31:52 2012 @@ -782,7 +782,7 @@ } /************************************************** - * IEnumGUID implementaion for ITfInputProcessorProfiles::EnumInputProcessorInfo + * IEnumGUID implementation for ITfInputProcessorProfiles::EnumInputProcessorInfo **************************************************/ static void ProfilesEnumGuid_Destructor(ProfilesEnumGuid *This) { @@ -935,7 +935,7 @@ } /************************************************** - * IEnumTfLanguageProfiles implementaion + * IEnumTfLanguageProfiles implementation **************************************************/ static void EnumTfLanguageProfiles_Destructor(EnumTfLanguageProfiles *This) { Modified: trunk/reactos/dll/win32/msctf/langbarmgr.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msctf/langbarmgr.c?rev=55250&r1=55249&r2=55250&view=diff ============================================================================== --- trunk/reactos/dll/win32/msctf/langbarmgr.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/msctf/langbarmgr.c [iso-8859-1] Fri Jan 27 17:31:52 2012 @@ -31,11 +31,16 @@ WINE_DEFAULT_DEBUG_CHANNEL(msctf); typedef struct tagLangBarMgr { - const ITfLangBarMgrVtbl *LangBarMgrVtbl; + ITfLangBarMgr ITfLangBarMgr_iface; LONG refCount; } LangBarMgr; + +static inline LangBarMgr *impl_from_ITfLangBarMgr(ITfLangBarMgr *iface) +{ + return CONTAINING_RECORD(iface, LangBarMgr, ITfLangBarMgr_iface); +} static void LangBarMgr_Destructor(LangBarMgr *This) { @@ -46,7 +51,7 @@ static HRESULT WINAPI LangBarMgr_QueryInterface(ITfLangBarMgr *iface, REFIID iid, LPVOID *ppvOut) { - LangBarMgr *This = (LangBarMgr *)iface; + LangBarMgr *This = impl_from_ITfLangBarMgr(iface); *ppvOut = NULL; if (IsEqualIID(iid, &IID_IUnknown) || IsEqualIID(iid, &IID_ITfLangBarMgr)) @@ -66,13 +71,13 @@ static ULONG WINAPI LangBarMgr_AddRef(ITfLangBarMgr *iface) { - LangBarMgr *This = (LangBarMgr *)iface; + LangBarMgr *This = impl_from_ITfLangBarMgr(iface); return InterlockedIncrement(&This->refCount); } static ULONG WINAPI LangBarMgr_Release(ITfLangBarMgr *iface) { - LangBarMgr *This = (LangBarMgr *)iface; + LangBarMgr *This = impl_from_ITfLangBarMgr(iface); ULONG ret; ret = InterlockedDecrement(&This->refCount); @@ -87,7 +92,7 @@ static HRESULT WINAPI LangBarMgr_AdviseEventSink( ITfLangBarMgr* iface, ITfLangBarEventSink *pSink, HWND hwnd, DWORD dwflags, DWORD *pdwCookie) { - LangBarMgr *This = (LangBarMgr *)iface; + LangBarMgr *This = impl_from_ITfLangBarMgr(iface); FIXME("STUB:(%p)\n",This); return E_NOTIMPL; @@ -95,7 +100,7 @@ static HRESULT WINAPI LangBarMgr_UnAdviseEventSink( ITfLangBarMgr* iface, DWORD dwCookie) { - LangBarMgr *This = (LangBarMgr *)iface; + LangBarMgr *This = impl_from_ITfLangBarMgr(iface); FIXME("STUB:(%p)\n",This); return E_NOTIMPL; @@ -103,7 +108,7 @@ static HRESULT WINAPI LangBarMgr_GetThreadMarshalInterface( ITfLangBarMgr* iface, DWORD dwThreadId, DWORD dwType, REFIID riid, IUnknown **ppunk) { - LangBarMgr *This = (LangBarMgr *)iface; + LangBarMgr *This = impl_from_ITfLangBarMgr(iface); FIXME("STUB:(%p)\n",This); return E_NOTIMPL; @@ -111,7 +116,7 @@ static HRESULT WINAPI LangBarMgr_GetThreadLangBarItemMgr( ITfLangBarMgr* iface, DWORD dwThreadId, ITfLangBarItemMgr **pplbi, DWORD *pdwThreadid) { - LangBarMgr *This = (LangBarMgr *)iface; + LangBarMgr *This = impl_from_ITfLangBarMgr(iface); FIXME("STUB:(%p)\n",This); return E_NOTIMPL; @@ -119,7 +124,7 @@ static HRESULT WINAPI LangBarMgr_GetInputProcessorProfiles( ITfLangBarMgr* iface, DWORD dwThreadId, ITfInputProcessorProfiles **ppaip, DWORD *pdwThreadid) { - LangBarMgr *This = (LangBarMgr *)iface; + LangBarMgr *This = impl_from_ITfLangBarMgr(iface); FIXME("STUB:(%p)\n",This); return E_NOTIMPL; @@ -127,7 +132,7 @@ static HRESULT WINAPI LangBarMgr_RestoreLastFocus( ITfLangBarMgr* iface, DWORD *dwThreadId, BOOL fPrev) { - LangBarMgr *This = (LangBarMgr *)iface; + LangBarMgr *This = impl_from_ITfLangBarMgr(iface); FIXME("STUB:(%p)\n",This); return E_NOTIMPL; @@ -135,7 +140,7 @@ static HRESULT WINAPI LangBarMgr_SetModalInput( ITfLangBarMgr* iface, ITfLangBarEventSink *pSink, DWORD dwThreadId, DWORD dwFlags) { - LangBarMgr *This = (LangBarMgr *)iface; + LangBarMgr *This = impl_from_ITfLangBarMgr(iface); FIXME("STUB:(%p)\n",This); return E_NOTIMPL; @@ -143,7 +148,7 @@ static HRESULT WINAPI LangBarMgr_ShowFloating( ITfLangBarMgr* iface, DWORD dwFlags) { - LangBarMgr *This = (LangBarMgr *)iface; + LangBarMgr *This = impl_from_ITfLangBarMgr(iface); FIXME("STUB:(%p)\n",This); return E_NOTIMPL; @@ -151,7 +156,7 @@ static HRESULT WINAPI LangBarMgr_GetShowFloatingStatus( ITfLangBarMgr* iface, DWORD *pdwFlags) { - LangBarMgr *This = (LangBarMgr *)iface; + LangBarMgr *This = impl_from_ITfLangBarMgr(iface); FIXME("STUB:(%p)\n",This); return E_NOTIMPL; @@ -184,7 +189,7 @@ if (This == NULL) return E_OUTOFMEMORY; - This->LangBarMgrVtbl= &LangBarMgr_LangBarMgrVtbl; + This->ITfLangBarMgr_iface.lpVtbl = &LangBarMgr_LangBarMgrVtbl; This->refCount = 1; TRACE("returning %p\n", This); Modified: trunk/reactos/dll/win32/msctf/msctf.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msctf/msctf.c?rev=55250&r1=55249&r2=55250&view=diff ============================================================================== --- trunk/reactos/dll/win32/msctf/msctf.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/msctf/msctf.c [iso-8859-1] Fri Jan 27 17:31:52 2012 @@ -33,6 +33,7 @@ #include "shlwapi.h" #include "shlguid.h" #include "comcat.h" +#include "rpcproxy.h" #include "msctf.h" #include "msctf_internal.h" @@ -94,10 +95,15 @@ typedef struct tagClassFactory { - const IClassFactoryVtbl *vtbl; + IClassFactory IClassFactory_iface; LONG ref; LPFNCONSTRUCTOR ctor; } ClassFactory; + +static inline ClassFactory *impl_from_IClassFactory(IClassFactory *iface) +{ + return CONTAINING_RECORD(iface, ClassFactory, IClassFactory_iface); +} static void ClassFactory_Destructor(ClassFactory *This) { @@ -121,13 +127,13 @@ static ULONG WINAPI ClassFactory_AddRef(IClassFactory *iface) { - ClassFactory *This = (ClassFactory *)iface; + ClassFactory *This = impl_from_IClassFactory(iface); return InterlockedIncrement(&This->ref); } static ULONG WINAPI ClassFactory_Release(IClassFactory *iface) { - ClassFactory *This = (ClassFactory *)iface; + ClassFactory *This = impl_from_IClassFactory(iface); ULONG ret = InterlockedDecrement(&This->ref); if (ret == 0) @@ -137,7 +143,7 @@ static HRESULT WINAPI ClassFactory_CreateInstance(IClassFactory *iface, IUnknown *punkOuter, REFIID iid, LPVOID *ppvOut) { - ClassFactory *This = (ClassFactory *)iface; + ClassFactory *This = impl_from_IClassFactory(iface); HRESULT ret; IUnknown *obj; @@ -152,7 +158,7 @@ static HRESULT WINAPI ClassFactory_LockServer(IClassFactory *iface, BOOL fLock) { - ClassFactory *This = (ClassFactory *)iface; + ClassFactory *This = impl_from_IClassFactory(iface); TRACE("(%p)->(%x)\n", This, fLock); @@ -178,7 +184,7 @@ static HRESULT ClassFactory_Constructor(LPFNCONSTRUCTOR ctor, LPVOID *ppvOut) { ClassFactory *This = HeapAlloc(GetProcessHeap(),0,sizeof(ClassFactory)); - This->vtbl = &ClassFactoryVtbl; + This->IClassFactory_iface.lpVtbl = &ClassFactoryVtbl; This->ref = 1; This->ctor = ctor; *ppvOut = This; @@ -554,6 +560,22 @@ } /*********************************************************************** + * DllRegisterServer (MSCTF.@) + */ +HRESULT WINAPI DllRegisterServer(void) +{ + return __wine_register_resources( MSCTF_hinstance ); +} + +/*********************************************************************** + * DllUnregisterServer (MSCTF.@) + */ +HRESULT WINAPI DllUnregisterServer(void) +{ + return __wine_unregister_resources( MSCTF_hinstance ); +} + +/*********************************************************************** * TF_CreateThreadMgr (MSCTF.@) */ HRESULT WINAPI TF_CreateThreadMgr(ITfThreadMgr **pptim) Modified: trunk/reactos/dll/win32/msctf/msctf.rbuild URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msctf/msctf.rbuild?rev=55250&r1=55249&r2=55250&view=diff ============================================================================== --- trunk/reactos/dll/win32/msctf/msctf.rbuild [iso-8859-1] (original) +++ trunk/reactos/dll/win32/msctf/msctf.rbuild [iso-8859-1] Fri Jan 27 17:31:52 2012 @@ -17,7 +17,6 @@ <file>langbarmgr.c</file> <file>msctf.c</file> <file>range.c</file> - <file>regsvr.c</file> <file>threadmgr.c</file> <file>version.rc</file> <library>wine</library> Added: trunk/reactos/dll/win32/msctf/msctf.rgs URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msctf/msctf.rgs?rev=55250&view=auto ============================================================================== --- trunk/reactos/dll/win32/msctf/msctf.rgs (added) +++ trunk/reactos/dll/win32/msctf/msctf.rgs [iso-8859-1] Fri Jan 27 17:31:52 2012 @@ -1,0 +1,29 @@ +HKCR +{ + NoRemove Interface + { + } + NoRemove CLSID + { + '{529A9E6B-6587-4F23-AB9E-9C7D683E3C50}' = s 'TF_ThreadMgr' + { + InprocServer32 = s '%MODULE%' { val ThreadingModel = s 'Apartment' } + } + '{33C53A50-F456-4884-B049-85FD643ECFED}' = s 'TF_InputProcessorProfiles' + { + InprocServer32 = s '%MODULE%' { val ThreadingModel = s 'Apartment' } + } + '{A4B544A1-438D-4B41-9325-869523E2D6C7}' = s 'TF_CategoryMgr' + { + InprocServer32 = s '%MODULE%' { val ThreadingModel = s 'Apartment' } + } + '{EBB08C45-6C4A-4FDC-AE53-4EB8C4C7DB8E}' = s 'TF_LangBarMgr' + { + InprocServer32 = s '%MODULE%' { val ThreadingModel = s 'Apartment' } + } + '{3CE74DE4-53D3-4D74-8B83-431B3828BA53}' = s 'TF_DisplayAttributeMgr' + { + InprocServer32 = s '%MODULE%' { val ThreadingModel = s 'Apartment' } + } + } +} Propchange: trunk/reactos/dll/win32/msctf/msctf.rgs ------------------------------------------------------------------------------ svn:eol-style = native Added: trunk/reactos/dll/win32/msctf/msctf_classes.idl URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msctf/msctf_classes.idl?rev=55250&view=auto ============================================================================== --- trunk/reactos/dll/win32/msctf/msctf_classes.idl (added) +++ trunk/reactos/dll/win32/msctf/msctf_classes.idl [iso-8859-1] Fri Jan 27 17:31:52 2012 @@ -1,0 +1,49 @@ +/* + * COM Classes for msctf + * + * Copyright 2010 Alexandre Julliard + * + * 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 + */ + +[ + threading(apartment), + uuid(529a9e6b-6587-4f23-ab9e-9c7d683e3c50) +] +coclass TF_ThreadMgr { interface ITfThreadMgr; } + +[ + threading(apartment), + uuid(33c53a50-f456-4884-b049-85fd643ecfed) +] +coclass TF_InputProcessorProfiles { interface ITfInputProcessorProfiles; } + +[ + threading(apartment), + uuid(a4b544a1-438d-4b41-9325-869523e2d6c7) +] +coclass TF_CategoryMgr { interface ITfCategoryMgr; } + +[ + threading(apartment), + uuid(ebb08c45-6c4a-4fdc-ae53-4eb8c4c7db8e) +] +coclass TF_LangBarMgr { interface ITfLangBarMgr; } + +[ + threading(apartment), + uuid(3ce74de4-53d3-4d74-8b83-431b3828ba53) +] +coclass TF_DisplayAttributeMgr { interface ITfDisplayAttributeMgr; } Propchange: trunk/reactos/dll/win32/msctf/msctf_classes.idl ------------------------------------------------------------------------------ svn:eol-style = native Modified: trunk/reactos/dll/win32/msctf/msctf_internal.h URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msctf/msctf_internal.h?rev=55250&r1=55249&r2=55250&view=diff ============================================================================== --- trunk/reactos/dll/win32/msctf/msctf_internal.h [iso-8859-1] (original) +++ trunk/reactos/dll/win32/msctf/msctf_internal.h [iso-8859-1] Fri Jan 27 17:31:52 2012 @@ -28,42 +28,42 @@ #define COOKIE_MAGIC_EDITCOOKIE 0x0050 #define COOKIE_MAGIC_COMPARTMENTSINK 0x0060 -extern DWORD tlsIndex; -extern TfClientId processId; -extern ITfCompartmentMgr *globalCompartmentMgr; +extern DWORD tlsIndex DECLSPEC_HIDDEN; +extern TfClientId processId DECLSPEC_HIDDEN; +extern ITfCompartmentMgr *globalCompartmentMgr DECLSPEC_HIDDEN; -extern HRESULT ThreadMgr_Constructor(IUnknown *pUnkOuter, IUnknown **ppOut); -extern HRESULT DocumentMgr_Constructor(ITfThreadMgrEventSink*, ITfDocumentMgr **ppOut); -extern HRESULT Context_Constructor(TfClientId tidOwner, IUnknown *punk, ITfDocumentMgr *mgr, ITfContext **ppOut, TfEditCookie *pecTextStore); -extern HRESULT InputProcessorProfiles_Constructor(IUnknown *pUnkOuter, IUnknown **ppOut); -extern HRESULT CategoryMgr_Constructor(IUnknown *pUnkOuter, IUnknown **ppOut); -extern HRESULT Range_Constructor(ITfContext *context, ITextStoreACP *textstore, DWORD lockType, DWORD anchorStart, DWORD anchorEnd, ITfRange **ppOut); -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 ThreadMgr_Constructor(IUnknown *pUnkOuter, IUnknown **ppOut) DECLSPEC_HIDDEN; +extern HRESULT DocumentMgr_Constructor(ITfThreadMgrEventSink*, ITfDocumentMgr **ppOut) DECLSPEC_HIDDEN; +extern HRESULT Context_Constructor(TfClientId tidOwner, IUnknown *punk, ITfDocumentMgr *mgr, ITfContext **ppOut, TfEditCookie *pecTextStore) DECLSPEC_HIDDEN; +extern HRESULT InputProcessorProfiles_Constructor(IUnknown *pUnkOuter, IUnknown **ppOut) DECLSPEC_HIDDEN; +extern HRESULT CategoryMgr_Constructor(IUnknown *pUnkOuter, IUnknown **ppOut) DECLSPEC_HIDDEN; +extern HRESULT Range_Constructor(ITfContext *context, ITextStoreACP *textstore, DWORD lockType, DWORD anchorStart, DWORD anchorEnd, ITfRange **ppOut) DECLSPEC_HIDDEN; +extern HRESULT CompartmentMgr_Constructor(IUnknown *pUnkOuter, REFIID riid, IUnknown **ppOut) DECLSPEC_HIDDEN; +extern HRESULT CompartmentMgr_Destructor(ITfCompartmentMgr *This) DECLSPEC_HIDDEN; +extern HRESULT LangBarMgr_Constructor(IUnknown *pUnkOuter, IUnknown **ppOut) DECLSPEC_HIDDEN; +extern HRESULT DisplayAttributeMgr_Constructor(IUnknown *pUnkOuter, IUnknown **ppOut) DECLSPEC_HIDDEN; -extern HRESULT Context_Initialize(ITfContext *cxt, ITfDocumentMgr *manager); -extern HRESULT Context_Uninitialize(ITfContext *cxt); -extern void ThreadMgr_OnDocumentMgrDestruction(ITfThreadMgr *tm, ITfDocumentMgr *mgr); -extern HRESULT TF_SELECTION_to_TS_SELECTION_ACP(const TF_SELECTION *tf, TS_SELECTION_ACP *tsAcp); +extern HRESULT Context_Initialize(ITfContext *cxt, ITfDocumentMgr *manager) DECLSPEC_HIDDEN; +extern HRESULT Context_Uninitialize(ITfContext *cxt) DECLSPEC_HIDDEN; +extern void ThreadMgr_OnDocumentMgrDestruction(ITfThreadMgr *tm, ITfDocumentMgr *mgr) DECLSPEC_HIDDEN; +extern HRESULT TF_SELECTION_to_TS_SELECTION_ACP(const TF_SELECTION *tf, TS_SELECTION_ACP *tsAcp) DECLSPEC_HIDDEN; /* cookie function */ -extern DWORD generate_Cookie(DWORD magic, LPVOID data); -extern DWORD get_Cookie_magic(DWORD id); -extern LPVOID get_Cookie_data(DWORD id); -extern LPVOID remove_Cookie(DWORD id); -extern DWORD enumerate_Cookie(DWORD magic, DWORD *index); +extern DWORD generate_Cookie(DWORD magic, LPVOID data) DECLSPEC_HIDDEN; +extern DWORD get_Cookie_magic(DWORD id) DECLSPEC_HIDDEN; +extern LPVOID get_Cookie_data(DWORD id) DECLSPEC_HIDDEN; +extern LPVOID remove_Cookie(DWORD id) DECLSPEC_HIDDEN; +extern DWORD enumerate_Cookie(DWORD magic, DWORD *index) DECLSPEC_HIDDEN; /* activated text services functions */ -extern HRESULT add_active_textservice(TF_LANGUAGEPROFILE *lp); -extern BOOL get_active_textservice(REFCLSID rclsid, TF_LANGUAGEPROFILE *lp); -extern HRESULT activate_textservices(ITfThreadMgr *tm); -extern HRESULT deactivate_textservices(void); +extern HRESULT add_active_textservice(TF_LANGUAGEPROFILE *lp) DECLSPEC_HIDDEN; +extern BOOL get_active_textservice(REFCLSID rclsid, TF_LANGUAGEPROFILE *lp) DECLSPEC_HIDDEN; +extern HRESULT activate_textservices(ITfThreadMgr *tm) DECLSPEC_HIDDEN; +extern HRESULT deactivate_textservices(void) DECLSPEC_HIDDEN; -extern CLSID get_textservice_clsid(TfClientId tid); -extern HRESULT get_textservice_sink(TfClientId tid, REFCLSID iid, IUnknown** sink); -extern HRESULT set_textservice_sink(TfClientId tid, REFCLSID iid, IUnknown* sink); +extern CLSID get_textservice_clsid(TfClientId tid) DECLSPEC_HIDDEN; +extern HRESULT get_textservice_sink(TfClientId tid, REFCLSID iid, IUnknown** sink) DECLSPEC_HIDDEN; +extern HRESULT set_textservice_sink(TfClientId tid, REFCLSID iid, IUnknown* sink) DECLSPEC_HIDDEN; extern const WCHAR szwSystemTIPKey[]; extern const WCHAR szwSystemCTFKey[]; Modified: trunk/reactos/dll/win32/msctf/range.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msctf/range.c?rev=55250&r1=55249&r2=55250&view=diff ============================================================================== --- trunk/reactos/dll/win32/msctf/range.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/msctf/range.c [iso-8859-1] Fri Jan 27 17:31:52 2012 @@ -41,7 +41,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(msctf); typedef struct tagRange { - const ITfRangeVtbl *RangeVtbl; + ITfRange ITfRange_iface; /* const ITfRangeACPVtb *RangeACPVtbl; */ LONG refCount; @@ -54,6 +54,11 @@ } Range; +static inline Range *impl_from_ITfRange(ITfRange *iface) +{ + return CONTAINING_RECORD(iface, Range, ITfRange_iface); +} + static void Range_Destructor(Range *This) { TRACE("destroying %p\n", This); @@ -62,7 +67,7 @@ static HRESULT WINAPI Range_QueryInterface(ITfRange *iface, REFIID iid, LPVOID *ppvOut) { - Range *This = (Range*)iface; + Range *This = impl_from_ITfRange(iface); *ppvOut = NULL; if (IsEqualIID(iid, &IID_IUnknown) || IsEqualIID(iid, &IID_ITfRange)) @@ -82,13 +87,13 @@ static ULONG WINAPI Range_AddRef(ITfRange *iface) { - Range *This = (Range *)iface; + Range *This = impl_from_ITfRange(iface); return InterlockedIncrement(&This->refCount); } static ULONG WINAPI Range_Release(ITfRange *iface) { - Range *This = (Range *)iface; + Range *This = impl_from_ITfRange(iface); ULONG ret; ret = InterlockedDecrement(&This->refCount); @@ -104,7 +109,7 @@ static HRESULT WINAPI Range_GetText(ITfRange *iface, TfEditCookie ec, DWORD dwFlags, WCHAR *pchText, ULONG cchMax, ULONG *pcch) { - Range *This = (Range *)iface; + Range *This = impl_from_ITfRange(iface); FIXME("STUB:(%p)\n",This); return E_NOTIMPL; } @@ -112,7 +117,7 @@ static HRESULT WINAPI Range_SetText(ITfRange *iface, TfEditCookie ec, DWORD dwFlags, const WCHAR *pchText, LONG cch) { - Range *This = (Range *)iface; + Range *This = impl_from_ITfRange(iface); FIXME("STUB:(%p)\n",This); return E_NOTIMPL; } @@ -120,7 +125,7 @@ static HRESULT WINAPI Range_GetFormattedText(ITfRange *iface, TfEditCookie ec, IDataObject **ppDataObject) { - Range *This = (Range *)iface; + Range *This = impl_from_ITfRange(iface); FIXME("STUB:(%p)\n",This); return E_NOTIMPL; } @@ -128,7 +133,7 @@ static HRESULT WINAPI Range_GetEmbedded(ITfRange *iface, TfEditCookie ec, REFGUID rguidService, REFIID riid, IUnknown **ppunk) { - Range *This = (Range *)iface; + Range *This = impl_from_ITfRange(iface); FIXME("STUB:(%p)\n",This); return E_NOTIMPL; } @@ -136,7 +141,7 @@ static HRESULT WINAPI Range_InsertEmbedded(ITfRange *iface, TfEditCookie ec, DWORD dwFlags, IDataObject *pDataObject) { - Range *This = (Range *)iface; + Range *This = impl_from_ITfRange(iface); FIXME("STUB:(%p)\n",This); return E_NOTIMPL; } @@ -144,7 +149,7 @@ static HRESULT WINAPI Range_ShiftStart(ITfRange *iface, TfEditCookie ec, LONG cchReq, LONG *pcch, const TF_HALTCOND *pHalt) { - Range *This = (Range *)iface; + Range *This = impl_from_ITfRange(iface); FIXME("STUB:(%p)\n",This); return E_NOTIMPL; } @@ -152,7 +157,7 @@ static HRESULT WINAPI Range_ShiftEnd(ITfRange *iface, TfEditCookie ec, LONG cchReq, LONG *pcch, const TF_HALTCOND *pHalt) { - Range *This = (Range *)iface; + Range *This = impl_from_ITfRange(iface); FIXME("STUB:(%p)\n",This); return E_NOTIMPL; } @@ -160,7 +165,7 @@ static HRESULT WINAPI Range_ShiftStartToRange(ITfRange *iface, TfEditCookie ec, ITfRange *pRange, TfAnchor aPos) { - Range *This = (Range *)iface; + Range *This = impl_from_ITfRange(iface); FIXME("STUB:(%p)\n",This); return E_NOTIMPL; } @@ -168,7 +173,7 @@ static HRESULT WINAPI Range_ShiftEndToRange(ITfRange *iface, TfEditCookie ec, ITfRange *pRange, TfAnchor aPos) { - Range *This = (Range *)iface; + Range *This = impl_from_ITfRange(iface); FIXME("STUB:(%p)\n",This); return E_NOTIMPL; } @@ -176,7 +181,7 @@ static HRESULT WINAPI Range_ShiftStartRegion(ITfRange *iface, TfEditCookie ec, TfShiftDir dir, BOOL *pfNoRegion) { - Range *This = (Range *)iface; + Range *This = impl_from_ITfRange(iface); FIXME("STUB:(%p)\n",This); return E_NOTIMPL; } @@ -184,7 +189,7 @@ static HRESULT WINAPI Range_ShiftEndRegion(ITfRange *iface, TfEditCookie ec, TfShiftDir dir, BOOL *pfNoRegion) { - Range *This = (Range *)iface; + Range *This = impl_from_ITfRange(iface); FIXME("STUB:(%p)\n",This); return E_NOTIMPL; } @@ -192,7 +197,7 @@ static HRESULT WINAPI Range_IsEmpty(ITfRange *iface, TfEditCookie ec, BOOL *pfEmpty) { - Range *This = (Range *)iface; + Range *This = impl_from_ITfRange(iface); FIXME("STUB:(%p)\n",This); return E_NOTIMPL; } @@ -200,7 +205,7 @@ static HRESULT WINAPI Range_Collapse(ITfRange *iface, TfEditCookie ec, TfAnchor aPos) { - Range *This = (Range *)iface; + Range *This = impl_from_ITfRange(iface); TRACE("(%p) %i %i\n",This,ec,aPos); switch (aPos) @@ -221,7 +226,7 @@ static HRESULT WINAPI Range_IsEqualStart(ITfRange *iface, TfEditCookie ec, ITfRange *pWith, TfAnchor aPos, BOOL *pfEqual) { - Range *This = (Range *)iface; + Range *This = impl_from_ITfRange(iface); FIXME("STUB:(%p)\n",This); return E_NOTIMPL; } @@ -229,7 +234,7 @@ static HRESULT WINAPI Range_IsEqualEnd(ITfRange *iface, TfEditCookie ec, ITfRange *pWith, TfAnchor aPos, BOOL *pfEqual) { - Range *This = (Range *)iface; + Range *This = impl_from_ITfRange(iface); FIXME("STUB:(%p)\n",This); return E_NOTIMPL; } @@ -237,7 +242,7 @@ static HRESULT WINAPI Range_CompareStart(ITfRange *iface, TfEditCookie ec, ITfRange *pWith, TfAnchor aPos, LONG *plResult) { - Range *This = (Range *)iface; + Range *This = impl_from_ITfRange(iface); FIXME("STUB:(%p)\n",This); return E_NOTIMPL; } @@ -245,7 +250,7 @@ static HRESULT WINAPI Range_CompareEnd(ITfRange *iface, TfEditCookie ec, ITfRange *pWith, TfAnchor aPos, LONG *plResult) { - Range *This = (Range *)iface; + Range *This = impl_from_ITfRange(iface); FIXME("STUB:(%p)\n",This); return E_NOTIMPL; } @@ -253,7 +258,7 @@ static HRESULT WINAPI Range_AdjustForInsert(ITfRange *iface, TfEditCookie ec, ULONG cchInsert, BOOL *pfInsertOk) { - Range *This = (Range *)iface; + Range *This = impl_from_ITfRange(iface); FIXME("STUB:(%p)\n",This); return E_NOTIMPL; } @@ -261,7 +266,7 @@ static HRESULT WINAPI Range_GetGravity(ITfRange *iface, TfGravity *pgStart, TfGravity *pgEnd) { - Range *This = (Range *)iface; + Range *This = impl_from_ITfRange(iface); FIXME("STUB:(%p)\n",This); return E_NOTIMPL; } @@ -269,21 +274,21 @@ static HRESULT WINAPI Range_SetGravity(ITfRange *iface, TfEditCookie ec, TfGravity gStart, TfGravity gEnd) { - Range *This = (Range *)iface; + Range *This = impl_from_ITfRange(iface); FIXME("STUB:(%p)\n",This); return E_NOTIMPL; } static HRESULT WINAPI Range_Clone(ITfRange *iface, ITfRange **ppClone) { - Range *This = (Range *)iface; + Range *This = impl_from_ITfRange(iface); FIXME("STUB:(%p)\n",This); return E_NOTIMPL; } static HRESULT WINAPI Range_GetContext(ITfRange *iface, ITfContext **ppContext) { - Range *This = (Range *)iface; + Range *This = impl_from_ITfRange(iface); TRACE("(%p)\n",This); if (!ppContext) return E_INVALIDARG; @@ -331,7 +336,7 @@ TRACE("(%p) %p %p\n",This, context, textstore); - This->RangeVtbl= &Range_RangeVtbl; + This->ITfRange_iface.lpVtbl = &Range_RangeVtbl; This->refCount = 1; This->pITfContext = context; This->pITextStoreACP = textstore; @@ -339,7 +344,7 @@ This->anchorStart = anchorStart; This->anchorEnd = anchorEnd; - *ppOut = (ITfRange*)This; + *ppOut = &This->ITfRange_iface; TRACE("returning %p\n", This); return S_OK; Modified: trunk/reactos/dll/win32/msctf/threadmgr.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msctf/threadmgr.c?rev=55250&r1=55249&r2=55250&view=diff ============================================================================== --- trunk/reactos/dll/win32/msctf/threadmgr.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/msctf/threadmgr.c [iso-8859-1] Fri Jan 27 17:31:52 2012 @@ -1313,7 +1313,7 @@ } /************************************************** - * IEnumTfDocumentMgrs implementaion + * IEnumTfDocumentMgrs implementation **************************************************/ static void EnumTfDocumentMgr_Destructor(EnumTfDocumentMgr *This) { @@ -1470,5 +1470,5 @@ return; } } - FIXME("ITfDocumenMgr %p not found in this thread\n",mgr); -} + FIXME("ITfDocumentMgr %p not found in this thread\n",mgr); +} Modified: trunk/reactos/dll/win32/msctf/version.rc URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msctf/version.rc?rev=55250&r1=55249&r2=55250&view=diff ============================================================================== --- trunk/reactos/dll/win32/msctf/version.rc [iso-8859-1] (original) +++ trunk/reactos/dll/win32/msctf/version.rc [iso-8859-1] Fri Jan 27 17:31:52 2012 @@ -16,6 +16,8 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ +1 WINE_REGISTRY msctf.rgs + #define WINE_FILEDESCRIPTION_STR "Wine Msctf" #define WINE_FILENAME_STR "msctf.dll" #define WINE_FILEVERSION 5,1,2600,3319 Modified: trunk/reactos/media/doc/README.WINE URL: http://svn.reactos.org/svn/reactos/trunk/reactos/media/doc/README.WINE?rev=55250&r1=55249&r2=55250&view=diff ============================================================================== --- trunk/reactos/media/doc/README.WINE [iso-8859-1] (original) +++ trunk/reactos/media/doc/README.WINE [iso-8859-1] Fri Jan 27 17:31:52 2012 @@ -96,7 +96,7 @@ reactos/dll/win32/mscat32 # Autosync reactos/dll/win32/mscms # Synced to Wine-1.3.37 reactos/dll/win32/mscoree # Autosync -reactos/dll/win32/msctf # Autosync +reactos/dll/win32/msctf # Synced to Wine-1.3.37 reactos/dll/win32/msftedit # Synced to Wine-1.3.37 reactos/dll/win32/msg711.acm # Synced to Wine-1.3.37 reactos/dll/win32/msgsm32.acm # Autosync