Rebase against 86e6c0bc28177a3794950fe2a13b8208400b6194.

This commit is contained in:
Alistair Leslie-Hughes 2020-11-17 10:18:40 +11:00
parent 7bdc1d6bac
commit 5566259fb5
19 changed files with 102 additions and 1863 deletions

View File

@ -1,301 +0,0 @@
From 70a09ccf3108ded29c3049ab3ee5aea843b43215 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
Date: Sat, 15 Aug 2015 02:59:17 +0200
Subject: [PATCH] dxdiagn: Enumerate DirectSound devices and add some basic
properties.
---
dlls/dxdiagn/Makefile.in | 2 +-
dlls/dxdiagn/provider.c | 91 +++++++++++++++++++++++
dlls/dxdiagn/tests/container.c | 131 +++++++++++++++++++++++++++++++++
3 files changed, 223 insertions(+), 1 deletion(-)
diff --git a/dlls/dxdiagn/Makefile.in b/dlls/dxdiagn/Makefile.in
index fa4b611f245..88c99803b06 100644
--- a/dlls/dxdiagn/Makefile.in
+++ b/dlls/dxdiagn/Makefile.in
@@ -1,5 +1,5 @@
MODULE = dxdiagn.dll
-IMPORTS = strmiids dxguid uuid d3d9 ddraw version ole32 oleaut32 user32 advapi32
+IMPORTS = strmiids dxguid uuid d3d9 ddraw version ole32 oleaut32 user32 advapi32 dsound
EXTRADLLFLAGS = -mno-cygwin
diff --git a/dlls/dxdiagn/provider.c b/dlls/dxdiagn/provider.c
index 6b6f4e640cc..4ae5046b818 100644
--- a/dlls/dxdiagn/provider.c
+++ b/dlls/dxdiagn/provider.c
@@ -36,6 +36,7 @@
#include "wine/fil_data.h"
#include "psapi.h"
#include "wbemcli.h"
+#include "dsound.h"
#include "wine/debug.h"
@@ -1364,11 +1365,85 @@ static HRESULT build_displaydevices_tree(IDxDiagContainerImpl_Container *node)
return fill_display_information_fallback(node);
}
+struct enum_context
+{
+ IDxDiagContainerImpl_Container *cont;
+ HRESULT hr;
+ int index;
+};
+
+static const WCHAR szGUIDFmt[] =
+{
+ '%','0','8','x','-','%','0','4','x','-','%','0','4','x','-','%','0',
+ '2','x','%','0','2','x','-','%','0','2','x','%','0','2','x','%','0','2',
+ 'x','%','0','2','x','%','0','2','x','%','0','2','x',0
+};
+
+static LPWSTR guid_to_string(LPWSTR lpwstr, REFGUID lpcguid)
+{
+ wsprintfW(lpwstr, szGUIDFmt, lpcguid->Data1, lpcguid->Data2,
+ lpcguid->Data3, lpcguid->Data4[0], lpcguid->Data4[1],
+ lpcguid->Data4[2], lpcguid->Data4[3], lpcguid->Data4[4],
+ lpcguid->Data4[5], lpcguid->Data4[6], lpcguid->Data4[7]);
+
+ return lpwstr;
+}
+
+BOOL CALLBACK dsound_enum(LPGUID guid, LPCWSTR desc, LPCWSTR module, LPVOID context)
+{
+ static const WCHAR deviceid_fmtW[] = {'%','u',0};
+ static const WCHAR szGuidDeviceID[] = {'s','z','G','u','i','d','D','e','v','i','c','e','I','D',0};
+ static const WCHAR szDriverPath[] = {'s','z','D','r','i','v','e','r','P','a','t','h',0};
+
+ struct enum_context *enum_ctx = context;
+ IDxDiagContainerImpl_Container *device;
+ WCHAR buffer[256];
+ const WCHAR *p, *name;
+
+ /* the default device is enumerated twice, one time without GUID */
+ if (!guid) return TRUE;
+
+ _snwprintf(buffer, sizeof(buffer)/sizeof(WCHAR), deviceid_fmtW, enum_ctx->index);
+ device = allocate_information_node(buffer);
+ if (!device)
+ {
+ enum_ctx->hr = E_OUTOFMEMORY;
+ return FALSE;
+ }
+
+ add_subcontainer(enum_ctx->cont, device);
+
+ guid_to_string(buffer, guid);
+ enum_ctx->hr = add_bstr_property(device, szGuidDeviceID, buffer);
+ if (FAILED(enum_ctx->hr))
+ return FALSE;
+
+ enum_ctx->hr = add_bstr_property(device, szDescription, desc);
+ if (FAILED(enum_ctx->hr))
+ return FALSE;
+
+ enum_ctx->hr = add_bstr_property(device, szDriverPath, module);
+ if (FAILED(enum_ctx->hr))
+ return FALSE;
+
+ name = module;
+ if ((p = wcsrchr(name, '\\'))) name = p + 1;
+ if ((p = wcsrchr(name, '/'))) name = p + 1;
+
+ enum_ctx->hr = add_bstr_property(device, szDriverName, name);
+ if (FAILED(enum_ctx->hr))
+ return FALSE;
+
+ enum_ctx->index++;
+ return TRUE;
+}
+
static HRESULT build_directsound_tree(IDxDiagContainerImpl_Container *node)
{
static const WCHAR DxDiag_SoundDevices[] = {'D','x','D','i','a','g','_','S','o','u','n','d','D','e','v','i','c','e','s',0};
static const WCHAR DxDiag_SoundCaptureDevices[] = {'D','x','D','i','a','g','_','S','o','u','n','d','C','a','p','t','u','r','e','D','e','v','i','c','e','s',0};
+ struct enum_context enum_ctx;
IDxDiagContainerImpl_Container *cont;
cont = allocate_information_node(DxDiag_SoundDevices);
@@ -1377,12 +1452,28 @@ static HRESULT build_directsound_tree(IDxDiagContainerImpl_Container *node)
add_subcontainer(node, cont);
+ enum_ctx.cont = cont;
+ enum_ctx.hr = S_OK;
+ enum_ctx.index = 0;
+
+ DirectSoundEnumerateW(dsound_enum, &enum_ctx);
+ if (FAILED(enum_ctx.hr))
+ return enum_ctx.hr;
+
cont = allocate_information_node(DxDiag_SoundCaptureDevices);
if (!cont)
return E_OUTOFMEMORY;
add_subcontainer(node, cont);
+ enum_ctx.cont = cont;
+ enum_ctx.hr = S_OK;
+ enum_ctx.index = 0;
+
+ DirectSoundCaptureEnumerateW(dsound_enum, &enum_ctx);
+ if (FAILED(enum_ctx.hr))
+ return enum_ctx.hr;
+
return S_OK;
}
diff --git a/dlls/dxdiagn/tests/container.c b/dlls/dxdiagn/tests/container.c
index c011ff9cc07..3f9f9d6d29f 100644
--- a/dlls/dxdiagn/tests/container.c
+++ b/dlls/dxdiagn/tests/container.c
@@ -922,6 +922,135 @@ cleanup:
IDxDiagProvider_Release(pddp);
}
+static void test_DxDiag_SoundDevices(void)
+{
+ static const WCHAR szDescription[] = {'s','z','D','e','s','c','r','i','p','t','i','o','n',0};
+ static const WCHAR szGuidDeviceID[] = {'s','z','G','u','i','d','D','e','v','i','c','e','I','D',0};
+ static const WCHAR szDriverPath[] = {'s','z','D','r','i','v','e','r','P','a','t','h',0};
+ static const WCHAR szDriverName[] = {'s','z','D','r','i','v','e','r','N','a','m','e',0};
+
+ static const struct property_test property_tests[] =
+ {
+ {szDescription, VT_BSTR},
+ {szGuidDeviceID, VT_BSTR},
+ {szDriverName, VT_BSTR},
+ {szDriverPath, VT_BSTR},
+ };
+
+ IDxDiagContainer *sound_cont = NULL;
+ DWORD count, i;
+ HRESULT hr;
+
+ if (!create_root_IDxDiagContainer())
+ {
+ skip("Unable to create the root IDxDiagContainer\n");
+ return;
+ }
+
+ hr = IDxDiagContainer_GetChildContainer(pddc, L"DxDiag_SoundDevices", &sound_cont);
+ ok(hr == S_OK, "Expected IDxDiagContainer::GetChildContainer to return S_OK, got 0x%08x\n", hr);
+
+ if (hr != S_OK)
+ goto cleanup;
+
+ hr = IDxDiagContainer_GetNumberOfProps(sound_cont, &count);
+ ok(hr == S_OK, "Expected IDxDiagContainer::GetNumberOfProps to return S_OK, got 0x%08x\n", hr);
+ if (hr == S_OK)
+ ok(count == 0, "Expected count to be 0, got %u\n", count);
+
+ hr = IDxDiagContainer_GetNumberOfChildContainers(sound_cont, &count);
+ ok(hr == S_OK, "Expected IDxDiagContainer::GetNumberOfChildContainers to return S_OK, got 0x%08x\n", hr);
+
+ if (hr != S_OK)
+ goto cleanup;
+
+ for (i = 0; i < count; i++)
+ {
+ WCHAR child_container[256];
+ IDxDiagContainer *child;
+
+ hr = IDxDiagContainer_EnumChildContainerNames(sound_cont, i, child_container, sizeof(child_container)/sizeof(WCHAR));
+ ok(hr == S_OK, "Expected IDxDiagContainer::EnumChildContainerNames to return S_OK, got 0x%08x\n", hr);
+
+ hr = IDxDiagContainer_GetChildContainer(sound_cont, child_container, &child);
+ ok(hr == S_OK, "Expected IDxDiagContainer::GetChildContainer to return S_OK, got 0x%08x\n", hr);
+
+ if (hr == S_OK)
+ {
+ trace("Testing container %s\n", wine_dbgstr_w(child_container));
+ test_container_properties(child, property_tests, sizeof(property_tests)/sizeof(property_tests[0]));
+ }
+ IDxDiagContainer_Release(child);
+ }
+
+cleanup:
+ if (sound_cont) IDxDiagContainer_Release(sound_cont);
+ IDxDiagContainer_Release(pddc);
+ IDxDiagProvider_Release(pddp);
+}
+
+static void test_DxDiag_SoundCaptureDevices(void)
+{
+ static const struct property_test property_tests[] =
+ {
+ {L"szDescription", VT_BSTR},
+ {L"szGuidDeviceID", VT_BSTR},
+ {L"szDriverPath", VT_BSTR},
+ {L"szDriverName", VT_BSTR},
+ };
+
+ IDxDiagContainer *sound_cont = NULL;
+ DWORD count, i;
+ HRESULT hr;
+
+ if (!create_root_IDxDiagContainer())
+ {
+ skip("Unable to create the root IDxDiagContainer\n");
+ return;
+ }
+
+ hr = IDxDiagContainer_GetChildContainer(pddc, L"DxDiag_SoundCaptureDevices", &sound_cont);
+ ok(hr == S_OK, "Expected IDxDiagContainer::GetChildContainer to return S_OK, got 0x%08x\n", hr);
+
+ if (hr != S_OK)
+ goto cleanup;
+
+ hr = IDxDiagContainer_GetNumberOfProps(sound_cont, &count);
+ ok(hr == S_OK, "Expected IDxDiagContainer::GetNumberOfProps to return S_OK, got 0x%08x\n", hr);
+ if (hr == S_OK)
+ ok(count == 0, "Expected count to be 0, got %u\n", count);
+
+ hr = IDxDiagContainer_GetNumberOfChildContainers(sound_cont, &count);
+ ok(hr == S_OK, "Expected IDxDiagContainer::GetNumberOfChildContainers to return S_OK, got 0x%08x\n", hr);
+
+ if (hr != S_OK)
+ goto cleanup;
+
+ for (i = 0; i < count; i++)
+ {
+ WCHAR child_container[256];
+ IDxDiagContainer *child;
+
+ hr = IDxDiagContainer_EnumChildContainerNames(sound_cont, i, child_container, sizeof(child_container)/sizeof(WCHAR));
+ ok(hr == S_OK, "Expected IDxDiagContainer::EnumChildContainerNames to return S_OK, got 0x%08x\n", hr);
+
+ hr = IDxDiagContainer_GetChildContainer(sound_cont, child_container, &child);
+ ok(hr == S_OK, "Expected IDxDiagContainer::GetChildContainer to return S_OK, got 0x%08x\n", hr);
+
+ if (hr == S_OK)
+ {
+ trace("Testing container %s\n", wine_dbgstr_w(child_container));
+ test_container_properties(child, property_tests, sizeof(property_tests)/sizeof(property_tests[0]));
+ }
+ IDxDiagContainer_Release(child);
+ }
+
+cleanup:
+ if (sound_cont) IDxDiagContainer_Release(sound_cont);
+ IDxDiagContainer_Release(pddc);
+ IDxDiagProvider_Release(pddp);
+}
+
START_TEST(container)
{
CoInitialize(NULL);
@@ -936,5 +1065,7 @@ START_TEST(container)
test_root_children();
test_DxDiag_SystemInfo();
test_DxDiag_DisplayDevices();
+ test_DxDiag_SoundDevices();
+ test_DxDiag_SoundCaptureDevices();
CoUninitialize();
}
--
2.28.0

View File

@ -1 +0,0 @@
Fixes: [32613] Implement enumeration of sound devices and basic properties to dxdiagn

View File

@ -1,107 +0,0 @@
From 8f0d1a97147714cdee9f69781f6b919bf005aed0 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
Date: Sat, 15 Aug 2015 03:58:04 +0200
Subject: [PATCH] dxdiagn: Calling GetChildContainer with an empty string on a
leaf container returns the object itself
---
dlls/dxdiagn/container.c | 4 ++--
dlls/dxdiagn/tests/container.c | 25 +++++++++++++++++++++++--
2 files changed, 25 insertions(+), 4 deletions(-)
diff --git a/dlls/dxdiagn/container.c b/dlls/dxdiagn/container.c
index 87d593a15a7..d84f185a795 100644
--- a/dlls/dxdiagn/container.c
+++ b/dlls/dxdiagn/container.c
@@ -167,7 +167,7 @@ static HRESULT WINAPI IDxDiagContainerImpl_GetChildContainer(IDxDiagContainer *i
TRACE("Trying to get parent container %s\n", debugstr_w(tmp));
hr = IDxDiagContainerImpl_GetChildContainerInternal(pContainer, tmp, &pContainer);
if (FAILED(hr))
- goto on_error;
+ goto out;
cur++; /* go after '.' (just replaced by \0) */
tmp = cur;
cur = wcschr(tmp, '.');
@@ -181,7 +181,7 @@ static HRESULT WINAPI IDxDiagContainerImpl_GetChildContainer(IDxDiagContainer *i
TRACE("Succeeded in getting the container instance\n");
}
-on_error:
+out:
HeapFree(GetProcessHeap(), 0, orig_tmp);
return hr;
}
diff --git a/dlls/dxdiagn/tests/container.c b/dlls/dxdiagn/tests/container.c
index 18423779075..350b46a0253 100644
--- a/dlls/dxdiagn/tests/container.c
+++ b/dlls/dxdiagn/tests/container.c
@@ -819,7 +819,8 @@ static void test_DxDiag_SystemInfo(void)
{L"szProcessorEnglish", VT_BSTR},
};
- IDxDiagContainer *container;
+ IDxDiagContainer *container, *container2;
+ static const WCHAR empty[] = {0};
HRESULT hr;
if (!create_root_IDxDiagContainer())
@@ -828,6 +829,9 @@ static void test_DxDiag_SystemInfo(void)
return;
}
+ hr = IDxDiagContainer_GetChildContainer(pddc, empty, &container2);
+ ok(hr == E_INVALIDARG, "Expected IDxDiagContainer::GetChildContainer to return E_INVALIDARG, got 0x%08x\n", hr);
+
hr = IDxDiagContainer_GetChildContainer(pddc, L"DxDiag_SystemInfo", &container);
ok(hr == S_OK, "Expected IDxDiagContainer::GetChildContainer to return S_OK, got 0x%08x\n", hr);
@@ -835,6 +839,14 @@ static void test_DxDiag_SystemInfo(void)
{
trace("Testing container DxDiag_SystemInfo\n");
test_container_properties(container, property_tests, ARRAY_SIZE(property_tests));
+
+ container2 = NULL;
+ hr = IDxDiagContainer_GetChildContainer(container, empty, &container2);
+ ok(hr == S_OK, "Expected IDxDiagContainer::GetChildContainer to return S_OK, got 0x%08x\n", hr);
+ ok(container2 != NULL, "Expected container2 != NULL\n");
+ ok(container2 != container, "Expected container != container2\n");
+ if (hr == S_OK) IDxDiagContainer_Release(container2);
+
IDxDiagContainer_Release(container);
}
@@ -928,6 +940,7 @@ static void test_DxDiag_SoundDevices(void)
static const WCHAR szGuidDeviceID[] = {'s','z','G','u','i','d','D','e','v','i','c','e','I','D',0};
static const WCHAR szDriverPath[] = {'s','z','D','r','i','v','e','r','P','a','t','h',0};
static const WCHAR szDriverName[] = {'s','z','D','r','i','v','e','r','N','a','m','e',0};
+ static const WCHAR empty[] = {0};
static const struct property_test property_tests[] =
{
@@ -967,7 +980,7 @@ static void test_DxDiag_SoundDevices(void)
for (i = 0; i < count; i++)
{
WCHAR child_container[256];
- IDxDiagContainer *child;
+ IDxDiagContainer *child, *child2;
hr = IDxDiagContainer_EnumChildContainerNames(sound_cont, i, child_container, sizeof(child_container)/sizeof(WCHAR));
ok(hr == S_OK, "Expected IDxDiagContainer::EnumChildContainerNames to return S_OK, got 0x%08x\n", hr);
@@ -980,6 +993,14 @@ static void test_DxDiag_SoundDevices(void)
trace("Testing container %s\n", wine_dbgstr_w(child_container));
test_container_properties(child, property_tests, sizeof(property_tests)/sizeof(property_tests[0]));
}
+
+ child2 = NULL;
+ hr = IDxDiagContainer_GetChildContainer(child, empty, &child2);
+ ok(hr == S_OK, "Expected IDxDiagContainer::GetChildContainer to return S_OK, got 0x%08x\n", hr);
+ ok(child2 != NULL, "Expected child2 != NULL\n");
+ ok(child2 != child, "Expected child != child2\n");
+ if (hr == S_OK) IDxDiagContainer_Release(child2);
+
IDxDiagContainer_Release(child);
}
--
2.28.0

View File

@ -1,2 +0,0 @@
Fixes: [38014] Implement special handling for calling GetChildContainer with an empty string
Depends: dxdiagn-Enumerate_DirectSound

View File

@ -51,7 +51,7 @@ usage()
# Get the upstream commit sha
upstream_commit()
{
echo "cf49617c1a378dd4a37ab7226187708c501b046f"
echo "86e6c0bc28177a3794950fe2a13b8208400b6194"
}
# Show version information
@ -122,8 +122,6 @@ patch_enable_all ()
enable_dsound_EAX="$1"
enable_dsound_Fast_Mixer="$1"
enable_dwrite_FontFallback="$1"
enable_dxdiagn_Enumerate_DirectSound="$1"
enable_dxdiagn_GetChildContainer_Leaf_Nodes="$1"
enable_eventfd_synchronization="$1"
enable_explorer_Video_Registry_Key="$1"
enable_fonts_Missing_Fonts="$1"
@ -261,11 +259,6 @@ patch_enable_all ()
enable_uxtheme_CloseThemeClass="$1"
enable_version_VerQueryValue="$1"
enable_widl_SLTG_Typelib_Support="$1"
enable_widl_winrt_support="$1"
enable_windows_gaming_input_dll="$1"
enable_windows_globalization_dll="$1"
enable_windows_media_speech_dll="$1"
enable_windows_networking_connectivity_dll="$1"
enable_windowscodecs_GIF_Encoder="$1"
enable_windowscodecs_TIFF_Support="$1"
enable_wine_inf_Directory_ContextMenuHandlers="$1"
@ -449,12 +442,6 @@ patch_enable ()
dwrite-FontFallback)
enable_dwrite_FontFallback="$2"
;;
dxdiagn-Enumerate_DirectSound)
enable_dxdiagn_Enumerate_DirectSound="$2"
;;
dxdiagn-GetChildContainer_Leaf_Nodes)
enable_dxdiagn_GetChildContainer_Leaf_Nodes="$2"
;;
eventfd_synchronization)
enable_eventfd_synchronization="$2"
;;
@ -866,21 +853,6 @@ patch_enable ()
widl-SLTG_Typelib_Support)
enable_widl_SLTG_Typelib_Support="$2"
;;
widl-winrt-support)
enable_widl_winrt_support="$2"
;;
windows.gaming.input-dll)
enable_windows_gaming_input_dll="$2"
;;
windows.globalization-dll)
enable_windows_globalization_dll="$2"
;;
windows.media.speech.dll)
enable_windows_media_speech_dll="$2"
;;
windows.networking.connectivity.dll)
enable_windows_networking_connectivity_dll="$2"
;;
windowscodecs-GIF_Encoder)
enable_windowscodecs_GIF_Encoder="$2"
;;
@ -1431,34 +1403,6 @@ if test "$enable_wineboot_ProxySettings" -eq 1; then
enable_wineboot_drivers_etc_Stubs=1
fi
if test "$enable_windows_networking_connectivity_dll" -eq 1; then
if test "$enable_windows_globalization_dll" -gt 1; then
abort "Patchset windows.globalization-dll disabled, but windows.networking.connectivity.dll depends on that."
fi
enable_windows_globalization_dll=1
fi
if test "$enable_windows_globalization_dll" -eq 1; then
if test "$enable_windows_gaming_input_dll" -gt 1; then
abort "Patchset windows.gaming.input-dll disabled, but windows.globalization-dll depends on that."
fi
enable_windows_gaming_input_dll=1
fi
if test "$enable_windows_gaming_input_dll" -eq 1; then
if test "$enable_windows_media_speech_dll" -gt 1; then
abort "Patchset windows.media.speech.dll disabled, but windows.gaming.input-dll depends on that."
fi
enable_windows_media_speech_dll=1
fi
if test "$enable_windows_media_speech_dll" -eq 1; then
if test "$enable_widl_winrt_support" -gt 1; then
abort "Patchset widl-winrt-support disabled, but windows.media.speech.dll depends on that."
fi
enable_widl_winrt_support=1
fi
if test "$enable_user32_window_activation" -eq 1; then
if test "$enable_user32_recursive_activation" -gt 1; then
abort "Patchset user32-recursive-activation disabled, but user32-window-activation depends on that."
@ -1630,13 +1574,6 @@ if test "$enable_ntdll_Junction_Points" -eq 1; then
enable_ntdll_NtQueryEaFile=1
fi
if test "$enable_dxdiagn_GetChildContainer_Leaf_Nodes" -eq 1; then
if test "$enable_dxdiagn_Enumerate_DirectSound" -gt 1; then
abort "Patchset dxdiagn-Enumerate_DirectSound disabled, but dxdiagn-GetChildContainer_Leaf_Nodes depends on that."
fi
enable_dxdiagn_Enumerate_DirectSound=1
fi
if test "$enable_dsound_EAX" -eq 1; then
if test "$enable_dsound_Fast_Mixer" -gt 1; then
abort "Patchset dsound-Fast_Mixer disabled, but dsound-EAX depends on that."
@ -2340,33 +2277,6 @@ if test "$enable_dwrite_FontFallback" -eq 1; then
patch_apply dwrite-FontFallback/0006-dwrite-Use-MapCharacters-for-dummy-line-metrics.patch
fi
# Patchset dxdiagn-Enumerate_DirectSound
# |
# | This patchset fixes the following Wine bugs:
# | * [#32613] Implement enumeration of sound devices and basic properties to dxdiagn
# |
# | Modified files:
# | * dlls/dxdiagn/Makefile.in, dlls/dxdiagn/provider.c, dlls/dxdiagn/tests/container.c
# |
if test "$enable_dxdiagn_Enumerate_DirectSound" -eq 1; then
patch_apply dxdiagn-Enumerate_DirectSound/0001-dxdiagn-Enumerate-DirectSound-devices-and-add-some-b.patch
fi
# Patchset dxdiagn-GetChildContainer_Leaf_Nodes
# |
# | This patchset has the following (direct or indirect) dependencies:
# | * dxdiagn-Enumerate_DirectSound
# |
# | This patchset fixes the following Wine bugs:
# | * [#38014] Implement special handling for calling GetChildContainer with an empty string
# |
# | Modified files:
# | * dlls/dxdiagn/container.c, dlls/dxdiagn/tests/container.c
# |
if test "$enable_dxdiagn_GetChildContainer_Leaf_Nodes" -eq 1; then
patch_apply dxdiagn-GetChildContainer_Leaf_Nodes/0001-dxdiagn-Calling-GetChildContainer-with-an-empty-stri.patch
fi
# Patchset ntdll-DOS_Attributes
# |
# | This patchset fixes the following Wine bugs:
@ -2486,7 +2396,7 @@ fi
# | server/main.c, server/mapping.c, server/mutex.c, server/named_pipe.c, server/object.h, server/process.c,
# | server/process.h, server/protocol.def, server/queue.c, server/registry.c, server/request.c, server/semaphore.c,
# | server/serial.c, server/signal.c, server/sock.c, server/symlink.c, server/thread.c, server/thread.h, server/timer.c,
# | server/token.c, server/trace.c, server/winstation.c
# | server/token.c, server/winstation.c
# |
if test "$enable_eventfd_synchronization" -eq 1; then
patch_apply eventfd_synchronization/0001-configure-Check-for-sys-eventfd.h-ppoll-and-shm_open.patch
@ -4273,134 +4183,6 @@ if test "$enable_version_VerQueryValue" -eq 1; then
patch_apply version-VerQueryValue/0001-version-Test-for-VerQueryValueA-try-2.patch
fi
# Patchset widl-winrt-support
# |
# | This patchset fixes the following Wine bugs:
# | * [#49998] widl - Support WinRT idls
# |
# | Modified files:
# | * include/Makefile.in, include/windows.foundation.idl, include/windows.media.speechsynthesis.idl,
# | include/windowscontracts.idl, tools/widl/expr.c, tools/widl/hash.c, tools/widl/hash.h, tools/widl/header.c,
# | tools/widl/parser.l, tools/widl/parser.y, tools/widl/typegen.c, tools/widl/typelib.c, tools/widl/typetree.c,
# | tools/widl/typetree.h, tools/widl/widltypes.h
# |
if test "$enable_widl_winrt_support" -eq 1; then
patch_apply widl-winrt-support/0001-include-Add-windows.media.speechsynthesis.idl-draft.patch
patch_apply widl-winrt-support/0002-widl-Restrict-some-keywords-to-WinRT-mode-only.patch
patch_apply widl-winrt-support/0003-widl-Introduce-format_namespace_buffer-helper.patch
patch_apply widl-winrt-support/0004-widl-Support-WinRT-contractversion-attribute-parsing.patch
patch_apply widl-winrt-support/0005-widl-Support-WinRT-apicontract-type.patch
patch_apply widl-winrt-support/0006-widl-Prefer-mangled-name-over-typedef-in-WinRT-mode.patch
patch_apply widl-winrt-support/0007-widl-Don-t-output-typedef-statement-in-WinRT-mode.patch
patch_apply widl-winrt-support/0008-widl-Support-WinRT-contract-attribute.patch
patch_apply widl-winrt-support/0009-widl-Support-WinRT-marshaling_behavior-attribute-par.patch
patch_apply widl-winrt-support/0010-widl-Support-WinRT-mta-threading-attribute-parsing.patch
patch_apply widl-winrt-support/0011-widl-Support-WinRT-exclusiveto-attribute-parsing.patch
patch_apply widl-winrt-support/0012-widl-Support-WinRT-runtimeclass-type.patch
patch_apply widl-winrt-support/0013-widl-Support-WinRT-eventadd-eventremove-attributes.patch
patch_apply widl-winrt-support/0014-widl-Support-WinRT-flags-attribute-parsing.patch
patch_apply widl-winrt-support/0015-widl-Support-using-qualified-names-for-interfaces.patch
patch_apply widl-winrt-support/0016-widl-Support-repeated-attributes-for-WinRT-static.patch
patch_apply widl-winrt-support/0017-widl-Support-WinRT-static-attribute-parsing.patch
patch_apply widl-winrt-support/0018-widl-Support-WinRT-requires-keyword.patch
patch_apply widl-winrt-support/0019-widl-Support-WinRT-activatable-attribute.patch
patch_apply widl-winrt-support/0020-widl-Support-WinRT-parameterized-type-parsing.patch
patch_apply widl-winrt-support/0021-widl-Support-partially-specialized-parameterized-typ.patch
patch_apply widl-winrt-support/0022-widl-Support-WinRT-parameterized-interface-type.patch
patch_apply widl-winrt-support/0023-widl-Support-WinRT-delegate-type.patch
patch_apply widl-winrt-support/0024-widl-Support-WinRT-parameterized-delegate-type.patch
patch_apply widl-winrt-support/0025-widl-Compute-signatures-for-parameterized-types.patch
patch_apply widl-winrt-support/0026-widl-Compute-uuids-for-parameterized-types.patch
patch_apply widl-winrt-support/0027-widl-Generate-helper-macros-for-WinRT-implementation.patch
patch_apply widl-winrt-support/0028-include-Add-IVectorView-HSTRING-declaration-to-windo.patch
fi
# Patchset windows.media.speech.dll
# |
# | This patchset has the following (direct or indirect) dependencies:
# | * widl-winrt-support
# |
# | This patchset fixes the following Wine bugs:
# | * [#49740] windows.media.speech: New DLL
# |
# | Modified files:
# | * configure.ac, dlls/windows.media.speech.dll/Makefile.in, dlls/windows.media.speech.dll/windows.media.speech.spec,
# | dlls/windows.media.speech.dll/windows.media.speech_main.c, loader/wine.inf.in
# |
if test "$enable_windows_media_speech_dll" -eq 1; then
patch_apply windows.media.speech.dll/0001-windows.media.speech-Add-stub-dll.patch
patch_apply windows.media.speech.dll/0002-windows.media.speech-Implement-IInstalledVoicesStati.patch
patch_apply windows.media.speech.dll/0003-windows.media.speech-Implement-IInstalledVoicesStati.patch
patch_apply windows.media.speech.dll/0004-windows.media.speech-Fake-empty-IInstalledVoicesStat.patch
fi
# Patchset windows.gaming.input-dll
# |
# | This patchset has the following (direct or indirect) dependencies:
# | * widl-winrt-support, windows.media.speech.dll
# |
# | This patchset fixes the following Wine bugs:
# | * [#49756] windows.gaming.input: New DLL
# |
# | Modified files:
# | * configure.ac, dlls/windows.gaming.input.dll/Makefile.in, dlls/windows.gaming.input.dll/windows.gaming.input.spec,
# | dlls/windows.gaming.input.dll/windows.gaming.input_main.c, include/Makefile.in, include/asyncinfo.idl,
# | include/windows.foundation.idl, include/windows.gaming.input.forcefeedback.idl, include/windows.gaming.input.idl,
# | include/windows.system.idl, loader/wine.inf.in
# |
if test "$enable_windows_gaming_input_dll" -eq 1; then
patch_apply windows.gaming.input-dll/0001-windows.gaming.input-Add-stub-dll.patch
patch_apply windows.gaming.input-dll/0002-windows.gaming.input-Implement-IGamepadStatics-stubs.patch
patch_apply windows.gaming.input-dll/0003-windows.gaming.input-Implement-IGamepadStatics-Gamep.patch
patch_apply windows.gaming.input-dll/0004-windows.gaming.input-Fake-empty-IGamepadStatics-Game.patch
patch_apply windows.gaming.input-dll/0005-windows.gaming.input-Fake-IEventHandler_Gamepad-supp.patch
patch_apply windows.gaming.input-dll/0006-windows.gaming.input-Implement-IRawGameControllerSta.patch
patch_apply windows.gaming.input-dll/0007-windows.gaming.input-Implement-IRawGameControllerSta.patch
patch_apply windows.gaming.input-dll/0008-windows.gaming.input-Fake-empty-IRawGameControllerSt.patch
patch_apply windows.gaming.input-dll/0009-windows.gaming.input-Fake-IEventHandler_RawGameContr.patch
fi
# Patchset windows.globalization-dll
# |
# | This patchset has the following (direct or indirect) dependencies:
# | * widl-winrt-support, windows.media.speech.dll, windows.gaming.input-dll
# |
# | This patchset fixes the following Wine bugs:
# | * [#49740] windows.globalization: New DLL
# | * [#49998] windows.globalization: New DLL
# |
# | Modified files:
# | * configure.ac, dlls/windows.globalization.dll/Makefile.in, dlls/windows.globalization.dll/windows.globalization.spec,
# | dlls/windows.globalization.dll/windows.globalization_main.c, include/Makefile.in, include/windows.globalization.idl,
# | include/windows.system.userprofile.idl, loader/wine.inf.in
# |
if test "$enable_windows_globalization_dll" -eq 1; then
patch_apply windows.globalization-dll/0001-windows.globalization-Add-stub-dll.patch
patch_apply windows.globalization-dll/0002-windows.globalization-Implement-IGlobalizationPrefer.patch
patch_apply windows.globalization-dll/0003-windows.globalization-Implement-IGlobalizationPrefer.patch
patch_apply windows.globalization-dll/0004-windows.globalization-Implement-IGlobalizationPrefer.patch
patch_apply windows.globalization-dll/0005-windows.globalization-Fake-empty-IGlobalizationPrefe.patch
fi
# Patchset windows.networking.connectivity.dll
# |
# | This patchset has the following (direct or indirect) dependencies:
# | * widl-winrt-support, windows.media.speech.dll, windows.gaming.input-dll, windows.globalization-dll
# |
# | This patchset fixes the following Wine bugs:
# | * [#46534] windows.networking.connectivity: New DLL
# |
# | Modified files:
# | * configure.ac, dlls/windows.networking.connectivity.dll/Makefile.in,
# | dlls/windows.networking.connectivity.dll/windows.networking.connectivity.spec,
# | dlls/windows.networking.connectivity.dll/windows.networking.connectivity_main.c, loader/wine.inf.in
# |
if test "$enable_windows_networking_connectivity_dll" -eq 1; then
patch_apply windows.networking.connectivity.dll/0001-windows.networking.connectivity-Add-stub-dll.patch
patch_apply windows.networking.connectivity.dll/0002-windows.networking.connectivity-Implement-IActivatio.patch
patch_apply windows.networking.connectivity.dll/0003-windows.networking.connectivity-Implement-INetworkIn.patch
fi
# Patchset windowscodecs-GIF_Encoder
# |
# | Modified files:

