mirror of
https://github.com/reactos/reactos.git
synced 2025-08-05 22:13:06 +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"
|
||||
|
||||
|
@ -100,6 +96,8 @@ typedef struct tagACLMulti {
|
|||
struct list PreservedKeyNotifySink;
|
||||
struct list ThreadFocusSink;
|
||||
struct list ThreadMgrEventSink;
|
||||
struct list UIElementSink;
|
||||
struct list InputProcessorProfileActivationSink;
|
||||
} ThreadMgr;
|
||||
|
||||
typedef struct tagEnumTfDocumentMgr {
|
||||
|
@ -176,6 +174,8 @@ static void ThreadMgr_Destructor(ThreadMgr *This)
|
|||
free_sinks(&This->PreservedKeyNotifySink);
|
||||
free_sinks(&This->ThreadFocusSink);
|
||||
free_sinks(&This->ThreadMgrEventSink);
|
||||
free_sinks(&This->UIElementSink);
|
||||
free_sinks(&This->InputProcessorProfileActivationSink);
|
||||
|
||||
LIST_FOR_EACH_SAFE(cursor, cursor2, &This->CurrentPreservedKeys)
|
||||
{
|
||||
|
@ -621,6 +621,13 @@ static HRESULT WINAPI ThreadMgrSource_AdviseSink(ITfSource *iface,
|
|||
return advise_sink(&This->ThreadFocusSink, &IID_ITfThreadFocusSink, COOKIE_MAGIC_THREADFOCUSSINK, punk, pdwCookie);
|
||||
}
|
||||
|
||||
if (IsEqualIID(riid, &IID_ITfActiveLanguageProfileNotifySink))
|
||||
{
|
||||
WARN("semi-stub for ITfActiveLanguageProfileNotifySink: sink won't be used.\n");
|
||||
return advise_sink(&This->ActiveLanguageProfileNotifySink, &IID_ITfActiveLanguageProfileNotifySink,
|
||||
COOKIE_MAGIC_ACTIVELANGSINK, punk, pdwCookie);
|
||||
}
|
||||
|
||||
if (IsEqualIID(riid, &IID_ITfKeyTraceEventSink))
|
||||
{
|
||||
WARN("semi-stub for ITfKeyTraceEventSink: sink won't be used.\n");
|
||||
|
@ -628,6 +635,20 @@ static HRESULT WINAPI ThreadMgrSource_AdviseSink(ITfSource *iface,
|
|||
COOKIE_MAGIC_KEYTRACESINK, punk, pdwCookie);
|
||||
}
|
||||
|
||||
if (IsEqualIID(riid, &IID_ITfUIElementSink))
|
||||
{
|
||||
WARN("semi-stub for ITfUIElementSink: sink won't be used.\n");
|
||||
return advise_sink(&This->UIElementSink, &IID_ITfUIElementSink,
|
||||
COOKIE_MAGIC_UIELEMENTSINK, punk, pdwCookie);
|
||||
}
|
||||
|
||||
if (IsEqualIID(riid, &IID_ITfInputProcessorProfileActivationSink))
|
||||
{
|
||||
WARN("semi-stub for ITfInputProcessorProfileActivationSink: sink won't be used.\n");
|
||||
return advise_sink(&This->InputProcessorProfileActivationSink, &IID_ITfInputProcessorProfileActivationSink,
|
||||
COOKIE_MAGIC_INPUTPROCESSORPROFILEACTIVATIONSINK, punk, pdwCookie);
|
||||
}
|
||||
|
||||
FIXME("(%p) Unhandled Sink: %s\n",This,debugstr_guid(riid));
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
@ -641,6 +662,8 @@ static HRESULT WINAPI ThreadMgrSource_UnadviseSink(ITfSource *iface, DWORD pdwCo
|
|||
|
||||
magic = get_Cookie_magic(pdwCookie);
|
||||
if (magic != COOKIE_MAGIC_TMSINK && magic != COOKIE_MAGIC_THREADFOCUSSINK
|
||||
&& magic != COOKIE_MAGIC_KEYTRACESINK && magic != COOKIE_MAGIC_UIELEMENTSINK
|
||||
&& magic != COOKIE_MAGIC_INPUTPROCESSORPROFILEACTIVATIONSINK
|
||||
&& magic != COOKIE_MAGIC_KEYTRACESINK)
|
||||
return E_INVALIDARG;
|
||||
|
||||
|
@ -1358,6 +1381,8 @@ HRESULT ThreadMgr_Constructor(IUnknown *pUnkOuter, IUnknown **ppOut)
|
|||
list_init(&This->PreservedKeyNotifySink);
|
||||
list_init(&This->ThreadFocusSink);
|
||||
list_init(&This->ThreadMgrEventSink);
|
||||
list_init(&This->UIElementSink);
|
||||
list_init(&This->InputProcessorProfileActivationSink);
|
||||
|
||||
TRACE("returning %p\n", This);
|
||||
*ppOut = (IUnknown *)&This->ITfThreadMgrEx_iface;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue