// WARNING: Please don't edit this file. It was generated by C++/WinRT v2.0.240405.15 #pragma once #ifndef WINRT_Microsoft_Windows_Widgets_Providers_H #define WINRT_Microsoft_Windows_Widgets_Providers_H #include "winrt/base.h" static_assert(winrt::check_version(CPPWINRT_VERSION, "2.0.240405.15"), "Mismatched C++/WinRT headers."); #define CPPWINRT_VERSION "2.0.240405.15" #include "winrt/Microsoft.Windows.Widgets.h" #include "winrt/impl/Microsoft.Windows.Widgets.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/Microsoft.Windows.Widgets.Providers.2.h" namespace winrt::impl { template auto consume_Microsoft_Windows_Widgets_Providers_IWidgetActionInvokedArgs::WidgetContext() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Windows::Widgets::Providers::IWidgetActionInvokedArgs)->get_WidgetContext(&value)); return winrt::Microsoft::Windows::Widgets::Providers::WidgetContext{ value, take_ownership_from_abi }; } template auto consume_Microsoft_Windows_Widgets_Providers_IWidgetActionInvokedArgs::Verb() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Windows::Widgets::Providers::IWidgetActionInvokedArgs)->get_Verb(&value)); return hstring{ value, take_ownership_from_abi }; } template auto consume_Microsoft_Windows_Widgets_Providers_IWidgetActionInvokedArgs::Data() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Windows::Widgets::Providers::IWidgetActionInvokedArgs)->get_Data(&value)); return hstring{ value, take_ownership_from_abi }; } template auto consume_Microsoft_Windows_Widgets_Providers_IWidgetActionInvokedArgs::CustomState() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Windows::Widgets::Providers::IWidgetActionInvokedArgs)->get_CustomState(&value)); return hstring{ value, take_ownership_from_abi }; } template auto consume_Microsoft_Windows_Widgets_Providers_IWidgetAnalyticsInfoReportedArgs::WidgetContext() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Windows::Widgets::Providers::IWidgetAnalyticsInfoReportedArgs)->get_WidgetContext(&value)); return winrt::Microsoft::Windows::Widgets::Providers::WidgetContext{ value, take_ownership_from_abi }; } template auto consume_Microsoft_Windows_Widgets_Providers_IWidgetAnalyticsInfoReportedArgs::AnalyticsJson() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Windows::Widgets::Providers::IWidgetAnalyticsInfoReportedArgs)->get_AnalyticsJson(&value)); return hstring{ value, take_ownership_from_abi }; } template auto consume_Microsoft_Windows_Widgets_Providers_IWidgetContext::Id() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Windows::Widgets::Providers::IWidgetContext)->get_Id(&value)); return hstring{ value, take_ownership_from_abi }; } template auto consume_Microsoft_Windows_Widgets_Providers_IWidgetContext::DefinitionId() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Windows::Widgets::Providers::IWidgetContext)->get_DefinitionId(&value)); return hstring{ value, take_ownership_from_abi }; } template auto consume_Microsoft_Windows_Widgets_Providers_IWidgetContext::Size() const { winrt::Microsoft::Windows::Widgets::WidgetSize value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Windows::Widgets::Providers::IWidgetContext)->get_Size(reinterpret_cast(&value))); return value; } template auto consume_Microsoft_Windows_Widgets_Providers_IWidgetContext::IsActive() const { bool value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Windows::Widgets::Providers::IWidgetContext)->get_IsActive(&value)); return value; } template auto consume_Microsoft_Windows_Widgets_Providers_IWidgetContextChangedArgs::WidgetContext() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Windows::Widgets::Providers::IWidgetContextChangedArgs)->get_WidgetContext(&value)); return winrt::Microsoft::Windows::Widgets::Providers::WidgetContext{ value, take_ownership_from_abi }; } template auto consume_Microsoft_Windows_Widgets_Providers_IWidgetCustomizationRequestedArgs::WidgetContext() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Windows::Widgets::Providers::IWidgetCustomizationRequestedArgs)->get_WidgetContext(&value)); return winrt::Microsoft::Windows::Widgets::Providers::WidgetContext{ value, take_ownership_from_abi }; } template auto consume_Microsoft_Windows_Widgets_Providers_IWidgetCustomizationRequestedArgs::CustomState() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Windows::Widgets::Providers::IWidgetCustomizationRequestedArgs)->get_CustomState(&value)); return hstring{ value, take_ownership_from_abi }; } template auto consume_Microsoft_Windows_Widgets_Providers_IWidgetErrorInfoReportedArgs::WidgetContext() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Windows::Widgets::Providers::IWidgetErrorInfoReportedArgs)->get_WidgetContext(&value)); return winrt::Microsoft::Windows::Widgets::Providers::WidgetContext{ value, take_ownership_from_abi }; } template auto consume_Microsoft_Windows_Widgets_Providers_IWidgetErrorInfoReportedArgs::ErrorJson() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Windows::Widgets::Providers::IWidgetErrorInfoReportedArgs)->get_ErrorJson(&value)); return hstring{ value, take_ownership_from_abi }; } template auto consume_Microsoft_Windows_Widgets_Providers_IWidgetInfo::WidgetContext() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Windows::Widgets::Providers::IWidgetInfo)->get_WidgetContext(&value)); return winrt::Microsoft::Windows::Widgets::Providers::WidgetContext{ value, take_ownership_from_abi }; } template auto consume_Microsoft_Windows_Widgets_Providers_IWidgetInfo::Template() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Windows::Widgets::Providers::IWidgetInfo)->get_Template(&value)); return hstring{ value, take_ownership_from_abi }; } template auto consume_Microsoft_Windows_Widgets_Providers_IWidgetInfo::Data() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Windows::Widgets::Providers::IWidgetInfo)->get_Data(&value)); return hstring{ value, take_ownership_from_abi }; } template auto consume_Microsoft_Windows_Widgets_Providers_IWidgetInfo::CustomState() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Windows::Widgets::Providers::IWidgetInfo)->get_CustomState(&value)); return hstring{ value, take_ownership_from_abi }; } template auto consume_Microsoft_Windows_Widgets_Providers_IWidgetInfo::LastUpdateTime() const { winrt::Windows::Foundation::DateTime value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Windows::Widgets::Providers::IWidgetInfo)->get_LastUpdateTime(put_abi(value))); return value; } template auto consume_Microsoft_Windows_Widgets_Providers_IWidgetInfo2::IsPlaceholderContent() const { bool value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Windows::Widgets::Providers::IWidgetInfo2)->get_IsPlaceholderContent(&value)); return value; } template auto consume_Microsoft_Windows_Widgets_Providers_IWidgetManager::UpdateWidget(winrt::Microsoft::Windows::Widgets::Providers::WidgetUpdateRequestOptions const& widgetUpdateRequestOptions) const { check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Windows::Widgets::Providers::IWidgetManager)->UpdateWidget(*(void**)(&widgetUpdateRequestOptions))); } template auto consume_Microsoft_Windows_Widgets_Providers_IWidgetManager::GetWidgetIds() const { uint32_t result_impl_size{}; void** result{}; check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Windows::Widgets::Providers::IWidgetManager)->GetWidgetIds(&result_impl_size, &result)); return com_array{ result, result_impl_size, take_ownership_from_abi }; } template auto consume_Microsoft_Windows_Widgets_Providers_IWidgetManager::GetWidgetInfo(param::hstring const& widgetId) const { void* result{}; check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Windows::Widgets::Providers::IWidgetManager)->GetWidgetInfo(*(void**)(&widgetId), &result)); return winrt::Microsoft::Windows::Widgets::Providers::WidgetInfo{ result, take_ownership_from_abi }; } template auto consume_Microsoft_Windows_Widgets_Providers_IWidgetManager::GetWidgetInfos() const { uint32_t result_impl_size{}; void** result{}; check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Windows::Widgets::Providers::IWidgetManager)->GetWidgetInfos(&result_impl_size, &result)); return com_array{ result, result_impl_size, take_ownership_from_abi }; } template auto consume_Microsoft_Windows_Widgets_Providers_IWidgetManager::DeleteWidget(param::hstring const& widgetId) const { check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Windows::Widgets::Providers::IWidgetManager)->DeleteWidget(*(void**)(&widgetId))); } template auto consume_Microsoft_Windows_Widgets_Providers_IWidgetManager2::SendMessageToContent(param::hstring const& widgetId, param::hstring const& message) const { check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Windows::Widgets::Providers::IWidgetManager2)->SendMessageToContent(*(void**)(&widgetId), *(void**)(&message))); } template auto consume_Microsoft_Windows_Widgets_Providers_IWidgetManagerStatics::GetDefault() const { void* result{}; check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Windows::Widgets::Providers::IWidgetManagerStatics)->GetDefault(&result)); return winrt::Microsoft::Windows::Widgets::Providers::WidgetManager{ result, take_ownership_from_abi }; } template auto consume_Microsoft_Windows_Widgets_Providers_IWidgetMessageReceivedArgs::WidgetContext() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Windows::Widgets::Providers::IWidgetMessageReceivedArgs)->get_WidgetContext(&value)); return winrt::Microsoft::Windows::Widgets::Providers::WidgetContext{ value, take_ownership_from_abi }; } template auto consume_Microsoft_Windows_Widgets_Providers_IWidgetMessageReceivedArgs::Message() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Windows::Widgets::Providers::IWidgetMessageReceivedArgs)->get_Message(&value)); return hstring{ value, take_ownership_from_abi }; } template auto consume_Microsoft_Windows_Widgets_Providers_IWidgetProvider::CreateWidget(winrt::Microsoft::Windows::Widgets::Providers::WidgetContext const& widgetContext) const { check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Windows::Widgets::Providers::IWidgetProvider)->CreateWidget(*(void**)(&widgetContext))); } template auto consume_Microsoft_Windows_Widgets_Providers_IWidgetProvider::DeleteWidget(param::hstring const& widgetId, param::hstring const& customState) const { check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Windows::Widgets::Providers::IWidgetProvider)->DeleteWidget(*(void**)(&widgetId), *(void**)(&customState))); } template auto consume_Microsoft_Windows_Widgets_Providers_IWidgetProvider::OnActionInvoked(winrt::Microsoft::Windows::Widgets::Providers::WidgetActionInvokedArgs const& actionInvokedArgs) const { check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Windows::Widgets::Providers::IWidgetProvider)->OnActionInvoked(*(void**)(&actionInvokedArgs))); } template auto consume_Microsoft_Windows_Widgets_Providers_IWidgetProvider::OnWidgetContextChanged(winrt::Microsoft::Windows::Widgets::Providers::WidgetContextChangedArgs const& contextChangedArgs) const { check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Windows::Widgets::Providers::IWidgetProvider)->OnWidgetContextChanged(*(void**)(&contextChangedArgs))); } template auto consume_Microsoft_Windows_Widgets_Providers_IWidgetProvider::Activate(winrt::Microsoft::Windows::Widgets::Providers::WidgetContext const& widgetContext) const { check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Windows::Widgets::Providers::IWidgetProvider)->Activate(*(void**)(&widgetContext))); } template auto consume_Microsoft_Windows_Widgets_Providers_IWidgetProvider::Deactivate(param::hstring const& widgetId) const { check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Windows::Widgets::Providers::IWidgetProvider)->Deactivate(*(void**)(&widgetId))); } template auto consume_Microsoft_Windows_Widgets_Providers_IWidgetProvider2::OnCustomizationRequested(winrt::Microsoft::Windows::Widgets::Providers::WidgetCustomizationRequestedArgs const& customizationRequestedArgs) const { check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Windows::Widgets::Providers::IWidgetProvider2)->OnCustomizationRequested(*(void**)(&customizationRequestedArgs))); } template auto consume_Microsoft_Windows_Widgets_Providers_IWidgetProviderAnalytics::OnAnalyticsInfoReported(winrt::Microsoft::Windows::Widgets::Providers::WidgetAnalyticsInfoReportedArgs const& args) const { check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Windows::Widgets::Providers::IWidgetProviderAnalytics)->OnAnalyticsInfoReported(*(void**)(&args))); } template auto consume_Microsoft_Windows_Widgets_Providers_IWidgetProviderErrors::OnErrorInfoReported(winrt::Microsoft::Windows::Widgets::Providers::WidgetErrorInfoReportedArgs const& args) const { check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Windows::Widgets::Providers::IWidgetProviderErrors)->OnErrorInfoReported(*(void**)(&args))); } template auto consume_Microsoft_Windows_Widgets_Providers_IWidgetProviderMessage::OnMessageReceived(winrt::Microsoft::Windows::Widgets::Providers::WidgetMessageReceivedArgs const& args) const { check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Windows::Widgets::Providers::IWidgetProviderMessage)->OnMessageReceived(*(void**)(&args))); } template auto consume_Microsoft_Windows_Widgets_Providers_IWidgetResourceProvider::OnResourceRequested(winrt::Microsoft::Windows::Widgets::Providers::WidgetResourceRequestedArgs const& args) const { check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Windows::Widgets::Providers::IWidgetResourceProvider)->OnResourceRequested(*(void**)(&args))); } template auto consume_Microsoft_Windows_Widgets_Providers_IWidgetResourceRequest::Uri() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Windows::Widgets::Providers::IWidgetResourceRequest)->get_Uri(&value)); return hstring{ value, take_ownership_from_abi }; } template auto consume_Microsoft_Windows_Widgets_Providers_IWidgetResourceRequest::Method() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Windows::Widgets::Providers::IWidgetResourceRequest)->get_Method(&value)); return hstring{ value, take_ownership_from_abi }; } template auto consume_Microsoft_Windows_Widgets_Providers_IWidgetResourceRequest::Method(param::hstring const& value) const { check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Windows::Widgets::Providers::IWidgetResourceRequest)->put_Method(*(void**)(&value))); } template auto consume_Microsoft_Windows_Widgets_Providers_IWidgetResourceRequest::Content() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Windows::Widgets::Providers::IWidgetResourceRequest)->get_Content(&value)); return winrt::Windows::Storage::Streams::IRandomAccessStreamReference{ value, take_ownership_from_abi }; } template auto consume_Microsoft_Windows_Widgets_Providers_IWidgetResourceRequest::Content(winrt::Windows::Storage::Streams::IRandomAccessStreamReference const& value) const { check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Windows::Widgets::Providers::IWidgetResourceRequest)->put_Content(*(void**)(&value))); } template auto consume_Microsoft_Windows_Widgets_Providers_IWidgetResourceRequest::Headers() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Windows::Widgets::Providers::IWidgetResourceRequest)->get_Headers(&value)); return winrt::Windows::Foundation::Collections::IMap{ value, take_ownership_from_abi }; } template auto consume_Microsoft_Windows_Widgets_Providers_IWidgetResourceRequestedArgs::WidgetContext() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Windows::Widgets::Providers::IWidgetResourceRequestedArgs)->get_WidgetContext(&value)); return winrt::Microsoft::Windows::Widgets::Providers::WidgetContext{ value, take_ownership_from_abi }; } template auto consume_Microsoft_Windows_Widgets_Providers_IWidgetResourceRequestedArgs::Request() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Windows::Widgets::Providers::IWidgetResourceRequestedArgs)->get_Request(&value)); return winrt::Microsoft::Windows::Widgets::Providers::WidgetResourceRequest{ value, take_ownership_from_abi }; } template auto consume_Microsoft_Windows_Widgets_Providers_IWidgetResourceRequestedArgs::Response() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Windows::Widgets::Providers::IWidgetResourceRequestedArgs)->get_Response(&value)); return winrt::Microsoft::Windows::Widgets::Providers::WidgetResourceResponse{ value, take_ownership_from_abi }; } template auto consume_Microsoft_Windows_Widgets_Providers_IWidgetResourceRequestedArgs::Response(winrt::Microsoft::Windows::Widgets::Providers::WidgetResourceResponse const& value) const { check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Windows::Widgets::Providers::IWidgetResourceRequestedArgs)->put_Response(*(void**)(&value))); } template auto consume_Microsoft_Windows_Widgets_Providers_IWidgetResourceRequestedArgs::GetDeferral() const { void* result{}; check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Windows::Widgets::Providers::IWidgetResourceRequestedArgs)->GetDeferral(&result)); return winrt::Windows::Foundation::Deferral{ result, take_ownership_from_abi }; } template auto consume_Microsoft_Windows_Widgets_Providers_IWidgetResourceResponse::Content() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Windows::Widgets::Providers::IWidgetResourceResponse)->get_Content(&value)); return winrt::Windows::Storage::Streams::IRandomAccessStreamReference{ value, take_ownership_from_abi }; } template auto consume_Microsoft_Windows_Widgets_Providers_IWidgetResourceResponse::Headers() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Windows::Widgets::Providers::IWidgetResourceResponse)->get_Headers(&value)); return winrt::Windows::Foundation::Collections::IMap{ value, take_ownership_from_abi }; } template auto consume_Microsoft_Windows_Widgets_Providers_IWidgetResourceResponse::ReasonPhrase() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Windows::Widgets::Providers::IWidgetResourceResponse)->get_ReasonPhrase(&value)); return hstring{ value, take_ownership_from_abi }; } template auto consume_Microsoft_Windows_Widgets_Providers_IWidgetResourceResponse::StatusCode() const { int32_t value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Windows::Widgets::Providers::IWidgetResourceResponse)->get_StatusCode(&value)); return value; } template auto consume_Microsoft_Windows_Widgets_Providers_IWidgetResourceResponseFactory::CreateInstance(winrt::Windows::Storage::Streams::IRandomAccessStreamReference const& content, param::hstring const& reasonPhrase, int32_t statusCode) const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Windows::Widgets::Providers::IWidgetResourceResponseFactory)->CreateInstance(*(void**)(&content), *(void**)(&reasonPhrase), statusCode, &value)); return winrt::Microsoft::Windows::Widgets::Providers::WidgetResourceResponse{ value, take_ownership_from_abi }; } template auto consume_Microsoft_Windows_Widgets_Providers_IWidgetUpdateRequestOptions::WidgetId() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Windows::Widgets::Providers::IWidgetUpdateRequestOptions)->get_WidgetId(&value)); return hstring{ value, take_ownership_from_abi }; } template auto consume_Microsoft_Windows_Widgets_Providers_IWidgetUpdateRequestOptions::Template() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Windows::Widgets::Providers::IWidgetUpdateRequestOptions)->get_Template(&value)); return hstring{ value, take_ownership_from_abi }; } template auto consume_Microsoft_Windows_Widgets_Providers_IWidgetUpdateRequestOptions::Template(param::hstring const& value) const { check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Windows::Widgets::Providers::IWidgetUpdateRequestOptions)->put_Template(*(void**)(&value))); } template auto consume_Microsoft_Windows_Widgets_Providers_IWidgetUpdateRequestOptions::Data() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Windows::Widgets::Providers::IWidgetUpdateRequestOptions)->get_Data(&value)); return hstring{ value, take_ownership_from_abi }; } template auto consume_Microsoft_Windows_Widgets_Providers_IWidgetUpdateRequestOptions::Data(param::hstring const& value) const { check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Windows::Widgets::Providers::IWidgetUpdateRequestOptions)->put_Data(*(void**)(&value))); } template auto consume_Microsoft_Windows_Widgets_Providers_IWidgetUpdateRequestOptions::CustomState() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Windows::Widgets::Providers::IWidgetUpdateRequestOptions)->get_CustomState(&value)); return hstring{ value, take_ownership_from_abi }; } template auto consume_Microsoft_Windows_Widgets_Providers_IWidgetUpdateRequestOptions::CustomState(param::hstring const& value) const { check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Windows::Widgets::Providers::IWidgetUpdateRequestOptions)->put_CustomState(*(void**)(&value))); } template auto consume_Microsoft_Windows_Widgets_Providers_IWidgetUpdateRequestOptions2::IsPlaceholderContent() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Windows::Widgets::Providers::IWidgetUpdateRequestOptions2)->get_IsPlaceholderContent(&value)); return winrt::Windows::Foundation::IReference{ value, take_ownership_from_abi }; } template auto consume_Microsoft_Windows_Widgets_Providers_IWidgetUpdateRequestOptions2::IsPlaceholderContent(winrt::Windows::Foundation::IReference const& value) const { check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Windows::Widgets::Providers::IWidgetUpdateRequestOptions2)->put_IsPlaceholderContent(*(void**)(&value))); } template auto consume_Microsoft_Windows_Widgets_Providers_IWidgetUpdateRequestOptionsFactory::CreateInstance(param::hstring const& widgetId) const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Windows::Widgets::Providers::IWidgetUpdateRequestOptionsFactory)->CreateInstance(*(void**)(&widgetId), &value)); return winrt::Microsoft::Windows::Widgets::Providers::WidgetUpdateRequestOptions{ value, take_ownership_from_abi }; } template auto consume_Microsoft_Windows_Widgets_Providers_IWidgetUpdateRequestOptionsStatics::UnsetValue() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Windows::Widgets::Providers::IWidgetUpdateRequestOptionsStatics)->get_UnsetValue(&value)); return hstring{ value, take_ownership_from_abi }; } #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_WidgetContext(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().WidgetContext()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_Verb(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Verb()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_Data(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Data()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_CustomState(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().CustomState()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_WidgetContext(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().WidgetContext()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_AnalyticsJson(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().AnalyticsJson()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_Id(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Id()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_DefinitionId(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().DefinitionId()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_Size(int32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Size()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_IsActive(bool* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().IsActive()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_WidgetContext(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().WidgetContext()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_WidgetContext(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().WidgetContext()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_CustomState(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().CustomState()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_WidgetContext(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().WidgetContext()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_ErrorJson(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().ErrorJson()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_WidgetContext(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().WidgetContext()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_Template(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Template()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_Data(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Data()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_CustomState(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().CustomState()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_LastUpdateTime(int64_t* value) noexcept final try { zero_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().LastUpdateTime()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_IsPlaceholderContent(bool* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().IsPlaceholderContent()); return 0; } catch (...) { return to_hresult(); } }; #endif template struct produce : produce_base { int32_t __stdcall UpdateWidget(void* widgetUpdateRequestOptions) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().UpdateWidget(*reinterpret_cast(&widgetUpdateRequestOptions)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall GetWidgetIds(uint32_t* __resultSize, void*** result) noexcept final try { clear_abi(result); typename D::abi_guard guard(this->shim()); std::tie(*__resultSize, *result) = detach_abi(this->shim().GetWidgetIds()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall GetWidgetInfo(void* widgetId, void** result) noexcept final try { clear_abi(result); typename D::abi_guard guard(this->shim()); *result = detach_from(this->shim().GetWidgetInfo(*reinterpret_cast(&widgetId))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall GetWidgetInfos(uint32_t* __resultSize, void*** result) noexcept final try { clear_abi(result); typename D::abi_guard guard(this->shim()); std::tie(*__resultSize, *result) = detach_abi(this->shim().GetWidgetInfos()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall DeleteWidget(void* widgetId) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().DeleteWidget(*reinterpret_cast(&widgetId)); return 0; } catch (...) { return to_hresult(); } }; template struct produce : produce_base { int32_t __stdcall SendMessageToContent(void* widgetId, void* message) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().SendMessageToContent(*reinterpret_cast(&widgetId), *reinterpret_cast(&message)); return 0; } catch (...) { return to_hresult(); } }; #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall GetDefault(void** result) noexcept final try { clear_abi(result); typename D::abi_guard guard(this->shim()); *result = detach_from(this->shim().GetDefault()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_WidgetContext(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().WidgetContext()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_Message(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Message()); return 0; } catch (...) { return to_hresult(); } }; #endif template struct produce : produce_base { int32_t __stdcall CreateWidget(void* widgetContext) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().CreateWidget(*reinterpret_cast(&widgetContext)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall DeleteWidget(void* widgetId, void* customState) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().DeleteWidget(*reinterpret_cast(&widgetId), *reinterpret_cast(&customState)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall OnActionInvoked(void* actionInvokedArgs) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().OnActionInvoked(*reinterpret_cast(&actionInvokedArgs)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall OnWidgetContextChanged(void* contextChangedArgs) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().OnWidgetContextChanged(*reinterpret_cast(&contextChangedArgs)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall Activate(void* widgetContext) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().Activate(*reinterpret_cast(&widgetContext)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall Deactivate(void* widgetId) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().Deactivate(*reinterpret_cast(&widgetId)); return 0; } catch (...) { return to_hresult(); } }; template struct produce : produce_base { int32_t __stdcall OnCustomizationRequested(void* customizationRequestedArgs) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().OnCustomizationRequested(*reinterpret_cast(&customizationRequestedArgs)); return 0; } catch (...) { return to_hresult(); } }; template struct produce : produce_base { int32_t __stdcall OnAnalyticsInfoReported(void* args) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().OnAnalyticsInfoReported(*reinterpret_cast(&args)); return 0; } catch (...) { return to_hresult(); } }; template struct produce : produce_base { int32_t __stdcall OnErrorInfoReported(void* args) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().OnErrorInfoReported(*reinterpret_cast(&args)); return 0; } catch (...) { return to_hresult(); } }; template struct produce : produce_base { int32_t __stdcall OnMessageReceived(void* args) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().OnMessageReceived(*reinterpret_cast(&args)); return 0; } catch (...) { return to_hresult(); } }; template struct produce : produce_base { int32_t __stdcall OnResourceRequested(void* args) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().OnResourceRequested(*reinterpret_cast(&args)); return 0; } catch (...) { return to_hresult(); } }; #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_Uri(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Uri()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_Method(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Method()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_Method(void* value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().Method(*reinterpret_cast(&value)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_Content(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Content()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_Content(void* value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().Content(*reinterpret_cast(&value)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_Headers(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from>(this->shim().Headers()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_WidgetContext(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().WidgetContext()); return 0; } catch (...) { return to_hresult(); } 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(); } int32_t __stdcall get_Response(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Response()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_Response(void* value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().Response(*reinterpret_cast(&value)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall GetDeferral(void** result) noexcept final try { clear_abi(result); typename D::abi_guard guard(this->shim()); *result = 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 get_Content(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Content()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_Headers(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from>(this->shim().Headers()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_ReasonPhrase(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().ReasonPhrase()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_StatusCode(int32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().StatusCode()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall CreateInstance(void* content, void* reasonPhrase, int32_t statusCode, void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().CreateInstance(*reinterpret_cast(&content), *reinterpret_cast(&reasonPhrase), statusCode)); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_WidgetId(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().WidgetId()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_Template(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Template()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_Template(void* value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().Template(*reinterpret_cast(&value)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_Data(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Data()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_Data(void* value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().Data(*reinterpret_cast(&value)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_CustomState(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().CustomState()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_CustomState(void* value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().CustomState(*reinterpret_cast(&value)); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_IsPlaceholderContent(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from>(this->shim().IsPlaceholderContent()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_IsPlaceholderContent(void* value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().IsPlaceholderContent(*reinterpret_cast const*>(&value)); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall CreateInstance(void* widgetId, void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().CreateInstance(*reinterpret_cast(&widgetId))); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_UnsetValue(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().UnsetValue()); return 0; } catch (...) { return to_hresult(); } }; #endif } WINRT_EXPORT namespace winrt::Microsoft::Windows::Widgets::Providers { inline auto WidgetManager::GetDefault() { return impl::call_factory_cast([](IWidgetManagerStatics const& f) { return f.GetDefault(); }); } inline WidgetResourceResponse::WidgetResourceResponse(winrt::Windows::Storage::Streams::IRandomAccessStreamReference const& content, param::hstring const& reasonPhrase, int32_t statusCode) : WidgetResourceResponse(impl::call_factory([&](IWidgetResourceResponseFactory const& f) { return f.CreateInstance(content, reasonPhrase, statusCode); })) { } inline WidgetUpdateRequestOptions::WidgetUpdateRequestOptions(param::hstring const& widgetId) : WidgetUpdateRequestOptions(impl::call_factory([&](IWidgetUpdateRequestOptionsFactory const& f) { return f.CreateInstance(widgetId); })) { } inline auto WidgetUpdateRequestOptions::UnsetValue() { return impl::call_factory_cast([](IWidgetUpdateRequestOptionsStatics const& f) { return f.UnsetValue(); }); } } 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 {}; #endif #ifdef __cpp_lib_format #endif } #endif