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
cc3dcc4a
Commit
cc3dcc4a
authored
Apr 16, 2001
by
Dmitry Timoshkov
Committed by
Alexandre Julliard
Apr 16, 2001
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Implementation of OLE32.IsAccelerator.
parent
973355f6
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
77 additions
and
10 deletions
+77
-10
ole2.c
dlls/ole32/ole2.c
+76
-0
ole2stubs.c
dlls/ole32/ole2stubs.c
+0
-9
ole32.spec
dlls/ole32/ole32.spec
+1
-1
No files found.
dlls/ole32/ole2.c
View file @
cc3dcc4a
...
...
@@ -21,12 +21,14 @@
#include "wine/obj_clientserver.h"
#include "wine/winbase16.h"
#include "wine/wingdi16.h"
#include "wine/winuser16.h"
#include "debugtools.h"
#include "ole2ver.h"
#include "winreg.h"
#include "ole32_main.h"
DEFAULT_DEBUG_CHANNEL
(
ole
);
DECLARE_DEBUG_CHANNEL
(
accel
);
/******************************************************************************
* These are static/global variables and internal data structures that the
...
...
@@ -1396,6 +1398,80 @@ HRESULT WINAPI OleSetMenuDescriptor(
return
S_OK
;
}
/******************************************************************************
* IsAccelerator [OLE32.75]
* Mostly copied from controls/menu.c TranslateAccelerator implementation
*/
BOOL
WINAPI
IsAccelerator
(
HACCEL
hAccel
,
int
cAccelEntries
,
LPMSG
lpMsg
,
WORD
*
lpwCmd
)
{
/* YES, Accel16! */
LPACCEL16
lpAccelTbl
;
int
i
;
if
(
!
lpMsg
)
return
FALSE
;
if
(
!
hAccel
||
!
(
lpAccelTbl
=
(
LPACCEL16
)
LockResource16
(
hAccel
)))
{
WARN_
(
accel
)(
"invalid accel handle=%04x
\n
"
,
hAccel
);
return
FALSE
;
}
if
((
lpMsg
->
message
!=
WM_KEYDOWN
&&
lpMsg
->
message
!=
WM_KEYUP
&&
lpMsg
->
message
!=
WM_SYSKEYDOWN
&&
lpMsg
->
message
!=
WM_SYSKEYUP
&&
lpMsg
->
message
!=
WM_CHAR
))
return
FALSE
;
TRACE_
(
accel
)(
"hAccel=%04x, cAccelEntries=%d,"
"msg->hwnd=%04x, msg->message=%04x, wParam=%08x, lParam=%08lx
\n
"
,
hAccel
,
cAccelEntries
,
lpMsg
->
hwnd
,
lpMsg
->
message
,
lpMsg
->
wParam
,
lpMsg
->
lParam
);
for
(
i
=
0
;
i
<
cAccelEntries
;
i
++
)
{
if
(
lpAccelTbl
[
i
].
key
!=
lpMsg
->
wParam
)
continue
;
if
(
lpMsg
->
message
==
WM_CHAR
)
{
if
(
!
(
lpAccelTbl
[
i
].
fVirt
&
FALT
)
&&
!
(
lpAccelTbl
[
i
].
fVirt
&
FVIRTKEY
))
{
TRACE_
(
accel
)(
"found accel for WM_CHAR: ('%c')
\n
"
,
lpMsg
->
wParam
&
0xff
);
goto
found
;
}
}
else
{
if
(
lpAccelTbl
[
i
].
fVirt
&
FVIRTKEY
)
{
INT
mask
=
0
;
TRACE_
(
accel
)(
"found accel for virt_key %04x (scan %04x)
\n
"
,
lpMsg
->
wParam
,
HIWORD
(
lpMsg
->
lParam
)
&
0xff
);
if
(
GetKeyState
(
VK_SHIFT
)
&
0x8000
)
mask
|=
FSHIFT
;
if
(
GetKeyState
(
VK_CONTROL
)
&
0x8000
)
mask
|=
FCONTROL
;
if
(
GetKeyState
(
VK_MENU
)
&
0x8000
)
mask
|=
FALT
;
if
(
mask
==
(
lpAccelTbl
[
i
].
fVirt
&
(
FSHIFT
|
FCONTROL
|
FALT
)))
goto
found
;
TRACE_
(
accel
)(
"incorrect SHIFT/CTRL/ALT-state
\n
"
);
}
else
{
if
(
!
(
lpMsg
->
lParam
&
0x01000000
))
/* no special_key */
{
if
((
lpAccelTbl
[
i
].
fVirt
&
FALT
)
&&
(
lpMsg
->
lParam
&
0x20000000
))
{
/* ^^ ALT pressed */
TRACE_
(
accel
)(
"found accel for Alt-%c
\n
"
,
lpMsg
->
wParam
&
0xff
);
goto
found
;
}
}
}
}
}
WARN_
(
accel
)(
"couldn't translate accelerator key
\n
"
);
return
FALSE
;
found:
if
(
lpwCmd
)
*
lpwCmd
=
lpAccelTbl
[
i
].
cmd
;
return
TRUE
;
}
/***********************************************************************
* ReleaseStgMedium [OLE32.140]
*/
...
...
dlls/ole32/ole2stubs.c
View file @
cc3dcc4a
...
...
@@ -67,15 +67,6 @@ HRESULT WINAPI CoTreatAsClass(REFCLSID clsidOld, REFCLSID clsidNew)
}
/******************************************************************************
* IsAccelerator [OLE32.75]
*/
BOOL
WINAPI
IsAccelerator
(
HACCEL
hAccel
,
int
cAccelEntries
,
LPMSG
lpMsg
,
WORD
*
lpwCmd
)
{
FIXME
(
"(%x,%i,%p,%p), stub!
\n
"
,
hAccel
,
cAccelEntries
,
lpMsg
,
lpwCmd
);
return
TRUE
;
}
/******************************************************************************
* SetConvertStg [OLE32.142]
*/
HRESULT
WINAPI
SetConvertStg
(
LPSTORAGE
pStg
,
BOOL
fConvert
)
...
...
dlls/ole32/ole32.spec
View file @
cc3dcc4a
...
...
@@ -10,7 +10,7 @@ import rpcrt4.dll
import kernel32.dll
import ntdll.dll
debug_channels (ole relay storage)
debug_channels (
accel
ole relay storage)
1 stub BindMoniker # stdcall (ptr long ptr ptr) return 0,ERR_NOTIMPLEMENTED
2 stdcall CLSIDFromProgID(wstr ptr) CLSIDFromProgID
...
...
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