Commit bfa19f8c authored by Rémi Bernon's avatar Rémi Bernon Committed by Alexandre Julliard

win32u: Introduce a new ImeToAsciiEx call through NtUserMessageCall.

parent f185dc17
...@@ -455,12 +455,30 @@ BOOL WINAPI ImeProcessKey( HIMC himc, UINT vkey, LPARAM lparam, BYTE *state ) ...@@ -455,12 +455,30 @@ BOOL WINAPI ImeProcessKey( HIMC himc, UINT vkey, LPARAM lparam, BYTE *state )
return ret; return ret;
} }
UINT WINAPI ImeToAsciiEx( UINT vkey, UINT scan_code, BYTE *key_state, TRANSMSGLIST *msgs, UINT state, HIMC himc ) UINT WINAPI ImeToAsciiEx( UINT vkey, UINT vsc, BYTE *state, TRANSMSGLIST *msgs, UINT flags, HIMC himc )
{ {
FIXME( "vkey %u, scan_code %u, key_state %p, msgs %p, state %u, himc %p stub!\n", struct ime_driver_call_params params = {.himc = himc, .state = state};
vkey, scan_code, key_state, msgs, state, himc ); COMPOSITIONSTRING *compstr;
SetLastError( ERROR_CALL_NOT_IMPLEMENTED ); UINT count = 0;
return 0; INPUTCONTEXT *ctx;
NTSTATUS status;
TRACE( "vkey %#x, vsc %#x, state %p, msgs %p, flags %#x, himc %p\n",
vkey, vsc, state, msgs, flags, himc );
if (!(ctx = ImmLockIMC( himc ))) return 0;
if (!(compstr = ImmLockIMCC( ctx->hCompStr ))) goto done;
params.compstr = compstr;
status = NtUserMessageCall( ctx->hWnd, WINE_IME_TO_ASCII_EX, vkey, vsc, &params,
NtUserImeDriverCall, FALSE );
if (status) WARN( "WINE_IME_TO_ASCII_EX returned status %#lx\n", status );
ImmUnlockIMCC( ctx->hCompStr );
done:
ImmUnlockIMC( himc );
return count;
} }
BOOL WINAPI ImeConfigure( HKL hkl, HWND hwnd, DWORD mode, void *data ) BOOL WINAPI ImeConfigure( HKL hkl, HWND hwnd, DWORD mode, void *data )
......
...@@ -721,6 +721,11 @@ static UINT nulldrv_ImeProcessKey( HIMC himc, UINT wparam, UINT lparam, const BY ...@@ -721,6 +721,11 @@ static UINT nulldrv_ImeProcessKey( HIMC himc, UINT wparam, UINT lparam, const BY
return 0; return 0;
} }
static UINT nulldrv_ImeToAsciiEx( UINT vkey, UINT vsc, const BYTE *state, COMPOSITIONSTRING *compstr, HIMC himc )
{
return 0;
}
static void nulldrv_NotifyIMEStatus( HWND hwnd, UINT status ) static void nulldrv_NotifyIMEStatus( HWND hwnd, UINT status )
{ {
} }
...@@ -1084,6 +1089,11 @@ static UINT loaderdrv_ImeProcessKey( HIMC himc, UINT wparam, UINT lparam, const ...@@ -1084,6 +1089,11 @@ static UINT loaderdrv_ImeProcessKey( HIMC himc, UINT wparam, UINT lparam, const
return load_driver()->pImeProcessKey( himc, wparam, lparam, state ); return load_driver()->pImeProcessKey( himc, wparam, lparam, state );
} }
static UINT loaderdrv_ImeToAsciiEx( UINT vkey, UINT vsc, const BYTE *state, COMPOSITIONSTRING *compstr, HIMC himc )
{
return load_driver()->pImeToAsciiEx( vkey, vsc, state, compstr, himc );
}
static void loaderdrv_NotifyIMEStatus( HWND hwnd, UINT status ) static void loaderdrv_NotifyIMEStatus( HWND hwnd, UINT status )
{ {
return load_driver()->pNotifyIMEStatus( hwnd, status ); return load_driver()->pNotifyIMEStatus( hwnd, status );
...@@ -1196,6 +1206,7 @@ static const struct user_driver_funcs lazy_load_driver = ...@@ -1196,6 +1206,7 @@ static const struct user_driver_funcs lazy_load_driver =
loaderdrv_UnregisterHotKey, loaderdrv_UnregisterHotKey,
loaderdrv_VkKeyScanEx, loaderdrv_VkKeyScanEx,
loaderdrv_ImeProcessKey, loaderdrv_ImeProcessKey,
loaderdrv_ImeToAsciiEx,
loaderdrv_NotifyIMEStatus, loaderdrv_NotifyIMEStatus,
/* cursor/icon functions */ /* cursor/icon functions */
nulldrv_DestroyCursorIcon, nulldrv_DestroyCursorIcon,
...@@ -1277,6 +1288,7 @@ void __wine_set_user_driver( const struct user_driver_funcs *funcs, UINT version ...@@ -1277,6 +1288,7 @@ void __wine_set_user_driver( const struct user_driver_funcs *funcs, UINT version
SET_USER_FUNC(UnregisterHotKey); SET_USER_FUNC(UnregisterHotKey);
SET_USER_FUNC(VkKeyScanEx); SET_USER_FUNC(VkKeyScanEx);
SET_USER_FUNC(ImeProcessKey); SET_USER_FUNC(ImeProcessKey);
SET_USER_FUNC(ImeToAsciiEx);
SET_USER_FUNC(NotifyIMEStatus); SET_USER_FUNC(NotifyIMEStatus);
SET_USER_FUNC(DestroyCursorIcon); SET_USER_FUNC(DestroyCursorIcon);
SET_USER_FUNC(SetCursor); SET_USER_FUNC(SetCursor);
......
...@@ -428,6 +428,8 @@ LRESULT ime_driver_call( HWND hwnd, enum wine_ime_call call, WPARAM wparam, LPAR ...@@ -428,6 +428,8 @@ LRESULT ime_driver_call( HWND hwnd, enum wine_ime_call call, WPARAM wparam, LPAR
{ {
case WINE_IME_PROCESS_KEY: case WINE_IME_PROCESS_KEY:
return user_driver->pImeProcessKey( params->himc, wparam, lparam, params->state ); return user_driver->pImeProcessKey( params->himc, wparam, lparam, params->state );
case WINE_IME_TO_ASCII_EX:
return user_driver->pImeToAsciiEx( wparam, lparam, params->state, params->compstr, params->himc );
default: default:
ERR( "Unknown IME driver call %#x\n", call ); ERR( "Unknown IME driver call %#x\n", call );
return 0; return 0;
......
...@@ -514,14 +514,6 @@ BOOL WINAPI ImeSelect(HIMC hIMC, BOOL fSelect) ...@@ -514,14 +514,6 @@ BOOL WINAPI ImeSelect(HIMC hIMC, BOOL fSelect)
return TRUE; return TRUE;
} }
UINT WINAPI ImeToAsciiEx (UINT uVKey, UINT uScanCode, const LPBYTE lpbKeyState,
TRANSMSGLIST *lpdwTransKey, UINT fuState, HIMC hIMC)
{
/* See the comment at the head of this file */
TRACE("We do no processing via this route\n");
return 0;
}
/* Interfaces to XIM and other parts of winex11drv */ /* Interfaces to XIM and other parts of winex11drv */
NTSTATUS x11drv_ime_set_open_status( UINT open ) NTSTATUS x11drv_ime_set_open_status( UINT open )
......
...@@ -12,4 +12,3 @@ ...@@ -12,4 +12,3 @@
#IME Interface #IME Interface
@ stdcall ImeSelect(long long) @ stdcall ImeSelect(long long)
@ stdcall ImeToAsciiEx(long long ptr ptr long long)
...@@ -3123,10 +3123,12 @@ NTSTATUS WINAPI wow64_NtUserMessageCall( UINT *args ) ...@@ -3123,10 +3123,12 @@ NTSTATUS WINAPI wow64_NtUserMessageCall( UINT *args )
{ {
ULONG himc; ULONG himc;
ULONG state; ULONG state;
ULONG compstr;
} *params32 = result_info; } *params32 = result_info;
struct ime_driver_call_params params; struct ime_driver_call_params params;
params.himc = UlongToPtr( params32->himc ); params.himc = UlongToPtr( params32->himc );
params.state = UlongToPtr( params32->state ); params.state = UlongToPtr( params32->state );
params.compstr = UlongToPtr( params32->compstr );
return NtUserMessageCall( hwnd, msg, wparam, lparam, &params, type, ansi ); return NtUserMessageCall( hwnd, msg, wparam, lparam, &params, type, ansi );
} }
} }
......
...@@ -22,6 +22,7 @@ ...@@ -22,6 +22,7 @@
#include <winuser.h> #include <winuser.h>
#include <wingdi.h> #include <wingdi.h>
#include <imm.h> #include <imm.h>
#include <immdev.h>
#include <winternl.h> #include <winternl.h>
/* KernelCallbackTable codes, not compatible with Windows */ /* KernelCallbackTable codes, not compatible with Windows */
...@@ -495,6 +496,7 @@ enum wine_internal_message ...@@ -495,6 +496,7 @@ enum wine_internal_message
enum wine_ime_call enum wine_ime_call
{ {
WINE_IME_PROCESS_KEY, WINE_IME_PROCESS_KEY,
WINE_IME_TO_ASCII_EX,
}; };
/* NtUserImeDriverCall params */ /* NtUserImeDriverCall params */
...@@ -502,6 +504,7 @@ struct ime_driver_call_params ...@@ -502,6 +504,7 @@ struct ime_driver_call_params
{ {
HIMC himc; HIMC himc;
const BYTE *state; const BYTE *state;
COMPOSITIONSTRING *compstr;
}; };
/* internal IME private */ /* internal IME private */
......
...@@ -23,6 +23,7 @@ ...@@ -23,6 +23,7 @@
#include "winternl.h" #include "winternl.h"
#include "ntuser.h" #include "ntuser.h"
#include "immdev.h"
#include "ddk/d3dkmthk.h" #include "ddk/d3dkmthk.h"
#include "wine/list.h" #include "wine/list.h"
...@@ -289,6 +290,7 @@ struct user_driver_funcs ...@@ -289,6 +290,7 @@ struct user_driver_funcs
SHORT (*pVkKeyScanEx)(WCHAR, HKL); SHORT (*pVkKeyScanEx)(WCHAR, HKL);
/* IME functions */ /* IME functions */
UINT (*pImeProcessKey)(HIMC,UINT,UINT,const BYTE*); UINT (*pImeProcessKey)(HIMC,UINT,UINT,const BYTE*);
UINT (*pImeToAsciiEx)(UINT,UINT,const BYTE*,COMPOSITIONSTRING*,HIMC);
void (*pNotifyIMEStatus)(HWND,UINT); void (*pNotifyIMEStatus)(HWND,UINT);
/* cursor/icon functions */ /* cursor/icon functions */
void (*pDestroyCursorIcon)(HCURSOR); void (*pDestroyCursorIcon)(HCURSOR);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment