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
July 2022
----- 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
639 discussions
Start a n
N
ew thread
Jacek Caban : win32u: Partially move ScrollBarWndProc implementation from user32.
by Alexandre Julliard
04 Jul '22
04 Jul '22
Module: wine Branch: master Commit: 22cab055e41db442739fa22aaf7bfd3121d60c5f URL:
https://source.winehq.org/git/wine.git/?a=commit;h=22cab055e41db442739fa22a…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Tue Jun 28 20:52:31 2022 +0200 win32u: Partially move ScrollBarWndProc implementation from user32. --- dlls/user32/scroll.c | 4 +--- dlls/win32u/message.c | 14 ++++++++++++++ dlls/win32u/scroll.c | 15 +++++++++++++++ dlls/win32u/win32u_private.h | 4 ++++ include/ntuser.h | 1 + 5 files changed, 35 insertions(+), 3 deletions(-) diff --git a/dlls/user32/scroll.c b/dlls/user32/scroll.c index d7972e2c6e8..d9bc69895aa 100644 --- a/dlls/user32/scroll.c +++ b/dlls/user32/scroll.c @@ -1513,10 +1513,8 @@ LRESULT WINAPI USER_ScrollBarProc( HWND hwnd, UINT message, WPARAM wParam, LPARA break; case WM_ERASEBKGND: - return 1; - case WM_GETDLGCODE: - return DLGC_WANTARROWS; /* Windows returns this value */ + return NtUserMessageCall( hwnd, message, wParam, lParam, 0, NtUserScrollBarWndProc, !unicode ); case WM_PAINT: { diff --git a/dlls/win32u/message.c b/dlls/win32u/message.c index 0603a248f60..65f44783fe6 100644 --- a/dlls/win32u/message.c +++ b/dlls/win32u/message.c @@ -2889,17 +2889,25 @@ LRESULT WINAPI NtUserMessageCall( HWND hwnd, UINT msg, WPARAM wparam, LPARAM lpa { switch (type) { + case NtUserScrollBarWndProc: + return scroll_bar_window_proc( hwnd, msg, wparam, lparam, ansi ); + case NtUserPopupMenuWndProc: return popup_menu_window_proc( hwnd, msg, wparam, lparam ); + case NtUserDesktopWindowProc: return desktop_window_proc( hwnd, msg, wparam, lparam ); + case NtUserDefWindowProc: return default_window_proc( hwnd, msg, wparam, lparam, ansi ); + case NtUserCallWindowProc: return init_win_proc_params( (struct win_proc_params *)result_info, hwnd, msg, wparam, lparam, ansi ); + case NtUserSendMessage: return send_window_message( hwnd, msg, wparam, lparam, ansi ); + case NtUserSendMessageTimeout: { struct send_message_timeout_params *params = (void *)result_info; @@ -2908,18 +2916,24 @@ LRESULT WINAPI NtUserMessageCall( HWND hwnd, UINT msg, WPARAM wparam, LPARAM lpa params->timeout, &res, ansi ); return res; } + case NtUserSendNotifyMessage: return send_notify_message( hwnd, msg, wparam, lparam, ansi ); + case NtUserSendMessageCallback: return send_message_callback( hwnd, msg, wparam, lparam, (void *)result_info, ansi ); + case NtUserClipboardWindowProc: return user_driver->pClipboardWindowProc( hwnd, msg, wparam, lparam ); + case NtUserSpyEnter: spy_enter_message( ansi, hwnd, msg, wparam, lparam ); return 0; + case NtUserSpyExit: spy_exit_message( ansi, hwnd, msg, (LPARAM)result_info, wparam, lparam ); return 0; + default: FIXME( "%p %x %lx %lx %p %x %x\n", hwnd, msg, wparam, lparam, result_info, type, ansi ); } diff --git a/dlls/win32u/scroll.c b/dlls/win32u/scroll.c index 380ce5fc75b..ff60ec5c4ce 100644 --- a/dlls/win32u/scroll.c +++ b/dlls/win32u/scroll.c @@ -68,6 +68,21 @@ static BOOL show_scroll_bar( HWND hwnd, int bar, BOOL show_horz, BOOL show_vert return FALSE; /* no frame changes */ } +LRESULT scroll_bar_window_proc( HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam, BOOL ansi ) +{ + switch (msg) + { + case WM_ERASEBKGND: + return 1; + + case WM_GETDLGCODE: + return DLGC_WANTARROWS; /* Windows returns this value */ + + default: + return default_window_proc( hwnd, msg, wparam, lparam, ansi ); + } +} + /************************************************************************* * NtUserShowScrollBar (win32u.@) */ diff --git a/dlls/win32u/win32u_private.h b/dlls/win32u/win32u_private.h index 00bc3e16828..90ca0e9b143 100644 --- a/dlls/win32u/win32u_private.h +++ b/dlls/win32u/win32u_private.h @@ -440,6 +440,10 @@ extern LRESULT send_message_timeout( HWND hwnd, UINT msg, WPARAM wparam, LPARAM extern BOOL process_rawinput_message( MSG *msg, UINT hw_id, const struct hardware_msg_data *msg_data ) DECLSPEC_HIDDEN; extern BOOL rawinput_device_get_usages( HANDLE handle, USHORT *usage_page, USHORT *usage ) DECLSPEC_HIDDEN; +/* scroll.c */ +extern LRESULT scroll_bar_window_proc( HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam, + BOOL ansi ) DECLSPEC_HIDDEN; + /* sysparams.c */ extern BOOL enable_thunk_lock DECLSPEC_HIDDEN; extern DWORD process_layout DECLSPEC_HIDDEN; diff --git a/include/ntuser.h b/include/ntuser.h index 2f6b8863228..08a49cbd123 100644 --- a/include/ntuser.h +++ b/include/ntuser.h @@ -211,6 +211,7 @@ struct render_synthesized_format_params /* NtUserMessageCall codes */ enum { + NtUserScrollBarWndProc = 0x029a, NtUserPopupMenuWndProc = 0x029c, NtUserDesktopWindowProc = 0x029d, NtUserDefWindowProc = 0x029e,
1
0
0
0
Jacek Caban : win32u: Move NtUserShowScrollBar implementation from user32.
by Alexandre Julliard
04 Jul '22
04 Jul '22
Module: wine Branch: master Commit: b4ba6de6e135ca5003926b424c616a9872bb5377 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=b4ba6de6e135ca5003926b42…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Tue Jun 28 13:22:35 2022 +0200 win32u: Move NtUserShowScrollBar implementation from user32. --- dlls/user32/listbox.c | 2 +- dlls/user32/mdi.c | 4 +-- dlls/user32/scroll.c | 25 -------------- dlls/user32/user32.spec | 2 +- dlls/win32u/Makefile.in | 1 + dlls/win32u/gdiobj.c | 1 + dlls/win32u/scroll.c | 80 ++++++++++++++++++++++++++++++++++++++++++++ dlls/win32u/win32u.spec | 2 +- dlls/win32u/win32u_private.h | 1 + dlls/win32u/wrappers.c | 6 ++++ include/ntuser.h | 1 + 11 files changed, 95 insertions(+), 30 deletions(-) diff --git a/dlls/user32/listbox.c b/dlls/user32/listbox.c index 1e7231b4c05..b8b683e6e3c 100644 --- a/dlls/user32/listbox.c +++ b/dlls/user32/listbox.c @@ -395,7 +395,7 @@ static void LISTBOX_UpdateScroll( LB_DESCR *descr ) } else { - ShowScrollBar( descr->self, SB_HORZ, FALSE ); + NtUserShowScrollBar( descr->self, SB_HORZ, FALSE ); } } } diff --git a/dlls/user32/mdi.c b/dlls/user32/mdi.c index 11c17a6dbd8..fbac63dd881 100644 --- a/dlls/user32/mdi.c +++ b/dlls/user32/mdi.c @@ -1158,7 +1158,7 @@ LRESULT MDIClientWndProc_common( HWND hwnd, UINT message, WPARAM wParam, LPARAM case WM_MDITILE: ci->mdiFlags |= MDIF_NEEDUPDATE; - ShowScrollBar( hwnd, SB_BOTH, FALSE ); + NtUserShowScrollBar( hwnd, SB_BOTH, FALSE ); MDITile( hwnd, ci, wParam ); ci->mdiFlags &= ~MDIF_NEEDUPDATE; return 0; @@ -1701,7 +1701,7 @@ void WINAPI CalcChildScroll( HWND hwnd, INT scroll ) if (style & WS_MAXIMIZE) { HeapFree( GetProcessHeap(), 0, list ); - ShowScrollBar( hwnd, SB_BOTH, FALSE ); + NtUserShowScrollBar( hwnd, SB_BOTH, FALSE ); return; } if (style & WS_VISIBLE) diff --git a/dlls/user32/scroll.c b/dlls/user32/scroll.c index b6f15b4a295..d7972e2c6e8 100644 --- a/dlls/user32/scroll.c +++ b/dlls/user32/scroll.c @@ -2003,31 +2003,6 @@ static BOOL SCROLL_ShowScrollBar( HWND hwnd, INT nBar, BOOL fShowH, BOOL fShowV } -/************************************************************************* - * ShowScrollBar (USER32.@) - * - * Shows or hides the scroll bar. - * - * PARAMS - * hwnd [I] Handle of window with scrollbar(s) - * nBar [I] One of SB_HORZ, SB_VERT, or SB_CTL - * fShow [I] TRUE = show, FALSE = hide - * - * RETURNS - * Success: TRUE - * Failure: FALSE - */ -BOOL WINAPI DECLSPEC_HOTPATCH ShowScrollBar(HWND hwnd, INT nBar, BOOL fShow) -{ - if ( !hwnd ) - return FALSE; - - SCROLL_ShowScrollBar( hwnd, nBar, (nBar == SB_VERT) ? 0 : fShow, - (nBar == SB_HORZ) ? 0 : fShow ); - return TRUE; -} - - /************************************************************************* * EnableScrollBar (USER32.@) * diff --git a/dlls/user32/user32.spec b/dlls/user32/user32.spec index e1cc18f7287..ce8365b1336 100644 --- a/dlls/user32/user32.spec +++ b/dlls/user32/user32.spec @@ -739,7 +739,7 @@ @ stdcall ShowCaret(long) NtUserShowCaret @ stdcall -import ShowCursor(long) NtUserShowCursor @ stdcall ShowOwnedPopups(long long) -@ stdcall ShowScrollBar(long long long) +@ stdcall ShowScrollBar(long long long) NtUserShowScrollBar @ stub ShowStartGlass @ stdcall ShowWindow(long long) NtUserShowWindow @ stdcall ShowWindowAsync(long long) NtUserShowWindowAsync diff --git a/dlls/win32u/Makefile.in b/dlls/win32u/Makefile.in index 13b329b0233..153f5f45d9f 100644 --- a/dlls/win32u/Makefile.in +++ b/dlls/win32u/Makefile.in @@ -45,6 +45,7 @@ C_SRCS = \ printdrv.c \ rawinput.c \ region.c \ + scroll.c \ spy.c \ syscall.c \ sysparams.c \ diff --git a/dlls/win32u/gdiobj.c b/dlls/win32u/gdiobj.c index 9d95d3cf94a..d843716e4c0 100644 --- a/dlls/win32u/gdiobj.c +++ b/dlls/win32u/gdiobj.c @@ -1236,6 +1236,7 @@ static struct unix_funcs unix_funcs = NtUserSetWindowWord, NtUserShowCaret, NtUserShowCursor, + NtUserShowScrollBar, NtUserShowWindow, NtUserShowWindowAsync, NtUserSystemParametersInfo, diff --git a/dlls/win32u/scroll.c b/dlls/win32u/scroll.c new file mode 100644 index 00000000000..380ce5fc75b --- /dev/null +++ b/dlls/win32u/scroll.c @@ -0,0 +1,80 @@ +/* + * Scrollbar control + * + * Copyright 1993 Martin Ayotte + * Copyright 1994, 1996 Alexandre Julliard + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#if 0 +#pragma makedep unix +#endif + +#include "win32u_private.h" +#include "ntuser_private.h" +#include "wine/debug.h" + +WINE_DEFAULT_DEBUG_CHANNEL(scroll); + + +static BOOL show_scroll_bar( HWND hwnd, int bar, BOOL show_horz, BOOL show_vert ) +{ + ULONG old_style, set_bits = 0, clear_bits = 0; + + TRACE( "hwnd=%p bar=%d horz=%d, vert=%d\n", hwnd, bar, show_horz, show_vert ); + + switch (bar) + { + case SB_CTL: + NtUserShowWindow( hwnd, show_horz ? SW_SHOW : SW_HIDE ); + return TRUE; + + case SB_BOTH: + case SB_HORZ: + if (show_horz) set_bits |= WS_HSCROLL; + else clear_bits |= WS_HSCROLL; + if (bar == SB_HORZ) break; + /* fall through */ + case SB_VERT: + if (show_vert) set_bits |= WS_VSCROLL; + else clear_bits |= WS_VSCROLL; + break; + + default: + return FALSE; /* Nothing to do! */ + } + + old_style = set_window_style( hwnd, set_bits, clear_bits ); + if ((old_style & clear_bits) != 0 || (old_style & set_bits) != set_bits) + { + /* frame has been changed, let the window redraw itself */ + NtUserSetWindowPos( hwnd, 0, 0, 0, 0, 0, + SWP_NOSIZE | SWP_NOMOVE | SWP_NOACTIVATE | SWP_NOZORDER | SWP_FRAMECHANGED ); + return TRUE; + } + return FALSE; /* no frame changes */ +} + +/************************************************************************* + * NtUserShowScrollBar (win32u.@) + */ +BOOL WINAPI NtUserShowScrollBar( HWND hwnd, INT bar, BOOL show ) +{ + if (!hwnd) return FALSE; + + show_scroll_bar( hwnd, bar, bar == SB_VERT ? 0 : show, bar == SB_HORZ ? 0 : show ); + return TRUE; +} diff --git a/dlls/win32u/win32u.spec b/dlls/win32u/win32u.spec index 68201f763ab..428e8aadf1c 100644 --- a/dlls/win32u/win32u.spec +++ b/dlls/win32u/win32u.spec @@ -1259,7 +1259,7 @@ @ stdcall -syscall NtUserSetWindowsHookEx(ptr ptr long long ptr long) @ stdcall NtUserShowCaret(long) @ stdcall NtUserShowCursor(long) -@ stub NtUserShowScrollBar +@ stdcall NtUserShowScrollBar(long long long) @ stub NtUserShowSystemCursor @ stdcall NtUserShowWindow(long long) @ stdcall NtUserShowWindowAsync(long long) diff --git a/dlls/win32u/win32u_private.h b/dlls/win32u/win32u_private.h index d3f359fd4ee..00bc3e16828 100644 --- a/dlls/win32u/win32u_private.h +++ b/dlls/win32u/win32u_private.h @@ -310,6 +310,7 @@ struct unix_funcs WORD (WINAPI *pNtUserSetWindowWord)( HWND hwnd, INT offset, WORD newval ); BOOL (WINAPI *pNtUserShowCaret)( HWND hwnd ); INT (WINAPI *pNtUserShowCursor)( BOOL show ); + BOOL (WINAPI *pNtUserShowScrollBar)( HWND hwnd, INT bar, BOOL show ); BOOL (WINAPI *pNtUserShowWindow)( HWND hwnd, INT cmd ); BOOL (WINAPI *pNtUserShowWindowAsync)( HWND hwnd, INT cmd ); BOOL (WINAPI *pNtUserSystemParametersInfo)( UINT action, UINT val, PVOID ptr, UINT winini ); diff --git a/dlls/win32u/wrappers.c b/dlls/win32u/wrappers.c index b451e57e3b1..e7ab66cadcb 100644 --- a/dlls/win32u/wrappers.c +++ b/dlls/win32u/wrappers.c @@ -1334,6 +1334,12 @@ INT WINAPI NtUserShowCursor( BOOL show ) return unix_funcs->pNtUserShowCursor( show ); } +BOOL WINAPI NtUserShowScrollBar( HWND hwnd, INT bar, BOOL show ) +{ + if (!unix_funcs) return FALSE; + return unix_funcs->pNtUserShowScrollBar( hwnd, bar, show ); +} + BOOL WINAPI NtUserShowWindowAsync( HWND hwnd, INT cmd ) { if (!unix_funcs) return FALSE; diff --git a/include/ntuser.h b/include/ntuser.h index 3862eb55054..2f6b8863228 100644 --- a/include/ntuser.h +++ b/include/ntuser.h @@ -718,6 +718,7 @@ HWINEVENTHOOK WINAPI NtUserSetWinEventHook( DWORD event_min, DWORD event_max, HM DWORD pid, DWORD tid, DWORD flags ); BOOL WINAPI NtUserShowCaret( HWND hwnd ); INT WINAPI NtUserShowCursor( BOOL show ); +BOOL WINAPI NtUserShowScrollBar( HWND hwnd, INT bar, BOOL show ); BOOL WINAPI NtUserShowWindow( HWND hwnd, INT cmd ); BOOL WINAPI NtUserShowWindowAsync( HWND hwnd, INT cmd ); BOOL WINAPI NtUserSystemParametersInfo( UINT action, UINT val, void *ptr, UINT winini );
1
0
0
0
Paul Gofman : msvcp140_2: Add stub dll.
by Alexandre Julliard
04 Jul '22
04 Jul '22
Module: wine Branch: master Commit: f3c36f725629cd1f7d19000193b391768aa81869 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=f3c36f725629cd1f7d190001…
Author: Paul Gofman <pgofman(a)codeweavers.com> Date: Thu Jun 30 19:07:45 2022 -0500 msvcp140_2: Add stub dll. --- configure | 2 ++ configure.ac | 1 + dlls/msvcp140_2/Makefile.in | 1 + dlls/msvcp140_2/msvcp140_2.spec | 44 +++++++++++++++++++++++++++++++++++++++++ 4 files changed, 48 insertions(+) diff --git a/configure b/configure index 50c23800f62..e563a2f9502 100755 --- a/configure +++ b/configure @@ -1227,6 +1227,7 @@ enable_msvcp120 enable_msvcp120_app enable_msvcp140 enable_msvcp140_1 +enable_msvcp140_2 enable_msvcp140_atomic_wait enable_msvcp60 enable_msvcp70 @@ -21657,6 +21658,7 @@ wine_fn_config_makefile dlls/msvcp140 enable_msvcp140 wine_fn_config_makefile dlls/msvcp140/tests enable_tests wine_fn_config_makefile dlls/msvcp140_1 enable_msvcp140_1 wine_fn_config_makefile dlls/msvcp140_1/tests enable_tests +wine_fn_config_makefile dlls/msvcp140_2 enable_msvcp140_2 wine_fn_config_makefile dlls/msvcp140_atomic_wait enable_msvcp140_atomic_wait wine_fn_config_makefile dlls/msvcp140_atomic_wait/tests enable_tests wine_fn_config_makefile dlls/msvcp60 enable_msvcp60 diff --git a/configure.ac b/configure.ac index 9ad1b19164c..d5791bab7b1 100644 --- a/configure.ac +++ b/configure.ac @@ -2825,6 +2825,7 @@ WINE_CONFIG_MAKEFILE(dlls/msvcp140) WINE_CONFIG_MAKEFILE(dlls/msvcp140/tests) WINE_CONFIG_MAKEFILE(dlls/msvcp140_1) WINE_CONFIG_MAKEFILE(dlls/msvcp140_1/tests) +WINE_CONFIG_MAKEFILE(dlls/msvcp140_2) WINE_CONFIG_MAKEFILE(dlls/msvcp140_atomic_wait) WINE_CONFIG_MAKEFILE(dlls/msvcp140_atomic_wait/tests) WINE_CONFIG_MAKEFILE(dlls/msvcp60) diff --git a/dlls/msvcp140_2/Makefile.in b/dlls/msvcp140_2/Makefile.in new file mode 100644 index 00000000000..5b4865db844 --- /dev/null +++ b/dlls/msvcp140_2/Makefile.in @@ -0,0 +1 @@ +MODULE = msvcp140_2.dll diff --git a/dlls/msvcp140_2/msvcp140_2.spec b/dlls/msvcp140_2/msvcp140_2.spec new file mode 100644 index 00000000000..c59da9aba9c --- /dev/null +++ b/dlls/msvcp140_2/msvcp140_2.spec @@ -0,0 +1,44 @@ +@ stub __std_smf_assoc_laguerre +@ stub __std_smf_assoc_laguerref +@ stub __std_smf_assoc_legendre +@ stub __std_smf_assoc_legendref +@ stub __std_smf_beta +@ stub __std_smf_betaf +@ stub __std_smf_comp_ellint_1 +@ stub __std_smf_comp_ellint_1f +@ stub __std_smf_comp_ellint_2 +@ stub __std_smf_comp_ellint_2f +@ stub __std_smf_comp_ellint_3 +@ stub __std_smf_comp_ellint_3f +@ stub __std_smf_cyl_bessel_i +@ stub __std_smf_cyl_bessel_if +@ stub __std_smf_cyl_bessel_j +@ stub __std_smf_cyl_bessel_jf +@ stub __std_smf_cyl_bessel_k +@ stub __std_smf_cyl_bessel_kf +@ stub __std_smf_cyl_neumann +@ stub __std_smf_cyl_neumannf +@ stub __std_smf_ellint_1 +@ stub __std_smf_ellint_1f +@ stub __std_smf_ellint_2 +@ stub __std_smf_ellint_2f +@ stub __std_smf_ellint_3 +@ stub __std_smf_ellint_3f +@ stub __std_smf_expint +@ stub __std_smf_expintf +@ stub __std_smf_hermite +@ stub __std_smf_hermitef +@ stub __std_smf_hypot3 +@ stub __std_smf_hypot3f +@ stub __std_smf_laguerre +@ stub __std_smf_laguerref +@ stub __std_smf_legendre +@ stub __std_smf_legendref +@ stub __std_smf_riemann_zeta +@ stub __std_smf_riemann_zetaf +@ stub __std_smf_sph_bessel +@ stub __std_smf_sph_besself +@ stub __std_smf_sph_legendre +@ stub __std_smf_sph_legendref +@ stub __std_smf_sph_neumann +@ stub __std_smf_sph_neumannf
1
0
0
0
Nikolay Sivov : d2d1/effect: Support parsing matrix poperty values.
by Alexandre Julliard
04 Jul '22
04 Jul '22
Module: wine Branch: master Commit: 5e714c64039ff2c983dd880b3b71aa1c86f6e162 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=5e714c64039ff2c983dd880b…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Sat Jul 2 17:45:45 2022 +0300 d2d1/effect: Support parsing matrix poperty values. Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com> --- dlls/d2d1/effect.c | 37 +++++++++++++++++++------ dlls/d2d1/tests/d2d1.c | 74 ++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 102 insertions(+), 9 deletions(-) diff --git a/dlls/d2d1/effect.c b/dlls/d2d1/effect.c index 2a980dd33a6..640aab15817 100644 --- a/dlls/d2d1/effect.c +++ b/dlls/d2d1/effect.c @@ -230,20 +230,34 @@ static const struct d2d_effect_info builtin_effects[] = }; /* Same syntax is used for value and default values. */ -static HRESULT d2d_effect_parse_vector_value(D2D1_PROPERTY_TYPE type, const WCHAR *value, +static HRESULT d2d_effect_parse_float_array(D2D1_PROPERTY_TYPE type, const WCHAR *value, float *vec) { unsigned int i, num_components; WCHAR *end_ptr; - assert(type == D2D1_PROPERTY_TYPE_VECTOR2 || type == D2D1_PROPERTY_TYPE_VECTOR3 - || type == D2D1_PROPERTY_TYPE_VECTOR4); + /* Type values are sequential. */ + switch (type) + { + case D2D1_PROPERTY_TYPE_VECTOR2: + case D2D1_PROPERTY_TYPE_VECTOR3: + case D2D1_PROPERTY_TYPE_VECTOR4: + num_components = (type - D2D1_PROPERTY_TYPE_VECTOR2) + 2; + break; + case D2D1_PROPERTY_TYPE_MATRIX_3X2: + num_components = 6; + break; + case D2D1_PROPERTY_TYPE_MATRIX_4X3: + case D2D1_PROPERTY_TYPE_MATRIX_4X4: + case D2D1_PROPERTY_TYPE_MATRIX_5X4: + num_components = (type - D2D1_PROPERTY_TYPE_MATRIX_4X3) * 4 + 12; + break; + default: + return E_UNEXPECTED; + } if (*(value++) != '(') return E_INVALIDARG; - /* Type values are sequential. */ - num_components = (type - D2D1_PROPERTY_TYPE_VECTOR2) + 2; - for (i = 0; i < num_components; ++i) { vec[i] = wcstof(value, &end_ptr); @@ -332,7 +346,7 @@ static HRESULT d2d_effect_properties_internal_add(struct d2d_effect_properties * { void *src = NULL; UINT32 _uint32; - float _vec[4]; + float _vec[20]; CLSID _clsid; BOOL _bool; @@ -363,9 +377,14 @@ static HRESULT d2d_effect_properties_internal_add(struct d2d_effect_properties * case D2D1_PROPERTY_TYPE_VECTOR2: case D2D1_PROPERTY_TYPE_VECTOR3: case D2D1_PROPERTY_TYPE_VECTOR4: - if (FAILED(hr = d2d_effect_parse_vector_value(p->type, value, _vec))) + case D2D1_PROPERTY_TYPE_MATRIX_3X2: + case D2D1_PROPERTY_TYPE_MATRIX_4X3: + case D2D1_PROPERTY_TYPE_MATRIX_4X4: + case D2D1_PROPERTY_TYPE_MATRIX_5X4: + if (FAILED(hr = d2d_effect_parse_float_array(p->type, value, _vec))) { - WARN("Failed to parse vector value %s.\n", wine_dbgstr_w(value)); + WARN("Failed to parse float array %s for type %u.\n", + wine_dbgstr_w(value), p->type); return hr; } src = _vec; diff --git a/dlls/d2d1/tests/d2d1.c b/dlls/d2d1/tests/d2d1.c index aa2e98aa22a..334e9f1adea 100644 --- a/dlls/d2d1/tests/d2d1.c +++ b/dlls/d2d1/tests/d2d1.c @@ -74,6 +74,30 @@ L"<?xml version='1.0'?> \ <Property name='DisplayName' type='string' value='Vec4 prop'/> \ <Property name='Default' type='vector4' value='(0.8,0.9,1.0,1.1)'/> \ </Property> \ + <Property name='Mat3x2Prop' type='matrix3x2' \ + value='(1.0,2.0,3.0,4.0,5.0,6.0)'> \ + <Property name='DisplayName' type='string' value='Mat3x2 prop'/> \ + <Property name='Default' type='matrix3x2' \ + value='(0.1,0.2,0.3,0.4,0.5,0.6)'/> \ + </Property> \ + <Property name='Mat4x3Prop' type='matrix4x3' \ + value='(1.0,2.0,3.0,4.0,5.0,6.0,7.0,8.0,9.0,10.0,11.0,12)'> \ + <Property name='DisplayName' type='string' value='Mat4x3 prop'/> \ + <Property name='Default' type='matrix4x3' \ + value='(0.1,0.2,0.3,0.4,0.5,0.6,0.7,0.8,0.9,1.0,1.1,1.2)'/> \ + </Property> \ + <Property name='Mat4x4Prop' type='matrix4x4' \ + value='(1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16)'> \ + <Property name='DisplayName' type='string' value='Mat4x4 prop'/> \ + <Property name='Default' type='matrix4x4' \ + value='(16,15,14,13,12,11,10,9,8,7,6,5,4,3,2,1)'/> \ + </Property> \ + <Property name='Mat5x4Prop' type='matrix5x4' \ + value='(1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20)'> \ + <Property name='DisplayName' type='string' value='Mat5x4 prop'/> \ + <Property name='Default' type='matrix5x4' \ + value='(20,19,18,17,16,15,14,13,12,11,10,9,8,7,6,5,4,3,2,1)'/>\ + </Property> \ </Effect> \ "; @@ -11050,6 +11074,7 @@ static void test_effect_properties(BOOL d3d11) ID2D1Effect *effect; UINT32 count, data; WCHAR buffer[128]; + float mat[20]; INT32 _int32; CLSID clsid; BOOL cached; @@ -11199,6 +11224,55 @@ static void test_effect_properties(BOOL d3d11) ok(vec4[0] == 8.0f && vec4[1] == 9.0f && vec4[2] == 10.0f && vec4[3] == 11.0f, "Unexpected vector (%.8e,%.8e,%.8e,%.8e).\n", vec4[0], vec4[1], vec4[2], vec4[3]); + /* Matrix3x2 property. */ + index = ID2D1Effect_GetPropertyIndex(effect, L"Mat3x2Prop"); + hr = ID2D1Effect_GetPropertyName(effect, index, buffer, ARRAY_SIZE(buffer)); + ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr); + ok(!wcscmp(buffer, L"Mat3x2Prop"), "Unexpected name %s.\n", wine_dbgstr_w(buffer)); + prop_type = ID2D1Effect_GetType(effect, index); + ok(prop_type == D2D1_PROPERTY_TYPE_MATRIX_3X2, "Unexpected type %u.\n", prop_type); + hr = ID2D1Effect_GetValue(effect, index, D2D1_PROPERTY_TYPE_MATRIX_3X2, (BYTE *)mat, 6 * sizeof(float)); + ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr); + ok(mat[0] == 1.0f && mat[1] == 2.0f && mat[2] == 3.0f && mat[3] == 4.0f && mat[4] == 5.0f && mat[5] == 6.0f, + "Unexpected matrix (%.8e,%.8e,%.8e,%.8e,%.8e,%.8e).\n", + mat[0], mat[1], mat[2], mat[3], mat[4], mat[5]); + + /* Matrix4x3 property. */ + index = ID2D1Effect_GetPropertyIndex(effect, L"Mat4x3Prop"); + hr = ID2D1Effect_GetPropertyName(effect, index, buffer, ARRAY_SIZE(buffer)); + ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr); + ok(!wcscmp(buffer, L"Mat4x3Prop"), "Unexpected name %s.\n", wine_dbgstr_w(buffer)); + prop_type = ID2D1Effect_GetType(effect, index); + ok(prop_type == D2D1_PROPERTY_TYPE_MATRIX_4X3, "Unexpected type %u.\n", prop_type); + hr = ID2D1Effect_GetValue(effect, index, D2D1_PROPERTY_TYPE_MATRIX_4X3, (BYTE *)mat, 12 * sizeof(float)); + ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr); + for (i = 0; i < 12; ++i) + ok(mat[i] == 1.0f + i, "Unexpected matrix element %u.\n", i); + + /* Matrix4x4 property. */ + index = ID2D1Effect_GetPropertyIndex(effect, L"Mat4x4Prop"); + hr = ID2D1Effect_GetPropertyName(effect, index, buffer, ARRAY_SIZE(buffer)); + ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr); + ok(!wcscmp(buffer, L"Mat4x4Prop"), "Unexpected name %s.\n", wine_dbgstr_w(buffer)); + prop_type = ID2D1Effect_GetType(effect, index); + ok(prop_type == D2D1_PROPERTY_TYPE_MATRIX_4X4, "Unexpected type %u.\n", prop_type); + hr = ID2D1Effect_GetValue(effect, index, D2D1_PROPERTY_TYPE_MATRIX_4X4, (BYTE *)mat, 16 * sizeof(float)); + ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr); + for (i = 0; i < 16; ++i) + ok(mat[i] == 1.0f + i, "Unexpected matrix element %u.\n", i); + + /* Matrix5x4 property. */ + index = ID2D1Effect_GetPropertyIndex(effect, L"Mat5x4Prop"); + hr = ID2D1Effect_GetPropertyName(effect, index, buffer, ARRAY_SIZE(buffer)); + ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr); + ok(!wcscmp(buffer, L"Mat5x4Prop"), "Unexpected name %s.\n", wine_dbgstr_w(buffer)); + prop_type = ID2D1Effect_GetType(effect, index); + ok(prop_type == D2D1_PROPERTY_TYPE_MATRIX_5X4, "Unexpected type %u.\n", prop_type); + hr = ID2D1Effect_GetValue(effect, index, D2D1_PROPERTY_TYPE_MATRIX_5X4, (BYTE *)mat, 20 * sizeof(float)); + ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr); + for (i = 0; i < 20; ++i) + ok(mat[i] == 1.0f + i, "Unexpected matrix element %u.\n", i); + ID2D1Effect_Release(effect); hr = ID2D1Factory1_UnregisterEffect(factory, &CLSID_TestEffect);
1
0
0
0
Nikolay Sivov : d2d1/effect: Support parsing int32 property values.
by Alexandre Julliard
04 Jul '22
04 Jul '22
Module: wine Branch: master Commit: 5f1f52cff265dd3154a01a58018094ec781b6cd2 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=5f1f52cff265dd3154a01a58…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Sat Jul 2 15:54:42 2022 +0300 d2d1/effect: Support parsing int32 property values. Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com> --- dlls/d2d1/effect.c | 3 ++- dlls/d2d1/tests/d2d1.c | 31 +++++++++++++++++++++++++++++++ 2 files changed, 33 insertions(+), 1 deletion(-) diff --git a/dlls/d2d1/effect.c b/dlls/d2d1/effect.c index 154b3c35a1b..2a980dd33a6 100644 --- a/dlls/d2d1/effect.c +++ b/dlls/d2d1/effect.c @@ -267,7 +267,7 @@ static HRESULT d2d_effect_properties_internal_add(struct d2d_effect_properties * 0, /* D2D1_PROPERTY_TYPE_STRING */ sizeof(BOOL), /* D2D1_PROPERTY_TYPE_BOOL */ sizeof(UINT32), /* D2D1_PROPERTY_TYPE_UINT32 */ - sizeof(INT32), /* D2D1_PROPERTY_TYPE_IN32 */ + sizeof(INT32), /* D2D1_PROPERTY_TYPE_INT32 */ sizeof(float), /* D2D1_PROPERTY_TYPE_FLOAT */ 2 * sizeof(float), /* D2D1_PROPERTY_TYPE_VECTOR2 */ 3 * sizeof(float), /* D2D1_PROPERTY_TYPE_VECTOR3 */ @@ -345,6 +345,7 @@ static HRESULT d2d_effect_properties_internal_add(struct d2d_effect_properties * switch (p->type) { case D2D1_PROPERTY_TYPE_UINT32: + case D2D1_PROPERTY_TYPE_INT32: case D2D1_PROPERTY_TYPE_ENUM: _uint32 = wcstoul(value, NULL, 10); src = &_uint32; diff --git a/dlls/d2d1/tests/d2d1.c b/dlls/d2d1/tests/d2d1.c index d796d738077..aa2e98aa22a 100644 --- a/dlls/d2d1/tests/d2d1.c +++ b/dlls/d2d1/tests/d2d1.c @@ -50,6 +50,14 @@ L"<?xml version='1.0'?> \ <Property name='Max' type='uint32' value='100'/> \ <Property name='Default' type='uint32' value='10'/> \ </Property> \ + <Property name='Int32Prop' type='int32' value='-2'> \ + <Property name='DisplayName' type='string' value='Int32 prop'/> \ + <Property name='Default' type='int32' value='10'/> \ + </Property> \ + <Property name='UInt32Prop' type='uint32' value='-3'> \ + <Property name='DisplayName' type='string' value='UInt32 prop'/> \ + <Property name='Default' type='uint32' value='10'/> \ + </Property> \ <Property name='Bool' type='bool'> \ <Property name='DisplayName' type='string' value='Bool property'/> \ <Property name='Default' type='bool' value='false'/> \ @@ -11042,6 +11050,7 @@ static void test_effect_properties(BOOL d3d11) ID2D1Effect *effect; UINT32 count, data; WCHAR buffer[128]; + INT32 _int32; CLSID clsid; BOOL cached; HRESULT hr; @@ -11133,6 +11142,28 @@ static void test_effect_properties(BOOL d3d11) ID2D1Properties_Release(subproperties); + /* Int32 property. */ + index = ID2D1Effect_GetPropertyIndex(effect, L"Int32Prop"); + hr = ID2D1Effect_GetPropertyName(effect, index, buffer, ARRAY_SIZE(buffer)); + ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr); + ok(!wcscmp(buffer, L"Int32Prop"), "Unexpected name %s.\n", wine_dbgstr_w(buffer)); + prop_type = ID2D1Effect_GetType(effect, index); + ok(prop_type == D2D1_PROPERTY_TYPE_INT32, "Unexpected type %u.\n", prop_type); + hr = ID2D1Effect_GetValue(effect, index, D2D1_PROPERTY_TYPE_INT32, (BYTE *)&_int32, sizeof(_int32)); + ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr); + ok(_int32 == -2, "Unexpected value %d.\n", _int32); + + /* UInt32 property. */ + index = ID2D1Effect_GetPropertyIndex(effect, L"UInt32Prop"); + hr = ID2D1Effect_GetPropertyName(effect, index, buffer, ARRAY_SIZE(buffer)); + ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr); + ok(!wcscmp(buffer, L"UInt32Prop"), "Unexpected name %s.\n", wine_dbgstr_w(buffer)); + prop_type = ID2D1Effect_GetType(effect, index); + ok(prop_type == D2D1_PROPERTY_TYPE_UINT32, "Unexpected type %u.\n", prop_type); + hr = ID2D1Effect_GetValue(effect, index, D2D1_PROPERTY_TYPE_UINT32, (BYTE *)&integer, sizeof(integer)); + ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr); + ok(integer == -3, "Unexpected value %u.\n", integer); + /* Vector2 property. */ index = ID2D1Effect_GetPropertyIndex(effect, L"Vec2Prop"); hr = ID2D1Effect_GetPropertyName(effect, index, buffer, ARRAY_SIZE(buffer));
1
0
0
0
Nikolay Sivov : d2d1/effect: Support parsing vector4 property values.
by Alexandre Julliard
04 Jul '22
04 Jul '22
Module: wine Branch: master Commit: 618141d8179beb5a0b44f370c9d6a73eae86e96a URL:
https://source.winehq.org/git/wine.git/?a=commit;h=618141d8179beb5a0b44f370…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Sat Jul 2 15:45:13 2022 +0300 d2d1/effect: Support parsing vector4 property values. Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com> --- dlls/d2d1/effect.c | 1 + dlls/d2d1/tests/d2d1.c | 18 +++++++++++++++++- 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/dlls/d2d1/effect.c b/dlls/d2d1/effect.c index a2cb08ac873..154b3c35a1b 100644 --- a/dlls/d2d1/effect.c +++ b/dlls/d2d1/effect.c @@ -361,6 +361,7 @@ static HRESULT d2d_effect_properties_internal_add(struct d2d_effect_properties * break; case D2D1_PROPERTY_TYPE_VECTOR2: case D2D1_PROPERTY_TYPE_VECTOR3: + case D2D1_PROPERTY_TYPE_VECTOR4: if (FAILED(hr = d2d_effect_parse_vector_value(p->type, value, _vec))) { WARN("Failed to parse vector value %s.\n", wine_dbgstr_w(value)); diff --git a/dlls/d2d1/tests/d2d1.c b/dlls/d2d1/tests/d2d1.c index f76ad185f3e..d796d738077 100644 --- a/dlls/d2d1/tests/d2d1.c +++ b/dlls/d2d1/tests/d2d1.c @@ -62,6 +62,10 @@ L"<?xml version='1.0'?> \ <Property name='DisplayName' type='string' value='Vec3 prop'/> \ <Property name='Default' type='vector3' value='(0.1, 0.2, 0.3)'/> \ </Property> \ + <Property name='Vec4Prop' type='vector4' value='(8.0,9.0,10.0,11.0)'> \ + <Property name='DisplayName' type='string' value='Vec4 prop'/> \ + <Property name='Default' type='vector4' value='(0.8,0.9,1.0,1.1)'/> \ + </Property> \ </Effect> \ "; @@ -11030,11 +11034,11 @@ static void test_effect_properties(BOOL d3d11) UINT32 i, min_inputs, max_inputs, integer, index, size; ID2D1EffectContext *effect_context; D2D1_BUFFER_PRECISION precision; + float vec2[2], vec3[3], vec4[4]; ID2D1Properties *subproperties; D2D1_PROPERTY_TYPE prop_type; struct d2d1_test_context ctx; ID2D1Factory1 *factory; - float vec2[2], vec3[3]; ID2D1Effect *effect; UINT32 count, data; WCHAR buffer[128]; @@ -11152,6 +11156,18 @@ static void test_effect_properties(BOOL d3d11) ok(vec3[0] == 5.0f && vec3[1] == 6.0f && vec3[2] == 7.0f, "Unexpected vector (%.8e,%.8e,%.8e).\n", vec3[0], vec3[1], vec3[2]); + /* Vector4 property. */ + index = ID2D1Effect_GetPropertyIndex(effect, L"Vec4Prop"); + hr = ID2D1Effect_GetPropertyName(effect, index, buffer, ARRAY_SIZE(buffer)); + ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr); + ok(!wcscmp(buffer, L"Vec4Prop"), "Unexpected name %s.\n", wine_dbgstr_w(buffer)); + prop_type = ID2D1Effect_GetType(effect, index); + ok(prop_type == D2D1_PROPERTY_TYPE_VECTOR4, "Unexpected type %u.\n", prop_type); + hr = ID2D1Effect_GetValue(effect, index, D2D1_PROPERTY_TYPE_VECTOR4, (BYTE *)vec4, sizeof(vec4)); + ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr); + ok(vec4[0] == 8.0f && vec4[1] == 9.0f && vec4[2] == 10.0f && vec4[3] == 11.0f, + "Unexpected vector (%.8e,%.8e,%.8e,%.8e).\n", vec4[0], vec4[1], vec4[2], vec4[3]); + ID2D1Effect_Release(effect); hr = ID2D1Factory1_UnregisterEffect(factory, &CLSID_TestEffect);
1
0
0
0
Nikolay Sivov : d2d1/effect: Support parsing vector3 property values.
by Alexandre Julliard
04 Jul '22
04 Jul '22
Module: wine Branch: master Commit: 3c2ce1039c1e9e9f25ebf7f4cb56b8a508322ffa URL:
https://source.winehq.org/git/wine.git/?a=commit;h=3c2ce1039c1e9e9f25ebf7f4…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Sat Jul 2 15:40:52 2022 +0300 d2d1/effect: Support parsing vector3 property values. Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com> --- dlls/d2d1/effect.c | 1 + dlls/d2d1/tests/d2d1.c | 20 ++++++++++++++++++-- 2 files changed, 19 insertions(+), 2 deletions(-) diff --git a/dlls/d2d1/effect.c b/dlls/d2d1/effect.c index 7cfed6577c4..a2cb08ac873 100644 --- a/dlls/d2d1/effect.c +++ b/dlls/d2d1/effect.c @@ -360,6 +360,7 @@ static HRESULT d2d_effect_properties_internal_add(struct d2d_effect_properties * src = &_clsid; break; case D2D1_PROPERTY_TYPE_VECTOR2: + case D2D1_PROPERTY_TYPE_VECTOR3: if (FAILED(hr = d2d_effect_parse_vector_value(p->type, value, _vec))) { WARN("Failed to parse vector value %s.\n", wine_dbgstr_w(value)); diff --git a/dlls/d2d1/tests/d2d1.c b/dlls/d2d1/tests/d2d1.c index b7eab5003d7..f76ad185f3e 100644 --- a/dlls/d2d1/tests/d2d1.c +++ b/dlls/d2d1/tests/d2d1.c @@ -58,6 +58,10 @@ L"<?xml version='1.0'?> \ <Property name='DisplayName' type='string' value='Vec2 prop'/> \ <Property name='Default' type='vector2' value='(1.0, 2.0)'/> \ </Property> \ + <Property name='Vec3Prop' type='vector3' value='(5.0, 6.0, 7.0)'> \ + <Property name='DisplayName' type='string' value='Vec3 prop'/> \ + <Property name='Default' type='vector3' value='(0.1, 0.2, 0.3)'/> \ + </Property> \ </Effect> \ "; @@ -11030,10 +11034,10 @@ static void test_effect_properties(BOOL d3d11) D2D1_PROPERTY_TYPE prop_type; struct d2d1_test_context ctx; ID2D1Factory1 *factory; + float vec2[2], vec3[3]; ID2D1Effect *effect; UINT32 count, data; WCHAR buffer[128]; - float vec2[2]; CLSID clsid; BOOL cached; HRESULT hr; @@ -11125,7 +11129,7 @@ static void test_effect_properties(BOOL d3d11) ID2D1Properties_Release(subproperties); - /* Vector2 property */ + /* Vector2 property. */ index = ID2D1Effect_GetPropertyIndex(effect, L"Vec2Prop"); hr = ID2D1Effect_GetPropertyName(effect, index, buffer, ARRAY_SIZE(buffer)); ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr); @@ -11136,6 +11140,18 @@ static void test_effect_properties(BOOL d3d11) ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr); ok(vec2[0] == 3.0f && vec2[1] == 4.0f, "Unexpected vector (%.8e,%.8e).\n", vec2[0], vec2[1]); + /* Vector3 property. */ + index = ID2D1Effect_GetPropertyIndex(effect, L"Vec3Prop"); + hr = ID2D1Effect_GetPropertyName(effect, index, buffer, ARRAY_SIZE(buffer)); + ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr); + ok(!wcscmp(buffer, L"Vec3Prop"), "Unexpected name %s.\n", wine_dbgstr_w(buffer)); + prop_type = ID2D1Effect_GetType(effect, index); + ok(prop_type == D2D1_PROPERTY_TYPE_VECTOR3, "Unexpected type %u.\n", prop_type); + hr = ID2D1Effect_GetValue(effect, index, D2D1_PROPERTY_TYPE_VECTOR3, (BYTE *)vec3, sizeof(vec3)); + ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr); + ok(vec3[0] == 5.0f && vec3[1] == 6.0f && vec3[2] == 7.0f, "Unexpected vector (%.8e,%.8e,%.8e).\n", + vec3[0], vec3[1], vec3[2]); + ID2D1Effect_Release(effect); hr = ID2D1Factory1_UnregisterEffect(factory, &CLSID_TestEffect);
1
0
0
0
Nikolay Sivov : d2d1/effect: Support parsing vector2 property values.
by Alexandre Julliard
04 Jul '22
04 Jul '22
Module: wine Branch: master Commit: 258b57a1ce4edbaf07a2f7d7b20e101c142a03d3 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=258b57a1ce4edbaf07a2f7d7…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Sat Jul 2 15:36:11 2022 +0300 d2d1/effect: Support parsing vector2 property values. Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com> --- dlls/d2d1/effect.c | 39 +++++++++++++++++++++++++++++++++++++++ dlls/d2d1/tests/d2d1.c | 17 +++++++++++++++++ 2 files changed, 56 insertions(+) diff --git a/dlls/d2d1/effect.c b/dlls/d2d1/effect.c index 5daf16fd838..7cfed6577c4 100644 --- a/dlls/d2d1/effect.c +++ b/dlls/d2d1/effect.c @@ -229,6 +229,35 @@ static const struct d2d_effect_info builtin_effects[] = {&CLSID_D2D1Grayscale, 1, 1, 1}, }; +/* Same syntax is used for value and default values. */ +static HRESULT d2d_effect_parse_vector_value(D2D1_PROPERTY_TYPE type, const WCHAR *value, + float *vec) +{ + unsigned int i, num_components; + WCHAR *end_ptr; + + assert(type == D2D1_PROPERTY_TYPE_VECTOR2 || type == D2D1_PROPERTY_TYPE_VECTOR3 + || type == D2D1_PROPERTY_TYPE_VECTOR4); + + if (*(value++) != '(') return E_INVALIDARG; + + /* Type values are sequential. */ + num_components = (type - D2D1_PROPERTY_TYPE_VECTOR2) + 2; + + for (i = 0; i < num_components; ++i) + { + vec[i] = wcstof(value, &end_ptr); + if (value == end_ptr) return E_INVALIDARG; + value = end_ptr; + + /* Trailing characters after last component are ignored. */ + if (i == num_components - 1) continue; + if (*(value++) != ',') return E_INVALIDARG; + } + + return S_OK; +} + static HRESULT d2d_effect_properties_internal_add(struct d2d_effect_properties *props, const WCHAR *name, UINT32 index, BOOL subprop, D2D1_PROPERTY_TYPE type, const WCHAR *value) { @@ -255,6 +284,7 @@ static HRESULT d2d_effect_properties_internal_add(struct d2d_effect_properties * sizeof(void *), /* D2D1_PROPERTY_TYPE_COLOR_CONTEXT */ }; struct d2d_effect_property *p; + HRESULT hr; assert(type >= D2D1_PROPERTY_TYPE_STRING && type <= D2D1_PROPERTY_TYPE_COLOR_CONTEXT); @@ -302,6 +332,7 @@ static HRESULT d2d_effect_properties_internal_add(struct d2d_effect_properties * { void *src = NULL; UINT32 _uint32; + float _vec[4]; CLSID _clsid; BOOL _bool; @@ -328,6 +359,14 @@ static HRESULT d2d_effect_properties_internal_add(struct d2d_effect_properties * CLSIDFromString(value, &_clsid); src = &_clsid; break; + case D2D1_PROPERTY_TYPE_VECTOR2: + if (FAILED(hr = d2d_effect_parse_vector_value(p->type, value, _vec))) + { + WARN("Failed to parse vector value %s.\n", wine_dbgstr_w(value)); + return hr; + } + src = _vec; + break; case D2D1_PROPERTY_TYPE_IUNKNOWN: case D2D1_PROPERTY_TYPE_COLOR_CONTEXT: break; diff --git a/dlls/d2d1/tests/d2d1.c b/dlls/d2d1/tests/d2d1.c index 9dfe1e760ba..b7eab5003d7 100644 --- a/dlls/d2d1/tests/d2d1.c +++ b/dlls/d2d1/tests/d2d1.c @@ -54,6 +54,10 @@ L"<?xml version='1.0'?> \ <Property name='DisplayName' type='string' value='Bool property'/> \ <Property name='Default' type='bool' value='false'/> \ </Property> \ + <Property name='Vec2Prop' type='vector2' value='( 3.0, 4.0)'> \ + <Property name='DisplayName' type='string' value='Vec2 prop'/> \ + <Property name='Default' type='vector2' value='(1.0, 2.0)'/> \ + </Property> \ </Effect> \ "; @@ -11029,6 +11033,7 @@ static void test_effect_properties(BOOL d3d11) ID2D1Effect *effect; UINT32 count, data; WCHAR buffer[128]; + float vec2[2]; CLSID clsid; BOOL cached; HRESULT hr; @@ -11119,6 +11124,18 @@ static void test_effect_properties(BOOL d3d11) ok(!wcscmp(buffer, L"IsReadOnly"), "Unexpected name %s.\n", wine_dbgstr_w(buffer)); ID2D1Properties_Release(subproperties); + + /* Vector2 property */ + index = ID2D1Effect_GetPropertyIndex(effect, L"Vec2Prop"); + hr = ID2D1Effect_GetPropertyName(effect, index, buffer, ARRAY_SIZE(buffer)); + ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr); + ok(!wcscmp(buffer, L"Vec2Prop"), "Unexpected name %s.\n", wine_dbgstr_w(buffer)); + prop_type = ID2D1Effect_GetType(effect, index); + ok(prop_type == D2D1_PROPERTY_TYPE_VECTOR2, "Unexpected type %u.\n", prop_type); + hr = ID2D1Effect_GetValue(effect, index, D2D1_PROPERTY_TYPE_VECTOR2, (BYTE *)vec2, sizeof(vec2)); + ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr); + ok(vec2[0] == 3.0f && vec2[1] == 4.0f, "Unexpected vector (%.8e,%.8e).\n", vec2[0], vec2[1]); + ID2D1Effect_Release(effect); hr = ID2D1Factory1_UnregisterEffect(factory, &CLSID_TestEffect);
1
0
0
0
Nikolay Sivov : xmllite/reader: Use correct byte length when updating utf16 buffer contents marker.
by Alexandre Julliard
04 Jul '22
04 Jul '22
Module: wine Branch: master Commit: a49a2abff103193fae9cc26ebca2d69a6f8e41c5 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=a49a2abff103193fae9cc26e…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Sat Jul 2 17:44:22 2022 +0300 xmllite/reader: Use correct byte length when updating utf16 buffer contents marker. Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com> --- dlls/xmllite/reader.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dlls/xmllite/reader.c b/dlls/xmllite/reader.c index d99f121e0cb..118b7bd5ea2 100644 --- a/dlls/xmllite/reader.c +++ b/dlls/xmllite/reader.c @@ -1030,7 +1030,7 @@ static void readerinput_switchencoding(xmlreaderinput *readerinput, xml_encoding { readerinput_grow(readerinput, len); memcpy(dest->data, src->data + src->cur, len); - dest->written += len*sizeof(WCHAR); + dest->written += len; } else { @@ -1084,7 +1084,7 @@ static HRESULT reader_more(xmlreader *reader) { readerinput_grow(readerinput, len); memcpy(dest->data + dest->written, src->data + src->cur, len); - dest->written += len*sizeof(WCHAR); + dest->written += len; } else {
1
0
0
0
Piotr Caban : d3dx10/tests: Add D3DX10CreateThreadPump tests.
by Alexandre Julliard
04 Jul '22
04 Jul '22
Module: wine Branch: master Commit: a304924c61eac2dd2311160d30e24e61a3131de6 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=a304924c61eac2dd2311160d…
Author: Piotr Caban <piotr(a)codeweavers.com> Date: Sat Jun 11 15:14:34 2022 +0200 d3dx10/tests: Add D3DX10CreateThreadPump tests. Signed-off-by: Piotr Caban <piotr(a)codeweavers.com> Signed-off-by: Matteo Bruni <mbruni(a)codeweavers.com> --- dlls/d3dx10_43/tests/d3dx10.c | 373 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 373 insertions(+) Diff:
https://source.winehq.org/git/wine.git/?a=commitdiff;h=a304924c61eac2dd2311…
1
0
0
0
← Newer
1
...
58
59
60
61
62
63
64
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
Results per page:
10
25
50
100
200