mirror of
https://github.com/reactos/reactos.git
synced 2025-08-06 02:43:09 +00:00
[MSCTF] Sync with Wine Staging 4.18. CORE-16441
This commit is contained in:
parent
4c4918afe9
commit
ac50127e48
11 changed files with 155 additions and 61 deletions
|
@ -18,8 +18,6 @@
|
|||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include <stdarg.h>
|
||||
|
||||
#define COBJMACROS
|
||||
|
@ -34,8 +32,6 @@
|
|||
#include "objbase.h"
|
||||
#include "olectl.h"
|
||||
|
||||
#include "wine/unicode.h"
|
||||
|
||||
#include "msctf.h"
|
||||
#include "msctf_internal.h"
|
||||
|
||||
|
@ -45,7 +41,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 +89,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 +155,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 +535,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 +556,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 +594,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
|
||||
*****************************************************/
|
||||
|
@ -852,7 +931,7 @@ static HRESULT WINAPI TextStoreACPSink_OnLockGranted(ITextStoreACPSink *iface,
|
|||
/*TODO: implement ITfEditRecord */
|
||||
SINK_FOR_EACH(cursor, &This->pTextEditSink, ITfTextEditSink, sink)
|
||||
{
|
||||
ITfTextEditSink_OnEndEdit(sink, (ITfContext*) &This->ITfContext_iface, sc, NULL);
|
||||
ITfTextEditSink_OnEndEdit(sink, &This->ITfContext_iface, sc, NULL);
|
||||
}
|
||||
sinkcookie = remove_Cookie(sc);
|
||||
}
|
||||
|
@ -985,6 +1064,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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue