Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
0b912fec
Commit
0b912fec
authored
May 04, 2016
by
Jacek Caban
Committed by
Alexandre Julliard
May 05, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msctf: Use generic sink type for thread manager sinks.
Signed-off-by:
Jacek Caban
<
jacek@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
8f91f740
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
25 additions
and
34 deletions
+25
-34
compartmentmgr.c
dlls/msctf/compartmentmgr.c
+0
-1
context.c
dlls/msctf/context.c
+0
-1
inputprocessor.c
dlls/msctf/inputprocessor.c
+0
-1
msctf.c
dlls/msctf/msctf.c
+0
-1
msctf_internal.h
dlls/msctf/msctf_internal.h
+10
-0
threadmgr.c
dlls/msctf/threadmgr.c
+15
-30
No files found.
dlls/msctf/compartmentmgr.c
View file @
0b912fec
...
...
@@ -36,7 +36,6 @@
#include "olectl.h"
#include "wine/unicode.h"
#include "wine/list.h"
#include "msctf.h"
#include "msctf_internal.h"
...
...
dlls/msctf/context.c
View file @
0b912fec
...
...
@@ -35,7 +35,6 @@
#include "olectl.h"
#include "wine/unicode.h"
#include "wine/list.h"
#include "msctf.h"
#include "msctf_internal.h"
...
...
dlls/msctf/inputprocessor.c
View file @
0b912fec
...
...
@@ -35,7 +35,6 @@
#include "olectl.h"
#include "wine/unicode.h"
#include "wine/list.h"
#include "msctf.h"
#include "msctf_internal.h"
...
...
dlls/msctf/msctf.c
View file @
0b912fec
...
...
@@ -26,7 +26,6 @@
#define COBJMACROS
#include "wine/debug.h"
#include "wine/list.h"
#include "windef.h"
#include "winbase.h"
#include "winreg.h"
...
...
dlls/msctf/msctf_internal.h
View file @
0b912fec
...
...
@@ -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
;
...
...
dlls/msctf/threadmgr.c
View file @
0b912fec
...
...
@@ -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
(
ThreadMgr
Sink
*
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
,
ThreadMgr
Sink
,
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
,
ThreadMgr
Sink
,
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
,
ThreadMgr
Sink
,
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
,
ThreadMgr
Sink
,
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
,
ThreadMgr
Sink
,
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
,
ThreadMgr
Sink
,
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
);
ThreadMgr
Sink
*
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
);
ThreadMgr
Sink
*
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
,
ThreadMgr
Sink
,
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
,
ThreadMgr
Sink
,
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
,
ThreadMgr
Sink
,
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
,
ThreadMgr
Sink
,
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
,
ThreadMgr
Sink
,
entry
);
Sink
*
sink
=
LIST_ENTRY
(
cursor
,
Sink
,
entry
);
ITfThreadMgrEventSink_OnPopContext
(
sink
->
interfaces
.
pITfThreadMgrEventSink
,
pic
);
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment