// C++/WinRT v2.0.250303.1 // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. #pragma once #ifndef WINRT_Windows_UI_Core_H #define WINRT_Windows_UI_Core_H #include "winrt/base.h" static_assert(winrt::check_version(CPPWINRT_VERSION, "2.0.250303.1"), "Mismatched C++/WinRT headers."); #define CPPWINRT_VERSION "2.0.250303.1" #include "winrt/Windows.UI.h" #include "winrt/impl/Windows.Foundation.2.h" #include "winrt/impl/Windows.Foundation.Collections.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.UI.Input.2.h" #include "winrt/impl/Windows.UI.Popups.2.h" #include "winrt/impl/Windows.UI.Core.2.h" namespace winrt::impl { template auto consume_Windows_UI_Core_IAcceleratorKeyEventArgs::EventType() const { winrt::Windows::UI::Core::CoreAcceleratorKeyEventType value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_EventType(reinterpret_cast(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_EventType(reinterpret_cast(&value))); } return value; } template auto consume_Windows_UI_Core_IAcceleratorKeyEventArgs::VirtualKey() const { winrt::Windows::System::VirtualKey value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_VirtualKey(reinterpret_cast(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_VirtualKey(reinterpret_cast(&value))); } return value; } template auto consume_Windows_UI_Core_IAcceleratorKeyEventArgs::KeyStatus() const { winrt::Windows::UI::Core::CorePhysicalKeyStatus value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_KeyStatus(put_abi(value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_KeyStatus(put_abi(value))); } return value; } template auto consume_Windows_UI_Core_IAcceleratorKeyEventArgs2::DeviceId() const { void* value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_DeviceId(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_DeviceId(&value)); } return hstring{ value, take_ownership_from_abi }; } template auto consume_Windows_UI_Core_IAutomationProviderRequestedEventArgs::AutomationProvider() const { void* value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_AutomationProvider(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_AutomationProvider(&value)); } return winrt::Windows::Foundation::IInspectable{ value, take_ownership_from_abi }; } template auto consume_Windows_UI_Core_IAutomationProviderRequestedEventArgs::AutomationProvider(winrt::Windows::Foundation::IInspectable const& value) const { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->put_AutomationProvider(*(void**)(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_AutomationProvider(*(void**)(&value))); } } template auto consume_Windows_UI_Core_IBackRequestedEventArgs::Handled() const { bool value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_Handled(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Handled(&value)); } return value; } template auto consume_Windows_UI_Core_IBackRequestedEventArgs::Handled(bool value) const { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->put_Handled(value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_Handled(value)); } } template auto consume_Windows_UI_Core_ICharacterReceivedEventArgs::KeyCode() const { uint32_t value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_KeyCode(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_KeyCode(&value)); } return value; } template auto consume_Windows_UI_Core_ICharacterReceivedEventArgs::KeyStatus() const { winrt::Windows::UI::Core::CorePhysicalKeyStatus value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_KeyStatus(put_abi(value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_KeyStatus(put_abi(value))); } return value; } template auto consume_Windows_UI_Core_IClosestInteractiveBoundsRequestedEventArgs::PointerPosition() const { winrt::Windows::Foundation::Point value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_PointerPosition(put_abi(value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_PointerPosition(put_abi(value))); } return value; } template auto consume_Windows_UI_Core_IClosestInteractiveBoundsRequestedEventArgs::SearchBounds() const { winrt::Windows::Foundation::Rect value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_SearchBounds(put_abi(value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_SearchBounds(put_abi(value))); } return value; } template auto consume_Windows_UI_Core_IClosestInteractiveBoundsRequestedEventArgs::ClosestInteractiveBounds() const { winrt::Windows::Foundation::Rect value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_ClosestInteractiveBounds(put_abi(value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_ClosestInteractiveBounds(put_abi(value))); } return value; } template auto consume_Windows_UI_Core_IClosestInteractiveBoundsRequestedEventArgs::ClosestInteractiveBounds(winrt::Windows::Foundation::Rect const& value) const { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->put_ClosestInteractiveBounds(impl::bind_in(value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_ClosestInteractiveBounds(impl::bind_in(value))); } } template auto consume_Windows_UI_Core_ICoreAcceleratorKeys::AcceleratorKeyActivated(winrt::Windows::Foundation::TypedEventHandler const& handler) const { winrt::event_token pCookie{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->add_AcceleratorKeyActivated(*(void**)(&handler), put_abi(pCookie))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->add_AcceleratorKeyActivated(*(void**)(&handler), put_abi(pCookie))); } return pCookie; } template auto consume_Windows_UI_Core_ICoreAcceleratorKeys::AcceleratorKeyActivated(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler const& handler) const { return impl::make_event_revoker(this, AcceleratorKeyActivated(handler)); } template auto consume_Windows_UI_Core_ICoreAcceleratorKeys::AcceleratorKeyActivated(winrt::event_token const& cookie) const noexcept { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; _winrt_abi_type->remove_AcceleratorKeyActivated(impl::bind_in(cookie)); } else { auto const _winrt_abi_type = *(abi_t**)this; _winrt_abi_type->remove_AcceleratorKeyActivated(impl::bind_in(cookie)); } } template auto consume_Windows_UI_Core_ICoreClosestInteractiveBoundsRequested::ClosestInteractiveBoundsRequested(winrt::Windows::Foundation::TypedEventHandler const& handler) const { winrt::event_token pCookie{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->add_ClosestInteractiveBoundsRequested(*(void**)(&handler), put_abi(pCookie))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->add_ClosestInteractiveBoundsRequested(*(void**)(&handler), put_abi(pCookie))); } return pCookie; } template auto consume_Windows_UI_Core_ICoreClosestInteractiveBoundsRequested::ClosestInteractiveBoundsRequested(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler const& handler) const { return impl::make_event_revoker(this, ClosestInteractiveBoundsRequested(handler)); } template auto consume_Windows_UI_Core_ICoreClosestInteractiveBoundsRequested::ClosestInteractiveBoundsRequested(winrt::event_token const& cookie) const noexcept { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; _winrt_abi_type->remove_ClosestInteractiveBoundsRequested(impl::bind_in(cookie)); } else { auto const _winrt_abi_type = *(abi_t**)this; _winrt_abi_type->remove_ClosestInteractiveBoundsRequested(impl::bind_in(cookie)); } } template auto consume_Windows_UI_Core_ICoreComponentFocusable::HasFocus() const { bool value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_HasFocus(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_HasFocus(&value)); } return value; } template auto consume_Windows_UI_Core_ICoreComponentFocusable::GotFocus(winrt::Windows::Foundation::TypedEventHandler const& handler) const { winrt::event_token pCookie{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->add_GotFocus(*(void**)(&handler), put_abi(pCookie))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->add_GotFocus(*(void**)(&handler), put_abi(pCookie))); } return pCookie; } template auto consume_Windows_UI_Core_ICoreComponentFocusable::GotFocus(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler const& handler) const { return impl::make_event_revoker(this, GotFocus(handler)); } template auto consume_Windows_UI_Core_ICoreComponentFocusable::GotFocus(winrt::event_token const& cookie) const noexcept { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; _winrt_abi_type->remove_GotFocus(impl::bind_in(cookie)); } else { auto const _winrt_abi_type = *(abi_t**)this; _winrt_abi_type->remove_GotFocus(impl::bind_in(cookie)); } } template auto consume_Windows_UI_Core_ICoreComponentFocusable::LostFocus(winrt::Windows::Foundation::TypedEventHandler const& handler) const { winrt::event_token pCookie{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->add_LostFocus(*(void**)(&handler), put_abi(pCookie))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->add_LostFocus(*(void**)(&handler), put_abi(pCookie))); } return pCookie; } template auto consume_Windows_UI_Core_ICoreComponentFocusable::LostFocus(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler const& handler) const { return impl::make_event_revoker(this, LostFocus(handler)); } template auto consume_Windows_UI_Core_ICoreComponentFocusable::LostFocus(winrt::event_token const& cookie) const noexcept { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; _winrt_abi_type->remove_LostFocus(impl::bind_in(cookie)); } else { auto const _winrt_abi_type = *(abi_t**)this; _winrt_abi_type->remove_LostFocus(impl::bind_in(cookie)); } } template auto consume_Windows_UI_Core_ICoreCursor::Id() const { uint32_t value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_Id(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Id(&value)); } return value; } template auto consume_Windows_UI_Core_ICoreCursor::Type() const { winrt::Windows::UI::Core::CoreCursorType value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_Type(reinterpret_cast(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Type(reinterpret_cast(&value))); } return value; } template auto consume_Windows_UI_Core_ICoreCursorFactory::CreateCursor(winrt::Windows::UI::Core::CoreCursorType const& type, uint32_t id) const { void* cursor{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->CreateCursor(static_cast(type), id, &cursor)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->CreateCursor(static_cast(type), id, &cursor)); } return winrt::Windows::UI::Core::CoreCursor{ cursor, take_ownership_from_abi }; } template auto consume_Windows_UI_Core_ICoreDispatcher::HasThreadAccess() const { bool value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_HasThreadAccess(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_HasThreadAccess(&value)); } return value; } template auto consume_Windows_UI_Core_ICoreDispatcher::ProcessEvents(winrt::Windows::UI::Core::CoreProcessEventsOption const& options) const { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->ProcessEvents(static_cast(options))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->ProcessEvents(static_cast(options))); } } template auto consume_Windows_UI_Core_ICoreDispatcher::RunAsync(winrt::Windows::UI::Core::CoreDispatcherPriority const& priority, winrt::Windows::UI::Core::DispatchedHandler const& agileCallback) const { void* asyncAction{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->RunAsync(static_cast(priority), *(void**)(&agileCallback), &asyncAction)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->RunAsync(static_cast(priority), *(void**)(&agileCallback), &asyncAction)); } return winrt::Windows::Foundation::IAsyncAction{ asyncAction, take_ownership_from_abi }; } template auto consume_Windows_UI_Core_ICoreDispatcher::RunIdleAsync(winrt::Windows::UI::Core::IdleDispatchedHandler const& agileCallback) const { void* asyncAction{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->RunIdleAsync(*(void**)(&agileCallback), &asyncAction)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->RunIdleAsync(*(void**)(&agileCallback), &asyncAction)); } return winrt::Windows::Foundation::IAsyncAction{ asyncAction, take_ownership_from_abi }; } template auto consume_Windows_UI_Core_ICoreDispatcher2::TryRunAsync(winrt::Windows::UI::Core::CoreDispatcherPriority const& priority, winrt::Windows::UI::Core::DispatchedHandler const& agileCallback) const { void* asyncOperation{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->TryRunAsync(static_cast(priority), *(void**)(&agileCallback), &asyncOperation)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->TryRunAsync(static_cast(priority), *(void**)(&agileCallback), &asyncOperation)); } return winrt::Windows::Foundation::IAsyncOperation{ asyncOperation, take_ownership_from_abi }; } template auto consume_Windows_UI_Core_ICoreDispatcher2::TryRunIdleAsync(winrt::Windows::UI::Core::IdleDispatchedHandler const& agileCallback) const { void* asyncOperation{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->TryRunIdleAsync(*(void**)(&agileCallback), &asyncOperation)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->TryRunIdleAsync(*(void**)(&agileCallback), &asyncOperation)); } return winrt::Windows::Foundation::IAsyncOperation{ asyncOperation, take_ownership_from_abi }; } template auto consume_Windows_UI_Core_ICoreDispatcherWithTaskPriority::CurrentPriority() const { winrt::Windows::UI::Core::CoreDispatcherPriority value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_CurrentPriority(reinterpret_cast(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_CurrentPriority(reinterpret_cast(&value))); } return value; } template auto consume_Windows_UI_Core_ICoreDispatcherWithTaskPriority::CurrentPriority(winrt::Windows::UI::Core::CoreDispatcherPriority const& value) const { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->put_CurrentPriority(static_cast(value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_CurrentPriority(static_cast(value))); } } template auto consume_Windows_UI_Core_ICoreDispatcherWithTaskPriority::ShouldYield() const { bool value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->ShouldYield(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->ShouldYield(&value)); } return value; } template auto consume_Windows_UI_Core_ICoreDispatcherWithTaskPriority::ShouldYield(winrt::Windows::UI::Core::CoreDispatcherPriority const& priority) const { bool value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->ShouldYieldToPriority(static_cast(priority), &value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->ShouldYieldToPriority(static_cast(priority), &value)); } return value; } template auto consume_Windows_UI_Core_ICoreDispatcherWithTaskPriority::StopProcessEvents() const { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->StopProcessEvents()); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->StopProcessEvents()); } } template auto consume_Windows_UI_Core_ICoreIndependentInputSourceController::IsTransparentForUncontrolledInput() const { bool value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_IsTransparentForUncontrolledInput(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_IsTransparentForUncontrolledInput(&value)); } return value; } template auto consume_Windows_UI_Core_ICoreIndependentInputSourceController::IsTransparentForUncontrolledInput(bool value) const { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->put_IsTransparentForUncontrolledInput(value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_IsTransparentForUncontrolledInput(value)); } } template auto consume_Windows_UI_Core_ICoreIndependentInputSourceController::IsPalmRejectionEnabled() const { bool value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_IsPalmRejectionEnabled(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_IsPalmRejectionEnabled(&value)); } return value; } template auto consume_Windows_UI_Core_ICoreIndependentInputSourceController::IsPalmRejectionEnabled(bool value) const { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->put_IsPalmRejectionEnabled(value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_IsPalmRejectionEnabled(value)); } } template auto consume_Windows_UI_Core_ICoreIndependentInputSourceController::Source() const { void* value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_Source(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Source(&value)); } return winrt::Windows::UI::Core::CoreIndependentInputSource{ value, take_ownership_from_abi }; } template auto consume_Windows_UI_Core_ICoreIndependentInputSourceController::SetControlledInput(winrt::Windows::UI::Core::CoreInputDeviceTypes const& inputTypes) const { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->SetControlledInput(static_cast(inputTypes))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->SetControlledInput(static_cast(inputTypes))); } } template auto consume_Windows_UI_Core_ICoreIndependentInputSourceController::SetControlledInput(winrt::Windows::UI::Core::CoreInputDeviceTypes const& inputTypes, winrt::Windows::UI::Core::CoreIndependentInputFilters const& required, winrt::Windows::UI::Core::CoreIndependentInputFilters const& excluded) const { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->SetControlledInputWithFilters(static_cast(inputTypes), static_cast(required), static_cast(excluded))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->SetControlledInputWithFilters(static_cast(inputTypes), static_cast(required), static_cast(excluded))); } } template auto consume_Windows_UI_Core_ICoreIndependentInputSourceControllerStatics::CreateForVisual(winrt::Windows::UI::Composition::Visual const& visual) const { void* result{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->CreateForVisual(*(void**)(&visual), &result)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->CreateForVisual(*(void**)(&visual), &result)); } return winrt::Windows::UI::Core::CoreIndependentInputSourceController{ result, take_ownership_from_abi }; } template auto consume_Windows_UI_Core_ICoreIndependentInputSourceControllerStatics::CreateForIVisualElement(winrt::Windows::UI::Composition::IVisualElement const& visualElement) const { void* result{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->CreateForIVisualElement(*(void**)(&visualElement), &result)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->CreateForIVisualElement(*(void**)(&visualElement), &result)); } return winrt::Windows::UI::Core::CoreIndependentInputSourceController{ result, take_ownership_from_abi }; } template auto consume_Windows_UI_Core_ICoreInputSourceBase::Dispatcher() const { void* value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_Dispatcher(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Dispatcher(&value)); } return winrt::Windows::UI::Core::CoreDispatcher{ value, take_ownership_from_abi }; } template auto consume_Windows_UI_Core_ICoreInputSourceBase::IsInputEnabled() const { bool value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_IsInputEnabled(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_IsInputEnabled(&value)); } return value; } template auto consume_Windows_UI_Core_ICoreInputSourceBase::IsInputEnabled(bool value) const { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->put_IsInputEnabled(value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_IsInputEnabled(value)); } } template auto consume_Windows_UI_Core_ICoreInputSourceBase::InputEnabled(winrt::Windows::Foundation::TypedEventHandler const& handler) const { winrt::event_token pCookie{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->add_InputEnabled(*(void**)(&handler), put_abi(pCookie))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->add_InputEnabled(*(void**)(&handler), put_abi(pCookie))); } return pCookie; } template auto consume_Windows_UI_Core_ICoreInputSourceBase::InputEnabled(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler const& handler) const { return impl::make_event_revoker(this, InputEnabled(handler)); } template auto consume_Windows_UI_Core_ICoreInputSourceBase::InputEnabled(winrt::event_token const& cookie) const noexcept { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; _winrt_abi_type->remove_InputEnabled(impl::bind_in(cookie)); } else { auto const _winrt_abi_type = *(abi_t**)this; _winrt_abi_type->remove_InputEnabled(impl::bind_in(cookie)); } } template auto consume_Windows_UI_Core_ICoreKeyboardInputSource::GetCurrentKeyState(winrt::Windows::System::VirtualKey const& virtualKey) const { winrt::Windows::UI::Core::CoreVirtualKeyStates KeyState{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->GetCurrentKeyState(static_cast(virtualKey), reinterpret_cast(&KeyState))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->GetCurrentKeyState(static_cast(virtualKey), reinterpret_cast(&KeyState))); } return KeyState; } template auto consume_Windows_UI_Core_ICoreKeyboardInputSource::CharacterReceived(winrt::Windows::Foundation::TypedEventHandler const& handler) const { winrt::event_token pCookie{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->add_CharacterReceived(*(void**)(&handler), put_abi(pCookie))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->add_CharacterReceived(*(void**)(&handler), put_abi(pCookie))); } return pCookie; } template auto consume_Windows_UI_Core_ICoreKeyboardInputSource::CharacterReceived(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler const& handler) const { return impl::make_event_revoker(this, CharacterReceived(handler)); } template auto consume_Windows_UI_Core_ICoreKeyboardInputSource::CharacterReceived(winrt::event_token const& cookie) const noexcept { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; _winrt_abi_type->remove_CharacterReceived(impl::bind_in(cookie)); } else { auto const _winrt_abi_type = *(abi_t**)this; _winrt_abi_type->remove_CharacterReceived(impl::bind_in(cookie)); } } template auto consume_Windows_UI_Core_ICoreKeyboardInputSource::KeyDown(winrt::Windows::Foundation::TypedEventHandler const& handler) const { winrt::event_token pCookie{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->add_KeyDown(*(void**)(&handler), put_abi(pCookie))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->add_KeyDown(*(void**)(&handler), put_abi(pCookie))); } return pCookie; } template auto consume_Windows_UI_Core_ICoreKeyboardInputSource::KeyDown(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler const& handler) const { return impl::make_event_revoker(this, KeyDown(handler)); } template auto consume_Windows_UI_Core_ICoreKeyboardInputSource::KeyDown(winrt::event_token const& cookie) const noexcept { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; _winrt_abi_type->remove_KeyDown(impl::bind_in(cookie)); } else { auto const _winrt_abi_type = *(abi_t**)this; _winrt_abi_type->remove_KeyDown(impl::bind_in(cookie)); } } template auto consume_Windows_UI_Core_ICoreKeyboardInputSource::KeyUp(winrt::Windows::Foundation::TypedEventHandler const& handler) const { winrt::event_token pCookie{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->add_KeyUp(*(void**)(&handler), put_abi(pCookie))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->add_KeyUp(*(void**)(&handler), put_abi(pCookie))); } return pCookie; } template auto consume_Windows_UI_Core_ICoreKeyboardInputSource::KeyUp(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler const& handler) const { return impl::make_event_revoker(this, KeyUp(handler)); } template auto consume_Windows_UI_Core_ICoreKeyboardInputSource::KeyUp(winrt::event_token const& cookie) const noexcept { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; _winrt_abi_type->remove_KeyUp(impl::bind_in(cookie)); } else { auto const _winrt_abi_type = *(abi_t**)this; _winrt_abi_type->remove_KeyUp(impl::bind_in(cookie)); } } template auto consume_Windows_UI_Core_ICoreKeyboardInputSource2::GetCurrentKeyEventDeviceId() const { void* value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->GetCurrentKeyEventDeviceId(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->GetCurrentKeyEventDeviceId(&value)); } return hstring{ value, take_ownership_from_abi }; } template auto consume_Windows_UI_Core_ICorePointerInputSource::ReleasePointerCapture() const { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->ReleasePointerCapture()); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->ReleasePointerCapture()); } } template auto consume_Windows_UI_Core_ICorePointerInputSource::SetPointerCapture() const { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->SetPointerCapture()); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->SetPointerCapture()); } } template auto consume_Windows_UI_Core_ICorePointerInputSource::HasCapture() const { bool value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_HasCapture(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_HasCapture(&value)); } return value; } template auto consume_Windows_UI_Core_ICorePointerInputSource::PointerPosition() const { winrt::Windows::Foundation::Point value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_PointerPosition(put_abi(value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_PointerPosition(put_abi(value))); } return value; } template auto consume_Windows_UI_Core_ICorePointerInputSource::PointerCursor() const { void* value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_PointerCursor(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_PointerCursor(&value)); } return winrt::Windows::UI::Core::CoreCursor{ value, take_ownership_from_abi }; } template auto consume_Windows_UI_Core_ICorePointerInputSource::PointerCursor(winrt::Windows::UI::Core::CoreCursor const& value) const { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->put_PointerCursor(*(void**)(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_PointerCursor(*(void**)(&value))); } } template auto consume_Windows_UI_Core_ICorePointerInputSource::PointerCaptureLost(winrt::Windows::Foundation::TypedEventHandler const& handler) const { winrt::event_token cookie{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->add_PointerCaptureLost(*(void**)(&handler), put_abi(cookie))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->add_PointerCaptureLost(*(void**)(&handler), put_abi(cookie))); } return cookie; } template auto consume_Windows_UI_Core_ICorePointerInputSource::PointerCaptureLost(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler const& handler) const { return impl::make_event_revoker(this, PointerCaptureLost(handler)); } template auto consume_Windows_UI_Core_ICorePointerInputSource::PointerCaptureLost(winrt::event_token const& cookie) const noexcept { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; _winrt_abi_type->remove_PointerCaptureLost(impl::bind_in(cookie)); } else { auto const _winrt_abi_type = *(abi_t**)this; _winrt_abi_type->remove_PointerCaptureLost(impl::bind_in(cookie)); } } template auto consume_Windows_UI_Core_ICorePointerInputSource::PointerEntered(winrt::Windows::Foundation::TypedEventHandler const& handler) const { winrt::event_token cookie{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->add_PointerEntered(*(void**)(&handler), put_abi(cookie))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->add_PointerEntered(*(void**)(&handler), put_abi(cookie))); } return cookie; } template auto consume_Windows_UI_Core_ICorePointerInputSource::PointerEntered(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler const& handler) const { return impl::make_event_revoker(this, PointerEntered(handler)); } template auto consume_Windows_UI_Core_ICorePointerInputSource::PointerEntered(winrt::event_token const& cookie) const noexcept { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; _winrt_abi_type->remove_PointerEntered(impl::bind_in(cookie)); } else { auto const _winrt_abi_type = *(abi_t**)this; _winrt_abi_type->remove_PointerEntered(impl::bind_in(cookie)); } } template auto consume_Windows_UI_Core_ICorePointerInputSource::PointerExited(winrt::Windows::Foundation::TypedEventHandler const& handler) const { winrt::event_token cookie{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->add_PointerExited(*(void**)(&handler), put_abi(cookie))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->add_PointerExited(*(void**)(&handler), put_abi(cookie))); } return cookie; } template auto consume_Windows_UI_Core_ICorePointerInputSource::PointerExited(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler const& handler) const { return impl::make_event_revoker(this, PointerExited(handler)); } template auto consume_Windows_UI_Core_ICorePointerInputSource::PointerExited(winrt::event_token const& cookie) const noexcept { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; _winrt_abi_type->remove_PointerExited(impl::bind_in(cookie)); } else { auto const _winrt_abi_type = *(abi_t**)this; _winrt_abi_type->remove_PointerExited(impl::bind_in(cookie)); } } template auto consume_Windows_UI_Core_ICorePointerInputSource::PointerMoved(winrt::Windows::Foundation::TypedEventHandler const& handler) const { winrt::event_token cookie{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->add_PointerMoved(*(void**)(&handler), put_abi(cookie))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->add_PointerMoved(*(void**)(&handler), put_abi(cookie))); } return cookie; } template auto consume_Windows_UI_Core_ICorePointerInputSource::PointerMoved(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler const& handler) const { return impl::make_event_revoker(this, PointerMoved(handler)); } template auto consume_Windows_UI_Core_ICorePointerInputSource::PointerMoved(winrt::event_token const& cookie) const noexcept { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; _winrt_abi_type->remove_PointerMoved(impl::bind_in(cookie)); } else { auto const _winrt_abi_type = *(abi_t**)this; _winrt_abi_type->remove_PointerMoved(impl::bind_in(cookie)); } } template auto consume_Windows_UI_Core_ICorePointerInputSource::PointerPressed(winrt::Windows::Foundation::TypedEventHandler const& handler) const { winrt::event_token cookie{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->add_PointerPressed(*(void**)(&handler), put_abi(cookie))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->add_PointerPressed(*(void**)(&handler), put_abi(cookie))); } return cookie; } template auto consume_Windows_UI_Core_ICorePointerInputSource::PointerPressed(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler const& handler) const { return impl::make_event_revoker(this, PointerPressed(handler)); } template auto consume_Windows_UI_Core_ICorePointerInputSource::PointerPressed(winrt::event_token const& cookie) const noexcept { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; _winrt_abi_type->remove_PointerPressed(impl::bind_in(cookie)); } else { auto const _winrt_abi_type = *(abi_t**)this; _winrt_abi_type->remove_PointerPressed(impl::bind_in(cookie)); } } template auto consume_Windows_UI_Core_ICorePointerInputSource::PointerReleased(winrt::Windows::Foundation::TypedEventHandler const& handler) const { winrt::event_token cookie{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->add_PointerReleased(*(void**)(&handler), put_abi(cookie))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->add_PointerReleased(*(void**)(&handler), put_abi(cookie))); } return cookie; } template auto consume_Windows_UI_Core_ICorePointerInputSource::PointerReleased(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler const& handler) const { return impl::make_event_revoker(this, PointerReleased(handler)); } template auto consume_Windows_UI_Core_ICorePointerInputSource::PointerReleased(winrt::event_token const& cookie) const noexcept { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; _winrt_abi_type->remove_PointerReleased(impl::bind_in(cookie)); } else { auto const _winrt_abi_type = *(abi_t**)this; _winrt_abi_type->remove_PointerReleased(impl::bind_in(cookie)); } } template auto consume_Windows_UI_Core_ICorePointerInputSource::PointerWheelChanged(winrt::Windows::Foundation::TypedEventHandler const& handler) const { winrt::event_token cookie{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->add_PointerWheelChanged(*(void**)(&handler), put_abi(cookie))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->add_PointerWheelChanged(*(void**)(&handler), put_abi(cookie))); } return cookie; } template auto consume_Windows_UI_Core_ICorePointerInputSource::PointerWheelChanged(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler const& handler) const { return impl::make_event_revoker(this, PointerWheelChanged(handler)); } template auto consume_Windows_UI_Core_ICorePointerInputSource::PointerWheelChanged(winrt::event_token const& cookie) const noexcept { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; _winrt_abi_type->remove_PointerWheelChanged(impl::bind_in(cookie)); } else { auto const _winrt_abi_type = *(abi_t**)this; _winrt_abi_type->remove_PointerWheelChanged(impl::bind_in(cookie)); } } template auto consume_Windows_UI_Core_ICorePointerInputSource2::DispatcherQueue() const { void* value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_DispatcherQueue(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_DispatcherQueue(&value)); } return winrt::Windows::System::DispatcherQueue{ value, take_ownership_from_abi }; } template auto consume_Windows_UI_Core_ICorePointerRedirector::PointerRoutedAway(winrt::Windows::Foundation::TypedEventHandler const& handler) const { winrt::event_token cookie{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->add_PointerRoutedAway(*(void**)(&handler), put_abi(cookie))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->add_PointerRoutedAway(*(void**)(&handler), put_abi(cookie))); } return cookie; } template auto consume_Windows_UI_Core_ICorePointerRedirector::PointerRoutedAway(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler const& handler) const { return impl::make_event_revoker(this, PointerRoutedAway(handler)); } template auto consume_Windows_UI_Core_ICorePointerRedirector::PointerRoutedAway(winrt::event_token const& cookie) const noexcept { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; _winrt_abi_type->remove_PointerRoutedAway(impl::bind_in(cookie)); } else { auto const _winrt_abi_type = *(abi_t**)this; _winrt_abi_type->remove_PointerRoutedAway(impl::bind_in(cookie)); } } template auto consume_Windows_UI_Core_ICorePointerRedirector::PointerRoutedTo(winrt::Windows::Foundation::TypedEventHandler const& handler) const { winrt::event_token cookie{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->add_PointerRoutedTo(*(void**)(&handler), put_abi(cookie))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->add_PointerRoutedTo(*(void**)(&handler), put_abi(cookie))); } return cookie; } template auto consume_Windows_UI_Core_ICorePointerRedirector::PointerRoutedTo(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler const& handler) const { return impl::make_event_revoker(this, PointerRoutedTo(handler)); } template auto consume_Windows_UI_Core_ICorePointerRedirector::PointerRoutedTo(winrt::event_token const& cookie) const noexcept { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; _winrt_abi_type->remove_PointerRoutedTo(impl::bind_in(cookie)); } else { auto const _winrt_abi_type = *(abi_t**)this; _winrt_abi_type->remove_PointerRoutedTo(impl::bind_in(cookie)); } } template auto consume_Windows_UI_Core_ICorePointerRedirector::PointerRoutedReleased(winrt::Windows::Foundation::TypedEventHandler const& handler) const { winrt::event_token cookie{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->add_PointerRoutedReleased(*(void**)(&handler), put_abi(cookie))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->add_PointerRoutedReleased(*(void**)(&handler), put_abi(cookie))); } return cookie; } template auto consume_Windows_UI_Core_ICorePointerRedirector::PointerRoutedReleased(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler const& handler) const { return impl::make_event_revoker(this, PointerRoutedReleased(handler)); } template auto consume_Windows_UI_Core_ICorePointerRedirector::PointerRoutedReleased(winrt::event_token const& cookie) const noexcept { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; _winrt_abi_type->remove_PointerRoutedReleased(impl::bind_in(cookie)); } else { auto const _winrt_abi_type = *(abi_t**)this; _winrt_abi_type->remove_PointerRoutedReleased(impl::bind_in(cookie)); } } template auto consume_Windows_UI_Core_ICoreTouchHitTesting::TouchHitTesting(winrt::Windows::Foundation::TypedEventHandler const& handler) const { winrt::event_token pCookie{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->add_TouchHitTesting(*(void**)(&handler), put_abi(pCookie))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->add_TouchHitTesting(*(void**)(&handler), put_abi(pCookie))); } return pCookie; } template auto consume_Windows_UI_Core_ICoreTouchHitTesting::TouchHitTesting(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler const& handler) const { return impl::make_event_revoker(this, TouchHitTesting(handler)); } template auto consume_Windows_UI_Core_ICoreTouchHitTesting::TouchHitTesting(winrt::event_token const& cookie) const noexcept { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; _winrt_abi_type->remove_TouchHitTesting(impl::bind_in(cookie)); } else { auto const _winrt_abi_type = *(abi_t**)this; _winrt_abi_type->remove_TouchHitTesting(impl::bind_in(cookie)); } } template auto consume_Windows_UI_Core_ICoreWindow::AutomationHostProvider() const { void* value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_AutomationHostProvider(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_AutomationHostProvider(&value)); } return winrt::Windows::Foundation::IInspectable{ value, take_ownership_from_abi }; } template auto consume_Windows_UI_Core_ICoreWindow::Bounds() const { winrt::Windows::Foundation::Rect value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_Bounds(put_abi(value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Bounds(put_abi(value))); } return value; } template auto consume_Windows_UI_Core_ICoreWindow::CustomProperties() const { void* value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_CustomProperties(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_CustomProperties(&value)); } return winrt::Windows::Foundation::Collections::IPropertySet{ value, take_ownership_from_abi }; } template auto consume_Windows_UI_Core_ICoreWindow::Dispatcher() const { void* value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_Dispatcher(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Dispatcher(&value)); } return winrt::Windows::UI::Core::CoreDispatcher{ value, take_ownership_from_abi }; } template auto consume_Windows_UI_Core_ICoreWindow::FlowDirection() const { winrt::Windows::UI::Core::CoreWindowFlowDirection value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_FlowDirection(reinterpret_cast(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_FlowDirection(reinterpret_cast(&value))); } return value; } template auto consume_Windows_UI_Core_ICoreWindow::FlowDirection(winrt::Windows::UI::Core::CoreWindowFlowDirection const& value) const { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->put_FlowDirection(static_cast(value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_FlowDirection(static_cast(value))); } } template auto consume_Windows_UI_Core_ICoreWindow::IsInputEnabled() const { bool value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_IsInputEnabled(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_IsInputEnabled(&value)); } return value; } template auto consume_Windows_UI_Core_ICoreWindow::IsInputEnabled(bool value) const { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->put_IsInputEnabled(value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_IsInputEnabled(value)); } } template auto consume_Windows_UI_Core_ICoreWindow::PointerCursor() const { void* value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_PointerCursor(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_PointerCursor(&value)); } return winrt::Windows::UI::Core::CoreCursor{ value, take_ownership_from_abi }; } template auto consume_Windows_UI_Core_ICoreWindow::PointerCursor(winrt::Windows::UI::Core::CoreCursor const& value) const { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->put_PointerCursor(*(void**)(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_PointerCursor(*(void**)(&value))); } } template auto consume_Windows_UI_Core_ICoreWindow::PointerPosition() const { winrt::Windows::Foundation::Point value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_PointerPosition(put_abi(value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_PointerPosition(put_abi(value))); } return value; } template auto consume_Windows_UI_Core_ICoreWindow::Visible() const { bool value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_Visible(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Visible(&value)); } return value; } template auto consume_Windows_UI_Core_ICoreWindow::Activate() const { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->Activate()); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->Activate()); } } template auto consume_Windows_UI_Core_ICoreWindow::Close() const { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->Close()); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->Close()); } } template auto consume_Windows_UI_Core_ICoreWindow::GetAsyncKeyState(winrt::Windows::System::VirtualKey const& virtualKey) const { winrt::Windows::UI::Core::CoreVirtualKeyStates KeyState{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->GetAsyncKeyState(static_cast(virtualKey), reinterpret_cast(&KeyState))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->GetAsyncKeyState(static_cast(virtualKey), reinterpret_cast(&KeyState))); } return KeyState; } template auto consume_Windows_UI_Core_ICoreWindow::GetKeyState(winrt::Windows::System::VirtualKey const& virtualKey) const { winrt::Windows::UI::Core::CoreVirtualKeyStates KeyState{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->GetKeyState(static_cast(virtualKey), reinterpret_cast(&KeyState))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->GetKeyState(static_cast(virtualKey), reinterpret_cast(&KeyState))); } return KeyState; } template auto consume_Windows_UI_Core_ICoreWindow::ReleasePointerCapture() const { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->ReleasePointerCapture()); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->ReleasePointerCapture()); } } template auto consume_Windows_UI_Core_ICoreWindow::SetPointerCapture() const { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->SetPointerCapture()); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->SetPointerCapture()); } } template auto consume_Windows_UI_Core_ICoreWindow::Activated(winrt::Windows::Foundation::TypedEventHandler const& handler) const { winrt::event_token pCookie{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->add_Activated(*(void**)(&handler), put_abi(pCookie))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->add_Activated(*(void**)(&handler), put_abi(pCookie))); } return pCookie; } template auto consume_Windows_UI_Core_ICoreWindow::Activated(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler const& handler) const { return impl::make_event_revoker(this, Activated(handler)); } template auto consume_Windows_UI_Core_ICoreWindow::Activated(winrt::event_token const& cookie) const noexcept { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; _winrt_abi_type->remove_Activated(impl::bind_in(cookie)); } else { auto const _winrt_abi_type = *(abi_t**)this; _winrt_abi_type->remove_Activated(impl::bind_in(cookie)); } } template auto consume_Windows_UI_Core_ICoreWindow::AutomationProviderRequested(winrt::Windows::Foundation::TypedEventHandler const& handler) const { winrt::event_token cookie{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->add_AutomationProviderRequested(*(void**)(&handler), put_abi(cookie))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->add_AutomationProviderRequested(*(void**)(&handler), put_abi(cookie))); } return cookie; } template auto consume_Windows_UI_Core_ICoreWindow::AutomationProviderRequested(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler const& handler) const { return impl::make_event_revoker(this, AutomationProviderRequested(handler)); } template auto consume_Windows_UI_Core_ICoreWindow::AutomationProviderRequested(winrt::event_token const& cookie) const noexcept { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; _winrt_abi_type->remove_AutomationProviderRequested(impl::bind_in(cookie)); } else { auto const _winrt_abi_type = *(abi_t**)this; _winrt_abi_type->remove_AutomationProviderRequested(impl::bind_in(cookie)); } } template auto consume_Windows_UI_Core_ICoreWindow::CharacterReceived(winrt::Windows::Foundation::TypedEventHandler const& handler) const { winrt::event_token pCookie{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->add_CharacterReceived(*(void**)(&handler), put_abi(pCookie))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->add_CharacterReceived(*(void**)(&handler), put_abi(pCookie))); } return pCookie; } template auto consume_Windows_UI_Core_ICoreWindow::CharacterReceived(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler const& handler) const { return impl::make_event_revoker(this, CharacterReceived(handler)); } template auto consume_Windows_UI_Core_ICoreWindow::CharacterReceived(winrt::event_token const& cookie) const noexcept { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; _winrt_abi_type->remove_CharacterReceived(impl::bind_in(cookie)); } else { auto const _winrt_abi_type = *(abi_t**)this; _winrt_abi_type->remove_CharacterReceived(impl::bind_in(cookie)); } } template auto consume_Windows_UI_Core_ICoreWindow::Closed(winrt::Windows::Foundation::TypedEventHandler const& handler) const { winrt::event_token pCookie{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->add_Closed(*(void**)(&handler), put_abi(pCookie))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->add_Closed(*(void**)(&handler), put_abi(pCookie))); } return pCookie; } template auto consume_Windows_UI_Core_ICoreWindow::Closed(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler const& handler) const { return impl::make_event_revoker(this, Closed(handler)); } template auto consume_Windows_UI_Core_ICoreWindow::Closed(winrt::event_token const& cookie) const noexcept { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; _winrt_abi_type->remove_Closed(impl::bind_in(cookie)); } else { auto const _winrt_abi_type = *(abi_t**)this; _winrt_abi_type->remove_Closed(impl::bind_in(cookie)); } } template auto consume_Windows_UI_Core_ICoreWindow::InputEnabled(winrt::Windows::Foundation::TypedEventHandler const& handler) const { winrt::event_token pCookie{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->add_InputEnabled(*(void**)(&handler), put_abi(pCookie))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->add_InputEnabled(*(void**)(&handler), put_abi(pCookie))); } return pCookie; } template auto consume_Windows_UI_Core_ICoreWindow::InputEnabled(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler const& handler) const { return impl::make_event_revoker(this, InputEnabled(handler)); } template auto consume_Windows_UI_Core_ICoreWindow::InputEnabled(winrt::event_token const& cookie) const noexcept { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; _winrt_abi_type->remove_InputEnabled(impl::bind_in(cookie)); } else { auto const _winrt_abi_type = *(abi_t**)this; _winrt_abi_type->remove_InputEnabled(impl::bind_in(cookie)); } } template auto consume_Windows_UI_Core_ICoreWindow::KeyDown(winrt::Windows::Foundation::TypedEventHandler const& handler) const { winrt::event_token pCookie{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->add_KeyDown(*(void**)(&handler), put_abi(pCookie))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->add_KeyDown(*(void**)(&handler), put_abi(pCookie))); } return pCookie; } template auto consume_Windows_UI_Core_ICoreWindow::KeyDown(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler const& handler) const { return impl::make_event_revoker(this, KeyDown(handler)); } template auto consume_Windows_UI_Core_ICoreWindow::KeyDown(winrt::event_token const& cookie) const noexcept { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; _winrt_abi_type->remove_KeyDown(impl::bind_in(cookie)); } else { auto const _winrt_abi_type = *(abi_t**)this; _winrt_abi_type->remove_KeyDown(impl::bind_in(cookie)); } } template auto consume_Windows_UI_Core_ICoreWindow::KeyUp(winrt::Windows::Foundation::TypedEventHandler const& handler) const { winrt::event_token pCookie{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->add_KeyUp(*(void**)(&handler), put_abi(pCookie))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->add_KeyUp(*(void**)(&handler), put_abi(pCookie))); } return pCookie; } template auto consume_Windows_UI_Core_ICoreWindow::KeyUp(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler const& handler) const { return impl::make_event_revoker(this, KeyUp(handler)); } template auto consume_Windows_UI_Core_ICoreWindow::KeyUp(winrt::event_token const& cookie) const noexcept { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; _winrt_abi_type->remove_KeyUp(impl::bind_in(cookie)); } else { auto const _winrt_abi_type = *(abi_t**)this; _winrt_abi_type->remove_KeyUp(impl::bind_in(cookie)); } } template auto consume_Windows_UI_Core_ICoreWindow::PointerCaptureLost(winrt::Windows::Foundation::TypedEventHandler const& handler) const { winrt::event_token cookie{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->add_PointerCaptureLost(*(void**)(&handler), put_abi(cookie))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->add_PointerCaptureLost(*(void**)(&handler), put_abi(cookie))); } return cookie; } template auto consume_Windows_UI_Core_ICoreWindow::PointerCaptureLost(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler const& handler) const { return impl::make_event_revoker(this, PointerCaptureLost(handler)); } template auto consume_Windows_UI_Core_ICoreWindow::PointerCaptureLost(winrt::event_token const& cookie) const noexcept { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; _winrt_abi_type->remove_PointerCaptureLost(impl::bind_in(cookie)); } else { auto const _winrt_abi_type = *(abi_t**)this; _winrt_abi_type->remove_PointerCaptureLost(impl::bind_in(cookie)); } } template auto consume_Windows_UI_Core_ICoreWindow::PointerEntered(winrt::Windows::Foundation::TypedEventHandler const& handler) const { winrt::event_token cookie{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->add_PointerEntered(*(void**)(&handler), put_abi(cookie))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->add_PointerEntered(*(void**)(&handler), put_abi(cookie))); } return cookie; } template auto consume_Windows_UI_Core_ICoreWindow::PointerEntered(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler const& handler) const { return impl::make_event_revoker(this, PointerEntered(handler)); } template auto consume_Windows_UI_Core_ICoreWindow::PointerEntered(winrt::event_token const& cookie) const noexcept { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; _winrt_abi_type->remove_PointerEntered(impl::bind_in(cookie)); } else { auto const _winrt_abi_type = *(abi_t**)this; _winrt_abi_type->remove_PointerEntered(impl::bind_in(cookie)); } } template auto consume_Windows_UI_Core_ICoreWindow::PointerExited(winrt::Windows::Foundation::TypedEventHandler const& handler) const { winrt::event_token cookie{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->add_PointerExited(*(void**)(&handler), put_abi(cookie))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->add_PointerExited(*(void**)(&handler), put_abi(cookie))); } return cookie; } template auto consume_Windows_UI_Core_ICoreWindow::PointerExited(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler const& handler) const { return impl::make_event_revoker(this, PointerExited(handler)); } template auto consume_Windows_UI_Core_ICoreWindow::PointerExited(winrt::event_token const& cookie) const noexcept { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; _winrt_abi_type->remove_PointerExited(impl::bind_in(cookie)); } else { auto const _winrt_abi_type = *(abi_t**)this; _winrt_abi_type->remove_PointerExited(impl::bind_in(cookie)); } } template auto consume_Windows_UI_Core_ICoreWindow::PointerMoved(winrt::Windows::Foundation::TypedEventHandler const& handler) const { winrt::event_token cookie{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->add_PointerMoved(*(void**)(&handler), put_abi(cookie))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->add_PointerMoved(*(void**)(&handler), put_abi(cookie))); } return cookie; } template auto consume_Windows_UI_Core_ICoreWindow::PointerMoved(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler const& handler) const { return impl::make_event_revoker(this, PointerMoved(handler)); } template auto consume_Windows_UI_Core_ICoreWindow::PointerMoved(winrt::event_token const& cookie) const noexcept { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; _winrt_abi_type->remove_PointerMoved(impl::bind_in(cookie)); } else { auto const _winrt_abi_type = *(abi_t**)this; _winrt_abi_type->remove_PointerMoved(impl::bind_in(cookie)); } } template auto consume_Windows_UI_Core_ICoreWindow::PointerPressed(winrt::Windows::Foundation::TypedEventHandler const& handler) const { winrt::event_token cookie{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->add_PointerPressed(*(void**)(&handler), put_abi(cookie))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->add_PointerPressed(*(void**)(&handler), put_abi(cookie))); } return cookie; } template auto consume_Windows_UI_Core_ICoreWindow::PointerPressed(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler const& handler) const { return impl::make_event_revoker(this, PointerPressed(handler)); } template auto consume_Windows_UI_Core_ICoreWindow::PointerPressed(winrt::event_token const& cookie) const noexcept { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; _winrt_abi_type->remove_PointerPressed(impl::bind_in(cookie)); } else { auto const _winrt_abi_type = *(abi_t**)this; _winrt_abi_type->remove_PointerPressed(impl::bind_in(cookie)); } } template auto consume_Windows_UI_Core_ICoreWindow::PointerReleased(winrt::Windows::Foundation::TypedEventHandler const& handler) const { winrt::event_token cookie{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->add_PointerReleased(*(void**)(&handler), put_abi(cookie))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->add_PointerReleased(*(void**)(&handler), put_abi(cookie))); } return cookie; } template auto consume_Windows_UI_Core_ICoreWindow::PointerReleased(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler const& handler) const { return impl::make_event_revoker(this, PointerReleased(handler)); } template auto consume_Windows_UI_Core_ICoreWindow::PointerReleased(winrt::event_token const& cookie) const noexcept { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; _winrt_abi_type->remove_PointerReleased(impl::bind_in(cookie)); } else { auto const _winrt_abi_type = *(abi_t**)this; _winrt_abi_type->remove_PointerReleased(impl::bind_in(cookie)); } } template auto consume_Windows_UI_Core_ICoreWindow::TouchHitTesting(winrt::Windows::Foundation::TypedEventHandler const& handler) const { winrt::event_token pCookie{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->add_TouchHitTesting(*(void**)(&handler), put_abi(pCookie))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->add_TouchHitTesting(*(void**)(&handler), put_abi(pCookie))); } return pCookie; } template auto consume_Windows_UI_Core_ICoreWindow::TouchHitTesting(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler const& handler) const { return impl::make_event_revoker(this, TouchHitTesting(handler)); } template auto consume_Windows_UI_Core_ICoreWindow::TouchHitTesting(winrt::event_token const& cookie) const noexcept { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; _winrt_abi_type->remove_TouchHitTesting(impl::bind_in(cookie)); } else { auto const _winrt_abi_type = *(abi_t**)this; _winrt_abi_type->remove_TouchHitTesting(impl::bind_in(cookie)); } } template auto consume_Windows_UI_Core_ICoreWindow::PointerWheelChanged(winrt::Windows::Foundation::TypedEventHandler const& handler) const { winrt::event_token cookie{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->add_PointerWheelChanged(*(void**)(&handler), put_abi(cookie))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->add_PointerWheelChanged(*(void**)(&handler), put_abi(cookie))); } return cookie; } template auto consume_Windows_UI_Core_ICoreWindow::PointerWheelChanged(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler const& handler) const { return impl::make_event_revoker(this, PointerWheelChanged(handler)); } template auto consume_Windows_UI_Core_ICoreWindow::PointerWheelChanged(winrt::event_token const& cookie) const noexcept { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; _winrt_abi_type->remove_PointerWheelChanged(impl::bind_in(cookie)); } else { auto const _winrt_abi_type = *(abi_t**)this; _winrt_abi_type->remove_PointerWheelChanged(impl::bind_in(cookie)); } } template auto consume_Windows_UI_Core_ICoreWindow::SizeChanged(winrt::Windows::Foundation::TypedEventHandler const& handler) const { winrt::event_token pCookie{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->add_SizeChanged(*(void**)(&handler), put_abi(pCookie))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->add_SizeChanged(*(void**)(&handler), put_abi(pCookie))); } return pCookie; } template auto consume_Windows_UI_Core_ICoreWindow::SizeChanged(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler const& handler) const { return impl::make_event_revoker(this, SizeChanged(handler)); } template auto consume_Windows_UI_Core_ICoreWindow::SizeChanged(winrt::event_token const& cookie) const noexcept { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; _winrt_abi_type->remove_SizeChanged(impl::bind_in(cookie)); } else { auto const _winrt_abi_type = *(abi_t**)this; _winrt_abi_type->remove_SizeChanged(impl::bind_in(cookie)); } } template auto consume_Windows_UI_Core_ICoreWindow::VisibilityChanged(winrt::Windows::Foundation::TypedEventHandler const& handler) const { winrt::event_token pCookie{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->add_VisibilityChanged(*(void**)(&handler), put_abi(pCookie))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->add_VisibilityChanged(*(void**)(&handler), put_abi(pCookie))); } return pCookie; } template auto consume_Windows_UI_Core_ICoreWindow::VisibilityChanged(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler const& handler) const { return impl::make_event_revoker(this, VisibilityChanged(handler)); } template auto consume_Windows_UI_Core_ICoreWindow::VisibilityChanged(winrt::event_token const& cookie) const noexcept { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; _winrt_abi_type->remove_VisibilityChanged(impl::bind_in(cookie)); } else { auto const _winrt_abi_type = *(abi_t**)this; _winrt_abi_type->remove_VisibilityChanged(impl::bind_in(cookie)); } } template auto consume_Windows_UI_Core_ICoreWindow2::PointerPosition(winrt::Windows::Foundation::Point const& value) const { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->put_PointerPosition(impl::bind_in(value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_PointerPosition(impl::bind_in(value))); } } template auto consume_Windows_UI_Core_ICoreWindow3::ClosestInteractiveBoundsRequested(winrt::Windows::Foundation::TypedEventHandler const& handler) const { winrt::event_token pCookie{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->add_ClosestInteractiveBoundsRequested(*(void**)(&handler), put_abi(pCookie))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->add_ClosestInteractiveBoundsRequested(*(void**)(&handler), put_abi(pCookie))); } return pCookie; } template auto consume_Windows_UI_Core_ICoreWindow3::ClosestInteractiveBoundsRequested(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler const& handler) const { return impl::make_event_revoker(this, ClosestInteractiveBoundsRequested(handler)); } template auto consume_Windows_UI_Core_ICoreWindow3::ClosestInteractiveBoundsRequested(winrt::event_token const& cookie) const noexcept { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; _winrt_abi_type->remove_ClosestInteractiveBoundsRequested(impl::bind_in(cookie)); } else { auto const _winrt_abi_type = *(abi_t**)this; _winrt_abi_type->remove_ClosestInteractiveBoundsRequested(impl::bind_in(cookie)); } } template auto consume_Windows_UI_Core_ICoreWindow3::GetCurrentKeyEventDeviceId() const { void* value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->GetCurrentKeyEventDeviceId(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->GetCurrentKeyEventDeviceId(&value)); } return hstring{ value, take_ownership_from_abi }; } template auto consume_Windows_UI_Core_ICoreWindow4::ResizeStarted(winrt::Windows::Foundation::TypedEventHandler const& handler) const { winrt::event_token pCookie{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->add_ResizeStarted(*(void**)(&handler), put_abi(pCookie))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->add_ResizeStarted(*(void**)(&handler), put_abi(pCookie))); } return pCookie; } template auto consume_Windows_UI_Core_ICoreWindow4::ResizeStarted(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler const& handler) const { return impl::make_event_revoker(this, ResizeStarted(handler)); } template auto consume_Windows_UI_Core_ICoreWindow4::ResizeStarted(winrt::event_token const& cookie) const noexcept { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; _winrt_abi_type->remove_ResizeStarted(impl::bind_in(cookie)); } else { auto const _winrt_abi_type = *(abi_t**)this; _winrt_abi_type->remove_ResizeStarted(impl::bind_in(cookie)); } } template auto consume_Windows_UI_Core_ICoreWindow4::ResizeCompleted(winrt::Windows::Foundation::TypedEventHandler const& handler) const { winrt::event_token pCookie{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->add_ResizeCompleted(*(void**)(&handler), put_abi(pCookie))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->add_ResizeCompleted(*(void**)(&handler), put_abi(pCookie))); } return pCookie; } template auto consume_Windows_UI_Core_ICoreWindow4::ResizeCompleted(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler const& handler) const { return impl::make_event_revoker(this, ResizeCompleted(handler)); } template auto consume_Windows_UI_Core_ICoreWindow4::ResizeCompleted(winrt::event_token const& cookie) const noexcept { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; _winrt_abi_type->remove_ResizeCompleted(impl::bind_in(cookie)); } else { auto const _winrt_abi_type = *(abi_t**)this; _winrt_abi_type->remove_ResizeCompleted(impl::bind_in(cookie)); } } template auto consume_Windows_UI_Core_ICoreWindow5::DispatcherQueue() const { void* value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_DispatcherQueue(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_DispatcherQueue(&value)); } return winrt::Windows::System::DispatcherQueue{ value, take_ownership_from_abi }; } template auto consume_Windows_UI_Core_ICoreWindow5::ActivationMode() const { winrt::Windows::UI::Core::CoreWindowActivationMode value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_ActivationMode(reinterpret_cast(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_ActivationMode(reinterpret_cast(&value))); } return value; } template auto consume_Windows_UI_Core_ICoreWindowDialog::Showing(winrt::Windows::Foundation::TypedEventHandler const& handler) const { winrt::event_token cookie{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->add_Showing(*(void**)(&handler), put_abi(cookie))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->add_Showing(*(void**)(&handler), put_abi(cookie))); } return cookie; } template auto consume_Windows_UI_Core_ICoreWindowDialog::Showing(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler const& handler) const { return impl::make_event_revoker(this, Showing(handler)); } template auto consume_Windows_UI_Core_ICoreWindowDialog::Showing(winrt::event_token const& cookie) const noexcept { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; _winrt_abi_type->remove_Showing(impl::bind_in(cookie)); } else { auto const _winrt_abi_type = *(abi_t**)this; _winrt_abi_type->remove_Showing(impl::bind_in(cookie)); } } template auto consume_Windows_UI_Core_ICoreWindowDialog::MaxSize() const { winrt::Windows::Foundation::Size value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_MaxSize(put_abi(value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_MaxSize(put_abi(value))); } return value; } template auto consume_Windows_UI_Core_ICoreWindowDialog::MinSize() const { winrt::Windows::Foundation::Size value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_MinSize(put_abi(value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_MinSize(put_abi(value))); } return value; } template auto consume_Windows_UI_Core_ICoreWindowDialog::Title() const { void* value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_Title(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Title(&value)); } return hstring{ value, take_ownership_from_abi }; } template auto consume_Windows_UI_Core_ICoreWindowDialog::Title(param::hstring const& value) const { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->put_Title(*(void**)(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_Title(*(void**)(&value))); } } template auto consume_Windows_UI_Core_ICoreWindowDialog::IsInteractionDelayed() const { int32_t value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_IsInteractionDelayed(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_IsInteractionDelayed(&value)); } return value; } template auto consume_Windows_UI_Core_ICoreWindowDialog::IsInteractionDelayed(int32_t value) const { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->put_IsInteractionDelayed(value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_IsInteractionDelayed(value)); } } template auto consume_Windows_UI_Core_ICoreWindowDialog::Commands() const { void* value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_Commands(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Commands(&value)); } return winrt::Windows::Foundation::Collections::IVector{ value, take_ownership_from_abi }; } template auto consume_Windows_UI_Core_ICoreWindowDialog::DefaultCommandIndex() const { uint32_t value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_DefaultCommandIndex(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_DefaultCommandIndex(&value)); } return value; } template auto consume_Windows_UI_Core_ICoreWindowDialog::DefaultCommandIndex(uint32_t value) const { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->put_DefaultCommandIndex(value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_DefaultCommandIndex(value)); } } template auto consume_Windows_UI_Core_ICoreWindowDialog::CancelCommandIndex() const { uint32_t value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_CancelCommandIndex(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_CancelCommandIndex(&value)); } return value; } template auto consume_Windows_UI_Core_ICoreWindowDialog::CancelCommandIndex(uint32_t value) const { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->put_CancelCommandIndex(value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_CancelCommandIndex(value)); } } template auto consume_Windows_UI_Core_ICoreWindowDialog::BackButtonCommand() const { void* value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_BackButtonCommand(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_BackButtonCommand(&value)); } return winrt::Windows::UI::Popups::UICommandInvokedHandler{ value, take_ownership_from_abi }; } template auto consume_Windows_UI_Core_ICoreWindowDialog::BackButtonCommand(winrt::Windows::UI::Popups::UICommandInvokedHandler const& value) const { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->put_BackButtonCommand(*(void**)(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_BackButtonCommand(*(void**)(&value))); } } template auto consume_Windows_UI_Core_ICoreWindowDialog::ShowAsync() const { void* asyncInfo{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->ShowAsync(&asyncInfo)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->ShowAsync(&asyncInfo)); } return winrt::Windows::Foundation::IAsyncOperation{ asyncInfo, take_ownership_from_abi }; } template auto consume_Windows_UI_Core_ICoreWindowDialogFactory::CreateWithTitle(param::hstring const& title) const { void* coreWindowDialog{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->CreateWithTitle(*(void**)(&title), &coreWindowDialog)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->CreateWithTitle(*(void**)(&title), &coreWindowDialog)); } return winrt::Windows::UI::Core::CoreWindowDialog{ coreWindowDialog, take_ownership_from_abi }; } template auto consume_Windows_UI_Core_ICoreWindowEventArgs::Handled() const { bool value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_Handled(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Handled(&value)); } return value; } template auto consume_Windows_UI_Core_ICoreWindowEventArgs::Handled(bool value) const { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->put_Handled(value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_Handled(value)); } } template auto consume_Windows_UI_Core_ICoreWindowFlyout::Showing(winrt::Windows::Foundation::TypedEventHandler const& handler) const { winrt::event_token cookie{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->add_Showing(*(void**)(&handler), put_abi(cookie))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->add_Showing(*(void**)(&handler), put_abi(cookie))); } return cookie; } template auto consume_Windows_UI_Core_ICoreWindowFlyout::Showing(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler const& handler) const { return impl::make_event_revoker(this, Showing(handler)); } template auto consume_Windows_UI_Core_ICoreWindowFlyout::Showing(winrt::event_token const& cookie) const noexcept { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; _winrt_abi_type->remove_Showing(impl::bind_in(cookie)); } else { auto const _winrt_abi_type = *(abi_t**)this; _winrt_abi_type->remove_Showing(impl::bind_in(cookie)); } } template auto consume_Windows_UI_Core_ICoreWindowFlyout::MaxSize() const { winrt::Windows::Foundation::Size value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_MaxSize(put_abi(value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_MaxSize(put_abi(value))); } return value; } template auto consume_Windows_UI_Core_ICoreWindowFlyout::MinSize() const { winrt::Windows::Foundation::Size value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_MinSize(put_abi(value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_MinSize(put_abi(value))); } return value; } template auto consume_Windows_UI_Core_ICoreWindowFlyout::Title() const { void* value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_Title(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Title(&value)); } return hstring{ value, take_ownership_from_abi }; } template auto consume_Windows_UI_Core_ICoreWindowFlyout::Title(param::hstring const& value) const { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->put_Title(*(void**)(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_Title(*(void**)(&value))); } } template auto consume_Windows_UI_Core_ICoreWindowFlyout::IsInteractionDelayed() const { int32_t value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_IsInteractionDelayed(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_IsInteractionDelayed(&value)); } return value; } template auto consume_Windows_UI_Core_ICoreWindowFlyout::IsInteractionDelayed(int32_t value) const { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->put_IsInteractionDelayed(value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_IsInteractionDelayed(value)); } } template auto consume_Windows_UI_Core_ICoreWindowFlyout::Commands() const { void* value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_Commands(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Commands(&value)); } return winrt::Windows::Foundation::Collections::IVector{ value, take_ownership_from_abi }; } template auto consume_Windows_UI_Core_ICoreWindowFlyout::DefaultCommandIndex() const { uint32_t value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_DefaultCommandIndex(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_DefaultCommandIndex(&value)); } return value; } template auto consume_Windows_UI_Core_ICoreWindowFlyout::DefaultCommandIndex(uint32_t value) const { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->put_DefaultCommandIndex(value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_DefaultCommandIndex(value)); } } template auto consume_Windows_UI_Core_ICoreWindowFlyout::BackButtonCommand() const { void* value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_BackButtonCommand(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_BackButtonCommand(&value)); } return winrt::Windows::UI::Popups::UICommandInvokedHandler{ value, take_ownership_from_abi }; } template auto consume_Windows_UI_Core_ICoreWindowFlyout::BackButtonCommand(winrt::Windows::UI::Popups::UICommandInvokedHandler const& value) const { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->put_BackButtonCommand(*(void**)(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_BackButtonCommand(*(void**)(&value))); } } template auto consume_Windows_UI_Core_ICoreWindowFlyout::ShowAsync() const { void* asyncInfo{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->ShowAsync(&asyncInfo)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->ShowAsync(&asyncInfo)); } return winrt::Windows::Foundation::IAsyncOperation{ asyncInfo, take_ownership_from_abi }; } template auto consume_Windows_UI_Core_ICoreWindowFlyoutFactory::Create(winrt::Windows::Foundation::Point const& position) const { void* coreWindowFlyout{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->Create(impl::bind_in(position), &coreWindowFlyout)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->Create(impl::bind_in(position), &coreWindowFlyout)); } return winrt::Windows::UI::Core::CoreWindowFlyout{ coreWindowFlyout, take_ownership_from_abi }; } template auto consume_Windows_UI_Core_ICoreWindowFlyoutFactory::CreateWithTitle(winrt::Windows::Foundation::Point const& position, param::hstring const& title) const { void* coreWindowFlyout{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->CreateWithTitle(impl::bind_in(position), *(void**)(&title), &coreWindowFlyout)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->CreateWithTitle(impl::bind_in(position), *(void**)(&title), &coreWindowFlyout)); } return winrt::Windows::UI::Core::CoreWindowFlyout{ coreWindowFlyout, take_ownership_from_abi }; } template auto consume_Windows_UI_Core_ICoreWindowPopupShowingEventArgs::SetDesiredSize(winrt::Windows::Foundation::Size const& value) const { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->SetDesiredSize(impl::bind_in(value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->SetDesiredSize(impl::bind_in(value))); } } template auto consume_Windows_UI_Core_ICoreWindowResizeManager::NotifyLayoutCompleted() const { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->NotifyLayoutCompleted()); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->NotifyLayoutCompleted()); } } template auto consume_Windows_UI_Core_ICoreWindowResizeManagerLayoutCapability::ShouldWaitForLayoutCompletion(bool value) const { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->put_ShouldWaitForLayoutCompletion(value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_ShouldWaitForLayoutCompletion(value)); } } template auto consume_Windows_UI_Core_ICoreWindowResizeManagerLayoutCapability::ShouldWaitForLayoutCompletion() const { bool value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_ShouldWaitForLayoutCompletion(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_ShouldWaitForLayoutCompletion(&value)); } return value; } template auto consume_Windows_UI_Core_ICoreWindowResizeManagerStatics::GetForCurrentView() const { void* CoreWindowResizeManager{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->GetForCurrentView(&CoreWindowResizeManager)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->GetForCurrentView(&CoreWindowResizeManager)); } return winrt::Windows::UI::Core::CoreWindowResizeManager{ CoreWindowResizeManager, take_ownership_from_abi }; } template auto consume_Windows_UI_Core_ICoreWindowStatic::GetForCurrentThread() const { void* ppWindow{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->GetForCurrentThread(&ppWindow)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->GetForCurrentThread(&ppWindow)); } return winrt::Windows::UI::Core::CoreWindow{ ppWindow, take_ownership_from_abi }; } template auto consume_Windows_UI_Core_ICoreWindowWithContext::UIContext() const { void* value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_UIContext(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_UIContext(&value)); } return winrt::Windows::UI::UIContext{ value, take_ownership_from_abi }; } template auto consume_Windows_UI_Core_IIdleDispatchedHandlerArgs::IsDispatcherIdle() const { bool value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_IsDispatcherIdle(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_IsDispatcherIdle(&value)); } return value; } template auto consume_Windows_UI_Core_IInitializeWithCoreWindow::Initialize(winrt::Windows::UI::Core::CoreWindow const& window) const { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->Initialize(*(void**)(&window))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->Initialize(*(void**)(&window))); } } template auto consume_Windows_UI_Core_IInputEnabledEventArgs::InputEnabled() const { bool value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_InputEnabled(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_InputEnabled(&value)); } return value; } template auto consume_Windows_UI_Core_IKeyEventArgs::VirtualKey() const { winrt::Windows::System::VirtualKey value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_VirtualKey(reinterpret_cast(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_VirtualKey(reinterpret_cast(&value))); } return value; } template auto consume_Windows_UI_Core_IKeyEventArgs::KeyStatus() const { winrt::Windows::UI::Core::CorePhysicalKeyStatus value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_KeyStatus(put_abi(value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_KeyStatus(put_abi(value))); } return value; } template auto consume_Windows_UI_Core_IKeyEventArgs2::DeviceId() const { void* value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_DeviceId(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_DeviceId(&value)); } return hstring{ value, take_ownership_from_abi }; } template auto consume_Windows_UI_Core_IPointerEventArgs::CurrentPoint() const { void* value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_CurrentPoint(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_CurrentPoint(&value)); } return winrt::Windows::UI::Input::PointerPoint{ value, take_ownership_from_abi }; } template auto consume_Windows_UI_Core_IPointerEventArgs::KeyModifiers() const { winrt::Windows::System::VirtualKeyModifiers value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_KeyModifiers(reinterpret_cast(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_KeyModifiers(reinterpret_cast(&value))); } return value; } template auto consume_Windows_UI_Core_IPointerEventArgs::GetIntermediatePoints() const { void* value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->GetIntermediatePoints(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->GetIntermediatePoints(&value)); } return winrt::Windows::Foundation::Collections::IVector{ value, take_ownership_from_abi }; } template auto consume_Windows_UI_Core_ISystemNavigationManager::BackRequested(winrt::Windows::Foundation::EventHandler const& handler) const { winrt::event_token token{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->add_BackRequested(*(void**)(&handler), put_abi(token))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->add_BackRequested(*(void**)(&handler), put_abi(token))); } return token; } template auto consume_Windows_UI_Core_ISystemNavigationManager::BackRequested(auto_revoke_t, winrt::Windows::Foundation::EventHandler const& handler) const { return impl::make_event_revoker(this, BackRequested(handler)); } template auto consume_Windows_UI_Core_ISystemNavigationManager::BackRequested(winrt::event_token const& token) const noexcept { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; _winrt_abi_type->remove_BackRequested(impl::bind_in(token)); } else { auto const _winrt_abi_type = *(abi_t**)this; _winrt_abi_type->remove_BackRequested(impl::bind_in(token)); } } template auto consume_Windows_UI_Core_ISystemNavigationManager2::AppViewBackButtonVisibility() const { winrt::Windows::UI::Core::AppViewBackButtonVisibility value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_AppViewBackButtonVisibility(reinterpret_cast(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_AppViewBackButtonVisibility(reinterpret_cast(&value))); } return value; } template auto consume_Windows_UI_Core_ISystemNavigationManager2::AppViewBackButtonVisibility(winrt::Windows::UI::Core::AppViewBackButtonVisibility const& value) const { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->put_AppViewBackButtonVisibility(static_cast(value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_AppViewBackButtonVisibility(static_cast(value))); } } template auto consume_Windows_UI_Core_ISystemNavigationManagerStatics::GetForCurrentView() const { void* loader{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->GetForCurrentView(&loader)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->GetForCurrentView(&loader)); } return winrt::Windows::UI::Core::SystemNavigationManager{ loader, take_ownership_from_abi }; } template auto consume_Windows_UI_Core_ITouchHitTestingEventArgs::ProximityEvaluation() const { winrt::Windows::UI::Core::CoreProximityEvaluation value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_ProximityEvaluation(put_abi(value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_ProximityEvaluation(put_abi(value))); } return value; } template auto consume_Windows_UI_Core_ITouchHitTestingEventArgs::ProximityEvaluation(winrt::Windows::UI::Core::CoreProximityEvaluation const& value) const { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->put_ProximityEvaluation(impl::bind_in(value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_ProximityEvaluation(impl::bind_in(value))); } } template auto consume_Windows_UI_Core_ITouchHitTestingEventArgs::Point() const { winrt::Windows::Foundation::Point value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_Point(put_abi(value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Point(put_abi(value))); } return value; } template auto consume_Windows_UI_Core_ITouchHitTestingEventArgs::BoundingBox() const { winrt::Windows::Foundation::Rect value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_BoundingBox(put_abi(value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_BoundingBox(put_abi(value))); } return value; } template auto consume_Windows_UI_Core_ITouchHitTestingEventArgs::EvaluateProximity(winrt::Windows::Foundation::Rect const& controlBoundingBox) const { winrt::Windows::UI::Core::CoreProximityEvaluation proximityEvaluation{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->EvaluateProximityToRect(impl::bind_in(controlBoundingBox), put_abi(proximityEvaluation))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->EvaluateProximityToRect(impl::bind_in(controlBoundingBox), put_abi(proximityEvaluation))); } return proximityEvaluation; } template auto consume_Windows_UI_Core_ITouchHitTestingEventArgs::EvaluateProximity(array_view controlVertices) const { winrt::Windows::UI::Core::CoreProximityEvaluation proximityEvaluation{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->EvaluateProximityToPolygon(controlVertices.size(), get_abi(controlVertices), put_abi(proximityEvaluation))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->EvaluateProximityToPolygon(controlVertices.size(), get_abi(controlVertices), put_abi(proximityEvaluation))); } return proximityEvaluation; } template auto consume_Windows_UI_Core_IVisibilityChangedEventArgs::Visible() const { bool value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_Visible(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Visible(&value)); } return value; } template auto consume_Windows_UI_Core_IWindowActivatedEventArgs::WindowActivationState() const { winrt::Windows::UI::Core::CoreWindowActivationState value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_WindowActivationState(reinterpret_cast(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_WindowActivationState(reinterpret_cast(&value))); } return value; } template auto consume_Windows_UI_Core_IWindowSizeChangedEventArgs::Size() const { winrt::Windows::Foundation::Size value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_Size(put_abi(value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Size(put_abi(value))); } return value; } template struct delegate final : implements_delegate { delegate(H&& handler) : implements_delegate(std::forward(handler)) {} int32_t __stdcall Invoke() noexcept final try { (*this)(); return 0; } catch (...) { return to_hresult(); } }; template struct delegate final : implements_delegate { delegate(H&& handler) : implements_delegate(std::forward(handler)) {} int32_t __stdcall Invoke(void* e) noexcept final try { (*this)(*reinterpret_cast(&e)); return 0; } catch (...) { return to_hresult(); } }; #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_EventType(int32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().EventType()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_VirtualKey(int32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().VirtualKey()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_KeyStatus(struct struct_Windows_UI_Core_CorePhysicalKeyStatus* value) noexcept final try { zero_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().KeyStatus()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_DeviceId(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().DeviceId()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_AutomationProvider(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().AutomationProvider()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_AutomationProvider(void* value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().AutomationProvider(*reinterpret_cast(&value)); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_Handled(bool* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Handled()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_Handled(bool value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().Handled(value); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_KeyCode(uint32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().KeyCode()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_KeyStatus(struct struct_Windows_UI_Core_CorePhysicalKeyStatus* value) noexcept final try { zero_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().KeyStatus()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_PointerPosition(winrt::Windows::Foundation::Point* value) noexcept final try { zero_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().PointerPosition()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_SearchBounds(winrt::Windows::Foundation::Rect* value) noexcept final try { zero_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().SearchBounds()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_ClosestInteractiveBounds(winrt::Windows::Foundation::Rect* value) noexcept final try { zero_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().ClosestInteractiveBounds()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_ClosestInteractiveBounds(winrt::Windows::Foundation::Rect value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().ClosestInteractiveBounds(*reinterpret_cast(&value)); return 0; } catch (...) { return to_hresult(); } }; #endif template struct produce : produce_base { int32_t __stdcall add_AcceleratorKeyActivated(void* handler, winrt::event_token* pCookie) noexcept final try { zero_abi(pCookie); typename D::abi_guard guard(this->shim()); *pCookie = detach_from(this->shim().AcceleratorKeyActivated(*reinterpret_cast const*>(&handler))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall remove_AcceleratorKeyActivated(winrt::event_token cookie) noexcept final { typename D::abi_guard guard(this->shim()); this->shim().AcceleratorKeyActivated(*reinterpret_cast(&cookie)); return 0; } }; #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall add_ClosestInteractiveBoundsRequested(void* handler, winrt::event_token* pCookie) noexcept final try { zero_abi(pCookie); typename D::abi_guard guard(this->shim()); *pCookie = detach_from(this->shim().ClosestInteractiveBoundsRequested(*reinterpret_cast const*>(&handler))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall remove_ClosestInteractiveBoundsRequested(winrt::event_token cookie) noexcept final { typename D::abi_guard guard(this->shim()); this->shim().ClosestInteractiveBoundsRequested(*reinterpret_cast(&cookie)); return 0; } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_HasFocus(bool* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().HasFocus()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall add_GotFocus(void* handler, winrt::event_token* pCookie) noexcept final try { zero_abi(pCookie); typename D::abi_guard guard(this->shim()); *pCookie = detach_from(this->shim().GotFocus(*reinterpret_cast const*>(&handler))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall remove_GotFocus(winrt::event_token cookie) noexcept final { typename D::abi_guard guard(this->shim()); this->shim().GotFocus(*reinterpret_cast(&cookie)); return 0; } int32_t __stdcall add_LostFocus(void* handler, winrt::event_token* pCookie) noexcept final try { zero_abi(pCookie); typename D::abi_guard guard(this->shim()); *pCookie = detach_from(this->shim().LostFocus(*reinterpret_cast const*>(&handler))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall remove_LostFocus(winrt::event_token cookie) noexcept final { typename D::abi_guard guard(this->shim()); this->shim().LostFocus(*reinterpret_cast(&cookie)); return 0; } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_Id(uint32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Id()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_Type(int32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Type()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall CreateCursor(int32_t type, uint32_t id, void** cursor) noexcept final try { clear_abi(cursor); typename D::abi_guard guard(this->shim()); *cursor = detach_from(this->shim().CreateCursor(*reinterpret_cast(&type), id)); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_HasThreadAccess(bool* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().HasThreadAccess()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall ProcessEvents(int32_t options) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().ProcessEvents(*reinterpret_cast(&options)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall RunAsync(int32_t priority, void* agileCallback, void** asyncAction) noexcept final try { clear_abi(asyncAction); typename D::abi_guard guard(this->shim()); *asyncAction = detach_from(this->shim().RunAsync(*reinterpret_cast(&priority), *reinterpret_cast(&agileCallback))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall RunIdleAsync(void* agileCallback, void** asyncAction) noexcept final try { clear_abi(asyncAction); typename D::abi_guard guard(this->shim()); *asyncAction = detach_from(this->shim().RunIdleAsync(*reinterpret_cast(&agileCallback))); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall TryRunAsync(int32_t priority, void* agileCallback, void** asyncOperation) noexcept final try { clear_abi(asyncOperation); typename D::abi_guard guard(this->shim()); *asyncOperation = detach_from>(this->shim().TryRunAsync(*reinterpret_cast(&priority), *reinterpret_cast(&agileCallback))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall TryRunIdleAsync(void* agileCallback, void** asyncOperation) noexcept final try { clear_abi(asyncOperation); typename D::abi_guard guard(this->shim()); *asyncOperation = detach_from>(this->shim().TryRunIdleAsync(*reinterpret_cast(&agileCallback))); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_CurrentPriority(int32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().CurrentPriority()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_CurrentPriority(int32_t value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().CurrentPriority(*reinterpret_cast(&value)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall ShouldYield(bool* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().ShouldYield()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall ShouldYieldToPriority(int32_t priority, bool* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().ShouldYield(*reinterpret_cast(&priority))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall StopProcessEvents() noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().StopProcessEvents(); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_IsTransparentForUncontrolledInput(bool* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().IsTransparentForUncontrolledInput()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_IsTransparentForUncontrolledInput(bool value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().IsTransparentForUncontrolledInput(value); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_IsPalmRejectionEnabled(bool* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().IsPalmRejectionEnabled()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_IsPalmRejectionEnabled(bool value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().IsPalmRejectionEnabled(value); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_Source(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Source()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall SetControlledInput(uint32_t inputTypes) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().SetControlledInput(*reinterpret_cast(&inputTypes)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall SetControlledInputWithFilters(uint32_t inputTypes, uint32_t required, uint32_t excluded) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().SetControlledInput(*reinterpret_cast(&inputTypes), *reinterpret_cast(&required), *reinterpret_cast(&excluded)); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall CreateForVisual(void* visual, void** result) noexcept final try { clear_abi(result); typename D::abi_guard guard(this->shim()); *result = detach_from(this->shim().CreateForVisual(*reinterpret_cast(&visual))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall CreateForIVisualElement(void* visualElement, void** result) noexcept final try { clear_abi(result); typename D::abi_guard guard(this->shim()); *result = detach_from(this->shim().CreateForIVisualElement(*reinterpret_cast(&visualElement))); return 0; } catch (...) { return to_hresult(); } }; #endif template struct produce : produce_base { int32_t __stdcall get_Dispatcher(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Dispatcher()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_IsInputEnabled(bool* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().IsInputEnabled()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_IsInputEnabled(bool value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().IsInputEnabled(value); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall add_InputEnabled(void* handler, winrt::event_token* pCookie) noexcept final try { zero_abi(pCookie); typename D::abi_guard guard(this->shim()); *pCookie = detach_from(this->shim().InputEnabled(*reinterpret_cast const*>(&handler))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall remove_InputEnabled(winrt::event_token cookie) noexcept final { typename D::abi_guard guard(this->shim()); this->shim().InputEnabled(*reinterpret_cast(&cookie)); return 0; } }; #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall GetCurrentKeyState(int32_t virtualKey, uint32_t* KeyState) noexcept final try { typename D::abi_guard guard(this->shim()); *KeyState = detach_from(this->shim().GetCurrentKeyState(*reinterpret_cast(&virtualKey))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall add_CharacterReceived(void* handler, winrt::event_token* pCookie) noexcept final try { zero_abi(pCookie); typename D::abi_guard guard(this->shim()); *pCookie = detach_from(this->shim().CharacterReceived(*reinterpret_cast const*>(&handler))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall remove_CharacterReceived(winrt::event_token cookie) noexcept final { typename D::abi_guard guard(this->shim()); this->shim().CharacterReceived(*reinterpret_cast(&cookie)); return 0; } int32_t __stdcall add_KeyDown(void* handler, winrt::event_token* pCookie) noexcept final try { zero_abi(pCookie); typename D::abi_guard guard(this->shim()); *pCookie = detach_from(this->shim().KeyDown(*reinterpret_cast const*>(&handler))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall remove_KeyDown(winrt::event_token cookie) noexcept final { typename D::abi_guard guard(this->shim()); this->shim().KeyDown(*reinterpret_cast(&cookie)); return 0; } int32_t __stdcall add_KeyUp(void* handler, winrt::event_token* pCookie) noexcept final try { zero_abi(pCookie); typename D::abi_guard guard(this->shim()); *pCookie = detach_from(this->shim().KeyUp(*reinterpret_cast const*>(&handler))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall remove_KeyUp(winrt::event_token cookie) noexcept final { typename D::abi_guard guard(this->shim()); this->shim().KeyUp(*reinterpret_cast(&cookie)); return 0; } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall GetCurrentKeyEventDeviceId(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().GetCurrentKeyEventDeviceId()); return 0; } catch (...) { return to_hresult(); } }; #endif template struct produce : produce_base { int32_t __stdcall ReleasePointerCapture() noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().ReleasePointerCapture(); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall SetPointerCapture() noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().SetPointerCapture(); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_HasCapture(bool* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().HasCapture()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_PointerPosition(winrt::Windows::Foundation::Point* value) noexcept final try { zero_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().PointerPosition()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_PointerCursor(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().PointerCursor()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_PointerCursor(void* value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().PointerCursor(*reinterpret_cast(&value)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall add_PointerCaptureLost(void* handler, winrt::event_token* cookie) noexcept final try { zero_abi(cookie); typename D::abi_guard guard(this->shim()); *cookie = detach_from(this->shim().PointerCaptureLost(*reinterpret_cast const*>(&handler))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall remove_PointerCaptureLost(winrt::event_token cookie) noexcept final { typename D::abi_guard guard(this->shim()); this->shim().PointerCaptureLost(*reinterpret_cast(&cookie)); return 0; } int32_t __stdcall add_PointerEntered(void* handler, winrt::event_token* cookie) noexcept final try { zero_abi(cookie); typename D::abi_guard guard(this->shim()); *cookie = detach_from(this->shim().PointerEntered(*reinterpret_cast const*>(&handler))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall remove_PointerEntered(winrt::event_token cookie) noexcept final { typename D::abi_guard guard(this->shim()); this->shim().PointerEntered(*reinterpret_cast(&cookie)); return 0; } int32_t __stdcall add_PointerExited(void* handler, winrt::event_token* cookie) noexcept final try { zero_abi(cookie); typename D::abi_guard guard(this->shim()); *cookie = detach_from(this->shim().PointerExited(*reinterpret_cast const*>(&handler))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall remove_PointerExited(winrt::event_token cookie) noexcept final { typename D::abi_guard guard(this->shim()); this->shim().PointerExited(*reinterpret_cast(&cookie)); return 0; } int32_t __stdcall add_PointerMoved(void* handler, winrt::event_token* cookie) noexcept final try { zero_abi(cookie); typename D::abi_guard guard(this->shim()); *cookie = detach_from(this->shim().PointerMoved(*reinterpret_cast const*>(&handler))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall remove_PointerMoved(winrt::event_token cookie) noexcept final { typename D::abi_guard guard(this->shim()); this->shim().PointerMoved(*reinterpret_cast(&cookie)); return 0; } int32_t __stdcall add_PointerPressed(void* handler, winrt::event_token* cookie) noexcept final try { zero_abi(cookie); typename D::abi_guard guard(this->shim()); *cookie = detach_from(this->shim().PointerPressed(*reinterpret_cast const*>(&handler))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall remove_PointerPressed(winrt::event_token cookie) noexcept final { typename D::abi_guard guard(this->shim()); this->shim().PointerPressed(*reinterpret_cast(&cookie)); return 0; } int32_t __stdcall add_PointerReleased(void* handler, winrt::event_token* cookie) noexcept final try { zero_abi(cookie); typename D::abi_guard guard(this->shim()); *cookie = detach_from(this->shim().PointerReleased(*reinterpret_cast const*>(&handler))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall remove_PointerReleased(winrt::event_token cookie) noexcept final { typename D::abi_guard guard(this->shim()); this->shim().PointerReleased(*reinterpret_cast(&cookie)); return 0; } int32_t __stdcall add_PointerWheelChanged(void* handler, winrt::event_token* cookie) noexcept final try { zero_abi(cookie); typename D::abi_guard guard(this->shim()); *cookie = detach_from(this->shim().PointerWheelChanged(*reinterpret_cast const*>(&handler))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall remove_PointerWheelChanged(winrt::event_token cookie) noexcept final { typename D::abi_guard guard(this->shim()); this->shim().PointerWheelChanged(*reinterpret_cast(&cookie)); return 0; } }; template struct produce : produce_base { int32_t __stdcall get_DispatcherQueue(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().DispatcherQueue()); return 0; } catch (...) { return to_hresult(); } }; template struct produce : produce_base { int32_t __stdcall add_PointerRoutedAway(void* handler, winrt::event_token* cookie) noexcept final try { zero_abi(cookie); typename D::abi_guard guard(this->shim()); *cookie = detach_from(this->shim().PointerRoutedAway(*reinterpret_cast const*>(&handler))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall remove_PointerRoutedAway(winrt::event_token cookie) noexcept final { typename D::abi_guard guard(this->shim()); this->shim().PointerRoutedAway(*reinterpret_cast(&cookie)); return 0; } int32_t __stdcall add_PointerRoutedTo(void* handler, winrt::event_token* cookie) noexcept final try { zero_abi(cookie); typename D::abi_guard guard(this->shim()); *cookie = detach_from(this->shim().PointerRoutedTo(*reinterpret_cast const*>(&handler))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall remove_PointerRoutedTo(winrt::event_token cookie) noexcept final { typename D::abi_guard guard(this->shim()); this->shim().PointerRoutedTo(*reinterpret_cast(&cookie)); return 0; } int32_t __stdcall add_PointerRoutedReleased(void* handler, winrt::event_token* cookie) noexcept final try { zero_abi(cookie); typename D::abi_guard guard(this->shim()); *cookie = detach_from(this->shim().PointerRoutedReleased(*reinterpret_cast const*>(&handler))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall remove_PointerRoutedReleased(winrt::event_token cookie) noexcept final { typename D::abi_guard guard(this->shim()); this->shim().PointerRoutedReleased(*reinterpret_cast(&cookie)); return 0; } }; #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall add_TouchHitTesting(void* handler, winrt::event_token* pCookie) noexcept final try { zero_abi(pCookie); typename D::abi_guard guard(this->shim()); *pCookie = detach_from(this->shim().TouchHitTesting(*reinterpret_cast const*>(&handler))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall remove_TouchHitTesting(winrt::event_token cookie) noexcept final { typename D::abi_guard guard(this->shim()); this->shim().TouchHitTesting(*reinterpret_cast(&cookie)); return 0; } }; #endif template struct produce : produce_base { int32_t __stdcall get_AutomationHostProvider(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().AutomationHostProvider()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_Bounds(winrt::Windows::Foundation::Rect* value) noexcept final try { zero_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Bounds()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_CustomProperties(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().CustomProperties()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_Dispatcher(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Dispatcher()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_FlowDirection(int32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().FlowDirection()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_FlowDirection(int32_t value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().FlowDirection(*reinterpret_cast(&value)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_IsInputEnabled(bool* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().IsInputEnabled()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_IsInputEnabled(bool value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().IsInputEnabled(value); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_PointerCursor(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().PointerCursor()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_PointerCursor(void* value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().PointerCursor(*reinterpret_cast(&value)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_PointerPosition(winrt::Windows::Foundation::Point* value) noexcept final try { zero_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().PointerPosition()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_Visible(bool* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Visible()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall Activate() noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().Activate(); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall Close() noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().Close(); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall GetAsyncKeyState(int32_t virtualKey, uint32_t* KeyState) noexcept final try { typename D::abi_guard guard(this->shim()); *KeyState = detach_from(this->shim().GetAsyncKeyState(*reinterpret_cast(&virtualKey))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall GetKeyState(int32_t virtualKey, uint32_t* KeyState) noexcept final try { typename D::abi_guard guard(this->shim()); *KeyState = detach_from(this->shim().GetKeyState(*reinterpret_cast(&virtualKey))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall ReleasePointerCapture() noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().ReleasePointerCapture(); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall SetPointerCapture() noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().SetPointerCapture(); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall add_Activated(void* handler, winrt::event_token* pCookie) noexcept final try { zero_abi(pCookie); typename D::abi_guard guard(this->shim()); *pCookie = detach_from(this->shim().Activated(*reinterpret_cast const*>(&handler))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall remove_Activated(winrt::event_token cookie) noexcept final { typename D::abi_guard guard(this->shim()); this->shim().Activated(*reinterpret_cast(&cookie)); return 0; } int32_t __stdcall add_AutomationProviderRequested(void* handler, winrt::event_token* cookie) noexcept final try { zero_abi(cookie); typename D::abi_guard guard(this->shim()); *cookie = detach_from(this->shim().AutomationProviderRequested(*reinterpret_cast const*>(&handler))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall remove_AutomationProviderRequested(winrt::event_token cookie) noexcept final { typename D::abi_guard guard(this->shim()); this->shim().AutomationProviderRequested(*reinterpret_cast(&cookie)); return 0; } int32_t __stdcall add_CharacterReceived(void* handler, winrt::event_token* pCookie) noexcept final try { zero_abi(pCookie); typename D::abi_guard guard(this->shim()); *pCookie = detach_from(this->shim().CharacterReceived(*reinterpret_cast const*>(&handler))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall remove_CharacterReceived(winrt::event_token cookie) noexcept final { typename D::abi_guard guard(this->shim()); this->shim().CharacterReceived(*reinterpret_cast(&cookie)); return 0; } int32_t __stdcall add_Closed(void* handler, winrt::event_token* pCookie) noexcept final try { zero_abi(pCookie); typename D::abi_guard guard(this->shim()); *pCookie = detach_from(this->shim().Closed(*reinterpret_cast const*>(&handler))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall remove_Closed(winrt::event_token cookie) noexcept final { typename D::abi_guard guard(this->shim()); this->shim().Closed(*reinterpret_cast(&cookie)); return 0; } int32_t __stdcall add_InputEnabled(void* handler, winrt::event_token* pCookie) noexcept final try { zero_abi(pCookie); typename D::abi_guard guard(this->shim()); *pCookie = detach_from(this->shim().InputEnabled(*reinterpret_cast const*>(&handler))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall remove_InputEnabled(winrt::event_token cookie) noexcept final { typename D::abi_guard guard(this->shim()); this->shim().InputEnabled(*reinterpret_cast(&cookie)); return 0; } int32_t __stdcall add_KeyDown(void* handler, winrt::event_token* pCookie) noexcept final try { zero_abi(pCookie); typename D::abi_guard guard(this->shim()); *pCookie = detach_from(this->shim().KeyDown(*reinterpret_cast const*>(&handler))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall remove_KeyDown(winrt::event_token cookie) noexcept final { typename D::abi_guard guard(this->shim()); this->shim().KeyDown(*reinterpret_cast(&cookie)); return 0; } int32_t __stdcall add_KeyUp(void* handler, winrt::event_token* pCookie) noexcept final try { zero_abi(pCookie); typename D::abi_guard guard(this->shim()); *pCookie = detach_from(this->shim().KeyUp(*reinterpret_cast const*>(&handler))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall remove_KeyUp(winrt::event_token cookie) noexcept final { typename D::abi_guard guard(this->shim()); this->shim().KeyUp(*reinterpret_cast(&cookie)); return 0; } int32_t __stdcall add_PointerCaptureLost(void* handler, winrt::event_token* cookie) noexcept final try { zero_abi(cookie); typename D::abi_guard guard(this->shim()); *cookie = detach_from(this->shim().PointerCaptureLost(*reinterpret_cast const*>(&handler))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall remove_PointerCaptureLost(winrt::event_token cookie) noexcept final { typename D::abi_guard guard(this->shim()); this->shim().PointerCaptureLost(*reinterpret_cast(&cookie)); return 0; } int32_t __stdcall add_PointerEntered(void* handler, winrt::event_token* cookie) noexcept final try { zero_abi(cookie); typename D::abi_guard guard(this->shim()); *cookie = detach_from(this->shim().PointerEntered(*reinterpret_cast const*>(&handler))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall remove_PointerEntered(winrt::event_token cookie) noexcept final { typename D::abi_guard guard(this->shim()); this->shim().PointerEntered(*reinterpret_cast(&cookie)); return 0; } int32_t __stdcall add_PointerExited(void* handler, winrt::event_token* cookie) noexcept final try { zero_abi(cookie); typename D::abi_guard guard(this->shim()); *cookie = detach_from(this->shim().PointerExited(*reinterpret_cast const*>(&handler))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall remove_PointerExited(winrt::event_token cookie) noexcept final { typename D::abi_guard guard(this->shim()); this->shim().PointerExited(*reinterpret_cast(&cookie)); return 0; } int32_t __stdcall add_PointerMoved(void* handler, winrt::event_token* cookie) noexcept final try { zero_abi(cookie); typename D::abi_guard guard(this->shim()); *cookie = detach_from(this->shim().PointerMoved(*reinterpret_cast const*>(&handler))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall remove_PointerMoved(winrt::event_token cookie) noexcept final { typename D::abi_guard guard(this->shim()); this->shim().PointerMoved(*reinterpret_cast(&cookie)); return 0; } int32_t __stdcall add_PointerPressed(void* handler, winrt::event_token* cookie) noexcept final try { zero_abi(cookie); typename D::abi_guard guard(this->shim()); *cookie = detach_from(this->shim().PointerPressed(*reinterpret_cast const*>(&handler))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall remove_PointerPressed(winrt::event_token cookie) noexcept final { typename D::abi_guard guard(this->shim()); this->shim().PointerPressed(*reinterpret_cast(&cookie)); return 0; } int32_t __stdcall add_PointerReleased(void* handler, winrt::event_token* cookie) noexcept final try { zero_abi(cookie); typename D::abi_guard guard(this->shim()); *cookie = detach_from(this->shim().PointerReleased(*reinterpret_cast const*>(&handler))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall remove_PointerReleased(winrt::event_token cookie) noexcept final { typename D::abi_guard guard(this->shim()); this->shim().PointerReleased(*reinterpret_cast(&cookie)); return 0; } int32_t __stdcall add_TouchHitTesting(void* handler, winrt::event_token* pCookie) noexcept final try { zero_abi(pCookie); typename D::abi_guard guard(this->shim()); *pCookie = detach_from(this->shim().TouchHitTesting(*reinterpret_cast const*>(&handler))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall remove_TouchHitTesting(winrt::event_token cookie) noexcept final { typename D::abi_guard guard(this->shim()); this->shim().TouchHitTesting(*reinterpret_cast(&cookie)); return 0; } int32_t __stdcall add_PointerWheelChanged(void* handler, winrt::event_token* cookie) noexcept final try { zero_abi(cookie); typename D::abi_guard guard(this->shim()); *cookie = detach_from(this->shim().PointerWheelChanged(*reinterpret_cast const*>(&handler))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall remove_PointerWheelChanged(winrt::event_token cookie) noexcept final { typename D::abi_guard guard(this->shim()); this->shim().PointerWheelChanged(*reinterpret_cast(&cookie)); return 0; } int32_t __stdcall add_SizeChanged(void* handler, winrt::event_token* pCookie) noexcept final try { zero_abi(pCookie); typename D::abi_guard guard(this->shim()); *pCookie = detach_from(this->shim().SizeChanged(*reinterpret_cast const*>(&handler))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall remove_SizeChanged(winrt::event_token cookie) noexcept final { typename D::abi_guard guard(this->shim()); this->shim().SizeChanged(*reinterpret_cast(&cookie)); return 0; } int32_t __stdcall add_VisibilityChanged(void* handler, winrt::event_token* pCookie) noexcept final try { zero_abi(pCookie); typename D::abi_guard guard(this->shim()); *pCookie = detach_from(this->shim().VisibilityChanged(*reinterpret_cast const*>(&handler))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall remove_VisibilityChanged(winrt::event_token cookie) noexcept final { typename D::abi_guard guard(this->shim()); this->shim().VisibilityChanged(*reinterpret_cast(&cookie)); return 0; } }; #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall put_PointerPosition(winrt::Windows::Foundation::Point value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().PointerPosition(*reinterpret_cast(&value)); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall add_ClosestInteractiveBoundsRequested(void* handler, winrt::event_token* pCookie) noexcept final try { zero_abi(pCookie); typename D::abi_guard guard(this->shim()); *pCookie = detach_from(this->shim().ClosestInteractiveBoundsRequested(*reinterpret_cast const*>(&handler))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall remove_ClosestInteractiveBoundsRequested(winrt::event_token cookie) noexcept final { typename D::abi_guard guard(this->shim()); this->shim().ClosestInteractiveBoundsRequested(*reinterpret_cast(&cookie)); return 0; } int32_t __stdcall GetCurrentKeyEventDeviceId(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().GetCurrentKeyEventDeviceId()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall add_ResizeStarted(void* handler, winrt::event_token* pCookie) noexcept final try { zero_abi(pCookie); typename D::abi_guard guard(this->shim()); *pCookie = detach_from(this->shim().ResizeStarted(*reinterpret_cast const*>(&handler))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall remove_ResizeStarted(winrt::event_token cookie) noexcept final { typename D::abi_guard guard(this->shim()); this->shim().ResizeStarted(*reinterpret_cast(&cookie)); return 0; } int32_t __stdcall add_ResizeCompleted(void* handler, winrt::event_token* pCookie) noexcept final try { zero_abi(pCookie); typename D::abi_guard guard(this->shim()); *pCookie = detach_from(this->shim().ResizeCompleted(*reinterpret_cast const*>(&handler))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall remove_ResizeCompleted(winrt::event_token cookie) noexcept final { typename D::abi_guard guard(this->shim()); this->shim().ResizeCompleted(*reinterpret_cast(&cookie)); return 0; } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_DispatcherQueue(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().DispatcherQueue()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_ActivationMode(int32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().ActivationMode()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall add_Showing(void* handler, winrt::event_token* cookie) noexcept final try { zero_abi(cookie); typename D::abi_guard guard(this->shim()); *cookie = detach_from(this->shim().Showing(*reinterpret_cast const*>(&handler))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall remove_Showing(winrt::event_token cookie) noexcept final { typename D::abi_guard guard(this->shim()); this->shim().Showing(*reinterpret_cast(&cookie)); return 0; } int32_t __stdcall get_MaxSize(winrt::Windows::Foundation::Size* value) noexcept final try { zero_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().MaxSize()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_MinSize(winrt::Windows::Foundation::Size* value) noexcept final try { zero_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().MinSize()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_Title(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Title()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_Title(void* value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().Title(*reinterpret_cast(&value)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_IsInteractionDelayed(int32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().IsInteractionDelayed()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_IsInteractionDelayed(int32_t value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().IsInteractionDelayed(value); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_Commands(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from>(this->shim().Commands()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_DefaultCommandIndex(uint32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().DefaultCommandIndex()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_DefaultCommandIndex(uint32_t value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().DefaultCommandIndex(value); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_CancelCommandIndex(uint32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().CancelCommandIndex()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_CancelCommandIndex(uint32_t value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().CancelCommandIndex(value); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_BackButtonCommand(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().BackButtonCommand()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_BackButtonCommand(void* value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().BackButtonCommand(*reinterpret_cast(&value)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall ShowAsync(void** asyncInfo) noexcept final try { clear_abi(asyncInfo); typename D::abi_guard guard(this->shim()); *asyncInfo = detach_from>(this->shim().ShowAsync()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall CreateWithTitle(void* title, void** coreWindowDialog) noexcept final try { clear_abi(coreWindowDialog); typename D::abi_guard guard(this->shim()); *coreWindowDialog = detach_from(this->shim().CreateWithTitle(*reinterpret_cast(&title))); return 0; } catch (...) { return to_hresult(); } }; #endif template struct produce : produce_base { int32_t __stdcall get_Handled(bool* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Handled()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_Handled(bool value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().Handled(value); return 0; } catch (...) { return to_hresult(); } }; #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall add_Showing(void* handler, winrt::event_token* cookie) noexcept final try { zero_abi(cookie); typename D::abi_guard guard(this->shim()); *cookie = detach_from(this->shim().Showing(*reinterpret_cast const*>(&handler))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall remove_Showing(winrt::event_token cookie) noexcept final { typename D::abi_guard guard(this->shim()); this->shim().Showing(*reinterpret_cast(&cookie)); return 0; } int32_t __stdcall get_MaxSize(winrt::Windows::Foundation::Size* value) noexcept final try { zero_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().MaxSize()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_MinSize(winrt::Windows::Foundation::Size* value) noexcept final try { zero_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().MinSize()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_Title(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Title()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_Title(void* value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().Title(*reinterpret_cast(&value)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_IsInteractionDelayed(int32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().IsInteractionDelayed()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_IsInteractionDelayed(int32_t value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().IsInteractionDelayed(value); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_Commands(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from>(this->shim().Commands()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_DefaultCommandIndex(uint32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().DefaultCommandIndex()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_DefaultCommandIndex(uint32_t value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().DefaultCommandIndex(value); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_BackButtonCommand(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().BackButtonCommand()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_BackButtonCommand(void* value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().BackButtonCommand(*reinterpret_cast(&value)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall ShowAsync(void** asyncInfo) noexcept final try { clear_abi(asyncInfo); typename D::abi_guard guard(this->shim()); *asyncInfo = detach_from>(this->shim().ShowAsync()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall Create(winrt::Windows::Foundation::Point position, void** coreWindowFlyout) noexcept final try { clear_abi(coreWindowFlyout); typename D::abi_guard guard(this->shim()); *coreWindowFlyout = detach_from(this->shim().Create(*reinterpret_cast(&position))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall CreateWithTitle(winrt::Windows::Foundation::Point position, void* title, void** coreWindowFlyout) noexcept final try { clear_abi(coreWindowFlyout); typename D::abi_guard guard(this->shim()); *coreWindowFlyout = detach_from(this->shim().CreateWithTitle(*reinterpret_cast(&position), *reinterpret_cast(&title))); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall SetDesiredSize(winrt::Windows::Foundation::Size value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().SetDesiredSize(*reinterpret_cast(&value)); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall NotifyLayoutCompleted() noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().NotifyLayoutCompleted(); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall put_ShouldWaitForLayoutCompletion(bool value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().ShouldWaitForLayoutCompletion(value); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_ShouldWaitForLayoutCompletion(bool* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().ShouldWaitForLayoutCompletion()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall GetForCurrentView(void** CoreWindowResizeManager) noexcept final try { clear_abi(CoreWindowResizeManager); typename D::abi_guard guard(this->shim()); *CoreWindowResizeManager = detach_from(this->shim().GetForCurrentView()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall GetForCurrentThread(void** ppWindow) noexcept final try { clear_abi(ppWindow); typename D::abi_guard guard(this->shim()); *ppWindow = detach_from(this->shim().GetForCurrentThread()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_UIContext(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().UIContext()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_IsDispatcherIdle(bool* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().IsDispatcherIdle()); return 0; } catch (...) { return to_hresult(); } }; #endif template struct produce : produce_base { int32_t __stdcall Initialize(void* window) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().Initialize(*reinterpret_cast(&window)); return 0; } catch (...) { return to_hresult(); } }; #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_InputEnabled(bool* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().InputEnabled()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_VirtualKey(int32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().VirtualKey()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_KeyStatus(struct struct_Windows_UI_Core_CorePhysicalKeyStatus* value) noexcept final try { zero_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().KeyStatus()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_DeviceId(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().DeviceId()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_CurrentPoint(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().CurrentPoint()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_KeyModifiers(uint32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().KeyModifiers()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall GetIntermediatePoints(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from>(this->shim().GetIntermediatePoints()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall add_BackRequested(void* handler, winrt::event_token* token) noexcept final try { zero_abi(token); typename D::abi_guard guard(this->shim()); *token = detach_from(this->shim().BackRequested(*reinterpret_cast const*>(&handler))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall remove_BackRequested(winrt::event_token token) noexcept final { typename D::abi_guard guard(this->shim()); this->shim().BackRequested(*reinterpret_cast(&token)); return 0; } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_AppViewBackButtonVisibility(int32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().AppViewBackButtonVisibility()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_AppViewBackButtonVisibility(int32_t value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().AppViewBackButtonVisibility(*reinterpret_cast(&value)); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall GetForCurrentView(void** loader) noexcept final try { clear_abi(loader); typename D::abi_guard guard(this->shim()); *loader = detach_from(this->shim().GetForCurrentView()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_ProximityEvaluation(struct struct_Windows_UI_Core_CoreProximityEvaluation* value) noexcept final try { zero_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().ProximityEvaluation()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_ProximityEvaluation(struct struct_Windows_UI_Core_CoreProximityEvaluation value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().ProximityEvaluation(*reinterpret_cast(&value)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_Point(winrt::Windows::Foundation::Point* value) noexcept final try { zero_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Point()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_BoundingBox(winrt::Windows::Foundation::Rect* value) noexcept final try { zero_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().BoundingBox()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall EvaluateProximityToRect(winrt::Windows::Foundation::Rect controlBoundingBox, struct struct_Windows_UI_Core_CoreProximityEvaluation* proximityEvaluation) noexcept final try { zero_abi(proximityEvaluation); typename D::abi_guard guard(this->shim()); *proximityEvaluation = detach_from(this->shim().EvaluateProximity(*reinterpret_cast(&controlBoundingBox))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall EvaluateProximityToPolygon(uint32_t __controlVerticesSize, winrt::Windows::Foundation::Point* controlVertices, struct struct_Windows_UI_Core_CoreProximityEvaluation* proximityEvaluation) noexcept final try { zero_abi(proximityEvaluation); typename D::abi_guard guard(this->shim()); *proximityEvaluation = detach_from(this->shim().EvaluateProximity(array_view(reinterpret_cast(controlVertices), reinterpret_cast(controlVertices) + __controlVerticesSize))); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_Visible(bool* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Visible()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_WindowActivationState(int32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().WindowActivationState()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_Size(winrt::Windows::Foundation::Size* value) noexcept final try { zero_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Size()); return 0; } catch (...) { return to_hresult(); } }; #endif } WINRT_EXPORT namespace winrt::Windows::UI::Core { constexpr auto operator|(CoreIndependentInputFilters const left, CoreIndependentInputFilters const right) noexcept { return static_cast(impl::to_underlying_type(left) | impl::to_underlying_type(right)); } constexpr auto operator|=(CoreIndependentInputFilters& left, CoreIndependentInputFilters const right) noexcept { left = left | right; return left; } constexpr auto operator&(CoreIndependentInputFilters const left, CoreIndependentInputFilters const right) noexcept { return static_cast(impl::to_underlying_type(left) & impl::to_underlying_type(right)); } constexpr auto operator&=(CoreIndependentInputFilters& left, CoreIndependentInputFilters const right) noexcept { left = left & right; return left; } constexpr auto operator~(CoreIndependentInputFilters const value) noexcept { return static_cast(~impl::to_underlying_type(value)); } constexpr auto operator^(CoreIndependentInputFilters const left, CoreIndependentInputFilters const right) noexcept { return static_cast(impl::to_underlying_type(left) ^ impl::to_underlying_type(right)); } constexpr auto operator^=(CoreIndependentInputFilters& left, CoreIndependentInputFilters const right) noexcept { left = left ^ right; return left; } constexpr auto operator|(CoreInputDeviceTypes const left, CoreInputDeviceTypes const right) noexcept { return static_cast(impl::to_underlying_type(left) | impl::to_underlying_type(right)); } constexpr auto operator|=(CoreInputDeviceTypes& left, CoreInputDeviceTypes const right) noexcept { left = left | right; return left; } constexpr auto operator&(CoreInputDeviceTypes const left, CoreInputDeviceTypes const right) noexcept { return static_cast(impl::to_underlying_type(left) & impl::to_underlying_type(right)); } constexpr auto operator&=(CoreInputDeviceTypes& left, CoreInputDeviceTypes const right) noexcept { left = left & right; return left; } constexpr auto operator~(CoreInputDeviceTypes const value) noexcept { return static_cast(~impl::to_underlying_type(value)); } constexpr auto operator^(CoreInputDeviceTypes const left, CoreInputDeviceTypes const right) noexcept { return static_cast(impl::to_underlying_type(left) ^ impl::to_underlying_type(right)); } constexpr auto operator^=(CoreInputDeviceTypes& left, CoreInputDeviceTypes const right) noexcept { left = left ^ right; return left; } constexpr auto operator|(CoreVirtualKeyStates const left, CoreVirtualKeyStates const right) noexcept { return static_cast(impl::to_underlying_type(left) | impl::to_underlying_type(right)); } constexpr auto operator|=(CoreVirtualKeyStates& left, CoreVirtualKeyStates const right) noexcept { left = left | right; return left; } constexpr auto operator&(CoreVirtualKeyStates const left, CoreVirtualKeyStates const right) noexcept { return static_cast(impl::to_underlying_type(left) & impl::to_underlying_type(right)); } constexpr auto operator&=(CoreVirtualKeyStates& left, CoreVirtualKeyStates const right) noexcept { left = left & right; return left; } constexpr auto operator~(CoreVirtualKeyStates const value) noexcept { return static_cast(~impl::to_underlying_type(value)); } constexpr auto operator^(CoreVirtualKeyStates const left, CoreVirtualKeyStates const right) noexcept { return static_cast(impl::to_underlying_type(left) ^ impl::to_underlying_type(right)); } constexpr auto operator^=(CoreVirtualKeyStates& left, CoreVirtualKeyStates const right) noexcept { left = left ^ right; return left; } inline CoreCursor::CoreCursor(winrt::Windows::UI::Core::CoreCursorType const& type, uint32_t id) : CoreCursor(impl::call_factory([&](ICoreCursorFactory const& f) { return f.CreateCursor(type, id); })) { } inline auto CoreIndependentInputSourceController::CreateForVisual(winrt::Windows::UI::Composition::Visual const& visual) { return impl::call_factory([&](ICoreIndependentInputSourceControllerStatics const& f) { return f.CreateForVisual(visual); }); } inline auto CoreIndependentInputSourceController::CreateForIVisualElement(winrt::Windows::UI::Composition::IVisualElement const& visualElement) { return impl::call_factory([&](ICoreIndependentInputSourceControllerStatics const& f) { return f.CreateForIVisualElement(visualElement); }); } inline auto CoreWindow::GetForCurrentThread() { return impl::call_factory_cast([](ICoreWindowStatic const& f) { return f.GetForCurrentThread(); }); } inline CoreWindowDialog::CoreWindowDialog() : CoreWindowDialog(impl::call_factory_cast([](winrt::Windows::Foundation::IActivationFactory const& f) { return f.template ActivateInstance(); })) { } inline CoreWindowDialog::CoreWindowDialog(param::hstring const& title) : CoreWindowDialog(impl::call_factory([&](ICoreWindowDialogFactory const& f) { return f.CreateWithTitle(title); })) { } inline CoreWindowFlyout::CoreWindowFlyout(winrt::Windows::Foundation::Point const& position) : CoreWindowFlyout(impl::call_factory([&](ICoreWindowFlyoutFactory const& f) { return f.Create(position); })) { } inline CoreWindowFlyout::CoreWindowFlyout(winrt::Windows::Foundation::Point const& position, param::hstring const& title) : CoreWindowFlyout(impl::call_factory([&](ICoreWindowFlyoutFactory const& f) { return f.CreateWithTitle(position, title); })) { } inline auto CoreWindowResizeManager::GetForCurrentView() { return impl::call_factory_cast([](ICoreWindowResizeManagerStatics const& f) { return f.GetForCurrentView(); }); } inline auto SystemNavigationManager::GetForCurrentView() { return impl::call_factory_cast([](ISystemNavigationManagerStatics const& f) { return f.GetForCurrentView(); }); } template DispatchedHandler::DispatchedHandler(L handler) : DispatchedHandler(impl::make_delegate(std::forward(handler))) { } template DispatchedHandler::DispatchedHandler(F* handler) : DispatchedHandler([=](auto&&... args) { return handler(args...); }) { } template DispatchedHandler::DispatchedHandler(O* object, M method) : DispatchedHandler([=](auto&&... args) { return ((*object).*(method))(args...); }) { } template DispatchedHandler::DispatchedHandler(com_ptr&& object, M method) : DispatchedHandler([o = std::move(object), method](auto&&... args) { return ((*o).*(method))(args...); }) { } template DispatchedHandler::DispatchedHandler(weak_ref&& object, LM&& lambda_or_method) : DispatchedHandler([o = std::move(object), lm = std::forward(lambda_or_method)](auto&&... args) { if (auto s = o.get()) { if constexpr (std::is_member_function_pointer_v) ((*s).*(lm))(args...); else lm(args...); } }) { } template DispatchedHandler::DispatchedHandler(std::shared_ptr&& object, M method) : DispatchedHandler([o = std::move(object), method](auto&&... args) { return ((*o).*(method))(args...); }) { } template DispatchedHandler::DispatchedHandler(std::weak_ptr&& object, LM&& lambda_or_method) : DispatchedHandler([o = std::move(object), lm = std::forward(lambda_or_method)](auto&&... args) { if (auto s = o.lock()) { if constexpr (std::is_member_function_pointer_v) ((*s).*(lm))(args...); else lm(args...); } }) { } inline auto DispatchedHandler::operator()() const { check_hresult((*(impl::abi_t**)this)->Invoke()); } template IdleDispatchedHandler::IdleDispatchedHandler(L handler) : IdleDispatchedHandler(impl::make_delegate(std::forward(handler))) { } template IdleDispatchedHandler::IdleDispatchedHandler(F* handler) : IdleDispatchedHandler([=](auto&&... args) { return handler(args...); }) { } template IdleDispatchedHandler::IdleDispatchedHandler(O* object, M method) : IdleDispatchedHandler([=](auto&&... args) { return ((*object).*(method))(args...); }) { } template IdleDispatchedHandler::IdleDispatchedHandler(com_ptr&& object, M method) : IdleDispatchedHandler([o = std::move(object), method](auto&&... args) { return ((*o).*(method))(args...); }) { } template IdleDispatchedHandler::IdleDispatchedHandler(weak_ref&& object, LM&& lambda_or_method) : IdleDispatchedHandler([o = std::move(object), lm = std::forward(lambda_or_method)](auto&&... args) { if (auto s = o.get()) { if constexpr (std::is_member_function_pointer_v) ((*s).*(lm))(args...); else lm(args...); } }) { } template IdleDispatchedHandler::IdleDispatchedHandler(std::shared_ptr&& object, M method) : IdleDispatchedHandler([o = std::move(object), method](auto&&... args) { return ((*o).*(method))(args...); }) { } template IdleDispatchedHandler::IdleDispatchedHandler(std::weak_ptr&& object, LM&& lambda_or_method) : IdleDispatchedHandler([o = std::move(object), lm = std::forward(lambda_or_method)](auto&&... args) { if (auto s = o.lock()) { if constexpr (std::is_member_function_pointer_v) ((*s).*(lm))(args...); else lm(args...); } }) { } inline auto IdleDispatchedHandler::operator()(winrt::Windows::UI::Core::IdleDispatchedHandlerArgs const& e) const { check_hresult((*(impl::abi_t**)this)->Invoke(*(void**)(&e))); } } namespace std { #ifndef WINRT_LEAN_AND_MEAN template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; #endif #ifdef __cpp_lib_format #endif } WINRT_EXPORT namespace winrt { [[nodiscard]] inline auto resume_foreground( Windows::UI::Core::CoreDispatcher const& dispatcher, Windows::UI::Core::CoreDispatcherPriority const priority = Windows::UI::Core::CoreDispatcherPriority::Normal) noexcept { struct awaitable { awaitable(Windows::UI::Core::CoreDispatcher const& dispatcher, Windows::UI::Core::CoreDispatcherPriority const priority) noexcept : m_dispatcher(dispatcher), m_priority(priority) { } bool await_ready() const noexcept { return false; } void await_resume() const noexcept { } void await_suspend(impl::coroutine_handle<> handle) const { m_dispatcher.RunAsync(m_priority, [handle] { handle(); }); } private: Windows::UI::Core::CoreDispatcher const& m_dispatcher; Windows::UI::Core::CoreDispatcherPriority const m_priority; }; return awaitable{ dispatcher, priority }; }; #ifdef WINRT_IMPL_COROUTINES inline auto operator co_await(Windows::UI::Core::CoreDispatcher const& dispatcher) { return resume_foreground(dispatcher); } #endif } #endif