portable-devtools / msvc /Windows Kits /10 /Include /10.0.26100.0 /cppwinrt /winrt /windows.applicationmodel.preview.h
codekingpro's picture
Add files using upload-large-folder tool
a028a0f verified
Raw
History Blame Contribute Delete
12.8 kB
// C++/WinRT v2.0.250303.1
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#pragma once
#ifndef WINRT_Windows_ApplicationModel_Preview_H
#define WINRT_Windows_ApplicationModel_Preview_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.ApplicationModel.h"
#include "winrt/impl/Windows.Foundation.Collections.2.h"
#include "winrt/impl/Windows.ApplicationModel.Preview.2.h"
namespace winrt::impl
{
template <typename D> auto consume_Windows_ApplicationModel_Preview_IStartupAppInfoPreview<D>::DisplayName() const
{
void* value{};
if constexpr (!std::is_same_v<D, winrt::Windows::ApplicationModel::Preview::IStartupAppInfoPreview>)
{
winrt::hresult _winrt_cast_result_code;
auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Windows::ApplicationModel::Preview::IStartupAppInfoPreview, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
check_hresult(_winrt_cast_result_code);
auto const _winrt_abi_type = *(abi_t<winrt::Windows::ApplicationModel::Preview::IStartupAppInfoPreview>**)&_winrt_casted_result;
check_hresult(_winrt_abi_type->get_DisplayName(&value));
}
else
{
auto const _winrt_abi_type = *(abi_t<winrt::Windows::ApplicationModel::Preview::IStartupAppInfoPreview>**)this;
check_hresult(_winrt_abi_type->get_DisplayName(&value));
}
return hstring{ value, take_ownership_from_abi };
}
template <typename D> auto consume_Windows_ApplicationModel_Preview_IStartupAppInfoPreview<D>::Publisher() const
{
void* value{};
if constexpr (!std::is_same_v<D, winrt::Windows::ApplicationModel::Preview::IStartupAppInfoPreview>)
{
winrt::hresult _winrt_cast_result_code;
auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Windows::ApplicationModel::Preview::IStartupAppInfoPreview, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
check_hresult(_winrt_cast_result_code);
auto const _winrt_abi_type = *(abi_t<winrt::Windows::ApplicationModel::Preview::IStartupAppInfoPreview>**)&_winrt_casted_result;
check_hresult(_winrt_abi_type->get_Publisher(&value));
}
else
{
auto const _winrt_abi_type = *(abi_t<winrt::Windows::ApplicationModel::Preview::IStartupAppInfoPreview>**)this;
check_hresult(_winrt_abi_type->get_Publisher(&value));
}
return hstring{ value, take_ownership_from_abi };
}
template <typename D> auto consume_Windows_ApplicationModel_Preview_IStartupAppInfoPreview<D>::IsEnabled() const
{
bool value{};
if constexpr (!std::is_same_v<D, winrt::Windows::ApplicationModel::Preview::IStartupAppInfoPreview>)
{
winrt::hresult _winrt_cast_result_code;
auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Windows::ApplicationModel::Preview::IStartupAppInfoPreview, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
check_hresult(_winrt_cast_result_code);
auto const _winrt_abi_type = *(abi_t<winrt::Windows::ApplicationModel::Preview::IStartupAppInfoPreview>**)&_winrt_casted_result;
check_hresult(_winrt_abi_type->get_IsEnabled(&value));
}
else
{
auto const _winrt_abi_type = *(abi_t<winrt::Windows::ApplicationModel::Preview::IStartupAppInfoPreview>**)this;
check_hresult(_winrt_abi_type->get_IsEnabled(&value));
}
return value;
}
template <typename D> auto consume_Windows_ApplicationModel_Preview_IStartupAppInfoPreview<D>::Impact() const
{
winrt::Windows::ApplicationModel::Preview::StartupAppImpactPreview value{};
if constexpr (!std::is_same_v<D, winrt::Windows::ApplicationModel::Preview::IStartupAppInfoPreview>)
{
winrt::hresult _winrt_cast_result_code;
auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Windows::ApplicationModel::Preview::IStartupAppInfoPreview, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
check_hresult(_winrt_cast_result_code);
auto const _winrt_abi_type = *(abi_t<winrt::Windows::ApplicationModel::Preview::IStartupAppInfoPreview>**)&_winrt_casted_result;
check_hresult(_winrt_abi_type->get_Impact(reinterpret_cast<int32_t*>(&value)));
}
else
{
auto const _winrt_abi_type = *(abi_t<winrt::Windows::ApplicationModel::Preview::IStartupAppInfoPreview>**)this;
check_hresult(_winrt_abi_type->get_Impact(reinterpret_cast<int32_t*>(&value)));
}
return value;
}
template <typename D> auto consume_Windows_ApplicationModel_Preview_IStartupAppInfoPreview<D>::ExecutablePath() const
{
void* value{};
if constexpr (!std::is_same_v<D, winrt::Windows::ApplicationModel::Preview::IStartupAppInfoPreview>)
{
winrt::hresult _winrt_cast_result_code;
auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Windows::ApplicationModel::Preview::IStartupAppInfoPreview, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
check_hresult(_winrt_cast_result_code);
auto const _winrt_abi_type = *(abi_t<winrt::Windows::ApplicationModel::Preview::IStartupAppInfoPreview>**)&_winrt_casted_result;
check_hresult(_winrt_abi_type->get_ExecutablePath(&value));
}
else
{
auto const _winrt_abi_type = *(abi_t<winrt::Windows::ApplicationModel::Preview::IStartupAppInfoPreview>**)this;
check_hresult(_winrt_abi_type->get_ExecutablePath(&value));
}
return hstring{ value, take_ownership_from_abi };
}
template <typename D> auto consume_Windows_ApplicationModel_Preview_IStartupAppsManagerPreview<D>::GetStartupAppInfos() const
{
void* result{};
if constexpr (!std::is_same_v<D, winrt::Windows::ApplicationModel::Preview::IStartupAppsManagerPreview>)
{
winrt::hresult _winrt_cast_result_code;
auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Windows::ApplicationModel::Preview::IStartupAppsManagerPreview, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
check_hresult(_winrt_cast_result_code);
auto const _winrt_abi_type = *(abi_t<winrt::Windows::ApplicationModel::Preview::IStartupAppsManagerPreview>**)&_winrt_casted_result;
check_hresult(_winrt_abi_type->GetStartupAppInfos(&result));
}
else
{
auto const _winrt_abi_type = *(abi_t<winrt::Windows::ApplicationModel::Preview::IStartupAppsManagerPreview>**)this;
check_hresult(_winrt_abi_type->GetStartupAppInfos(&result));
}
return winrt::Windows::Foundation::Collections::IVectorView<winrt::Windows::ApplicationModel::Preview::StartupAppInfoPreview>{ result, take_ownership_from_abi };
}
template <typename D> auto consume_Windows_ApplicationModel_Preview_IStartupAppsManagerPreviewStatics<D>::GetDefault() const
{
void* result{};
if constexpr (!std::is_same_v<D, winrt::Windows::ApplicationModel::Preview::IStartupAppsManagerPreviewStatics>)
{
winrt::hresult _winrt_cast_result_code;
auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Windows::ApplicationModel::Preview::IStartupAppsManagerPreviewStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
check_hresult(_winrt_cast_result_code);
auto const _winrt_abi_type = *(abi_t<winrt::Windows::ApplicationModel::Preview::IStartupAppsManagerPreviewStatics>**)&_winrt_casted_result;
check_hresult(_winrt_abi_type->GetDefault(&result));
}
else
{
auto const _winrt_abi_type = *(abi_t<winrt::Windows::ApplicationModel::Preview::IStartupAppsManagerPreviewStatics>**)this;
check_hresult(_winrt_abi_type->GetDefault(&result));
}
return winrt::Windows::ApplicationModel::Preview::StartupAppsManagerPreview{ result, take_ownership_from_abi };
}
#ifndef WINRT_LEAN_AND_MEAN
template <typename D>
struct produce<D, winrt::Windows::ApplicationModel::Preview::IStartupAppInfoPreview> : produce_base<D, winrt::Windows::ApplicationModel::Preview::IStartupAppInfoPreview>
{
int32_t __stdcall get_DisplayName(void** value) noexcept final try
{
clear_abi(value);
typename D::abi_guard guard(this->shim());
*value = detach_from<hstring>(this->shim().DisplayName());
return 0;
}
catch (...) { return to_hresult(); }
int32_t __stdcall get_Publisher(void** value) noexcept final try
{
clear_abi(value);
typename D::abi_guard guard(this->shim());
*value = detach_from<hstring>(this->shim().Publisher());
return 0;
}
catch (...) { return to_hresult(); }
int32_t __stdcall get_IsEnabled(bool* value) noexcept final try
{
typename D::abi_guard guard(this->shim());
*value = detach_from<bool>(this->shim().IsEnabled());
return 0;
}
catch (...) { return to_hresult(); }
int32_t __stdcall get_Impact(int32_t* value) noexcept final try
{
typename D::abi_guard guard(this->shim());
*value = detach_from<winrt::Windows::ApplicationModel::Preview::StartupAppImpactPreview>(this->shim().Impact());
return 0;
}
catch (...) { return to_hresult(); }
int32_t __stdcall get_ExecutablePath(void** value) noexcept final try
{
clear_abi(value);
typename D::abi_guard guard(this->shim());
*value = detach_from<hstring>(this->shim().ExecutablePath());
return 0;
}
catch (...) { return to_hresult(); }
};
#endif
#ifndef WINRT_LEAN_AND_MEAN
template <typename D>
struct produce<D, winrt::Windows::ApplicationModel::Preview::IStartupAppsManagerPreview> : produce_base<D, winrt::Windows::ApplicationModel::Preview::IStartupAppsManagerPreview>
{
int32_t __stdcall GetStartupAppInfos(void** result) noexcept final try
{
clear_abi(result);
typename D::abi_guard guard(this->shim());
*result = detach_from<winrt::Windows::Foundation::Collections::IVectorView<winrt::Windows::ApplicationModel::Preview::StartupAppInfoPreview>>(this->shim().GetStartupAppInfos());
return 0;
}
catch (...) { return to_hresult(); }
};
#endif
#ifndef WINRT_LEAN_AND_MEAN
template <typename D>
struct produce<D, winrt::Windows::ApplicationModel::Preview::IStartupAppsManagerPreviewStatics> : produce_base<D, winrt::Windows::ApplicationModel::Preview::IStartupAppsManagerPreviewStatics>
{
int32_t __stdcall GetDefault(void** result) noexcept final try
{
clear_abi(result);
typename D::abi_guard guard(this->shim());
*result = detach_from<winrt::Windows::ApplicationModel::Preview::StartupAppsManagerPreview>(this->shim().GetDefault());
return 0;
}
catch (...) { return to_hresult(); }
};
#endif
}
WINRT_EXPORT namespace winrt::Windows::ApplicationModel::Preview
{
inline auto StartupAppsManagerPreview::GetDefault()
{
return impl::call_factory_cast<winrt::Windows::ApplicationModel::Preview::StartupAppsManagerPreview(*)(IStartupAppsManagerPreviewStatics const&), StartupAppsManagerPreview, IStartupAppsManagerPreviewStatics>([](IStartupAppsManagerPreviewStatics const& f) { return f.GetDefault(); });
}
}
namespace std
{
#ifndef WINRT_LEAN_AND_MEAN
template<> struct hash<winrt::Windows::ApplicationModel::Preview::IStartupAppInfoPreview> : winrt::impl::hash_base {};
template<> struct hash<winrt::Windows::ApplicationModel::Preview::IStartupAppsManagerPreview> : winrt::impl::hash_base {};
template<> struct hash<winrt::Windows::ApplicationModel::Preview::IStartupAppsManagerPreviewStatics> : winrt::impl::hash_base {};
template<> struct hash<winrt::Windows::ApplicationModel::Preview::StartupAppInfoPreview> : winrt::impl::hash_base {};
template<> struct hash<winrt::Windows::ApplicationModel::Preview::StartupAppsManagerPreview> : winrt::impl::hash_base {};
#endif
#ifdef __cpp_lib_format
#endif
}
#endif