// C++/WinRT v2.0.250303.1 // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. #pragma once #ifndef WINRT_Windows_Graphics_Printing_H #define WINRT_Windows_Graphics_Printing_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.Graphics.h" #include "winrt/impl/Windows.ApplicationModel.DataTransfer.2.h" #include "winrt/impl/Windows.Foundation.2.h" #include "winrt/impl/Windows.Foundation.Collections.2.h" #include "winrt/impl/Windows.Storage.Streams.2.h" #include "winrt/impl/Windows.Graphics.Printing.2.h" namespace winrt::impl { template auto consume_Windows_Graphics_Printing_IPrintManager::PrintTaskRequested(winrt::Windows::Foundation::TypedEventHandler const& eventHandler) const { winrt::event_token eventCookie{}; 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_PrintTaskRequested(*(void**)(&eventHandler), put_abi(eventCookie))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->add_PrintTaskRequested(*(void**)(&eventHandler), put_abi(eventCookie))); } return eventCookie; } template auto consume_Windows_Graphics_Printing_IPrintManager::PrintTaskRequested(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler const& eventHandler) const { return impl::make_event_revoker(this, PrintTaskRequested(eventHandler)); } template auto consume_Windows_Graphics_Printing_IPrintManager::PrintTaskRequested(winrt::event_token const& eventCookie) 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_PrintTaskRequested(impl::bind_in(eventCookie)); } else { auto const _winrt_abi_type = *(abi_t**)this; _winrt_abi_type->remove_PrintTaskRequested(impl::bind_in(eventCookie)); } } template auto consume_Windows_Graphics_Printing_IPrintManagerStatic::GetForCurrentView() const { void* printingManager{}; 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(&printingManager)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->GetForCurrentView(&printingManager)); } return winrt::Windows::Graphics::Printing::PrintManager{ printingManager, take_ownership_from_abi }; } template auto consume_Windows_Graphics_Printing_IPrintManagerStatic::ShowPrintUIAsync() const { void* operation{}; 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->ShowPrintUIAsync(&operation)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->ShowPrintUIAsync(&operation)); } return winrt::Windows::Foundation::IAsyncOperation{ operation, take_ownership_from_abi }; } template auto consume_Windows_Graphics_Printing_IPrintManagerStatic2::IsSupported() const { bool 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->IsSupported(&result)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->IsSupported(&result)); } return result; } template auto consume_Windows_Graphics_Printing_IPrintPageInfo::MediaSize(winrt::Windows::Graphics::Printing::PrintMediaSize 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_MediaSize(static_cast(value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_MediaSize(static_cast(value))); } } template auto consume_Windows_Graphics_Printing_IPrintPageInfo::MediaSize() const { winrt::Windows::Graphics::Printing::PrintMediaSize 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_MediaSize(reinterpret_cast(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_MediaSize(reinterpret_cast(&value))); } return value; } template auto consume_Windows_Graphics_Printing_IPrintPageInfo::PageSize(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->put_PageSize(impl::bind_in(value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_PageSize(impl::bind_in(value))); } } template auto consume_Windows_Graphics_Printing_IPrintPageInfo::PageSize() 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_PageSize(put_abi(value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_PageSize(put_abi(value))); } return value; } template auto consume_Windows_Graphics_Printing_IPrintPageInfo::DpiX(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_DpiX(value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_DpiX(value)); } } template auto consume_Windows_Graphics_Printing_IPrintPageInfo::DpiX() 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_DpiX(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_DpiX(&value)); } return value; } template auto consume_Windows_Graphics_Printing_IPrintPageInfo::DpiY(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_DpiY(value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_DpiY(value)); } } template auto consume_Windows_Graphics_Printing_IPrintPageInfo::DpiY() 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_DpiY(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_DpiY(&value)); } return value; } template auto consume_Windows_Graphics_Printing_IPrintPageInfo::Orientation(winrt::Windows::Graphics::Printing::PrintOrientation 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_Orientation(static_cast(value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_Orientation(static_cast(value))); } } template auto consume_Windows_Graphics_Printing_IPrintPageInfo::Orientation() const { winrt::Windows::Graphics::Printing::PrintOrientation 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_Orientation(reinterpret_cast(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Orientation(reinterpret_cast(&value))); } return value; } template auto consume_Windows_Graphics_Printing_IPrintPageRange::FirstPageNumber() 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_FirstPageNumber(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_FirstPageNumber(&value)); } return value; } template auto consume_Windows_Graphics_Printing_IPrintPageRange::LastPageNumber() 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_LastPageNumber(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_LastPageNumber(&value)); } return value; } template auto consume_Windows_Graphics_Printing_IPrintPageRangeFactory::Create(int32_t firstPage, int32_t lastPage) 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->Create(firstPage, lastPage, &result)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->Create(firstPage, lastPage, &result)); } return winrt::Windows::Graphics::Printing::PrintPageRange{ result, take_ownership_from_abi }; } template auto consume_Windows_Graphics_Printing_IPrintPageRangeFactory::CreateWithSinglePage(int32_t page) 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->CreateWithSinglePage(page, &result)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->CreateWithSinglePage(page, &result)); } return winrt::Windows::Graphics::Printing::PrintPageRange{ result, take_ownership_from_abi }; } template auto consume_Windows_Graphics_Printing_IPrintPageRangeOptions::AllowAllPages(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_AllowAllPages(value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_AllowAllPages(value)); } } template auto consume_Windows_Graphics_Printing_IPrintPageRangeOptions::AllowAllPages() 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_AllowAllPages(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_AllowAllPages(&value)); } return value; } template auto consume_Windows_Graphics_Printing_IPrintPageRangeOptions::AllowCurrentPage(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_AllowCurrentPage(value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_AllowCurrentPage(value)); } } template auto consume_Windows_Graphics_Printing_IPrintPageRangeOptions::AllowCurrentPage() 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_AllowCurrentPage(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_AllowCurrentPage(&value)); } return value; } template auto consume_Windows_Graphics_Printing_IPrintPageRangeOptions::AllowCustomSetOfPages(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_AllowCustomSetOfPages(value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_AllowCustomSetOfPages(value)); } } template auto consume_Windows_Graphics_Printing_IPrintPageRangeOptions::AllowCustomSetOfPages() 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_AllowCustomSetOfPages(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_AllowCustomSetOfPages(&value)); } return value; } template auto consume_Windows_Graphics_Printing_IPrintTask::Properties() 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_Properties(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Properties(&value)); } return winrt::Windows::ApplicationModel::DataTransfer::DataPackagePropertySet{ value, take_ownership_from_abi }; } template auto consume_Windows_Graphics_Printing_IPrintTask::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::Graphics::Printing::IPrintDocumentSource{ value, take_ownership_from_abi }; } template auto consume_Windows_Graphics_Printing_IPrintTask::Options() 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_Options(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Options(&value)); } return winrt::Windows::Graphics::Printing::PrintTaskOptions{ value, take_ownership_from_abi }; } template auto consume_Windows_Graphics_Printing_IPrintTask::Previewing(winrt::Windows::Foundation::TypedEventHandler const& eventHandler) const { winrt::event_token eventCookie{}; 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_Previewing(*(void**)(&eventHandler), put_abi(eventCookie))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->add_Previewing(*(void**)(&eventHandler), put_abi(eventCookie))); } return eventCookie; } template auto consume_Windows_Graphics_Printing_IPrintTask::Previewing(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler const& eventHandler) const { return impl::make_event_revoker(this, Previewing(eventHandler)); } template auto consume_Windows_Graphics_Printing_IPrintTask::Previewing(winrt::event_token const& eventCookie) 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_Previewing(impl::bind_in(eventCookie)); } else { auto const _winrt_abi_type = *(abi_t**)this; _winrt_abi_type->remove_Previewing(impl::bind_in(eventCookie)); } } template auto consume_Windows_Graphics_Printing_IPrintTask::Submitting(winrt::Windows::Foundation::TypedEventHandler const& eventHandler) const { winrt::event_token eventCookie{}; 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_Submitting(*(void**)(&eventHandler), put_abi(eventCookie))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->add_Submitting(*(void**)(&eventHandler), put_abi(eventCookie))); } return eventCookie; } template auto consume_Windows_Graphics_Printing_IPrintTask::Submitting(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler const& eventHandler) const { return impl::make_event_revoker(this, Submitting(eventHandler)); } template auto consume_Windows_Graphics_Printing_IPrintTask::Submitting(winrt::event_token const& eventCookie) 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_Submitting(impl::bind_in(eventCookie)); } else { auto const _winrt_abi_type = *(abi_t**)this; _winrt_abi_type->remove_Submitting(impl::bind_in(eventCookie)); } } template auto consume_Windows_Graphics_Printing_IPrintTask::Progressing(winrt::Windows::Foundation::TypedEventHandler const& eventHandler) const { winrt::event_token eventCookie{}; 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_Progressing(*(void**)(&eventHandler), put_abi(eventCookie))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->add_Progressing(*(void**)(&eventHandler), put_abi(eventCookie))); } return eventCookie; } template auto consume_Windows_Graphics_Printing_IPrintTask::Progressing(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler const& eventHandler) const { return impl::make_event_revoker(this, Progressing(eventHandler)); } template auto consume_Windows_Graphics_Printing_IPrintTask::Progressing(winrt::event_token const& eventCookie) 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_Progressing(impl::bind_in(eventCookie)); } else { auto const _winrt_abi_type = *(abi_t**)this; _winrt_abi_type->remove_Progressing(impl::bind_in(eventCookie)); } } template auto consume_Windows_Graphics_Printing_IPrintTask::Completed(winrt::Windows::Foundation::TypedEventHandler const& eventHandler) const { winrt::event_token eventCookie{}; 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_Completed(*(void**)(&eventHandler), put_abi(eventCookie))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->add_Completed(*(void**)(&eventHandler), put_abi(eventCookie))); } return eventCookie; } template auto consume_Windows_Graphics_Printing_IPrintTask::Completed(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler const& eventHandler) const { return impl::make_event_revoker(this, Completed(eventHandler)); } template auto consume_Windows_Graphics_Printing_IPrintTask::Completed(winrt::event_token const& eventCookie) 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_Completed(impl::bind_in(eventCookie)); } else { auto const _winrt_abi_type = *(abi_t**)this; _winrt_abi_type->remove_Completed(impl::bind_in(eventCookie)); } } template auto consume_Windows_Graphics_Printing_IPrintTask2::IsPreviewEnabled(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_IsPreviewEnabled(value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_IsPreviewEnabled(value)); } } template auto consume_Windows_Graphics_Printing_IPrintTask2::IsPreviewEnabled() 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_IsPreviewEnabled(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_IsPreviewEnabled(&value)); } return value; } template auto consume_Windows_Graphics_Printing_IPrintTaskCompletedEventArgs::Completion() const { winrt::Windows::Graphics::Printing::PrintTaskCompletion 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_Completion(reinterpret_cast(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Completion(reinterpret_cast(&value))); } return value; } template auto consume_Windows_Graphics_Printing_IPrintTaskOptions::Bordering(winrt::Windows::Graphics::Printing::PrintBordering 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_Bordering(static_cast(value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_Bordering(static_cast(value))); } } template auto consume_Windows_Graphics_Printing_IPrintTaskOptions::Bordering() const { winrt::Windows::Graphics::Printing::PrintBordering 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_Bordering(reinterpret_cast(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Bordering(reinterpret_cast(&value))); } return value; } template auto consume_Windows_Graphics_Printing_IPrintTaskOptions::GetPagePrintTicket(winrt::Windows::Graphics::Printing::PrintPageInfo const& printPageInfo) const { void* printTicket{}; 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->GetPagePrintTicket(*(void**)(&printPageInfo), &printTicket)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->GetPagePrintTicket(*(void**)(&printPageInfo), &printTicket)); } return winrt::Windows::Storage::Streams::IRandomAccessStream{ printTicket, take_ownership_from_abi }; } template auto consume_Windows_Graphics_Printing_IPrintTaskOptions2::PageRangeOptions() 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_PageRangeOptions(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_PageRangeOptions(&value)); } return winrt::Windows::Graphics::Printing::PrintPageRangeOptions{ value, take_ownership_from_abi }; } template auto consume_Windows_Graphics_Printing_IPrintTaskOptions2::CustomPageRanges() 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_CustomPageRanges(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_CustomPageRanges(&value)); } return winrt::Windows::Foundation::Collections::IVector{ value, take_ownership_from_abi }; } template auto consume_Windows_Graphics_Printing_IPrintTaskOptionsCore::GetPageDescription(uint32_t jobPageNumber) const { winrt::Windows::Graphics::Printing::PrintPageDescription description{}; 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->GetPageDescription(jobPageNumber, put_abi(description))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->GetPageDescription(jobPageNumber, put_abi(description))); } return description; } template auto consume_Windows_Graphics_Printing_IPrintTaskOptionsCoreProperties::MediaSize(winrt::Windows::Graphics::Printing::PrintMediaSize 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_MediaSize(static_cast(value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_MediaSize(static_cast(value))); } } template auto consume_Windows_Graphics_Printing_IPrintTaskOptionsCoreProperties::MediaSize() const { winrt::Windows::Graphics::Printing::PrintMediaSize 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_MediaSize(reinterpret_cast(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_MediaSize(reinterpret_cast(&value))); } return value; } template auto consume_Windows_Graphics_Printing_IPrintTaskOptionsCoreProperties::MediaType(winrt::Windows::Graphics::Printing::PrintMediaType 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_MediaType(static_cast(value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_MediaType(static_cast(value))); } } template auto consume_Windows_Graphics_Printing_IPrintTaskOptionsCoreProperties::MediaType() const { winrt::Windows::Graphics::Printing::PrintMediaType 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_MediaType(reinterpret_cast(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_MediaType(reinterpret_cast(&value))); } return value; } template auto consume_Windows_Graphics_Printing_IPrintTaskOptionsCoreProperties::Orientation(winrt::Windows::Graphics::Printing::PrintOrientation 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_Orientation(static_cast(value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_Orientation(static_cast(value))); } } template auto consume_Windows_Graphics_Printing_IPrintTaskOptionsCoreProperties::Orientation() const { winrt::Windows::Graphics::Printing::PrintOrientation 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_Orientation(reinterpret_cast(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Orientation(reinterpret_cast(&value))); } return value; } template auto consume_Windows_Graphics_Printing_IPrintTaskOptionsCoreProperties::PrintQuality(winrt::Windows::Graphics::Printing::PrintQuality 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_PrintQuality(static_cast(value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_PrintQuality(static_cast(value))); } } template auto consume_Windows_Graphics_Printing_IPrintTaskOptionsCoreProperties::PrintQuality() const { winrt::Windows::Graphics::Printing::PrintQuality 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_PrintQuality(reinterpret_cast(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_PrintQuality(reinterpret_cast(&value))); } return value; } template auto consume_Windows_Graphics_Printing_IPrintTaskOptionsCoreProperties::ColorMode(winrt::Windows::Graphics::Printing::PrintColorMode 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_ColorMode(static_cast(value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_ColorMode(static_cast(value))); } } template auto consume_Windows_Graphics_Printing_IPrintTaskOptionsCoreProperties::ColorMode() const { winrt::Windows::Graphics::Printing::PrintColorMode 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_ColorMode(reinterpret_cast(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_ColorMode(reinterpret_cast(&value))); } return value; } template auto consume_Windows_Graphics_Printing_IPrintTaskOptionsCoreProperties::Duplex(winrt::Windows::Graphics::Printing::PrintDuplex 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_Duplex(static_cast(value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_Duplex(static_cast(value))); } } template auto consume_Windows_Graphics_Printing_IPrintTaskOptionsCoreProperties::Duplex() const { winrt::Windows::Graphics::Printing::PrintDuplex 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_Duplex(reinterpret_cast(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Duplex(reinterpret_cast(&value))); } return value; } template auto consume_Windows_Graphics_Printing_IPrintTaskOptionsCoreProperties::Collation(winrt::Windows::Graphics::Printing::PrintCollation 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_Collation(static_cast(value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_Collation(static_cast(value))); } } template auto consume_Windows_Graphics_Printing_IPrintTaskOptionsCoreProperties::Collation() const { winrt::Windows::Graphics::Printing::PrintCollation 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_Collation(reinterpret_cast(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Collation(reinterpret_cast(&value))); } return value; } template auto consume_Windows_Graphics_Printing_IPrintTaskOptionsCoreProperties::Staple(winrt::Windows::Graphics::Printing::PrintStaple 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_Staple(static_cast(value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_Staple(static_cast(value))); } } template auto consume_Windows_Graphics_Printing_IPrintTaskOptionsCoreProperties::Staple() const { winrt::Windows::Graphics::Printing::PrintStaple 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_Staple(reinterpret_cast(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Staple(reinterpret_cast(&value))); } return value; } template auto consume_Windows_Graphics_Printing_IPrintTaskOptionsCoreProperties::HolePunch(winrt::Windows::Graphics::Printing::PrintHolePunch 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_HolePunch(static_cast(value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_HolePunch(static_cast(value))); } } template auto consume_Windows_Graphics_Printing_IPrintTaskOptionsCoreProperties::HolePunch() const { winrt::Windows::Graphics::Printing::PrintHolePunch 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_HolePunch(reinterpret_cast(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_HolePunch(reinterpret_cast(&value))); } return value; } template auto consume_Windows_Graphics_Printing_IPrintTaskOptionsCoreProperties::Binding(winrt::Windows::Graphics::Printing::PrintBinding 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_Binding(static_cast(value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_Binding(static_cast(value))); } } template auto consume_Windows_Graphics_Printing_IPrintTaskOptionsCoreProperties::Binding() const { winrt::Windows::Graphics::Printing::PrintBinding 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_Binding(reinterpret_cast(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Binding(reinterpret_cast(&value))); } return value; } template auto consume_Windows_Graphics_Printing_IPrintTaskOptionsCoreProperties::MinCopies() 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_MinCopies(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_MinCopies(&value)); } return value; } template auto consume_Windows_Graphics_Printing_IPrintTaskOptionsCoreProperties::MaxCopies() 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_MaxCopies(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_MaxCopies(&value)); } return value; } template auto consume_Windows_Graphics_Printing_IPrintTaskOptionsCoreProperties::NumberOfCopies(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_NumberOfCopies(value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_NumberOfCopies(value)); } } template auto consume_Windows_Graphics_Printing_IPrintTaskOptionsCoreProperties::NumberOfCopies() 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_NumberOfCopies(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_NumberOfCopies(&value)); } return value; } template auto consume_Windows_Graphics_Printing_IPrintTaskOptionsCoreUIConfiguration::DisplayedOptions() 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_DisplayedOptions(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_DisplayedOptions(&value)); } return winrt::Windows::Foundation::Collections::IVector{ value, take_ownership_from_abi }; } template auto consume_Windows_Graphics_Printing_IPrintTaskProgressingEventArgs::DocumentPageCount() 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_DocumentPageCount(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_DocumentPageCount(&value)); } return value; } template auto consume_Windows_Graphics_Printing_IPrintTaskRequest::Deadline() const { winrt::Windows::Foundation::DateTime 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_Deadline(put_abi(value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Deadline(put_abi(value))); } return value; } template auto consume_Windows_Graphics_Printing_IPrintTaskRequest::CreatePrintTask(param::hstring const& title, winrt::Windows::Graphics::Printing::PrintTaskSourceRequestedHandler const& handler) const { void* task{}; 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->CreatePrintTask(*(void**)(&title), *(void**)(&handler), &task)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->CreatePrintTask(*(void**)(&title), *(void**)(&handler), &task)); } return winrt::Windows::Graphics::Printing::PrintTask{ task, take_ownership_from_abi }; } template auto consume_Windows_Graphics_Printing_IPrintTaskRequest::GetDeferral() const { void* deferral{}; 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->GetDeferral(&deferral)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->GetDeferral(&deferral)); } return winrt::Windows::Graphics::Printing::PrintTaskRequestedDeferral{ deferral, take_ownership_from_abi }; } template auto consume_Windows_Graphics_Printing_IPrintTaskRequestedDeferral::Complete() 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->Complete()); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->Complete()); } } template auto consume_Windows_Graphics_Printing_IPrintTaskRequestedEventArgs::Request() 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_Request(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Request(&value)); } return winrt::Windows::Graphics::Printing::PrintTaskRequest{ value, take_ownership_from_abi }; } template auto consume_Windows_Graphics_Printing_IPrintTaskSourceRequestedArgs::Deadline() const { winrt::Windows::Foundation::DateTime 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_Deadline(put_abi(value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Deadline(put_abi(value))); } return value; } template auto consume_Windows_Graphics_Printing_IPrintTaskSourceRequestedArgs::SetSource(winrt::Windows::Graphics::Printing::IPrintDocumentSource const& source) 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->SetSource(*(void**)(&source))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->SetSource(*(void**)(&source))); } } template auto consume_Windows_Graphics_Printing_IPrintTaskSourceRequestedArgs::GetDeferral() const { void* deferral{}; 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->GetDeferral(&deferral)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->GetDeferral(&deferral)); } return winrt::Windows::Graphics::Printing::PrintTaskSourceRequestedDeferral{ deferral, take_ownership_from_abi }; } template auto consume_Windows_Graphics_Printing_IPrintTaskSourceRequestedDeferral::Complete() 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->Complete()); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->Complete()); } } template auto consume_Windows_Graphics_Printing_IPrintTaskTargetDeviceSupport::IsPrinterTargetEnabled(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_IsPrinterTargetEnabled(value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_IsPrinterTargetEnabled(value)); } } template auto consume_Windows_Graphics_Printing_IPrintTaskTargetDeviceSupport::IsPrinterTargetEnabled() 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_IsPrinterTargetEnabled(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_IsPrinterTargetEnabled(&value)); } return value; } template auto consume_Windows_Graphics_Printing_IPrintTaskTargetDeviceSupport::Is3DManufacturingTargetEnabled(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_Is3DManufacturingTargetEnabled(value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_Is3DManufacturingTargetEnabled(value)); } } template auto consume_Windows_Graphics_Printing_IPrintTaskTargetDeviceSupport::Is3DManufacturingTargetEnabled() 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_Is3DManufacturingTargetEnabled(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Is3DManufacturingTargetEnabled(&value)); } return value; } template auto consume_Windows_Graphics_Printing_IStandardPrintTaskOptionsStatic::MediaSize() 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_MediaSize(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_MediaSize(&value)); } return hstring{ value, take_ownership_from_abi }; } template auto consume_Windows_Graphics_Printing_IStandardPrintTaskOptionsStatic::MediaType() 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_MediaType(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_MediaType(&value)); } return hstring{ value, take_ownership_from_abi }; } template auto consume_Windows_Graphics_Printing_IStandardPrintTaskOptionsStatic::Orientation() 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_Orientation(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Orientation(&value)); } return hstring{ value, take_ownership_from_abi }; } template auto consume_Windows_Graphics_Printing_IStandardPrintTaskOptionsStatic::PrintQuality() 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_PrintQuality(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_PrintQuality(&value)); } return hstring{ value, take_ownership_from_abi }; } template auto consume_Windows_Graphics_Printing_IStandardPrintTaskOptionsStatic::ColorMode() 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_ColorMode(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_ColorMode(&value)); } return hstring{ value, take_ownership_from_abi }; } template auto consume_Windows_Graphics_Printing_IStandardPrintTaskOptionsStatic::Duplex() 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_Duplex(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Duplex(&value)); } return hstring{ value, take_ownership_from_abi }; } template auto consume_Windows_Graphics_Printing_IStandardPrintTaskOptionsStatic::Collation() 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_Collation(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Collation(&value)); } return hstring{ value, take_ownership_from_abi }; } template auto consume_Windows_Graphics_Printing_IStandardPrintTaskOptionsStatic::Staple() 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_Staple(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Staple(&value)); } return hstring{ value, take_ownership_from_abi }; } template auto consume_Windows_Graphics_Printing_IStandardPrintTaskOptionsStatic::HolePunch() 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_HolePunch(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_HolePunch(&value)); } return hstring{ value, take_ownership_from_abi }; } template auto consume_Windows_Graphics_Printing_IStandardPrintTaskOptionsStatic::Binding() 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_Binding(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Binding(&value)); } return hstring{ value, take_ownership_from_abi }; } template auto consume_Windows_Graphics_Printing_IStandardPrintTaskOptionsStatic::Copies() 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_Copies(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Copies(&value)); } return hstring{ value, take_ownership_from_abi }; } template auto consume_Windows_Graphics_Printing_IStandardPrintTaskOptionsStatic::NUp() 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_NUp(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_NUp(&value)); } return hstring{ value, take_ownership_from_abi }; } template auto consume_Windows_Graphics_Printing_IStandardPrintTaskOptionsStatic::InputBin() 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_InputBin(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_InputBin(&value)); } return hstring{ value, take_ownership_from_abi }; } template auto consume_Windows_Graphics_Printing_IStandardPrintTaskOptionsStatic2::Bordering() 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_Bordering(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Bordering(&value)); } return hstring{ value, take_ownership_from_abi }; } template auto consume_Windows_Graphics_Printing_IStandardPrintTaskOptionsStatic3::CustomPageRanges() 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_CustomPageRanges(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_CustomPageRanges(&value)); } return hstring{ value, take_ownership_from_abi }; } template struct delegate final : implements_delegate { delegate(H&& handler) : implements_delegate(std::forward(handler)) {} int32_t __stdcall Invoke(void* args) noexcept final try { (*this)(*reinterpret_cast(&args)); return 0; } catch (...) { return to_hresult(); } }; template struct produce : produce_base { }; #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall add_PrintTaskRequested(void* eventHandler, winrt::event_token* eventCookie) noexcept final try { zero_abi(eventCookie); typename D::abi_guard guard(this->shim()); *eventCookie = detach_from(this->shim().PrintTaskRequested(*reinterpret_cast const*>(&eventHandler))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall remove_PrintTaskRequested(winrt::event_token eventCookie) noexcept final { typename D::abi_guard guard(this->shim()); this->shim().PrintTaskRequested(*reinterpret_cast(&eventCookie)); return 0; } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall GetForCurrentView(void** printingManager) noexcept final try { clear_abi(printingManager); typename D::abi_guard guard(this->shim()); *printingManager = detach_from(this->shim().GetForCurrentView()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall ShowPrintUIAsync(void** operation) noexcept final try { clear_abi(operation); typename D::abi_guard guard(this->shim()); *operation = detach_from>(this->shim().ShowPrintUIAsync()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall IsSupported(bool* result) noexcept final try { typename D::abi_guard guard(this->shim()); *result = detach_from(this->shim().IsSupported()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall put_MediaSize(int32_t value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().MediaSize(*reinterpret_cast(&value)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_MediaSize(int32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().MediaSize()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_PageSize(winrt::Windows::Foundation::Size value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().PageSize(*reinterpret_cast(&value)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_PageSize(winrt::Windows::Foundation::Size* value) noexcept final try { zero_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().PageSize()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_DpiX(uint32_t value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().DpiX(value); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_DpiX(uint32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().DpiX()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_DpiY(uint32_t value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().DpiY(value); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_DpiY(uint32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().DpiY()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_Orientation(int32_t value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().Orientation(*reinterpret_cast(&value)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_Orientation(int32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Orientation()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_FirstPageNumber(int32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().FirstPageNumber()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_LastPageNumber(int32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().LastPageNumber()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall Create(int32_t firstPage, int32_t lastPage, void** result) noexcept final try { clear_abi(result); typename D::abi_guard guard(this->shim()); *result = detach_from(this->shim().Create(firstPage, lastPage)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall CreateWithSinglePage(int32_t page, void** result) noexcept final try { clear_abi(result); typename D::abi_guard guard(this->shim()); *result = detach_from(this->shim().CreateWithSinglePage(page)); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall put_AllowAllPages(bool value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().AllowAllPages(value); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_AllowAllPages(bool* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().AllowAllPages()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_AllowCurrentPage(bool value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().AllowCurrentPage(value); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_AllowCurrentPage(bool* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().AllowCurrentPage()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_AllowCustomSetOfPages(bool value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().AllowCustomSetOfPages(value); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_AllowCustomSetOfPages(bool* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().AllowCustomSetOfPages()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_Properties(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Properties()); 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 get_Options(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Options()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall add_Previewing(void* eventHandler, winrt::event_token* eventCookie) noexcept final try { zero_abi(eventCookie); typename D::abi_guard guard(this->shim()); *eventCookie = detach_from(this->shim().Previewing(*reinterpret_cast const*>(&eventHandler))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall remove_Previewing(winrt::event_token eventCookie) noexcept final { typename D::abi_guard guard(this->shim()); this->shim().Previewing(*reinterpret_cast(&eventCookie)); return 0; } int32_t __stdcall add_Submitting(void* eventHandler, winrt::event_token* eventCookie) noexcept final try { zero_abi(eventCookie); typename D::abi_guard guard(this->shim()); *eventCookie = detach_from(this->shim().Submitting(*reinterpret_cast const*>(&eventHandler))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall remove_Submitting(winrt::event_token eventCookie) noexcept final { typename D::abi_guard guard(this->shim()); this->shim().Submitting(*reinterpret_cast(&eventCookie)); return 0; } int32_t __stdcall add_Progressing(void* eventHandler, winrt::event_token* eventCookie) noexcept final try { zero_abi(eventCookie); typename D::abi_guard guard(this->shim()); *eventCookie = detach_from(this->shim().Progressing(*reinterpret_cast const*>(&eventHandler))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall remove_Progressing(winrt::event_token eventCookie) noexcept final { typename D::abi_guard guard(this->shim()); this->shim().Progressing(*reinterpret_cast(&eventCookie)); return 0; } int32_t __stdcall add_Completed(void* eventHandler, winrt::event_token* eventCookie) noexcept final try { zero_abi(eventCookie); typename D::abi_guard guard(this->shim()); *eventCookie = detach_from(this->shim().Completed(*reinterpret_cast const*>(&eventHandler))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall remove_Completed(winrt::event_token eventCookie) noexcept final { typename D::abi_guard guard(this->shim()); this->shim().Completed(*reinterpret_cast(&eventCookie)); return 0; } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall put_IsPreviewEnabled(bool value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().IsPreviewEnabled(value); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_IsPreviewEnabled(bool* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().IsPreviewEnabled()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_Completion(int32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Completion()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall put_Bordering(int32_t value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().Bordering(*reinterpret_cast(&value)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_Bordering(int32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Bordering()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall GetPagePrintTicket(void* printPageInfo, void** printTicket) noexcept final try { clear_abi(printTicket); typename D::abi_guard guard(this->shim()); *printTicket = detach_from(this->shim().GetPagePrintTicket(*reinterpret_cast(&printPageInfo))); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_PageRangeOptions(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().PageRangeOptions()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_CustomPageRanges(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from>(this->shim().CustomPageRanges()); return 0; } catch (...) { return to_hresult(); } }; #endif template struct produce : produce_base { int32_t __stdcall GetPageDescription(uint32_t jobPageNumber, struct struct_Windows_Graphics_Printing_PrintPageDescription* description) noexcept final try { zero_abi(description); typename D::abi_guard guard(this->shim()); *description = detach_from(this->shim().GetPageDescription(jobPageNumber)); return 0; } catch (...) { return to_hresult(); } }; template struct produce : produce_base { int32_t __stdcall put_MediaSize(int32_t value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().MediaSize(*reinterpret_cast(&value)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_MediaSize(int32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().MediaSize()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_MediaType(int32_t value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().MediaType(*reinterpret_cast(&value)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_MediaType(int32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().MediaType()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_Orientation(int32_t value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().Orientation(*reinterpret_cast(&value)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_Orientation(int32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Orientation()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_PrintQuality(int32_t value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().PrintQuality(*reinterpret_cast(&value)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_PrintQuality(int32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().PrintQuality()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_ColorMode(int32_t value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().ColorMode(*reinterpret_cast(&value)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_ColorMode(int32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().ColorMode()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_Duplex(int32_t value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().Duplex(*reinterpret_cast(&value)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_Duplex(int32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Duplex()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_Collation(int32_t value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().Collation(*reinterpret_cast(&value)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_Collation(int32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Collation()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_Staple(int32_t value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().Staple(*reinterpret_cast(&value)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_Staple(int32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Staple()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_HolePunch(int32_t value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().HolePunch(*reinterpret_cast(&value)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_HolePunch(int32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().HolePunch()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_Binding(int32_t value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().Binding(*reinterpret_cast(&value)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_Binding(int32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Binding()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_MinCopies(uint32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().MinCopies()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_MaxCopies(uint32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().MaxCopies()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_NumberOfCopies(uint32_t value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().NumberOfCopies(value); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_NumberOfCopies(uint32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().NumberOfCopies()); return 0; } catch (...) { return to_hresult(); } }; template struct produce : produce_base { int32_t __stdcall get_DisplayedOptions(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from>(this->shim().DisplayedOptions()); return 0; } catch (...) { return to_hresult(); } }; #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_DocumentPageCount(uint32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().DocumentPageCount()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_Deadline(int64_t* value) noexcept final try { zero_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Deadline()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall CreatePrintTask(void* title, void* handler, void** task) noexcept final try { clear_abi(task); typename D::abi_guard guard(this->shim()); *task = detach_from(this->shim().CreatePrintTask(*reinterpret_cast(&title), *reinterpret_cast(&handler))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall GetDeferral(void** deferral) noexcept final try { clear_abi(deferral); typename D::abi_guard guard(this->shim()); *deferral = detach_from(this->shim().GetDeferral()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall Complete() noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().Complete(); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_Request(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Request()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_Deadline(int64_t* value) noexcept final try { zero_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Deadline()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall SetSource(void* source) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().SetSource(*reinterpret_cast(&source)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall GetDeferral(void** deferral) noexcept final try { clear_abi(deferral); typename D::abi_guard guard(this->shim()); *deferral = detach_from(this->shim().GetDeferral()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall Complete() noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().Complete(); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall put_IsPrinterTargetEnabled(bool value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().IsPrinterTargetEnabled(value); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_IsPrinterTargetEnabled(bool* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().IsPrinterTargetEnabled()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_Is3DManufacturingTargetEnabled(bool value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().Is3DManufacturingTargetEnabled(value); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_Is3DManufacturingTargetEnabled(bool* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Is3DManufacturingTargetEnabled()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_MediaSize(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().MediaSize()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_MediaType(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().MediaType()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_Orientation(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Orientation()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_PrintQuality(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().PrintQuality()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_ColorMode(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().ColorMode()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_Duplex(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Duplex()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_Collation(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Collation()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_Staple(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Staple()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_HolePunch(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().HolePunch()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_Binding(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Binding()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_Copies(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Copies()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_NUp(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().NUp()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_InputBin(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().InputBin()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_Bordering(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Bordering()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_CustomPageRanges(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().CustomPageRanges()); return 0; } catch (...) { return to_hresult(); } }; #endif } WINRT_EXPORT namespace winrt::Windows::Graphics::Printing { inline auto PrintManager::GetForCurrentView() { return impl::call_factory_cast([](IPrintManagerStatic const& f) { return f.GetForCurrentView(); }); } inline auto PrintManager::ShowPrintUIAsync() { return impl::call_factory_cast(*)(IPrintManagerStatic const&), PrintManager, IPrintManagerStatic>([](IPrintManagerStatic const& f) { return f.ShowPrintUIAsync(); }); } inline auto PrintManager::IsSupported() { return impl::call_factory_cast([](IPrintManagerStatic2 const& f) { return f.IsSupported(); }); } inline PrintPageInfo::PrintPageInfo() : PrintPageInfo(impl::call_factory_cast([](winrt::Windows::Foundation::IActivationFactory const& f) { return f.template ActivateInstance(); })) { } inline PrintPageRange::PrintPageRange(int32_t firstPage, int32_t lastPage) : PrintPageRange(impl::call_factory([&](IPrintPageRangeFactory const& f) { return f.Create(firstPage, lastPage); })) { } inline PrintPageRange::PrintPageRange(int32_t page) : PrintPageRange(impl::call_factory([&](IPrintPageRangeFactory const& f) { return f.CreateWithSinglePage(page); })) { } inline auto StandardPrintTaskOptions::MediaSize() { return impl::call_factory_cast([](IStandardPrintTaskOptionsStatic const& f) { return f.MediaSize(); }); } inline auto StandardPrintTaskOptions::MediaType() { return impl::call_factory_cast([](IStandardPrintTaskOptionsStatic const& f) { return f.MediaType(); }); } inline auto StandardPrintTaskOptions::Orientation() { return impl::call_factory_cast([](IStandardPrintTaskOptionsStatic const& f) { return f.Orientation(); }); } inline auto StandardPrintTaskOptions::PrintQuality() { return impl::call_factory_cast([](IStandardPrintTaskOptionsStatic const& f) { return f.PrintQuality(); }); } inline auto StandardPrintTaskOptions::ColorMode() { return impl::call_factory_cast([](IStandardPrintTaskOptionsStatic const& f) { return f.ColorMode(); }); } inline auto StandardPrintTaskOptions::Duplex() { return impl::call_factory_cast([](IStandardPrintTaskOptionsStatic const& f) { return f.Duplex(); }); } inline auto StandardPrintTaskOptions::Collation() { return impl::call_factory_cast([](IStandardPrintTaskOptionsStatic const& f) { return f.Collation(); }); } inline auto StandardPrintTaskOptions::Staple() { return impl::call_factory_cast([](IStandardPrintTaskOptionsStatic const& f) { return f.Staple(); }); } inline auto StandardPrintTaskOptions::HolePunch() { return impl::call_factory_cast([](IStandardPrintTaskOptionsStatic const& f) { return f.HolePunch(); }); } inline auto StandardPrintTaskOptions::Binding() { return impl::call_factory_cast([](IStandardPrintTaskOptionsStatic const& f) { return f.Binding(); }); } inline auto StandardPrintTaskOptions::Copies() { return impl::call_factory_cast([](IStandardPrintTaskOptionsStatic const& f) { return f.Copies(); }); } inline auto StandardPrintTaskOptions::NUp() { return impl::call_factory_cast([](IStandardPrintTaskOptionsStatic const& f) { return f.NUp(); }); } inline auto StandardPrintTaskOptions::InputBin() { return impl::call_factory_cast([](IStandardPrintTaskOptionsStatic const& f) { return f.InputBin(); }); } inline auto StandardPrintTaskOptions::Bordering() { return impl::call_factory_cast([](IStandardPrintTaskOptionsStatic2 const& f) { return f.Bordering(); }); } inline auto StandardPrintTaskOptions::CustomPageRanges() { return impl::call_factory_cast([](IStandardPrintTaskOptionsStatic3 const& f) { return f.CustomPageRanges(); }); } template PrintTaskSourceRequestedHandler::PrintTaskSourceRequestedHandler(L handler) : PrintTaskSourceRequestedHandler(impl::make_delegate(std::forward(handler))) { } template PrintTaskSourceRequestedHandler::PrintTaskSourceRequestedHandler(F* handler) : PrintTaskSourceRequestedHandler([=](auto&&... args) { return handler(args...); }) { } template PrintTaskSourceRequestedHandler::PrintTaskSourceRequestedHandler(O* object, M method) : PrintTaskSourceRequestedHandler([=](auto&&... args) { return ((*object).*(method))(args...); }) { } template PrintTaskSourceRequestedHandler::PrintTaskSourceRequestedHandler(com_ptr&& object, M method) : PrintTaskSourceRequestedHandler([o = std::move(object), method](auto&&... args) { return ((*o).*(method))(args...); }) { } template PrintTaskSourceRequestedHandler::PrintTaskSourceRequestedHandler(weak_ref&& object, LM&& lambda_or_method) : PrintTaskSourceRequestedHandler([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 PrintTaskSourceRequestedHandler::PrintTaskSourceRequestedHandler(std::shared_ptr&& object, M method) : PrintTaskSourceRequestedHandler([o = std::move(object), method](auto&&... args) { return ((*o).*(method))(args...); }) { } template PrintTaskSourceRequestedHandler::PrintTaskSourceRequestedHandler(std::weak_ptr&& object, LM&& lambda_or_method) : PrintTaskSourceRequestedHandler([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 PrintTaskSourceRequestedHandler::operator()(winrt::Windows::Graphics::Printing::PrintTaskSourceRequestedArgs const& args) const { check_hresult((*(impl::abi_t**)this)->Invoke(*(void**)(&args))); } } 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 {}; #endif #ifdef __cpp_lib_format #endif } #endif