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
987387c7
Commit
987387c7
authored
Apr 22, 2009
by
Aric Stewart
Committed by
Alexandre Julliard
Apr 23, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msctf: Add ITfKeystrokeMgr framework to ThreadMgr.
parent
9ae14c8e
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
250 additions
and
0 deletions
+250
-0
threadmgr.c
dlls/msctf/threadmgr.c
+168
-0
msctf.idl
include/msctf.idl
+82
-0
No files found.
dlls/msctf/threadmgr.c
View file @
987387c7
...
...
@@ -59,6 +59,7 @@ typedef struct tagThreadMgrSink {
typedef
struct
tagACLMulti
{
const
ITfThreadMgrVtbl
*
ThreadMgrVtbl
;
const
ITfSourceVtbl
*
SourceVtbl
;
const
ITfKeystrokeMgrVtbl
*
KeystrokeMgrVtbl
;
LONG
refCount
;
const
ITfThreadMgrEventSinkVtbl
*
ThreadMgrEventSinkVtbl
;
/* internal */
...
...
@@ -79,6 +80,11 @@ static inline ThreadMgr *impl_from_ITfSourceVtbl(ITfSource *iface)
return
(
ThreadMgr
*
)((
char
*
)
iface
-
FIELD_OFFSET
(
ThreadMgr
,
SourceVtbl
));
}
static
inline
ThreadMgr
*
impl_from_ITfKeystrokeMgrVtbl
(
ITfKeystrokeMgr
*
iface
)
{
return
(
ThreadMgr
*
)((
char
*
)
iface
-
FIELD_OFFSET
(
ThreadMgr
,
KeystrokeMgrVtbl
));
}
static
inline
ThreadMgr
*
impl_from_ITfThreadMgrEventSink
(
ITfThreadMgrEventSink
*
iface
)
{
return
(
ThreadMgr
*
)((
char
*
)
iface
-
FIELD_OFFSET
(
ThreadMgr
,
ThreadMgrEventSinkVtbl
));
...
...
@@ -153,6 +159,10 @@ static HRESULT WINAPI ThreadMgr_QueryInterface(ITfThreadMgr *iface, REFIID iid,
{
*
ppvOut
=
&
This
->
SourceVtbl
;
}
else
if
(
IsEqualIID
(
iid
,
&
IID_ITfKeystrokeMgr
))
{
*
ppvOut
=
&
This
->
KeystrokeMgrVtbl
;
}
if
(
*
ppvOut
)
{
...
...
@@ -409,6 +419,163 @@ static const ITfSourceVtbl ThreadMgr_SourceVtbl =
};
/*****************************************************
* ITfKeystrokeMgr functions
*****************************************************/
static
HRESULT
WINAPI
KeystrokeMgr_QueryInterface
(
ITfKeystrokeMgr
*
iface
,
REFIID
iid
,
LPVOID
*
ppvOut
)
{
ThreadMgr
*
This
=
impl_from_ITfKeystrokeMgrVtbl
(
iface
);
return
ThreadMgr_QueryInterface
((
ITfThreadMgr
*
)
This
,
iid
,
*
ppvOut
);
}
static
ULONG
WINAPI
KeystrokeMgr_AddRef
(
ITfKeystrokeMgr
*
iface
)
{
ThreadMgr
*
This
=
impl_from_ITfKeystrokeMgrVtbl
(
iface
);
return
ThreadMgr_AddRef
((
ITfThreadMgr
*
)
This
);
}
static
ULONG
WINAPI
KeystrokeMgr_Release
(
ITfKeystrokeMgr
*
iface
)
{
ThreadMgr
*
This
=
impl_from_ITfKeystrokeMgrVtbl
(
iface
);
return
ThreadMgr_Release
((
ITfThreadMgr
*
)
This
);
}
static
HRESULT
WINAPI
KeystrokeMgr_AdviseKeyEventSink
(
ITfKeystrokeMgr
*
iface
,
TfClientId
tid
,
ITfKeyEventSink
*
pSink
,
BOOL
fForeground
)
{
ThreadMgr
*
This
=
impl_from_ITfKeystrokeMgrVtbl
(
iface
);
FIXME
(
"STUB:(%p)
\n
"
,
This
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
KeystrokeMgr_UnadviseKeyEventSink
(
ITfKeystrokeMgr
*
iface
,
TfClientId
tid
)
{
ThreadMgr
*
This
=
impl_from_ITfKeystrokeMgrVtbl
(
iface
);
FIXME
(
"STUB:(%p)
\n
"
,
This
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
KeystrokeMgr_GetForeground
(
ITfKeystrokeMgr
*
iface
,
CLSID
*
pclsid
)
{
ThreadMgr
*
This
=
impl_from_ITfKeystrokeMgrVtbl
(
iface
);
FIXME
(
"STUB:(%p)
\n
"
,
This
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
KeystrokeMgr_TestKeyDown
(
ITfKeystrokeMgr
*
iface
,
WPARAM
wParam
,
LPARAM
lParam
,
BOOL
*
pfEaten
)
{
ThreadMgr
*
This
=
impl_from_ITfKeystrokeMgrVtbl
(
iface
);
FIXME
(
"STUB:(%p)
\n
"
,
This
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
KeystrokeMgr_TestKeyUp
(
ITfKeystrokeMgr
*
iface
,
WPARAM
wParam
,
LPARAM
lParam
,
BOOL
*
pfEaten
)
{
ThreadMgr
*
This
=
impl_from_ITfKeystrokeMgrVtbl
(
iface
);
FIXME
(
"STUB:(%p)
\n
"
,
This
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
KeystrokeMgr_KeyDown
(
ITfKeystrokeMgr
*
iface
,
WPARAM
wParam
,
LPARAM
lParam
,
BOOL
*
pfEaten
)
{
ThreadMgr
*
This
=
impl_from_ITfKeystrokeMgrVtbl
(
iface
);
FIXME
(
"STUB:(%p)
\n
"
,
This
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
KeystrokeMgr_KeyUp
(
ITfKeystrokeMgr
*
iface
,
WPARAM
wParam
,
LPARAM
lParam
,
BOOL
*
pfEaten
)
{
ThreadMgr
*
This
=
impl_from_ITfKeystrokeMgrVtbl
(
iface
);
FIXME
(
"STUB:(%p)
\n
"
,
This
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
KeystrokeMgr_GetPreservedKey
(
ITfKeystrokeMgr
*
iface
,
ITfContext
*
pic
,
const
TF_PRESERVEDKEY
*
pprekey
,
GUID
*
pguid
)
{
ThreadMgr
*
This
=
impl_from_ITfKeystrokeMgrVtbl
(
iface
);
FIXME
(
"STUB:(%p)
\n
"
,
This
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
KeystrokeMgr_IsPreservedKey
(
ITfKeystrokeMgr
*
iface
,
REFGUID
rguid
,
const
TF_PRESERVEDKEY
*
pprekey
,
BOOL
*
pfRegistered
)
{
ThreadMgr
*
This
=
impl_from_ITfKeystrokeMgrVtbl
(
iface
);
FIXME
(
"STUB:(%p)
\n
"
,
This
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
KeystrokeMgr_PreserveKey
(
ITfKeystrokeMgr
*
iface
,
TfClientId
tid
,
REFGUID
rguid
,
const
TF_PRESERVEDKEY
*
prekey
,
const
WCHAR
*
pchDesc
,
ULONG
cchDesc
)
{
ThreadMgr
*
This
=
impl_from_ITfKeystrokeMgrVtbl
(
iface
);
FIXME
(
"STUB:(%p)
\n
"
,
This
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
KeystrokeMgr_UnpreserveKey
(
ITfKeystrokeMgr
*
iface
,
REFGUID
rguid
,
const
TF_PRESERVEDKEY
*
pprekey
)
{
ThreadMgr
*
This
=
impl_from_ITfKeystrokeMgrVtbl
(
iface
);
FIXME
(
"STUB:(%p)
\n
"
,
This
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
KeystrokeMgr_SetPreservedKeyDescription
(
ITfKeystrokeMgr
*
iface
,
REFGUID
rguid
,
const
WCHAR
*
pchDesc
,
ULONG
cchDesc
)
{
ThreadMgr
*
This
=
impl_from_ITfKeystrokeMgrVtbl
(
iface
);
FIXME
(
"STUB:(%p)
\n
"
,
This
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
KeystrokeMgr_GetPreservedKeyDescription
(
ITfKeystrokeMgr
*
iface
,
REFGUID
rguid
,
BSTR
*
pbstrDesc
)
{
ThreadMgr
*
This
=
impl_from_ITfKeystrokeMgrVtbl
(
iface
);
FIXME
(
"STUB:(%p)
\n
"
,
This
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
KeystrokeMgr_SimulatePreservedKey
(
ITfKeystrokeMgr
*
iface
,
ITfContext
*
pic
,
REFGUID
rguid
,
BOOL
*
pfEaten
)
{
ThreadMgr
*
This
=
impl_from_ITfKeystrokeMgrVtbl
(
iface
);
FIXME
(
"STUB:(%p)
\n
"
,
This
);
return
E_NOTIMPL
;
}
static
const
ITfKeystrokeMgrVtbl
ThreadMgr_KeystrokeMgrVtbl
=
{
KeystrokeMgr_QueryInterface
,
KeystrokeMgr_AddRef
,
KeystrokeMgr_Release
,
KeystrokeMgr_AdviseKeyEventSink
,
KeystrokeMgr_UnadviseKeyEventSink
,
KeystrokeMgr_GetForeground
,
KeystrokeMgr_TestKeyDown
,
KeystrokeMgr_TestKeyUp
,
KeystrokeMgr_KeyDown
,
KeystrokeMgr_KeyUp
,
KeystrokeMgr_GetPreservedKey
,
KeystrokeMgr_IsPreservedKey
,
KeystrokeMgr_PreserveKey
,
KeystrokeMgr_UnpreserveKey
,
KeystrokeMgr_SetPreservedKeyDescription
,
KeystrokeMgr_GetPreservedKeyDescription
,
KeystrokeMgr_SimulatePreservedKey
};
/*****************************************************
* ITfThreadMgrEventSink functions (internal)
*****************************************************/
static
HRESULT
WINAPI
ThreadMgrEventSink_QueryInterface
(
ITfThreadMgrEventSink
*
iface
,
REFIID
iid
,
LPVOID
*
ppvOut
)
...
...
@@ -550,6 +717,7 @@ HRESULT ThreadMgr_Constructor(IUnknown *pUnkOuter, IUnknown **ppOut)
This
->
ThreadMgrVtbl
=
&
ThreadMgr_ThreadMgrVtbl
;
This
->
SourceVtbl
=
&
ThreadMgr_SourceVtbl
;
This
->
KeystrokeMgrVtbl
=
&
ThreadMgr_KeystrokeMgrVtbl
;
This
->
ThreadMgrEventSinkVtbl
=
&
ThreadMgr_ThreadMgrEventSinkVtbl
;
This
->
refCount
=
1
;
TlsSetValue
(
tlsIndex
,
This
);
...
...
include/msctf.idl
View file @
987387c7
...
...
@@ -56,6 +56,7 @@ interface ITfRangeBackup;
interface
IEnumTfLanguageProfiles
;
interface
ITfEditRecord
;
interface
ITfCompositionView
;
interface
ITfKeyEventSink
;
typedef
[
uuid
(
e1b5808d
-
1
e46
-
4
c19
-
84
dc
-
68
c5f5978cc8
)
]
struct
TF_LANGUAGEPROFILE
{
...
...
@@ -66,6 +67,12 @@ typedef [uuid(e1b5808d-1e46-4c19-84dc-68c5f5978cc8)] struct TF_LANGUAGEPROFILE
GUID
guidProfile
;
}
TF_LANGUAGEPROFILE
;
typedef
[
uuid
(
77
c12f95
-
b783
-450d-879
f
-
1
cd2362c6521
)
]
struct
TF_PRESERVEDKEY
{
UINT
uVKey
;
UINT
uModifiers
;
}
TF_PRESERVEDKEY
;
[
object
,
uuid
(
aa80e801
-
2021
-
11
d2
-
93
e0
-
0060b067b86
e
),
...
...
@@ -510,3 +517,78 @@ interface ITfThreadMgrEventSink : IUnknown
HRESULT
OnPopContext
(
[
in
]
ITfContext
*
pic
)
;
}
;
[
object
,
local
,
uuid
(
aa80e7f0
-
2021
-
11
d2
-
93
e0
-
0060b067b86
e
),
pointer_default
(
unique
)
]
interface
ITfKeystrokeMgr
:
IUnknown
{
HRESULT
AdviseKeyEventSink
(
[
in
]
TfClientId
tid
,
[
in
]
ITfKeyEventSink
*
pSink
,
[
in
]
BOOL
fForeground
)
;
HRESULT
UnadviseKeyEventSink
(
[
in
]
TfClientId
tid
)
;
HRESULT
GetForeground
(
[
out
]
CLSID
*
pclsid
)
;
HRESULT
TestKeyDown
(
[
in
]
WPARAM
wParam
,
[
in
]
LPARAM
lParam
,
[
out
]
BOOL
*
pfEaten
)
;
HRESULT
TestKeyUp
(
[
in
]
WPARAM
wParam
,
[
in
]
LPARAM
lParam
,
[
out
]
BOOL
*
pfEaten
)
;
HRESULT
KeyDown
(
[
in
]
WPARAM
wParam
,
[
in
]
LPARAM
lParam
,
[
out
]
BOOL
*
pfEaten
)
;
HRESULT
KeyUp
(
[
in
]
WPARAM
wParam
,
[
in
]
LPARAM
lParam
,
[
out
]
BOOL
*
pfEaten
)
;
HRESULT
GetPreservedKey
(
[
in
]
ITfContext
*
pic
,
[
in
]
const
TF_PRESERVEDKEY
*
pprekey
,
[
out
]
GUID
*
pguid
)
;
HRESULT
IsPreservedKey
(
[
in
]
REFGUID
rguid
,
[
in
]
const
TF_PRESERVEDKEY
*
pprekey
,
[
out
]
BOOL
*
pfRegistered
)
;
HRESULT
PreserveKey
(
[
in
]
TfClientId
tid
,
[
in
]
REFGUID
rguid
,
[
in
]
const
TF_PRESERVEDKEY
*
prekey
,
[
in
,
size_is
(
cchDesc
)
]
const
WCHAR
*
pchDesc
,
[
in
]
ULONG
cchDesc
)
;
HRESULT
UnpreserveKey
(
[
in
]
REFGUID
rguid
,
[
in
]
const
TF_PRESERVEDKEY
*
pprekey
)
;
HRESULT
SetPreservedKeyDescription
(
[
in
]
REFGUID
rguid
,
[
in
,
size_is
(
cchDesc
)
]
const
WCHAR
*
pchDesc
,
[
in
]
ULONG
cchDesc
)
;
HRESULT
GetPreservedKeyDescription
(
[
in
]
REFGUID
rguid
,
[
out
]
BSTR
*
pbstrDesc
)
;
HRESULT
SimulatePreservedKey
(
[
in
]
ITfContext
*
pic
,
[
in
]
REFGUID
rguid
,
[
out
]
BOOL
*
pfEaten
)
;
}
;
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