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
March 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
910 discussions
Start a n
N
ew thread
Rémi Bernon : dinput/tests: Test SaveActionMap effect on DIPROP_USERNAME property.
by Alexandre Julliard
16 Mar '23
16 Mar '23
Module: wine Branch: master Commit: 2656e418e2de27491f92eae0569b4f4e02c28128 URL:
https://gitlab.winehq.org/wine/wine/-/commit/2656e418e2de27491f92eae0569b4f…
Author: Rémi Bernon <rbernon(a)codeweavers.com> Date: Thu Mar 16 13:27:37 2023 +0100 dinput/tests: Test SaveActionMap effect on DIPROP_USERNAME property. --- dlls/dinput/tests/joystick8.c | 50 ++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 49 insertions(+), 1 deletion(-) diff --git a/dlls/dinput/tests/joystick8.c b/dlls/dinput/tests/joystick8.c index 6dbd4f3e9d6..a1720bb7b26 100644 --- a/dlls/dinput/tests/joystick8.c +++ b/dlls/dinput/tests/joystick8.c @@ -725,11 +725,29 @@ static void test_action_map( IDirectInputDevice8W *device, HANDLE file, HANDLE e {.objid = TRUE}, {.objid = TRUE, .how = TRUE}, }; + DIPROPSTRING prop_username = + { + .diph = + { + .dwHeaderSize = sizeof(DIPROPHEADER), + .dwSize = sizeof(DIPROPSTRING), + .dwHow = DIPH_DEVICE, + } + }; DIACTIONW actions[ARRAY_SIZE(expect_actions)]; DIACTIONFORMATW action_format; - DWORD flags; + WCHAR username[256]; + DWORD res, flags; HRESULT hr; + res = ARRAY_SIZE(username); + GetUserNameW( username, &res ); + + memset( prop_username.wsz, 0, sizeof(prop_username.wsz) ); + hr = IDirectInputDevice_GetProperty( device, DIPROP_USERNAME, &prop_username.diph ); + ok( hr == DI_NOEFFECT, "GetProperty returned %#lx\n", hr ); + ok( !wcscmp( prop_username.wsz, L"" ), "got username %s\n", debugstr_w(prop_username.wsz) ); + hr = IDirectInputDevice8_BuildActionMap( device, NULL, L"username", DIDBAM_DEFAULT ); ok( hr == DIERR_INVALIDPARAM, "BuildActionMap returned %#lx\n", hr ); @@ -768,12 +786,26 @@ static void test_action_map( IDirectInputDevice8W *device, HANDLE file, HANDLE e todo_wine ok( hr == DI_SETTINGSNOTSAVED, "SetActionMap returned %#lx\n", hr ); + memset( prop_username.wsz, 0, sizeof(prop_username.wsz) ); + hr = IDirectInputDevice_GetProperty( device, DIPROP_USERNAME, &prop_username.diph ); + todo_wine + ok( hr == DI_OK, "GetProperty returned %#lx\n", hr ); + todo_wine + ok( !wcscmp( prop_username.wsz, username ), "got username %s\n", debugstr_w(prop_username.wsz) ); + hr = IDirectInputDevice8_SetActionMap( device, &voice_action_format, NULL, DIDSAM_DEFAULT ); ok( hr == DI_NOEFFECT, "SetActionMap returned %#lx\n", hr ); hr = IDirectInputDevice8_SetActionMap( device, &voice_action_format, NULL, DIDSAM_FORCESAVE ); todo_wine ok( hr == DI_SETTINGSNOTSAVED, "SetActionMap returned %#lx\n", hr ); + memset( prop_username.wsz, 0, sizeof(prop_username.wsz) ); + hr = IDirectInputDevice_GetProperty( device, DIPROP_USERNAME, &prop_username.diph ); + todo_wine + ok( hr == DI_OK, "GetProperty returned %#lx\n", hr ); + todo_wine + ok( !wcscmp( prop_username.wsz, username ), "got username %s\n", debugstr_w(prop_username.wsz) ); + action_format = action_format_1; action_format.rgoAction = actions; @@ -891,6 +923,22 @@ static void test_action_map( IDirectInputDevice8W *device, HANDLE file, HANDLE e hr = IDirectInputDevice8_BuildActionMap( device, &action_format, L"username", DIDBAM_PRESERVE ); ok( hr == DI_OK, "BuildActionMap returned %#lx\n", hr ); check_diactionformatw_( __LINE__, &action_format, &expect_action_format_2, actions_todos_2 ); + + + /* DIDSAM_NOUSER flag clears the device user property */ + + memset( prop_username.wsz, 0, sizeof(prop_username.wsz) ); + hr = IDirectInputDevice_GetProperty( device, DIPROP_USERNAME, &prop_username.diph ); + ok( hr == DI_OK, "GetProperty returned %#lx\n", hr ); + ok( !wcscmp( prop_username.wsz, L"username" ), "got username %s\n", debugstr_w(prop_username.wsz) ); + + hr = IDirectInputDevice8_SetActionMap( device, &action_format, L"username", DIDSAM_NOUSER ); + ok( hr == DI_OK, "SetActionMap returned %#lx\n", hr ); + + memset( prop_username.wsz, 0, sizeof(prop_username.wsz) ); + hr = IDirectInputDevice_GetProperty( device, DIPROP_USERNAME, &prop_username.diph ); + ok( hr == DI_NOEFFECT, "GetProperty returned %#lx\n", hr ); + ok( !wcscmp( prop_username.wsz, L"" ), "got username %s\n", debugstr_w(prop_username.wsz) ); } static void test_simple_joystick( DWORD version )
1
0
0
0
Rémi Bernon : dinput/tests: Test BuildActionMap / SaveActionMap with the HID joystick.
by Alexandre Julliard
16 Mar '23
16 Mar '23
Module: wine Branch: master Commit: 88e2b447a228eeef40b9e0bd1fcf2498c60d0194 URL:
https://gitlab.winehq.org/wine/wine/-/commit/88e2b447a228eeef40b9e0bd1fcf24…
Author: Rémi Bernon <rbernon(a)codeweavers.com> Date: Wed Mar 15 21:04:01 2023 +0100 dinput/tests: Test BuildActionMap / SaveActionMap with the HID joystick. --- dlls/dinput/tests/joystick8.c | 541 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 541 insertions(+)
1
0
0
0
Rémi Bernon : include: Add some dinput.h action semantics definitions.
by Alexandre Julliard
16 Mar '23
16 Mar '23
Module: wine Branch: master Commit: cefe42dfeb2f1d0aedbfa5e0efef75b5d0661b24 URL:
https://gitlab.winehq.org/wine/wine/-/commit/cefe42dfeb2f1d0aedbfa5e0efef75…
Author: Rémi Bernon <rbernon(a)codeweavers.com> Date: Thu Mar 16 16:22:29 2023 +0100 include: Add some dinput.h action semantics definitions. --- include/dinput.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/include/dinput.h b/include/dinput.h index 71cc55aece5..2ebe1b1e83e 100644 --- a/include/dinput.h +++ b/include/dinput.h @@ -2172,6 +2172,12 @@ extern const DIDATAFORMAT c_dfDIJoystick2; }; #endif +#define DIVIRTUAL_DRIVING_RACE 0x01000000 +#define DIAXIS_DRIVINGR_STEER 0x01008a01 +#define DIAXIS_DRIVINGR_ACCELERATE 0x01039202 + +#define DIVOICE_CHANNEL1 0x83000401 + #define DIAXIS_ANY_X_1 0xFF00C201 #define DIAXIS_ANY_X_2 0xFF00C202 #define DIAXIS_ANY_Y_1 0xFF014201
1
0
0
0
Francois Gouget : dinput/tests: Skip the tests if acquiring the device fails.
by Alexandre Julliard
16 Mar '23
16 Mar '23
Module: wine Branch: master Commit: 8f6ab16839cba42e8cd5b1cc4984a5e8d09d341c URL:
https://gitlab.winehq.org/wine/wine/-/commit/8f6ab16839cba42e8cd5b1cc4984a5…
Author: Francois Gouget <fgouget(a)codeweavers.com> Date: Wed Feb 22 19:01:19 2023 +0100 dinput/tests: Skip the tests if acquiring the device fails. All the tests that follow would fail anyway, making it hard to filter them out to avoid false positives. Wine-Bug:
https://bugs.winehq.org/show_bug.cgi?id=54558
--- dlls/dinput/tests/device8.c | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/dlls/dinput/tests/device8.c b/dlls/dinput/tests/device8.c index 1f29c9af519..b9a4ce61eb6 100644 --- a/dlls/dinput/tests/device8.c +++ b/dlls/dinput/tests/device8.c @@ -344,7 +344,8 @@ void test_overlapped_format( DWORD version ) hr = IDirectInputDevice_Acquire( keyboard ); - ok( hr == DI_OK, "Acquire returned %#lx\n", hr ); + ok( hr == DI_OK, "Acquire returned %#lx, skipping test_overlapped_format\n", hr ); + if (hr != DI_OK) goto cleanup; keybd_event( 0, DIK_F, KEYEVENTF_SCANCODE, 0 ); res = WaitForSingleObject( event, 100 ); @@ -405,7 +406,8 @@ void test_overlapped_format( DWORD version ) hr = IDirectInputDevice_Acquire( keyboard ); - ok( hr == DI_OK, "Acquire returned %#lx\n", hr ); + ok( hr == DI_OK, "Acquire returned %#lx, skipping test_overlapped_format\n", hr ); + if (hr != DI_OK) goto cleanup; keybd_event( 0, DIK_F, KEYEVENTF_SCANCODE, 0 ); res = WaitForSingleObject( event, 100 ); @@ -457,6 +459,7 @@ void test_overlapped_format( DWORD version ) ok( count == 1, "got count %lu\n", count ); +cleanup: IUnknown_Release( keyboard ); DestroyWindow( hwnd ); @@ -1969,7 +1972,8 @@ static void test_sys_mouse( DWORD version ) hr = IDirectInputDevice8_Unacquire( device ); ok( hr == DI_NOEFFECT, "Unacquire returned %#lx\n", hr ); hr = IDirectInputDevice8_Acquire( device ); - ok( hr == DI_OK, "Acquire returned %#lx\n", hr ); + ok( hr == DI_OK, "Acquire returned %#lx, skipping test_sys_mouse\n", hr ); + if (hr != DI_OK) goto cleanup; hr = IDirectInputDevice8_Acquire( device ); ok( hr == DI_NOEFFECT, "Acquire returned %#lx\n", hr ); @@ -1999,7 +2003,8 @@ static void test_sys_mouse( DWORD version ) ok( count == 1, "got count %lu\n", count ); hr = IDirectInputDevice8_Acquire( device ); - ok( hr == DI_OK, "Acquire returned %#lx\n", hr ); + ok( hr == DI_OK, "Acquire returned %#lx, skipping test_sys_mouse\n", hr ); + if (hr != DI_OK) goto cleanup; mouse_event( MOUSEEVENTF_MOVE, 10, 10, 0, 0 ); res = WaitForSingleObject( event, 100 ); @@ -2014,7 +2019,9 @@ static void test_sys_mouse( DWORD version ) ok( hr == DI_OK, "Unacquire returned %#lx\n", hr ); hr = IDirectInputDevice8_Acquire( device ); - ok( hr == DI_OK, "Acquire returned %#lx\n", hr ); + ok( hr == DI_OK, "Acquire returned %#lx, skipping test_sys_mouse\n", hr ); + if (hr != DI_OK) goto cleanup; + count = 1; hr = IDirectInputDevice8_GetDeviceData( device, sizeof(objdata), &objdata, &count, 0 ); ok( hr == (version < 0x800 ? DI_OK : DI_BUFFEROVERFLOW), "GetDeviceData returned %#lx\n", hr ); @@ -2065,6 +2072,7 @@ static void test_sys_mouse( DWORD version ) DestroyWindow( tmp_hwnd ); +cleanup: CloseHandle( event ); DestroyWindow( hwnd );
1
0
0
0
Francois Gouget : wofutil: Add a trailing linefeed to a FIXME().
by Alexandre Julliard
16 Mar '23
16 Mar '23
Module: wine Branch: master Commit: 0007925e8f2b83a1149aa3469cb2606b2199cb9e URL:
https://gitlab.winehq.org/wine/wine/-/commit/0007925e8f2b83a1149aa3469cb260…
Author: Francois Gouget <fgouget(a)codeweavers.com> Date: Thu Mar 16 14:37:30 2023 +0100 wofutil: Add a trailing linefeed to a FIXME(). --- dlls/wofutil/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlls/wofutil/main.c b/dlls/wofutil/main.c index d8c891aa30c..edb5fec5dee 100644 --- a/dlls/wofutil/main.c +++ b/dlls/wofutil/main.c @@ -25,7 +25,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(wofutil); HRESULT WINAPI WofIsExternalFile( const WCHAR *path, BOOL *result, ULONG *provider, void *ptr, ULONG *length ) { - FIXME( "%s, %p, %p, %p, %p", debugstr_w(path), result, provider, ptr, length ); + FIXME( "%s, %p, %p, %p, %p\n", debugstr_w(path), result, provider, ptr, length ); if (result) *result = FALSE; if (provider) *provider = 0; if (length) *length = 0;
1
0
0
0
Rémi Bernon : imm32/tests: Test basic ImmEnumInputContext usage.
by Alexandre Julliard
16 Mar '23
16 Mar '23
Module: wine Branch: master Commit: 196295db88237b084f1825e0c9b0e4d3cf6afedd URL:
https://gitlab.winehq.org/wine/wine/-/commit/196295db88237b084f1825e0c9b0e4…
Author: Rémi Bernon <rbernon(a)codeweavers.com> Date: Thu Mar 9 17:12:55 2023 +0100 imm32/tests: Test basic ImmEnumInputContext usage. --- dlls/imm32/tests/imm32.c | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) diff --git a/dlls/imm32/tests/imm32.c b/dlls/imm32/tests/imm32.c index 01fcf2f2b16..6f98fb4f645 100644 --- a/dlls/imm32/tests/imm32.c +++ b/dlls/imm32/tests/imm32.c @@ -55,6 +55,12 @@ static const char *debugstr_ok( const char *cond ) t v = (r); \ ok( v == (e), "%s " f "\n", debugstr_ok( #r ), v, ##__VA_ARGS__ ); \ } while (0) +#define ok_ne( e, r, t, f, ... ) \ + do \ + { \ + t v = (r); \ + ok( v != (e), "%s " f "\n", debugstr_ok( #r ), v, ##__VA_ARGS__ ); \ + } while (0) #define ok_wcs( e, r ) \ do \ { \ @@ -2787,6 +2793,7 @@ static struct ime_functions ime_functions = static UINT ime_count; static WCHAR ime_path[MAX_PATH]; +static HIMC default_himc; static HKL ime_install(void) { @@ -2905,6 +2912,39 @@ static void ime_cleanup( HKL hkl ) ok( ret, "DeleteFileW failed, error %lu\n", GetLastError() ); } +static BOOL CALLBACK enum_get_context( HIMC himc, LPARAM lparam ) +{ + ime_trace( "himc %p\n", himc ); + *(HIMC *)lparam = himc; + return TRUE; +} + +static BOOL CALLBACK enum_find_context( HIMC himc, LPARAM lparam ) +{ + ime_trace( "himc %p\n", himc ); + if (lparam && lparam == (LPARAM)himc) return FALSE; + return TRUE; +} + +static void test_ImmEnumInputContext(void) +{ + HIMC himc; + + todo_wine + ok_ret( 1, ImmEnumInputContext( 0, enum_get_context, (LPARAM)&default_himc ) ); + ok_ret( 0, ImmEnumInputContext( 1, enum_find_context, 0 ) ); + todo_wine + ok_ret( 1, ImmEnumInputContext( GetCurrentThreadId(), enum_find_context, 0 ) ); + ok_ret( 0, ImmEnumInputContext( GetCurrentProcessId(), enum_find_context, 0 ) ); + + himc = ImmCreateContext(); + ok_ne( NULL, himc, HIMC, "%p" ); + ok_ret( 0, ImmEnumInputContext( GetCurrentThreadId(), enum_find_context, (LPARAM)himc ) ); + ok_ret( 1, ImmDestroyContext( himc ) ); + todo_wine + ok_ret( 1, ImmEnumInputContext( GetCurrentThreadId(), enum_find_context, (LPARAM)himc ) ); +} + static void test_ImmInstallIME(void) { UINT ret; @@ -3653,6 +3693,8 @@ START_TEST(imm32) test_com_initialization(); + test_ImmEnumInputContext(); + test_ImmInstallIME(); test_ImmGetDescription(); test_ImmGetIMEFileName();
1
0
0
0
Rémi Bernon : imm32/tests: Test ImmUnregisterWord with the installed IME.
by Alexandre Julliard
16 Mar '23
16 Mar '23
Module: wine Branch: master Commit: 195879ada8531b5124b26ef0eda65279a8c3942a URL:
https://gitlab.winehq.org/wine/wine/-/commit/195879ada8531b5124b26ef0eda652…
Author: Rémi Bernon <rbernon(a)codeweavers.com> Date: Sun Feb 19 11:59:37 2023 +0100 imm32/tests: Test ImmUnregisterWord with the installed IME. --- dlls/imm32/tests/imm32.c | 81 +++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 80 insertions(+), 1 deletion(-) diff --git a/dlls/imm32/tests/imm32.c b/dlls/imm32/tests/imm32.c index 1299e86d58a..01fcf2f2b16 100644 --- a/dlls/imm32/tests/imm32.c +++ b/dlls/imm32/tests/imm32.c @@ -2475,6 +2475,7 @@ DEFINE_EXPECT( ImeEscape ); DEFINE_EXPECT( ImeEnumRegisterWord ); DEFINE_EXPECT( ImeRegisterWord ); DEFINE_EXPECT( ImeGetRegisterWordStyle ); +DEFINE_EXPECT( ImeUnregisterWord ); static BOOL todo_IME_DLL_PROCESS_ATTACH; DEFINE_EXPECT( IME_DLL_PROCESS_ATTACH ); static BOOL todo_IME_DLL_PROCESS_DETACH; @@ -2714,7 +2715,21 @@ static UINT WINAPI ime_ImeToAsciiEx( UINT vkey, UINT scan_code, BYTE *key_state, static BOOL WINAPI ime_ImeUnregisterWord( const WCHAR *reading, DWORD style, const WCHAR *string ) { ime_trace( "reading %s, style %lu, string %s\n", debugstr_w(reading), style, debugstr_w(string) ); - ok( 0, "unexpected call\n" ); + + CHECK_EXPECT( ImeUnregisterWord ); + + if (style) ok_eq( 0xdeadbeef, style, UINT, "%#x" ); + if (ime_info.fdwProperty & IME_PROP_UNICODE) + { + if (reading) ok_wcs( L"Reading", reading ); + if (string) ok_wcs( L"String", string ); + } + else + { + if (reading) ok_str( "Reading", (char *)reading ); + if (string) ok_str( "String", (char *)string ); + } + return FALSE; } @@ -3566,6 +3581,68 @@ cleanup: winetest_pop_context(); } +static void test_ImmUnregisterWord( BOOL unicode ) +{ + HKL hkl = GetKeyboardLayout( 0 ); + + winetest_push_context( unicode ? "unicode" : "ansi" ); + + SET_ENABLE( ImeUnregisterWord, TRUE ); + + SetLastError( 0xdeadbeef ); + ok_ret( 0, ImmUnregisterWordW( NULL, NULL, 0, NULL ) ); + ok_ret( 0, ImmUnregisterWordA( NULL, NULL, 0, NULL ) ); + ok_ret( 0, ImmUnregisterWordW( hkl, NULL, 0, NULL ) ); + ok_ret( 0, ImmUnregisterWordA( hkl, NULL, 0, NULL ) ); + todo_wine + ok_ret( 0xdeadbeef, GetLastError() ); + + /* IME_PROP_END_UNLOAD for the IME to unload / reload. */ + ime_info.fdwProperty = IME_PROP_END_UNLOAD; + if (unicode) ime_info.fdwProperty |= IME_PROP_UNICODE; + + if (!(hkl = ime_install())) goto cleanup; + + SET_EXPECT( ImeUnregisterWord ); + ok_ret( 0, ImmUnregisterWordW( hkl, NULL, 0, NULL ) ); + CHECK_CALLED( ImeUnregisterWord ); + + SET_EXPECT( ImeUnregisterWord ); + ok_ret( 0, ImmUnregisterWordA( hkl, NULL, 0, NULL ) ); + CHECK_CALLED( ImeUnregisterWord ); + + SET_EXPECT( ImeUnregisterWord ); + ok_ret( 0, ImmUnregisterWordW( hkl, L"Reading", 0, NULL ) ); + CHECK_CALLED( ImeUnregisterWord ); + + SET_EXPECT( ImeUnregisterWord ); + ok_ret( 0, ImmUnregisterWordA( hkl, "Reading", 0, NULL ) ); + CHECK_CALLED( ImeUnregisterWord ); + + SET_EXPECT( ImeUnregisterWord ); + ok_ret( 0, ImmUnregisterWordW( hkl, NULL, 0xdeadbeef, NULL ) ); + CHECK_CALLED( ImeUnregisterWord ); + + SET_EXPECT( ImeUnregisterWord ); + ok_ret( 0, ImmUnregisterWordA( hkl, NULL, 0xdeadbeef, NULL ) ); + CHECK_CALLED( ImeUnregisterWord ); + + SET_EXPECT( ImeUnregisterWord ); + ok_ret( 0, ImmUnregisterWordW( hkl, NULL, 0, L"String" ) ); + CHECK_CALLED( ImeUnregisterWord ); + + SET_EXPECT( ImeUnregisterWord ); + ok_ret( 0, ImmUnregisterWordA( hkl, NULL, 0, "String" ) ); + CHECK_CALLED( ImeUnregisterWord ); + + ime_cleanup( hkl ); + +cleanup: + SET_ENABLE( ImeUnregisterWord, FALSE ); + + winetest_pop_context(); +} + START_TEST(imm32) { if (!is_ime_enabled()) @@ -3590,6 +3667,8 @@ START_TEST(imm32) test_ImmRegisterWord( TRUE ); test_ImmGetRegisterWordStyle( FALSE ); test_ImmGetRegisterWordStyle( TRUE ); + test_ImmUnregisterWord( FALSE ); + test_ImmUnregisterWord( TRUE ); if (init()) {
1
0
0
0
Rémi Bernon : imm32/tests: Test ImmGetRegisterWordStyle with the installed IME.
by Alexandre Julliard
16 Mar '23
16 Mar '23
Module: wine Branch: master Commit: 6896953d95bbb103b04221e321a91ce7343018ba URL:
https://gitlab.winehq.org/wine/wine/-/commit/6896953d95bbb103b04221e321a91c…
Author: Rémi Bernon <rbernon(a)codeweavers.com> Date: Sun Feb 19 11:58:44 2023 +0100 imm32/tests: Test ImmGetRegisterWordStyle with the installed IME. --- dlls/imm32/tests/imm32.c | 101 ++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 99 insertions(+), 2 deletions(-) diff --git a/dlls/imm32/tests/imm32.c b/dlls/imm32/tests/imm32.c index 59cab52588e..1299e86d58a 100644 --- a/dlls/imm32/tests/imm32.c +++ b/dlls/imm32/tests/imm32.c @@ -2474,6 +2474,7 @@ DEFINE_EXPECT( ImeDestroy ); DEFINE_EXPECT( ImeEscape ); DEFINE_EXPECT( ImeEnumRegisterWord ); DEFINE_EXPECT( ImeRegisterWord ); +DEFINE_EXPECT( ImeGetRegisterWordStyle ); static BOOL todo_IME_DLL_PROCESS_ATTACH; DEFINE_EXPECT( IME_DLL_PROCESS_ATTACH ); static BOOL todo_IME_DLL_PROCESS_DETACH; @@ -2607,8 +2608,25 @@ static DWORD WINAPI ime_ImeGetImeMenuItems( HIMC himc, DWORD flags, DWORD type, static UINT WINAPI ime_ImeGetRegisterWordStyle( UINT item, STYLEBUFW *style ) { ime_trace( "item %u, style %p\n", item, style ); - ok( 0, "unexpected call\n" ); - return 0; + + CHECK_EXPECT( ImeGetRegisterWordStyle ); + + if (!style) + ok_eq( 16, item, UINT, "%u" ); + else if (ime_info.fdwProperty & IME_PROP_UNICODE) + { + STYLEBUFW *styleW = style; + styleW->dwStyle = 0xdeadbeef; + wcscpy( styleW->szDescription, L"StyleDescription" ); + } + else + { + STYLEBUFA *styleA = (STYLEBUFA *)style; + styleA->dwStyle = 0xdeadbeef; + strcpy( styleA->szDescription, "StyleDescription" ); + } + + return 0xdeadbeef; } static BOOL WINAPI ime_ImeInquire( IMEINFO *info, WCHAR *ui_class, DWORD flags ) @@ -3471,6 +3489,83 @@ cleanup: winetest_pop_context(); } +static void test_ImmGetRegisterWordStyle( BOOL unicode ) +{ + HKL hkl = GetKeyboardLayout( 0 ); + STYLEBUFW styleW; + STYLEBUFA styleA; + + winetest_push_context( unicode ? "unicode" : "ansi" ); + + SET_ENABLE( ImeGetRegisterWordStyle, TRUE ); + + SetLastError( 0xdeadbeef ); + ok_ret( 0, ImmGetRegisterWordStyleW( NULL, 0, &styleW ) ); + ok_ret( 0, ImmGetRegisterWordStyleA( NULL, 0, &styleA ) ); + ok_ret( 0, ImmGetRegisterWordStyleW( hkl, 0, &styleW ) ); + ok_ret( 0, ImmGetRegisterWordStyleA( hkl, 0, &styleA ) ); + todo_wine + ok_ret( 0xdeadbeef, GetLastError() ); + + /* IME_PROP_END_UNLOAD for the IME to unload / reload. */ + ime_info.fdwProperty = IME_PROP_END_UNLOAD; + if (unicode) ime_info.fdwProperty |= IME_PROP_UNICODE; + + if (!(hkl = ime_install())) goto cleanup; + + if (!strcmp( winetest_platform, "wine" )) goto skip_null; + + SET_EXPECT( ImeGetRegisterWordStyle ); + ok_ret( 0xdeadbeef, ImmGetRegisterWordStyleW( hkl, 16, NULL ) ); + CHECK_CALLED( ImeGetRegisterWordStyle ); + + SET_EXPECT( ImeGetRegisterWordStyle ); + ok_ret( 0xdeadbeef, ImmGetRegisterWordStyleA( hkl, 16, NULL ) ); + CHECK_CALLED( ImeGetRegisterWordStyle ); + +skip_null: + SET_EXPECT( ImeGetRegisterWordStyle ); + memset( &styleW, 0xcd, sizeof(styleW) ); + ok_ret( 0xdeadbeef, ImmGetRegisterWordStyleW( hkl, 1, &styleW ) ); + if (ime_info.fdwProperty & IME_PROP_UNICODE) + { + ok_eq( 0xdeadbeef, styleW.dwStyle, UINT, "%#x" ); + ok_wcs( L"StyleDescription", styleW.szDescription ); + } + else + { + todo_wine + ok_eq( 0xcdcdcdcd, styleW.dwStyle, UINT, "%#x" ); + todo_wine + ok_eq( 0xcdcd, styleW.szDescription[0], WORD, "%#x" ); + } + CHECK_CALLED( ImeGetRegisterWordStyle ); + + SET_EXPECT( ImeGetRegisterWordStyle ); + memset( &styleA, 0xcd, sizeof(styleA) ); + ok_ret( 0xdeadbeef, ImmGetRegisterWordStyleA( hkl, 1, &styleA ) ); + if (ime_info.fdwProperty & IME_PROP_UNICODE) + { + todo_wine + ok_eq( 0xcdcdcdcd, styleA.dwStyle, UINT, "%#x" ); + todo_wine + ok_eq( 0xcd, styleA.szDescription[0], BYTE, "%#x" ); + } + else + { + ok_eq( 0xdeadbeef, styleA.dwStyle, UINT, "%#x" ); + ok_str( "StyleDescription", styleA.szDescription ); + } + CHECK_CALLED( ImeGetRegisterWordStyle ); + + ime_cleanup( hkl ); + +cleanup: + SET_ENABLE( ImeGetRegisterWordStyle, FALSE ); + + winetest_pop_context(); +} + START_TEST(imm32) { if (!is_ime_enabled()) @@ -3493,6 +3588,8 @@ START_TEST(imm32) test_ImmEnumRegisterWord( TRUE ); test_ImmRegisterWord( FALSE ); test_ImmRegisterWord( TRUE ); + test_ImmGetRegisterWordStyle( FALSE ); + test_ImmGetRegisterWordStyle( TRUE ); if (init()) {
1
0
0
0
Rémi Bernon : imm32/tests: Test ImmRegisterWord with the installed IME.
by Alexandre Julliard
16 Mar '23
16 Mar '23
Module: wine Branch: master Commit: eab785a358debb4a08c0657df6cd097fed6b4bcc URL:
https://gitlab.winehq.org/wine/wine/-/commit/eab785a358debb4a08c0657df6cd09…
Author: Rémi Bernon <rbernon(a)codeweavers.com> Date: Sun Feb 19 11:55:56 2023 +0100 imm32/tests: Test ImmRegisterWord with the installed IME. --- dlls/imm32/tests/imm32.c | 81 +++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 80 insertions(+), 1 deletion(-) diff --git a/dlls/imm32/tests/imm32.c b/dlls/imm32/tests/imm32.c index b480923ede8..59cab52588e 100644 --- a/dlls/imm32/tests/imm32.c +++ b/dlls/imm32/tests/imm32.c @@ -2473,6 +2473,7 @@ static BOOL todo_ImeDestroy; DEFINE_EXPECT( ImeDestroy ); DEFINE_EXPECT( ImeEscape ); DEFINE_EXPECT( ImeEnumRegisterWord ); +DEFINE_EXPECT( ImeRegisterWord ); static BOOL todo_IME_DLL_PROCESS_ATTACH; DEFINE_EXPECT( IME_DLL_PROCESS_ATTACH ); static BOOL todo_IME_DLL_PROCESS_DETACH; @@ -2643,7 +2644,21 @@ static BOOL WINAPI ime_ImeProcessKey( HIMC himc, UINT vkey, LPARAM key_data, BYT static BOOL WINAPI ime_ImeRegisterWord( const WCHAR *reading, DWORD style, const WCHAR *string ) { ime_trace( "reading %s, style %lu, string %s\n", debugstr_w(reading), style, debugstr_w(string) ); - ok( 0, "unexpected call\n" ); + + CHECK_EXPECT( ImeRegisterWord ); + + if (style) ok_eq( 0xdeadbeef, style, UINT, "%#x" ); + if (ime_info.fdwProperty & IME_PROP_UNICODE) + { + if (reading) ok_wcs( L"Reading", reading ); + if (string) ok_wcs( L"String", string ); + } + else + { + if (reading) ok_str( "Reading", (char *)reading ); + if (string) ok_str( "String", (char *)string ); + } + return FALSE; } @@ -3394,6 +3409,68 @@ cleanup: winetest_pop_context(); } +static void test_ImmRegisterWord( BOOL unicode ) +{ + HKL hkl = GetKeyboardLayout( 0 ); + + SET_ENABLE( ImeRegisterWord, TRUE ); + + winetest_push_context( unicode ? "unicode" : "ansi" ); + + SetLastError( 0xdeadbeef ); + ok_ret( 0, ImmRegisterWordW( NULL, NULL, 0, NULL ) ); + ok_ret( 0, ImmRegisterWordA( NULL, NULL, 0, NULL ) ); + ok_ret( 0, ImmRegisterWordW( hkl, NULL, 0, NULL ) ); + ok_ret( 0, ImmRegisterWordA( hkl, NULL, 0, NULL ) ); + todo_wine + ok_ret( 0xdeadbeef, GetLastError() ); + + /* IME_PROP_END_UNLOAD for the IME to unload / reload. */ + ime_info.fdwProperty = IME_PROP_END_UNLOAD; + if (unicode) ime_info.fdwProperty |= IME_PROP_UNICODE; + + if (!(hkl = ime_install())) goto cleanup; + + SET_EXPECT( ImeRegisterWord ); + ok_ret( 0, ImmRegisterWordW( hkl, NULL, 0, NULL ) ); + CHECK_CALLED( ImeRegisterWord ); + + SET_EXPECT( ImeRegisterWord ); + ok_ret( 0, ImmRegisterWordA( hkl, NULL, 0, NULL ) ); + CHECK_CALLED( ImeRegisterWord ); + + SET_EXPECT( ImeRegisterWord ); + ok_ret( 0, ImmRegisterWordW( hkl, L"Reading", 0, NULL ) ); + CHECK_CALLED( ImeRegisterWord ); + + SET_EXPECT( ImeRegisterWord ); + ok_ret( 0, ImmRegisterWordA( hkl, "Reading", 0, NULL ) ); + CHECK_CALLED( ImeRegisterWord ); + + SET_EXPECT( ImeRegisterWord ); + ok_ret( 0, ImmRegisterWordW( hkl, NULL, 0xdeadbeef, NULL ) ); + CHECK_CALLED( ImeRegisterWord ); + + SET_EXPECT( ImeRegisterWord ); + ok_ret( 0, ImmRegisterWordA( hkl, NULL, 0xdeadbeef, NULL ) ); + CHECK_CALLED( ImeRegisterWord ); + + SET_EXPECT( ImeRegisterWord ); + ok_ret( 0, ImmRegisterWordW( hkl, NULL, 0, L"String" ) ); + CHECK_CALLED( ImeRegisterWord ); + + SET_EXPECT( ImeRegisterWord ); + ok_ret( 0, ImmRegisterWordA( hkl, NULL, 0, "String" ) ); + CHECK_CALLED( ImeRegisterWord ); + + ime_cleanup( hkl ); + +cleanup: + SET_ENABLE( ImeRegisterWord, FALSE ); + + winetest_pop_context(); +} + START_TEST(imm32) { if (!is_ime_enabled()) @@ -3414,6 +3491,8 @@ START_TEST(imm32) test_ImmEscape( TRUE ); test_ImmEnumRegisterWord( FALSE ); test_ImmEnumRegisterWord( TRUE ); + test_ImmRegisterWord( FALSE ); + test_ImmRegisterWord( TRUE ); if (init()) {
1
0
0
0
Rémi Bernon : imm32/tests: Test ImmEnumRegisterWord with the installed IME.
by Alexandre Julliard
16 Mar '23
16 Mar '23
Module: wine Branch: master Commit: f05d4cb0c7395e6f913fdfa6a964ba83f29dfcc5 URL:
https://gitlab.winehq.org/wine/wine/-/commit/f05d4cb0c7395e6f913fdfa6a964ba…
Author: Rémi Bernon <rbernon(a)codeweavers.com> Date: Sat Feb 18 11:10:35 2023 +0100 imm32/tests: Test ImmEnumRegisterWord with the installed IME. --- dlls/imm32/tests/imm32.c | 98 +++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 97 insertions(+), 1 deletion(-) diff --git a/dlls/imm32/tests/imm32.c b/dlls/imm32/tests/imm32.c index e57da7b7ff0..b480923ede8 100644 --- a/dlls/imm32/tests/imm32.c +++ b/dlls/imm32/tests/imm32.c @@ -2472,6 +2472,7 @@ DEFINE_EXPECT( ImeInquire ); static BOOL todo_ImeDestroy; DEFINE_EXPECT( ImeDestroy ); DEFINE_EXPECT( ImeEscape ); +DEFINE_EXPECT( ImeEnumRegisterWord ); static BOOL todo_IME_DLL_PROCESS_ATTACH; DEFINE_EXPECT( IME_DLL_PROCESS_ATTACH ); static BOOL todo_IME_DLL_PROCESS_DETACH; @@ -2528,7 +2529,28 @@ static UINT WINAPI ime_ImeEnumRegisterWord( REGISTERWORDENUMPROCW proc, const WC { ime_trace( "proc %p, reading %s, style %lu, string %s, data %p\n", proc, debugstr_w(reading), style, debugstr_w(string), data ); - ok( 0, "unexpected call\n" ); + + CHECK_EXPECT( ImeEnumRegisterWord ); + + if (!style) + { + ok_eq( 0, reading, const void *, "%p" ); + ok_eq( 0, string, const void *, "%p" ); + } + else if (ime_info.fdwProperty & IME_PROP_UNICODE) + { + ok_eq( 0xdeadbeef, style, UINT, "%#x" ); + ok_wcs( L"Reading", reading ); + ok_wcs( L"String", string ); + } + else + { + ok_eq( 0xdeadbeef, style, UINT, "%#x" ); + ok_str( "Reading", (char *)reading ); + ok_str( "String", (char *)string ); + } + + if (style) return proc( reading, style, string, data ); return 0; } @@ -3300,6 +3322,78 @@ cleanup: winetest_pop_context(); } +static int CALLBACK enum_register_wordA( const char *reading, DWORD style, const char *string, void *user ) +{ + ime_trace( "reading %s, style %#lx, string %s, user %p\n", debugstr_a(reading), style, debugstr_a(string), user ); + + ok_eq( 0xdeadbeef, style, UINT, "%#x" ); + todo_wine_if( reading[1] == 0 ) + ok_str( "Reading", reading ); + todo_wine_if( string[1] == 0 ) + ok_str( "String", string ); + + return 0xdeadbeef; +} + +static int CALLBACK enum_register_wordW( const WCHAR *reading, DWORD style, const WCHAR *string, void *user ) +{ + ime_trace( "reading %s, style %#lx, string %s, user %p\n", debugstr_w(reading), style, debugstr_w(string), user ); + + ok_eq( 0xdeadbeef, style, UINT, "%#x" ); + todo_wine_if( reading[0] != 'R' ) + ok_wcs( L"Reading", reading ); + todo_wine_if( string[0] != 'S' ) + ok_wcs( L"String", string ); + + return 0xdeadbeef; +} + +static void test_ImmEnumRegisterWord( BOOL unicode ) +{ + HKL hkl = GetKeyboardLayout( 0 ); + + winetest_push_context( unicode ? "unicode" : "ansi" ); + + SET_ENABLE( ImeEnumRegisterWord, TRUE ); + + SetLastError( 0xdeadbeef ); + ok_ret( 0, ImmEnumRegisterWordW( NULL, enum_register_wordW, NULL, 0, NULL, NULL ) ); + ok_ret( 0, ImmEnumRegisterWordA( NULL, enum_register_wordA, NULL, 0, NULL, NULL ) ); + ok_ret( 0, ImmEnumRegisterWordW( hkl, enum_register_wordW, NULL, 0, NULL, NULL ) ); + ok_ret( 0, ImmEnumRegisterWordA( hkl, enum_register_wordA, NULL, 0, NULL, NULL ) ); + todo_wine + ok_ret( 0xdeadbeef, GetLastError() ); + + /* IME_PROP_END_UNLOAD for the IME to unload / reload. */ + ime_info.fdwProperty = IME_PROP_END_UNLOAD; + if (unicode) ime_info.fdwProperty |= IME_PROP_UNICODE; + + if (!(hkl = ime_install())) goto cleanup; + + SET_EXPECT( ImeEnumRegisterWord ); + ok_ret( 0, ImmEnumRegisterWordW( hkl, enum_register_wordW, NULL, 0, NULL, NULL ) ); + CHECK_CALLED( ImeEnumRegisterWord ); + + SET_EXPECT( ImeEnumRegisterWord ); + ok_ret( 0, ImmEnumRegisterWordA( hkl, enum_register_wordA, NULL, 0, NULL, NULL ) ); + CHECK_CALLED( ImeEnumRegisterWord ); + + SET_EXPECT( ImeEnumRegisterWord ); + ok_ret( 0xdeadbeef, ImmEnumRegisterWordW( hkl, enum_register_wordW, L"Reading", 0xdeadbeef, L"String", NULL ) ); + CHECK_CALLED( ImeEnumRegisterWord ); + + SET_EXPECT( ImeEnumRegisterWord ); + ok_ret( 0xdeadbeef, ImmEnumRegisterWordA( hkl, enum_register_wordA, "Reading", 0xdeadbeef, "String", NULL ) ); + CHECK_CALLED( ImeEnumRegisterWord ); + + ime_cleanup( hkl ); + +cleanup: + SET_ENABLE( ImeEnumRegisterWord, FALSE ); + + winetest_pop_context(); +} + START_TEST(imm32) { if (!is_ime_enabled()) @@ -3318,6 +3412,8 @@ START_TEST(imm32) test_ImmEscape( FALSE ); test_ImmEscape( TRUE ); + test_ImmEnumRegisterWord( FALSE ); + test_ImmEnumRegisterWord( TRUE ); if (init()) {
1
0
0
0
← Newer
1
...
51
52
53
54
55
56
57
...
91
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
79
80
81
82
83
84
85
86
87
88
89
90
91
Results per page:
10
25
50
100
200