diff --git a/dlls/msctf/compartmentmgr.c b/dlls/msctf/compartmentmgr.c index 81826796d07..c39f194f1cc 100644 --- a/dlls/msctf/compartmentmgr.c +++ b/dlls/msctf/compartmentmgr.c @@ -36,7 +36,6 @@ #include "olectl.h" #include "wine/unicode.h" -#include "wine/list.h" #include "msctf.h" #include "msctf_internal.h" diff --git a/dlls/msctf/context.c b/dlls/msctf/context.c index 5a45466f411..fd23c2ab17f 100644 --- a/dlls/msctf/context.c +++ b/dlls/msctf/context.c @@ -35,7 +35,6 @@ #include "olectl.h" #include "wine/unicode.h" -#include "wine/list.h" #include "msctf.h" #include "msctf_internal.h" diff --git a/dlls/msctf/inputprocessor.c b/dlls/msctf/inputprocessor.c index 01af3259f48..08e51fd4c8a 100644 --- a/dlls/msctf/inputprocessor.c +++ b/dlls/msctf/inputprocessor.c @@ -35,7 +35,6 @@ #include "olectl.h" #include "wine/unicode.h" -#include "wine/list.h" #include "msctf.h" #include "msctf_internal.h" diff --git a/dlls/msctf/msctf.c b/dlls/msctf/msctf.c index a5cfc35b8a3..83eaab9bf72 100644 --- a/dlls/msctf/msctf.c +++ b/dlls/msctf/msctf.c @@ -26,7 +26,6 @@ #define COBJMACROS #include "wine/debug.h" -#include "wine/list.h" #include "windef.h" #include "winbase.h" #include "winreg.h" diff --git a/dlls/msctf/msctf_internal.h b/dlls/msctf/msctf_internal.h index 06244ea71e2..8923c60fdbd 100644 --- a/dlls/msctf/msctf_internal.h +++ b/dlls/msctf/msctf_internal.h @@ -21,6 +21,8 @@ #ifndef __WINE_MSCTF_I_H #define __WINE_MSCTF_I_H +#include "wine/list.h" + #define COOKIE_MAGIC_TMSINK 0x0010 #define COOKIE_MAGIC_CONTEXTSINK 0x0020 #define COOKIE_MAGIC_GUIDATOM 0x0030 @@ -65,6 +67,14 @@ extern CLSID get_textservice_clsid(TfClientId tid) DECLSPEC_HIDDEN; extern HRESULT get_textservice_sink(TfClientId tid, REFCLSID iid, IUnknown** sink) DECLSPEC_HIDDEN; extern HRESULT set_textservice_sink(TfClientId tid, REFCLSID iid, IUnknown* sink) DECLSPEC_HIDDEN; +typedef struct { + struct list entry; + union { + IUnknown *pIUnknown; + ITfThreadMgrEventSink *pITfThreadMgrEventSink; + } interfaces; +} Sink; + extern const WCHAR szwSystemTIPKey[] DECLSPEC_HIDDEN; extern const WCHAR szwSystemCTFKey[] DECLSPEC_HIDDEN; diff --git a/dlls/msctf/threadmgr.c b/dlls/msctf/threadmgr.c index ac4754541e4..44e8c8738c0 100644 --- a/dlls/msctf/threadmgr.c +++ b/dlls/msctf/threadmgr.c @@ -35,27 +35,12 @@ #include "olectl.h" #include "wine/unicode.h" -#include "wine/list.h" #include "msctf.h" #include "msctf_internal.h" WINE_DEFAULT_DEBUG_CHANNEL(msctf); -typedef struct tagThreadMgrSink { - struct list entry; - union { - /* ThreadMgr Sinks */ - IUnknown *pIUnknown; - /* ITfActiveLanguageProfileNotifySink *pITfActiveLanguageProfileNotifySink; */ - /* ITfDisplayAttributeNotifySink *pITfDisplayAttributeNotifySink; */ - /* ITfKeyTraceEventSink *pITfKeyTraceEventSink; */ - /* ITfPreservedKeyNotifySink *pITfPreservedKeyNotifySink; */ - /* ITfThreadFocusSink *pITfThreadFocusSink; */ - ITfThreadMgrEventSink *pITfThreadMgrEventSink; - } interfaces; -} ThreadMgrSink; - typedef struct tagPreservedKey { struct list entry; @@ -172,7 +157,7 @@ static inline EnumTfDocumentMgr *impl_from_IEnumTfDocumentMgrs(IEnumTfDocumentMg return CONTAINING_RECORD(iface, EnumTfDocumentMgr, IEnumTfDocumentMgrs_iface); } -static void free_sink(ThreadMgrSink *sink) +static void free_sink(Sink *sink) { IUnknown_Release(sink->interfaces.pIUnknown); HeapFree(GetProcessHeap(),0,sink); @@ -194,37 +179,37 @@ static void ThreadMgr_Destructor(ThreadMgr *This) /* free sinks */ LIST_FOR_EACH_SAFE(cursor, cursor2, &This->ActiveLanguageProfileNotifySink) { - ThreadMgrSink* sink = LIST_ENTRY(cursor,ThreadMgrSink,entry); + Sink* sink = LIST_ENTRY(cursor,Sink,entry); list_remove(cursor); free_sink(sink); } LIST_FOR_EACH_SAFE(cursor, cursor2, &This->DisplayAttributeNotifySink) { - ThreadMgrSink* sink = LIST_ENTRY(cursor,ThreadMgrSink,entry); + Sink* sink = LIST_ENTRY(cursor,Sink,entry); list_remove(cursor); free_sink(sink); } LIST_FOR_EACH_SAFE(cursor, cursor2, &This->KeyTraceEventSink) { - ThreadMgrSink* sink = LIST_ENTRY(cursor,ThreadMgrSink,entry); + Sink* sink = LIST_ENTRY(cursor,Sink,entry); list_remove(cursor); free_sink(sink); } LIST_FOR_EACH_SAFE(cursor, cursor2, &This->PreservedKeyNotifySink) { - ThreadMgrSink* sink = LIST_ENTRY(cursor,ThreadMgrSink,entry); + Sink* sink = LIST_ENTRY(cursor,Sink,entry); list_remove(cursor); free_sink(sink); } LIST_FOR_EACH_SAFE(cursor, cursor2, &This->ThreadFocusSink) { - ThreadMgrSink* sink = LIST_ENTRY(cursor,ThreadMgrSink,entry); + Sink* sink = LIST_ENTRY(cursor,Sink,entry); list_remove(cursor); free_sink(sink); } LIST_FOR_EACH_SAFE(cursor, cursor2, &This->ThreadMgrEventSink) { - ThreadMgrSink* sink = LIST_ENTRY(cursor,ThreadMgrSink,entry); + Sink* sink = LIST_ENTRY(cursor,Sink,entry); list_remove(cursor); free_sink(sink); } @@ -658,7 +643,7 @@ static HRESULT WINAPI ThreadMgrSource_AdviseSink(ITfSource *iface, REFIID riid, IUnknown *punk, DWORD *pdwCookie) { ThreadMgr *This = impl_from_ITfSource(iface); - ThreadMgrSink *tms; + Sink *tms; TRACE("(%p) %s %p %p\n",This,debugstr_guid(riid),punk,pdwCookie); @@ -667,7 +652,7 @@ static HRESULT WINAPI ThreadMgrSource_AdviseSink(ITfSource *iface, if (IsEqualIID(riid, &IID_ITfThreadMgrEventSink)) { - tms = HeapAlloc(GetProcessHeap(),0,sizeof(ThreadMgrSink)); + tms = HeapAlloc(GetProcessHeap(),0,sizeof(*tms)); if (!tms) return E_OUTOFMEMORY; if (FAILED(IUnknown_QueryInterface(punk, riid, (LPVOID *)&tms->interfaces.pITfThreadMgrEventSink))) @@ -692,7 +677,7 @@ static HRESULT WINAPI ThreadMgrSource_AdviseSink(ITfSource *iface, static HRESULT WINAPI ThreadMgrSource_UnadviseSink(ITfSource *iface, DWORD pdwCookie) { ThreadMgr *This = impl_from_ITfSource(iface); - ThreadMgrSink *sink; + Sink *sink; TRACE("(%p) %x\n",This,pdwCookie); @@ -1164,7 +1149,7 @@ static HRESULT WINAPI ThreadMgrEventSink_OnInitDocumentMgr( LIST_FOR_EACH(cursor, &This->ThreadMgrEventSink) { - ThreadMgrSink* sink = LIST_ENTRY(cursor,ThreadMgrSink,entry); + Sink* sink = LIST_ENTRY(cursor,Sink,entry); ITfThreadMgrEventSink_OnInitDocumentMgr(sink->interfaces.pITfThreadMgrEventSink,pdim); } @@ -1181,7 +1166,7 @@ static HRESULT WINAPI ThreadMgrEventSink_OnUninitDocumentMgr( LIST_FOR_EACH(cursor, &This->ThreadMgrEventSink) { - ThreadMgrSink* sink = LIST_ENTRY(cursor,ThreadMgrSink,entry); + Sink* sink = LIST_ENTRY(cursor,Sink,entry); ITfThreadMgrEventSink_OnUninitDocumentMgr(sink->interfaces.pITfThreadMgrEventSink,pdim); } @@ -1199,7 +1184,7 @@ static HRESULT WINAPI ThreadMgrEventSink_OnSetFocus( LIST_FOR_EACH(cursor, &This->ThreadMgrEventSink) { - ThreadMgrSink* sink = LIST_ENTRY(cursor,ThreadMgrSink,entry); + Sink* sink = LIST_ENTRY(cursor,Sink,entry); ITfThreadMgrEventSink_OnSetFocus(sink->interfaces.pITfThreadMgrEventSink, pdimFocus, pdimPrevFocus); } @@ -1216,7 +1201,7 @@ static HRESULT WINAPI ThreadMgrEventSink_OnPushContext( LIST_FOR_EACH(cursor, &This->ThreadMgrEventSink) { - ThreadMgrSink* sink = LIST_ENTRY(cursor,ThreadMgrSink,entry); + Sink* sink = LIST_ENTRY(cursor,Sink,entry); ITfThreadMgrEventSink_OnPushContext(sink->interfaces.pITfThreadMgrEventSink,pic); } @@ -1233,7 +1218,7 @@ static HRESULT WINAPI ThreadMgrEventSink_OnPopContext( LIST_FOR_EACH(cursor, &This->ThreadMgrEventSink) { - ThreadMgrSink* sink = LIST_ENTRY(cursor,ThreadMgrSink,entry); + Sink* sink = LIST_ENTRY(cursor,Sink,entry); ITfThreadMgrEventSink_OnPopContext(sink->interfaces.pITfThreadMgrEventSink,pic); }