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
7aa9bd98
Commit
7aa9bd98
authored
Jun 22, 2009
by
Aric Stewart
Committed by
Alexandre Julliard
Jun 22, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msctf: Implement ITfCompartmentEventSink.
parent
3bdfa1cc
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
42 additions
and
3 deletions
+42
-3
compartmentmgr.c
dlls/msctf/compartmentmgr.c
+31
-3
msctf.idl
include/msctf.idl
+11
-0
No files found.
dlls/msctf/compartmentmgr.c
View file @
7aa9bd98
...
...
@@ -72,7 +72,7 @@ typedef struct tagCompartmentSink {
struct
list
entry
;
union
{
IUnknown
*
pIUnknown
;
/* ITfCompartmentEventSink *pITfCompartmentEventSink; */
ITfCompartmentEventSink
*
pITfCompartmentEventSink
;
}
interfaces
;
}
CompartmentSink
;
...
...
@@ -493,6 +493,7 @@ static HRESULT WINAPI Compartment_SetValue(ITfCompartment *iface,
TfClientId
tid
,
const
VARIANT
*
pvarValue
)
{
Compartment
*
This
=
(
Compartment
*
)
iface
;
struct
list
*
cursor
;
TRACE
(
"(%p) %i %p
\n
"
,
This
,
tid
,
pvarValue
);
...
...
@@ -517,6 +518,12 @@ static HRESULT WINAPI Compartment_SetValue(ITfCompartment *iface,
else
if
(
V_VT
(
pvarValue
)
==
VT_UNKNOWN
)
IUnknown_AddRef
(
V_UNKNOWN
(
&
This
->
variant
));
LIST_FOR_EACH
(
cursor
,
&
This
->
CompartmentEventSink
)
{
CompartmentSink
*
sink
=
LIST_ENTRY
(
cursor
,
CompartmentSink
,
entry
);
ITfCompartmentEventSink_OnChange
(
sink
->
interfaces
.
pITfCompartmentEventSink
,
&
This
->
valueData
->
guid
);
}
return
S_OK
;
}
...
...
@@ -570,6 +577,7 @@ static ULONG WINAPI Source_Release(ITfSource *iface)
static
WINAPI
HRESULT
CompartmentSource_AdviseSink
(
ITfSource
*
iface
,
REFIID
riid
,
IUnknown
*
punk
,
DWORD
*
pdwCookie
)
{
CompartmentSink
*
cs
;
Compartment
*
This
=
impl_from_ITfSourceVtbl
(
iface
);
TRACE
(
"(%p) %s %p %p
\n
"
,
This
,
debugstr_guid
(
riid
),
punk
,
pdwCookie
);
...
...
@@ -577,8 +585,28 @@ static WINAPI HRESULT CompartmentSource_AdviseSink(ITfSource *iface,
if
(
!
riid
||
!
punk
||
!
pdwCookie
)
return
E_INVALIDARG
;
FIXME
(
"(%p) Unhandled Sink: %s
\n
"
,
This
,
debugstr_guid
(
riid
));
return
E_NOTIMPL
;
if
(
IsEqualIID
(
riid
,
&
IID_ITfCompartmentEventSink
))
{
cs
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
CompartmentSink
));
if
(
!
cs
)
return
E_OUTOFMEMORY
;
if
(
FAILED
(
IUnknown_QueryInterface
(
punk
,
riid
,
(
LPVOID
*
)
&
cs
->
interfaces
.
pITfCompartmentEventSink
)))
{
HeapFree
(
GetProcessHeap
(),
0
,
cs
);
return
CONNECT_E_CANNOTCONNECT
;
}
list_add_head
(
&
This
->
CompartmentEventSink
,
&
cs
->
entry
);
*
pdwCookie
=
generate_Cookie
(
COOKIE_MAGIC_COMPARTMENTSINK
,
cs
);
}
else
{
FIXME
(
"(%p) Unhandled Sink: %s
\n
"
,
This
,
debugstr_guid
(
riid
));
return
E_NOTIMPL
;
}
TRACE
(
"cookie %x
\n
"
,
*
pdwCookie
);
return
S_OK
;
}
static
WINAPI
HRESULT
CompartmentSource_UnadviseSink
(
ITfSource
*
iface
,
DWORD
pdwCookie
)
...
...
include/msctf.idl
View file @
7aa9bd98
...
...
@@ -938,3 +938,14 @@ interface ITfCompartmentMgr : IUnknown
HRESULT
EnumCompartments
(
[
out
]
IEnumGUID
**
ppEnum
)
;
}
;
[
object
,
uuid
(
743
abd5f
-
f26d
-
48
df
-
8
cc5
-
238492419b64
),
pointer_default
(
unique
)
]
interface
ITfCompartmentEventSink
:
IUnknown
{
HRESULT
OnChange
(
[
in
]
REFGUID
rguid
)
;
}
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