// WARNING: Please don't edit this file. It was generated by C++/WinRT v2.0.240405.15 #pragma once #ifndef WINRT_Windows_ApplicationModel_Preview_Notes_H #define WINRT_Windows_ApplicationModel_Preview_Notes_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/Windows.ApplicationModel.h" #include "winrt/impl/Windows.Foundation.2.h" #include "winrt/impl/Windows.Graphics.Imaging.2.h" #include "winrt/impl/Windows.Storage.Streams.2.h" #include "winrt/impl/Windows.ApplicationModel.Preview.Notes.2.h" namespace winrt::impl { template auto consume_Windows_ApplicationModel_Preview_Notes_INotePlacementChangedPreviewEventArgs::ViewId() const { int32_t value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::ApplicationModel::Preview::Notes::INotePlacementChangedPreviewEventArgs)->get_ViewId(&value)); return value; } template auto consume_Windows_ApplicationModel_Preview_Notes_INoteVisibilityChangedPreviewEventArgs::ViewId() const { int32_t value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::ApplicationModel::Preview::Notes::INoteVisibilityChangedPreviewEventArgs)->get_ViewId(&value)); return value; } template auto consume_Windows_ApplicationModel_Preview_Notes_INoteVisibilityChangedPreviewEventArgs::IsVisible() const { bool value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::ApplicationModel::Preview::Notes::INoteVisibilityChangedPreviewEventArgs)->get_IsVisible(&value)); return value; } template auto consume_Windows_ApplicationModel_Preview_Notes_INotesWindowManagerPreview::IsScreenLocked() const { bool value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::ApplicationModel::Preview::Notes::INotesWindowManagerPreview)->get_IsScreenLocked(&value)); return value; } template auto consume_Windows_ApplicationModel_Preview_Notes_INotesWindowManagerPreview::ShowNote(int32_t noteViewId) const { check_hresult(WINRT_IMPL_SHIM(winrt::Windows::ApplicationModel::Preview::Notes::INotesWindowManagerPreview)->ShowNote(noteViewId)); } template auto consume_Windows_ApplicationModel_Preview_Notes_INotesWindowManagerPreview::ShowNoteRelativeTo(int32_t noteViewId, int32_t anchorNoteViewId) const { check_hresult(WINRT_IMPL_SHIM(winrt::Windows::ApplicationModel::Preview::Notes::INotesWindowManagerPreview)->ShowNoteRelativeTo(noteViewId, anchorNoteViewId)); } template auto consume_Windows_ApplicationModel_Preview_Notes_INotesWindowManagerPreview::ShowNoteWithPlacement(int32_t noteViewId, winrt::Windows::Storage::Streams::IBuffer const& data) const { check_hresult(WINRT_IMPL_SHIM(winrt::Windows::ApplicationModel::Preview::Notes::INotesWindowManagerPreview)->ShowNoteWithPlacement(noteViewId, *(void**)(&data))); } template auto consume_Windows_ApplicationModel_Preview_Notes_INotesWindowManagerPreview::HideNote(int32_t noteViewId) const { check_hresult(WINRT_IMPL_SHIM(winrt::Windows::ApplicationModel::Preview::Notes::INotesWindowManagerPreview)->HideNote(noteViewId)); } template auto consume_Windows_ApplicationModel_Preview_Notes_INotesWindowManagerPreview::GetNotePlacement(int32_t noteViewId) const { void* data{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::ApplicationModel::Preview::Notes::INotesWindowManagerPreview)->GetNotePlacement(noteViewId, &data)); return winrt::Windows::Storage::Streams::IBuffer{ data, take_ownership_from_abi }; } template auto consume_Windows_ApplicationModel_Preview_Notes_INotesWindowManagerPreview::TrySetNoteSize(int32_t noteViewId, winrt::Windows::Foundation::Size const& size) const { bool succeeded{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::ApplicationModel::Preview::Notes::INotesWindowManagerPreview)->TrySetNoteSize(noteViewId, impl::bind_in(size), &succeeded)); return succeeded; } template auto consume_Windows_ApplicationModel_Preview_Notes_INotesWindowManagerPreview::SetFocusToNextView() const { check_hresult(WINRT_IMPL_SHIM(winrt::Windows::ApplicationModel::Preview::Notes::INotesWindowManagerPreview)->SetFocusToNextView()); } template auto consume_Windows_ApplicationModel_Preview_Notes_INotesWindowManagerPreview::SetNotesThumbnailAsync(winrt::Windows::Storage::Streams::IBuffer const& thumbnail) const { void* operation{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::ApplicationModel::Preview::Notes::INotesWindowManagerPreview)->SetNotesThumbnailAsync(*(void**)(&thumbnail), &operation)); return winrt::Windows::Foundation::IAsyncAction{ operation, take_ownership_from_abi }; } template auto consume_Windows_ApplicationModel_Preview_Notes_INotesWindowManagerPreview::SystemLockStateChanged(winrt::Windows::Foundation::TypedEventHandler const& handler) const { winrt::event_token token{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::ApplicationModel::Preview::Notes::INotesWindowManagerPreview)->add_SystemLockStateChanged(*(void**)(&handler), put_abi(token))); return token; } template auto consume_Windows_ApplicationModel_Preview_Notes_INotesWindowManagerPreview::SystemLockStateChanged(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler const& handler) const { return impl::make_event_revoker(this, SystemLockStateChanged(handler)); } template auto consume_Windows_ApplicationModel_Preview_Notes_INotesWindowManagerPreview::SystemLockStateChanged(winrt::event_token const& token) const noexcept { WINRT_IMPL_SHIM(winrt::Windows::ApplicationModel::Preview::Notes::INotesWindowManagerPreview)->remove_SystemLockStateChanged(impl::bind_in(token)); } template auto consume_Windows_ApplicationModel_Preview_Notes_INotesWindowManagerPreview::NotePlacementChanged(winrt::Windows::Foundation::TypedEventHandler const& handler) const { winrt::event_token token{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::ApplicationModel::Preview::Notes::INotesWindowManagerPreview)->add_NotePlacementChanged(*(void**)(&handler), put_abi(token))); return token; } template auto consume_Windows_ApplicationModel_Preview_Notes_INotesWindowManagerPreview::NotePlacementChanged(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler const& handler) const { return impl::make_event_revoker(this, NotePlacementChanged(handler)); } template auto consume_Windows_ApplicationModel_Preview_Notes_INotesWindowManagerPreview::NotePlacementChanged(winrt::event_token const& token) const noexcept { WINRT_IMPL_SHIM(winrt::Windows::ApplicationModel::Preview::Notes::INotesWindowManagerPreview)->remove_NotePlacementChanged(impl::bind_in(token)); } template auto consume_Windows_ApplicationModel_Preview_Notes_INotesWindowManagerPreview::NoteVisibilityChanged(winrt::Windows::Foundation::TypedEventHandler const& handler) const { winrt::event_token token{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::ApplicationModel::Preview::Notes::INotesWindowManagerPreview)->add_NoteVisibilityChanged(*(void**)(&handler), put_abi(token))); return token; } template auto consume_Windows_ApplicationModel_Preview_Notes_INotesWindowManagerPreview::NoteVisibilityChanged(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler const& handler) const { return impl::make_event_revoker(this, NoteVisibilityChanged(handler)); } template auto consume_Windows_ApplicationModel_Preview_Notes_INotesWindowManagerPreview::NoteVisibilityChanged(winrt::event_token const& token) const noexcept { WINRT_IMPL_SHIM(winrt::Windows::ApplicationModel::Preview::Notes::INotesWindowManagerPreview)->remove_NoteVisibilityChanged(impl::bind_in(token)); } template auto consume_Windows_ApplicationModel_Preview_Notes_INotesWindowManagerPreview2::ShowNoteRelativeTo(int32_t noteViewId, int32_t anchorNoteViewId, winrt::Windows::ApplicationModel::Preview::Notes::NotesWindowManagerPreviewShowNoteOptions const& options) const { check_hresult(WINRT_IMPL_SHIM(winrt::Windows::ApplicationModel::Preview::Notes::INotesWindowManagerPreview2)->ShowNoteRelativeToWithOptions(noteViewId, anchorNoteViewId, *(void**)(&options))); } template auto consume_Windows_ApplicationModel_Preview_Notes_INotesWindowManagerPreview2::ShowNoteWithPlacement(int32_t noteViewId, winrt::Windows::Storage::Streams::IBuffer const& data, winrt::Windows::ApplicationModel::Preview::Notes::NotesWindowManagerPreviewShowNoteOptions const& options) const { check_hresult(WINRT_IMPL_SHIM(winrt::Windows::ApplicationModel::Preview::Notes::INotesWindowManagerPreview2)->ShowNoteWithPlacementWithOptions(noteViewId, *(void**)(&data), *(void**)(&options))); } template auto consume_Windows_ApplicationModel_Preview_Notes_INotesWindowManagerPreview2::SetFocusToPreviousView() const { check_hresult(WINRT_IMPL_SHIM(winrt::Windows::ApplicationModel::Preview::Notes::INotesWindowManagerPreview2)->SetFocusToPreviousView()); } template auto consume_Windows_ApplicationModel_Preview_Notes_INotesWindowManagerPreview2::SetThumbnailImageForTaskSwitcherAsync(winrt::Windows::Graphics::Imaging::SoftwareBitmap const& bitmap) const { void* action{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::ApplicationModel::Preview::Notes::INotesWindowManagerPreview2)->SetThumbnailImageForTaskSwitcherAsync(*(void**)(&bitmap), &action)); return winrt::Windows::Foundation::IAsyncAction{ action, take_ownership_from_abi }; } template auto consume_Windows_ApplicationModel_Preview_Notes_INotesWindowManagerPreviewShowNoteOptions::ShowWithFocus() const { bool value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::ApplicationModel::Preview::Notes::INotesWindowManagerPreviewShowNoteOptions)->get_ShowWithFocus(&value)); return value; } template auto consume_Windows_ApplicationModel_Preview_Notes_INotesWindowManagerPreviewShowNoteOptions::ShowWithFocus(bool value) const { check_hresult(WINRT_IMPL_SHIM(winrt::Windows::ApplicationModel::Preview::Notes::INotesWindowManagerPreviewShowNoteOptions)->put_ShowWithFocus(value)); } template auto consume_Windows_ApplicationModel_Preview_Notes_INotesWindowManagerPreviewStatics::GetForCurrentApp() const { void* current{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::ApplicationModel::Preview::Notes::INotesWindowManagerPreviewStatics)->GetForCurrentApp(¤t)); return winrt::Windows::ApplicationModel::Preview::Notes::NotesWindowManagerPreview{ current, take_ownership_from_abi }; } #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_ViewId(int32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().ViewId()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_ViewId(int32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().ViewId()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_IsVisible(bool* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().IsVisible()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_IsScreenLocked(bool* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().IsScreenLocked()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall ShowNote(int32_t noteViewId) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().ShowNote(noteViewId); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall ShowNoteRelativeTo(int32_t noteViewId, int32_t anchorNoteViewId) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().ShowNoteRelativeTo(noteViewId, anchorNoteViewId); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall ShowNoteWithPlacement(int32_t noteViewId, void* data) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().ShowNoteWithPlacement(noteViewId, *reinterpret_cast(&data)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall HideNote(int32_t noteViewId) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().HideNote(noteViewId); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall GetNotePlacement(int32_t noteViewId, void** data) noexcept final try { clear_abi(data); typename D::abi_guard guard(this->shim()); *data = detach_from(this->shim().GetNotePlacement(noteViewId)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall TrySetNoteSize(int32_t noteViewId, winrt::Windows::Foundation::Size size, bool* succeeded) noexcept final try { typename D::abi_guard guard(this->shim()); *succeeded = detach_from(this->shim().TrySetNoteSize(noteViewId, *reinterpret_cast(&size))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall SetFocusToNextView() noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().SetFocusToNextView(); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall SetNotesThumbnailAsync(void* thumbnail, void** operation) noexcept final try { clear_abi(operation); typename D::abi_guard guard(this->shim()); *operation = detach_from(this->shim().SetNotesThumbnailAsync(*reinterpret_cast(&thumbnail))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall add_SystemLockStateChanged(void* handler, winrt::event_token* token) noexcept final try { zero_abi(token); typename D::abi_guard guard(this->shim()); *token = detach_from(this->shim().SystemLockStateChanged(*reinterpret_cast const*>(&handler))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall remove_SystemLockStateChanged(winrt::event_token token) noexcept final { typename D::abi_guard guard(this->shim()); this->shim().SystemLockStateChanged(*reinterpret_cast(&token)); return 0; } int32_t __stdcall add_NotePlacementChanged(void* handler, winrt::event_token* token) noexcept final try { zero_abi(token); typename D::abi_guard guard(this->shim()); *token = detach_from(this->shim().NotePlacementChanged(*reinterpret_cast const*>(&handler))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall remove_NotePlacementChanged(winrt::event_token token) noexcept final { typename D::abi_guard guard(this->shim()); this->shim().NotePlacementChanged(*reinterpret_cast(&token)); return 0; } int32_t __stdcall add_NoteVisibilityChanged(void* handler, winrt::event_token* token) noexcept final try { zero_abi(token); typename D::abi_guard guard(this->shim()); *token = detach_from(this->shim().NoteVisibilityChanged(*reinterpret_cast const*>(&handler))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall remove_NoteVisibilityChanged(winrt::event_token token) noexcept final { typename D::abi_guard guard(this->shim()); this->shim().NoteVisibilityChanged(*reinterpret_cast(&token)); return 0; } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall ShowNoteRelativeToWithOptions(int32_t noteViewId, int32_t anchorNoteViewId, void* options) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().ShowNoteRelativeTo(noteViewId, anchorNoteViewId, *reinterpret_cast(&options)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall ShowNoteWithPlacementWithOptions(int32_t noteViewId, void* data, void* options) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().ShowNoteWithPlacement(noteViewId, *reinterpret_cast(&data), *reinterpret_cast(&options)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall SetFocusToPreviousView() noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().SetFocusToPreviousView(); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall SetThumbnailImageForTaskSwitcherAsync(void* bitmap, void** action) noexcept final try { clear_abi(action); typename D::abi_guard guard(this->shim()); *action = detach_from(this->shim().SetThumbnailImageForTaskSwitcherAsync(*reinterpret_cast(&bitmap))); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_ShowWithFocus(bool* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().ShowWithFocus()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_ShowWithFocus(bool value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().ShowWithFocus(value); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall GetForCurrentApp(void** current) noexcept final try { clear_abi(current); typename D::abi_guard guard(this->shim()); *current = detach_from(this->shim().GetForCurrentApp()); return 0; } catch (...) { return to_hresult(); } }; #endif } WINRT_EXPORT namespace winrt::Windows::ApplicationModel::Preview::Notes { inline auto NotesWindowManagerPreview::GetForCurrentApp() { return impl::call_factory_cast([](INotesWindowManagerPreviewStatics const& f) { return f.GetForCurrentApp(); }); } inline NotesWindowManagerPreviewShowNoteOptions::NotesWindowManagerPreviewShowNoteOptions() : NotesWindowManagerPreviewShowNoteOptions(impl::call_factory_cast([](winrt::Windows::Foundation::IActivationFactory const& f) { return f.template ActivateInstance(); })) { } } 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 {}; #endif #ifdef __cpp_lib_format #endif } #endif