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

winemac: Use the ImeToAsciiEx driver entry to retrieve IME result.

parent bfa19f8c
......@@ -205,10 +205,12 @@ static void macdrv_sent_text_input(const macdrv_event *event)
/***********************************************************************
* macdrv_ime_get_text_input
* ImeToAsciiEx (MACDRV.@)
*/
NTSTATUS macdrv_ime_get_text_input(void *arg)
UINT macdrv_ImeToAsciiEx(UINT vkey, UINT vsc, const BYTE *state, COMPOSITIONSTRING *compstr, HIMC himc)
{
TRACE_(imm)("vkey %#x, vsc %#x, state %p, compstr %p, himc %p\n", vkey, vsc, state, compstr, himc);
if (ime_update.result_params)
{
macdrv_client_func(client_func_ime_set_text, ime_update.result_params, ime_update.result_size);
......
......@@ -303,6 +303,7 @@ static const struct user_driver_funcs macdrv_funcs =
.pUpdateLayeredWindow = macdrv_UpdateLayeredWindow,
.pVkKeyScanEx = macdrv_VkKeyScanEx,
.pImeProcessKey = macdrv_ImeProcessKey,
.pImeToAsciiEx = macdrv_ImeToAsciiEx,
.pNotifyIMEStatus = macdrv_NotifyIMEStatus,
.pWindowMessage = macdrv_WindowMessage,
.pWindowPosChanged = macdrv_WindowPosChanged,
......
......@@ -483,26 +483,6 @@ static void IME_AddToSelected(HIMC hIMC)
hSelectedFrom[hSelectedCount - 1] = hIMC;
}
static void UpdateDataInDefaultIMEWindow(INPUTCONTEXT *lpIMC, HWND hwnd, BOOL showable)
{
LPCOMPOSITIONSTRING compstr;
if (lpIMC->hCompStr)
compstr = ImmLockIMCC(lpIMC->hCompStr);
else
compstr = NULL;
if (compstr == NULL || compstr->dwCompStrLen == 0)
ShowWindow(hwnd, SW_HIDE);
else if (showable)
ShowWindow(hwnd, SW_SHOWNOACTIVATE);
RedrawWindow(hwnd, NULL, NULL, RDW_ERASENOW | RDW_INVALIDATE);
if (compstr != NULL)
ImmUnlockIMCC(lpIMC->hCompStr);
}
BOOL WINAPI ImeSelect(HIMC hIMC, BOOL fSelect)
{
LPINPUTCONTEXT lpIMC;
......@@ -544,25 +524,6 @@ BOOL WINAPI ImeSelect(HIMC hIMC, BOOL fSelect)
return TRUE;
}
UINT WINAPI ImeToAsciiEx(UINT uVKey, UINT uScanCode, const LPBYTE lpbKeyState,
TRANSMSGLIST *lpdwTransKey, UINT fuState, HIMC hIMC)
{
LPINPUTCONTEXT lpIMC;
TRACE("uVKey 0x%04x uScanCode 0x%04x fuState %u hIMC %p\n", uVKey, uScanCode, fuState, hIMC);
/* trigger the pending client_func_ime_set_text call */
MACDRV_CALL(ime_get_text_input, NULL);
if ((lpIMC = LockRealIMC(hIMC)))
{
HWND hwnd = input_context_get_ui_hwnd( lpIMC );
UpdateDataInDefaultIMEWindow( lpIMC, hwnd, FALSE );
UnlockRealIMC(hIMC);
}
return 0;
}
static BOOL IME_SetCompositionString(void* hIMC, DWORD dwIndex, LPCVOID lpComp, DWORD dwCompLen, DWORD cursor_pos, BOOL cursor_valid)
{
LPINPUTCONTEXT lpIMC;
......
......@@ -163,6 +163,7 @@ extern BOOL macdrv_RegisterHotKey(HWND hwnd, UINT mod_flags, UINT vkey) DECLSPEC
extern void macdrv_UnregisterHotKey(HWND hwnd, UINT modifiers, UINT vkey) DECLSPEC_HIDDEN;
extern SHORT macdrv_VkKeyScanEx(WCHAR wChar, HKL hkl) DECLSPEC_HIDDEN;
extern UINT macdrv_ImeProcessKey(HIMC himc, UINT wparam, UINT lparam, const BYTE *state) DECLSPEC_HIDDEN;
extern UINT macdrv_ImeToAsciiEx(UINT vkey, UINT vsc, const BYTE *state, COMPOSITIONSTRING *compstr, HIMC himc) DECLSPEC_HIDDEN;
extern UINT macdrv_MapVirtualKeyEx(UINT wCode, UINT wMapType, HKL hkl) DECLSPEC_HIDDEN;
extern INT macdrv_ToUnicodeEx(UINT virtKey, UINT scanCode, const BYTE *lpKeyState,
LPWSTR bufW, int bufW_size, UINT flags, HKL hkl) DECLSPEC_HIDDEN;
......@@ -278,7 +279,6 @@ extern NTSTATUS macdrv_dnd_get_formats(void *arg) DECLSPEC_HIDDEN;
extern NTSTATUS macdrv_dnd_have_format(void *arg) DECLSPEC_HIDDEN;
extern NTSTATUS macdrv_dnd_release(void *arg) DECLSPEC_HIDDEN;
extern NTSTATUS macdrv_dnd_retain(void *arg) DECLSPEC_HIDDEN;
extern NTSTATUS macdrv_ime_get_text_input(void *arg) DECLSPEC_HIDDEN;
extern NTSTATUS macdrv_notify_icon(void *arg) DECLSPEC_HIDDEN;
extern NTSTATUS macdrv_client_func(enum macdrv_client_funcs func, const void *params,
......
......@@ -622,7 +622,6 @@ const unixlib_entry_t __wine_unix_call_funcs[] =
macdrv_dnd_have_format,
macdrv_dnd_release,
macdrv_dnd_retain,
macdrv_ime_get_text_input,
macdrv_init,
macdrv_notify_icon,
macdrv_quit_result,
......@@ -724,7 +723,6 @@ const unixlib_entry_t __wine_unix_call_wow64_funcs[] =
macdrv_dnd_have_format,
macdrv_dnd_release,
macdrv_dnd_retain,
macdrv_ime_get_text_input,
wow64_init,
wow64_notify_icon,
macdrv_quit_result,
......
......@@ -26,7 +26,6 @@ enum macdrv_funcs
unix_dnd_have_format,
unix_dnd_release,
unix_dnd_retain,
unix_ime_get_text_input,
unix_init,
unix_notify_icon,
unix_quit_result,
......
......@@ -3,4 +3,3 @@
# IME
@ stdcall ImeSelect(long long)
@ stdcall ImeToAsciiEx(long long ptr ptr long long)
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