Updating the winrt headers

After this C/L you must update your Windows SDK to 10.0.20348.0 in order to build on Visual Studio

PiperOrigin-RevId: 393786833
This commit is contained in:
jfcarroll
2021-08-30 09:22:59 -07:00
committed by Copybara-Service
parent 8e2f2da45d
commit 9f8d186e42
107 changed files with 6826 additions and 94 deletions
@@ -10,7 +10,9 @@ static_assert(winrt::check_version(CPPWINRT_VERSION, "2.0.210505.3"), "Mismatche
#include "winrt/impl/Windows.Graphics.2.h"
#include "winrt/impl/Windows.Graphics.DirectX.2.h"
#include "winrt/impl/Windows.Graphics.DirectX.Direct3D11.2.h"
#include "winrt/impl/Windows.Security.Authorization.AppCapabilityAccess.2.h"
#include "winrt/impl/Windows.System.2.h"
#include "winrt/impl/Windows.UI.2.h"
#include "winrt/impl/Windows.UI.Composition.2.h"
#include "winrt/impl/Windows.Graphics.Capture.2.h"
namespace winrt::impl
@@ -81,6 +83,12 @@ namespace winrt::impl
check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Graphics::Capture::IDirect3D11CaptureFramePoolStatics2)->CreateFreeThreaded(*(void**)(&device), static_cast<int32_t>(pixelFormat), numberOfBuffers, impl::bind_in(size), &result));
return winrt::Windows::Graphics::Capture::Direct3D11CaptureFramePool{ result, take_ownership_from_abi };
}
template <typename D> WINRT_IMPL_AUTO(winrt::Windows::Foundation::IAsyncOperation<winrt::Windows::Security::Authorization::AppCapabilityAccess::AppCapabilityAccessStatus>) consume_Windows_Graphics_Capture_IGraphicsCaptureAccessStatics<D>::RequestAccessAsync(winrt::Windows::Graphics::Capture::GraphicsCaptureAccessKind const& request) const
{
void* operation{};
check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Graphics::Capture::IGraphicsCaptureAccessStatics)->RequestAccessAsync(static_cast<int32_t>(request), &operation));
return winrt::Windows::Foundation::IAsyncOperation<winrt::Windows::Security::Authorization::AppCapabilityAccess::AppCapabilityAccessStatus>{ operation, take_ownership_from_abi };
}
template <typename D> WINRT_IMPL_AUTO(hstring) consume_Windows_Graphics_Capture_IGraphicsCaptureItem<D>::DisplayName() const
{
void* value{};
@@ -113,6 +121,18 @@ namespace winrt::impl
check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Graphics::Capture::IGraphicsCaptureItemStatics)->CreateFromVisual(*(void**)(&visual), &result));
return winrt::Windows::Graphics::Capture::GraphicsCaptureItem{ result, take_ownership_from_abi };
}
template <typename D> WINRT_IMPL_AUTO(winrt::Windows::Graphics::Capture::GraphicsCaptureItem) consume_Windows_Graphics_Capture_IGraphicsCaptureItemStatics2<D>::TryCreateFromWindowId(winrt::Windows::UI::WindowId const& windowId) const
{
void* result{};
check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Graphics::Capture::IGraphicsCaptureItemStatics2)->TryCreateFromWindowId(impl::bind_in(windowId), &result));
return winrt::Windows::Graphics::Capture::GraphicsCaptureItem{ result, take_ownership_from_abi };
}
template <typename D> WINRT_IMPL_AUTO(winrt::Windows::Graphics::Capture::GraphicsCaptureItem) consume_Windows_Graphics_Capture_IGraphicsCaptureItemStatics2<D>::TryCreateFromDisplayId(winrt::Windows::Graphics::DisplayId const& displayId) const
{
void* result{};
check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Graphics::Capture::IGraphicsCaptureItemStatics2)->TryCreateFromDisplayId(impl::bind_in(displayId), &result));
return winrt::Windows::Graphics::Capture::GraphicsCaptureItem{ result, take_ownership_from_abi };
}
template <typename D> WINRT_IMPL_AUTO(winrt::Windows::Foundation::IAsyncOperation<winrt::Windows::Graphics::Capture::GraphicsCaptureItem>) consume_Windows_Graphics_Capture_IGraphicsCapturePicker<D>::PickSingleItemAsync() const
{
void* operation{};
@@ -133,6 +153,16 @@ namespace winrt::impl
{
check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Graphics::Capture::IGraphicsCaptureSession2)->put_IsCursorCaptureEnabled(value));
}
template <typename D> WINRT_IMPL_AUTO(bool) consume_Windows_Graphics_Capture_IGraphicsCaptureSession3<D>::IsBorderRequired() const
{
bool value{};
check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Graphics::Capture::IGraphicsCaptureSession3)->get_IsBorderRequired(&value));
return value;
}
template <typename D> WINRT_IMPL_AUTO(void) consume_Windows_Graphics_Capture_IGraphicsCaptureSession3<D>::IsBorderRequired(bool value) const
{
check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Graphics::Capture::IGraphicsCaptureSession3)->put_IsBorderRequired(value));
}
template <typename D> WINRT_IMPL_AUTO(bool) consume_Windows_Graphics_Capture_IGraphicsCaptureSessionStatics<D>::IsSupported() const
{
bool result{};
@@ -248,6 +278,20 @@ namespace winrt::impl
catch (...) { return to_hresult(); }
};
#endif
#ifndef WINRT_LEAN_AND_MEAN
template <typename D>
struct produce<D, winrt::Windows::Graphics::Capture::IGraphicsCaptureAccessStatics> : produce_base<D, winrt::Windows::Graphics::Capture::IGraphicsCaptureAccessStatics>
{
int32_t __stdcall RequestAccessAsync(int32_t request, void** operation) noexcept final try
{
clear_abi(operation);
typename D::abi_guard guard(this->shim());
*operation = detach_from<winrt::Windows::Foundation::IAsyncOperation<winrt::Windows::Security::Authorization::AppCapabilityAccess::AppCapabilityAccessStatus>>(this->shim().RequestAccessAsync(*reinterpret_cast<winrt::Windows::Graphics::Capture::GraphicsCaptureAccessKind const*>(&request)));
return 0;
}
catch (...) { return to_hresult(); }
};
#endif
#ifndef WINRT_LEAN_AND_MEAN
template <typename D>
struct produce<D, winrt::Windows::Graphics::Capture::IGraphicsCaptureItem> : produce_base<D, winrt::Windows::Graphics::Capture::IGraphicsCaptureItem>
@@ -298,6 +342,28 @@ namespace winrt::impl
catch (...) { return to_hresult(); }
};
#endif
#ifndef WINRT_LEAN_AND_MEAN
template <typename D>
struct produce<D, winrt::Windows::Graphics::Capture::IGraphicsCaptureItemStatics2> : produce_base<D, winrt::Windows::Graphics::Capture::IGraphicsCaptureItemStatics2>
{
int32_t __stdcall TryCreateFromWindowId(struct struct_Windows_UI_WindowId windowId, void** result) noexcept final try
{
clear_abi(result);
typename D::abi_guard guard(this->shim());
*result = detach_from<winrt::Windows::Graphics::Capture::GraphicsCaptureItem>(this->shim().TryCreateFromWindowId(*reinterpret_cast<winrt::Windows::UI::WindowId const*>(&windowId)));
return 0;
}
catch (...) { return to_hresult(); }
int32_t __stdcall TryCreateFromDisplayId(struct struct_Windows_Graphics_DisplayId displayId, void** result) noexcept final try
{
clear_abi(result);
typename D::abi_guard guard(this->shim());
*result = detach_from<winrt::Windows::Graphics::Capture::GraphicsCaptureItem>(this->shim().TryCreateFromDisplayId(*reinterpret_cast<winrt::Windows::Graphics::DisplayId const*>(&displayId)));
return 0;
}
catch (...) { return to_hresult(); }
};
#endif
#ifndef WINRT_LEAN_AND_MEAN
template <typename D>
struct produce<D, winrt::Windows::Graphics::Capture::IGraphicsCapturePicker> : produce_base<D, winrt::Windows::Graphics::Capture::IGraphicsCapturePicker>
@@ -345,6 +411,26 @@ namespace winrt::impl
catch (...) { return to_hresult(); }
};
#endif
#ifndef WINRT_LEAN_AND_MEAN
template <typename D>
struct produce<D, winrt::Windows::Graphics::Capture::IGraphicsCaptureSession3> : produce_base<D, winrt::Windows::Graphics::Capture::IGraphicsCaptureSession3>
{
int32_t __stdcall get_IsBorderRequired(bool* value) noexcept final try
{
typename D::abi_guard guard(this->shim());
*value = detach_from<bool>(this->shim().IsBorderRequired());
return 0;
}
catch (...) { return to_hresult(); }
int32_t __stdcall put_IsBorderRequired(bool value) noexcept final try
{
typename D::abi_guard guard(this->shim());
this->shim().IsBorderRequired(value);
return 0;
}
catch (...) { return to_hresult(); }
};
#endif
#ifndef WINRT_LEAN_AND_MEAN
template <typename D>
struct produce<D, winrt::Windows::Graphics::Capture::IGraphicsCaptureSessionStatics> : produce_base<D, winrt::Windows::Graphics::Capture::IGraphicsCaptureSessionStatics>
@@ -369,10 +455,22 @@ WINRT_EXPORT namespace winrt::Windows::Graphics::Capture
{
return impl::call_factory<Direct3D11CaptureFramePool, IDirect3D11CaptureFramePoolStatics2>([&](IDirect3D11CaptureFramePoolStatics2 const& f) { return f.CreateFreeThreaded(device, pixelFormat, numberOfBuffers, size); });
}
inline auto GraphicsCaptureAccess::RequestAccessAsync(winrt::Windows::Graphics::Capture::GraphicsCaptureAccessKind const& request)
{
return impl::call_factory<GraphicsCaptureAccess, IGraphicsCaptureAccessStatics>([&](IGraphicsCaptureAccessStatics const& f) { return f.RequestAccessAsync(request); });
}
inline auto GraphicsCaptureItem::CreateFromVisual(winrt::Windows::UI::Composition::Visual const& visual)
{
return impl::call_factory<GraphicsCaptureItem, IGraphicsCaptureItemStatics>([&](IGraphicsCaptureItemStatics const& f) { return f.CreateFromVisual(visual); });
}
inline auto GraphicsCaptureItem::TryCreateFromWindowId(winrt::Windows::UI::WindowId const& windowId)
{
return impl::call_factory<GraphicsCaptureItem, IGraphicsCaptureItemStatics2>([&](IGraphicsCaptureItemStatics2 const& f) { return f.TryCreateFromWindowId(windowId); });
}
inline auto GraphicsCaptureItem::TryCreateFromDisplayId(winrt::Windows::Graphics::DisplayId const& displayId)
{
return impl::call_factory<GraphicsCaptureItem, IGraphicsCaptureItemStatics2>([&](IGraphicsCaptureItemStatics2 const& f) { return f.TryCreateFromDisplayId(displayId); });
}
inline GraphicsCapturePicker::GraphicsCapturePicker() :
GraphicsCapturePicker(impl::call_factory_cast<GraphicsCapturePicker(*)(winrt::Windows::Foundation::IActivationFactory const&), GraphicsCapturePicker>([](winrt::Windows::Foundation::IActivationFactory const& f) { return f.template ActivateInstance<GraphicsCapturePicker>(); }))
{
@@ -389,14 +487,18 @@ namespace std
template<> struct hash<winrt::Windows::Graphics::Capture::IDirect3D11CaptureFramePool> : winrt::impl::hash_base {};
template<> struct hash<winrt::Windows::Graphics::Capture::IDirect3D11CaptureFramePoolStatics> : winrt::impl::hash_base {};
template<> struct hash<winrt::Windows::Graphics::Capture::IDirect3D11CaptureFramePoolStatics2> : winrt::impl::hash_base {};
template<> struct hash<winrt::Windows::Graphics::Capture::IGraphicsCaptureAccessStatics> : winrt::impl::hash_base {};
template<> struct hash<winrt::Windows::Graphics::Capture::IGraphicsCaptureItem> : winrt::impl::hash_base {};
template<> struct hash<winrt::Windows::Graphics::Capture::IGraphicsCaptureItemStatics> : winrt::impl::hash_base {};
template<> struct hash<winrt::Windows::Graphics::Capture::IGraphicsCaptureItemStatics2> : winrt::impl::hash_base {};
template<> struct hash<winrt::Windows::Graphics::Capture::IGraphicsCapturePicker> : winrt::impl::hash_base {};
template<> struct hash<winrt::Windows::Graphics::Capture::IGraphicsCaptureSession> : winrt::impl::hash_base {};
template<> struct hash<winrt::Windows::Graphics::Capture::IGraphicsCaptureSession2> : winrt::impl::hash_base {};
template<> struct hash<winrt::Windows::Graphics::Capture::IGraphicsCaptureSession3> : winrt::impl::hash_base {};
template<> struct hash<winrt::Windows::Graphics::Capture::IGraphicsCaptureSessionStatics> : winrt::impl::hash_base {};
template<> struct hash<winrt::Windows::Graphics::Capture::Direct3D11CaptureFrame> : winrt::impl::hash_base {};
template<> struct hash<winrt::Windows::Graphics::Capture::Direct3D11CaptureFramePool> : winrt::impl::hash_base {};
template<> struct hash<winrt::Windows::Graphics::Capture::GraphicsCaptureAccess> : winrt::impl::hash_base {};
template<> struct hash<winrt::Windows::Graphics::Capture::GraphicsCaptureItem> : winrt::impl::hash_base {};
template<> struct hash<winrt::Windows::Graphics::Capture::GraphicsCapturePicker> : winrt::impl::hash_base {};
template<> struct hash<winrt::Windows::Graphics::Capture::GraphicsCaptureSession> : winrt::impl::hash_base {};