winehq.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2025
February
January
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
January
2007
December
November
October
September
August
July
June
May
April
March
February
January
2006
December
November
October
September
August
July
June
May
April
March
February
January
2005
December
November
October
September
August
July
June
May
April
March
February
January
2004
December
November
October
September
August
July
June
May
April
March
February
January
2003
December
November
October
September
August
July
June
May
April
March
February
January
2002
December
November
October
September
August
July
June
May
April
March
February
January
2001
December
November
October
September
August
July
June
May
April
March
February
List overview
wine-commits
May 2023
----- 2025 -----
February 2025
January 2025
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
January 2004
----- 2003 -----
December 2003
November 2003
October 2003
September 2003
August 2003
July 2003
June 2003
May 2003
April 2003
March 2003
February 2003
January 2003
----- 2002 -----
December 2002
November 2002
October 2002
September 2002
August 2002
July 2002
June 2002
May 2002
April 2002
March 2002
February 2002
January 2002
----- 2001 -----
December 2001
November 2001
October 2001
September 2001
August 2001
July 2001
June 2001
May 2001
April 2001
March 2001
February 2001
wine-commits@winehq.org
1 participants
775 discussions
Start a n
N
ew thread
Rémi Bernon : imm32: Resize the composition string if the driver requested so.
by Alexandre Julliard
12 May '23
12 May '23
Module: wine Branch: master Commit: 4870a9dfad3527c9eca7ed0ac9481281cbdfc254 URL:
https://gitlab.winehq.org/wine/wine/-/commit/4870a9dfad3527c9eca7ed0ac94812…
Author: Rémi Bernon <rbernon(a)codeweavers.com> Date: Thu May 11 08:22:08 2023 +0200 imm32: Resize the composition string if the driver requested so. --- dlls/imm32/ime.c | 22 +++++++++++++++++----- dlls/imm32/imm_private.h | 2 ++ 2 files changed, 19 insertions(+), 5 deletions(-) diff --git a/dlls/imm32/ime.c b/dlls/imm32/ime.c index db9cdfa9a3b..b544035dbd7 100644 --- a/dlls/imm32/ime.c +++ b/dlls/imm32/ime.c @@ -457,9 +457,8 @@ BOOL WINAPI ImeProcessKey( HIMC himc, UINT vkey, LPARAM lparam, BYTE *state ) UINT WINAPI ImeToAsciiEx( UINT vkey, UINT vsc, BYTE *state, TRANSMSGLIST *msgs, UINT flags, HIMC himc ) { - struct ime_driver_call_params params = {.himc = himc, .state = state}; COMPOSITIONSTRING *compstr; - UINT count = 0; + UINT size, count = 0; INPUTCONTEXT *ctx; NTSTATUS status; @@ -468,10 +467,23 @@ UINT WINAPI ImeToAsciiEx( UINT vkey, UINT vsc, BYTE *state, TRANSMSGLIST *msgs, if (!(ctx = ImmLockIMC( himc ))) return 0; if (!(compstr = ImmLockIMCC( ctx->hCompStr ))) goto done; + size = compstr->dwSize; + + do + { + struct ime_driver_call_params params = {.himc = himc, .state = state}; + HIMCC himcc; + + ImmUnlockIMCC( ctx->hCompStr ); + if (!(himcc = ImmReSizeIMCC( ctx->hCompStr, size ))) goto done; + if (!(compstr = ImmLockIMCC( (ctx->hCompStr = himcc) ))) goto done; + + params.compstr = compstr; + status = NtUserMessageCall( ctx->hWnd, WINE_IME_TO_ASCII_EX, vkey, vsc, ¶ms, + NtUserImeDriverCall, FALSE ); + size = compstr->dwSize; + } while (status == STATUS_BUFFER_TOO_SMALL); - params.compstr = compstr; - status = NtUserMessageCall( ctx->hWnd, WINE_IME_TO_ASCII_EX, vkey, vsc, ¶ms, - NtUserImeDriverCall, FALSE ); if (status) WARN( "WINE_IME_TO_ASCII_EX returned status %#lx\n", status ); ImmUnlockIMCC( ctx->hCompStr ); diff --git a/dlls/imm32/imm_private.h b/dlls/imm32/imm_private.h index 8a957494ce9..4cc4acda6c1 100644 --- a/dlls/imm32/imm_private.h +++ b/dlls/imm32/imm_private.h @@ -19,6 +19,8 @@ #include <stdarg.h> #include <stddef.h> +#include "ntstatus.h" +#define WIN32_NO_STATUS #include "windef.h" #include "winbase.h" #include "wingdi.h"
1
0
0
0
Rémi Bernon : winemac: Compute the required COMPOSITIONSTRING size in ImeToAsciiEx.
by Alexandre Julliard
12 May '23
12 May '23
Module: wine Branch: master Commit: 3cee423da03383ac7a94e6bf422c676c565300b4 URL:
https://gitlab.winehq.org/wine/wine/-/commit/3cee423da03383ac7a94e6bf422c67…
Author: Rémi Bernon <rbernon(a)codeweavers.com> Date: Fri May 12 08:54:55 2023 +0200 winemac: Compute the required COMPOSITIONSTRING size in ImeToAsciiEx. --- dlls/winemac.drv/event.c | 40 ++++++++++++++++++++++++++++++++++++++-- 1 file changed, 38 insertions(+), 2 deletions(-) diff --git a/dlls/winemac.drv/event.c b/dlls/winemac.drv/event.c index cc2dc352c32..d7e76a5cbc7 100644 --- a/dlls/winemac.drv/event.c +++ b/dlls/winemac.drv/event.c @@ -26,6 +26,8 @@ #include "config.h" +#include "ntstatus.h" +#define WIN32_NO_STATUS #include "macdrv.h" #include "oleidl.h" @@ -34,6 +36,8 @@ WINE_DECLARE_DEBUG_CHANNEL(imm); struct ime_update { + WCHAR *comp_str; + WCHAR *result_str; struct ime_set_text_params *comp_params; DWORD comp_size; struct ime_set_text_params *result_params; @@ -168,7 +172,7 @@ static void macdrv_im_set_text(const macdrv_event *event) if (event->im_set_text.text) length = CFStringGetLength(event->im_set_text.text); - size = offsetof(struct ime_set_text_params, text[length]); + size = offsetof(struct ime_set_text_params, text[length + 1]); if (!(params = malloc(size))) return; params->hwnd = HandleToUlong(hwnd); params->himc = (UINT_PTR)event->im_set_text.himc; @@ -177,20 +181,24 @@ static void macdrv_im_set_text(const macdrv_event *event) if (length) CFStringGetCharacters(event->im_set_text.text, CFRangeMake(0, length), params->text); + params->text[length] = 0; free(ime_update.comp_params); ime_update.comp_params = NULL; + ime_update.comp_str = NULL; if (params->complete) { free(ime_update.result_params); ime_update.result_params = params; ime_update.result_size = size; + ime_update.result_str = params->text; } else { ime_update.comp_params = params; ime_update.comp_size = size; + ime_update.comp_str = params->text; } } @@ -200,7 +208,7 @@ static void macdrv_im_set_text(const macdrv_event *event) static void macdrv_sent_text_input(const macdrv_event *event) { TRACE_(imm)("handled: %s\n", event->sent_text_input.handled ? "TRUE" : "FALSE"); - *event->sent_text_input.done = event->sent_text_input.handled || ime_update.result_params ? 1 : -1; + *event->sent_text_input.done = event->sent_text_input.handled || ime_update.result_str ? 1 : -1; } @@ -209,19 +217,47 @@ static void macdrv_sent_text_input(const macdrv_event *event) */ UINT macdrv_ImeToAsciiEx(UINT vkey, UINT vsc, const BYTE *state, COMPOSITIONSTRING *compstr, HIMC himc) { + UINT needed = sizeof(COMPOSITIONSTRING), comp_len, result_len; + struct ime_update *update = &ime_update; + TRACE_(imm)("vkey %#x, vsc %#x, state %p, compstr %p, himc %p\n", vkey, vsc, state, compstr, himc); + if (!update->comp_str) comp_len = 0; + else + { + comp_len = wcslen(update->comp_str); + needed += comp_len * sizeof(WCHAR); /* GCS_COMPSTR */ + needed += comp_len; /* GCS_COMPATTR */ + needed += 2 * sizeof(DWORD); /* GCS_COMPCLAUSE */ + } + + if (!update->result_str) result_len = 0; + else + { + result_len = wcslen(update->result_str); + needed += result_len * sizeof(WCHAR); /* GCS_RESULTSTR */ + needed += 2 * sizeof(DWORD); /* GCS_RESULTCLAUSE */ + } + if (ime_update.result_params) { macdrv_client_func(client_func_ime_set_text, ime_update.result_params, ime_update.result_size); free(ime_update.result_params); ime_update.result_params = NULL; + ime_update.result_str = NULL; } if (ime_update.comp_params) { macdrv_client_func(client_func_ime_set_text, ime_update.comp_params, ime_update.comp_size); free(ime_update.comp_params); ime_update.comp_params = NULL; + ime_update.comp_str = NULL; + } + + if (compstr->dwSize < needed) + { + compstr->dwSize = needed; + return STATUS_BUFFER_TOO_SMALL; } return 0;
1
0
0
0
Rémi Bernon : winemac: Use the ImeToAsciiEx driver entry to retrieve IME result.
by Alexandre Julliard
12 May '23
12 May '23
Module: wine Branch: master Commit: 54bbdb83e9a99615815e028e7423e5f125dc7754 URL:
https://gitlab.winehq.org/wine/wine/-/commit/54bbdb83e9a99615815e028e7423e5…
Author: Rémi Bernon <rbernon(a)codeweavers.com> Date: Thu May 11 08:39:30 2023 +0200 winemac: Use the ImeToAsciiEx driver entry to retrieve IME result. --- dlls/winemac.drv/event.c | 6 ++++-- dlls/winemac.drv/gdi.c | 1 + dlls/winemac.drv/ime.c | 39 --------------------------------------- dlls/winemac.drv/macdrv.h | 2 +- dlls/winemac.drv/macdrv_main.c | 2 -- dlls/winemac.drv/unixlib.h | 1 - dlls/winemac.drv/winemac.drv.spec | 1 - 7 files changed, 6 insertions(+), 46 deletions(-) diff --git a/dlls/winemac.drv/event.c b/dlls/winemac.drv/event.c index 6a695f87e58..cc2dc352c32 100644 --- a/dlls/winemac.drv/event.c +++ b/dlls/winemac.drv/event.c @@ -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); diff --git a/dlls/winemac.drv/gdi.c b/dlls/winemac.drv/gdi.c index 059b99a2465..ef19b39cade 100644 --- a/dlls/winemac.drv/gdi.c +++ b/dlls/winemac.drv/gdi.c @@ -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, diff --git a/dlls/winemac.drv/ime.c b/dlls/winemac.drv/ime.c index 6d733dfeedc..0a25ade5ab7 100644 --- a/dlls/winemac.drv/ime.c +++ b/dlls/winemac.drv/ime.c @@ -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; diff --git a/dlls/winemac.drv/macdrv.h b/dlls/winemac.drv/macdrv.h index 86b2e68e11b..1a2bb684583 100644 --- a/dlls/winemac.drv/macdrv.h +++ b/dlls/winemac.drv/macdrv.h @@ -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, diff --git a/dlls/winemac.drv/macdrv_main.c b/dlls/winemac.drv/macdrv_main.c index 61fb19ee33f..54c5ee6c93a 100644 --- a/dlls/winemac.drv/macdrv_main.c +++ b/dlls/winemac.drv/macdrv_main.c @@ -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, diff --git a/dlls/winemac.drv/unixlib.h b/dlls/winemac.drv/unixlib.h index 219d0e3dd46..08c36860dd7 100644 --- a/dlls/winemac.drv/unixlib.h +++ b/dlls/winemac.drv/unixlib.h @@ -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, diff --git a/dlls/winemac.drv/winemac.drv.spec b/dlls/winemac.drv/winemac.drv.spec index 27143ab560b..68bebc794aa 100644 --- a/dlls/winemac.drv/winemac.drv.spec +++ b/dlls/winemac.drv/winemac.drv.spec @@ -3,4 +3,3 @@ # IME @ stdcall ImeSelect(long long) -@ stdcall ImeToAsciiEx(long long ptr ptr long long)
1
0
0
0
Rémi Bernon : win32u: Introduce a new ImeToAsciiEx call through NtUserMessageCall.
by Alexandre Julliard
12 May '23
12 May '23
Module: wine Branch: master Commit: bfa19f8c7e5a361fa72ca2c68ba47f350641158a URL:
https://gitlab.winehq.org/wine/wine/-/commit/bfa19f8c7e5a361fa72ca2c68ba47f…
Author: Rémi Bernon <rbernon(a)codeweavers.com> Date: Tue May 9 14:33:37 2023 +0200 win32u: Introduce a new ImeToAsciiEx call through NtUserMessageCall. --- dlls/imm32/ime.c | 28 +++++++++++++++++++++++----- dlls/win32u/driver.c | 12 ++++++++++++ dlls/win32u/imm.c | 2 ++ dlls/winex11.drv/ime.c | 8 -------- dlls/winex11.drv/winex11.drv.spec | 1 - dlls/wow64win/user.c | 2 ++ include/ntuser.h | 3 +++ include/wine/gdi_driver.h | 2 ++ 8 files changed, 44 insertions(+), 14 deletions(-) diff --git a/dlls/imm32/ime.c b/dlls/imm32/ime.c index eee623a6eb5..db9cdfa9a3b 100644 --- a/dlls/imm32/ime.c +++ b/dlls/imm32/ime.c @@ -455,12 +455,30 @@ BOOL WINAPI ImeProcessKey( HIMC himc, UINT vkey, LPARAM lparam, BYTE *state ) 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", - vkey, scan_code, key_state, msgs, state, himc ); - SetLastError( ERROR_CALL_NOT_IMPLEMENTED ); - return 0; + struct ime_driver_call_params params = {.himc = himc, .state = state}; + COMPOSITIONSTRING *compstr; + UINT count = 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, ¶ms, + 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 ) diff --git a/dlls/win32u/driver.c b/dlls/win32u/driver.c index e1dd1a1ebcf..5b8cbb56813 100644 --- a/dlls/win32u/driver.c +++ b/dlls/win32u/driver.c @@ -721,6 +721,11 @@ static UINT nulldrv_ImeProcessKey( HIMC himc, UINT wparam, UINT lparam, const BY 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 ) { } @@ -1084,6 +1089,11 @@ static UINT loaderdrv_ImeProcessKey( HIMC himc, UINT wparam, UINT lparam, const 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 ) { return load_driver()->pNotifyIMEStatus( hwnd, status ); @@ -1196,6 +1206,7 @@ static const struct user_driver_funcs lazy_load_driver = loaderdrv_UnregisterHotKey, loaderdrv_VkKeyScanEx, loaderdrv_ImeProcessKey, + loaderdrv_ImeToAsciiEx, loaderdrv_NotifyIMEStatus, /* cursor/icon functions */ nulldrv_DestroyCursorIcon, @@ -1277,6 +1288,7 @@ void __wine_set_user_driver( const struct user_driver_funcs *funcs, UINT version SET_USER_FUNC(UnregisterHotKey); SET_USER_FUNC(VkKeyScanEx); SET_USER_FUNC(ImeProcessKey); + SET_USER_FUNC(ImeToAsciiEx); SET_USER_FUNC(NotifyIMEStatus); SET_USER_FUNC(DestroyCursorIcon); SET_USER_FUNC(SetCursor); diff --git a/dlls/win32u/imm.c b/dlls/win32u/imm.c index b91c3617472..287596e60ef 100644 --- a/dlls/win32u/imm.c +++ b/dlls/win32u/imm.c @@ -428,6 +428,8 @@ LRESULT ime_driver_call( HWND hwnd, enum wine_ime_call call, WPARAM wparam, LPAR { case WINE_IME_PROCESS_KEY: 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: ERR( "Unknown IME driver call %#x\n", call ); return 0; diff --git a/dlls/winex11.drv/ime.c b/dlls/winex11.drv/ime.c index 348be4f0ad6..b375b7f8e2a 100644 --- a/dlls/winex11.drv/ime.c +++ b/dlls/winex11.drv/ime.c @@ -514,14 +514,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) -{ - /* 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 */ NTSTATUS x11drv_ime_set_open_status( UINT open ) diff --git a/dlls/winex11.drv/winex11.drv.spec b/dlls/winex11.drv/winex11.drv.spec index 8b286033250..c8d52d07f6d 100644 --- a/dlls/winex11.drv/winex11.drv.spec +++ b/dlls/winex11.drv/winex11.drv.spec @@ -12,4 +12,3 @@ #IME Interface @ stdcall ImeSelect(long long) -@ stdcall ImeToAsciiEx(long long ptr ptr long long) diff --git a/dlls/wow64win/user.c b/dlls/wow64win/user.c index 75da3792a8a..3d0041a7e04 100644 --- a/dlls/wow64win/user.c +++ b/dlls/wow64win/user.c @@ -3123,10 +3123,12 @@ NTSTATUS WINAPI wow64_NtUserMessageCall( UINT *args ) { ULONG himc; ULONG state; + ULONG compstr; } *params32 = result_info; struct ime_driver_call_params params; params.himc = UlongToPtr( params32->himc ); params.state = UlongToPtr( params32->state ); + params.compstr = UlongToPtr( params32->compstr ); return NtUserMessageCall( hwnd, msg, wparam, lparam, ¶ms, type, ansi ); } } diff --git a/include/ntuser.h b/include/ntuser.h index ee401231619..74aa9e5910a 100644 --- a/include/ntuser.h +++ b/include/ntuser.h @@ -22,6 +22,7 @@ #include <winuser.h> #include <wingdi.h> #include <imm.h> +#include <immdev.h> #include <winternl.h> /* KernelCallbackTable codes, not compatible with Windows */ @@ -495,6 +496,7 @@ enum wine_internal_message enum wine_ime_call { WINE_IME_PROCESS_KEY, + WINE_IME_TO_ASCII_EX, }; /* NtUserImeDriverCall params */ @@ -502,6 +504,7 @@ struct ime_driver_call_params { HIMC himc; const BYTE *state; + COMPOSITIONSTRING *compstr; }; /* internal IME private */ diff --git a/include/wine/gdi_driver.h b/include/wine/gdi_driver.h index 2edf208a9bd..111465257ce 100644 --- a/include/wine/gdi_driver.h +++ b/include/wine/gdi_driver.h @@ -23,6 +23,7 @@ #include "winternl.h" #include "ntuser.h" +#include "immdev.h" #include "ddk/d3dkmthk.h" #include "wine/list.h" @@ -289,6 +290,7 @@ struct user_driver_funcs SHORT (*pVkKeyScanEx)(WCHAR, HKL); /* IME functions */ UINT (*pImeProcessKey)(HIMC,UINT,UINT,const BYTE*); + UINT (*pImeToAsciiEx)(UINT,UINT,const BYTE*,COMPOSITIONSTRING*,HIMC); void (*pNotifyIMEStatus)(HWND,UINT); /* cursor/icon functions */ void (*pDestroyCursorIcon)(HCURSOR);
1
0
0
0
Rémi Bernon : winemac: Use the ImeProcessKey driver entry to process IME input.
by Alexandre Julliard
12 May '23
12 May '23
Module: wine Branch: master Commit: f185dc1701f2076758ca59233fffc93924da1814 URL:
https://gitlab.winehq.org/wine/wine/-/commit/f185dc1701f2076758ca59233fffc9…
Author: Rémi Bernon <rbernon(a)codeweavers.com> Date: Tue May 2 12:14:19 2023 +0200 winemac: Use the ImeProcessKey driver entry to process IME input. --- dlls/winemac.drv/gdi.c | 1 + dlls/winemac.drv/ime.c | 90 +-------------------------------------- dlls/winemac.drv/keyboard.c | 29 ++++++++----- dlls/winemac.drv/macdrv.h | 2 +- dlls/winemac.drv/macdrv_main.c | 30 ------------- dlls/winemac.drv/unixlib.h | 12 ------ dlls/winemac.drv/winemac.drv.spec | 1 - 7 files changed, 22 insertions(+), 143 deletions(-)
1
0
0
0
Rémi Bernon : win32u: Introduce a new ImeProcessKey call through NtUserMessageCall.
by Alexandre Julliard
12 May '23
12 May '23
Module: wine Branch: master Commit: c7dc10b19256f27a1a6a6f2e32aadaeebef07eb4 URL:
https://gitlab.winehq.org/wine/wine/-/commit/c7dc10b19256f27a1a6a6f2e32aada…
Author: Rémi Bernon <rbernon(a)codeweavers.com> Date: Fri May 12 07:23:00 2023 +0200 win32u: Introduce a new ImeProcessKey call through NtUserMessageCall. --- dlls/imm32/ime.c | 17 +++++++++++++---- dlls/win32u/driver.c | 12 ++++++++++++ dlls/win32u/imm.c | 13 +++++++++++++ dlls/win32u/message.c | 3 +++ dlls/win32u/ntuser_private.h | 4 ++++ dlls/winex11.drv/ime.c | 7 ------- dlls/winex11.drv/winex11.drv.spec | 1 - dlls/wow64win/user.c | 13 +++++++++++++ include/ntuser.h | 14 ++++++++++++++ include/wine/gdi_driver.h | 1 + 10 files changed, 73 insertions(+), 12 deletions(-) diff --git a/dlls/imm32/ime.c b/dlls/imm32/ime.c index 3e5f34d6760..eee623a6eb5 100644 --- a/dlls/imm32/ime.c +++ b/dlls/imm32/ime.c @@ -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, ¶ms, + NtUserImeDriverCall, FALSE ); + ImmUnlockIMC( himc ); + + return ret; } UINT WINAPI ImeToAsciiEx( UINT vkey, UINT scan_code, BYTE *key_state, TRANSMSGLIST *msgs, UINT state, HIMC himc ) diff --git a/dlls/win32u/driver.c b/dlls/win32u/driver.c index f0055b68d1e..e1dd1a1ebcf 100644 --- a/dlls/win32u/driver.c +++ b/dlls/win32u/driver.c @@ -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); diff --git a/dlls/win32u/imm.c b/dlls/win32u/imm.c index 328a4a3eddf..b91c3617472 100644 --- a/dlls/win32u/imm.c +++ b/dlls/win32u/imm.c @@ -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.@) */ diff --git a/dlls/win32u/message.c b/dlls/win32u/message.c index 5ca568d7302..b3d94120455 100644 --- a/dlls/win32u/message.c +++ b/dlls/win32u/message.c @@ -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 ); } diff --git a/dlls/win32u/ntuser_private.h b/dlls/win32u/ntuser_private.h index c9c2dfa571a..0e7d84e3faa 100644 --- a/dlls/win32u/ntuser_private.h +++ b/dlls/win32u/ntuser_private.h @@ -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; diff --git a/dlls/winex11.drv/ime.c b/dlls/winex11.drv/ime.c index b46c2d86892..348be4f0ad6 100644 --- a/dlls/winex11.drv/ime.c +++ b/dlls/winex11.drv/ime.c @@ -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; diff --git a/dlls/winex11.drv/winex11.drv.spec b/dlls/winex11.drv/winex11.drv.spec index 64154d709a2..8b286033250 100644 --- a/dlls/winex11.drv/winex11.drv.spec +++ b/dlls/winex11.drv/winex11.drv.spec @@ -13,4 +13,3 @@ #IME Interface @ stdcall ImeSelect(long long) @ stdcall ImeToAsciiEx(long long ptr ptr long long) -@ stdcall ImeProcessKey(long long long ptr) diff --git a/dlls/wow64win/user.c b/dlls/wow64win/user.c index 68670acecc6..75da3792a8a 100644 --- a/dlls/wow64win/user.c +++ b/dlls/wow64win/user.c @@ -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, ¶ms, type, ansi ); + } } return message_call_32to64( hwnd, msg, wparam, lparam, result_info, type, ansi ); diff --git a/include/ntuser.h b/include/ntuser.h index 2415d61c8e4..ee401231619 100644 --- a/include/ntuser.h +++ b/include/ntuser.h @@ -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 { diff --git a/include/wine/gdi_driver.h b/include/wine/gdi_driver.h index c6683c750ef..2edf208a9bd 100644 --- a/include/wine/gdi_driver.h +++ b/include/wine/gdi_driver.h @@ -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);
1
0
0
0
Alexandre Julliard : server: Move the Wine-specific flags out of the image_flags field.
by Alexandre Julliard
12 May '23
12 May '23
Module: wine Branch: master Commit: 1d368b3789c41612c07f78d4d5b41b13baca6c02 URL:
https://gitlab.winehq.org/wine/wine/-/commit/1d368b3789c41612c07f78d4d5b41b…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Fri May 12 15:36:13 2023 +0200 server: Move the Wine-specific flags out of the image_flags field. --- dlls/ntdll/unix/loader.c | 13 +++++-------- dlls/ntdll/unix/virtual.c | 2 +- include/wine/server_protocol.h | 8 ++++---- include/winternl.h | 5 ----- server/mapping.c | 8 ++++---- server/protocol.def | 6 +++--- 6 files changed, 17 insertions(+), 25 deletions(-) diff --git a/dlls/ntdll/unix/loader.c b/dlls/ntdll/unix/loader.c index 893f2566ed9..61743df7556 100644 --- a/dlls/ntdll/unix/loader.c +++ b/dlls/ntdll/unix/loader.c @@ -732,7 +732,7 @@ NTSTATUS exec_wineloader( char **argv, int socketfd, const pe_image_info_t *pe_i ULONGLONG res_end = pe_info->base + pe_info->map_size; char preloader_reserve[64], socket_env[64]; - if (pe_info->image_flags & IMAGE_FLAGS_WineFakeDll) res_start = res_end = 0; + if (pe_info->wine_fakedll) res_start = res_end = 0; if (pe_info->image_flags & IMAGE_FLAGS_ComPlusNativeReady) machine = native_machine; signal( SIGPIPE, SIG_DFL ); @@ -1131,12 +1131,12 @@ static void fill_builtin_image_info( void *module, pe_image_info_t *info ) const IMAGE_DOS_HEADER *dos = (const IMAGE_DOS_HEADER *)module; const IMAGE_NT_HEADERS *nt = (IMAGE_NT_HEADERS *)((const BYTE *)dos + dos->e_lfanew); + memset( info, 0, sizeof(*info) ); info->base = nt->OptionalHeader.ImageBase; info->entry_point = nt->OptionalHeader.AddressOfEntryPoint; info->map_size = nt->OptionalHeader.SizeOfImage; info->stack_size = nt->OptionalHeader.SizeOfStackReserve; info->stack_commit = nt->OptionalHeader.SizeOfStackCommit; - info->zerobits = 0; info->subsystem = nt->OptionalHeader.Subsystem; info->subsystem_minor = nt->OptionalHeader.MinorSubsystemVersion; info->subsystem_major = nt->OptionalHeader.MajorSubsystemVersion; @@ -1146,13 +1146,10 @@ static void fill_builtin_image_info( void *module, pe_image_info_t *info ) info->dll_charact = nt->OptionalHeader.DllCharacteristics; info->machine = nt->FileHeader.Machine; info->contains_code = TRUE; - info->image_flags = IMAGE_FLAGS_WineBuiltin; - info->loader_flags = 0; + info->wine_builtin = TRUE; info->header_size = nt->OptionalHeader.SizeOfHeaders; info->file_size = nt->OptionalHeader.SizeOfImage; info->checksum = nt->OptionalHeader.CheckSum; - info->dbg_offset = 0; - info->dbg_size = 0; } @@ -1573,12 +1570,12 @@ NTSTATUS load_builtin( const pe_image_info_t *image_info, WCHAR *filename, if (loadorder == LO_DISABLED) return STATUS_DLL_NOT_FOUND; - if (image_info->image_flags & IMAGE_FLAGS_WineBuiltin) + if (image_info->wine_builtin) { if (loadorder == LO_NATIVE) return STATUS_DLL_NOT_FOUND; loadorder = LO_BUILTIN_NATIVE; /* load builtin, then fallback to the file we found */ } - else if (image_info->image_flags & IMAGE_FLAGS_WineFakeDll) + else if (image_info->wine_fakedll) { TRACE( "%s is a fake Wine dll\n", debugstr_w(filename) ); if (loadorder == LO_NATIVE) return STATUS_DLL_NOT_FOUND; diff --git a/dlls/ntdll/unix/virtual.c b/dlls/ntdll/unix/virtual.c index db9d7f1e323..b33b45ad07f 100644 --- a/dlls/ntdll/unix/virtual.c +++ b/dlls/ntdll/unix/virtual.c @@ -3042,7 +3042,7 @@ NTSTATUS virtual_map_builtin_module( HANDLE mapping, void **module, SIZE_T *size *size = 0; filename = (WCHAR *)(image_info + 1); - if (!(image_info->image_flags & IMAGE_FLAGS_WineBuiltin)) /* ignore non-builtins */ + if (!image_info->wine_builtin) /* ignore non-builtins */ { WARN( "%s found in WINEDLLPATH but not a builtin, ignoring\n", debugstr_w(filename) ); status = STATUS_DLL_NOT_FOUND; diff --git a/include/wine/server_protocol.h b/include/wine/server_protocol.h index 1c54d47a1a6..e9307cef1c9 100644 --- a/include/wine/server_protocol.h +++ b/include/wine/server_protocol.h @@ -834,7 +834,9 @@ typedef struct unsigned short image_charact; unsigned short dll_charact; unsigned short machine; - unsigned char contains_code; + unsigned char contains_code : 1; + unsigned char wine_builtin : 1; + unsigned char wine_fakedll : 1; unsigned char image_flags; unsigned int loader_flags; unsigned int header_size; @@ -849,8 +851,6 @@ typedef struct #define IMAGE_FLAGS_ImageMappedFlat 0x08 #define IMAGE_FLAGS_BaseBelow4gb 0x10 #define IMAGE_FLAGS_ComPlusPrefer32bit 0x20 -#define IMAGE_FLAGS_WineBuiltin 0x40 -#define IMAGE_FLAGS_WineFakeDll 0x80 struct rawinput_device { @@ -6393,7 +6393,7 @@ union generic_reply /* ### protocol_version begin ### */ -#define SERVER_PROTOCOL_VERSION 765 +#define SERVER_PROTOCOL_VERSION 766 /* ### protocol_version end ### */ diff --git a/include/winternl.h b/include/winternl.h index 4061843c4c7..df0f8dc1f84 100644 --- a/include/winternl.h +++ b/include/winternl.h @@ -3251,12 +3251,7 @@ typedef struct _SECTION_IMAGE_INFORMATION { UCHAR ImageMappedFlat : 1; UCHAR BaseBelow4gb : 1; UCHAR ComPlusPrefer32bit : 1; -#ifdef __WINESRC__ /* Wine extensions */ - UCHAR WineBuiltin : 1; - UCHAR WineFakeDll : 1; -#else UCHAR Reserved : 2; -#endif } DUMMYSTRUCTNAME; } DUMMYUNIONNAME; ULONG LoaderFlags; diff --git a/server/mapping.c b/server/mapping.c index bdfeef81da4..e0f4ad62f6e 100644 --- a/server/mapping.c +++ b/server/mapping.c @@ -803,10 +803,10 @@ static unsigned int get_image_params( struct mapping *mapping, file_pos_t file_s mapping->image.zerobits = 0; /* FIXME */ mapping->image.file_size = file_size; mapping->image.loader_flags = clr_va && clr_size; - if (mz_size == sizeof(mz) && !memcmp( mz.buffer, builtin_signature, sizeof(builtin_signature) )) - mapping->image.image_flags |= IMAGE_FLAGS_WineBuiltin; - else if (mz_size == sizeof(mz) && !memcmp( mz.buffer, fakedll_signature, sizeof(fakedll_signature) )) - mapping->image.image_flags |= IMAGE_FLAGS_WineFakeDll; + mapping->image.wine_builtin = (mz_size == sizeof(mz) && + !memcmp( mz.buffer, builtin_signature, sizeof(builtin_signature) )); + mapping->image.wine_fakedll = (mz_size == sizeof(mz) && + !memcmp( mz.buffer, fakedll_signature, sizeof(fakedll_signature) )); /* load the section headers */ diff --git a/server/protocol.def b/server/protocol.def index 26a26375069..1adda93b801 100644 --- a/server/protocol.def +++ b/server/protocol.def @@ -850,7 +850,9 @@ typedef struct unsigned short image_charact; unsigned short dll_charact; unsigned short machine; - unsigned char contains_code; + unsigned char contains_code : 1; + unsigned char wine_builtin : 1; + unsigned char wine_fakedll : 1; unsigned char image_flags; unsigned int loader_flags; unsigned int header_size; @@ -865,8 +867,6 @@ typedef struct #define IMAGE_FLAGS_ImageMappedFlat 0x08 #define IMAGE_FLAGS_BaseBelow4gb 0x10 #define IMAGE_FLAGS_ComPlusPrefer32bit 0x20 -#define IMAGE_FLAGS_WineBuiltin 0x40 -#define IMAGE_FLAGS_WineFakeDll 0x80 struct rawinput_device {
1
0
0
0
Alexandre Julliard : server: Add a separate request to create a memory view for a .so builtin.
by Alexandre Julliard
12 May '23
12 May '23
Module: wine Branch: master Commit: 8f9c0c825d6e0b26a7cf8990fa9e3f9d73fc1af5 URL:
https://gitlab.winehq.org/wine/wine/-/commit/8f9c0c825d6e0b26a7cf8990fa9e3f…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Fri May 12 15:07:30 2023 +0200 server: Add a separate request to create a memory view for a .so builtin. --- dlls/ntdll/unix/virtual.c | 6 ++-- include/wine/server_protocol.h | 19 +++++++++-- server/mapping.c | 76 ++++++++++++++++++++++++++---------------- server/protocol.def | 11 ++++-- server/request.h | 3 ++ server/trace.c | 9 ++++- 6 files changed, 86 insertions(+), 38 deletions(-)
1
0
0
0
Alexandre Julliard : winebuild: Disallow floating point arguments in syscall functions.
by Alexandre Julliard
12 May '23
12 May '23
Module: wine Branch: master Commit: fddd7aab7c49d7b833bd07090a03a870dc088cf1 URL:
https://gitlab.winehq.org/wine/wine/-/commit/fddd7aab7c49d7b833bd07090a03a8…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Fri May 12 11:38:51 2023 +0200 winebuild: Disallow floating point arguments in syscall functions. --- tools/winebuild/parser.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/tools/winebuild/parser.c b/tools/winebuild/parser.c index 5eed7e22ab0..eaf90a85966 100644 --- a/tools/winebuild/parser.c +++ b/tools/winebuild/parser.c @@ -271,14 +271,20 @@ static int parse_spec_arguments( ORDDEF *odp, DLLSPEC *spec, int optional ) error( "Unknown argument type '%s'\n", token ); return 0; } - if (is_win32) switch (arg) + switch (arg) { case ARG_WORD: case ARG_SWORD: case ARG_SEGPTR: case ARG_SEGSTR: + if (!is_win32) break; error( "Argument type '%s' only allowed for Win16\n", token ); return 0; + case ARG_FLOAT: + case ARG_DOUBLE: + if (!(odp->flags & FLAG_SYSCALL)) break; + error( "Argument type '%s' not allowed for syscall function\n", token ); + return 0; } odp->u.func.args[i] = arg; }
1
0
0
0
Alexandre Julliard : win32u: Don't use floating point types in syscalls.
by Alexandre Julliard
12 May '23
12 May '23
Module: wine Branch: master Commit: f83ec675bdf226b221e53ae298eb5f819b512376 URL:
https://gitlab.winehq.org/wine/wine/-/commit/f83ec675bdf226b221e53ae298eb5f…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Fri May 12 11:38:34 2023 +0200 win32u: Don't use floating point types in syscalls. --- dlls/gdi32/dc.c | 2 +- dlls/win32u/painting.c | 4 +++- dlls/win32u/win32u.spec | 4 ++-- dlls/win32u/win32u_private.h | 4 ++-- dlls/win32u/wrappers.c | 2 +- include/ntgdi.h | 8 ++++---- 6 files changed, 13 insertions(+), 11 deletions(-) diff --git a/dlls/gdi32/dc.c b/dlls/gdi32/dc.c index a0308ffa118..91ab6c43bde 100644 --- a/dlls/gdi32/dc.c +++ b/dlls/gdi32/dc.c @@ -1523,7 +1523,7 @@ BOOL WINAPI AngleArc( HDC hdc, INT x, INT y, DWORD radius, FLOAT start_angle, FL if (dc_attr->print) print_call_start_page( dc_attr ); if (dc_attr->emf && !EMFDC_AngleArc( dc_attr, x, y, radius, start_angle, sweep_angle )) return FALSE; - return NtGdiAngleArc( hdc, x, y, radius, start_angle, sweep_angle ); + return NtGdiAngleArc( hdc, x, y, radius, *(DWORD *)&start_angle, *(DWORD *)&sweep_angle ); } /*********************************************************************** diff --git a/dlls/win32u/painting.c b/dlls/win32u/painting.c index 8ad9b6267c5..6ec6806896e 100644 --- a/dlls/win32u/painting.c +++ b/dlls/win32u/painting.c @@ -637,8 +637,10 @@ BOOL WINAPI NtGdiExtFloodFill( HDC hdc, INT x, INT y, COLORREF color, UINT fill_ /*********************************************************************** * NtGdiAngleArc (win32u.@) */ -BOOL WINAPI NtGdiAngleArc( HDC hdc, INT x, INT y, DWORD dwRadius, FLOAT eStartAngle, FLOAT eSweepAngle ) +BOOL WINAPI NtGdiAngleArc( HDC hdc, INT x, INT y, DWORD dwRadius, DWORD start_angle, DWORD sweep_angle ) { + FLOAT eStartAngle = *(FLOAT *)&start_angle; + FLOAT eSweepAngle = *(FLOAT *)&sweep_angle; PHYSDEV physdev; BOOL result; DC *dc; diff --git a/dlls/win32u/win32u.spec b/dlls/win32u/win32u.spec index af3ac7468a9..2831b20ece9 100644 --- a/dlls/win32u/win32u.spec +++ b/dlls/win32u/win32u.spec @@ -113,7 +113,7 @@ @ stub NtGdiAddRemoteFontToDC @ stub NtGdiAddRemoteMMInstanceToDC @ stdcall NtGdiAlphaBlend(long long long long long long long long long long long ptr) -@ stdcall NtGdiAngleArc(long long long long float float) +@ stdcall NtGdiAngleArc(long long long long long long) @ stub NtGdiAnyLinkedFonts @ stdcall NtGdiArcInternal(long long long long long long long long long long) @ stub NtGdiBRUSHOBJ_DeleteRbrush @@ -123,7 +123,7 @@ @ stub NtGdiBRUSHOBJ_ulGetBrushColor @ stub NtGdiBeginGdiRendering @ stdcall NtGdiBeginPath(long) -@ stdcall NtGdiBitBlt(long long long long long long long long long long float) +@ stdcall NtGdiBitBlt(long long long long long long long long long long long) @ stub NtGdiCLIPOBJ_bEnum @ stub NtGdiCLIPOBJ_cEnumStart @ stub NtGdiCLIPOBJ_ppoGetPath diff --git a/dlls/win32u/win32u_private.h b/dlls/win32u/win32u_private.h index 32c6c2b905b..fe5143d7903 100644 --- a/dlls/win32u/win32u_private.h +++ b/dlls/win32u/win32u_private.h @@ -40,8 +40,8 @@ struct unix_funcs BOOL (WINAPI *pNtGdiAlphaBlend)( HDC hdc_dst, int x_dst, int y_dst, int width_dst, int height_dst, HDC hdc_src, int x_src, int y_src, int width_src, int height_src, BLENDFUNCTION blend_function, HANDLE xform ); - BOOL (WINAPI *pNtGdiAngleArc)( HDC hdc, INT x, INT y, DWORD radius, FLOAT start_angle, - FLOAT sweep_angle ); + BOOL (WINAPI *pNtGdiAngleArc)( HDC hdc, INT x, INT y, DWORD radius, DWORD start_angle, + DWORD sweep_angle ); BOOL (WINAPI *pNtGdiArcInternal)( UINT type, HDC hdc, INT left, INT top, INT right, INT bottom, INT xstart, INT ystart, INT xend, INT yend ); BOOL (WINAPI *pNtGdiBeginPath)( HDC hdc ); diff --git a/dlls/win32u/wrappers.c b/dlls/win32u/wrappers.c index e128705ef37..4e23f325aec 100644 --- a/dlls/win32u/wrappers.c +++ b/dlls/win32u/wrappers.c @@ -45,7 +45,7 @@ BOOL WINAPI NtGdiAlphaBlend( HDC hdc_dst, int x_dst, int y_dst, int width_dst, i x_src, y_src, width_src, height_src, blend_function, xform ); } -BOOL WINAPI NtGdiAngleArc( HDC hdc, INT x, INT y, DWORD radius, FLOAT start_angle, FLOAT sweep_angle ) +BOOL WINAPI NtGdiAngleArc( HDC hdc, INT x, INT y, DWORD radius, DWORD start_angle, DWORD sweep_angle ) { if (!unix_funcs) return FALSE; return unix_funcs->pNtGdiAngleArc( hdc, x, y, radius, start_angle, sweep_angle ); diff --git a/include/ntgdi.h b/include/ntgdi.h index 7d00ced2d19..918a5c5d7b3 100644 --- a/include/ntgdi.h +++ b/include/ntgdi.h @@ -251,8 +251,8 @@ INT WINAPI NtGdiAddFontResourceW( const WCHAR *str, ULONG size, ULONG files BOOL WINAPI NtGdiAlphaBlend( HDC hdc_dst, int x_dst, int y_dst, int width_dst, int height_dst, HDC hdc_src, int x_src, int y_src, int width_src, int height_src, BLENDFUNCTION blend_function, HANDLE xform ); -BOOL WINAPI NtGdiAngleArc( HDC hdc, INT x, INT y, DWORD radius, FLOAT start_angle, - FLOAT sweep_angle ); +BOOL WINAPI NtGdiAngleArc( HDC hdc, INT x, INT y, DWORD radius, DWORD start_angle, + DWORD sweep_angle ); BOOL WINAPI NtGdiArcInternal( UINT type, HDC hdc, INT left, INT top, INT right, INT bottom, INT xstart, INT ystart, INT xend, INT yend ); BOOL WINAPI NtGdiBeginPath( HDC hdc ); @@ -351,7 +351,7 @@ DWORD WINAPI NtGdiGetGlyphOutline( HDC hdc, UINT ch, UINT format, GLYPHMETRIC DWORD size, void *buffer, const MAT2 *mat2, BOOL ignore_rotation ); DWORD WINAPI NtGdiGetKerningPairs( HDC hdc, DWORD count, KERNINGPAIR *kern_pair ); -BOOL WINAPI NtGdiGetMiterLimit( HDC hdc, FLOAT *limit ); +BOOL WINAPI NtGdiGetMiterLimit( HDC hdc, DWORD *limit ); COLORREF WINAPI NtGdiGetNearestColor( HDC hdc, COLORREF color ); UINT WINAPI NtGdiGetNearestPaletteIndex( HPALETTE hpalette, COLORREF color ); UINT WINAPI NtGdiGetOutlineTextMetricsInternalW( HDC hdc, UINT cbData, @@ -435,7 +435,7 @@ BOOL WINAPI NtGdiSetDeviceGammaRamp( HDC hdc, void *ptr ); DWORD WINAPI NtGdiSetLayout( HDC hdc, LONG wox, DWORD layout ); BOOL WINAPI NtGdiSetMagicColors( HDC hdc, DWORD magic, ULONG index ); INT WINAPI NtGdiSetMetaRgn( HDC hdc ); -BOOL WINAPI NtGdiSetMiterLimit( HDC hdc, FLOAT limit, FLOAT *prev_limit ); +BOOL WINAPI NtGdiSetMiterLimit( HDC hdc, DWORD limit, DWORD *prev_limit ); COLORREF WINAPI NtGdiSetPixel( HDC hdc, INT x, INT y, COLORREF color ); BOOL WINAPI NtGdiSetPixelFormat( HDC hdc, INT format ); BOOL WINAPI NtGdiSetRectRgn( HRGN hrgn, INT left, INT top, INT right, INT bottom );
1
0
0
0
← Newer
1
...
43
44
45
46
47
48
49
...
78
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
Results per page:
10
25
50
100
200