View File

@ -1,387 +0,0 @@
From 0769c5c155be28c4bdf0c496e88cdc270ca6e90d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?R=C3=A9mi=20Bernon?= <rbernon@codeweavers.com>
Date: Tue, 22 Sep 2020 18:03:23 +0200
Subject: [PATCH] widl: Restrict some keywords to WinRT mode only.
---
tools/widl/parser.l | 339 ++++++++++++++++++++++----------------------
1 file changed, 170 insertions(+), 169 deletions(-)
diff --git a/tools/widl/parser.l b/tools/widl/parser.l
index f2c09cd8051..b715342ad59 100644
--- a/tools/widl/parser.l
+++ b/tools/widl/parser.l
@@ -248,67 +248,68 @@ int parser_wrap(void)
struct keyword {
const char *kw;
int token;
+ int winrt_only : 1;
};
/* This table MUST be alphabetically sorted on the kw field */
static const struct keyword keywords[] = {
- {"FALSE", tFALSE},
- {"NULL", tNULL},
- {"TRUE", tTRUE},
- {"__cdecl", tCDECL},
- {"__fastcall", tFASTCALL},
- {"__int32", tINT32},
- {"__int3264", tINT3264},
- {"__int64", tINT64},
- {"__pascal", tPASCAL},
- {"__stdcall", tSTDCALL},
- {"_cdecl", tCDECL},
- {"_fastcall", tFASTCALL},
- {"_pascal", tPASCAL},
- {"_stdcall", tSTDCALL},
- {"boolean", tBOOLEAN},
- {"byte", tBYTE},
- {"case", tCASE},
- {"cdecl", tCDECL},
- {"char", tCHAR},
- {"coclass", tCOCLASS},
- {"const", tCONST},
- {"cpp_quote", tCPPQUOTE},
- {"default", tDEFAULT},
- {"dispinterface", tDISPINTERFACE},
- {"double", tDOUBLE},
- {"enum", tENUM},
- {"error_status_t", tERRORSTATUST},
- {"extern", tEXTERN},
- {"float", tFLOAT},
- {"handle_t", tHANDLET},
- {"hyper", tHYPER},
- {"import", tIMPORT},
- {"importlib", tIMPORTLIB},
- {"inline", tINLINE},
- {"int", tINT},
- {"interface", tINTERFACE},
- {"library", tLIBRARY},
- {"long", tLONG},
- {"methods", tMETHODS},
- {"module", tMODULE},
- {"namespace", tNAMESPACE},
- {"pascal", tPASCAL},
- {"properties", tPROPERTIES},
- {"register", tREGISTER},
- {"short", tSHORT},
- {"signed", tSIGNED},
- {"sizeof", tSIZEOF},
- {"small", tSMALL},
- {"static", tSTATIC},
- {"stdcall", tSTDCALL},
- {"struct", tSTRUCT},
- {"switch", tSWITCH},
- {"typedef", tTYPEDEF},
- {"union", tUNION},
- {"unsigned", tUNSIGNED},
- {"void", tVOID},
- {"wchar_t", tWCHAR},
+ {"FALSE", tFALSE, 0},
+ {"NULL", tNULL, 0},
+ {"TRUE", tTRUE, 0},
+ {"__cdecl", tCDECL, 0},
+ {"__fastcall", tFASTCALL, 0},
+ {"__int32", tINT32, 0},
+ {"__int3264", tINT3264, 0},
+ {"__int64", tINT64, 0},
+ {"__pascal", tPASCAL, 0},
+ {"__stdcall", tSTDCALL, 0},
+ {"_cdecl", tCDECL, 0},
+ {"_fastcall", tFASTCALL, 0},
+ {"_pascal", tPASCAL, 0},
+ {"_stdcall", tSTDCALL, 0},
+ {"boolean", tBOOLEAN, 0},
+ {"byte", tBYTE, 0},
+ {"case", tCASE, 0},
+ {"cdecl", tCDECL, 0},
+ {"char", tCHAR, 0},
+ {"coclass", tCOCLASS, 0},
+ {"const", tCONST, 0},
+ {"cpp_quote", tCPPQUOTE, 0},
+ {"default", tDEFAULT, 0},
+ {"dispinterface", tDISPINTERFACE, 0},
+ {"double", tDOUBLE, 0},
+ {"enum", tENUM, 0},
+ {"error_status_t", tERRORSTATUST, 0},
+ {"extern", tEXTERN, 0},
+ {"float", tFLOAT, 0},
+ {"handle_t", tHANDLET, 0},
+ {"hyper", tHYPER, 0},
+ {"import", tIMPORT, 0},
+ {"importlib", tIMPORTLIB, 0},
+ {"inline", tINLINE, 0},
+ {"int", tINT, 0},
+ {"interface", tINTERFACE, 0},
+ {"library", tLIBRARY, 0},
+ {"long", tLONG, 0},
+ {"methods", tMETHODS, 0},
+ {"module", tMODULE, 0},
+ {"namespace", tNAMESPACE, 1},
+ {"pascal", tPASCAL, 0},
+ {"properties", tPROPERTIES, 0},
+ {"register", tREGISTER, 0},
+ {"short", tSHORT, 0},
+ {"signed", tSIGNED, 0},
+ {"sizeof", tSIZEOF, 0},
+ {"small", tSMALL, 0},
+ {"static", tSTATIC, 0},
+ {"stdcall", tSTDCALL, 0},
+ {"struct", tSTRUCT, 0},
+ {"switch", tSWITCH, 0},
+ {"typedef", tTYPEDEF, 0},
+ {"union", tUNION, 0},
+ {"unsigned", tUNSIGNED, 0},
+ {"void", tVOID, 0},
+ {"wchar_t", tWCHAR, 0},
};
#define NKEYWORDS (sizeof(keywords)/sizeof(keywords[0]))
@@ -317,116 +318,116 @@ static const struct keyword keywords[] = {
*/
static const struct keyword attr_keywords[] =
{
- {"aggregatable", tAGGREGATABLE},
- {"all_nodes", tALLNODES},
- {"allocate", tALLOCATE},
- {"annotation", tANNOTATION},
- {"apartment", tAPARTMENT},
- {"appobject", tAPPOBJECT},
- {"async", tASYNC},
- {"async_uuid", tASYNCUUID},
- {"auto_handle", tAUTOHANDLE},
- {"bindable", tBINDABLE},
- {"both", tBOTH},
- {"broadcast", tBROADCAST},
- {"byte_count", tBYTECOUNT},
- {"call_as", tCALLAS},
- {"callback", tCALLBACK},
- {"code", tCODE},
- {"comm_status", tCOMMSTATUS},
- {"context_handle", tCONTEXTHANDLE},
- {"context_handle_noserialize", tCONTEXTHANDLENOSERIALIZE},
- {"context_handle_serialize", tCONTEXTHANDLENOSERIALIZE},
- {"control", tCONTROL},
- {"decode", tDECODE},
- {"defaultbind", tDEFAULTBIND},
- {"defaultcollelem", tDEFAULTCOLLELEM},
- {"defaultvalue", tDEFAULTVALUE},
- {"defaultvtable", tDEFAULTVTABLE},
- {"disable_consistency_check", tDISABLECONSISTENCYCHECK},
- {"displaybind", tDISPLAYBIND},
- {"dllname", tDLLNAME},
- {"dont_free", tDONTFREE},
- {"dual", tDUAL},
- {"enable_allocate", tENABLEALLOCATE},
- {"encode", tENCODE},
- {"endpoint", tENDPOINT},
- {"entry", tENTRY},
- {"explicit_handle", tEXPLICITHANDLE},
- {"fault_status", tFAULTSTATUS},
- {"force_allocate", tFORCEALLOCATE},
- {"free", tFREE},
- {"handle", tHANDLE},
- {"helpcontext", tHELPCONTEXT},
- {"helpfile", tHELPFILE},
- {"helpstring", tHELPSTRING},
- {"helpstringcontext", tHELPSTRINGCONTEXT},
- {"helpstringdll", tHELPSTRINGDLL},
- {"hidden", tHIDDEN},
- {"id", tID},
- {"idempotent", tIDEMPOTENT},
- {"ignore", tIGNORE},
- {"iid_is", tIIDIS},
- {"immediatebind", tIMMEDIATEBIND},
- {"implicit_handle", tIMPLICITHANDLE},
- {"in", tIN},
- {"in_line", tIN_LINE},
- {"input_sync", tINPUTSYNC},
- {"lcid", tLCID},
- {"length_is", tLENGTHIS},
- {"licensed", tLICENSED},
- {"local", tLOCAL},
- {"maybe", tMAYBE},
- {"message", tMESSAGE},
- {"neutral", tNEUTRAL},
- {"nocode", tNOCODE},
- {"nonbrowsable", tNONBROWSABLE},
- {"noncreatable", tNONCREATABLE},
- {"nonextensible", tNONEXTENSIBLE},
- {"notify", tNOTIFY},
- {"notify_flag", tNOTIFYFLAG},
- {"object", tOBJECT},
- {"odl", tODL},
- {"oleautomation", tOLEAUTOMATION},
- {"optimize", tOPTIMIZE},
- {"optional", tOPTIONAL},
- {"out", tOUT},
- {"partial_ignore", tPARTIALIGNORE},
- {"pointer_default", tPOINTERDEFAULT},
- {"progid", tPROGID},
- {"propget", tPROPGET},
- {"propput", tPROPPUT},
- {"propputref", tPROPPUTREF},
- {"proxy", tPROXY},
- {"ptr", tPTR},
- {"public", tPUBLIC},
- {"range", tRANGE},
- {"readonly", tREADONLY},
- {"ref", tREF},
- {"represent_as", tREPRESENTAS},
- {"requestedit", tREQUESTEDIT},
- {"restricted", tRESTRICTED},
- {"retval", tRETVAL},
- {"single", tSINGLE},
- {"single_node", tSINGLENODE},
- {"size_is", tSIZEIS},
- {"source", tSOURCE},
- {"strict_context_handle", tSTRICTCONTEXTHANDLE},
- {"string", tSTRING},
- {"switch_is", tSWITCHIS},
- {"switch_type", tSWITCHTYPE},
- {"threading", tTHREADING},
- {"transmit_as", tTRANSMITAS},
- {"uidefault", tUIDEFAULT},
- {"unique", tUNIQUE},
- {"user_marshal", tUSERMARSHAL},
- {"usesgetlasterror", tUSESGETLASTERROR},
- {"uuid", tUUID},
- {"v1_enum", tV1ENUM},
- {"vararg", tVARARG},
- {"version", tVERSION},
- {"vi_progid", tVIPROGID},
- {"wire_marshal", tWIREMARSHAL},
+ {"aggregatable", tAGGREGATABLE, 0},
+ {"all_nodes", tALLNODES, 0},
+ {"allocate", tALLOCATE, 0},
+ {"annotation", tANNOTATION, 0},
+ {"apartment", tAPARTMENT, 0},
+ {"appobject", tAPPOBJECT, 0},
+ {"async", tASYNC, 0},
+ {"async_uuid", tASYNCUUID, 0},
+ {"auto_handle", tAUTOHANDLE, 0},
+ {"bindable", tBINDABLE, 0},
+ {"both", tBOTH, 0},
+ {"broadcast", tBROADCAST, 0},
+ {"byte_count", tBYTECOUNT, 0},
+ {"call_as", tCALLAS, 0},
+ {"callback", tCALLBACK, 0},
+ {"code", tCODE, 0},
+ {"comm_status", tCOMMSTATUS, 0},
+ {"context_handle", tCONTEXTHANDLE, 0},
+ {"context_handle_noserialize", tCONTEXTHANDLENOSERIALIZE, 0},
+ {"context_handle_serialize", tCONTEXTHANDLENOSERIALIZE, 0},
+ {"control", tCONTROL, 0},
+ {"decode", tDECODE, 0},
+ {"defaultbind", tDEFAULTBIND, 0},
+ {"defaultcollelem", tDEFAULTCOLLELEM, 0},
+ {"defaultvalue", tDEFAULTVALUE, 0},
+ {"defaultvtable", tDEFAULTVTABLE, 0},
+ {"disable_consistency_check", tDISABLECONSISTENCYCHECK, 0},
+ {"displaybind", tDISPLAYBIND, 0},
+ {"dllname", tDLLNAME, 0},
+ {"dont_free", tDONTFREE, 0},
+ {"dual", tDUAL, 0},
+ {"enable_allocate", tENABLEALLOCATE, 0},
+ {"encode", tENCODE, 0},
+ {"endpoint", tENDPOINT, 0},
+ {"entry", tENTRY, 0},
+ {"explicit_handle", tEXPLICITHANDLE, 0},
+ {"fault_status", tFAULTSTATUS, 0},
+ {"force_allocate", tFORCEALLOCATE, 0},
+ {"free", tFREE, 0},
+ {"handle", tHANDLE, 0},
+ {"helpcontext", tHELPCONTEXT, 0},
+ {"helpfile", tHELPFILE, 0},
+ {"helpstring", tHELPSTRING, 0},
+ {"helpstringcontext", tHELPSTRINGCONTEXT, 0},
+ {"helpstringdll", tHELPSTRINGDLL, 0},
+ {"hidden", tHIDDEN, 0},
+ {"id", tID, 0},
+ {"idempotent", tIDEMPOTENT, 0},
+ {"ignore", tIGNORE, 0},
+ {"iid_is", tIIDIS, 0},
+ {"immediatebind", tIMMEDIATEBIND, 0},
+ {"implicit_handle", tIMPLICITHANDLE, 0},
+ {"in", tIN, 0},
+ {"in_line", tIN_LINE, 0},
+ {"input_sync", tINPUTSYNC, 0},
+ {"lcid", tLCID, 0},
+ {"length_is", tLENGTHIS, 0},
+ {"licensed", tLICENSED, 0},
+ {"local", tLOCAL, 0},
+ {"maybe", tMAYBE, 0},
+ {"message", tMESSAGE, 0},
+ {"neutral", tNEUTRAL, 0},
+ {"nocode", tNOCODE, 0},
+ {"nonbrowsable", tNONBROWSABLE, 0},
+ {"noncreatable", tNONCREATABLE, 0},
+ {"nonextensible", tNONEXTENSIBLE, 0},
+ {"notify", tNOTIFY, 0},
+ {"notify_flag", tNOTIFYFLAG, 0},
+ {"object", tOBJECT, 0},
+ {"odl", tODL, 0},
+ {"oleautomation", tOLEAUTOMATION, 0},
+ {"optimize", tOPTIMIZE, 0},
+ {"optional", tOPTIONAL, 0},
+ {"out", tOUT, 0},
+ {"partial_ignore", tPARTIALIGNORE, 0},
+ {"pointer_default", tPOINTERDEFAULT, 0},
+ {"progid", tPROGID, 0},
+ {"propget", tPROPGET, 0},
+ {"propput", tPROPPUT, 0},
+ {"propputref", tPROPPUTREF, 0},
+ {"proxy", tPROXY, 0},
+ {"ptr", tPTR, 0},
+ {"public", tPUBLIC, 0},
+ {"range", tRANGE, 0},
+ {"readonly", tREADONLY, 0},
+ {"ref", tREF, 0},
+ {"represent_as", tREPRESENTAS, 0},
+ {"requestedit", tREQUESTEDIT, 0},
+ {"restricted", tRESTRICTED, 0},
+ {"retval", tRETVAL, 0},
+ {"single", tSINGLE, 0},
+ {"single_node", tSINGLENODE, 0},
+ {"size_is", tSIZEIS, 0},
+ {"source", tSOURCE, 0},
+ {"strict_context_handle", tSTRICTCONTEXTHANDLE, 0},
+ {"string", tSTRING, 0},
+ {"switch_is", tSWITCHIS, 0},
+ {"switch_type", tSWITCHTYPE, 0},
+ {"threading", tTHREADING, 0},
+ {"transmit_as", tTRANSMITAS, 0},
+ {"uidefault", tUIDEFAULT, 0},
+ {"unique", tUNIQUE, 0},
+ {"user_marshal", tUSERMARSHAL, 0},
+ {"usesgetlasterror", tUSESGETLASTERROR, 0},
+ {"uuid", tUUID, 0},
+ {"v1_enum", tV1ENUM, 0},
+ {"vararg", tVARARG, 0},
+ {"version", tVERSION, 0},
+ {"vi_progid", tVIPROGID, 0},
+ {"wire_marshal", tWIREMARSHAL, 0},
};
/* attributes TODO:
@@ -449,7 +450,7 @@ static int kw_token(const char *kw)
struct keyword key, *kwp;
key.kw = kw;
kwp = bsearch(&key, keywords, NKEYWORDS, sizeof(keywords[0]), kw_cmp_func);
- if (kwp && (winrt_mode || kwp->token != tNAMESPACE)) {
+ if (kwp && (!kwp->winrt_only || winrt_mode)) {
parser_lval.str = xstrdup(kwp->kw);
return kwp->token;
}
@@ -463,7 +464,7 @@ static int attr_token(const char *kw)
key.kw = kw;
kwp = bsearch(&key, attr_keywords, sizeof(attr_keywords)/sizeof(attr_keywords[0]),
sizeof(attr_keywords[0]), kw_cmp_func);
- if (kwp) {
+ if (kwp && (!kwp->winrt_only || winrt_mode)) {
parser_lval.str = xstrdup(kwp->kw);
return kwp->token;
}
--
2.28.0

View File

@ -1,89 +0,0 @@
From 8f57c43dd3adceb5baf529a6e42a1e813c024e20 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?R=C3=A9mi=20Bernon?= <rbernon@codeweavers.com>
Date: Tue, 13 Oct 2020 14:04:28 +0200
Subject: [PATCH 04/28] widl: Support WinRT contractversion attribute parsing.
---
tools/widl/parser.l | 1 +
tools/widl/parser.y | 12 +++++++++++-
tools/widl/widltypes.h | 1 +
3 files changed, 13 insertions(+), 1 deletion(-)
diff --git a/tools/widl/parser.l b/tools/widl/parser.l
index eb1782d32f5..dafd17ab2f9 100644
--- a/tools/widl/parser.l
+++ b/tools/widl/parser.l
@@ -337,6 +337,7 @@ static const struct keyword attr_keywords[] =
{"context_handle", tCONTEXTHANDLE, 0},
{"context_handle_noserialize", tCONTEXTHANDLENOSERIALIZE, 0},
{"context_handle_serialize", tCONTEXTHANDLENOSERIALIZE, 0},
+ {"contractversion", tCONTRACTVERSION, 1},
{"control", tCONTROL, 0},
{"decode", tDECODE, 0},
{"defaultbind", tDEFAULTBIND, 0},
diff --git a/tools/widl/parser.y b/tools/widl/parser.y
index 306e5194467..88cb9a10863 100644
--- a/tools/widl/parser.y
+++ b/tools/widl/parser.y
@@ -176,7 +176,9 @@ static typelib_t *current_typelib;
%token tAUTOHANDLE tBINDABLE tBOOLEAN tBROADCAST tBYTE tBYTECOUNT
%token tCALLAS tCALLBACK tCASE tCDECL tCHAR tCOCLASS tCODE tCOMMSTATUS
%token tCONST tCONTEXTHANDLE tCONTEXTHANDLENOSERIALIZE
-%token tCONTEXTHANDLESERIALIZE tCONTROL tCPPQUOTE
+%token tCONTEXTHANDLESERIALIZE
+%token tCONTRACTVERSION
+%token tCONTROL tCPPQUOTE
%token tDECODE tDEFAULT tDEFAULTBIND
%token tDEFAULTCOLLELEM
%token tDEFAULTVALUE
@@ -288,6 +290,7 @@ static typelib_t *current_typelib;
%type <declarator> m_abstract_declarator abstract_declarator abstract_declarator_no_direct abstract_direct_declarator
%type <declarator_list> declarator_list struct_declarator_list
%type <type> coclass coclasshdr coclassdef
+%type <num> contract_ver
%type <num> pointer_type threading_type version
%type <str> libraryhdr callconv cppquote importlib import t_ident
%type <uuid> uuid_string
@@ -489,6 +492,11 @@ str_list: aSTRING { $$ = append_str( NULL, $1 ); }
| str_list ',' aSTRING { $$ = append_str( $1, $3 ); }
;
+contract_ver:
+ aNUM { $$ = MAKEVERSION(0, $1); }
+ | aNUM '.' aNUM { $$ = MAKEVERSION($3, $1); }
+ ;
+
attribute: { $$ = NULL; }
| tAGGREGATABLE { $$ = make_attr(ATTR_AGGREGATABLE); }
| tANNOTATION '(' aSTRING ')' { $$ = make_attrp(ATTR_ANNOTATION, $3); }
@@ -504,6 +512,7 @@ attribute: { $$ = NULL; }
| tCONTEXTHANDLE { $$ = make_attrv(ATTR_CONTEXTHANDLE, 0); }
| tCONTEXTHANDLENOSERIALIZE { $$ = make_attrv(ATTR_CONTEXTHANDLE, 0); /* RPC_CONTEXT_HANDLE_DONT_SERIALIZE */ }
| tCONTEXTHANDLESERIALIZE { $$ = make_attrv(ATTR_CONTEXTHANDLE, 0); /* RPC_CONTEXT_HANDLE_SERIALIZE */ }
+ | tCONTRACTVERSION '(' contract_ver ')' { $$ = make_attrv(ATTR_CONTRACTVERSION, $3); }
| tCONTROL { $$ = make_attr(ATTR_CONTROL); }
| tDECODE { $$ = make_attr(ATTR_DECODE); }
| tDEFAULT { $$ = make_attr(ATTR_DEFAULT); }
@@ -2135,6 +2144,7 @@ struct allowed_attr allowed_attr[] =
/* ATTR_CODE */ { 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "code" },
/* ATTR_COMMSTATUS */ { 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "comm_status" },
/* ATTR_CONTEXTHANDLE */ { 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, "context_handle" },
+ /* ATTR_CONTRACTVERSION */ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "contractversion" },
/* ATTR_CONTROL */ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, "control" },
/* ATTR_DECODE */ { 0, 0, 1, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, "decode" },
/* ATTR_DEFAULT */ { 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, "default" },
diff --git a/tools/widl/widltypes.h b/tools/widl/widltypes.h
index 630f42860f1..1b00b8da002 100644
--- a/tools/widl/widltypes.h
+++ b/tools/widl/widltypes.h
@@ -82,6 +82,7 @@ enum attr_type
ATTR_CODE,
ATTR_COMMSTATUS,
ATTR_CONTEXTHANDLE,
+ ATTR_CONTRACTVERSION,
ATTR_CONTROL,
ATTR_DECODE,
ATTR_DEFAULT,
--
2.28.0

