mirror of
git://source.winehq.org/git/wine.git
synced 2024-09-06 04:11:01 +00:00
win32u: Introduce a new ImeProcessKey call through NtUserMessageCall.
This commit is contained in:
parent
1d368b3789
commit
c7dc10b192
|
@ -439,11 +439,20 @@ BOOL WINAPI ImeSetActiveContext( HIMC himc, BOOL flag )
|
||||||
return TRUE;
|
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 );
|
struct ime_driver_call_params params = {.himc = himc, .state = state};
|
||||||
SetLastError( ERROR_CALL_NOT_IMPLEMENTED );
|
INPUTCONTEXT *ctx;
|
||||||
return FALSE;
|
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, ¶ms,
|
||||||
|
NtUserImeDriverCall, FALSE );
|
||||||
|
ImmUnlockIMC( himc );
|
||||||
|
|
||||||
|
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 scan_code, BYTE *key_state, TRANSMSGLIST *msgs, UINT state, HIMC himc )
|
||||||
|
|
|
@ -716,6 +716,11 @@ static SHORT nulldrv_VkKeyScanEx( WCHAR ch, HKL layout )
|
||||||
return -256; /* use default implementation */
|
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 )
|
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 );
|
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 )
|
static void loaderdrv_NotifyIMEStatus( HWND hwnd, UINT status )
|
||||||
{
|
{
|
||||||
return load_driver()->pNotifyIMEStatus( hwnd, status );
|
return load_driver()->pNotifyIMEStatus( hwnd, status );
|
||||||
|
@ -1185,6 +1195,7 @@ static const struct user_driver_funcs lazy_load_driver =
|
||||||
loaderdrv_ToUnicodeEx,
|
loaderdrv_ToUnicodeEx,
|
||||||
loaderdrv_UnregisterHotKey,
|
loaderdrv_UnregisterHotKey,
|
||||||
loaderdrv_VkKeyScanEx,
|
loaderdrv_VkKeyScanEx,
|
||||||
|
loaderdrv_ImeProcessKey,
|
||||||
loaderdrv_NotifyIMEStatus,
|
loaderdrv_NotifyIMEStatus,
|
||||||
/* cursor/icon functions */
|
/* cursor/icon functions */
|
||||||
nulldrv_DestroyCursorIcon,
|
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(ToUnicodeEx);
|
||||||
SET_USER_FUNC(UnregisterHotKey);
|
SET_USER_FUNC(UnregisterHotKey);
|
||||||
SET_USER_FUNC(VkKeyScanEx);
|
SET_USER_FUNC(VkKeyScanEx);
|
||||||
|
SET_USER_FUNC(ImeProcessKey);
|
||||||
SET_USER_FUNC(NotifyIMEStatus);
|
SET_USER_FUNC(NotifyIMEStatus);
|
||||||
SET_USER_FUNC(DestroyCursorIcon);
|
SET_USER_FUNC(DestroyCursorIcon);
|
||||||
SET_USER_FUNC(SetCursor);
|
SET_USER_FUNC(SetCursor);
|
||||||
|
|
|
@ -421,6 +421,19 @@ NTSTATUS WINAPI NtUserBuildHimcList( UINT thread_id, UINT count, HIMC *buffer, U
|
||||||
return STATUS_SUCCESS;
|
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.@)
|
* NtUserNotifyIMEStatus (win32u.@)
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -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 );
|
spy_exit_message( ansi, hwnd, msg, (LPARAM)result_info, wparam, lparam );
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
|
case NtUserImeDriverCall:
|
||||||
|
return ime_driver_call( hwnd, msg, wparam, lparam, result_info );
|
||||||
|
|
||||||
default:
|
default:
|
||||||
FIXME( "%p %x %lx %lx %p %x %x\n", hwnd, msg, (long)wparam, lparam, result_info, (int)type, ansi );
|
FIXME( "%p %x %lx %lx %p %x %x\n", hwnd, msg, (long)wparam, lparam, result_info, (int)type, ansi );
|
||||||
}
|
}
|
||||||
|
|
|
@ -229,6 +229,10 @@ BOOL needs_ime_window( HWND hwnd ) DECLSPEC_HIDDEN;
|
||||||
extern void register_builtin_classes(void) DECLSPEC_HIDDEN;
|
extern void register_builtin_classes(void) DECLSPEC_HIDDEN;
|
||||||
extern void register_desktop_class(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 */
|
/* cursoricon.c */
|
||||||
HICON alloc_cursoricon_handle( BOOL is_icon ) DECLSPEC_HIDDEN;
|
HICON alloc_cursoricon_handle( BOOL is_icon ) DECLSPEC_HIDDEN;
|
||||||
|
|
||||||
|
|
|
@ -477,13 +477,6 @@ static void IME_AddToSelected(HIMC hIMC)
|
||||||
hSelectedFrom[hSelectedCount-1] = 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)
|
BOOL WINAPI ImeSelect(HIMC hIMC, BOOL fSelect)
|
||||||
{
|
{
|
||||||
LPINPUTCONTEXT lpIMC;
|
LPINPUTCONTEXT lpIMC;
|
||||||
|
|
|
@ -13,4 +13,3 @@
|
||||||
#IME Interface
|
#IME Interface
|
||||||
@ stdcall ImeSelect(long long)
|
@ stdcall ImeSelect(long long)
|
||||||
@ stdcall ImeToAsciiEx(long long ptr ptr long long)
|
@ stdcall ImeToAsciiEx(long long ptr ptr long long)
|
||||||
@ stdcall ImeProcessKey(long long long ptr)
|
|
||||||
|
|
|
@ -3116,6 +3116,19 @@ NTSTATUS WINAPI wow64_NtUserMessageCall( UINT *args )
|
||||||
return message_call_32to64( hwnd, msg, wparam, lparam,
|
return message_call_32to64( hwnd, msg, wparam, lparam,
|
||||||
LongToPtr( result32 ), type, ansi );
|
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, ¶ms, type, ansi );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return message_call_32to64( hwnd, msg, wparam, lparam, result_info, type, ansi );
|
return message_call_32to64( hwnd, msg, wparam, lparam, result_info, type, ansi );
|
||||||
|
|
|
@ -305,6 +305,7 @@ enum
|
||||||
NtUserSpyEnter = 0x0304,
|
NtUserSpyEnter = 0x0304,
|
||||||
NtUserSpyExit = 0x0305,
|
NtUserSpyExit = 0x0305,
|
||||||
NtUserWinProcResult = 0x0306,
|
NtUserWinProcResult = 0x0306,
|
||||||
|
NtUserImeDriverCall = 0x0307,
|
||||||
};
|
};
|
||||||
|
|
||||||
/* NtUserThunkedMenuItemInfo codes */
|
/* NtUserThunkedMenuItemInfo codes */
|
||||||
|
@ -490,6 +491,19 @@ enum wine_internal_message
|
||||||
#define IME_INTERNAL_HKL_ACTIVATE 0x19
|
#define IME_INTERNAL_HKL_ACTIVATE 0x19
|
||||||
#define IME_INTERNAL_HKL_DEACTIVATE 0x20
|
#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 */
|
/* internal IME private */
|
||||||
typedef struct ime_private
|
typedef struct ime_private
|
||||||
{
|
{
|
||||||
|
|
|
@ -288,6 +288,7 @@ struct user_driver_funcs
|
||||||
void (*pUnregisterHotKey)(HWND, UINT, UINT);
|
void (*pUnregisterHotKey)(HWND, UINT, UINT);
|
||||||
SHORT (*pVkKeyScanEx)(WCHAR, HKL);
|
SHORT (*pVkKeyScanEx)(WCHAR, HKL);
|
||||||
/* IME functions */
|
/* IME functions */
|
||||||
|
UINT (*pImeProcessKey)(HIMC,UINT,UINT,const BYTE*);
|
||||||
void (*pNotifyIMEStatus)(HWND,UINT);
|
void (*pNotifyIMEStatus)(HWND,UINT);
|
||||||
/* cursor/icon functions */
|
/* cursor/icon functions */
|
||||||
void (*pDestroyCursorIcon)(HCURSOR);
|
void (*pDestroyCursorIcon)(HCURSOR);
|
||||||
|
|
Loading…
Reference in a new issue