Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
wine
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Johnny Cai
wine
Commits
17c63bba
Commit
17c63bba
authored
21 years ago
by
Alexandre Julliard
Browse files
Options
Downloads
Patches
Plain Diff
Added A<->W mappings for WM_IME_CHAR.
parent
ba2ac133
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
dlls/user/message.c
+53
-25
53 additions, 25 deletions
dlls/user/message.c
windows/winproc.c
+42
-0
42 additions, 0 deletions
windows/winproc.c
with
95 additions
and
25 deletions
dlls/user/message.c
+
53
−
25
View file @
17c63bba
...
...
@@ -187,7 +187,7 @@ static const unsigned int message_unicode_flags[] =
/* 0x260 - 0x27f */
0
,
/* 0x280 - 0x29f */
0
,
SET
(
WM_IME_CHAR
)
,
/* 0x2a0 - 0x2bf */
0
,
/* 0x2c0 - 0x2df */
...
...
@@ -325,18 +325,32 @@ static BOOL CALLBACK broadcast_message_callback( HWND hwnd, LPARAM lparam )
*/
static
WPARAM
map_wparam_AtoW
(
UINT
message
,
WPARAM
wparam
)
{
if
(
message
==
WM_CHARTOITEM
||
message
==
EM_SETPASSWORDCHAR
||
message
==
WM_CHAR
||
message
==
WM_DEADCHAR
||
message
==
WM_SYSCHAR
||
message
==
WM_SYSDEADCHAR
||
message
==
WM_MENUCHAR
)
{
char
ch
=
LOWORD
(
wparam
);
WCHAR
wch
;
MultiByteToWideChar
(
CP_ACP
,
0
,
&
ch
,
1
,
&
wch
,
1
);
wparam
=
MAKEWPARAM
(
wch
,
HIWORD
(
wparam
)
);
switch
(
message
)
{
case
WM_CHARTOITEM
:
case
EM_SETPASSWORDCHAR
:
case
WM_CHAR
:
case
WM_DEADCHAR
:
case
WM_SYSCHAR
:
case
WM_SYSDEADCHAR
:
case
WM_MENUCHAR
:
{
char
ch
=
LOWORD
(
wparam
);
WCHAR
wch
;
MultiByteToWideChar
(
CP_ACP
,
0
,
&
ch
,
1
,
&
wch
,
1
);
wparam
=
MAKEWPARAM
(
wch
,
HIWORD
(
wparam
)
);
}
break
;
case
WM_IME_CHAR
:
{
char
ch
[
2
];
WCHAR
wch
;
ch
[
0
]
=
(
wparam
>>
8
);
ch
[
1
]
=
(
wparam
&
0xff
);
MultiByteToWideChar
(
CP_ACP
,
0
,
ch
,
2
,
&
wch
,
1
);
wparam
=
MAKEWPARAM
(
wch
,
HIWORD
(
wparam
)
);
}
break
;
}
return
wparam
;
}
...
...
@@ -349,18 +363,32 @@ static WPARAM map_wparam_AtoW( UINT message, WPARAM wparam )
*/
static
WPARAM
map_wparam_WtoA
(
UINT
message
,
WPARAM
wparam
)
{
if
(
message
==
WM_CHARTOITEM
||
message
==
EM_SETPASSWORDCHAR
||
message
==
WM_CHAR
||
message
==
WM_DEADCHAR
||
message
==
WM_SYSCHAR
||
message
==
WM_SYSDEADCHAR
||
message
==
WM_MENUCHAR
)
{
WCHAR
wch
=
LOWORD
(
wparam
);
char
ch
;
WideCharToMultiByte
(
CP_ACP
,
0
,
&
wch
,
1
,
&
ch
,
1
,
NULL
,
NULL
);
wparam
=
MAKEWPARAM
(
(
unsigned
char
)
ch
,
HIWORD
(
wparam
)
);
switch
(
message
)
{
case
WM_CHARTOITEM
:
case
EM_SETPASSWORDCHAR
:
case
WM_CHAR
:
case
WM_DEADCHAR
:
case
WM_SYSCHAR
:
case
WM_SYSDEADCHAR
:
case
WM_MENUCHAR
:
{
WCHAR
wch
=
LOWORD
(
wparam
);
BYTE
ch
;
WideCharToMultiByte
(
CP_ACP
,
0
,
&
wch
,
1
,
&
ch
,
1
,
NULL
,
NULL
);
wparam
=
MAKEWPARAM
(
ch
,
HIWORD
(
wparam
)
);
}
break
;
case
WM_IME_CHAR
:
{
WCHAR
wch
=
LOWORD
(
wparam
);
BYTE
ch
[
2
];
ch
[
1
]
=
0
;
WideCharToMultiByte
(
CP_ACP
,
0
,
&
wch
,
1
,
ch
,
2
,
NULL
,
NULL
);
wparam
=
MAKEWPARAM
(
(
ch
[
0
]
<<
8
)
|
ch
[
1
],
HIWORD
(
wparam
)
);
}
break
;
}
return
wparam
;
}
...
...
This diff is collapsed.
Click to expand it.
windows/winproc.c
+
42
−
0
View file @
17c63bba
...
...
@@ -729,6 +729,17 @@ INT WINPROC_MapMsg32ATo32W( HWND hwnd, UINT msg, WPARAM *pwparam, LPARAM *plpara
}
return
0
;
case
WM_IME_CHAR
:
{
BYTE
ch
[
2
];
WCHAR
wch
;
ch
[
0
]
=
(
*
pwparam
>>
8
);
ch
[
1
]
=
*
pwparam
&
0xff
;
MultiByteToWideChar
(
CP_ACP
,
0
,
ch
,
2
,
&
wch
,
1
);
*
pwparam
=
MAKEWPARAM
(
wch
,
HIWORD
(
*
pwparam
)
);
}
return
0
;
case
WM_PAINTCLIPBOARD
:
case
WM_SIZECLIPBOARD
:
FIXME_
(
msg
)(
"message %s (0x%x) needs translation, please report
\n
"
,
SPY_GetMsgName
(
msg
,
hwnd
),
msg
);
...
...
@@ -985,6 +996,17 @@ INT WINPROC_MapMsg32WTo32A( HWND hwnd, UINT msg, WPARAM *pwparam, LPARAM *plpara
}
return
0
;
case
WM_IME_CHAR
:
{
WCHAR
wch
=
LOWORD
(
*
pwparam
);
BYTE
ch
[
2
];
ch
[
1
]
=
0
;
WideCharToMultiByte
(
CP_ACP
,
0
,
&
wch
,
1
,
ch
,
2
,
NULL
,
NULL
);
*
pwparam
=
MAKEWPARAM
(
(
ch
[
0
]
<<
8
)
|
ch
[
1
],
HIWORD
(
*
pwparam
)
);
}
return
0
;
case
WM_PAINTCLIPBOARD
:
case
WM_SIZECLIPBOARD
:
FIXME_
(
msg
)(
"message %s (%04x) needs translation, please report
\n
"
,
SPY_GetMsgName
(
msg
,
hwnd
),
msg
);
...
...
@@ -1648,6 +1670,15 @@ INT WINPROC_MapMsg16To32W( HWND hwnd, UINT16 msg16, WPARAM16 wParam16, UINT *pms
MultiByteToWideChar
(
CP_ACP
,
0
,
&
ch
,
1
,
&
wch
,
1
);
*
pwparam32
=
wch
;
return
0
;
case
WM_IME_CHAR
:
{
char
ch
[
2
];
ch
[
0
]
=
(
wParam16
>>
8
);
ch
[
1
]
=
wParam16
&
0xff
;
MultiByteToWideChar
(
CP_ACP
,
0
,
ch
,
2
,
&
wch
,
1
);
*
pwparam32
=
wch
;
}
return
0
;
default:
/* No Unicode translation needed */
return
WINPROC_MapMsg16To32A
(
hwnd
,
msg16
,
wParam16
,
pmsg32
,
...
...
@@ -2504,6 +2535,17 @@ INT WINPROC_MapMsg32WTo16( HWND hwnd, UINT msg32, WPARAM wParam32,
*
pwparam16
=
ch
;
return
0
;
case
WM_IME_CHAR
:
{
BYTE
ch
[
2
];
wch
=
wParam32
;
ch
[
1
]
=
0
;
WideCharToMultiByte
(
CP_ACP
,
0
,
&
wch
,
1
,
ch
,
2
,
NULL
,
NULL
);
*
pwparam16
=
(
ch
[
0
]
<<
8
)
|
ch
[
1
];
}
return
0
;
default:
/* No Unicode translation needed (?) */
return
WINPROC_MapMsg32ATo16
(
hwnd
,
msg32
,
wParam32
,
pmsg16
,
pwparam16
,
plparam
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment