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
dd67e8b6
Commit
dd67e8b6
authored
May 26, 2006
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
user: Added fast 32->16 mapping for WM_COPYDATA, WM_GETDLGCODE and WM_NEXTMENU.
parent
b00df53d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
43 additions
and
58 deletions
+43
-58
winproc.c
dlls/user/winproc.c
+43
-58
No files found.
dlls/user/winproc.c
View file @
dd67e8b6
...
...
@@ -953,16 +953,6 @@ static INT WINPROC_MapMsg32ATo16( HWND hwnd, UINT msg32, WPARAM wParam32,
case
WM_VSCROLL
:
*
plparam
=
MAKELPARAM
(
HIWORD
(
wParam32
),
(
HWND16
)
*
plparam
);
return
0
;
case
WM_COPYDATA
:
{
PCOPYDATASTRUCT
pcds32
=
(
PCOPYDATASTRUCT
)
*
plparam
;
PCOPYDATASTRUCT16
pcds
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
*
pcds
));
pcds
->
dwData
=
pcds32
->
dwData
;
pcds
->
cbData
=
pcds32
->
cbData
;
pcds
->
lpData
=
MapLS
(
pcds32
->
lpData
);
*
plparam
=
MapLS
(
pcds
);
}
return
1
;
case
WM_CTLCOLORMSGBOX
:
case
WM_CTLCOLOREDIT
:
case
WM_CTLCOLORLISTBOX
:
...
...
@@ -1031,33 +1021,9 @@ static INT WINPROC_MapMsg32ATo16( HWND hwnd, UINT msg32, WPARAM wParam32,
case
WM_DEVMODECHANGE
:
*
plparam
=
MapLS
(
(
LPSTR
)
*
plparam
);
return
1
;
case
WM_GETDLGCODE
:
if
(
*
plparam
)
{
LPMSG
msg32
=
(
LPMSG
)
*
plparam
;
LPMSG16
msg16
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
MSG16
)
);
if
(
!
msg16
)
return
-
1
;
msg16
->
hwnd
=
HWND_16
(
msg32
->
hwnd
);
msg16
->
message
=
msg32
->
message
;
msg16
->
wParam
=
msg32
->
wParam
;
msg16
->
lParam
=
msg32
->
lParam
;
msg16
->
time
=
msg32
->
time
;
msg16
->
pt
.
x
=
msg32
->
pt
.
x
;
msg16
->
pt
.
y
=
msg32
->
pt
.
y
;
*
plparam
=
MapLS
(
msg16
);
return
1
;
}
return
0
;
case
WM_ACTIVATEAPP
:
if
(
*
plparam
)
*
plparam
=
HTASK_16
(
(
HANDLE
)
*
plparam
);
return
0
;
case
WM_NEXTMENU
:
{
MDINEXTMENU
*
next
=
(
MDINEXTMENU
*
)
*
plparam
;
*
plparam
=
(
LPARAM
)
next
->
hmenuIn
;
return
1
;
}
case
WM_PAINT
:
if
(
IsIconic
(
hwnd
)
&&
GetClassLongPtrW
(
hwnd
,
GCLP_HICON
))
{
...
...
@@ -1184,14 +1150,6 @@ static void WINPROC_UnmapMsg32ATo16( HWND hwnd, UINT msg, WPARAM wParam, LPARAM
HeapFree
(
GetProcessHeap
(),
0
,
ptr
);
}
break
;
case
WM_COPYDATA
:
{
PCOPYDATASTRUCT16
pcds
=
MapSL
(
lParam16
);
UnMapLS
(
lParam16
);
UnMapLS
(
pcds
->
lpData
);
HeapFree
(
GetProcessHeap
(),
0
,
pcds
);
}
break
;
case
CB_GETDROPPEDCONTROLRECT
:
case
LB_GETITEMRECT
:
{
...
...
@@ -1242,22 +1200,6 @@ static void WINPROC_UnmapMsg32ATo16( HWND hwnd, UINT msg, WPARAM wParam, LPARAM
case
WM_NOTIFY
:
UnMapLS
(
lParam16
);
break
;
case
WM_GETDLGCODE
:
if
(
lParam16
)
{
LPMSG16
msg16
=
MapSL
(
lParam16
);
UnMapLS
(
lParam16
);
HeapFree
(
GetProcessHeap
(),
0
,
msg16
);
}
break
;
case
WM_NEXTMENU
:
{
MDINEXTMENU
*
next
=
(
MDINEXTMENU
*
)
lParam
;
next
->
hmenuNext
=
HMENU_32
(
LOWORD
(
*
result
)
);
next
->
hwndNext
=
WIN_Handle32
(
HIWORD
(
*
result
)
);
*
result
=
0
;
}
break
;
}
}
...
...
@@ -2301,6 +2243,49 @@ LRESULT WINPROC_CallProc32ATo16( winproc_callback16_t callback, HWND hwnd, UINT
mis32
->
itemHeight
=
mis
.
itemHeight
;
}
break
;
case
WM_COPYDATA
:
{
COPYDATASTRUCT
*
cds32
=
(
COPYDATASTRUCT
*
)
lParam
;
COPYDATASTRUCT16
cds
;
cds
.
dwData
=
cds32
->
dwData
;
cds
.
cbData
=
cds32
->
cbData
;
cds
.
lpData
=
MapLS
(
cds32
->
lpData
);
lParam
=
MapLS
(
&
cds
);
ret
=
callback
(
HWND_16
(
hwnd
),
msg
,
wParam
,
lParam
,
result
,
arg
);
UnMapLS
(
lParam
);
UnMapLS
(
cds
.
lpData
);
}
break
;
case
WM_GETDLGCODE
:
if
(
lParam
)
{
MSG
*
msg32
=
(
MSG
*
)
lParam
;
MSG16
msg16
;
msg16
.
hwnd
=
HWND_16
(
msg32
->
hwnd
);
msg16
.
message
=
msg32
->
message
;
msg16
.
wParam
=
msg32
->
wParam
;
msg16
.
lParam
=
msg32
->
lParam
;
msg16
.
time
=
msg32
->
time
;
msg16
.
pt
.
x
=
msg32
->
pt
.
x
;
msg16
.
pt
.
y
=
msg32
->
pt
.
y
;
lParam
=
MapLS
(
&
msg16
);
ret
=
callback
(
HWND_16
(
hwnd
),
msg
,
wParam
,
lParam
,
result
,
arg
);
UnMapLS
(
lParam
);
}
else
ret
=
callback
(
HWND_16
(
hwnd
),
msg
,
wParam
,
lParam
,
result
,
arg
);
break
;
case
WM_NEXTMENU
:
{
MDINEXTMENU
*
next
=
(
MDINEXTMENU
*
)
lParam
;
ret
=
callback
(
HWND_16
(
hwnd
),
msg
,
wParam
,
(
LPARAM
)
next
->
hmenuIn
,
result
,
arg
);
next
->
hmenuNext
=
HMENU_32
(
LOWORD
(
*
result
)
);
next
->
hwndNext
=
WIN_Handle32
(
HIWORD
(
*
result
)
);
*
result
=
0
;
}
break
;
default:
{
UINT16
msg16
;
...
...
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