Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
c7dc10b1
Commit
c7dc10b1
authored
May 12, 2023
by
Rémi Bernon
Committed by
Alexandre Julliard
May 12, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
win32u: Introduce a new ImeProcessKey call through NtUserMessageCall.
parent
1d368b37
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
73 additions
and
12 deletions
+73
-12
ime.c
dlls/imm32/ime.c
+13
-4
driver.c
dlls/win32u/driver.c
+12
-0
imm.c
dlls/win32u/imm.c
+13
-0
message.c
dlls/win32u/message.c
+3
-0
ntuser_private.h
dlls/win32u/ntuser_private.h
+4
-0
ime.c
dlls/winex11.drv/ime.c
+0
-7
winex11.drv.spec
dlls/winex11.drv/winex11.drv.spec
+0
-1
user.c
dlls/wow64win/user.c
+13
-0
ntuser.h
include/ntuser.h
+14
-0
gdi_driver.h
include/wine/gdi_driver.h
+1
-0
No files found.
dlls/imm32/ime.c
View file @
c7dc10b1
...
...
@@ -439,11 +439,20 @@ BOOL WINAPI ImeSetActiveContext( HIMC himc, BOOL flag )
return
TRUE
;
}
BOOL
WINAPI
ImeProcessKey
(
HIMC
himc
,
UINT
vkey
,
LPARAM
key_data
,
BYTE
*
key_
state
)
BOOL
WINAPI
ImeProcessKey
(
HIMC
himc
,
UINT
vkey
,
LPARAM
lparam
,
BYTE
*
state
)
{
FIXME
(
"himc %p, vkey %u, key_data %#Ix, key_state %p stub!
\n
"
,
himc
,
vkey
,
key_data
,
key_state
);
SetLastError
(
ERROR_CALL_NOT_IMPLEMENTED
);
return
FALSE
;
struct
ime_driver_call_params
params
=
{.
himc
=
himc
,
.
state
=
state
};
INPUTCONTEXT
*
ctx
;
LRESULT
ret
;
TRACE
(
"himc %p, vkey %#x, lparam %#Ix, state %p
\n
"
,
himc
,
vkey
,
lparam
,
state
);
if
(
!
(
ctx
=
ImmLockIMC
(
himc
)))
return
FALSE
;
ret
=
NtUserMessageCall
(
ctx
->
hWnd
,
WINE_IME_PROCESS_KEY
,
vkey
,
lparam
,
&
params
,
NtUserImeDriverCall
,
FALSE
);
ImmUnlockIMC
(
himc
);
return
ret
;
}
UINT
WINAPI
ImeToAsciiEx
(
UINT
vkey
,
UINT
scan_code
,
BYTE
*
key_state
,
TRANSMSGLIST
*
msgs
,
UINT
state
,
HIMC
himc
)
...
...
dlls/win32u/driver.c
View file @
c7dc10b1
...
...
@@ -716,6 +716,11 @@ static SHORT nulldrv_VkKeyScanEx( WCHAR ch, HKL layout )
return
-
256
;
/* use default implementation */
}
static
UINT
nulldrv_ImeProcessKey
(
HIMC
himc
,
UINT
wparam
,
UINT
lparam
,
const
BYTE
*
state
)
{
return
0
;
}
static
void
nulldrv_NotifyIMEStatus
(
HWND
hwnd
,
UINT
status
)
{
}
...
...
@@ -1074,6 +1079,11 @@ static SHORT loaderdrv_VkKeyScanEx( WCHAR ch, HKL layout )
return
load_driver
()
->
pVkKeyScanEx
(
ch
,
layout
);
}
static
UINT
loaderdrv_ImeProcessKey
(
HIMC
himc
,
UINT
wparam
,
UINT
lparam
,
const
BYTE
*
state
)
{
return
load_driver
()
->
pImeProcessKey
(
himc
,
wparam
,
lparam
,
state
);
}
static
void
loaderdrv_NotifyIMEStatus
(
HWND
hwnd
,
UINT
status
)
{
return
load_driver
()
->
pNotifyIMEStatus
(
hwnd
,
status
);
...
...
@@ -1185,6 +1195,7 @@ static const struct user_driver_funcs lazy_load_driver =
loaderdrv_ToUnicodeEx
,
loaderdrv_UnregisterHotKey
,
loaderdrv_VkKeyScanEx
,
loaderdrv_ImeProcessKey
,
loaderdrv_NotifyIMEStatus
,
/* cursor/icon functions */
nulldrv_DestroyCursorIcon
,
...
...
@@ -1265,6 +1276,7 @@ void __wine_set_user_driver( const struct user_driver_funcs *funcs, UINT version
SET_USER_FUNC
(
ToUnicodeEx
);
SET_USER_FUNC
(
UnregisterHotKey
);
SET_USER_FUNC
(
VkKeyScanEx
);
SET_USER_FUNC
(
ImeProcessKey
);
SET_USER_FUNC
(
NotifyIMEStatus
);
SET_USER_FUNC
(
DestroyCursorIcon
);
SET_USER_FUNC
(
SetCursor
);
...
...
dlls/win32u/imm.c
View file @
c7dc10b1
...
...
@@ -421,6 +421,19 @@ NTSTATUS WINAPI NtUserBuildHimcList( UINT thread_id, UINT count, HIMC *buffer, U
return
STATUS_SUCCESS
;
}
LRESULT
ime_driver_call
(
HWND
hwnd
,
enum
wine_ime_call
call
,
WPARAM
wparam
,
LPARAM
lparam
,
struct
ime_driver_call_params
*
params
)
{
switch
(
call
)
{
case
WINE_IME_PROCESS_KEY
:
return
user_driver
->
pImeProcessKey
(
params
->
himc
,
wparam
,
lparam
,
params
->
state
);
default:
ERR
(
"Unknown IME driver call %#x
\n
"
,
call
);
return
0
;
}
}
/*****************************************************************************
* NtUserNotifyIMEStatus (win32u.@)
*/
...
...
dlls/win32u/message.c
View file @
c7dc10b1
...
...
@@ -3522,6 +3522,9 @@ LRESULT WINAPI NtUserMessageCall( HWND hwnd, UINT msg, WPARAM wparam, LPARAM lpa
spy_exit_message
(
ansi
,
hwnd
,
msg
,
(
LPARAM
)
result_info
,
wparam
,
lparam
);
return
0
;
case
NtUserImeDriverCall
:
return
ime_driver_call
(
hwnd
,
msg
,
wparam
,
lparam
,
result_info
);
default:
FIXME
(
"%p %x %lx %lx %p %x %x
\n
"
,
hwnd
,
msg
,
(
long
)
wparam
,
lparam
,
result_info
,
(
int
)
type
,
ansi
);
}
...
...
dlls/win32u/ntuser_private.h
View file @
c7dc10b1
...
...
@@ -229,6 +229,10 @@ BOOL needs_ime_window( HWND hwnd ) DECLSPEC_HIDDEN;
extern
void
register_builtin_classes
(
void
)
DECLSPEC_HIDDEN
;
extern
void
register_desktop_class
(
void
)
DECLSPEC_HIDDEN
;
/* imm.c */
extern
LRESULT
ime_driver_call
(
HWND
hwnd
,
enum
wine_ime_call
call
,
WPARAM
wparam
,
LPARAM
lparam
,
struct
ime_driver_call_params
*
params
)
DECLSPEC_HIDDEN
;
/* cursoricon.c */
HICON
alloc_cursoricon_handle
(
BOOL
is_icon
)
DECLSPEC_HIDDEN
;
...
...
dlls/winex11.drv/ime.c
View file @
c7dc10b1
...
...
@@ -477,13 +477,6 @@ static void IME_AddToSelected(HIMC hIMC)
hSelectedFrom
[
hSelectedCount
-
1
]
=
hIMC
;
}
BOOL
WINAPI
ImeProcessKey
(
HIMC
hIMC
,
UINT
vKey
,
LPARAM
lKeyData
,
const
LPBYTE
lpbKeyState
)
{
/* See the comment at the head of this file */
TRACE
(
"We do no processing via this route
\n
"
);
return
FALSE
;
}
BOOL
WINAPI
ImeSelect
(
HIMC
hIMC
,
BOOL
fSelect
)
{
LPINPUTCONTEXT
lpIMC
;
...
...
dlls/winex11.drv/winex11.drv.spec
View file @
c7dc10b1
...
...
@@ -13,4 +13,3 @@
#IME Interface
@ stdcall ImeSelect(long long)
@ stdcall ImeToAsciiEx(long long ptr ptr long long)
@ stdcall ImeProcessKey(long long long ptr)
dlls/wow64win/user.c
View file @
c7dc10b1
...
...
@@ -3116,6 +3116,19 @@ NTSTATUS WINAPI wow64_NtUserMessageCall( UINT *args )
return
message_call_32to64
(
hwnd
,
msg
,
wparam
,
lparam
,
LongToPtr
(
result32
),
type
,
ansi
);
}
case
NtUserImeDriverCall
:
{
struct
{
ULONG
himc
;
ULONG
state
;
}
*
params32
=
result_info
;
struct
ime_driver_call_params
params
;
params
.
himc
=
UlongToPtr
(
params32
->
himc
);
params
.
state
=
UlongToPtr
(
params32
->
state
);
return
NtUserMessageCall
(
hwnd
,
msg
,
wparam
,
lparam
,
&
params
,
type
,
ansi
);
}
}
return
message_call_32to64
(
hwnd
,
msg
,
wparam
,
lparam
,
result_info
,
type
,
ansi
);
...
...
include/ntuser.h
View file @
c7dc10b1
...
...
@@ -305,6 +305,7 @@ enum
NtUserSpyEnter
=
0x0304
,
NtUserSpyExit
=
0x0305
,
NtUserWinProcResult
=
0x0306
,
NtUserImeDriverCall
=
0x0307
,
};
/* NtUserThunkedMenuItemInfo codes */
...
...
@@ -490,6 +491,19 @@ enum wine_internal_message
#define IME_INTERNAL_HKL_ACTIVATE 0x19
#define IME_INTERNAL_HKL_DEACTIVATE 0x20
/* builtin IME driver calls */
enum
wine_ime_call
{
WINE_IME_PROCESS_KEY
,
};
/* NtUserImeDriverCall params */
struct
ime_driver_call_params
{
HIMC
himc
;
const
BYTE
*
state
;
};
/* internal IME private */
typedef
struct
ime_private
{
...
...
include/wine/gdi_driver.h
View file @
c7dc10b1
...
...
@@ -288,6 +288,7 @@ struct user_driver_funcs
void
(
*
pUnregisterHotKey
)(
HWND
,
UINT
,
UINT
);
SHORT
(
*
pVkKeyScanEx
)(
WCHAR
,
HKL
);
/* IME functions */
UINT
(
*
pImeProcessKey
)(
HIMC
,
UINT
,
UINT
,
const
BYTE
*
);
void
(
*
pNotifyIMEStatus
)(
HWND
,
UINT
);
/* cursor/icon functions */
void
(
*
pDestroyCursorIcon
)(
HCURSOR
);
...
...
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