msctf: Add ITfContextOwnerCompositionServices stub.

Fix crash at launch for games that use Unreal Engine 4.

Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit ef542fc797)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
oldstable
Zhiyi Zhang 2019-08-14 16:36:48 +08:00 committed by Michael Stefaniuc
parent 04dce9bc0b
commit cc0b0b9fcf
1 changed files with 88 additions and 4 deletions

View File

@ -45,7 +45,7 @@ typedef struct tagContext {
ITfContext ITfContext_iface;
ITfSource ITfSource_iface;
/* const ITfContextCompositionVtbl *ContextCompositionVtbl; */
/* const ITfContextOwnerCompositionServicesVtbl *ContextOwnerCompositionServicesVtbl; */
ITfContextOwnerCompositionServices ITfContextOwnerCompositionServices_iface;
/* const ITfContextOwnerServicesVtbl *ContextOwnerServicesVtbl; */
ITfInsertAtSelection ITfInsertAtSelection_iface;
/* const ITfMouseTrackerVtbl *MouseTrackerVtbl; */
@ -93,6 +93,11 @@ static inline Context *impl_from_ITfSource(ITfSource *iface)
return CONTAINING_RECORD(iface, Context, ITfSource_iface);
}
static inline Context *impl_from_ITfContextOwnerCompositionServices(ITfContextOwnerCompositionServices *iface)
{
return CONTAINING_RECORD(iface, Context, ITfContextOwnerCompositionServices_iface);
}
static inline Context *impl_from_ITfInsertAtSelection(ITfInsertAtSelection *iface)
{
return CONTAINING_RECORD(iface, Context, ITfInsertAtSelection_iface);
@ -154,6 +159,10 @@ static HRESULT WINAPI Context_QueryInterface(ITfContext *iface, REFIID iid, LPVO
{
*ppvOut = &This->ITfSource_iface;
}
else if (IsEqualIID(iid, &IID_ITfContextOwnerCompositionServices))
{
*ppvOut = &This->ITfContextOwnerCompositionServices_iface;
}
else if (IsEqualIID(iid, &IID_ITfInsertAtSelection))
{
*ppvOut = &This->ITfInsertAtSelection_iface;
@ -530,6 +539,9 @@ static const ITfContextVtbl ContextVtbl =
Context_CreateRangeBackup
};
/*****************************************************
* ITfSource functions
*****************************************************/
static HRESULT WINAPI ContextSource_QueryInterface(ITfSource *iface, REFIID iid, LPVOID *ppvOut)
{
Context *This = impl_from_ITfSource(iface);
@ -548,9 +560,6 @@ static ULONG WINAPI ContextSource_Release(ITfSource *iface)
return ITfContext_Release(&This->ITfContext_iface);
}
/*****************************************************
* ITfSource functions
*****************************************************/
static HRESULT WINAPI ContextSource_AdviseSink(ITfSource *iface,
REFIID riid, IUnknown *punk, DWORD *pdwCookie)
{
@ -589,6 +598,80 @@ static const ITfSourceVtbl ContextSourceVtbl =
ContextSource_UnadviseSink
};
/*****************************************************
* ITfContextOwnerCompositionServices functions
*****************************************************/
static HRESULT WINAPI ContextOwnerCompositionServices_QueryInterface(ITfContextOwnerCompositionServices *iface,
REFIID iid, LPVOID *ppvOut)
{
Context *This = impl_from_ITfContextOwnerCompositionServices(iface);
return ITfContext_QueryInterface(&This->ITfContext_iface, iid, ppvOut);
}
static ULONG WINAPI ContextOwnerCompositionServices_AddRef(ITfContextOwnerCompositionServices *iface)
{
Context *This = impl_from_ITfContextOwnerCompositionServices(iface);
return ITfContext_AddRef(&This->ITfContext_iface);
}
static ULONG WINAPI ContextOwnerCompositionServices_Release(ITfContextOwnerCompositionServices *iface)
{
Context *This = impl_from_ITfContextOwnerCompositionServices(iface);
return ITfContext_Release(&This->ITfContext_iface);
}
static HRESULT WINAPI ContextOwnerCompositionServices_StartComposition(ITfContextOwnerCompositionServices *iface,
TfEditCookie ecWrite, ITfRange *pCompositionRange, ITfCompositionSink *pSink, ITfComposition **ppComposition)
{
Context *This = impl_from_ITfContextOwnerCompositionServices(iface);
FIXME("STUB:(%p) %#x %p %p %p\n", This, ecWrite, pCompositionRange, pSink, ppComposition);
return E_NOTIMPL;
}
static HRESULT WINAPI ContextOwnerCompositionServices_EnumCompositions(ITfContextOwnerCompositionServices *iface,
IEnumITfCompositionView **ppEnum)
{
Context *This = impl_from_ITfContextOwnerCompositionServices(iface);
FIXME("STUB:(%p) %p\n", This, ppEnum);
return E_NOTIMPL;
}
static HRESULT WINAPI ContextOwnerCompositionServices_FindComposition(ITfContextOwnerCompositionServices *iface,
TfEditCookie ecRead, ITfRange *pTestRange, IEnumITfCompositionView **ppEnum)
{
Context *This = impl_from_ITfContextOwnerCompositionServices(iface);
FIXME("STUB:(%p) %#x %p %p\n", This, ecRead, pTestRange, ppEnum);
return E_NOTIMPL;
}
static HRESULT WINAPI ContextOwnerCompositionServices_TakeOwnership(ITfContextOwnerCompositionServices *iface,
TfEditCookie ecWrite, ITfCompositionView *pComposition, ITfCompositionSink *pSink, ITfComposition **ppComposition)
{
Context *This = impl_from_ITfContextOwnerCompositionServices(iface);
FIXME("STUB:(%p) %#x %p %p %p\n", This, ecWrite, pComposition, pSink, ppComposition);
return E_NOTIMPL;
}
static HRESULT WINAPI ContextOwnerCompositionServices_TerminateComposition(ITfContextOwnerCompositionServices *iface,
ITfCompositionView *pComposition)
{
Context *This = impl_from_ITfContextOwnerCompositionServices(iface);
FIXME("STUB:(%p) %p\n", This, pComposition);
return E_NOTIMPL;
}
static const ITfContextOwnerCompositionServicesVtbl ContextOwnerCompositionServicesVtbl =
{
ContextOwnerCompositionServices_QueryInterface,
ContextOwnerCompositionServices_AddRef,
ContextOwnerCompositionServices_Release,
ContextOwnerCompositionServices_StartComposition,
ContextOwnerCompositionServices_EnumCompositions,
ContextOwnerCompositionServices_FindComposition,
ContextOwnerCompositionServices_TakeOwnership,
ContextOwnerCompositionServices_TerminateComposition
};
/*****************************************************
* ITfInsertAtSelection functions
*****************************************************/
@ -985,6 +1068,7 @@ HRESULT Context_Constructor(TfClientId tidOwner, IUnknown *punk, ITfDocumentMgr
This->ITfContext_iface.lpVtbl= &ContextVtbl;
This->ITfSource_iface.lpVtbl = &ContextSourceVtbl;
This->ITfContextOwnerCompositionServices_iface.lpVtbl = &ContextOwnerCompositionServicesVtbl;
This->ITfInsertAtSelection_iface.lpVtbl = &InsertAtSelectionVtbl;
This->ITfSourceSingle_iface.lpVtbl = &ContextSourceSingleVtbl;
This->ITextStoreACPSink_iface.lpVtbl = &TextStoreACPSinkVtbl;