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
1b92fcfa
Commit
1b92fcfa
authored
May 05, 2009
by
Aric Stewart
Committed by
Alexandre Julliard
May 06, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msctf: Implement ITfMessagePump.
parent
8ad9457f
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
125 additions
and
0 deletions
+125
-0
threadmgr.c
dlls/msctf/threadmgr.c
+85
-0
msctf.idl
include/msctf.idl
+40
-0
No files found.
dlls/msctf/threadmgr.c
View file @
1b92fcfa
...
...
@@ -60,6 +60,7 @@ typedef struct tagACLMulti {
const
ITfThreadMgrVtbl
*
ThreadMgrVtbl
;
const
ITfSourceVtbl
*
SourceVtbl
;
const
ITfKeystrokeMgrVtbl
*
KeystrokeMgrVtbl
;
const
ITfMessagePumpVtbl
*
MessagePumpVtbl
;
LONG
refCount
;
const
ITfThreadMgrEventSinkVtbl
*
ThreadMgrEventSinkVtbl
;
/* internal */
...
...
@@ -85,6 +86,11 @@ static inline ThreadMgr *impl_from_ITfKeystrokeMgrVtbl(ITfKeystrokeMgr *iface)
return
(
ThreadMgr
*
)((
char
*
)
iface
-
FIELD_OFFSET
(
ThreadMgr
,
KeystrokeMgrVtbl
));
}
static
inline
ThreadMgr
*
impl_from_ITfMessagePumpVtbl
(
ITfMessagePump
*
iface
)
{
return
(
ThreadMgr
*
)((
char
*
)
iface
-
FIELD_OFFSET
(
ThreadMgr
,
MessagePumpVtbl
));
}
static
inline
ThreadMgr
*
impl_from_ITfThreadMgrEventSink
(
ITfThreadMgrEventSink
*
iface
)
{
return
(
ThreadMgr
*
)((
char
*
)
iface
-
FIELD_OFFSET
(
ThreadMgr
,
ThreadMgrEventSinkVtbl
));
...
...
@@ -163,6 +169,10 @@ static HRESULT WINAPI ThreadMgr_QueryInterface(ITfThreadMgr *iface, REFIID iid,
{
*
ppvOut
=
&
This
->
KeystrokeMgrVtbl
;
}
else
if
(
IsEqualIID
(
iid
,
&
IID_ITfMessagePump
))
{
*
ppvOut
=
&
This
->
MessagePumpVtbl
;
}
if
(
*
ppvOut
)
{
...
...
@@ -576,6 +586,80 @@ static const ITfKeystrokeMgrVtbl ThreadMgr_KeystrokeMgrVtbl =
};
/*****************************************************
* ITfMessagePump functions
*****************************************************/
static
HRESULT
WINAPI
MessagePump_QueryInterface
(
ITfMessagePump
*
iface
,
REFIID
iid
,
LPVOID
*
ppvOut
)
{
ThreadMgr
*
This
=
impl_from_ITfMessagePumpVtbl
(
iface
);
return
ThreadMgr_QueryInterface
((
ITfThreadMgr
*
)
This
,
iid
,
*
ppvOut
);
}
static
ULONG
WINAPI
MessagePump_AddRef
(
ITfMessagePump
*
iface
)
{
ThreadMgr
*
This
=
impl_from_ITfMessagePumpVtbl
(
iface
);
return
ThreadMgr_AddRef
((
ITfThreadMgr
*
)
This
);
}
static
ULONG
WINAPI
MessagePump_Release
(
ITfMessagePump
*
iface
)
{
ThreadMgr
*
This
=
impl_from_ITfMessagePumpVtbl
(
iface
);
return
ThreadMgr_Release
((
ITfThreadMgr
*
)
This
);
}
static
HRESULT
WINAPI
MessagePump_PeekMessageA
(
ITfMessagePump
*
iface
,
LPMSG
pMsg
,
HWND
hwnd
,
UINT
wMsgFilterMin
,
UINT
wMsgFilterMax
,
UINT
wRemoveMsg
,
BOOL
*
pfResult
)
{
if
(
!
pfResult
)
return
E_INVALIDARG
;
*
pfResult
=
PeekMessageA
(
pMsg
,
hwnd
,
wMsgFilterMin
,
wMsgFilterMax
,
wRemoveMsg
);
return
S_OK
;
}
static
HRESULT
WINAPI
MessagePump_GetMessageA
(
ITfMessagePump
*
iface
,
LPMSG
pMsg
,
HWND
hwnd
,
UINT
wMsgFilterMin
,
UINT
wMsgFilterMax
,
BOOL
*
pfResult
)
{
if
(
!
pfResult
)
return
E_INVALIDARG
;
*
pfResult
=
GetMessageA
(
pMsg
,
hwnd
,
wMsgFilterMin
,
wMsgFilterMax
);
return
S_OK
;
}
static
HRESULT
WINAPI
MessagePump_PeekMessageW
(
ITfMessagePump
*
iface
,
LPMSG
pMsg
,
HWND
hwnd
,
UINT
wMsgFilterMin
,
UINT
wMsgFilterMax
,
UINT
wRemoveMsg
,
BOOL
*
pfResult
)
{
if
(
!
pfResult
)
return
E_INVALIDARG
;
*
pfResult
=
PeekMessageW
(
pMsg
,
hwnd
,
wMsgFilterMin
,
wMsgFilterMax
,
wRemoveMsg
);
return
S_OK
;
}
static
HRESULT
WINAPI
MessagePump_GetMessageW
(
ITfMessagePump
*
iface
,
LPMSG
pMsg
,
HWND
hwnd
,
UINT
wMsgFilterMin
,
UINT
wMsgFilterMax
,
BOOL
*
pfResult
)
{
if
(
!
pfResult
)
return
E_INVALIDARG
;
*
pfResult
=
GetMessageW
(
pMsg
,
hwnd
,
wMsgFilterMin
,
wMsgFilterMax
);
return
S_OK
;
}
static
const
ITfMessagePumpVtbl
ThreadMgr_MessagePumpVtbl
=
{
MessagePump_QueryInterface
,
MessagePump_AddRef
,
MessagePump_Release
,
MessagePump_PeekMessageA
,
MessagePump_GetMessageA
,
MessagePump_PeekMessageW
,
MessagePump_GetMessageW
};
/*****************************************************
* ITfThreadMgrEventSink functions (internal)
*****************************************************/
static
HRESULT
WINAPI
ThreadMgrEventSink_QueryInterface
(
ITfThreadMgrEventSink
*
iface
,
REFIID
iid
,
LPVOID
*
ppvOut
)
...
...
@@ -718,6 +802,7 @@ HRESULT ThreadMgr_Constructor(IUnknown *pUnkOuter, IUnknown **ppOut)
This
->
ThreadMgrVtbl
=
&
ThreadMgr_ThreadMgrVtbl
;
This
->
SourceVtbl
=
&
ThreadMgr_SourceVtbl
;
This
->
KeystrokeMgrVtbl
=
&
ThreadMgr_KeystrokeMgrVtbl
;
This
->
MessagePumpVtbl
=
&
ThreadMgr_MessagePumpVtbl
;
This
->
ThreadMgrEventSinkVtbl
=
&
ThreadMgr_ThreadMgrEventSinkVtbl
;
This
->
refCount
=
1
;
TlsSetValue
(
tlsIndex
,
This
);
...
...
include/msctf.idl
View file @
1b92fcfa
...
...
@@ -22,6 +22,7 @@ import "comcat.idl";
import
"textstor.idl"
;
/*
import
"ctfutb.idl"
; */
#
endif
cpp_quote
(
"#include <winuser.h>"
)
cpp_quote
(
"#define TF_E_STACKFULL MAKE_HRESULT(SEVERITY_ERROR, FACILITY_ITF, 0x0501)"
)
cpp_quote
(
"#define TF_E_ALREADY_EXISTS MAKE_HRESULT(SEVERITY_ERROR, FACILITY_ITF, 0x0506)"
)
...
...
@@ -646,3 +647,42 @@ interface ITfKeyEventSink : IUnknown
[
in
]
REFGUID
rguid
,
[
out
]
BOOL
*
pfEaten
)
;
}
;
[
object
,
local
,
uuid
(
8
f1b8ad8
-
0b6b
-
4874
-
90
c5
-
bd76011e8f7c
),
pointer_default
(
unique
)
]
interface
ITfMessagePump
:
IUnknown
{
HRESULT
PeekMessageA
(
[
out
]
LPMSG
pMsg
,
[
in
]
HWND
hwnd
,
[
in
]
UINT
wMsgFilterMin
,
[
in
]
UINT
wMsgFilterMax
,
[
in
]
UINT
wRemoveMsg
,
[
out
]
BOOL
*
pfResult
)
;
HRESULT
GetMessageA
(
[
out
]
LPMSG
pMsg
,
[
in
]
HWND
hwnd
,
[
in
]
UINT
wMsgFilterMin
,
[
in
]
UINT
wMsgFilterMax
,
[
out
]
BOOL
*
pfResult
)
;
HRESULT
PeekMessageW
(
[
out
]
LPMSG
pMsg
,
[
in
]
HWND
hwnd
,
[
in
]
UINT
wMsgFilterMin
,
[
in
]
UINT
wMsgFilterMax
,
[
in
]
UINT
wRemoveMsg
,
[
out
]
BOOL
*
pfResult
)
;
HRESULT
GetMessageW
(
[
out
]
LPMSG
pMsg
,
[
in
]
HWND
hwnd
,
[
in
]
UINT
wMsgFilterMin
,
[
in
]
UINT
wMsgFilterMax
,
[
out
]
BOOL
*
pfResult
)
;
}
;
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