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
7d4e1336
Commit
7d4e1336
authored
May 15, 2009
by
Aric Stewart
Committed by
Alexandre Julliard
May 18, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msctf: TfContext intitalization and uninitialization on Push and Pop.
parent
f61855ae
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
39 additions
and
7 deletions
+39
-7
context.c
dlls/msctf/context.c
+32
-7
documentmgr.c
dlls/msctf/documentmgr.c
+4
-0
msctf_internal.h
dlls/msctf/msctf_internal.h
+3
-0
No files found.
dlls/msctf/context.c
View file @
7d4e1336
...
...
@@ -66,6 +66,7 @@ typedef struct tagContext {
/* const ITfQueryEmbeddedVtbl *QueryEmbeddedVtbl; */
/* const ITfSourceSingleVtbl *SourceSingleVtbl; */
LONG
refCount
;
BOOL
connected
;
TfClientId
tidOwner
;
...
...
@@ -446,16 +447,12 @@ HRESULT Context_Constructor(TfClientId tidOwner, IUnknown *punk, ITfContext **pp
This
->
SourceVtbl
=
&
Context_SourceVtbl
;
This
->
refCount
=
1
;
This
->
tidOwner
=
tidOwner
;
This
->
connected
=
FALSE
;
if
(
punk
)
{
if
(
SUCCEEDED
(
IUnknown_QueryInterface
(
punk
,
&
IID_ITextStoreACP
,
(
LPVOID
*
)
&
This
->
pITextStoreACP
)))
{
if
(
SUCCEEDED
(
TextStoreACPSink_Constructor
(
&
This
->
pITextStoreACPSink
,
This
)))
ITextStoreACP_AdviseSink
(
This
->
pITextStoreACP
,
&
IID_ITextStoreACPSink
,
(
IUnknown
*
)
This
->
pITextStoreACPSink
,
TS_AS_ALL_SINKS
);
}
IUnknown_QueryInterface
(
punk
,
&
IID_ITextStoreACP
,
(
LPVOID
*
)
&
This
->
pITextStoreACP
);
IUnknown_QueryInterface
(
punk
,
&
IID_ITfContextOwnerCompositionSink
,
(
LPVOID
*
)
&
This
->
pITfContextOwnerCompositionSink
);
...
...
@@ -478,6 +475,34 @@ HRESULT Context_Constructor(TfClientId tidOwner, IUnknown *punk, ITfContext **pp
return
S_OK
;
}
HRESULT
Context_Initialize
(
ITfContext
*
iface
)
{
Context
*
This
=
(
Context
*
)
iface
;
if
(
This
->
pITextStoreACP
)
{
if
(
SUCCEEDED
(
TextStoreACPSink_Constructor
(
&
This
->
pITextStoreACPSink
,
This
)))
ITextStoreACP_AdviseSink
(
This
->
pITextStoreACP
,
&
IID_ITextStoreACPSink
,
(
IUnknown
*
)
This
->
pITextStoreACPSink
,
TS_AS_ALL_SINKS
);
}
This
->
connected
=
TRUE
;
return
S_OK
;
}
HRESULT
Context_Uninitialize
(
ITfContext
*
iface
)
{
Context
*
This
=
(
Context
*
)
iface
;
if
(
This
->
pITextStoreACPSink
)
{
ITextStoreACP_UnadviseSink
(
This
->
pITextStoreACP
,
(
IUnknown
*
)
This
->
pITextStoreACPSink
);
if
(
ITextStoreACPSink_Release
(
This
->
pITextStoreACPSink
)
==
0
)
This
->
pITextStoreACPSink
=
NULL
;
}
This
->
connected
=
FALSE
;
return
S_OK
;
}
/**************************************************************************
* ITextStoreACPSink
**************************************************************************/
...
...
dlls/msctf/documentmgr.c
View file @
7d4e1336
...
...
@@ -138,6 +138,7 @@ static HRESULT WINAPI DocumentMgr_Push(ITfDocumentMgr *iface, ITfContext *pic)
This
->
contextStack
[
0
]
=
check
;
ITfThreadMgrEventSink_OnPushContext
(
This
->
ThreadMgrSink
,
check
);
Context_Initialize
(
check
);
return
S_OK
;
}
...
...
@@ -153,11 +154,13 @@ static HRESULT WINAPI DocumentMgr_Pop(ITfDocumentMgr *iface, DWORD dwFlags)
{
ITfThreadMgrEventSink_OnPopContext
(
This
->
ThreadMgrSink
,
This
->
contextStack
[
0
]);
ITfContext_Release
(
This
->
contextStack
[
0
]);
Context_Uninitialize
(
This
->
contextStack
[
0
]);
}
if
(
This
->
contextStack
[
1
])
{
ITfThreadMgrEventSink_OnPopContext
(
This
->
ThreadMgrSink
,
This
->
contextStack
[
1
]);
ITfContext_Release
(
This
->
contextStack
[
1
]);
Context_Uninitialize
(
This
->
contextStack
[
1
]);
}
This
->
contextStack
[
0
]
=
This
->
contextStack
[
1
]
=
NULL
;
ITfThreadMgrEventSink_OnUninitDocumentMgr
(
This
->
ThreadMgrSink
,
iface
);
...
...
@@ -172,6 +175,7 @@ static HRESULT WINAPI DocumentMgr_Pop(ITfDocumentMgr *iface, DWORD dwFlags)
ITfThreadMgrEventSink_OnPopContext
(
This
->
ThreadMgrSink
,
This
->
contextStack
[
0
]);
ITfContext_Release
(
This
->
contextStack
[
0
]);
Context_Uninitialize
(
This
->
contextStack
[
0
]);
This
->
contextStack
[
0
]
=
This
->
contextStack
[
1
];
This
->
contextStack
[
1
]
=
NULL
;
...
...
dlls/msctf/msctf_internal.h
View file @
7d4e1336
...
...
@@ -35,6 +35,9 @@ extern HRESULT Context_Constructor(TfClientId tidOwner, IUnknown *punk, ITfConte
extern
HRESULT
InputProcessorProfiles_Constructor
(
IUnknown
*
pUnkOuter
,
IUnknown
**
ppOut
);
extern
HRESULT
CategoryMgr_Constructor
(
IUnknown
*
pUnkOuter
,
IUnknown
**
ppOut
);
extern
HRESULT
Context_Initialize
(
ITfContext
*
cxt
);
extern
HRESULT
Context_Uninitialize
(
ITfContext
*
cxt
);
/* cookie function */
extern
DWORD
generate_Cookie
(
DWORD
magic
,
LPVOID
data
);
extern
DWORD
get_Cookie_magic
(
DWORD
id
);
...
...
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