msctf: Add ITfComponentMgr to documentmgr.
This commit is contained in:
parent
819518c461
commit
1ffa3515dd
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue