Commit 3726e38b authored by Aric Stewart's avatar Aric Stewart Committed by Alexandre Julliard

msctf: Define ITfCompartmentMgr for Context.

parent 1ffa3515
......@@ -68,6 +68,9 @@ typedef struct tagContext {
LONG refCount;
BOOL connected;
/* Aggregation */
ITfCompartmentMgr *CompartmentMgr;
TfClientId tidOwner;
TfEditCookie defaultCookie;
TS_STATUS documentStatus;
......@@ -175,6 +178,7 @@ static void Context_Destructor(Context *This)
free_sink(sink);
}
CompartmentMgr_Destructor(This->CompartmentMgr);
HeapFree(GetProcessHeap(),0,This);
}
......@@ -195,6 +199,10 @@ static HRESULT WINAPI Context_QueryInterface(ITfContext *iface, REFIID iid, LPVO
{
*ppvOut = &This->InsertAtSelectionVtbl;
}
else if (IsEqualIID(iid, &IID_ITfCompartmentMgr))
{
*ppvOut = This->CompartmentMgr;
}
if (*ppvOut)
{
......@@ -718,6 +726,8 @@ HRESULT Context_Constructor(TfClientId tidOwner, IUnknown *punk, ITfContext **pp
This->tidOwner = tidOwner;
This->connected = FALSE;
CompartmentMgr_Constructor((IUnknown*)This, &IID_IUnknown, (IUnknown**)&This->CompartmentMgr);
cookie->lockType = TF_ES_READ;
cookie->pOwningContext = This;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment