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
4a75c5c6
Commit
4a75c5c6
authored
Aug 28, 2002
by
Michael Stefaniuc
Committed by
Alexandre Julliard
Aug 28, 2002
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Convert HACCEL to a void*.
parent
d8f50798
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
21 additions
and
14 deletions
+21
-14
menu.c
controls/menu.c
+1
-1
ole2.c
dlls/ole32/ole2.c
+3
-2
msg16.c
dlls/user/msg16.c
+1
-1
resource.c
dlls/user/resource.c
+11
-9
user.h
include/user.h
+4
-0
windef.h
include/windef.h
+1
-1
No files found.
controls/menu.c
View file @
4a75c5c6
...
...
@@ -4995,7 +4995,7 @@ INT WINAPI TranslateAccelerator( HWND hWnd, HACCEL hAccel, LPMSG msg )
WARN_
(
accel
)(
"msg null; should hang here to be win compatible
\n
"
);
return
0
;
}
if
(
!
hAccel
||
!
(
lpAccelTbl
=
(
LPACCEL16
)
LockResource16
(
hAccel
)))
if
(
!
hAccel
||
!
(
lpAccelTbl
=
(
LPACCEL16
)
LockResource16
(
HACCEL_16
(
hAccel
)
)))
{
WARN_
(
accel
)(
"invalid accel handle=%x
\n
"
,
hAccel
);
return
0
;
...
...
dlls/ole32/ole2.c
View file @
4a75c5c6
...
...
@@ -48,6 +48,8 @@
WINE_DEFAULT_DEBUG_CHANNEL
(
ole
);
WINE_DECLARE_DEBUG_CHANNEL
(
accel
);
#define HACCEL_16(h32) (LOWORD(h32))
/******************************************************************************
* These are static/global variables and internal data structures that the
* OLE module uses to maintain it's state.
...
...
@@ -1431,7 +1433,7 @@ BOOL WINAPI IsAccelerator(HACCEL hAccel, int cAccelEntries, LPMSG lpMsg, WORD* l
int
i
;
if
(
!
lpMsg
)
return
FALSE
;
if
(
!
hAccel
||
!
(
lpAccelTbl
=
(
LPACCEL16
)
LockResource16
(
hAccel
)))
if
(
!
hAccel
||
!
(
lpAccelTbl
=
(
LPACCEL16
)
LockResource16
(
HACCEL_16
(
hAccel
)
)))
{
WARN_
(
accel
)(
"invalid accel handle=%04x
\n
"
,
hAccel
);
return
FALSE
;
...
...
@@ -2267,4 +2269,3 @@ BOOL WINAPI DllDebugObjectRPCHook(BOOL b, void *dummy)
FIXME
(
"stub
\n
"
);
return
TRUE
;
}
dlls/user/msg16.c
View file @
4a75c5c6
...
...
@@ -449,7 +449,7 @@ INT16 WINAPI TranslateAccelerator16( HWND16 hwnd, HACCEL16 hAccel, LPMSG16 msg )
/* msg32.hwnd not used */
msg32
.
wParam
=
msg
->
wParam
;
msg32
.
lParam
=
msg
->
lParam
;
return
TranslateAccelerator
(
WIN_Handle32
(
hwnd
),
hAccel
,
&
msg32
);
return
TranslateAccelerator
(
WIN_Handle32
(
hwnd
),
HACCEL_32
(
hAccel
)
,
&
msg32
);
}
...
...
dlls/user/resource.c
View file @
4a75c5c6
...
...
@@ -25,6 +25,7 @@
#include "winnls.h"
#include "wine/winbase16.h"
#include "wine/winuser16.h"
#include "user.h"
#include "wine/debug.h"
WINE_DEFAULT_DEBUG_CHANNEL
(
resource
);
...
...
@@ -70,7 +71,8 @@ HACCEL16 WINAPI LoadAccelerators16(HINSTANCE16 instance, LPCSTR lpTableName)
HACCEL
WINAPI
LoadAcceleratorsW
(
HINSTANCE
instance
,
LPCWSTR
lpTableName
)
{
HRSRC
hRsrc
;
HACCEL
hMem
,
hRetval
=
0
;
HACCEL
hMem
;
HACCEL16
hRetval
=
0
;
DWORD
size
;
if
(
HIWORD
(
lpTableName
))
...
...
@@ -103,7 +105,7 @@ HACCEL WINAPI LoadAcceleratorsW(HINSTANCE instance,LPCWSTR lpTableName)
}
}
TRACE_
(
accel
)(
"returning HACCEL 0x%x
\n
"
,
hRsrc
);
return
hRetval
;
return
HACCEL_32
(
hRetval
)
;
}
/***********************************************************************
...
...
@@ -144,7 +146,7 @@ INT WINAPI CopyAcceleratorTableW(HACCEL src, LPACCEL dst,
INT
entries
)
{
int
i
,
xsize
;
LPACCEL16
accel
=
(
LPACCEL16
)
GlobalLock16
(
src
);
LPACCEL16
accel
=
(
LPACCEL16
)
GlobalLock16
(
HACCEL_16
(
src
)
);
BOOL
done
=
FALSE
;
/* Do parameter checking to avoid the explosions and the screaming
...
...
@@ -154,7 +156,7 @@ INT WINAPI CopyAcceleratorTableW(HACCEL src, LPACCEL dst,
(
LPVOID
)
src
,
(
LPVOID
)
dst
,
entries
);
return
0
;
}
xsize
=
GlobalSize16
(
src
)
/
sizeof
(
ACCEL16
);
xsize
=
GlobalSize16
(
HACCEL_16
(
src
)
)
/
sizeof
(
ACCEL16
);
if
(
xsize
>
entries
)
entries
=
xsize
;
i
=
0
;
...
...
@@ -213,7 +215,7 @@ HACCEL WINAPI CreateAcceleratorTableA(LPACCEL lpaccel, INT cEntries)
/* Allocate memory and copy the table. */
hAccel
=
GlobalAlloc16
(
0
,
cEntries
*
sizeof
(
ACCEL16
));
hAccel
=
HACCEL_32
(
GlobalAlloc16
(
0
,
cEntries
*
sizeof
(
ACCEL16
)
));
TRACE_
(
accel
)(
"handle %x
\n
"
,
hAccel
);
if
(
!
hAccel
)
{
...
...
@@ -221,7 +223,7 @@ HACCEL WINAPI CreateAcceleratorTableA(LPACCEL lpaccel, INT cEntries)
SetLastError
(
ERROR_NOT_ENOUGH_MEMORY
);
return
(
HACCEL
)
NULL
;
}
accel
=
GlobalLock16
(
hAccel
);
accel
=
GlobalLock16
(
HACCEL_16
(
hAccel
)
);
for
(
i
=
0
;
i
<
cEntries
;
i
++
)
{
accel
[
i
].
fVirt
=
lpaccel
[
i
].
fVirt
;
accel
[
i
].
key
=
lpaccel
[
i
].
key
;
...
...
@@ -259,7 +261,7 @@ HACCEL WINAPI CreateAcceleratorTableW(LPACCEL lpaccel, INT cEntries)
/* Allocate memory and copy the table. */
hAccel
=
GlobalAlloc16
(
0
,
cEntries
*
sizeof
(
ACCEL16
));
hAccel
=
HACCEL_32
(
GlobalAlloc16
(
0
,
cEntries
*
sizeof
(
ACCEL16
)
));
TRACE_
(
accel
)(
"handle %x
\n
"
,
hAccel
);
if
(
!
hAccel
)
{
...
...
@@ -267,7 +269,7 @@ HACCEL WINAPI CreateAcceleratorTableW(LPACCEL lpaccel, INT cEntries)
SetLastError
(
ERROR_NOT_ENOUGH_MEMORY
);
return
(
HACCEL
)
NULL
;
}
accel
=
GlobalLock16
(
hAccel
);
accel
=
GlobalLock16
(
HACCEL_16
(
hAccel
)
);
for
(
i
=
0
;
i
<
cEntries
;
i
++
)
{
...
...
@@ -303,7 +305,7 @@ HACCEL WINAPI CreateAcceleratorTableW(LPACCEL lpaccel, INT cEntries)
*/
BOOL
WINAPI
DestroyAcceleratorTable
(
HACCEL
handle
)
{
return
!
GlobalFree16
(
handle
);
return
!
GlobalFree16
(
HACCEL_16
(
handle
)
);
}
/**********************************************************************
...
...
include/user.h
View file @
4a75c5c6
...
...
@@ -141,4 +141,8 @@ extern HPEN SYSCOLOR_GetPen( INT index );
extern
DWORD
USER16_AlertableWait
;
/* HANDLE16 <-> HANDLE conversions */
#define HACCEL_32(h16) ((HACCEL)(ULONG_PTR)(h16))
#define HACCEL_16(h32) (LOWORD(h32))
#endif
/* __WINE_USER_H */
include/windef.h
View file @
4a75c5c6
...
...
@@ -71,7 +71,7 @@ typedef DWORD COLORREF, *LPCOLORREF;
/* Handle types that exist both in Win16 and Win32. */
typedef
int
HFILE
;
DECLARE_
OLD_
HANDLE
(
HACCEL
);
DECLARE_HANDLE
(
HACCEL
);
DECLARE_OLD_HANDLE
(
HBITMAP
);
DECLARE_OLD_HANDLE
(
HBRUSH
);
DECLARE_HANDLE
(
HCOLORSPACE
);
...
...
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