msctf: Stub implementation of ITfSourceSingle for ITfContext.
This commit is contained in:
parent
6e6dd21c83
commit
e00bc2d306
|
@ -64,7 +64,7 @@ typedef struct tagContext {
|
|||
const ITfInsertAtSelectionVtbl *InsertAtSelectionVtbl;
|
||||
/* const ITfMouseTrackerVtbl *MouseTrackerVtbl; */
|
||||
/* const ITfQueryEmbeddedVtbl *QueryEmbeddedVtbl; */
|
||||
/* const ITfSourceSingleVtbl *SourceSingleVtbl; */
|
||||
const ITfSourceSingleVtbl *SourceSingleVtbl;
|
||||
LONG refCount;
|
||||
BOOL connected;
|
||||
|
||||
|
@ -117,6 +117,11 @@ static inline Context *impl_from_ITfInsertAtSelectionVtbl(ITfInsertAtSelection*i
|
|||
return (Context *)((char *)iface - FIELD_OFFSET(Context,InsertAtSelectionVtbl));
|
||||
}
|
||||
|
||||
static inline Context *impl_from_ITfSourceSingleVtbl(ITfSourceSingle* iface)
|
||||
{
|
||||
return (Context *)((char *)iface - FIELD_OFFSET(Context,SourceSingleVtbl));
|
||||
}
|
||||
|
||||
static void free_sink(ContextSink *sink)
|
||||
{
|
||||
IUnknown_Release(sink->interfaces.pIUnknown);
|
||||
|
@ -204,6 +209,10 @@ static HRESULT WINAPI Context_QueryInterface(ITfContext *iface, REFIID iid, LPVO
|
|||
{
|
||||
*ppvOut = This->CompartmentMgr;
|
||||
}
|
||||
else if (IsEqualIID(iid, &IID_ITfSourceSingle))
|
||||
{
|
||||
*ppvOut = &This->SourceSingleVtbl;
|
||||
}
|
||||
|
||||
if (*ppvOut)
|
||||
{
|
||||
|
@ -729,6 +738,53 @@ static const ITfInsertAtSelectionVtbl Context_InsertAtSelectionVtbl =
|
|||
InsertAtSelection_InsertEmbeddedAtSelection,
|
||||
};
|
||||
|
||||
/*****************************************************
|
||||
* ITfSourceSingle functions
|
||||
*****************************************************/
|
||||
static HRESULT WINAPI SourceSingle_QueryInterface(ITfSourceSingle *iface, REFIID iid, LPVOID *ppvOut)
|
||||
{
|
||||
Context *This = impl_from_ITfSourceSingleVtbl(iface);
|
||||
return Context_QueryInterface((ITfContext *)This, iid, *ppvOut);
|
||||
}
|
||||
|
||||
static ULONG WINAPI SourceSingle_AddRef(ITfSourceSingle *iface)
|
||||
{
|
||||
Context *This = impl_from_ITfSourceSingleVtbl(iface);
|
||||
return Context_AddRef((ITfContext *)This);
|
||||
}
|
||||
|
||||
static ULONG WINAPI SourceSingle_Release(ITfSourceSingle *iface)
|
||||
{
|
||||
Context *This = impl_from_ITfSourceSingleVtbl(iface);
|
||||
return Context_Release((ITfContext *)This);
|
||||
}
|
||||
|
||||
static WINAPI HRESULT SourceSingle_AdviseSingleSink( ITfSourceSingle *iface,
|
||||
TfClientId tid, REFIID riid, IUnknown *punk)
|
||||
{
|
||||
Context *This = impl_from_ITfSourceSingleVtbl(iface);
|
||||
FIXME("STUB:(%p) %i %s %p\n",This, tid, debugstr_guid(riid),punk);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static WINAPI HRESULT SourceSingle_UnadviseSingleSink( ITfSourceSingle *iface,
|
||||
TfClientId tid, REFIID riid)
|
||||
{
|
||||
Context *This = impl_from_ITfSourceSingleVtbl(iface);
|
||||
FIXME("STUB:(%p) %i %s\n",This, tid, debugstr_guid(riid));
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static const ITfSourceSingleVtbl Context_SourceSingleVtbl =
|
||||
{
|
||||
SourceSingle_QueryInterface,
|
||||
SourceSingle_AddRef,
|
||||
SourceSingle_Release,
|
||||
|
||||
SourceSingle_AdviseSingleSink,
|
||||
SourceSingle_UnadviseSingleSink,
|
||||
};
|
||||
|
||||
HRESULT Context_Constructor(TfClientId tidOwner, IUnknown *punk, ITfDocumentMgr *mgr, ITfContext **ppOut, TfEditCookie *pecTextStore)
|
||||
{
|
||||
Context *This;
|
||||
|
@ -750,6 +806,7 @@ HRESULT Context_Constructor(TfClientId tidOwner, IUnknown *punk, ITfDocumentMgr
|
|||
This->ContextVtbl= &Context_ContextVtbl;
|
||||
This->SourceVtbl = &Context_SourceVtbl;
|
||||
This->InsertAtSelectionVtbl = &Context_InsertAtSelectionVtbl;
|
||||
This->SourceSingleVtbl = &Context_SourceSingleVtbl;
|
||||
This->refCount = 1;
|
||||
This->tidOwner = tidOwner;
|
||||
This->connected = FALSE;
|
||||
|
|
Loading…
Reference in New Issue