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
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
Alexey Alyaev
wine
Commits
a4d4c07c
Commit
a4d4c07c
authored
16 years ago
by
Aric Stewart
Committed by
Alexandre Julliard
16 years ago
Browse files
Options
Downloads
Patches
Plain Diff
imm32: Implement W/A handling in ImmEscape.
parent
c58541e2
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
dlls/imm32/imm.c
+38
-8
38 additions, 8 deletions
dlls/imm32/imm.c
with
38 additions
and
8 deletions
dlls/imm32/imm.c
+
38
−
8
View file @
a4d4c07c
...
...
@@ -778,6 +778,16 @@ UINT WINAPI ImmEnumRegisterWordW(
return
0
;
}
static
inline
BOOL
EscapeRequiresWA
(
UINT
uEscape
)
{
if
(
uEscape
==
IME_ESC_GET_EUDC_DICTIONARY
||
uEscape
==
IME_ESC_SET_EUDC_DICTIONARY
||
uEscape
==
IME_ESC_IME_NAME
||
uEscape
==
IME_ESC_GETHELPFILENAME
)
return
TRUE
;
return
FALSE
;
}
/***********************************************************************
* ImmEscapeA (IMM32.@)
*/
...
...
@@ -790,13 +800,23 @@ LRESULT WINAPI ImmEscapeA(
if
(
immHkl
->
hIME
&&
immHkl
->
pImeEscape
)
{
if
(
!
is_kbd_ime_unicode
(
immHkl
))
if
(
!
EscapeRequiresWA
(
uEscape
)
||
!
is_kbd_ime_unicode
(
immHkl
))
return
immHkl
->
pImeEscape
(
hIMC
,
uEscape
,
lpData
);
else
{
FIXME
(
"A procedure called with W ime back end
\n
"
);
SetLastError
(
ERROR_CALL_NOT_IMPLEMENTED
);
return
0
;
WCHAR
buffer
[
81
];
/* largest required buffer should be 80 */
LRESULT
rc
;
if
(
uEscape
==
IME_ESC_SET_EUDC_DICTIONARY
)
{
MultiByteToWideChar
(
CP_ACP
,
0
,(
LPSTR
)
lpData
,
-
1
,
buffer
,
81
);
rc
=
immHkl
->
pImeEscape
(
hIMC
,
uEscape
,
buffer
);
}
else
{
rc
=
immHkl
->
pImeEscape
(
hIMC
,
uEscape
,
buffer
);
WideCharToMultiByte
(
CP_ACP
,
0
,
buffer
,
-
1
,(
LPSTR
)
lpData
,
80
,
NULL
,
NULL
);
}
return
rc
;
}
}
else
...
...
@@ -815,13 +835,23 @@ LRESULT WINAPI ImmEscapeW(
if
(
immHkl
->
hIME
&&
immHkl
->
pImeEscape
)
{
if
(
is_kbd_ime_unicode
(
immHkl
))
if
(
!
EscapeRequiresWA
(
uEscape
)
||
is_kbd_ime_unicode
(
immHkl
))
return
immHkl
->
pImeEscape
(
hIMC
,
uEscape
,
lpData
);
else
{
FIXME
(
"W procedure called with A ime back end
\n
"
);
SetLastError
(
ERROR_CALL_NOT_IMPLEMENTED
);
return
0
;
CHAR
buffer
[
81
];
/* largest required buffer should be 80 */
LRESULT
rc
;
if
(
uEscape
==
IME_ESC_SET_EUDC_DICTIONARY
)
{
WideCharToMultiByte
(
CP_ACP
,
0
,(
LPWSTR
)
lpData
,
-
1
,
buffer
,
81
,
NULL
,
NULL
);
rc
=
immHkl
->
pImeEscape
(
hIMC
,
uEscape
,
buffer
);
}
else
{
rc
=
immHkl
->
pImeEscape
(
hIMC
,
uEscape
,
buffer
);
MultiByteToWideChar
(
CP_ACP
,
0
,
buffer
,
-
1
,(
LPWSTR
)
lpData
,
80
);
}
return
rc
;
}
}
else
...
...
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