Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
7c1c94c2
Commit
7c1c94c2
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: Added a helper macro for interating sink list.
Signed-off-by:
Jacek Caban
<
jacek@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
a27da35b
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
26 additions
and
20 deletions
+26
-20
msctf_internal.h
dlls/msctf/msctf_internal.h
+6
-0
threadmgr.c
dlls/msctf/threadmgr.c
+20
-20
No files found.
dlls/msctf/msctf_internal.h
View file @
7c1c94c2
...
...
@@ -75,6 +75,12 @@ typedef struct {
}
interfaces
;
}
Sink
;
#define SINK_ENTRY(cursor,type) (LIST_ENTRY(cursor,Sink,entry)->interfaces.p##type)
#define SINK_FOR_EACH(cursor,list,type,elem) \
for ((cursor) = (list)->next, elem = SINK_ENTRY(cursor,type); \
(cursor) != (list); \
(cursor) = (cursor)->next, elem = SINK_ENTRY(cursor,type))
HRESULT
advise_sink
(
struct
list
*
sink_list
,
REFIID
riid
,
DWORD
cookie_magic
,
IUnknown
*
unk
,
DWORD
*
cookie
)
DECLSPEC_HIDDEN
;
HRESULT
unadvise_sink
(
DWORD
cookie
)
DECLSPEC_HIDDEN
;
void
free_sinks
(
struct
list
*
sink_list
)
DECLSPEC_HIDDEN
;
...
...
dlls/msctf/threadmgr.c
View file @
7c1c94c2
...
...
@@ -1079,15 +1079,15 @@ static ULONG WINAPI ThreadMgrEventSink_Release(ITfThreadMgrEventSink *iface)
static
HRESULT
WINAPI
ThreadMgrEventSink_OnInitDocumentMgr
(
ITfThreadMgrEventSink
*
iface
,
ITfDocumentMgr
*
pdim
)
{
struct
list
*
cursor
;
ThreadMgr
*
This
=
impl_from_ITfThreadMgrEventSink
(
iface
);
ITfThreadMgrEventSink
*
sink
;
struct
list
*
cursor
;
TRACE
(
"(%p) %p
\n
"
,
This
,
pdim
);
LIST_FOR_EACH
(
cursor
,
&
This
->
ThreadMgrEventS
ink
)
SINK_FOR_EACH
(
cursor
,
&
This
->
ThreadMgrEventSink
,
ITfThreadMgrEventSink
,
s
ink
)
{
Sink
*
sink
=
LIST_ENTRY
(
cursor
,
Sink
,
entry
);
ITfThreadMgrEventSink_OnInitDocumentMgr
(
sink
->
interfaces
.
pITfThreadMgrEventSink
,
pdim
);
ITfThreadMgrEventSink_OnInitDocumentMgr
(
sink
,
pdim
);
}
return
S_OK
;
...
...
@@ -1096,15 +1096,15 @@ static HRESULT WINAPI ThreadMgrEventSink_OnInitDocumentMgr(
static
HRESULT
WINAPI
ThreadMgrEventSink_OnUninitDocumentMgr
(
ITfThreadMgrEventSink
*
iface
,
ITfDocumentMgr
*
pdim
)
{
struct
list
*
cursor
;
ThreadMgr
*
This
=
impl_from_ITfThreadMgrEventSink
(
iface
);
ITfThreadMgrEventSink
*
sink
;
struct
list
*
cursor
;
TRACE
(
"(%p) %p
\n
"
,
This
,
pdim
);
LIST_FOR_EACH
(
cursor
,
&
This
->
ThreadMgrEventS
ink
)
SINK_FOR_EACH
(
cursor
,
&
This
->
ThreadMgrEventSink
,
ITfThreadMgrEventSink
,
s
ink
)
{
Sink
*
sink
=
LIST_ENTRY
(
cursor
,
Sink
,
entry
);
ITfThreadMgrEventSink_OnUninitDocumentMgr
(
sink
->
interfaces
.
pITfThreadMgrEventSink
,
pdim
);
ITfThreadMgrEventSink_OnUninitDocumentMgr
(
sink
,
pdim
);
}
return
S_OK
;
...
...
@@ -1114,15 +1114,15 @@ static HRESULT WINAPI ThreadMgrEventSink_OnSetFocus(
ITfThreadMgrEventSink
*
iface
,
ITfDocumentMgr
*
pdimFocus
,
ITfDocumentMgr
*
pdimPrevFocus
)
{
struct
list
*
cursor
;
ThreadMgr
*
This
=
impl_from_ITfThreadMgrEventSink
(
iface
);
ITfThreadMgrEventSink
*
sink
;
struct
list
*
cursor
;
TRACE
(
"(%p) %p %p
\n
"
,
This
,
pdimFocus
,
pdimPrevFocus
);
LIST_FOR_EACH
(
cursor
,
&
This
->
ThreadMgrEventS
ink
)
SINK_FOR_EACH
(
cursor
,
&
This
->
ThreadMgrEventSink
,
ITfThreadMgrEventSink
,
s
ink
)
{
Sink
*
sink
=
LIST_ENTRY
(
cursor
,
Sink
,
entry
);
ITfThreadMgrEventSink_OnSetFocus
(
sink
->
interfaces
.
pITfThreadMgrEventSink
,
pdimFocus
,
pdimPrevFocus
);
ITfThreadMgrEventSink_OnSetFocus
(
sink
,
pdimFocus
,
pdimPrevFocus
);
}
return
S_OK
;
...
...
@@ -1131,15 +1131,15 @@ static HRESULT WINAPI ThreadMgrEventSink_OnSetFocus(
static
HRESULT
WINAPI
ThreadMgrEventSink_OnPushContext
(
ITfThreadMgrEventSink
*
iface
,
ITfContext
*
pic
)
{
struct
list
*
cursor
;
ThreadMgr
*
This
=
impl_from_ITfThreadMgrEventSink
(
iface
);
ITfThreadMgrEventSink
*
sink
;
struct
list
*
cursor
;
TRACE
(
"(%p) %p
\n
"
,
This
,
pic
);
LIST_FOR_EACH
(
cursor
,
&
This
->
ThreadMgrEventS
ink
)
SINK_FOR_EACH
(
cursor
,
&
This
->
ThreadMgrEventSink
,
ITfThreadMgrEventSink
,
s
ink
)
{
Sink
*
sink
=
LIST_ENTRY
(
cursor
,
Sink
,
entry
);
ITfThreadMgrEventSink_OnPushContext
(
sink
->
interfaces
.
pITfThreadMgrEventSink
,
pic
);
ITfThreadMgrEventSink_OnPushContext
(
sink
,
pic
);
}
return
S_OK
;
...
...
@@ -1148,15 +1148,15 @@ static HRESULT WINAPI ThreadMgrEventSink_OnPushContext(
static
HRESULT
WINAPI
ThreadMgrEventSink_OnPopContext
(
ITfThreadMgrEventSink
*
iface
,
ITfContext
*
pic
)
{
struct
list
*
cursor
;
ThreadMgr
*
This
=
impl_from_ITfThreadMgrEventSink
(
iface
);
ITfThreadMgrEventSink
*
sink
;
struct
list
*
cursor
;
TRACE
(
"(%p) %p
\n
"
,
This
,
pic
);
LIST_FOR_EACH
(
cursor
,
&
This
->
ThreadMgrEventS
ink
)
SINK_FOR_EACH
(
cursor
,
&
This
->
ThreadMgrEventSink
,
ITfThreadMgrEventSink
,
s
ink
)
{
Sink
*
sink
=
LIST_ENTRY
(
cursor
,
Sink
,
entry
);
ITfThreadMgrEventSink_OnPopContext
(
sink
->
interfaces
.
pITfThreadMgrEventSink
,
pic
);
ITfThreadMgrEventSink_OnPopContext
(
sink
,
pic
);
}
return
S_OK
;
...
...
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