View File

@ -1,553 +0,0 @@
From 08d9f70629420aeafddbe844dd731db81f1e3fcb Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?R=C3=A9mi=20Bernon?= <rbernon@codeweavers.com>
Date: Tue, 13 Oct 2020 13:37:19 +0200
Subject: [PATCH] widl: Support WinRT apicontract type.
---
include/Makefile.in | 1 +
include/windows.foundation.idl | 1 +
include/windowscontracts.idl | 33 +++++
tools/widl/expr.c | 1 +
tools/widl/header.c | 24 ++++
tools/widl/parser.l | 1 +
tools/widl/parser.y | 237 +++++++++++++++++++--------------
tools/widl/typegen.c | 6 +
tools/widl/typelib.c | 3 +-
tools/widl/typetree.h | 3 +
tools/widl/widltypes.h | 1 +
11 files changed, 207 insertions(+), 104 deletions(-)
create mode 100644 include/windowscontracts.idl
diff --git a/include/Makefile.in b/include/Makefile.in
index 203b0580fa1..23dab5e83aa 100644
--- a/include/Makefile.in
+++ b/include/Makefile.in
@@ -738,6 +738,7 @@ SOURCES = \
windows.foundation.idl \
windows.media.speechsynthesis.idl \
windows.h \
+ windowscontracts.idl \
windowsx.h \
wine/debug.h \
wine/exception.h \
diff --git a/include/windows.foundation.idl b/include/windows.foundation.idl
index 2c16fa2da22..2a38e9f671b 100644
--- a/include/windows.foundation.idl
+++ b/include/windows.foundation.idl
@@ -22,6 +22,7 @@
import "inspectable.idl";
/* import "asyncinfo.idl"; */
+import "windowscontracts.idl";
/* import "eventtoken.idl"; */
/* import "ivectorchangedeventargs.idl"; */
diff --git a/include/windowscontracts.idl b/include/windowscontracts.idl
new file mode 100644
index 00000000000..6bcf80ac954
--- /dev/null
+++ b/include/windowscontracts.idl
@@ -0,0 +1,33 @@
+/*
+ * Copyright 2020 Rémi Bernon 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
+ */
+
+#ifdef __WIDL__
+#pragma winrt ns_prefix
+#endif
+
+namespace Windows {
+ namespace Foundation {
+ [contractversion(4)]
+ apicontract FoundationContract
+ {};
+
+ [contractversion(10)]
+ apicontract UniversalApiContract
+ {};
+ }
+}
diff --git a/tools/widl/expr.c b/tools/widl/expr.c
index d1ee599a39e..be8311cfb7f 100644
--- a/tools/widl/expr.c
+++ b/tools/widl/expr.c
@@ -462,6 +462,7 @@ static type_t *find_identifier(const char *identifier, const type_t *cont_type,
case TYPE_POINTER:
case TYPE_ARRAY:
case TYPE_BITFIELD:
+ case TYPE_APICONTRACT:
/* nothing to do */
break;
case TYPE_ALIAS:
diff --git a/tools/widl/header.c b/tools/widl/header.c
index d67fea4cc95..607d156ccf4 100644
--- a/tools/widl/header.c
+++ b/tools/widl/header.c
@@ -464,6 +464,7 @@ void write_type_left(FILE *h, const decl_spec_t *ds, enum name_type name_type, i
break;
}
case TYPE_ALIAS:
+ case TYPE_APICONTRACT:
/* handled elsewhere */
assert(0);
break;
@@ -529,6 +530,10 @@ void write_type_right(FILE *h, type_t *t, int is_field)
case TYPE_COCLASS:
case TYPE_INTERFACE:
break;
+ case TYPE_APICONTRACT:
+ /* not supposed to be here */
+ assert(0);
+ break;
}
}
@@ -1446,6 +1451,14 @@ static void write_forward(FILE *header, type_t *iface)
fprintf(header, "#endif\n\n" );
}
+static char *format_apicontract_macro(const type_t *type)
+{
+ char *name = format_namespace(type->namespace, "", "_", type->name, NULL);
+ int i;
+ for (i = strlen(name); i > 0; --i) name[i - 1] = toupper(name[i - 1]);
+ return name;
+}
+
static void write_com_interface_start(FILE *header, const type_t *iface)
{
int dispinterface = is_attr(iface->attrs, ATTR_DISPINTERFACE);
@@ -1610,6 +1623,15 @@ static void write_coclass_forward(FILE *header, type_t *cocl)
fprintf(header, "#endif /* defined __%s_FWD_DEFINED__ */\n\n", cocl->name );
}
+static void write_apicontract(FILE *header, type_t *apicontract)
+{
+ char *name = format_apicontract_macro(apicontract);
+ fprintf(header, "#if !defined(%s_VERSION)\n", name);
+ fprintf(header, "#define %s_VERSION %#x\n", name, get_attrv(apicontract->attrs, ATTR_CONTRACTVERSION));
+ fprintf(header, "#endif // defined(%s_VERSION)\n\n", name);
+ free(name);
+}
+
static void write_import(FILE *header, const char *fname)
{
char *hname, *p;
@@ -1728,6 +1750,8 @@ static void write_header_stmts(FILE *header, const statement_list_t *stmts, cons
}
else if (type_get_type(stmt->u.type) == TYPE_COCLASS)
write_coclass(header, stmt->u.type);
+ else if (type_get_type(stmt->u.type) == TYPE_APICONTRACT)
+ write_apicontract(header, stmt->u.type);
else
{
write_type_definition(header, stmt->u.type, stmt->declonly);
diff --git a/tools/widl/parser.l b/tools/widl/parser.l
index b9370b8258d..20ae88beb64 100644
--- a/tools/widl/parser.l
+++ b/tools/widl/parser.l
@@ -267,6 +267,7 @@ static const struct keyword keywords[] = {
{"_fastcall", tFASTCALL, 0},
{"_pascal", tPASCAL, 0},
{"_stdcall", tSTDCALL, 0},
+ {"apicontract", tAPICONTRACT, 1},
{"boolean", tBOOLEAN, 0},
{"byte", tBYTE, 0},
{"case", tCASE, 0},
diff --git a/tools/widl/parser.y b/tools/widl/parser.y
index 8a3aa2f7679..31bd5ce733f 100644
--- a/tools/widl/parser.y
+++ b/tools/widl/parser.y
@@ -99,6 +99,7 @@ static attr_list_t *check_library_attrs(const char *name, attr_list_t *attrs);
static attr_list_t *check_dispiface_attrs(const char *name, attr_list_t *attrs);
static attr_list_t *check_module_attrs(const char *name, attr_list_t *attrs);
static attr_list_t *check_coclass_attrs(const char *name, attr_list_t *attrs);
+static attr_list_t *check_apicontract_attrs(const char *name, attr_list_t *attrs);
const char *get_attr_display_name(enum attr_type type);
static void add_explicit_handle_if_necessary(const type_t *iface, var_t *func);
static void check_def(const type_t *t);
@@ -172,7 +173,9 @@ static typelib_t *current_typelib;
%token GREATEREQUAL LESSEQUAL
%token LOGICALOR LOGICALAND
%token ELLIPSIS
-%token tAGGREGATABLE tALLNODES tALLOCATE tANNOTATION tAPPOBJECT tASYNC tASYNCUUID
+%token tAGGREGATABLE tALLNODES tALLOCATE tANNOTATION
+%token tAPICONTRACT
+%token tAPPOBJECT tASYNC tASYNCUUID
%token tAUTOHANDLE tBINDABLE tBOOLEAN tBROADCAST tBYTE tBYTECOUNT
%token tCALLAS tCALLBACK tCASE tCDECL tCHAR tCOCLASS tCODE tCOMMSTATUS
%token tCONST tCONTEXTHANDLE tCONTEXTHANDLENOSERIALIZE
@@ -290,6 +293,7 @@ static typelib_t *current_typelib;
%type <declarator> m_abstract_declarator abstract_declarator abstract_declarator_no_direct abstract_direct_declarator
%type <declarator_list> declarator_list struct_declarator_list
%type <type> coclass coclasshdr coclassdef
+%type <type> apicontract
%type <num> contract_ver
%type <num> pointer_type threading_type version
%type <str> libraryhdr callconv cppquote importlib import t_ident
@@ -347,6 +351,8 @@ gbl_statements: { $$ = NULL; }
| gbl_statements coclassdef { $$ = append_statement($1, make_statement_type_decl($2));
reg_type($2, $2->name, current_namespace, 0);
}
+ | gbl_statements apicontract ';' { $$ = append_statement($1, make_statement_type_decl($2));
+ reg_type($2, $2->name, current_namespace, 0); }
| gbl_statements moduledef { $$ = append_statement($1, make_statement_module($2)); }
| gbl_statements librarydef { $$ = append_statement($1, make_statement_library($2)); }
| gbl_statements statement { $$ = append_statement($1, $2); }
@@ -361,6 +367,8 @@ imp_statements: { $$ = NULL; }
| imp_statements coclassdef { $$ = append_statement($1, make_statement_type_decl($2));
reg_type($2, $2->name, current_namespace, 0);
}
+ | imp_statements apicontract ';' { $$ = append_statement($1, make_statement_type_decl($2));
+ reg_type($2, $2->name, current_namespace, 0); }
| imp_statements moduledef { $$ = append_statement($1, make_statement_module($2)); }
| imp_statements statement { $$ = append_statement($1, $2); }
| imp_statements importlib { $$ = append_statement($1, make_statement_importlib($2)); }
@@ -865,6 +873,13 @@ coclassdef: coclasshdr '{' coclass_ints '}' semicolon_opt
{ $$ = type_coclass_define($1, $3); }
;
+apicontract: attributes tAPICONTRACT aIDENTIFIER '{' '}'
+ { $$ = get_type(TYPE_APICONTRACT, $3, current_namespace, 0);
+ check_def($$);
+ $$->attrs = check_apicontract_attrs($$->name, $1);
+ }
+ ;
+
namespacedef: tNAMESPACE aIDENTIFIER { $$ = $2; }
| tNAMESPACE aNAMESPACE { $$ = $2; }
;
@@ -2148,113 +2163,114 @@ struct allowed_attr
unsigned int on_dispinterface : 1;
unsigned int on_module : 1;
unsigned int on_coclass : 1;
+ unsigned int on_apicontract : 1;
const char *display_name;
};
struct allowed_attr allowed_attr[] =
{
- /* attr { D ACF I Fn ARG T En Enm St Un Fi L DI M C <display name> } */
- /* ATTR_AGGREGATABLE */ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, "aggregatable" },
- /* ATTR_ALLOCATE */ { 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, "allocate" },
- /* ATTR_ANNOTATION */ { 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "annotation" },
- /* ATTR_APPOBJECT */ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, "appobject" },
- /* ATTR_ASYNC */ { 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "async" },
- /* ATTR_ASYNCUUID */ { 1, 0, 1, 0, 0, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, "async_uuid" },
- /* ATTR_AUTO_HANDLE */ { 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "auto_handle" },
- /* ATTR_BINDABLE */ { 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "bindable" },
- /* ATTR_BROADCAST */ { 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "broadcast" },
- /* ATTR_CALLAS */ { 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "call_as" },
- /* ATTR_CALLCONV */ { 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, NULL },
- /* ATTR_CASE */ { 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, "case" },
- /* ATTR_CODE */ { 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "code" },
- /* ATTR_COMMSTATUS */ { 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "comm_status" },
- /* ATTR_CONTEXTHANDLE */ { 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, "context_handle" },
- /* ATTR_CONTRACTVERSION */ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "contractversion" },
- /* ATTR_CONTROL */ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, "control" },
- /* ATTR_DECODE */ { 0, 0, 1, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, "decode" },
- /* ATTR_DEFAULT */ { 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, "default" },
- /* ATTR_DEFAULTBIND */ { 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "defaultbind" },
- /* ATTR_DEFAULTCOLLELEM */ { 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "defaultcollelem" },
- /* ATTR_DEFAULTVALUE */ { 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "defaultvalue" },
- /* ATTR_DEFAULTVTABLE */ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, "defaultvtable" },
- /* ATTR_DISABLECONSISTENCYCHECK */{ 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "disable_consistency_check" },
- /* ATTR_DISPINTERFACE */ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, NULL },
- /* ATTR_DISPLAYBIND */ { 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "displaybind" },
- /* ATTR_DLLNAME */ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, "dllname" },
- /* ATTR_DUAL */ { 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "dual" },
- /* ATTR_ENABLEALLOCATE */ { 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "enable_allocate" },
- /* ATTR_ENCODE */ { 0, 0, 1, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, "encode" },
- /* ATTR_ENDPOINT */ { 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "endpoint" },
- /* ATTR_ENTRY */ { 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "entry" },
- /* ATTR_EXPLICIT_HANDLE */ { 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "explicit_handle" },
- /* ATTR_FAULTSTATUS */ { 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "fault_status" },
- /* ATTR_FORCEALLOCATE */ { 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "force_allocate" },
- /* ATTR_HANDLE */ { 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, "handle" },
- /* ATTR_HELPCONTEXT */ { 0, 0, 1, 1, 0, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, "helpcontext" },
- /* ATTR_HELPFILE */ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, "helpfile" },
- /* ATTR_HELPSTRING */ { 0, 0, 1, 1, 0, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, "helpstring" },
- /* ATTR_HELPSTRINGCONTEXT */ { 0, 0, 1, 1, 0, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, "helpstringcontext" },
- /* ATTR_HELPSTRINGDLL */ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, "helpstringdll" },
- /* ATTR_HIDDEN */ { 0, 0, 1, 1, 0, 1, 1, 1, 0, 0, 0, 1, 1, 0, 1, "hidden" },
- /* ATTR_ID */ { 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, "id" },
- /* ATTR_IDEMPOTENT */ { 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "idempotent" },
- /* ATTR_IGNORE */ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, "ignore" },
- /* ATTR_IIDIS */ { 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, "iid_is" },
- /* ATTR_IMMEDIATEBIND */ { 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "immediatebind" },
- /* ATTR_IMPLICIT_HANDLE */ { 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "implicit_handle" },
- /* ATTR_IN */ { 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "in" },
- /* ATTR_INPUTSYNC */ { 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "inputsync" },
- /* ATTR_LENGTHIS */ { 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, "length_is" },
- /* ATTR_LIBLCID */ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, "lcid" },
- /* ATTR_LICENSED */ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, "licensed" },
- /* ATTR_LOCAL */ { 1, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "local" },
- /* ATTR_MAYBE */ { 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "maybe" },
- /* ATTR_MESSAGE */ { 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "message" },
- /* ATTR_NOCODE */ { 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "nocode" },
- /* ATTR_NONBROWSABLE */ { 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "nonbrowsable" },
- /* ATTR_NONCREATABLE */ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, "noncreatable" },
- /* ATTR_NONEXTENSIBLE */ { 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "nonextensible" },
- /* ATTR_NOTIFY */ { 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "notify" },
- /* ATTR_NOTIFYFLAG */ { 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "notify_flag" },
- /* ATTR_OBJECT */ { 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "object" },
- /* ATTR_ODL */ { 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, "odl" },
- /* ATTR_OLEAUTOMATION */ { 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "oleautomation" },
- /* ATTR_OPTIMIZE */ { 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "optimize" },
- /* ATTR_OPTIONAL */ { 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "optional" },
- /* ATTR_OUT */ { 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "out" },
- /* ATTR_PARAMLCID */ { 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "lcid" },
- /* ATTR_PARTIALIGNORE */ { 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "partial_ignore" },
- /* ATTR_POINTERDEFAULT */ { 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "pointer_default" },
- /* ATTR_POINTERTYPE */ { 1, 0, 0, 0, 1, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, "ref, unique or ptr" },
- /* ATTR_PROGID */ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, "progid" },
- /* ATTR_PROPGET */ { 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "propget" },
- /* ATTR_PROPPUT */ { 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "propput" },
- /* ATTR_PROPPUTREF */ { 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "propputref" },
- /* ATTR_PROXY */ { 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "proxy" },
- /* ATTR_PUBLIC */ { 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, "public" },
- /* ATTR_RANGE */ { 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 1, 0, 0, 0, 0, "range" },
- /* ATTR_READONLY */ { 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, "readonly" },
- /* ATTR_REPRESENTAS */ { 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, "represent_as" },
- /* ATTR_REQUESTEDIT */ { 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "requestedit" },
- /* ATTR_RESTRICTED */ { 0, 0, 1, 1, 0, 1, 1, 0, 1, 0, 0, 1, 1, 1, 1, "restricted" },
- /* ATTR_RETVAL */ { 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "retval" },
- /* ATTR_SIZEIS */ { 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, "size_is" },
- /* ATTR_SOURCE */ { 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, "source" },
- /* ATTR_STRICTCONTEXTHANDLE */ { 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "strict_context_handle" },
- /* ATTR_STRING */ { 1, 0, 0, 1, 1, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, "string" },
- /* ATTR_SWITCHIS */ { 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, "switch_is" },
- /* ATTR_SWITCHTYPE */ { 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, "switch_type" },
- /* ATTR_THREADING */ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, "threading" },
- /* ATTR_TRANSMITAS */ { 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, "transmit_as" },
- /* ATTR_UIDEFAULT */ { 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "uidefault" },
- /* ATTR_USESGETLASTERROR */ { 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "usesgetlasterror" },
- /* ATTR_USERMARSHAL */ { 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, "user_marshal" },
- /* ATTR_UUID */ { 1, 0, 1, 0, 0, 1, 1, 0, 1, 0, 0, 1, 1, 1, 1, "uuid" },
- /* ATTR_V1ENUM */ { 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, "v1_enum" },
- /* ATTR_VARARG */ { 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "vararg" },
- /* ATTR_VERSION */ { 1, 0, 1, 0, 0, 1, 1, 0, 2, 0, 0, 1, 0, 0, 1, "version" },
- /* ATTR_VIPROGID */ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, "vi_progid" },
- /* ATTR_WIREMARSHAL */ { 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, "wire_marshal" },
+ /* attr { D ACF I Fn ARG T En Enm St Un Fi L DI M C AC <display name> } */
+ /* ATTR_AGGREGATABLE */ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, "aggregatable" },
+ /* ATTR_ALLOCATE */ { 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "allocate" },
+ /* ATTR_ANNOTATION */ { 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "annotation" },
+ /* ATTR_APPOBJECT */ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, "appobject" },
+ /* ATTR_ASYNC */ { 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "async" },
+ /* ATTR_ASYNCUUID */ { 1, 0, 1, 0, 0, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 0, "async_uuid" },
+ /* ATTR_AUTO_HANDLE */ { 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "auto_handle" },
+ /* ATTR_BINDABLE */ { 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "bindable" },
+ /* ATTR_BROADCAST */ { 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "broadcast" },
+ /* ATTR_CALLAS */ { 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "call_as" },
+ /* ATTR_CALLCONV */ { 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, NULL },
+ /* ATTR_CASE */ { 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, "case" },
+ /* ATTR_CODE */ { 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "code" },
+ /* ATTR_COMMSTATUS */ { 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "comm_status" },
+ /* ATTR_CONTEXTHANDLE */ { 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "context_handle" },
+ /* ATTR_CONTRACTVERSION */ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, "contractversion" },
+ /* ATTR_CONTROL */ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, "control" },
+ /* ATTR_DECODE */ { 0, 0, 1, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "decode" },
+ /* ATTR_DEFAULT */ { 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, "default" },
+ /* ATTR_DEFAULTBIND */ { 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "defaultbind" },
+ /* ATTR_DEFAULTCOLLELEM */ { 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "defaultcollelem" },
+ /* ATTR_DEFAULTVALUE */ { 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "defaultvalue" },
+ /* ATTR_DEFAULTVTABLE */ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, "defaultvtable" },
+ /* ATTR_DISABLECONSISTENCYCHECK */{ 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "disable_consistency_check" },
+ /* ATTR_DISPINTERFACE */ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, NULL },
+ /* ATTR_DISPLAYBIND */ { 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "displaybind" },
+ /* ATTR_DLLNAME */ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, "dllname" },
+ /* ATTR_DUAL */ { 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "dual" },
+ /* ATTR_ENABLEALLOCATE */ { 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "enable_allocate" },
+ /* ATTR_ENCODE */ { 0, 0, 1, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "encode" },
+ /* ATTR_ENDPOINT */ { 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "endpoint" },
+ /* ATTR_ENTRY */ { 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "entry" },
+ /* ATTR_EXPLICIT_HANDLE */ { 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "explicit_handle" },
+ /* ATTR_FAULTSTATUS */ { 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "fault_status" },
+ /* ATTR_FORCEALLOCATE */ { 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "force_allocate" },
+ /* ATTR_HANDLE */ { 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "handle" },
+ /* ATTR_HELPCONTEXT */ { 0, 0, 1, 1, 0, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 0, "helpcontext" },
+ /* ATTR_HELPFILE */ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, "helpfile" },
+ /* ATTR_HELPSTRING */ { 0, 0, 1, 1, 0, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 0, "helpstring" },
+ /* ATTR_HELPSTRINGCONTEXT */ { 0, 0, 1, 1, 0, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 0, "helpstringcontext" },
+ /* ATTR_HELPSTRINGDLL */ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, "helpstringdll" },
+ /* ATTR_HIDDEN */ { 0, 0, 1, 1, 0, 1, 1, 1, 0, 0, 0, 1, 1, 0, 1, 0, "hidden" },
+ /* ATTR_ID */ { 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, "id" },
+ /* ATTR_IDEMPOTENT */ { 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "idempotent" },
+ /* ATTR_IGNORE */ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, "ignore" },
+ /* ATTR_IIDIS */ { 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, "iid_is" },
+ /* ATTR_IMMEDIATEBIND */ { 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "immediatebind" },
+ /* ATTR_IMPLICIT_HANDLE */ { 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "implicit_handle" },
+ /* ATTR_IN */ { 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "in" },
+ /* ATTR_INPUTSYNC */ { 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "inputsync" },
+ /* ATTR_LENGTHIS */ { 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, "length_is" },
+ /* ATTR_LIBLCID */ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, "lcid" },
+ /* ATTR_LICENSED */ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, "licensed" },
+ /* ATTR_LOCAL */ { 1, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "local" },
+ /* ATTR_MAYBE */ { 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "maybe" },
+ /* ATTR_MESSAGE */ { 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "message" },
+ /* ATTR_NOCODE */ { 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "nocode" },
+ /* ATTR_NONBROWSABLE */ { 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "nonbrowsable" },
+ /* ATTR_NONCREATABLE */ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, "noncreatable" },
+ /* ATTR_NONEXTENSIBLE */ { 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "nonextensible" },
+ /* ATTR_NOTIFY */ { 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "notify" },
+ /* ATTR_NOTIFYFLAG */ { 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "notify_flag" },
+ /* ATTR_OBJECT */ { 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "object" },
+ /* ATTR_ODL */ { 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, "odl" },
+ /* ATTR_OLEAUTOMATION */ { 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "oleautomation" },
+ /* ATTR_OPTIMIZE */ { 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "optimize" },
+ /* ATTR_OPTIONAL */ { 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "optional" },
+ /* ATTR_OUT */ { 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "out" },
+ /* ATTR_PARAMLCID */ { 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "lcid" },
+ /* ATTR_PARTIALIGNORE */ { 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "partial_ignore" },
+ /* ATTR_POINTERDEFAULT */ { 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "pointer_default" },
+ /* ATTR_POINTERTYPE */ { 1, 0, 0, 0, 1, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, "ref, unique or ptr" },
+ /* ATTR_PROGID */ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, "progid" },
+ /* ATTR_PROPGET */ { 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "propget" },
+ /* ATTR_PROPPUT */ { 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "propput" },
+ /* ATTR_PROPPUTREF */ { 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "propputref" },
+ /* ATTR_PROXY */ { 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "proxy" },
+ /* ATTR_PUBLIC */ { 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "public" },
+ /* ATTR_RANGE */ { 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, "range" },
+ /* ATTR_READONLY */ { 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, "readonly" },
+ /* ATTR_REPRESENTAS */ { 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "represent_as" },
+ /* ATTR_REQUESTEDIT */ { 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "requestedit" },
+ /* ATTR_RESTRICTED */ { 0, 0, 1, 1, 0, 1, 1, 0, 1, 0, 0, 1, 1, 1, 1, 0, "restricted" },
+ /* ATTR_RETVAL */ { 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "retval" },
+ /* ATTR_SIZEIS */ { 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, "size_is" },
+ /* ATTR_SOURCE */ { 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, "source" },
+ /* ATTR_STRICTCONTEXTHANDLE */ { 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "strict_context_handle" },
+ /* ATTR_STRING */ { 1, 0, 0, 1, 1, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, "string" },
+ /* ATTR_SWITCHIS */ { 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, "switch_is" },
+ /* ATTR_SWITCHTYPE */ { 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, "switch_type" },
+ /* ATTR_THREADING */ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, "threading" },
+ /* ATTR_TRANSMITAS */ { 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "transmit_as" },
+ /* ATTR_UIDEFAULT */ { 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "uidefault" },
+ /* ATTR_USESGETLASTERROR */ { 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "usesgetlasterror" },
+ /* ATTR_USERMARSHAL */ { 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "user_marshal" },
+ /* ATTR_UUID */ { 1, 0, 1, 0, 0, 1, 1, 0, 1, 0, 0, 1, 1, 1, 1, 0, "uuid" },
+ /* ATTR_V1ENUM */ { 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, "v1_enum" },
+ /* ATTR_VARARG */ { 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "vararg" },
+ /* ATTR_VERSION */ { 1, 0, 1, 0, 0, 1, 1, 0, 2, 0, 0, 1, 0, 0, 1, 0, "version" },
+ /* ATTR_VIPROGID */ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, "vi_progid" },
+ /* ATTR_WIREMARSHAL */ { 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "wire_marshal" },
};
const char *get_attr_display_name(enum attr_type type)
@@ -2445,6 +2461,17 @@ static attr_list_t *check_coclass_attrs(const char *name, attr_list_t *attrs)
return attrs;
}
+static attr_list_t *check_apicontract_attrs(const char *name, attr_list_t *attrs)
+{
+ const attr_t *attr;
+ if (!attrs) return attrs;
+ LIST_FOR_EACH_ENTRY(attr, attrs, const attr_t, entry)
+ if (!allowed_attr[attr->type].on_apicontract)
+ error_loc("inapplicable attribute %s for apicontract %s\n",
+ allowed_attr[attr->type].display_name, name);
+ return attrs;
+}
+
static int is_allowed_conf_type(const type_t *type)
{
switch (type_get_type(type))
@@ -2484,6 +2511,10 @@ static int is_allowed_conf_type(const type_t *type)
case TYPE_INTERFACE:
case TYPE_BITFIELD:
return FALSE;
+ case TYPE_APICONTRACT:
+ /* not supposed to be here */
+ assert(0);
+ break;
}
return FALSE;
}
diff --git a/tools/widl/typegen.c b/tools/widl/typegen.c
index 4874dfd6c24..5d0f24be06f 100644
--- a/tools/widl/typegen.c
+++ b/tools/widl/typegen.c
@@ -374,6 +374,10 @@ enum typegen_type typegen_detect_type(const type_t *type, const attr_list_t *att
case TYPE_ALIAS:
case TYPE_BITFIELD:
break;
+ case TYPE_APICONTRACT:
+ /* not supposed to be here */
+ assert(0);
+ break;
}
return TGT_INVALID;
}
@@ -1966,6 +1970,7 @@ unsigned int type_memsize_and_alignment(const type_t *t, unsigned int *align)
case TYPE_MODULE:
case TYPE_FUNCTION:
case TYPE_BITFIELD:
+ case TYPE_APICONTRACT:
/* these types should not be encountered here due to language
* restrictions (interface, void, coclass, module), logical
* restrictions (alias - due to type_get_type call above) or
@@ -2067,6 +2072,7 @@ static unsigned int type_buffer_alignment(const type_t *t)
case TYPE_MODULE:
case TYPE_FUNCTION:
case TYPE_BITFIELD:
+ case TYPE_APICONTRACT:
/* these types should not be encountered here due to language
* restrictions (interface, void, coclass, module), logical
* restrictions (alias - due to type_get_type call above) or
diff --git a/tools/widl/typelib.c b/tools/widl/typelib.c
index cf027558d0a..faf76440f93 100644
--- a/tools/widl/typelib.c
+++ b/tools/widl/typelib.c
@@ -224,7 +224,8 @@ unsigned short get_type_vt(type_t *t)
return VT_VOID;
case TYPE_ALIAS:
- /* aliases should be filtered out by the type_get_type call above */
+ case TYPE_APICONTRACT:
+ /* not supposed to be here */
assert(0);
break;
diff --git a/tools/widl/typetree.h b/tools/widl/typetree.h
index e288c574002..7abec41a8fd 100644
--- a/tools/widl/typetree.h
+++ b/tools/widl/typetree.h
@@ -223,6 +223,9 @@ static inline int type_is_complete(const type_t *type)
case TYPE_ARRAY:
case TYPE_BITFIELD:
return TRUE;
+ case TYPE_APICONTRACT:
+ assert(0);
+ break;
}
return FALSE;
}
diff --git a/tools/widl/widltypes.h b/tools/widl/widltypes.h
index 0f24f102215..89998056f94 100644
--- a/tools/widl/widltypes.h
+++ b/tools/widl/widltypes.h
@@ -433,6 +433,7 @@ enum type_type
TYPE_POINTER,
TYPE_ARRAY,
TYPE_BITFIELD,
+ TYPE_APICONTRACT,
};
struct _type_t {
--
2.28.0

View File

@ -1,74 +0,0 @@
From 9e4292bb0ed2953f71ebe6c835db790d3cd5f954 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?R=C3=A9mi=20Bernon?= <rbernon@codeweavers.com>
Date: Mon, 12 Oct 2020 19:11:44 +0200
Subject: [PATCH 06/28] widl: Prefer mangled name over typedef in WinRT mode.
MIDL generates prefixed mangled name for every use of enum, struct and
union types, in fields types as well as function arguments. When the
types are in the global namespace, the typedef name is used instead.
---
tools/widl/header.c | 13 ++++++++++---
tools/widl/typetree.c | 2 +-
2 files changed, 11 insertions(+), 4 deletions(-)
diff --git a/tools/widl/header.c b/tools/widl/header.c
index 607d156ccf4..d8dfcf4f4c3 100644
--- a/tools/widl/header.c
+++ b/tools/widl/header.c
@@ -250,7 +250,7 @@ static void write_fields(FILE *h, var_list_t *fields)
default:
;
}
- write_type_v(h, &v->declspec, TRUE, v->declonly, name, NAME_DEFAULT);
+ write_type_v(h, &v->declspec, TRUE, v->declonly, name, NAME_C);
fprintf(h, ";\n");
}
}
@@ -322,7 +322,7 @@ void write_type_left(FILE *h, const decl_spec_t *ds, enum name_type name_type, i
if ((ds->qualifier & TYPE_QUALIFIER_CONST) && (type_is_alias(t) || !is_ptr(t)))
fprintf(h, "const ");
- if (type_is_alias(t)) fprintf(h, "%s", t->name);
+ if (!winrt_mode && type_is_alias(t)) fprintf(h, "%s", t->name);
else {
switch (type_get_type_detect_alias(t)) {
case TYPE_ENUM:
@@ -464,6 +464,13 @@ void write_type_left(FILE *h, const decl_spec_t *ds, enum name_type name_type, i
break;
}
case TYPE_ALIAS:
+ {
+ const decl_spec_t *ds = type_alias_get_aliasee(t);
+ int in_namespace = ds && ds->type && ds->type->namespace && !is_global_namespace(ds->type->namespace);
+ if (!in_namespace) fprintf(h, "%s", t->name);
+ else write_type_left(h, ds, name_type, declonly, write_callconv);
+ break;
+ }
case TYPE_APICONTRACT:
/* handled elsewhere */
assert(0);
@@ -807,7 +814,7 @@ static void write_generic_handle_routines(FILE *header)
static void write_typedef(FILE *header, type_t *type, int declonly)
{
fprintf(header, "typedef ");
- write_type_v(header, type_alias_get_aliasee(type), FALSE, declonly, type->name, NAME_DEFAULT);
+ write_type_v(header, type_alias_get_aliasee(type), FALSE, declonly, type->name, NAME_C);
fprintf(header, ";\n");
}
diff --git a/tools/widl/typetree.c b/tools/widl/typetree.c
index ebba2c4c6bb..d8dcd5d80b0 100644
--- a/tools/widl/typetree.c
+++ b/tools/widl/typetree.c
@@ -82,7 +82,7 @@ const char *type_get_name(const type_t *type, enum name_type name_type)
case NAME_DEFAULT:
return type->name;
case NAME_C:
- return type->c_name;
+ return type->c_name ? type->c_name : type->name;
}
assert(0);
--
2.28.0

View File

@ -1,27 +0,0 @@
From 98a3b25143161e249102eceef6face6833ba19ea Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?R=C3=A9mi=20Bernon?= <rbernon@codeweavers.com>
Date: Mon, 12 Oct 2020 19:11:44 +0200
Subject: [PATCH 07/28] widl: Don't output typedef statement in WinRT mode.
For types under a non-global namespace, since we reference them with
their prefixed mangled names.
---
tools/widl/header.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/tools/widl/header.c b/tools/widl/header.c
index d8dfcf4f4c3..0a8272fdbb4 100644
--- a/tools/widl/header.c
+++ b/tools/widl/header.c
@@ -813,6 +813,8 @@ static void write_generic_handle_routines(FILE *header)
static void write_typedef(FILE *header, type_t *type, int declonly)
{
+ type_t *t = type_alias_get_aliasee_type(type);
+ if (winrt_mode && t->namespace && !is_global_namespace(t->namespace)) return;
fprintf(header, "typedef ");
write_type_v(header, type_alias_get_aliasee(type), FALSE, declonly, type->name, NAME_C);
fprintf(header, ";\n");
--
2.28.0

View File

@ -1,22 +1,22 @@
From 9b5039017bd7072164042bf7b739f373134978ea Mon Sep 17 00:00:00 2001
From 8a97a7f01dcf01f089dd65dc7739718db8bea07c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?R=C3=A9mi=20Bernon?= <rbernon@codeweavers.com>
Date: Wed, 23 Sep 2020 19:23:45 +0200
Subject: [PATCH 08/28] widl: Support WinRT contract attribute.
Subject: [PATCH] widl: Support WinRT contract attribute.
---
include/windows.foundation.idl | 14 ++---
include/windows.media.speechsynthesis.idl | 13 ++++
tools/widl/header.c | 72 ++++++++++++++++++++++-
tools/widl/parser.l | 1 +
tools/widl/parser.y | 10 ++++
tools/widl/parser.y | 9 +++
tools/widl/widltypes.h | 1 +
6 files changed, 101 insertions(+), 10 deletions(-)
6 files changed, 100 insertions(+), 10 deletions(-)
diff --git a/include/windows.foundation.idl b/include/windows.foundation.idl
index 2a38e9f671b..5e17062f399 100644
index 2c16fa2da22..c08334ed660 100644
--- a/include/windows.foundation.idl
+++ b/include/windows.foundation.idl
@@ -28,7 +28,7 @@ import "windowscontracts.idl";
@@ -27,7 +27,7 @@ import "inspectable.idl";
namespace Windows {
namespace Foundation {
@ -25,7 +25,7 @@ index 2a38e9f671b..5e17062f399 100644
enum PropertyType {
Empty = 0,
UInt8 = 1,
@@ -73,19 +73,19 @@ namespace Windows {
@@ -72,19 +72,19 @@ namespace Windows {
OtherTypeArray = 1044
};
@ -48,7 +48,7 @@ index 2a38e9f671b..5e17062f399 100644
struct Rect {
FLOAT X;
FLOAT Y;
@@ -93,18 +93,18 @@ namespace Windows {
@@ -92,18 +92,18 @@ namespace Windows {
FLOAT Height;
};
@ -92,7 +92,7 @@ index d3dedfe0709..7a1de5fcba6 100644
+ }
+}
diff --git a/tools/widl/header.c b/tools/widl/header.c
index 0a8272fdbb4..0fd3eb917ea 100644
index a892243fb54..e1c48ae35ea 100644
--- a/tools/widl/header.c
+++ b/tools/widl/header.c
@@ -45,6 +45,11 @@ generic_handle_list_t generic_handle_list = LIST_INIT(generic_handle_list);
@ -107,7 +107,7 @@ index 0a8272fdbb4..0fd3eb917ea 100644
static void indent(FILE *h, int delta)
{
int c;
@@ -218,7 +223,9 @@ static void write_fields(FILE *h, var_list_t *fields)
@@ -218,7 +223,9 @@ static void write_fields(FILE *h, var_list_t *fields, enum name_type name_type)
}
LIST_FOR_EACH_ENTRY( v, fields, var_t, entry ) {
@ -117,9 +117,9 @@ index 0a8272fdbb4..0fd3eb917ea 100644
indent(h, 0);
name = v->name;
@@ -252,6 +259,7 @@ static void write_fields(FILE *h, var_list_t *fields)
@@ -252,6 +259,7 @@ static void write_fields(FILE *h, var_list_t *fields, enum name_type name_type)
}
write_type_v(h, &v->declspec, TRUE, v->declonly, name, NAME_C);
write_type_v(h, &v->declspec, TRUE, v->declonly, name, name_type);
fprintf(h, ";\n");
+ if (contract) write_apicontract_guard_end(h, contract);
}
@ -145,7 +145,7 @@ index 0a8272fdbb4..0fd3eb917ea 100644
}
int needs_space_after(type_t *t)
@@ -563,7 +574,9 @@ static void write_type_definition(FILE *f, type_t *t, int declonly)
@@ -555,7 +566,9 @@ static void write_type_definition(FILE *f, type_t *t, int declonly)
int in_namespace = t->namespace && !is_global_namespace(t->namespace);
int save_written = t->written;
decl_spec_t ds = {.type = t};
@ -155,7 +155,7 @@ index 0a8272fdbb4..0fd3eb917ea 100644
if(in_namespace) {
fprintf(f, "#ifdef __cplusplus\n");
fprintf(f, "} /* extern \"C\" */\n");
@@ -581,6 +594,7 @@ static void write_type_definition(FILE *f, type_t *t, int declonly)
@@ -573,6 +586,7 @@ static void write_type_definition(FILE *f, type_t *t, int declonly)
fprintf(f, ";\n");
fprintf(f, "#endif\n\n");
}
@ -163,8 +163,8 @@ index 0a8272fdbb4..0fd3eb917ea 100644
}
void write_type_decl(FILE *f, const decl_spec_t *t, const char *name)
@@ -1468,12 +1482,55 @@ static char *format_apicontract_macro(const type_t *type)
return name;
@@ -1452,12 +1466,55 @@ static void write_forward(FILE *header, type_t *iface)
fprintf(header, "#endif\n\n" );
}
+static void write_winrt_type_comments(FILE *header, const type_t *type)
@ -219,7 +219,7 @@ index 0a8272fdbb4..0fd3eb917ea 100644
fprintf(header,"#ifndef __%s_%sINTERFACE_DEFINED__\n", iface->c_name, dispinterface ? "DISP" : "");
fprintf(header,"#define __%s_%sINTERFACE_DEFINED__\n\n", iface->c_name, dispinterface ? "DISP" : "");
}
@@ -1482,6 +1539,7 @@ static void write_com_interface_end(FILE *header, type_t *iface)
@@ -1466,6 +1523,7 @@ static void write_com_interface_end(FILE *header, type_t *iface)
{
int dispinterface = is_attr(iface->attrs, ATTR_DISPINTERFACE);
const UUID *uuid = get_attrp(iface->attrs, ATTR_UUID);
@ -227,7 +227,7 @@ index 0a8272fdbb4..0fd3eb917ea 100644
type_t *type;
if (uuid)
@@ -1559,17 +1617,22 @@ static void write_com_interface_end(FILE *header, type_t *iface)
@@ -1543,17 +1601,22 @@ static void write_com_interface_end(FILE *header, type_t *iface)
write_locals(header, iface, FALSE);
fprintf(header, "\n");
}
@ -251,7 +251,7 @@ index 0a8272fdbb4..0fd3eb917ea 100644
fprintf(header,"#ifndef __%s_INTERFACE_DEFINED__\n", iface->name);
fprintf(header,"#define __%s_INTERFACE_DEFINED__\n\n", iface->name);
if (var)
@@ -1594,7 +1657,10 @@ static void write_rpc_interface_start(FILE *header, const type_t *iface)
@@ -1578,7 +1641,10 @@ static void write_rpc_interface_start(FILE *header, const type_t *iface)
static void write_rpc_interface_end(FILE *header, const type_t *iface)
{
@ -264,7 +264,7 @@ index 0a8272fdbb4..0fd3eb917ea 100644
static void write_coclass(FILE *header, type_t *cocl)
diff --git a/tools/widl/parser.l b/tools/widl/parser.l
index 11debca2ebd..c3d0e9e2746 100644
index b715342ad59..c689b1cd400 100644
--- a/tools/widl/parser.l
+++ b/tools/widl/parser.l
@@ -338,6 +338,7 @@ static const struct keyword attr_keywords[] =
@ -272,22 +272,14 @@ index 11debca2ebd..c3d0e9e2746 100644
{"context_handle_noserialize", tCONTEXTHANDLENOSERIALIZE, 0},
{"context_handle_serialize", tCONTEXTHANDLENOSERIALIZE, 0},
+ {"contract", tCONTRACT, 1},
{"contractversion", tCONTRACTVERSION, 1},
{"control", tCONTROL, 0},
{"decode", tDECODE, 0},
{"defaultbind", tDEFAULTBIND, 0},
diff --git a/tools/widl/parser.y b/tools/widl/parser.y
index bdd019a2880..28d7e16dad4 100644
index bb29f976629..b6c24741f21 100644
--- a/tools/widl/parser.y
+++ b/tools/widl/parser.y
@@ -180,6 +180,7 @@ static typelib_t *current_typelib;
%token tCALLAS tCALLBACK tCASE tCDECL tCHAR tCOCLASS tCODE tCOMMSTATUS
%token tCONST tCONTEXTHANDLE tCONTEXTHANDLENOSERIALIZE
%token tCONTEXTHANDLESERIALIZE
+%token tCONTRACT
%token tCONTRACTVERSION
%token tCONTROL tCPPQUOTE
%token tDECODE tDEFAULT tDEFAULTBIND
@@ -269,6 +270,7 @@ static typelib_t *current_typelib;
@@ -264,6 +264,7 @@ static typelib_t *current_typelib;
%type <str_list> str_list
%type <expr> m_expr expr expr_const expr_int_const array m_bitfield
%type <expr_list> m_exprs /* exprs expr_list */ expr_list_int_const
@ -295,8 +287,8 @@ index bdd019a2880..28d7e16dad4 100644
%type <type> interfacehdr
%type <stgclass> storage_cls_spec
%type <type_qualifier> type_qualifier m_type_qual_list
@@ -505,6 +507,12 @@ contract_ver:
| aNUM '.' aNUM { $$ = MAKEVERSION($3, $1); }
@@ -490,6 +491,12 @@ str_list: aSTRING { $$ = append_str( NULL, $1 ); }
| str_list ',' aSTRING { $$ = append_str( $1, $3 ); }
;
+contract_req: decl_spec ',' contract_ver { if ($1->type->type_type != TYPE_APICONTRACT)
@ -308,34 +300,34 @@ index bdd019a2880..28d7e16dad4 100644
attribute: { $$ = NULL; }
| tAGGREGATABLE { $$ = make_attr(ATTR_AGGREGATABLE); }
| tANNOTATION '(' aSTRING ')' { $$ = make_attrp(ATTR_ANNOTATION, $3); }
@@ -520,6 +528,7 @@ attribute: { $$ = NULL; }
@@ -505,6 +512,7 @@ attribute: { $$ = NULL; }
| tCONTEXTHANDLE { $$ = make_attrv(ATTR_CONTEXTHANDLE, 0); }
| tCONTEXTHANDLENOSERIALIZE { $$ = make_attrv(ATTR_CONTEXTHANDLE, 0); /* RPC_CONTEXT_HANDLE_DONT_SERIALIZE */ }
| tCONTEXTHANDLESERIALIZE { $$ = make_attrv(ATTR_CONTEXTHANDLE, 0); /* RPC_CONTEXT_HANDLE_SERIALIZE */ }
+ | tCONTRACT '(' contract_req ')' { $$ = make_attrp(ATTR_CONTRACT, $3); }
| tCONTRACTVERSION '(' contract_ver ')' { $$ = make_attrv(ATTR_CONTRACTVERSION, $3); }
| tCONTROL { $$ = make_attr(ATTR_CONTROL); }
| tDECODE { $$ = make_attr(ATTR_DECODE); }
@@ -2160,6 +2169,7 @@ struct allowed_attr allowed_attr[] =
/* ATTR_CODE */ { 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "code" },
/* ATTR_COMMSTATUS */ { 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "comm_status" },
/* ATTR_CONTEXTHANDLE */ { 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "context_handle" },
| tDEFAULT { $$ = make_attr(ATTR_DEFAULT); }
@@ -2141,6 +2149,7 @@ struct allowed_attr allowed_attr[] =
/* ATTR_CODE */ { 0, 1, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "code" },
/* ATTR_COMMSTATUS */ { 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "comm_status" },
/* ATTR_CONTEXTHANDLE */ { 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, "context_handle" },
+ /* ATTR_CONTRACT */ { 0, 0, 1, 1, 0, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, "contract" },
/* ATTR_CONTRACTVERSION */ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, "contractversion" },
/* ATTR_CONTROL */ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, "control" },
/* ATTR_DECODE */ { 0, 0, 1, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "decode" },
/* ATTR_CONTROL */ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, "control" },
/* ATTR_DECODE */ { 0, 0, 0, 1, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, "decode" },
/* ATTR_DEFAULT */ { 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, "default" },
diff --git a/tools/widl/widltypes.h b/tools/widl/widltypes.h
index add7cedfacc..3f358efecd1 100644
index 62d3c1faa00..5e93dc1275f 100644
--- a/tools/widl/widltypes.h
+++ b/tools/widl/widltypes.h
@@ -82,6 +82,7 @@ enum attr_type
@@ -83,6 +83,7 @@ enum attr_type
ATTR_CODE,
ATTR_COMMSTATUS,
ATTR_CONTEXTHANDLE,
+ ATTR_CONTRACT,
ATTR_CONTRACTVERSION,
ATTR_CONTROL,
ATTR_DECODE,
ATTR_DEFAULT,
--
2.28.0
2.29.2

View File

@ -1,4 +1,4 @@
From 9c78c049da7f21fae7b8f020ac17a549477385a0 Mon Sep 17 00:00:00 2001
From 8ae37dd05502ae83af4f0284181eabae88aad9ee Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?R=C3=A9mi=20Bernon?= <rbernon@codeweavers.com>
Date: Mon, 12 Oct 2020 20:34:28 +0200
Subject: [PATCH] widl: Support WinRT marshaling_behavior attribute parsing.
@ -6,15 +6,15 @@ Subject: [PATCH] widl: Support WinRT marshaling_behavior attribute parsing.
---
tools/widl/header.c | 7 +++++++
tools/widl/parser.l | 4 ++++
tools/widl/parser.y | 18 ++++++++++++++++--
tools/widl/parser.y | 19 +++++++++++++++++--
tools/widl/widltypes.h | 9 +++++++++
4 files changed, 36 insertions(+), 2 deletions(-)
4 files changed, 37 insertions(+), 2 deletions(-)
diff --git a/tools/widl/header.c b/tools/widl/header.c
index 0fd3eb917ea..6d5987bd4c1 100644
index e1c48ae35ea..9185477964e 100644
--- a/tools/widl/header.c
+++ b/tools/widl/header.c
@@ -1494,6 +1494,13 @@ static void write_winrt_type_comments(FILE *header, const type_t *type)
@@ -1478,6 +1478,13 @@ static void write_winrt_type_comments(FILE *header, const type_t *type)
fprintf(header, " * Introduced to %s in version %d.%d\n *\n", name, (ver >> 16) & 0xffff, ver & 0xffff);
free(name);
}
@ -29,10 +29,10 @@ index 0fd3eb917ea..6d5987bd4c1 100644
static void write_apicontract_guard_start(FILE *header, const expr_t *expr)
diff --git a/tools/widl/parser.l b/tools/widl/parser.l
index a5f04ebf8ed..d332d50a96b 100644
index c689b1cd400..92f7c7844f3 100644
--- a/tools/widl/parser.l
+++ b/tools/widl/parser.l
@@ -320,6 +320,7 @@ static const struct keyword keywords[] = {
@@ -319,6 +319,7 @@ static const struct keyword keywords[] = {
static const struct keyword attr_keywords[] =
{
{"aggregatable", tAGGREGATABLE, 0},
@ -40,7 +40,7 @@ index a5f04ebf8ed..d332d50a96b 100644
{"all_nodes", tALLNODES, 0},
{"allocate", tALLOCATE, 0},
{"annotation", tANNOTATION, 0},
@@ -380,12 +381,14 @@ static const struct keyword attr_keywords[] =
@@ -378,12 +379,14 @@ static const struct keyword attr_keywords[] =
{"length_is", tLENGTHIS, 0},
{"licensed", tLICENSED, 0},
{"local", tLOCAL, 0},
@ -55,7 +55,7 @@ index a5f04ebf8ed..d332d50a96b 100644
{"nonextensible", tNONEXTENSIBLE, 0},
{"notify", tNOTIFY, 0},
{"notify_flag", tNOTIFYFLAG, 0},
@@ -415,6 +418,7 @@ static const struct keyword attr_keywords[] =
@@ -413,6 +416,7 @@ static const struct keyword attr_keywords[] =
{"single_node", tSINGLENODE, 0},
{"size_is", tSIZEIS, 0},
{"source", tSOURCE, 0},
@ -64,21 +64,22 @@ index a5f04ebf8ed..d332d50a96b 100644
{"string", tSTRING, 0},
{"switch_is", tSWITCHIS, 0},
diff --git a/tools/widl/parser.y b/tools/widl/parser.y
index 1ae8a843c64..4e7df9015a1 100644
index b6c24741f21..f3f71e9838a 100644
--- a/tools/widl/parser.y
+++ b/tools/widl/parser.y
@@ -173,7 +173,9 @@ static typelib_t *current_typelib;
@@ -172,7 +172,10 @@ static typelib_t *current_typelib;
%token GREATEREQUAL LESSEQUAL
%token LOGICALOR LOGICALAND
%token ELLIPSIS
-%token tAGGREGATABLE tALLNODES tALLOCATE tANNOTATION
-%token tAGGREGATABLE tALLNODES tALLOCATE tANNOTATION tAPPOBJECT tASYNC tASYNCUUID
+%token tAGGREGATABLE tALLNODES tAPPOBJECT tASYNC tASYNCUUID
+%token tAGGREGATABLE tALLNODES
+%token tAGILE
+%token tALLOCATE tANNOTATION
%token tAPICONTRACT
%token tAPPOBJECT tASYNC tASYNCUUID
%token tAUTOHANDLE tBINDABLE tBOOLEAN tBROADCAST tBYTE tBYTECOUNT
@@ -214,12 +216,14 @@ static typelib_t *current_typelib;
%token tCALLAS tCALLBACK tCASE tCDECL tCHAR tCOCLASS tCODE tCOMMSTATUS
%token tCONST tCONTEXTHANDLE tCONTEXTHANDLENOSERIALIZE
@@ -208,12 +211,14 @@ static typelib_t *current_typelib;
%token tLENGTHIS tLIBRARY
%token tLICENSED tLOCAL
%token tLONG
@ -93,7 +94,7 @@ index 1ae8a843c64..4e7df9015a1 100644
%token tNONEXTENSIBLE
%token tNOTIFY tNOTIFYFLAG
%token tNULL
@@ -245,6 +249,7 @@ static typelib_t *current_typelib;
@@ -239,6 +244,7 @@ static typelib_t *current_typelib;
%token tSIZEIS tSIZEOF
%token tSMALL
%token tSOURCE
@ -101,16 +102,16 @@ index 1ae8a843c64..4e7df9015a1 100644
%token tSTATIC
%token tSTDCALL
%token tSTRICTCONTEXTHANDLE
@@ -297,7 +302,7 @@ static typelib_t *current_typelib;
@@ -289,7 +295,7 @@ static typelib_t *current_typelib;
%type <declarator> m_abstract_declarator abstract_declarator abstract_declarator_no_direct abstract_direct_declarator
%type <declarator_list> declarator_list struct_declarator_list
%type <type> coclass coclasshdr coclassdef
%type <type> apicontract
%type <num> contract_ver
-%type <num> pointer_type threading_type version
+%type <num> pointer_type threading_type marshaling_behavior version
%type <str> libraryhdr callconv cppquote importlib import t_ident
%type <uuid> uuid_string
%type <import> import_start
@@ -503,6 +508,12 @@ str_list: aSTRING { $$ = append_str( NULL, $1 ); }
@@ -491,6 +497,12 @@ str_list: aSTRING { $$ = append_str( NULL, $1 ); }
| str_list ',' aSTRING { $$ = append_str( $1, $3 ); }
;
@ -120,10 +121,10 @@ index 1ae8a843c64..4e7df9015a1 100644
+ | tSTANDARD { $$ = MARSHALING_STANDARD; }
+ ;
+
contract_ver:
aNUM { $$ = MAKEVERSION(0, $1); }
| aNUM '.' aNUM { $$ = MAKEVERSION($3, $1); }
@@ -569,6 +580,8 @@ attribute: { $$ = NULL; }
contract_req: decl_spec ',' contract_ver { if ($1->type->type_type != TYPE_APICONTRACT)
error_loc("type %s is not an apicontract\n", $1->type->name);
$$ = make_exprl(EXPR_NUM, $3);
@@ -551,6 +563,8 @@ attribute: { $$ = NULL; }
| tLCID { $$ = make_attr(ATTR_PARAMLCID); }
| tLICENSED { $$ = make_attr(ATTR_LICENSED); }
| tLOCAL { $$ = make_attr(ATTR_LOCAL); }
@ -132,19 +133,19 @@ index 1ae8a843c64..4e7df9015a1 100644
| tMAYBE { $$ = make_attr(ATTR_MAYBE); }
| tMESSAGE { $$ = make_attr(ATTR_MESSAGE); }
| tNOCODE { $$ = make_attr(ATTR_NOCODE); }
@@ -2234,6 +2247,7 @@ struct allowed_attr allowed_attr[] =
/* ATTR_LIBLCID */ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, "lcid" },
/* ATTR_LICENSED */ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, "licensed" },
/* ATTR_LOCAL */ { 1, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "local" },
@@ -2188,6 +2202,7 @@ struct allowed_attr allowed_attr[] =
/* ATTR_LIBLCID */ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, "lcid" },
/* ATTR_LICENSED */ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, "licensed" },
/* ATTR_LOCAL */ { 1, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "local" },
+ /* ATTR_MARSHALING_BEHAVIOR */ { 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "marshaling_behavior" },
/* ATTR_MAYBE */ { 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "maybe" },
/* ATTR_MESSAGE */ { 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "message" },
/* ATTR_NOCODE */ { 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "nocode" },
/* ATTR_MAYBE */ { 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "maybe" },
/* ATTR_MESSAGE */ { 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "message" },
/* ATTR_NOCODE */ { 0, 1, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "nocode" },
diff --git a/tools/widl/widltypes.h b/tools/widl/widltypes.h
index d65adfa4368..6f4aee3a2c2 100644
index 5e93dc1275f..c32b029e4a8 100644
--- a/tools/widl/widltypes.h
+++ b/tools/widl/widltypes.h
@@ -123,6 +123,7 @@ enum attr_type
@@ -122,6 +122,7 @@ enum attr_type
ATTR_LIBLCID,
ATTR_LICENSED,
ATTR_LOCAL,
@ -152,7 +153,7 @@ index d65adfa4368..6f4aee3a2c2 100644
ATTR_MAYBE,
ATTR_MESSAGE,
ATTR_NOCODE,
@@ -269,6 +270,14 @@ enum threading_type
@@ -268,6 +269,14 @@ enum threading_type
THREADING_BOTH
};
@ -168,5 +169,5 @@ index d65adfa4368..6f4aee3a2c2 100644
{
TYPE_BASIC_INT8 = 1,
--
2.28.0
2.29.2

View File

@ -1,4 +1,4 @@
From defd3dabc9210023bd2d0b4487f77b7416b55b85 Mon Sep 17 00:00:00 2001
From 2a66f0891e81685b0eaf7dc9bcdd1cb60eb166af Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?R=C3=A9mi=20Bernon?= <rbernon@codeweavers.com>
Date: Tue, 13 Oct 2020 00:11:08 +0200
Subject: [PATCH] widl: Support WinRT exclusiveto attribute parsing.
@ -11,10 +11,10 @@ Subject: [PATCH] widl: Support WinRT exclusiveto attribute parsing.
4 files changed, 12 insertions(+)
diff --git a/tools/widl/header.c b/tools/widl/header.c
index 843aba214a4..8aed9be3f57 100644
index d7efbe72a35..e18585615f2 100644
--- a/tools/widl/header.c
+++ b/tools/widl/header.c
@@ -1485,6 +1485,7 @@ static char *format_apicontract_macro(const type_t *type)
@@ -1469,6 +1469,7 @@ static void write_forward(FILE *header, type_t *iface)
static void write_winrt_type_comments(FILE *header, const type_t *type)
{
expr_t *contract = get_attrp(type->attrs, ATTR_CONTRACT);
@ -22,7 +22,7 @@ index 843aba214a4..8aed9be3f57 100644
fprintf(header, " *\n");
if (contract)
{
@@ -1494,6 +1495,12 @@ static void write_winrt_type_comments(FILE *header, const type_t *type)
@@ -1478,6 +1479,12 @@ static void write_winrt_type_comments(FILE *header, const type_t *type)
fprintf(header, " * Introduced to %s in version %d.%d\n *\n", name, (ver >> 16) & 0xffff, ver & 0xffff);
free(name);
}
@ -36,10 +36,10 @@ index 843aba214a4..8aed9be3f57 100644
{
case THREADING_SINGLE: fprintf(header, " * Class Threading Model: Single Threaded Apartment\n *\n"); break;
diff --git a/tools/widl/parser.l b/tools/widl/parser.l
index 9981e93a715..999cd1054c2 100644
index 403886221a6..01ce16fa8c1 100644
--- a/tools/widl/parser.l
+++ b/tools/widl/parser.l
@@ -357,6 +357,7 @@ static const struct keyword attr_keywords[] =
@@ -355,6 +355,7 @@ static const struct keyword attr_keywords[] =
{"encode", tENCODE, 0},
{"endpoint", tENDPOINT, 0},
{"entry", tENTRY, 0},
@ -48,10 +48,10 @@ index 9981e93a715..999cd1054c2 100644
{"fault_status", tFAULTSTATUS, 0},
{"force_allocate", tFORCEALLOCATE, 0},
diff --git a/tools/widl/parser.y b/tools/widl/parser.y
index d67688edcb0..57e844209f4 100644
index 7cef2abda80..986ecd4b29b 100644
--- a/tools/widl/parser.y
+++ b/tools/widl/parser.y
@@ -194,6 +194,7 @@ static typelib_t *current_typelib;
@@ -189,6 +189,7 @@ static typelib_t *current_typelib;
%token tDLLNAME tDONTFREE tDOUBLE tDUAL
%token tENABLEALLOCATE tENCODE tENDPOINT
%token tENTRY tENUM tERRORSTATUST
@ -59,7 +59,7 @@ index d67688edcb0..57e844209f4 100644
%token tEXPLICITHANDLE tEXTERN
%token tFALSE
%token tFASTCALL tFAULTSTATUS
@@ -558,6 +559,7 @@ attribute: { $$ = NULL; }
@@ -541,6 +542,7 @@ attribute: { $$ = NULL; }
| tENCODE { $$ = make_attr(ATTR_ENCODE); }
| tENDPOINT '(' str_list ')' { $$ = make_attrp(ATTR_ENDPOINT, $3); }
| tENTRY '(' expr_const ')' { $$ = make_attrp(ATTR_ENTRY, $3); }
@ -67,19 +67,19 @@ index d67688edcb0..57e844209f4 100644
| tEXPLICITHANDLE { $$ = make_attr(ATTR_EXPLICIT_HANDLE); }
| tFAULTSTATUS { $$ = make_attr(ATTR_FAULTSTATUS); }
| tFORCEALLOCATE { $$ = make_attr(ATTR_FORCEALLOCATE); }
@@ -2227,6 +2229,7 @@ struct allowed_attr allowed_attr[] =
/* ATTR_ENCODE */ { 0, 0, 1, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "encode" },
/* ATTR_ENDPOINT */ { 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "endpoint" },
/* ATTR_ENTRY */ { 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "entry" },
+ /* ATTR_EXCLUSIVETO */ { 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "exclusive_to" },
/* ATTR_EXPLICIT_HANDLE */ { 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "explicit_handle" },
/* ATTR_FAULTSTATUS */ { 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "fault_status" },
/* ATTR_FORCEALLOCATE */ { 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "force_allocate" },
@@ -2182,6 +2184,7 @@ struct allowed_attr allowed_attr[] =
/* ATTR_ENCODE */ { 0, 0, 0, 1, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, "encode" },
/* ATTR_ENDPOINT */ { 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "endpoint" },
/* ATTR_ENTRY */ { 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "entry" },
+ /* ATTR_EXCLUSIVETO */ { 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "exclusive_to" },
/* ATTR_EXPLICIT_HANDLE */ { 1, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "explicit_handle" },
/* ATTR_FAULTSTATUS */ { 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "fault_status" },
/* ATTR_FORCEALLOCATE */ { 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "force_allocate" },
diff --git a/tools/widl/widltypes.h b/tools/widl/widltypes.h
index 868d05726fb..5e5ca55a2cb 100644
index 90a73af2bf5..6292ddc96db 100644
--- a/tools/widl/widltypes.h
+++ b/tools/widl/widltypes.h
@@ -101,6 +101,7 @@ enum attr_type
@@ -100,6 +100,7 @@ enum attr_type
ATTR_ENCODE,
ATTR_ENDPOINT,
ATTR_ENTRY,
@ -88,5 +88,5 @@ index 868d05726fb..5e5ca55a2cb 100644
ATTR_FAULTSTATUS,
ATTR_FORCEALLOCATE,
--
2.28.0
2.29.2

View File

@ -1 +1,2 @@
Fixes: [49998] widl - Support WinRT idls
Disabled: True

View File

@ -6,3 +6,4 @@
# To support Death Stranding
Fixes: [49756] windows.gaming.input: New DLL
Depends: windows.media.speech.dll
Disabled: True

View File

@ -1,3 +1,4 @@
Fixes: [49740] windows.globalization: New DLL
Fixes: [49998] windows.globalization: New DLL
Depends: windows.gaming.input-dll
Disabled: True

View File

@ -1,2 +1,3 @@
Fixes: [49740] windows.media.speech: New DLL
Depends: widl-winrt-support
Disabled: True

View File

@ -1,2 +1,3 @@
Fixes: [46534] windows.networking.connectivity: New DLL
Depends: windows.globalization-dll
Disabled: True

View File

@ -1 +1 @@
cf49617c1a378dd4a37ab7226187708c501b046f
86e6c0bc28177a3794950fe2a13b8208400b6194