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
June 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
633 discussions
Start a n
N
ew thread
Zebediah Figura : wow32: Use spec file imports.
by Alexandre Julliard
05 Jun '23
05 Jun '23
Module: wine Branch: master Commit: 47c8dcc96a68c29e54885d4a0b464f665fc766b4 URL:
https://gitlab.winehq.org/wine/wine/-/commit/47c8dcc96a68c29e54885d4a0b464f…
Author: Zebediah Figura <zfigura(a)codeweavers.com> Date: Tue May 30 23:21:43 2023 -0500 wow32: Use spec file imports. --- dlls/wow32/Makefile.in | 2 - dlls/wow32/wow32.spec | 34 +++++----- dlls/wow32/wow_main.c | 180 ------------------------------------------------- 3 files changed, 17 insertions(+), 199 deletions(-) diff --git a/dlls/wow32/Makefile.in b/dlls/wow32/Makefile.in index 5f0e13a7fb6..9b29b00dfb7 100644 --- a/dlls/wow32/Makefile.in +++ b/dlls/wow32/Makefile.in @@ -1,5 +1,3 @@ MODULE = wow32.dll IMPORTLIB = wow32 IMPORTS = kernel - -C_SRCS = wow_main.c diff --git a/dlls/wow32/wow32.spec b/dlls/wow32/wow32.spec index 5459685b487..6065a059b29 100644 --- a/dlls/wow32/wow32.spec +++ b/dlls/wow32/wow32.spec @@ -1,19 +1,19 @@ # ordinal exports -1 stdcall WOWGetDescriptor(long ptr) +1 stdcall -import WOWGetDescriptor(long ptr) K32WOWGetDescriptor -@ stdcall WOWCallback16(long long) -@ stdcall WOWCallback16Ex(long long long ptr ptr) -@ stdcall WOWDirectedYield16(long) -@ stdcall WOWGetVDMPointer(long long long) -@ stdcall WOWGetVDMPointerFix(long long long) -@ stdcall WOWGetVDMPointerUnfix(long) -@ stdcall WOWGlobalAlloc16(long long) -@ stdcall WOWGlobalAllocLock16(long long ptr) -@ stdcall WOWGlobalFree16(long) -@ stdcall WOWGlobalLock16(long) -@ stdcall WOWGlobalLockSize16(long ptr) -@ stdcall WOWGlobalUnlock16(long) -@ stdcall WOWGlobalUnlockFree16(long) -@ stdcall WOWHandle16(long long) -@ stdcall WOWHandle32(long long) -@ stdcall WOWYield16() +@ stdcall -import WOWCallback16(long long) K32WOWCallback16 +@ stdcall -import WOWCallback16Ex(long long long ptr ptr) K32WOWCallback16Ex +@ stdcall -import WOWDirectedYield16(long) K32WOWDirectedYield16 +@ stdcall -import WOWGetVDMPointer(long long long) K32WOWGetVDMPointer +@ stdcall -import WOWGetVDMPointerFix(long long long) K32WOWGetVDMPointerFix +@ stdcall -import WOWGetVDMPointerUnfix(long) K32WOWGetVDMPointerUnfix +@ stdcall -import WOWGlobalAlloc16(long long) K32WOWGlobalAlloc16 +@ stdcall -import WOWGlobalAllocLock16(long long ptr) K32WOWGlobalAllocLock16 +@ stdcall -import WOWGlobalFree16(long) K32WOWGlobalFree16 +@ stdcall -import WOWGlobalLock16(long) K32WOWGlobalLock16 +@ stdcall -import WOWGlobalLockSize16(long ptr) K32WOWGlobalLockSize16 +@ stdcall -import WOWGlobalUnlock16(long) K32WOWGlobalUnlock16 +@ stdcall -import WOWGlobalUnlockFree16(long) K32WOWGlobalUnlockFree16 +@ stdcall -import WOWHandle16(long long) K32WOWHandle16 +@ stdcall -import WOWHandle32(long long) K32WOWHandle32 +@ stdcall -import WOWYield16() K32WOWYield16 diff --git a/dlls/wow32/wow_main.c b/dlls/wow32/wow_main.c deleted file mode 100644 index e2795830d37..00000000000 --- a/dlls/wow32/wow_main.c +++ /dev/null @@ -1,180 +0,0 @@ -/* - * Win32 Windows-on-Windows support - * - * Copyright 2005 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 - */ - -#include <stdarg.h> -#include "windef.h" -#include "winbase.h" -#include "wownt32.h" - -#undef WOWCallback16 -#undef WOWCallback16Ex -#undef WOWDirectedYield16 -#undef WOWGetVDMPointer -#undef WOWGetVDMPointerFix -#undef WOWGetVDMPointerUnfix -#undef WOWGlobalAlloc16 -#undef WOWGlobalAllocLock16 -#undef WOWGlobalFree16 -#undef WOWGlobalLock16 -#undef WOWGlobalLockSize16 -#undef WOWGlobalUnlock16 -#undef WOWGlobalUnlockFree16 -#undef WOWHandle16 -#undef WOWHandle32 -#undef WOWYield16 - -BOOL WINAPI K32WOWGetDescriptor(DWORD,LPLDT_ENTRY); - -/********************************************************************** - * WOWGetDescriptor (WOW32.1) - */ -BOOL WINAPI WOWGetDescriptor( DWORD segptr, LPLDT_ENTRY ldtent ) -{ - return K32WOWGetDescriptor( segptr, ldtent ); -} - -/********************************************************************** - * WOWGetVDMPointer (WOW32.@) - */ -LPVOID WINAPI WOWGetVDMPointer( DWORD vp, DWORD dwBytes, BOOL fProtectedMode ) -{ - return K32WOWGetVDMPointer( vp, dwBytes, fProtectedMode ); -} - -/********************************************************************** - * WOWGetVDMPointerFix (WOW32.@) - */ -LPVOID WINAPI WOWGetVDMPointerFix( DWORD vp, DWORD dwBytes, BOOL fProtectedMode ) -{ - return K32WOWGetVDMPointerFix( vp, dwBytes, fProtectedMode ); -} - -/********************************************************************** - * WOWGetVDMPointerUnfix (WOW32.@) - */ -void WINAPI WOWGetVDMPointerUnfix( DWORD vp ) -{ - K32WOWGetVDMPointerUnfix( vp ); -} - -/********************************************************************** - * WOWGlobalAlloc16 (WOW32.@) - */ -WORD WINAPI WOWGlobalAlloc16( WORD wFlags, DWORD cb ) -{ - return K32WOWGlobalAlloc16( wFlags, cb ); -} - -/********************************************************************** - * WOWGlobalFree16 (WOW32.@) - */ -WORD WINAPI WOWGlobalFree16( WORD hMem ) -{ - return K32WOWGlobalFree16( hMem ); -} - -/********************************************************************** - * WOWGlobalLock16 (WOW32.@) - */ -DWORD WINAPI WOWGlobalLock16( WORD hMem ) -{ - return K32WOWGlobalLock16( hMem ); -} - -/********************************************************************** - * WOWGlobalUnlock16 (WOW32.@) - */ -BOOL WINAPI WOWGlobalUnlock16( WORD hMem ) -{ - return K32WOWGlobalUnlock16( hMem ); -} - -/********************************************************************** - * WOWGlobalAllocLock16 (WOW32.@) - */ -DWORD WINAPI WOWGlobalAllocLock16( WORD wFlags, DWORD cb, WORD *phMem ) -{ - return K32WOWGlobalAllocLock16( wFlags, cb, phMem ); -} - -/********************************************************************** - * WOWGlobalLockSize16 (WOW32.@) - */ -DWORD WINAPI WOWGlobalLockSize16( WORD hMem, PDWORD pcb ) -{ - return K32WOWGlobalLockSize16( hMem, pcb ); -} - -/********************************************************************** - * WOWGlobalUnlockFree16 (WOW32.@) - */ -WORD WINAPI WOWGlobalUnlockFree16( DWORD vpMem ) -{ - return K32WOWGlobalUnlockFree16( vpMem ); -} - -/********************************************************************** - * WOWYield16 (WOW32.@) - */ -void WINAPI WOWYield16(void) -{ - K32WOWYield16(); -} - -/********************************************************************** - * WOWDirectedYield16 (WOW32.@) - */ -void WINAPI WOWDirectedYield16( WORD htask16 ) -{ - K32WOWDirectedYield16( htask16 ); -} - -/*********************************************************************** - * WOWHandle32 (WOW32.@) - */ -HANDLE WINAPI WOWHandle32( WORD handle, WOW_HANDLE_TYPE type ) -{ - return K32WOWHandle32( handle, type ); -} - -/*********************************************************************** - * WOWHandle16 (WOW32.@) - */ -WORD WINAPI WOWHandle16( HANDLE handle, WOW_HANDLE_TYPE type ) -{ - return K32WOWHandle16( handle, type ); -} - -/********************************************************************** - * WOWCallback16Ex (WOW32.@) - */ -BOOL WINAPI WOWCallback16Ex( DWORD vpfn16, DWORD dwFlags, - DWORD cbArgs, PVOID pArgs, PDWORD pdwRetCode ) -{ - return K32WOWCallback16Ex( vpfn16, dwFlags, cbArgs, pArgs, pdwRetCode ); -} - -/********************************************************************** - * WOWCallback16 (WOW32.@) - */ -DWORD WINAPI WOWCallback16( DWORD vpfn16, DWORD dwParam ) -{ - return K32WOWCallback16( vpfn16, dwParam ); -}
1
0
0
0
Connor McAdams : uiautomationcore: Get IRawElementProviderAdviseEvents interfaces from embedded fragment root providers.
by Alexandre Julliard
05 Jun '23
05 Jun '23
Module: wine Branch: master Commit: 7e19aef0f3922f9e1b11b6686dbf7bb3d49e315e URL:
https://gitlab.winehq.org/wine/wine/-/commit/7e19aef0f3922f9e1b11b6686dbf7b…
Author: Connor McAdams <cmcadams(a)codeweavers.com> Date: Tue May 23 11:36:25 2023 -0400 uiautomationcore: Get IRawElementProviderAdviseEvents interfaces from embedded fragment root providers. Signed-off-by: Connor McAdams <cmcadams(a)codeweavers.com> --- dlls/uiautomationcore/tests/uiautomation.c | 14 +++---- dlls/uiautomationcore/uia_client.c | 63 ++++++++++++++++++++++++++++-- 2 files changed, 66 insertions(+), 11 deletions(-) diff --git a/dlls/uiautomationcore/tests/uiautomation.c b/dlls/uiautomationcore/tests/uiautomation.c index 3ff530057f6..838ff3fbe11 100644 --- a/dlls/uiautomationcore/tests/uiautomation.c +++ b/dlls/uiautomationcore/tests/uiautomation.c @@ -13746,7 +13746,7 @@ static const struct prov_method_sequence event_seq5[] = { { &Provider, FRAG_GET_RUNTIME_ID, METHOD_OPTIONAL }, /* Only done on Win10v1809+. */ { &Provider, FRAG_GET_FRAGMENT_ROOT }, { &Provider, FRAG_GET_FRAGMENT_ROOT, METHOD_OPTIONAL }, /* Called twice on Win11. */ - { &Provider, FRAG_GET_EMBEDDED_FRAGMENT_ROOTS, METHOD_TODO }, + { &Provider, FRAG_GET_EMBEDDED_FRAGMENT_ROOTS }, NODE_CREATE_SEQ_OPTIONAL(&Provider), /* Only done in Win11. */ { &Provider, FRAG_GET_RUNTIME_ID, METHOD_OPTIONAL }, /* Only done on Win8+. */ { &Provider, PROV_GET_PROVIDER_OPTIONS, METHOD_OPTIONAL }, /* Only done on Win10v1809+. */ @@ -13756,8 +13756,8 @@ static const struct prov_method_sequence event_seq5[] = { static const struct prov_method_sequence event_seq6[] = { { &Provider, ADVISE_EVENTS_EVENT_REMOVED }, - { &Provider_child, ADVISE_EVENTS_EVENT_REMOVED, METHOD_TODO }, - { &Provider_child2, ADVISE_EVENTS_EVENT_REMOVED, METHOD_TODO }, + { &Provider_child, ADVISE_EVENTS_EVENT_REMOVED }, + { &Provider_child2, ADVISE_EVENTS_EVENT_REMOVED }, { 0 }, }; @@ -14121,13 +14121,13 @@ static void test_UiaAddEvent(void) ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); ok(!!event, "event == NULL\n"); ok(Provider.ref == 3, "Unexpected refcnt %ld\n", Provider.ref); - todo_wine ok(Provider_child.ref == 2, "Unexpected refcnt %ld\n", Provider_child.ref); - todo_wine ok(Provider_child2.ref == 2, "Unexpected refcnt %ld\n", Provider_child2.ref); + ok(Provider_child.ref == 2, "Unexpected refcnt %ld\n", Provider_child.ref); + ok(Provider_child2.ref == 2, "Unexpected refcnt %ld\n", Provider_child2.ref); ok(Provider.advise_events_added_event_id == UIA_AutomationFocusChangedEventId, "Unexpected advise event added, event ID %d\n", Provider.advise_events_added_event_id); - todo_wine ok(Provider_child.advise_events_added_event_id == UIA_AutomationFocusChangedEventId, + ok(Provider_child.advise_events_added_event_id == UIA_AutomationFocusChangedEventId, "Unexpected advise event added, event ID %d\n", Provider_child.advise_events_added_event_id); - todo_wine ok(Provider_child2.advise_events_added_event_id == UIA_AutomationFocusChangedEventId, + ok(Provider_child2.advise_events_added_event_id == UIA_AutomationFocusChangedEventId, "Unexpected advise event added, event ID %d\n", Provider_child2.advise_events_added_event_id); method_sequences_enabled = TRUE; diff --git a/dlls/uiautomationcore/uia_client.c b/dlls/uiautomationcore/uia_client.c index 32f16c0731d..9c5595eaf4b 100644 --- a/dlls/uiautomationcore/uia_client.c +++ b/dlls/uiautomationcore/uia_client.c @@ -1722,6 +1722,7 @@ static HRESULT WINAPI uia_provider_attach_event(IWineUiaProvider *iface, LONG_PT struct uia_event *event = (struct uia_event *)huiaevent; IRawElementProviderFragmentRoot *elroot; IRawElementProviderFragment *elfrag; + SAFEARRAY *embedded_roots = NULL; HRESULT hr; TRACE("%p, %#Ix\n", iface, huiaevent); @@ -1731,9 +1732,19 @@ static HRESULT WINAPI uia_provider_attach_event(IWineUiaProvider *iface, LONG_PT return S_OK; hr = IRawElementProviderFragment_get_FragmentRoot(elfrag, &elroot); - IRawElementProviderFragment_Release(elfrag); if (FAILED(hr)) - return hr; + goto exit; + + /* + * For now, we only support embedded fragment roots on providers that + * don't represent a nested node. + */ + if (event->scope & (TreeScope_Descendants | TreeScope_Children) && !prov->return_nested_node) + { + hr = IRawElementProviderFragment_GetEmbeddedFragmentRoots(elfrag, &embedded_roots); + if (FAILED(hr)) + WARN("GetEmbeddedFragmentRoots failed with hr %#lx\n", hr); + } if (elroot) { @@ -1747,11 +1758,55 @@ static HRESULT WINAPI uia_provider_attach_event(IWineUiaProvider *iface, LONG_PT hr = uia_event_add_provider_event_adviser(advise_events, event); IRawElementProviderAdviseEvents_Release(advise_events); if (FAILED(hr)) - return hr; + goto exit; } } - return S_OK; + if (embedded_roots) + { + LONG lbound, elems, i; + HUIANODE node; + + hr = get_safearray_bounds(embedded_roots, &lbound, &elems); + if (FAILED(hr)) + goto exit; + + for (i = 0; i < elems; i++) + { + IRawElementProviderSimple *elprov; + IUnknown *unk; + LONG idx; + + idx = lbound + i; + hr = SafeArrayGetElement(embedded_roots, &idx, &unk); + if (FAILED(hr)) + goto exit; + + hr = IUnknown_QueryInterface(unk, &IID_IRawElementProviderSimple, (void **)&elprov); + IUnknown_Release(unk); + if (FAILED(hr)) + goto exit; + + hr = create_uia_node_from_elprov(elprov, &node, !prov->return_nested_node); + IRawElementProviderSimple_Release(elprov); + if (SUCCEEDED(hr)) + { + hr = attach_event_to_uia_node(node, event); + UiaNodeRelease(node); + if (FAILED(hr)) + { + WARN("attach_event_to_uia_node failed with hr %#lx\n", hr); + goto exit; + } + } + } + } + +exit: + IRawElementProviderFragment_Release(elfrag); + SafeArrayDestroy(embedded_roots); + + return hr; } static const IWineUiaProviderVtbl uia_provider_vtbl = {
1
0
0
0
Connor McAdams : uiautomationcore: Respect ProviderOptions_UseComThreading on advise events interfaces.
by Alexandre Julliard
05 Jun '23
05 Jun '23
Module: wine Branch: master Commit: 1122fde4458d798fbdab5373146974de9b75337c URL:
https://gitlab.winehq.org/wine/wine/-/commit/1122fde4458d798fbdab5373146974…
Author: Connor McAdams <cmcadams(a)codeweavers.com> Date: Wed May 10 13:25:00 2023 -0400 uiautomationcore: Respect ProviderOptions_UseComThreading on advise events interfaces. Signed-off-by: Connor McAdams <cmcadams(a)codeweavers.com> --- dlls/uiautomationcore/tests/uiautomation.c | 2 +- dlls/uiautomationcore/uia_classes.idl | 10 ++ dlls/uiautomationcore/uia_event.c | 149 +++++++++++++++++++++++++++-- dlls/uiautomationcore/uia_private.h | 2 +- 4 files changed, 151 insertions(+), 12 deletions(-) diff --git a/dlls/uiautomationcore/tests/uiautomation.c b/dlls/uiautomationcore/tests/uiautomation.c index 2dd35199186..3ff530057f6 100644 --- a/dlls/uiautomationcore/tests/uiautomation.c +++ b/dlls/uiautomationcore/tests/uiautomation.c @@ -13810,7 +13810,7 @@ static DWORD WINAPI uia_add_event_test_thread(LPVOID param) ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); ok(Provider.ref == 2, "Unexpected refcnt %ld\n", Provider.ref); ok(Provider2.ref == 1, "Unexpected refcnt %ld\n", Provider2.ref); - todo_wine ok(Provider2.last_call_tid == data->exp_thread_id || + ok(Provider2.last_call_tid == data->exp_thread_id || broken(Provider2.last_call_tid == GetCurrentThreadId()), "Expected method call on separate thread\n"); ok(Provider2.advise_events_removed_event_id == UIA_AutomationFocusChangedEventId, "Unexpected advise event removed, event ID %d\n", Provider.advise_events_removed_event_id); diff --git a/dlls/uiautomationcore/uia_classes.idl b/dlls/uiautomationcore/uia_classes.idl index 3697a4024f5..79bf8556326 100644 --- a/dlls/uiautomationcore/uia_classes.idl +++ b/dlls/uiautomationcore/uia_classes.idl @@ -54,6 +54,16 @@ library UIA_wine_private { importlib("stdole2.tlb"); + [ + object, + uuid(9a754e12-e570-49ab-b223-6f6871007d28), + pointer_default(unique), + ] + interface IWineUiaEventAdviser : IUnknown + { + HRESULT advise([in]BOOL advise_added, [in]LONG_PTR huiaevent); + } + [ object, uuid(5e60162c-ab0e-4e22-a61d-3a3acd442aba), diff --git a/dlls/uiautomationcore/uia_event.c b/dlls/uiautomationcore/uia_event.c index f627e1813cd..7fd4eda8ead 100644 --- a/dlls/uiautomationcore/uia_event.c +++ b/dlls/uiautomationcore/uia_event.c @@ -63,7 +63,7 @@ static ULONG WINAPI uia_event_Release(IWineUiaEvent *iface) SafeArrayDestroy(event->runtime_id); for (i = 0; i < event->event_advisers_count; i++) - IRawElementProviderAdviseEvents_Release(event->event_advisers[i]); + IWineUiaEventAdviser_Release(event->event_advisers[i]); heap_free(event->event_advisers); heap_free(event); } @@ -81,12 +81,7 @@ static HRESULT WINAPI uia_event_advise_events(IWineUiaEvent *iface, BOOL advise_ for (i = 0; i < event->event_advisers_count; i++) { - IRawElementProviderAdviseEvents *adviser = event->event_advisers[i]; - - if (advise_added) - hr = IRawElementProviderAdviseEvents_AdviseEventAdded(adviser, event->event_id, NULL); - else - hr = IRawElementProviderAdviseEvents_AdviseEventRemoved(adviser, event->event_id, NULL); + hr = IWineUiaEventAdviser_advise(event->event_advisers[i], advise_added, (UINT_PTR)event); if (FAILED(hr)) return hr; } @@ -95,7 +90,7 @@ static HRESULT WINAPI uia_event_advise_events(IWineUiaEvent *iface, BOOL advise_ if (!advise_added) { for (i = 0; i < event->event_advisers_count; i++) - IRawElementProviderAdviseEvents_Release(event->event_advisers[i]); + IWineUiaEventAdviser_Release(event->event_advisers[i]); heap_free(event->event_advisers); event->event_advisers_count = event->event_advisers_arr_size = 0; } @@ -138,14 +133,148 @@ static HRESULT create_uia_event(struct uia_event **out_event, int event_id, int return S_OK; } +/* + * IWineUiaEventAdviser interface. + */ +struct uia_event_adviser { + IWineUiaEventAdviser IWineUiaEventAdviser_iface; + LONG ref; + + IRawElementProviderAdviseEvents *advise_events; + DWORD git_cookie; +}; + +static inline struct uia_event_adviser *impl_from_IWineUiaEventAdviser(IWineUiaEventAdviser *iface) +{ + return CONTAINING_RECORD(iface, struct uia_event_adviser, IWineUiaEventAdviser_iface); +} + +static HRESULT WINAPI uia_event_adviser_QueryInterface(IWineUiaEventAdviser *iface, REFIID riid, void **ppv) +{ + *ppv = NULL; + if (IsEqualIID(riid, &IID_IWineUiaEventAdviser) || IsEqualIID(riid, &IID_IUnknown)) + *ppv = iface; + else + return E_NOINTERFACE; + + IWineUiaEventAdviser_AddRef(iface); + return S_OK; +} + +static ULONG WINAPI uia_event_adviser_AddRef(IWineUiaEventAdviser *iface) +{ + struct uia_event_adviser *adv_events = impl_from_IWineUiaEventAdviser(iface); + ULONG ref = InterlockedIncrement(&adv_events->ref); + + TRACE("%p, refcount %ld\n", adv_events, ref); + return ref; +} + +static ULONG WINAPI uia_event_adviser_Release(IWineUiaEventAdviser *iface) +{ + struct uia_event_adviser *adv_events = impl_from_IWineUiaEventAdviser(iface); + ULONG ref = InterlockedDecrement(&adv_events->ref); + + TRACE("%p, refcount %ld\n", adv_events, ref); + if (!ref) + { + if (adv_events->git_cookie) + { + if (FAILED(unregister_interface_in_git(adv_events->git_cookie))) + WARN("Failed to revoke advise events interface from GIT\n"); + } + IRawElementProviderAdviseEvents_Release(adv_events->advise_events); + heap_free(adv_events); + } + + return ref; +} + +static HRESULT WINAPI uia_event_adviser_advise(IWineUiaEventAdviser *iface, BOOL advise_added, LONG_PTR huiaevent) +{ + struct uia_event_adviser *adv_events = impl_from_IWineUiaEventAdviser(iface); + struct uia_event *event_data = (struct uia_event *)huiaevent; + IRawElementProviderAdviseEvents *advise_events; + HRESULT hr; + + TRACE("%p, %d, %#Ix\n", adv_events, advise_added, huiaevent); + + if (adv_events->git_cookie) + { + hr = get_interface_in_git(&IID_IRawElementProviderAdviseEvents, adv_events->git_cookie, + (IUnknown **)&advise_events); + if (FAILED(hr)) + return hr; + } + else + { + advise_events = adv_events->advise_events; + IRawElementProviderAdviseEvents_AddRef(advise_events); + } + + if (advise_added) + hr = IRawElementProviderAdviseEvents_AdviseEventAdded(advise_events, event_data->event_id, NULL); + else + hr = IRawElementProviderAdviseEvents_AdviseEventRemoved(advise_events, event_data->event_id, NULL); + + IRawElementProviderAdviseEvents_Release(advise_events); + return hr; +} + +static const IWineUiaEventAdviserVtbl uia_event_adviser_vtbl = { + uia_event_adviser_QueryInterface, + uia_event_adviser_AddRef, + uia_event_adviser_Release, + uia_event_adviser_advise, +}; + HRESULT uia_event_add_provider_event_adviser(IRawElementProviderAdviseEvents *advise_events, struct uia_event *event) { + struct uia_event_adviser *adv_events; + IRawElementProviderSimple *elprov; + enum ProviderOptions prov_opts; + HRESULT hr; + + hr = IRawElementProviderAdviseEvents_QueryInterface(advise_events, &IID_IRawElementProviderSimple, + (void **)&elprov); + if (FAILED(hr)) + { + ERR("Failed to get IRawElementProviderSimple from advise events\n"); + return E_FAIL; + } + + hr = IRawElementProviderSimple_get_ProviderOptions(elprov, &prov_opts); + IRawElementProviderSimple_Release(elprov); + if (FAILED(hr)) + return hr; + + if (!(adv_events = heap_alloc_zero(sizeof(*adv_events)))) + return E_OUTOFMEMORY; + + if (prov_opts & ProviderOptions_UseComThreading) + { + hr = register_interface_in_git((IUnknown *)advise_events, &IID_IRawElementProviderAdviseEvents, + &adv_events->git_cookie); + if (FAILED(hr)) + { + heap_free(adv_events); + return hr; + } + } + + adv_events->IWineUiaEventAdviser_iface.lpVtbl = &uia_event_adviser_vtbl; + adv_events->ref = 1; + adv_events->advise_events = advise_events; + IRawElementProviderAdviseEvents_AddRef(advise_events); + if (!uia_array_reserve((void **)&event->event_advisers, &event->event_advisers_arr_size, event->event_advisers_count + 1, sizeof(*event->event_advisers))) + { + IWineUiaEventAdviser_Release(&adv_events->IWineUiaEventAdviser_iface); return E_OUTOFMEMORY; + } - event->event_advisers[event->event_advisers_count] = advise_events; - IRawElementProviderAdviseEvents_AddRef(advise_events); + event->event_advisers[event->event_advisers_count] = &adv_events->IWineUiaEventAdviser_iface; event->event_advisers_count++; return S_OK; diff --git a/dlls/uiautomationcore/uia_private.h b/dlls/uiautomationcore/uia_private.h index faec42f5d0e..bd5ca714b94 100644 --- a/dlls/uiautomationcore/uia_private.h +++ b/dlls/uiautomationcore/uia_private.h @@ -102,7 +102,7 @@ struct uia_event int event_id; int scope; - IRawElementProviderAdviseEvents **event_advisers; + IWineUiaEventAdviser **event_advisers; int event_advisers_count; SIZE_T event_advisers_arr_size;
1
0
0
0
Connor McAdams : uiautomationcore: Add global interface table helper functions.
by Alexandre Julliard
05 Jun '23
05 Jun '23
Module: wine Branch: master Commit: 68aa92d6b038d1ee8f6dcd3cda5ba90d27eadb98 URL:
https://gitlab.winehq.org/wine/wine/-/commit/68aa92d6b038d1ee8f6dcd3cda5ba9…
Author: Connor McAdams <cmcadams(a)codeweavers.com> Date: Fri Mar 17 15:31:16 2023 -0400 uiautomationcore: Add global interface table helper functions. Signed-off-by: Connor McAdams <cmcadams(a)codeweavers.com> --- dlls/uiautomationcore/uia_client.c | 65 ++++--------------------------- dlls/uiautomationcore/uia_private.h | 3 ++ dlls/uiautomationcore/uia_utils.c | 76 +++++++++++++++++++++++++++++++++++++ 3 files changed, 87 insertions(+), 57 deletions(-) diff --git a/dlls/uiautomationcore/uia_client.c b/dlls/uiautomationcore/uia_client.c index 9ea66e27d61..32f16c0731d 100644 --- a/dlls/uiautomationcore/uia_client.c +++ b/dlls/uiautomationcore/uia_client.c @@ -169,18 +169,6 @@ exit: } } -static HRESULT get_global_interface_table(IGlobalInterfaceTable **git) -{ - HRESULT hr; - - hr = CoCreateInstance(&CLSID_StdGlobalInterfaceTable, NULL, - CLSCTX_INPROC_SERVER, &IID_IGlobalInterfaceTable, (void **)git); - if (FAILED(hr)) - WARN("Failed to get GlobalInterfaceTable, hr %#lx\n", hr); - - return hr; -} - static HWND get_hwnd_from_provider(IRawElementProviderSimple *elprov) { IRawElementProviderSimple *host_prov; @@ -428,16 +416,8 @@ static ULONG WINAPI uia_node_Release(IWineUiaNode *iface) { if (node->git_cookie[i]) { - IGlobalInterfaceTable *git; - HRESULT hr; - - hr = get_global_interface_table(&git); - if (SUCCEEDED(hr)) - { - hr = IGlobalInterfaceTable_RevokeInterfaceFromGlobal(git, node->git_cookie[i]); - if (FAILED(hr)) - WARN("Failed to get revoke provider interface from Global Interface Table, hr %#lx\n", hr); - } + if (FAILED(unregister_interface_in_git(node->git_cookie[i]))) + WARN("Failed to get revoke provider interface from GIT\n"); } if (node->prov[i]) @@ -472,21 +452,13 @@ static HRESULT WINAPI uia_node_get_provider(IWineUiaNode *iface, int idx, IWineU prov_type = get_node_provider_type_at_idx(node, idx); if (node->git_cookie[prov_type]) { - IGlobalInterfaceTable *git; IWineUiaProvider *prov; HRESULT hr; - hr = get_global_interface_table(&git); + hr = get_interface_in_git(&IID_IWineUiaProvider, node->git_cookie[prov_type], (IUnknown **)&prov); if (FAILED(hr)) return hr; - hr = IGlobalInterfaceTable_GetInterfaceFromGlobal(git, node->git_cookie[prov_type], - &IID_IWineUiaProvider, (void **)&prov); - if (FAILED(hr)) - { - ERR("Failed to get provider interface from GlobalInterfaceTable, hr %#lx\n", hr); - return hr; - } *out_prov = prov; } else @@ -542,16 +514,8 @@ static HRESULT WINAPI uia_node_disconnect(IWineUiaNode *iface) prov_type = get_node_provider_type_at_idx(node, 0); if (node->git_cookie[prov_type]) { - IGlobalInterfaceTable *git; - HRESULT hr; - - hr = get_global_interface_table(&git); - if (SUCCEEDED(hr)) - { - hr = IGlobalInterfaceTable_RevokeInterfaceFromGlobal(git, node->git_cookie[prov_type]); - if (FAILED(hr)) - WARN("Failed to get revoke provider interface from Global Interface Table, hr %#lx\n", hr); - } + if (FAILED(unregister_interface_in_git(node->git_cookie[prov_type]))) + WARN("Failed to get revoke provider interface from GIT\n"); node->git_cookie[prov_type] = 0; } @@ -639,7 +603,6 @@ static HRESULT prepare_uia_node(struct uia_node *node) for (i = 0; i < PROV_TYPE_COUNT; i++) { enum ProviderOptions prov_opts; - IGlobalInterfaceTable *git; struct uia_provider *prov; HRESULT hr; @@ -660,12 +623,8 @@ static HRESULT prepare_uia_node(struct uia_node *node) */ if (prov_opts & ProviderOptions_UseComThreading) { - hr = get_global_interface_table(&git); - if (FAILED(hr)) - return hr; - - hr = IGlobalInterfaceTable_RegisterInterfaceInGlobal(git, (IUnknown *)&prov->IWineUiaProvider_iface, - &IID_IWineUiaProvider, &node->git_cookie[i]); + hr = register_interface_in_git((IUnknown *)&prov->IWineUiaProvider_iface, &IID_IWineUiaProvider, + &node->git_cookie[i]); if (FAILED(hr)) return hr; } @@ -2260,7 +2219,6 @@ static HRESULT create_wine_uia_nested_node_provider(struct uia_node *node, LRESU { IWineUiaProvider *provider_iface = NULL; struct uia_nested_node_provider *prov; - IGlobalInterfaceTable *git; IWineUiaNode *nested_node; int prov_opts, prov_type; DWORD git_cookie; @@ -2339,14 +2297,7 @@ static HRESULT create_wine_uia_nested_node_provider(struct uia_node *node, LRESU * We need to use the GIT on all nested node providers so that our * IWineUiaNode proxy is used in the correct apartment. */ - hr = get_global_interface_table(&git); - if (FAILED(hr)) - { - IWineUiaProvider_Release(&prov->IWineUiaProvider_iface); - return hr; - } - - hr = IGlobalInterfaceTable_RegisterInterfaceInGlobal(git, (IUnknown *)&prov->IWineUiaProvider_iface, + hr = register_interface_in_git((IUnknown *)(IUnknown *)&prov->IWineUiaProvider_iface, &IID_IWineUiaProvider, &git_cookie); if (FAILED(hr)) { diff --git a/dlls/uiautomationcore/uia_private.h b/dlls/uiautomationcore/uia_private.h index 5d3a64cb776..faec42f5d0e 100644 --- a/dlls/uiautomationcore/uia_private.h +++ b/dlls/uiautomationcore/uia_private.h @@ -179,6 +179,9 @@ HRESULT create_msaa_provider(IAccessible *acc, long child_id, HWND hwnd, BOOL kn IRawElementProviderSimple **elprov) DECLSPEC_HIDDEN; /* uia_utils.c */ +HRESULT register_interface_in_git(IUnknown *iface, REFIID riid, DWORD *ret_cookie) DECLSPEC_HIDDEN; +HRESULT unregister_interface_in_git(DWORD git_cookie) DECLSPEC_HIDDEN; +HRESULT get_interface_in_git(REFIID riid, DWORD git_cookie, IUnknown **ret_iface) DECLSPEC_HIDDEN; HRESULT get_safearray_dim_bounds(SAFEARRAY *sa, UINT dim, LONG *lbound, LONG *elems) DECLSPEC_HIDDEN; HRESULT get_safearray_bounds(SAFEARRAY *sa, LONG *lbound, LONG *elems) DECLSPEC_HIDDEN; int uia_compare_safearrays(SAFEARRAY *sa1, SAFEARRAY *sa2, int prop_type) DECLSPEC_HIDDEN; diff --git a/dlls/uiautomationcore/uia_utils.c b/dlls/uiautomationcore/uia_utils.c index 67c01eed8c3..ef7cf5ff9d2 100644 --- a/dlls/uiautomationcore/uia_utils.c +++ b/dlls/uiautomationcore/uia_utils.c @@ -22,6 +22,82 @@ WINE_DEFAULT_DEBUG_CHANNEL(uiautomation); +/* + * Global interface table helper functions. + */ +static HRESULT get_global_interface_table(IGlobalInterfaceTable **git) +{ + HRESULT hr; + + hr = CoCreateInstance(&CLSID_StdGlobalInterfaceTable, NULL, + CLSCTX_INPROC_SERVER, &IID_IGlobalInterfaceTable, (void **)git); + if (FAILED(hr)) + WARN("Failed to get GlobalInterfaceTable, hr %#lx\n", hr); + + return hr; +} + +HRESULT register_interface_in_git(IUnknown *iface, REFIID riid, DWORD *ret_cookie) +{ + IGlobalInterfaceTable *git; + DWORD git_cookie; + HRESULT hr; + + *ret_cookie = 0; + hr = get_global_interface_table(&git); + if (FAILED(hr)) + return hr; + + hr = IGlobalInterfaceTable_RegisterInterfaceInGlobal(git, iface, riid, &git_cookie); + if (FAILED(hr)) + { + WARN("Failed to register interface in GlobalInterfaceTable, hr %#lx\n", hr); + return hr; + } + + *ret_cookie = git_cookie; + + return S_OK; +} + +HRESULT unregister_interface_in_git(DWORD git_cookie) +{ + IGlobalInterfaceTable *git; + HRESULT hr; + + hr = get_global_interface_table(&git); + if (FAILED(hr)) + return hr; + + hr = IGlobalInterfaceTable_RevokeInterfaceFromGlobal(git, git_cookie); + if (FAILED(hr)) + WARN("Failed to revoke interface from GlobalInterfaceTable, hr %#lx\n", hr); + + return hr; +} + +HRESULT get_interface_in_git(REFIID riid, DWORD git_cookie, IUnknown **ret_iface) +{ + IGlobalInterfaceTable *git; + IUnknown *iface; + HRESULT hr; + + hr = get_global_interface_table(&git); + if (FAILED(hr)) + return hr; + + hr = IGlobalInterfaceTable_GetInterfaceFromGlobal(git, git_cookie, riid, (void **)&iface); + if (FAILED(hr)) + { + ERR("Failed to get interface from Global Interface Table, hr %#lx\n", hr); + return hr; + } + + *ret_iface = iface; + + return S_OK; +} + HRESULT get_safearray_dim_bounds(SAFEARRAY *sa, UINT dim, LONG *lbound, LONG *elems) { LONG ubound;
1
0
0
0
Connor McAdams : uiautomationcore: Put general purpose helper functions into separate source file.
by Alexandre Julliard
05 Jun '23
05 Jun '23
Module: wine Branch: master Commit: 3d0c9efc1eb113dc822ff61d5a6c4d6fa5523a0a URL:
https://gitlab.winehq.org/wine/wine/-/commit/3d0c9efc1eb113dc822ff61d5a6c4d…
Author: Connor McAdams <cmcadams(a)codeweavers.com> Date: Wed May 17 15:36:46 2023 -0400 uiautomationcore: Put general purpose helper functions into separate source file. Signed-off-by: Connor McAdams <cmcadams(a)codeweavers.com> --- dlls/uiautomationcore/Makefile.in | 3 +- dlls/uiautomationcore/uia_client.c | 87 ---------------------------- dlls/uiautomationcore/uia_private.h | 7 ++- dlls/uiautomationcore/uia_utils.c | 110 ++++++++++++++++++++++++++++++++++++ 4 files changed, 117 insertions(+), 90 deletions(-) diff --git a/dlls/uiautomationcore/Makefile.in b/dlls/uiautomationcore/Makefile.in index 8156807c334..f0f2a853cfb 100644 --- a/dlls/uiautomationcore/Makefile.in +++ b/dlls/uiautomationcore/Makefile.in @@ -10,7 +10,8 @@ C_SRCS = \ uia_event.c \ uia_ids.c \ uia_main.c \ - uia_provider.c + uia_provider.c \ + uia_utils.c IDL_SRCS = \ uia_classes.idl \ diff --git a/dlls/uiautomationcore/uia_client.c b/dlls/uiautomationcore/uia_client.c index 4a14fe8e48a..9ea66e27d61 100644 --- a/dlls/uiautomationcore/uia_client.c +++ b/dlls/uiautomationcore/uia_client.c @@ -58,93 +58,6 @@ static HRESULT add_node_to_node_array(struct uia_node_array *out_nodes, HUIANODE return S_OK; } -static HRESULT get_safearray_dim_bounds(SAFEARRAY *sa, UINT dim, LONG *lbound, LONG *elems) -{ - LONG ubound; - HRESULT hr; - - *lbound = *elems = 0; - hr = SafeArrayGetLBound(sa, dim, lbound); - if (FAILED(hr)) - return hr; - - hr = SafeArrayGetUBound(sa, dim, &ubound); - if (FAILED(hr)) - return hr; - - *elems = (ubound - (*lbound)) + 1; - return S_OK; -} - -HRESULT get_safearray_bounds(SAFEARRAY *sa, LONG *lbound, LONG *elems) -{ - UINT dims; - - *lbound = *elems = 0; - dims = SafeArrayGetDim(sa); - if (dims != 1) - { - WARN("Invalid dimensions %d for safearray.\n", dims); - return E_FAIL; - } - - return get_safearray_dim_bounds(sa, 1, lbound, elems); -} - -int uia_compare_safearrays(SAFEARRAY *sa1, SAFEARRAY *sa2, int prop_type) -{ - LONG i, idx, lbound[2], elems[2]; - int val[2]; - HRESULT hr; - - hr = get_safearray_bounds(sa1, &lbound[0], &elems[0]); - if (FAILED(hr)) - { - ERR("Failed to get safearray bounds from sa1 with hr %#lx\n", hr); - return -1; - } - - hr = get_safearray_bounds(sa2, &lbound[1], &elems[1]); - if (FAILED(hr)) - { - ERR("Failed to get safearray bounds from sa2 with hr %#lx\n", hr); - return -1; - } - - if (elems[0] != elems[1]) - return (elems[0] > elems[1]) - (elems[0] < elems[1]); - - if (prop_type != UIAutomationType_IntArray) - { - FIXME("Array type %#x value comparison currently unimplemented.\n", prop_type); - return -1; - } - - for (i = 0; i < elems[0]; i++) - { - idx = lbound[0] + i; - hr = SafeArrayGetElement(sa1, &idx, &val[0]); - if (FAILED(hr)) - { - ERR("Failed to get element from sa1 with hr %#lx\n", hr); - return -1; - } - - idx = lbound[1] + i; - hr = SafeArrayGetElement(sa2, &idx, &val[1]); - if (FAILED(hr)) - { - ERR("Failed to get element from sa2 with hr %#lx\n", hr); - return -1; - } - - if (val[0] != val[1]) - return (val[0] > val[1]) - (val[0] < val[1]); - } - - return 0; -} - static void clear_uia_node_ptr_safearray(SAFEARRAY *sa, LONG elems) { HUIANODE node; diff --git a/dlls/uiautomationcore/uia_private.h b/dlls/uiautomationcore/uia_private.h index 9ee5c30aeef..5d3a64cb776 100644 --- a/dlls/uiautomationcore/uia_private.h +++ b/dlls/uiautomationcore/uia_private.h @@ -152,8 +152,6 @@ static inline BOOL uia_array_reserve(void **elements, SIZE_T *capacity, SIZE_T c } /* uia_client.c */ -HRESULT get_safearray_bounds(SAFEARRAY *sa, LONG *lbound, LONG *elems) DECLSPEC_HIDDEN; -int uia_compare_safearrays(SAFEARRAY *sa1, SAFEARRAY *sa2, int prop_type) DECLSPEC_HIDDEN; int get_node_provider_type_at_idx(struct uia_node *node, int idx) DECLSPEC_HIDDEN; HRESULT attach_event_to_uia_node(HUIANODE node, struct uia_event *event) DECLSPEC_HIDDEN; HRESULT create_uia_node_from_elprov(IRawElementProviderSimple *elprov, HUIANODE *out_node, @@ -179,3 +177,8 @@ void uia_provider_thread_remove_node(HUIANODE node) DECLSPEC_HIDDEN; LRESULT uia_lresult_from_node(HUIANODE huianode) DECLSPEC_HIDDEN; HRESULT create_msaa_provider(IAccessible *acc, long child_id, HWND hwnd, BOOL known_root_acc, IRawElementProviderSimple **elprov) DECLSPEC_HIDDEN; + +/* uia_utils.c */ +HRESULT get_safearray_dim_bounds(SAFEARRAY *sa, UINT dim, LONG *lbound, LONG *elems) DECLSPEC_HIDDEN; +HRESULT get_safearray_bounds(SAFEARRAY *sa, LONG *lbound, LONG *elems) DECLSPEC_HIDDEN; +int uia_compare_safearrays(SAFEARRAY *sa1, SAFEARRAY *sa2, int prop_type) DECLSPEC_HIDDEN; diff --git a/dlls/uiautomationcore/uia_utils.c b/dlls/uiautomationcore/uia_utils.c new file mode 100644 index 00000000000..67c01eed8c3 --- /dev/null +++ b/dlls/uiautomationcore/uia_utils.c @@ -0,0 +1,110 @@ +/* + * Copyright 2023 Connor McAdams for CodeWeavers + * + * 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 + */ + +#include "uia_private.h" + +#include "wine/debug.h" + +WINE_DEFAULT_DEBUG_CHANNEL(uiautomation); + +HRESULT get_safearray_dim_bounds(SAFEARRAY *sa, UINT dim, LONG *lbound, LONG *elems) +{ + LONG ubound; + HRESULT hr; + + *lbound = *elems = 0; + hr = SafeArrayGetLBound(sa, dim, lbound); + if (FAILED(hr)) + return hr; + + hr = SafeArrayGetUBound(sa, dim, &ubound); + if (FAILED(hr)) + return hr; + + *elems = (ubound - (*lbound)) + 1; + return S_OK; +} + +HRESULT get_safearray_bounds(SAFEARRAY *sa, LONG *lbound, LONG *elems) +{ + UINT dims; + + *lbound = *elems = 0; + dims = SafeArrayGetDim(sa); + if (dims != 1) + { + WARN("Invalid dimensions %d for safearray.\n", dims); + return E_FAIL; + } + + return get_safearray_dim_bounds(sa, 1, lbound, elems); +} + +int uia_compare_safearrays(SAFEARRAY *sa1, SAFEARRAY *sa2, int prop_type) +{ + LONG i, idx, lbound[2], elems[2]; + int val[2]; + HRESULT hr; + + hr = get_safearray_bounds(sa1, &lbound[0], &elems[0]); + if (FAILED(hr)) + { + ERR("Failed to get safearray bounds from sa1 with hr %#lx\n", hr); + return -1; + } + + hr = get_safearray_bounds(sa2, &lbound[1], &elems[1]); + if (FAILED(hr)) + { + ERR("Failed to get safearray bounds from sa2 with hr %#lx\n", hr); + return -1; + } + + if (elems[0] != elems[1]) + return (elems[0] > elems[1]) - (elems[0] < elems[1]); + + if (prop_type != UIAutomationType_IntArray) + { + FIXME("Array type %#x value comparison currently unimplemented.\n", prop_type); + return -1; + } + + for (i = 0; i < elems[0]; i++) + { + idx = lbound[0] + i; + hr = SafeArrayGetElement(sa1, &idx, &val[0]); + if (FAILED(hr)) + { + ERR("Failed to get element from sa1 with hr %#lx\n", hr); + return -1; + } + + idx = lbound[1] + i; + hr = SafeArrayGetElement(sa2, &idx, &val[1]); + if (FAILED(hr)) + { + ERR("Failed to get element from sa2 with hr %#lx\n", hr); + return -1; + } + + if (val[0] != val[1]) + return (val[0] > val[1]) - (val[0] < val[1]); + } + + return 0; +}
1
0
0
0
Alexandre Julliard : xml2: Import upstream release 2.11.4.
by Alexandre Julliard
05 Jun '23
05 Jun '23
Module: wine Branch: master Commit: ad7b9726cbf7d7c595fe5a55de64476d58f13d7e URL:
https://gitlab.winehq.org/wine/wine/-/commit/ad7b9726cbf7d7c595fe5a55de6447…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Mon Jun 5 12:52:01 2023 +0200 xml2: Import upstream release 2.11.4. --- libs/xml2/HTMLparser.c | 519 ++--- libs/xml2/HTMLtree.c | 25 +- libs/xml2/SAX2.c | 131 +- libs/xml2/buf.c | 81 +- libs/xml2/buf.h | 67 - libs/xml2/catalog.c | 24 +- libs/xml2/chvalid.c | 2 + libs/xml2/debugXML.c | 4 +- libs/xml2/dict.c | 97 +- libs/xml2/enc.h | 32 - libs/xml2/encoding.c | 504 ++--- libs/xml2/entities.c | 19 +- libs/xml2/error.c | 68 +- libs/xml2/globals.c | 205 +- libs/xml2/hash.c | 66 +- libs/xml2/include/libxml/HTMLparser.h | 90 +- libs/xml2/include/libxml/HTMLtree.h | 36 +- libs/xml2/include/libxml/SAX.h | 72 +- libs/xml2/include/libxml/SAX2.h | 73 +- libs/xml2/include/libxml/catalog.h | 72 +- libs/xml2/include/libxml/chvalid.h | 18 +- libs/xml2/include/libxml/debugXML.h | 56 +- libs/xml2/include/libxml/dict.h | 26 +- libs/xml2/include/libxml/encoding.h | 39 +- libs/xml2/include/libxml/entities.h | 40 +- libs/xml2/include/libxml/globals.h | 148 +- libs/xml2/include/libxml/hash.h | 50 +- libs/xml2/include/libxml/list.h | 52 +- libs/xml2/include/libxml/nanoftp.h | 44 +- libs/xml2/include/libxml/nanohttp.h | 34 +- libs/xml2/include/libxml/parser.h | 173 +- libs/xml2/include/libxml/parserInternals.h | 292 +-- libs/xml2/include/libxml/pattern.h | 30 +- libs/xml2/include/libxml/relaxng.h | 48 +- libs/xml2/include/libxml/schemasInternals.h | 4 +- libs/xml2/include/libxml/threads.h | 43 +- libs/xml2/include/libxml/tree.h | 330 +-- libs/xml2/include/libxml/uri.h | 30 +- libs/xml2/include/libxml/valid.h | 155 +- libs/xml2/include/libxml/xinclude.h | 20 +- libs/xml2/include/libxml/xmlIO.h | 119 +- libs/xml2/include/libxml/xmlautomata.h | 42 +- libs/xml2/include/libxml/xmlerror.h | 54 +- libs/xml2/include/libxml/xmlexports.h | 57 +- libs/xml2/include/libxml/xmlmemory.h | 50 +- libs/xml2/include/libxml/xmlreader.h | 174 +- libs/xml2/include/libxml/xmlregexp.h | 60 +- libs/xml2/include/libxml/xmlsave.h | 20 +- libs/xml2/include/libxml/xmlschemas.h | 54 +- libs/xml2/include/libxml/xmlschemastypes.h | 68 +- libs/xml2/include/libxml/xmlstring.h | 58 +- libs/xml2/include/libxml/xmlunicode.h | 332 +-- libs/xml2/include/libxml/xmlversion.h | 77 +- libs/xml2/include/libxml/xpath.h | 82 +- libs/xml2/include/libxml/xpathInternals.h | 234 +- libs/xml2/include/libxml/xpointer.h | 42 +- libs/xml2/include/private/buf.h | 70 + libs/xml2/include/private/dict.h | 11 + libs/xml2/include/private/enc.h | 18 + libs/xml2/include/private/entities.h | 23 + libs/xml2/include/private/error.h | 21 + libs/xml2/include/private/globals.h | 9 + libs/xml2/include/private/html.h | 13 + libs/xml2/include/private/io.h | 19 + libs/xml2/include/private/memory.h | 9 + libs/xml2/include/private/parser.h | 33 + libs/xml2/include/private/regexp.h | 9 + libs/xml2/include/private/save.h | 17 + libs/xml2/include/private/string.h | 9 + libs/xml2/include/private/threads.h | 50 + libs/xml2/include/private/tree.h | 18 + libs/xml2/include/private/xinclude.h | 9 + libs/xml2/include/private/xpath.h | 7 + libs/xml2/include/win32config.h | 17 +- libs/xml2/libxml.h | 102 +- libs/xml2/parser.c | 3219 ++++++++++++--------------- libs/xml2/parserInternals.c | 744 ++++--- libs/xml2/pattern.c | 26 +- libs/xml2/relaxng.c | 17 +- libs/xml2/threads.c | 505 ++--- libs/xml2/tree.c | 238 +- libs/xml2/uri.c | 65 +- libs/xml2/valid.c | 159 +- libs/xml2/xinclude.c | 1247 +++++------ libs/xml2/xmlIO.c | 173 +- libs/xml2/xmlmemory.c | 200 +- libs/xml2/xmlreader.c | 56 +- libs/xml2/xmlregexp.c | 298 +-- libs/xml2/xmlsave.c | 64 +- libs/xml2/xmlschemas.c | 161 +- libs/xml2/xmlschemastypes.c | 235 +- libs/xml2/xmlstring.c | 31 +- libs/xml2/xpath.c | 744 +++---- libs/xml2/xpointer.c | 18 +- 94 files changed, 6898 insertions(+), 7108 deletions(-)
1
0
0
0
Alexandre Julliard : xslt: Import upstream release 1.1.38.
by Alexandre Julliard
05 Jun '23
05 Jun '23
Module: wine Branch: master Commit: 6b678a4e9b7bf0fcbdfbe49d75fa8911807fe9d1 URL:
https://gitlab.winehq.org/wine/wine/-/commit/6b678a4e9b7bf0fcbdfbe49d75fa89…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Mon Jun 5 12:09:29 2023 +0200 xslt: Import upstream release 1.1.38. --- libs/xslt/libxslt/attributes.c | 19 +- libs/xslt/libxslt/attributes.h | 1 + libs/xslt/libxslt/attrvt.c | 33 ++-- libs/xslt/libxslt/documents.c | 2 + libs/xslt/libxslt/extensions.c | 16 +- libs/xslt/libxslt/functions.c | 145 +++++++++++--- libs/xslt/libxslt/imports.c | 60 +++--- libs/xslt/libxslt/keys.c | 26 +-- libs/xslt/libxslt/numbers.c | 96 ++++++---- libs/xslt/libxslt/pattern.c | 92 +++------ libs/xslt/libxslt/preproc.c | 10 - libs/xslt/libxslt/templates.c | 4 +- libs/xslt/libxslt/transform.c | 117 ++++++++---- libs/xslt/libxslt/variables.c | 96 +++++----- libs/xslt/libxslt/variables.h | 6 +- libs/xslt/libxslt/xslt.c | 91 ++++----- libs/xslt/libxslt/xsltInternals.h | 18 +- libs/xslt/libxslt/xsltconfig.h | 6 +- libs/xslt/libxslt/xsltlocale.c | 150 +++++++++------ libs/xslt/libxslt/xsltlocale.h | 68 ++----- libs/xslt/libxslt/xsltutils.c | 386 +++++++++++++++++++++++++++++--------- libs/xslt/libxslt/xsltutils.h | 37 +++- 22 files changed, 927 insertions(+), 552 deletions(-)
1
0
0
0
Alexandre Julliard : nls: Update locale data to CLDR version 43.
by Alexandre Julliard
05 Jun '23
05 Jun '23
Module: wine Branch: master Commit: 50c5eb31cbcbfc2c158c1b2f9d00513676ee8b28 URL:
https://gitlab.winehq.org/wine/wine/-/commit/50c5eb31cbcbfc2c158c1b2f9d0051…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Sun Jun 4 18:26:01 2023 +0200 nls: Update locale data to CLDR version 43. --- nls/locale.nls | Bin 742598 -> 745142 bytes tools/make_unicode | 158 ++++++++++++++++++++++++++--------------------------- 2 files changed, 79 insertions(+), 79 deletions(-)
1
0
0
0
Alexandre Julliard : kernelbase: Update timezone data to version 2023c.
by Alexandre Julliard
05 Jun '23
05 Jun '23
Module: wine Branch: master Commit: 58bc99dce6ce30a9a343ba2532ebe6f2d8e04a1c URL:
https://gitlab.winehq.org/wine/wine/-/commit/58bc99dce6ce30a9a343ba2532ebe6…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Sun Jun 4 14:34:34 2023 +0200 kernelbase: Update timezone data to version 2023c. --- dlls/kernelbase/kernelbase.rgs | 38 ++++++++++++++++++++++++++------------ tools/make_unicode | 4 ++-- 2 files changed, 28 insertions(+), 14 deletions(-)
1
0
0
0
Nikolay Sivov : vkd3d-shader/d3d-asm: Fix 3D sampler declaration instruction name.
by Alexandre Julliard
05 Jun '23
05 Jun '23
Module: vkd3d Branch: master Commit: ccad49d486fa44f5e0767fa7733a1a3927d3bd94 URL:
https://gitlab.winehq.org/wine/vkd3d/-/commit/ccad49d486fa44f5e0767fa7733a1…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Wed May 31 12:42:52 2023 +0200 vkd3d-shader/d3d-asm: Fix 3D sampler declaration instruction name. --- libs/vkd3d-shader/d3d_asm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libs/vkd3d-shader/d3d_asm.c b/libs/vkd3d-shader/d3d_asm.c index 3357b450..0a821b5c 100644 --- a/libs/vkd3d-shader/d3d_asm.c +++ b/libs/vkd3d-shader/d3d_asm.c @@ -646,7 +646,7 @@ static void shader_dump_decl_usage(struct vkd3d_d3d_asm_compiler *compiler, break; case VKD3D_SHADER_RESOURCE_TEXTURE_3D: - shader_addline(buffer, "_3d"); + shader_addline(buffer, "_volume"); break; case VKD3D_SHADER_RESOURCE_TEXTURE_CUBE:
1
0
0
0
← Newer
1
...
55
56
57
58
59
60
61
...
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