// WARNING: Please don't edit this file. It was generated by C++/WinRT v2.0.240405.15 #pragma once #ifndef WINRT_Microsoft_Windows_Widgets_Notifications_H #define WINRT_Microsoft_Windows_Widgets_Notifications_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/Windows.Foundation.2.h" #include "winrt/impl/Microsoft.Windows.Widgets.Notifications.2.h" namespace winrt::impl { template auto consume_Microsoft_Windows_Widgets_Notifications_IFeedAnnouncement::Id() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Windows::Widgets::Notifications::IFeedAnnouncement)->get_Id(&value)); return hstring{ value, take_ownership_from_abi }; } template auto consume_Microsoft_Windows_Widgets_Notifications_IFeedAnnouncement::Id(param::hstring const& value) const { check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Windows::Widgets::Notifications::IFeedAnnouncement)->put_Id(*(void**)(&value))); } template auto consume_Microsoft_Windows_Widgets_Notifications_IFeedAnnouncement::PrimaryText() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Windows::Widgets::Notifications::IFeedAnnouncement)->get_PrimaryText(&value)); return hstring{ value, take_ownership_from_abi }; } template auto consume_Microsoft_Windows_Widgets_Notifications_IFeedAnnouncement::PrimaryText(param::hstring const& value) const { check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Windows::Widgets::Notifications::IFeedAnnouncement)->put_PrimaryText(*(void**)(&value))); } template auto consume_Microsoft_Windows_Widgets_Notifications_IFeedAnnouncement::SecondaryText() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Windows::Widgets::Notifications::IFeedAnnouncement)->get_SecondaryText(&value)); return hstring{ value, take_ownership_from_abi }; } template auto consume_Microsoft_Windows_Widgets_Notifications_IFeedAnnouncement::SecondaryText(param::hstring const& value) const { check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Windows::Widgets::Notifications::IFeedAnnouncement)->put_SecondaryText(*(void**)(&value))); } template auto consume_Microsoft_Windows_Widgets_Notifications_IFeedAnnouncement::LightModeIconUri() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Windows::Widgets::Notifications::IFeedAnnouncement)->get_LightModeIconUri(&value)); return winrt::Windows::Foundation::Uri{ value, take_ownership_from_abi }; } template auto consume_Microsoft_Windows_Widgets_Notifications_IFeedAnnouncement::LightModeIconUri(winrt::Windows::Foundation::Uri const& value) const { check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Windows::Widgets::Notifications::IFeedAnnouncement)->put_LightModeIconUri(*(void**)(&value))); } template auto consume_Microsoft_Windows_Widgets_Notifications_IFeedAnnouncement::DarkModeIconUri() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Windows::Widgets::Notifications::IFeedAnnouncement)->get_DarkModeIconUri(&value)); return winrt::Windows::Foundation::Uri{ value, take_ownership_from_abi }; } template auto consume_Microsoft_Windows_Widgets_Notifications_IFeedAnnouncement::DarkModeIconUri(winrt::Windows::Foundation::Uri const& value) const { check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Windows::Widgets::Notifications::IFeedAnnouncement)->put_DarkModeIconUri(*(void**)(&value))); } template auto consume_Microsoft_Windows_Widgets_Notifications_IFeedAnnouncement::PrimaryTextColor() const { winrt::Microsoft::Windows::Widgets::Notifications::AnnouncementTextColor value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Windows::Widgets::Notifications::IFeedAnnouncement)->get_PrimaryTextColor(reinterpret_cast(&value))); return value; } template auto consume_Microsoft_Windows_Widgets_Notifications_IFeedAnnouncement::PrimaryTextColor(winrt::Microsoft::Windows::Widgets::Notifications::AnnouncementTextColor const& value) const { check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Windows::Widgets::Notifications::IFeedAnnouncement)->put_PrimaryTextColor(static_cast(value))); } template auto consume_Microsoft_Windows_Widgets_Notifications_IFeedAnnouncement::SecondaryTextColor() const { winrt::Microsoft::Windows::Widgets::Notifications::AnnouncementTextColor value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Windows::Widgets::Notifications::IFeedAnnouncement)->get_SecondaryTextColor(reinterpret_cast(&value))); return value; } template auto consume_Microsoft_Windows_Widgets_Notifications_IFeedAnnouncement::SecondaryTextColor(winrt::Microsoft::Windows::Widgets::Notifications::AnnouncementTextColor const& value) const { check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Windows::Widgets::Notifications::IFeedAnnouncement)->put_SecondaryTextColor(static_cast(value))); } template auto consume_Microsoft_Windows_Widgets_Notifications_IFeedAnnouncement::CustomAccessibilityText() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Windows::Widgets::Notifications::IFeedAnnouncement)->get_CustomAccessibilityText(&value)); return hstring{ value, take_ownership_from_abi }; } template auto consume_Microsoft_Windows_Widgets_Notifications_IFeedAnnouncement::CustomAccessibilityText(param::hstring const& value) const { check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Windows::Widgets::Notifications::IFeedAnnouncement)->put_CustomAccessibilityText(*(void**)(&value))); } template auto consume_Microsoft_Windows_Widgets_Notifications_IFeedAnnouncement::IsSecondaryTextSubtle() const { bool value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Windows::Widgets::Notifications::IFeedAnnouncement)->get_IsSecondaryTextSubtle(&value)); return value; } template auto consume_Microsoft_Windows_Widgets_Notifications_IFeedAnnouncement::IsSecondaryTextSubtle(bool value) const { check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Windows::Widgets::Notifications::IFeedAnnouncement)->put_IsSecondaryTextSubtle(value)); } template auto consume_Microsoft_Windows_Widgets_Notifications_IFeedAnnouncement::ShowBadgeIfUserNotEngaged() const { bool value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Windows::Widgets::Notifications::IFeedAnnouncement)->get_ShowBadgeIfUserNotEngaged(&value)); return value; } template auto consume_Microsoft_Windows_Widgets_Notifications_IFeedAnnouncement::ShowBadgeIfUserNotEngaged(bool value) const { check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Windows::Widgets::Notifications::IFeedAnnouncement)->put_ShowBadgeIfUserNotEngaged(value)); } template auto consume_Microsoft_Windows_Widgets_Notifications_IFeedAnnouncement::ExpirationTime() const { winrt::Windows::Foundation::DateTime value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Windows::Widgets::Notifications::IFeedAnnouncement)->get_ExpirationTime(put_abi(value))); return value; } template auto consume_Microsoft_Windows_Widgets_Notifications_IFeedAnnouncement::ExpirationTime(winrt::Windows::Foundation::DateTime const& value) const { check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Windows::Widgets::Notifications::IFeedAnnouncement)->put_ExpirationTime(impl::bind_in(value))); } template auto consume_Microsoft_Windows_Widgets_Notifications_IFeedAnnouncement::Duration() const { winrt::Windows::Foundation::TimeSpan value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Windows::Widgets::Notifications::IFeedAnnouncement)->get_Duration(put_abi(value))); return value; } template auto consume_Microsoft_Windows_Widgets_Notifications_IFeedAnnouncement::Duration(winrt::Windows::Foundation::TimeSpan const& value) const { check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Windows::Widgets::Notifications::IFeedAnnouncement)->put_Duration(impl::bind_in(value))); } template auto consume_Microsoft_Windows_Widgets_Notifications_IFeedAnnouncementFactory::CreateInstance(param::hstring const& id, param::hstring const& primaryText, param::hstring const& secondaryText, winrt::Windows::Foundation::Uri const& lightModeIcon, winrt::Windows::Foundation::Uri const& darkModeIcon) const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Windows::Widgets::Notifications::IFeedAnnouncementFactory)->CreateInstance(*(void**)(&id), *(void**)(&primaryText), *(void**)(&secondaryText), *(void**)(&lightModeIcon), *(void**)(&darkModeIcon), &value)); return winrt::Microsoft::Windows::Widgets::Notifications::FeedAnnouncement{ value, take_ownership_from_abi }; } template auto consume_Microsoft_Windows_Widgets_Notifications_IFeedAnnouncementInvokedArgs::FeedProviderDefinitionId() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Windows::Widgets::Notifications::IFeedAnnouncementInvokedArgs)->get_FeedProviderDefinitionId(&value)); return hstring{ value, take_ownership_from_abi }; } template auto consume_Microsoft_Windows_Widgets_Notifications_IFeedAnnouncementInvokedArgs::FeedDefinitionId() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Windows::Widgets::Notifications::IFeedAnnouncementInvokedArgs)->get_FeedDefinitionId(&value)); return hstring{ value, take_ownership_from_abi }; } template auto consume_Microsoft_Windows_Widgets_Notifications_IFeedAnnouncementInvokedArgs::AnnouncementId() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Windows::Widgets::Notifications::IFeedAnnouncementInvokedArgs)->get_AnnouncementId(&value)); return hstring{ value, take_ownership_from_abi }; } template auto consume_Microsoft_Windows_Widgets_Notifications_IFeedAnnouncementInvokedArgs::ActionKind() const { winrt::Microsoft::Windows::Widgets::Notifications::AnnouncementActionKind value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Windows::Widgets::Notifications::IFeedAnnouncementInvokedArgs)->get_ActionKind(reinterpret_cast(&value))); return value; } #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 put_Id(void* value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().Id(*reinterpret_cast(&value)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_PrimaryText(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().PrimaryText()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_PrimaryText(void* value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().PrimaryText(*reinterpret_cast(&value)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_SecondaryText(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().SecondaryText()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_SecondaryText(void* value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().SecondaryText(*reinterpret_cast(&value)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_LightModeIconUri(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().LightModeIconUri()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_LightModeIconUri(void* value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().LightModeIconUri(*reinterpret_cast(&value)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_DarkModeIconUri(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().DarkModeIconUri()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_DarkModeIconUri(void* value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().DarkModeIconUri(*reinterpret_cast(&value)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_PrimaryTextColor(int32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().PrimaryTextColor()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_PrimaryTextColor(int32_t value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().PrimaryTextColor(*reinterpret_cast(&value)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_SecondaryTextColor(int32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().SecondaryTextColor()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_SecondaryTextColor(int32_t value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().SecondaryTextColor(*reinterpret_cast(&value)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_CustomAccessibilityText(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().CustomAccessibilityText()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_CustomAccessibilityText(void* value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().CustomAccessibilityText(*reinterpret_cast(&value)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_IsSecondaryTextSubtle(bool* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().IsSecondaryTextSubtle()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_IsSecondaryTextSubtle(bool value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().IsSecondaryTextSubtle(value); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_ShowBadgeIfUserNotEngaged(bool* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().ShowBadgeIfUserNotEngaged()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_ShowBadgeIfUserNotEngaged(bool value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().ShowBadgeIfUserNotEngaged(value); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_ExpirationTime(int64_t* value) noexcept final try { zero_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().ExpirationTime()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_ExpirationTime(int64_t value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().ExpirationTime(*reinterpret_cast(&value)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_Duration(int64_t* value) noexcept final try { zero_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Duration()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_Duration(int64_t value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().Duration(*reinterpret_cast(&value)); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall CreateInstance(void* id, void* primaryText, void* secondaryText, void* lightModeIcon, void* darkModeIcon, void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().CreateInstance(*reinterpret_cast(&id), *reinterpret_cast(&primaryText), *reinterpret_cast(&secondaryText), *reinterpret_cast(&lightModeIcon), *reinterpret_cast(&darkModeIcon))); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_FeedProviderDefinitionId(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().FeedProviderDefinitionId()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_FeedDefinitionId(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().FeedDefinitionId()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_AnnouncementId(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().AnnouncementId()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_ActionKind(int32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().ActionKind()); return 0; } catch (...) { return to_hresult(); } }; #endif } WINRT_EXPORT namespace winrt::Microsoft::Windows::Widgets::Notifications { inline FeedAnnouncement::FeedAnnouncement(param::hstring const& id, param::hstring const& primaryText, param::hstring const& secondaryText, winrt::Windows::Foundation::Uri const& lightModeIcon, winrt::Windows::Foundation::Uri const& darkModeIcon) : FeedAnnouncement(impl::call_factory([&](IFeedAnnouncementFactory const& f) { return f.CreateInstance(id, primaryText, secondaryText, lightModeIcon, darkModeIcon); })) { } } 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 {}; #endif #ifdef __cpp_lib_format #endif } #endif