Aric Stewart : msctf: Add ITfComponentMgr to documentmgr.
Alexandre Julliard
julliard at winehq.org
Fri Jun 12 10:41:10 CDT 2009
Module: wine
Branch: master
Commit: 1ffa3515ddd3f6e1ebfb1b8c9e680b04b8c7e785
URL: http://source.winehq.org/git/wine.git/?a=commit;h=1ffa3515ddd3f6e1ebfb1b8c9e680b04b8c7e785
Author: Aric Stewart <aric at codeweavers.com>
Date: Thu Jun 11 13:33:23 2009 -0500
msctf: Add ITfComponentMgr to documentmgr.
---
dlls/msctf/documentmgr.c | 10 ++++++++++
1 files changed, 10 insertions(+), 0 deletions(-)
diff --git a/dlls/msctf/documentmgr.c b/dlls/msctf/documentmgr.c
index 7fd354a..3d4dbe9 100644
--- a/dlls/msctf/documentmgr.c
+++ b/dlls/msctf/documentmgr.c
@@ -45,6 +45,9 @@ typedef struct tagDocumentMgr {
const ITfSourceVtbl *SourceVtbl;
LONG refCount;
+ /* Aggregation */
+ ITfCompartmentMgr *CompartmentMgr;
+
ITfContext* contextStack[2]; /* limit of 2 contexts */
ITfThreadMgrEventSink* ThreadMgrSink;
} DocumentMgr;
@@ -61,6 +64,7 @@ static void DocumentMgr_Destructor(DocumentMgr *This)
ITfContext_Release(This->contextStack[0]);
if (This->contextStack[1])
ITfContext_Release(This->contextStack[1]);
+ CompartmentMgr_Destructor(This->CompartmentMgr);
HeapFree(GetProcessHeap(),0,This);
}
@@ -77,6 +81,10 @@ static HRESULT WINAPI DocumentMgr_QueryInterface(ITfDocumentMgr *iface, REFIID i
{
*ppvOut = &This->SourceVtbl;
}
+ else if (IsEqualIID(iid, &IID_ITfCompartmentMgr))
+ {
+ *ppvOut = This->CompartmentMgr;
+ }
if (*ppvOut)
{
@@ -303,6 +311,8 @@ HRESULT DocumentMgr_Constructor(ITfThreadMgrEventSink *ThreadMgrSink, ITfDocumen
This->refCount = 1;
This->ThreadMgrSink = ThreadMgrSink;
+ CompartmentMgr_Constructor((IUnknown*)This, &IID_IUnknown, (IUnknown**)&This->CompartmentMgr);
+
TRACE("returning %p\n", This);
*ppOut = (ITfDocumentMgr*)This;
return S_OK;
More information about the wine-cvs
mailing list