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
a9d4b034
Commit
a9d4b034
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 document manager's AdviseSink and UnadviseSink implementation.
Signed-off-by:
Jacek Caban
<
jacek@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
361f0690
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
27 additions
and
3 deletions
+27
-3
documentmgr.c
dlls/msctf/documentmgr.c
+25
-3
msctf_internal.h
dlls/msctf/msctf_internal.h
+2
-0
No files found.
dlls/msctf/documentmgr.c
View file @
a9d4b034
...
...
@@ -50,6 +50,8 @@ typedef struct tagDocumentMgr {
ITfContext
*
contextStack
[
2
];
/* limit of 2 contexts */
ITfThreadMgrEventSink
*
ThreadMgrSink
;
struct
list
TransitoryExtensionSink
;
}
DocumentMgr
;
typedef
struct
tagEnumTfContext
{
...
...
@@ -89,6 +91,7 @@ static void DocumentMgr_Destructor(DocumentMgr *This)
ITfContext_Release
(
This
->
contextStack
[
0
]);
if
(
This
->
contextStack
[
1
])
ITfContext_Release
(
This
->
contextStack
[
1
]);
free_sinks
(
&
This
->
TransitoryExtensionSink
);
CompartmentMgr_Destructor
(
This
->
CompartmentMgr
);
HeapFree
(
GetProcessHeap
(),
0
,
This
);
}
...
...
@@ -298,15 +301,33 @@ static HRESULT WINAPI DocumentMgrSource_AdviseSink(ITfSource *iface,
REFIID
riid
,
IUnknown
*
punk
,
DWORD
*
pdwCookie
)
{
DocumentMgr
*
This
=
impl_from_ITfSource
(
iface
);
FIXME
(
"STUB:(%p)
\n
"
,
This
);
TRACE
(
"(%p) %s %p %p
\n
"
,
This
,
debugstr_guid
(
riid
),
punk
,
pdwCookie
);
if
(
!
riid
||
!
punk
||
!
pdwCookie
)
return
E_INVALIDARG
;
if
(
IsEqualIID
(
riid
,
&
IID_ITfTransitoryExtensionSink
))
{
WARN
(
"semi-stub for ITfTransitoryExtensionSink: callback won't be used.
\n
"
);
return
advise_sink
(
&
This
->
TransitoryExtensionSink
,
&
IID_ITfTransitoryExtensionSink
,
COOKIE_MAGIC_DMSINK
,
punk
,
pdwCookie
);
}
FIXME
(
"(%p) Unhandled Sink: %s
\n
"
,
This
,
debugstr_guid
(
riid
));
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
DocumentMgrSource_UnadviseSink
(
ITfSource
*
iface
,
DWORD
pdwCookie
)
{
DocumentMgr
*
This
=
impl_from_ITfSource
(
iface
);
FIXME
(
"STUB:(%p)
\n
"
,
This
);
return
E_NOTIMPL
;
TRACE
(
"(%p) %x
\n
"
,
This
,
pdwCookie
);
if
(
get_Cookie_magic
(
pdwCookie
)
!=
COOKIE_MAGIC_DMSINK
)
return
E_INVALIDARG
;
return
unadvise_sink
(
pdwCookie
);
}
static
const
ITfSourceVtbl
DocumentMgrSourceVtbl
=
...
...
@@ -330,6 +351,7 @@ HRESULT DocumentMgr_Constructor(ITfThreadMgrEventSink *ThreadMgrSink, ITfDocumen
This
->
ITfSource_iface
.
lpVtbl
=
&
DocumentMgrSourceVtbl
;
This
->
refCount
=
1
;
This
->
ThreadMgrSink
=
ThreadMgrSink
;
list_init
(
&
This
->
TransitoryExtensionSink
);
CompartmentMgr_Constructor
((
IUnknown
*
)
&
This
->
ITfDocumentMgr_iface
,
&
IID_IUnknown
,
(
IUnknown
**
)
&
This
->
CompartmentMgr
);
...
...
dlls/msctf/msctf_internal.h
View file @
a9d4b034
...
...
@@ -29,6 +29,7 @@
#define COOKIE_MAGIC_IPPSINK 0x0040
#define COOKIE_MAGIC_EDITCOOKIE 0x0050
#define COOKIE_MAGIC_COMPARTMENTSINK 0x0060
#define COOKIE_MAGIC_DMSINK 0x0070
extern
DWORD
tlsIndex
DECLSPEC_HIDDEN
;
extern
TfClientId
processId
DECLSPEC_HIDDEN
;
...
...
@@ -75,6 +76,7 @@ typedef struct {
ITfCompartmentEventSink
*
pITfCompartmentEventSink
;
ITfTextEditSink
*
pITfTextEditSink
;
ITfLanguageProfileNotifySink
*
pITfLanguageProfileNotifySink
;
ITfTransitoryExtensionSink
*
pITfTransitoryExtensionSink
;
}
interfaces
;
}
Sink
;
...
...
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