Skip to content
This repository was archived by the owner on Oct 7, 2024. It is now read-only.

Commit 87d5c5e

Browse files
committed
enable Windows Extension SDKs
1 parent a42009b commit 87d5c5e

491 files changed

Lines changed: 148480 additions & 11645 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@
44

55
## [Unreleased]
66

7+
### Added
8+
- Added Windows Extension SDK APIs [python-winsdk#9](https://github.com/pywinrt/python-winsdk/issues/9).
9+
710
### Changed
811
- Update CppWinRT to 2.0.220607.4.
912
- Update PyWinRT to [v1.0.0-beta.5](https://github.com/pywinrt/pywinrt/releases/tag/v1.0.0-beta.5).

cppwinrt/winrt/Windows.ApplicationModel.Activation.h

Lines changed: 429 additions & 0 deletions
Large diffs are not rendered by default.

cppwinrt/winrt/Windows.ApplicationModel.Background.h

Lines changed: 256 additions & 0 deletions
Large diffs are not rendered by default.

cppwinrt/winrt/Windows.ApplicationModel.Calls.h

Lines changed: 155 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,64 @@ namespace winrt::impl
3434
check_hresult(WINRT_IMPL_SHIM(winrt::Windows::ApplicationModel::Calls::ICallStateChangeEventArgs)->get_State(reinterpret_cast<int32_t*>(&value)));
3535
return value;
3636
}
37+
template <typename D> auto consume_Windows_ApplicationModel_Calls_ILockScreenCallEndCallDeferral<D>::Complete() const
38+
{
39+
check_hresult(WINRT_IMPL_SHIM(winrt::Windows::ApplicationModel::Calls::ILockScreenCallEndCallDeferral)->Complete());
40+
}
41+
template <typename D> auto consume_Windows_ApplicationModel_Calls_ILockScreenCallEndRequestedEventArgs<D>::GetDeferral() const
42+
{
43+
void* value{};
44+
check_hresult(WINRT_IMPL_SHIM(winrt::Windows::ApplicationModel::Calls::ILockScreenCallEndRequestedEventArgs)->GetDeferral(&value));
45+
return winrt::Windows::ApplicationModel::Calls::LockScreenCallEndCallDeferral{ value, take_ownership_from_abi };
46+
}
47+
template <typename D> auto consume_Windows_ApplicationModel_Calls_ILockScreenCallEndRequestedEventArgs<D>::Deadline() const
48+
{
49+
winrt::Windows::Foundation::DateTime value{};
50+
check_hresult(WINRT_IMPL_SHIM(winrt::Windows::ApplicationModel::Calls::ILockScreenCallEndRequestedEventArgs)->get_Deadline(put_abi(value)));
51+
return value;
52+
}
53+
template <typename D> auto consume_Windows_ApplicationModel_Calls_ILockScreenCallUI<D>::Dismiss() const
54+
{
55+
check_hresult(WINRT_IMPL_SHIM(winrt::Windows::ApplicationModel::Calls::ILockScreenCallUI)->Dismiss());
56+
}
57+
template <typename D> auto consume_Windows_ApplicationModel_Calls_ILockScreenCallUI<D>::EndRequested(winrt::Windows::Foundation::TypedEventHandler<winrt::Windows::ApplicationModel::Calls::LockScreenCallUI, winrt::Windows::ApplicationModel::Calls::LockScreenCallEndRequestedEventArgs> const& handler) const
58+
{
59+
winrt::event_token token{};
60+
check_hresult(WINRT_IMPL_SHIM(winrt::Windows::ApplicationModel::Calls::ILockScreenCallUI)->add_EndRequested(*(void**)(&handler), put_abi(token)));
61+
return token;
62+
}
63+
template <typename D> auto consume_Windows_ApplicationModel_Calls_ILockScreenCallUI<D>::EndRequested(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler<winrt::Windows::ApplicationModel::Calls::LockScreenCallUI, winrt::Windows::ApplicationModel::Calls::LockScreenCallEndRequestedEventArgs> const& handler) const
64+
{
65+
return impl::make_event_revoker<D, EndRequested_revoker>(this, EndRequested(handler));
66+
}
67+
template <typename D> auto consume_Windows_ApplicationModel_Calls_ILockScreenCallUI<D>::EndRequested(winrt::event_token const& token) const noexcept
68+
{
69+
WINRT_IMPL_SHIM(winrt::Windows::ApplicationModel::Calls::ILockScreenCallUI)->remove_EndRequested(impl::bind_in(token));
70+
}
71+
template <typename D> auto consume_Windows_ApplicationModel_Calls_ILockScreenCallUI<D>::Closed(winrt::Windows::Foundation::TypedEventHandler<winrt::Windows::ApplicationModel::Calls::LockScreenCallUI, winrt::Windows::Foundation::IInspectable> const& handler) const
72+
{
73+
winrt::event_token token{};
74+
check_hresult(WINRT_IMPL_SHIM(winrt::Windows::ApplicationModel::Calls::ILockScreenCallUI)->add_Closed(*(void**)(&handler), put_abi(token)));
75+
return token;
76+
}
77+
template <typename D> auto consume_Windows_ApplicationModel_Calls_ILockScreenCallUI<D>::Closed(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler<winrt::Windows::ApplicationModel::Calls::LockScreenCallUI, winrt::Windows::Foundation::IInspectable> const& handler) const
78+
{
79+
return impl::make_event_revoker<D, Closed_revoker>(this, Closed(handler));
80+
}
81+
template <typename D> auto consume_Windows_ApplicationModel_Calls_ILockScreenCallUI<D>::Closed(winrt::event_token const& token) const noexcept
82+
{
83+
WINRT_IMPL_SHIM(winrt::Windows::ApplicationModel::Calls::ILockScreenCallUI)->remove_Closed(impl::bind_in(token));
84+
}
85+
template <typename D> auto consume_Windows_ApplicationModel_Calls_ILockScreenCallUI<D>::CallTitle() const
86+
{
87+
void* value{};
88+
check_hresult(WINRT_IMPL_SHIM(winrt::Windows::ApplicationModel::Calls::ILockScreenCallUI)->get_CallTitle(&value));
89+
return hstring{ value, take_ownership_from_abi };
90+
}
91+
template <typename D> auto consume_Windows_ApplicationModel_Calls_ILockScreenCallUI<D>::CallTitle(param::hstring const& value) const
92+
{
93+
check_hresult(WINRT_IMPL_SHIM(winrt::Windows::ApplicationModel::Calls::ILockScreenCallUI)->put_CallTitle(*(void**)(&value)));
94+
}
3795
template <typename D> auto consume_Windows_ApplicationModel_Calls_IMuteChangeEventArgs<D>::Muted() const
3896
{
3997
bool value{};
@@ -1443,6 +1501,97 @@ namespace winrt::impl
14431501
catch (...) { return to_hresult(); }
14441502
};
14451503
#endif
1504+
#ifndef WINRT_LEAN_AND_MEAN
1505+
template <typename D>
1506+
struct produce<D, winrt::Windows::ApplicationModel::Calls::ILockScreenCallEndCallDeferral> : produce_base<D, winrt::Windows::ApplicationModel::Calls::ILockScreenCallEndCallDeferral>
1507+
{
1508+
int32_t __stdcall Complete() noexcept final try
1509+
{
1510+
typename D::abi_guard guard(this->shim());
1511+
this->shim().Complete();
1512+
return 0;
1513+
}
1514+
catch (...) { return to_hresult(); }
1515+
};
1516+
#endif
1517+
#ifndef WINRT_LEAN_AND_MEAN
1518+
template <typename D>
1519+
struct produce<D, winrt::Windows::ApplicationModel::Calls::ILockScreenCallEndRequestedEventArgs> : produce_base<D, winrt::Windows::ApplicationModel::Calls::ILockScreenCallEndRequestedEventArgs>
1520+
{
1521+
int32_t __stdcall GetDeferral(void** value) noexcept final try
1522+
{
1523+
clear_abi(value);
1524+
typename D::abi_guard guard(this->shim());
1525+
*value = detach_from<winrt::Windows::ApplicationModel::Calls::LockScreenCallEndCallDeferral>(this->shim().GetDeferral());
1526+
return 0;
1527+
}
1528+
catch (...) { return to_hresult(); }
1529+
int32_t __stdcall get_Deadline(int64_t* value) noexcept final try
1530+
{
1531+
zero_abi<winrt::Windows::Foundation::DateTime>(value);
1532+
typename D::abi_guard guard(this->shim());
1533+
*value = detach_from<winrt::Windows::Foundation::DateTime>(this->shim().Deadline());
1534+
return 0;
1535+
}
1536+
catch (...) { return to_hresult(); }
1537+
};
1538+
#endif
1539+
#ifndef WINRT_LEAN_AND_MEAN
1540+
template <typename D>
1541+
struct produce<D, winrt::Windows::ApplicationModel::Calls::ILockScreenCallUI> : produce_base<D, winrt::Windows::ApplicationModel::Calls::ILockScreenCallUI>
1542+
{
1543+
int32_t __stdcall Dismiss() noexcept final try
1544+
{
1545+
typename D::abi_guard guard(this->shim());
1546+
this->shim().Dismiss();
1547+
return 0;
1548+
}
1549+
catch (...) { return to_hresult(); }
1550+
int32_t __stdcall add_EndRequested(void* handler, winrt::event_token* token) noexcept final try
1551+
{
1552+
zero_abi<winrt::event_token>(token);
1553+
typename D::abi_guard guard(this->shim());
1554+
*token = detach_from<winrt::event_token>(this->shim().EndRequested(*reinterpret_cast<winrt::Windows::Foundation::TypedEventHandler<winrt::Windows::ApplicationModel::Calls::LockScreenCallUI, winrt::Windows::ApplicationModel::Calls::LockScreenCallEndRequestedEventArgs> const*>(&handler)));
1555+
return 0;
1556+
}
1557+
catch (...) { return to_hresult(); }
1558+
int32_t __stdcall remove_EndRequested(winrt::event_token token) noexcept final
1559+
{
1560+
typename D::abi_guard guard(this->shim());
1561+
this->shim().EndRequested(*reinterpret_cast<winrt::event_token const*>(&token));
1562+
return 0;
1563+
}
1564+
int32_t __stdcall add_Closed(void* handler, winrt::event_token* token) noexcept final try
1565+
{
1566+
zero_abi<winrt::event_token>(token);
1567+
typename D::abi_guard guard(this->shim());
1568+
*token = detach_from<winrt::event_token>(this->shim().Closed(*reinterpret_cast<winrt::Windows::Foundation::TypedEventHandler<winrt::Windows::ApplicationModel::Calls::LockScreenCallUI, winrt::Windows::Foundation::IInspectable> const*>(&handler)));
1569+
return 0;
1570+
}
1571+
catch (...) { return to_hresult(); }
1572+
int32_t __stdcall remove_Closed(winrt::event_token token) noexcept final
1573+
{
1574+
typename D::abi_guard guard(this->shim());
1575+
this->shim().Closed(*reinterpret_cast<winrt::event_token const*>(&token));
1576+
return 0;
1577+
}
1578+
int32_t __stdcall get_CallTitle(void** value) noexcept final try
1579+
{
1580+
clear_abi(value);
1581+
typename D::abi_guard guard(this->shim());
1582+
*value = detach_from<hstring>(this->shim().CallTitle());
1583+
return 0;
1584+
}
1585+
catch (...) { return to_hresult(); }
1586+
int32_t __stdcall put_CallTitle(void* value) noexcept final try
1587+
{
1588+
typename D::abi_guard guard(this->shim());
1589+
this->shim().CallTitle(*reinterpret_cast<hstring const*>(&value));
1590+
return 0;
1591+
}
1592+
catch (...) { return to_hresult(); }
1593+
};
1594+
#endif
14461595
#ifndef WINRT_LEAN_AND_MEAN
14471596
template <typename D>
14481597
struct produce<D, winrt::Windows::ApplicationModel::Calls::IMuteChangeEventArgs> : produce_base<D, winrt::Windows::ApplicationModel::Calls::IMuteChangeEventArgs>
@@ -3649,6 +3798,9 @@ namespace std
36493798
template<> struct hash<winrt::Windows::ApplicationModel::Calls::ICallAnswerEventArgs> : winrt::impl::hash_base {};
36503799
template<> struct hash<winrt::Windows::ApplicationModel::Calls::ICallRejectEventArgs> : winrt::impl::hash_base {};
36513800
template<> struct hash<winrt::Windows::ApplicationModel::Calls::ICallStateChangeEventArgs> : winrt::impl::hash_base {};
3801+
template<> struct hash<winrt::Windows::ApplicationModel::Calls::ILockScreenCallEndCallDeferral> : winrt::impl::hash_base {};
3802+
template<> struct hash<winrt::Windows::ApplicationModel::Calls::ILockScreenCallEndRequestedEventArgs> : winrt::impl::hash_base {};
3803+
template<> struct hash<winrt::Windows::ApplicationModel::Calls::ILockScreenCallUI> : winrt::impl::hash_base {};
36523804
template<> struct hash<winrt::Windows::ApplicationModel::Calls::IMuteChangeEventArgs> : winrt::impl::hash_base {};
36533805
template<> struct hash<winrt::Windows::ApplicationModel::Calls::IPhoneCall> : winrt::impl::hash_base {};
36543806
template<> struct hash<winrt::Windows::ApplicationModel::Calls::IPhoneCallBlockingStatics> : winrt::impl::hash_base {};
@@ -3694,6 +3846,9 @@ namespace std
36943846
template<> struct hash<winrt::Windows::ApplicationModel::Calls::CallAnswerEventArgs> : winrt::impl::hash_base {};
36953847
template<> struct hash<winrt::Windows::ApplicationModel::Calls::CallRejectEventArgs> : winrt::impl::hash_base {};
36963848
template<> struct hash<winrt::Windows::ApplicationModel::Calls::CallStateChangeEventArgs> : winrt::impl::hash_base {};
3849+
template<> struct hash<winrt::Windows::ApplicationModel::Calls::LockScreenCallEndCallDeferral> : winrt::impl::hash_base {};
3850+
template<> struct hash<winrt::Windows::ApplicationModel::Calls::LockScreenCallEndRequestedEventArgs> : winrt::impl::hash_base {};
3851+
template<> struct hash<winrt::Windows::ApplicationModel::Calls::LockScreenCallUI> : winrt::impl::hash_base {};
36973852
template<> struct hash<winrt::Windows::ApplicationModel::Calls::MuteChangeEventArgs> : winrt::impl::hash_base {};
36983853
template<> struct hash<winrt::Windows::ApplicationModel::Calls::PhoneCall> : winrt::impl::hash_base {};
36993854
template<> struct hash<winrt::Windows::ApplicationModel::Calls::PhoneCallBlocking> : winrt::impl::hash_base {};
Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
// WARNING: Please don't edit this file. It was generated by C++/WinRT v2.0.220607.4
2+
3+
#pragma once
4+
#ifndef WINRT_Windows_ApplicationModel_Preview_InkWorkspace_H
5+
#define WINRT_Windows_ApplicationModel_Preview_InkWorkspace_H
6+
#include "winrt/base.h"
7+
static_assert(winrt::check_version(CPPWINRT_VERSION, "2.0.220607.4"), "Mismatched C++/WinRT headers.");
8+
#define CPPWINRT_VERSION "2.0.220607.4"
9+
#include "winrt/Windows.ApplicationModel.h"
10+
#include "winrt/impl/Windows.Foundation.2.h"
11+
#include "winrt/impl/Windows.Graphics.Imaging.2.h"
12+
#include "winrt/impl/Windows.ApplicationModel.Preview.InkWorkspace.2.h"
13+
namespace winrt::impl
14+
{
15+
template <typename D> auto consume_Windows_ApplicationModel_Preview_InkWorkspace_IInkWorkspaceHostedAppManager<D>::SetThumbnailAsync(winrt::Windows::Graphics::Imaging::SoftwareBitmap const& bitmap) const
16+
{
17+
void* action{};
18+
check_hresult(WINRT_IMPL_SHIM(winrt::Windows::ApplicationModel::Preview::InkWorkspace::IInkWorkspaceHostedAppManager)->SetThumbnailAsync(*(void**)(&bitmap), &action));
19+
return winrt::Windows::Foundation::IAsyncAction{ action, take_ownership_from_abi };
20+
}
21+
template <typename D> auto consume_Windows_ApplicationModel_Preview_InkWorkspace_IInkWorkspaceHostedAppManagerStatics<D>::GetForCurrentApp() const
22+
{
23+
void* current{};
24+
check_hresult(WINRT_IMPL_SHIM(winrt::Windows::ApplicationModel::Preview::InkWorkspace::IInkWorkspaceHostedAppManagerStatics)->GetForCurrentApp(&current));
25+
return winrt::Windows::ApplicationModel::Preview::InkWorkspace::InkWorkspaceHostedAppManager{ current, take_ownership_from_abi };
26+
}
27+
#ifndef WINRT_LEAN_AND_MEAN
28+
template <typename D>
29+
struct produce<D, winrt::Windows::ApplicationModel::Preview::InkWorkspace::IInkWorkspaceHostedAppManager> : produce_base<D, winrt::Windows::ApplicationModel::Preview::InkWorkspace::IInkWorkspaceHostedAppManager>
30+
{
31+
int32_t __stdcall SetThumbnailAsync(void* bitmap, void** action) noexcept final try
32+
{
33+
clear_abi(action);
34+
typename D::abi_guard guard(this->shim());
35+
*action = detach_from<winrt::Windows::Foundation::IAsyncAction>(this->shim().SetThumbnailAsync(*reinterpret_cast<winrt::Windows::Graphics::Imaging::SoftwareBitmap const*>(&bitmap)));
36+
return 0;
37+
}
38+
catch (...) { return to_hresult(); }
39+
};
40+
#endif
41+
#ifndef WINRT_LEAN_AND_MEAN
42+
template <typename D>
43+
struct produce<D, winrt::Windows::ApplicationModel::Preview::InkWorkspace::IInkWorkspaceHostedAppManagerStatics> : produce_base<D, winrt::Windows::ApplicationModel::Preview::InkWorkspace::IInkWorkspaceHostedAppManagerStatics>
44+
{
45+
int32_t __stdcall GetForCurrentApp(void** current) noexcept final try
46+
{
47+
clear_abi(current);
48+
typename D::abi_guard guard(this->shim());
49+
*current = detach_from<winrt::Windows::ApplicationModel::Preview::InkWorkspace::InkWorkspaceHostedAppManager>(this->shim().GetForCurrentApp());
50+
return 0;
51+
}
52+
catch (...) { return to_hresult(); }
53+
};
54+
#endif
55+
}
56+
WINRT_EXPORT namespace winrt::Windows::ApplicationModel::Preview::InkWorkspace
57+
{
58+
inline auto InkWorkspaceHostedAppManager::GetForCurrentApp()
59+
{
60+
return impl::call_factory_cast<winrt::Windows::ApplicationModel::Preview::InkWorkspace::InkWorkspaceHostedAppManager(*)(IInkWorkspaceHostedAppManagerStatics const&), InkWorkspaceHostedAppManager, IInkWorkspaceHostedAppManagerStatics>([](IInkWorkspaceHostedAppManagerStatics const& f) { return f.GetForCurrentApp(); });
61+
}
62+
}
63+
namespace std
64+
{
65+
#ifndef WINRT_LEAN_AND_MEAN
66+
template<> struct hash<winrt::Windows::ApplicationModel::Preview::InkWorkspace::IInkWorkspaceHostedAppManager> : winrt::impl::hash_base {};
67+
template<> struct hash<winrt::Windows::ApplicationModel::Preview::InkWorkspace::IInkWorkspaceHostedAppManagerStatics> : winrt::impl::hash_base {};
68+
template<> struct hash<winrt::Windows::ApplicationModel::Preview::InkWorkspace::InkWorkspaceHostedAppManager> : winrt::impl::hash_base {};
69+
#endif
70+
#ifdef __cpp_lib_format
71+
#endif
72+
}
73+
#endif

0 commit comments

Comments
 (0)