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
f1d7cfa9
Commit
f1d7cfa9
authored
May 06, 2009
by
Aric Stewart
Committed by
Alexandre Julliard
May 07, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msctf: Implement ITfClientId.
parent
f6f2f934
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
103 additions
and
0 deletions
+103
-0
inputprocessor.c
dlls/msctf/tests/inputprocessor.c
+31
-0
threadmgr.c
dlls/msctf/threadmgr.c
+59
-0
msctf.idl
include/msctf.idl
+13
-0
No files found.
dlls/msctf/tests/inputprocessor.c
View file @
f1d7cfa9
...
@@ -648,6 +648,36 @@ static void test_TfGuidAtom(void)
...
@@ -648,6 +648,36 @@ static void test_TfGuidAtom(void)
todo_wine
ok
(
!
IsEqualGUID
(
&
g1
,
&
GUID_NULL
),
"guid should not be NULL
\n
"
);
todo_wine
ok
(
!
IsEqualGUID
(
&
g1
,
&
GUID_NULL
),
"guid should not be NULL
\n
"
);
}
}
static
void
test_ClientId
(
void
)
{
ITfClientId
*
pcid
;
TfClientId
id1
,
id2
;
HRESULT
hr
;
GUID
g2
;
hr
=
ITfThreadMgr_QueryInterface
(
g_tm
,
&
IID_ITfClientId
,
(
LPVOID
*
)
&
pcid
);
ok
(
SUCCEEDED
(
hr
),
"Unable to aquire ITfClientId interface
\n
"
);
CoCreateGuid
(
&
g2
);
hr
=
ITfClientId_GetClientId
(
pcid
,
&
GUID_NULL
,
&
id1
);
ok
(
SUCCEEDED
(
hr
),
"GetClientId failed
\n
"
);
hr
=
ITfClientId_GetClientId
(
pcid
,
&
GUID_NULL
,
&
id2
);
ok
(
SUCCEEDED
(
hr
),
"GetClientId failed
\n
"
);
ok
(
id1
==
id2
,
"Id's for GUID_NULL do not match
\n
"
);
hr
=
ITfClientId_GetClientId
(
pcid
,
&
CLSID_FakeService
,
&
id2
);
ok
(
SUCCEEDED
(
hr
),
"GetClientId failed
\n
"
);
ok
(
id2
!=
id1
,
"Id matches GUID_NULL
\n
"
);
todo_wine
ok
(
id2
==
tid
,
"Id for CLSID_FakeService not matching tid
\n
"
);
ok
(
id2
!=
cid
,
"Id for CLSID_FakeService matching cid
\n
"
);
hr
=
ITfClientId_GetClientId
(
pcid
,
&
g2
,
&
id2
);
ok
(
SUCCEEDED
(
hr
),
"GetClientId failed
\n
"
);
ok
(
id2
!=
id1
,
"Id matches GUID_NULL
\n
"
);
ok
(
id2
!=
tid
,
"Id for random guid matching tid
\n
"
);
ok
(
id2
!=
cid
,
"Id for random guid matching cid
\n
"
);
ITfClientId_Release
(
pcid
);
}
START_TEST
(
inputprocessor
)
START_TEST
(
inputprocessor
)
{
{
if
(
SUCCEEDED
(
initialize
()))
if
(
SUCCEEDED
(
initialize
()))
...
@@ -660,6 +690,7 @@ START_TEST(inputprocessor)
...
@@ -660,6 +690,7 @@ START_TEST(inputprocessor)
test_Activate
();
test_Activate
();
test_startSession
();
test_startSession
();
test_TfGuidAtom
();
test_TfGuidAtom
();
test_ClientId
();
test_KeystrokeMgr
();
test_KeystrokeMgr
();
test_endSession
();
test_endSession
();
test_EnumLanguageProfiles
();
test_EnumLanguageProfiles
();
...
...
dlls/msctf/threadmgr.c
View file @
f1d7cfa9
...
@@ -61,6 +61,7 @@ typedef struct tagACLMulti {
...
@@ -61,6 +61,7 @@ typedef struct tagACLMulti {
const
ITfSourceVtbl
*
SourceVtbl
;
const
ITfSourceVtbl
*
SourceVtbl
;
const
ITfKeystrokeMgrVtbl
*
KeystrokeMgrVtbl
;
const
ITfKeystrokeMgrVtbl
*
KeystrokeMgrVtbl
;
const
ITfMessagePumpVtbl
*
MessagePumpVtbl
;
const
ITfMessagePumpVtbl
*
MessagePumpVtbl
;
const
ITfClientIdVtbl
*
ClientIdVtbl
;
LONG
refCount
;
LONG
refCount
;
const
ITfThreadMgrEventSinkVtbl
*
ThreadMgrEventSinkVtbl
;
/* internal */
const
ITfThreadMgrEventSinkVtbl
*
ThreadMgrEventSinkVtbl
;
/* internal */
...
@@ -91,6 +92,11 @@ static inline ThreadMgr *impl_from_ITfMessagePumpVtbl(ITfMessagePump *iface)
...
@@ -91,6 +92,11 @@ static inline ThreadMgr *impl_from_ITfMessagePumpVtbl(ITfMessagePump *iface)
return
(
ThreadMgr
*
)((
char
*
)
iface
-
FIELD_OFFSET
(
ThreadMgr
,
MessagePumpVtbl
));
return
(
ThreadMgr
*
)((
char
*
)
iface
-
FIELD_OFFSET
(
ThreadMgr
,
MessagePumpVtbl
));
}
}
static
inline
ThreadMgr
*
impl_from_ITfClientIdVtbl
(
ITfClientId
*
iface
)
{
return
(
ThreadMgr
*
)((
char
*
)
iface
-
FIELD_OFFSET
(
ThreadMgr
,
ClientIdVtbl
));
}
static
inline
ThreadMgr
*
impl_from_ITfThreadMgrEventSink
(
ITfThreadMgrEventSink
*
iface
)
static
inline
ThreadMgr
*
impl_from_ITfThreadMgrEventSink
(
ITfThreadMgrEventSink
*
iface
)
{
{
return
(
ThreadMgr
*
)((
char
*
)
iface
-
FIELD_OFFSET
(
ThreadMgr
,
ThreadMgrEventSinkVtbl
));
return
(
ThreadMgr
*
)((
char
*
)
iface
-
FIELD_OFFSET
(
ThreadMgr
,
ThreadMgrEventSinkVtbl
));
...
@@ -173,6 +179,10 @@ static HRESULT WINAPI ThreadMgr_QueryInterface(ITfThreadMgr *iface, REFIID iid,
...
@@ -173,6 +179,10 @@ static HRESULT WINAPI ThreadMgr_QueryInterface(ITfThreadMgr *iface, REFIID iid,
{
{
*
ppvOut
=
&
This
->
MessagePumpVtbl
;
*
ppvOut
=
&
This
->
MessagePumpVtbl
;
}
}
else
if
(
IsEqualIID
(
iid
,
&
IID_ITfClientId
))
{
*
ppvOut
=
&
This
->
ClientIdVtbl
;
}
if
(
*
ppvOut
)
if
(
*
ppvOut
)
{
{
...
@@ -660,6 +670,54 @@ static const ITfMessagePumpVtbl ThreadMgr_MessagePumpVtbl =
...
@@ -660,6 +670,54 @@ static const ITfMessagePumpVtbl ThreadMgr_MessagePumpVtbl =
};
};
/*****************************************************
/*****************************************************
* ITfClientId functions
*****************************************************/
static
HRESULT
WINAPI
ClientId_QueryInterface
(
ITfClientId
*
iface
,
REFIID
iid
,
LPVOID
*
ppvOut
)
{
ThreadMgr
*
This
=
impl_from_ITfClientIdVtbl
(
iface
);
return
ThreadMgr_QueryInterface
((
ITfThreadMgr
*
)
This
,
iid
,
*
ppvOut
);
}
static
ULONG
WINAPI
ClientId_AddRef
(
ITfClientId
*
iface
)
{
ThreadMgr
*
This
=
impl_from_ITfClientIdVtbl
(
iface
);
return
ThreadMgr_AddRef
((
ITfThreadMgr
*
)
This
);
}
static
ULONG
WINAPI
ClientId_Release
(
ITfClientId
*
iface
)
{
ThreadMgr
*
This
=
impl_from_ITfClientIdVtbl
(
iface
);
return
ThreadMgr_Release
((
ITfThreadMgr
*
)
This
);
}
static
HRESULT
WINAPI
ClientId_GetClientId
(
ITfClientId
*
iface
,
REFCLSID
rclsid
,
TfClientId
*
ptid
)
{
HRESULT
hr
;
ITfCategoryMgr
*
catmgr
;
ThreadMgr
*
This
=
impl_from_ITfClientIdVtbl
(
iface
);
TRACE
(
"(%p) %s
\n
"
,
This
,
debugstr_guid
(
rclsid
));
CategoryMgr_Constructor
(
NULL
,(
IUnknown
**
)
&
catmgr
);
hr
=
ITfCategoryMgr_RegisterGUID
(
catmgr
,
rclsid
,
ptid
);
ITfCategoryMgr_Release
(
catmgr
);
return
hr
;
}
static
const
ITfClientIdVtbl
ThreadMgr_ClientIdVtbl
=
{
ClientId_QueryInterface
,
ClientId_AddRef
,
ClientId_Release
,
ClientId_GetClientId
};
/*****************************************************
* ITfThreadMgrEventSink functions (internal)
* ITfThreadMgrEventSink functions (internal)
*****************************************************/
*****************************************************/
static
HRESULT
WINAPI
ThreadMgrEventSink_QueryInterface
(
ITfThreadMgrEventSink
*
iface
,
REFIID
iid
,
LPVOID
*
ppvOut
)
static
HRESULT
WINAPI
ThreadMgrEventSink_QueryInterface
(
ITfThreadMgrEventSink
*
iface
,
REFIID
iid
,
LPVOID
*
ppvOut
)
...
@@ -803,6 +861,7 @@ HRESULT ThreadMgr_Constructor(IUnknown *pUnkOuter, IUnknown **ppOut)
...
@@ -803,6 +861,7 @@ HRESULT ThreadMgr_Constructor(IUnknown *pUnkOuter, IUnknown **ppOut)
This
->
SourceVtbl
=
&
ThreadMgr_SourceVtbl
;
This
->
SourceVtbl
=
&
ThreadMgr_SourceVtbl
;
This
->
KeystrokeMgrVtbl
=
&
ThreadMgr_KeystrokeMgrVtbl
;
This
->
KeystrokeMgrVtbl
=
&
ThreadMgr_KeystrokeMgrVtbl
;
This
->
MessagePumpVtbl
=
&
ThreadMgr_MessagePumpVtbl
;
This
->
MessagePumpVtbl
=
&
ThreadMgr_MessagePumpVtbl
;
This
->
ClientIdVtbl
=
&
ThreadMgr_ClientIdVtbl
;
This
->
ThreadMgrEventSinkVtbl
=
&
ThreadMgr_ThreadMgrEventSinkVtbl
;
This
->
ThreadMgrEventSinkVtbl
=
&
ThreadMgr_ThreadMgrEventSinkVtbl
;
This
->
refCount
=
1
;
This
->
refCount
=
1
;
TlsSetValue
(
tlsIndex
,
This
);
TlsSetValue
(
tlsIndex
,
This
);
...
...
include/msctf.idl
View file @
f1d7cfa9
...
@@ -686,3 +686,16 @@ interface ITfMessagePump : IUnknown
...
@@ -686,3 +686,16 @@ interface ITfMessagePump : IUnknown
[
in
]
UINT
wMsgFilterMax
,
[
in
]
UINT
wMsgFilterMax
,
[
out
]
BOOL
*
pfResult
)
;
[
out
]
BOOL
*
pfResult
)
;
}
;
}
;
[
object
,
local
,
uuid
(
d60a7b49
-
1b9
f
-
4b
e2
-
b702
-
47
e9dc05dec3
),
pointer_default
(
unique
)
]
interface
ITfClientId
:
IUnknown
{
HRESULT
GetClientId
(
[
in
]
REFCLSID
rclsid
,
[
out
]
TfClientId
*
ptid
)
;
}
;
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