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
a5006e7e
Commit
a5006e7e
authored
May 20, 2009
by
Aric Stewart
Committed by
Alexandre Julliard
May 21, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msctf: Beginning of TfEditCookie definition and usage.
parent
d82df8f9
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
30 additions
and
4 deletions
+30
-4
context.c
dlls/msctf/context.c
+29
-4
msctf_internal.h
dlls/msctf/msctf_internal.h
+1
-0
No files found.
dlls/msctf/context.c
View file @
a5006e7e
...
...
@@ -69,6 +69,7 @@ typedef struct tagContext {
BOOL
connected
;
TfClientId
tidOwner
;
TfEditCookie
defaultCookie
;
ITextStoreACP
*
pITextStoreACP
;
ITfContextOwnerCompositionSink
*
pITfContextOwnerCompositionSink
;
...
...
@@ -85,6 +86,10 @@ typedef struct tagContext {
}
Context
;
typedef
struct
tagEditCookie
{
DWORD
lockType
;
Context
*
pOwningContext
;
}
EditCookie
;
typedef
struct
tagTextStoreACPSink
{
const
ITextStoreACPSinkVtbl
*
TextStoreACPSinkVtbl
;
...
...
@@ -111,6 +116,7 @@ static void free_sink(ContextSink *sink)
static
void
Context_Destructor
(
Context
*
This
)
{
struct
list
*
cursor
,
*
cursor2
;
EditCookie
*
cookie
;
TRACE
(
"destroying %p
\n
"
,
This
);
if
(
This
->
pITextStoreACPSink
)
...
...
@@ -125,6 +131,13 @@ static void Context_Destructor(Context *This)
if
(
This
->
pITfContextOwnerCompositionSink
)
ITextStoreACPSink_Release
(
This
->
pITfContextOwnerCompositionSink
);
if
(
This
->
defaultCookie
)
{
cookie
=
remove_Cookie
(
This
->
defaultCookie
);
HeapFree
(
GetProcessHeap
(),
0
,
cookie
);
This
->
defaultCookie
=
0
;
}
LIST_FOR_EACH_SAFE
(
cursor
,
cursor2
,
&
This
->
pContextKeyEventSink
)
{
ContextSink
*
sink
=
LIST_ENTRY
(
cursor
,
ContextSink
,
entry
);
...
...
@@ -481,11 +494,19 @@ static const ITfSourceVtbl Context_SourceVtbl =
HRESULT
Context_Constructor
(
TfClientId
tidOwner
,
IUnknown
*
punk
,
ITfContext
**
ppOut
,
TfEditCookie
*
pecTextStore
)
{
Context
*
This
;
EditCookie
*
cookie
;
This
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
sizeof
(
Context
));
if
(
This
==
NULL
)
return
E_OUTOFMEMORY
;
cookie
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
EditCookie
));
if
(
cookie
==
NULL
)
{
HeapFree
(
GetProcessHeap
(),
0
,
This
);
return
E_OUTOFMEMORY
;
}
TRACE
(
"(%p) %x %p %p %p
\n
"
,
This
,
tidOwner
,
punk
,
ppOut
,
pecTextStore
);
This
->
ContextVtbl
=
&
Context_ContextVtbl
;
...
...
@@ -494,6 +515,9 @@ HRESULT Context_Constructor(TfClientId tidOwner, IUnknown *punk, ITfContext **pp
This
->
tidOwner
=
tidOwner
;
This
->
connected
=
FALSE
;
cookie
->
lockType
=
TF_ES_READ
;
cookie
->
pOwningContext
=
This
;
if
(
punk
)
{
IUnknown_QueryInterface
(
punk
,
&
IID_ITextStoreACP
,
...
...
@@ -506,10 +530,8 @@ HRESULT Context_Constructor(TfClientId tidOwner, IUnknown *punk, ITfContext **pp
FIXME
(
"Unhandled pUnk
\n
"
);
}
TRACE
(
"returning %p
\n
"
,
This
);
*
ppOut
=
(
ITfContext
*
)
This
;
/* FIXME */
*
pecTextStore
=
0xdeaddead
;
This
->
defaultCookie
=
generate_Cookie
(
COOKIE_MAGIC_EDITCOOKIE
,
cookie
);
*
pecTextStore
=
This
->
defaultCookie
;
list_init
(
&
This
->
pContextKeyEventSink
);
list_init
(
&
This
->
pEditTransactionSink
);
...
...
@@ -517,6 +539,9 @@ HRESULT Context_Constructor(TfClientId tidOwner, IUnknown *punk, ITfContext **pp
list_init
(
&
This
->
pTextEditSink
);
list_init
(
&
This
->
pTextLayoutSink
);
*
ppOut
=
(
ITfContext
*
)
This
;
TRACE
(
"returning %p
\n
"
,
This
);
return
S_OK
;
}
...
...
dlls/msctf/msctf_internal.h
View file @
a5006e7e
...
...
@@ -25,6 +25,7 @@
#define COOKIE_MAGIC_CONTEXTSINK 0x0020
#define COOKIE_MAGIC_GUIDATOM 0x0030
#define COOKIE_MAGIC_IPPSINK 0x0040
#define COOKIE_MAGIC_EDITCOOKIE 0x0050
extern
DWORD
tlsIndex
;
extern
TfClientId
processId
;
...
...
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