// WARNING: Please don't edit this file. It was generated by C++/WinRT v2.0.240405.15 #pragma once #ifndef WINRT_Windows_Devices_Input_Preview_H #define WINRT_Windows_Devices_Input_Preview_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.Devices.Input.h" #include "winrt/impl/Windows.Devices.HumanInterfaceDevice.2.h" #include "winrt/impl/Windows.Foundation.2.h" #include "winrt/impl/Windows.Foundation.Collections.2.h" #include "winrt/impl/Windows.Devices.Input.Preview.2.h" namespace winrt::impl { template auto consume_Windows_Devices_Input_Preview_IGazeDevicePreview::Id() const { uint32_t value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Devices::Input::Preview::IGazeDevicePreview)->get_Id(&value)); return value; } template auto consume_Windows_Devices_Input_Preview_IGazeDevicePreview::CanTrackEyes() const { bool value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Devices::Input::Preview::IGazeDevicePreview)->get_CanTrackEyes(&value)); return value; } template auto consume_Windows_Devices_Input_Preview_IGazeDevicePreview::CanTrackHead() const { bool value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Devices::Input::Preview::IGazeDevicePreview)->get_CanTrackHead(&value)); return value; } template auto consume_Windows_Devices_Input_Preview_IGazeDevicePreview::ConfigurationState() const { winrt::Windows::Devices::Input::Preview::GazeDeviceConfigurationStatePreview value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Devices::Input::Preview::IGazeDevicePreview)->get_ConfigurationState(reinterpret_cast(&value))); return value; } template auto consume_Windows_Devices_Input_Preview_IGazeDevicePreview::RequestCalibrationAsync() const { void* operation{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Devices::Input::Preview::IGazeDevicePreview)->RequestCalibrationAsync(&operation)); return winrt::Windows::Foundation::IAsyncOperation{ operation, take_ownership_from_abi }; } template auto consume_Windows_Devices_Input_Preview_IGazeDevicePreview::GetNumericControlDescriptions(uint16_t usagePage, uint16_t usageId) const { void* result{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Devices::Input::Preview::IGazeDevicePreview)->GetNumericControlDescriptions(usagePage, usageId, &result)); return winrt::Windows::Foundation::Collections::IVectorView{ result, take_ownership_from_abi }; } template auto consume_Windows_Devices_Input_Preview_IGazeDevicePreview::GetBooleanControlDescriptions(uint16_t usagePage, uint16_t usageId) const { void* result{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Devices::Input::Preview::IGazeDevicePreview)->GetBooleanControlDescriptions(usagePage, usageId, &result)); return winrt::Windows::Foundation::Collections::IVectorView{ result, take_ownership_from_abi }; } template auto consume_Windows_Devices_Input_Preview_IGazeDeviceWatcherAddedPreviewEventArgs::Device() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Devices::Input::Preview::IGazeDeviceWatcherAddedPreviewEventArgs)->get_Device(&value)); return winrt::Windows::Devices::Input::Preview::GazeDevicePreview{ value, take_ownership_from_abi }; } template auto consume_Windows_Devices_Input_Preview_IGazeDeviceWatcherPreview::Added(winrt::Windows::Foundation::TypedEventHandler const& handler) const { winrt::event_token token{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Devices::Input::Preview::IGazeDeviceWatcherPreview)->add_Added(*(void**)(&handler), put_abi(token))); return token; } template auto consume_Windows_Devices_Input_Preview_IGazeDeviceWatcherPreview::Added(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler const& handler) const { return impl::make_event_revoker(this, Added(handler)); } template auto consume_Windows_Devices_Input_Preview_IGazeDeviceWatcherPreview::Added(winrt::event_token const& token) const noexcept { WINRT_IMPL_SHIM(winrt::Windows::Devices::Input::Preview::IGazeDeviceWatcherPreview)->remove_Added(impl::bind_in(token)); } template auto consume_Windows_Devices_Input_Preview_IGazeDeviceWatcherPreview::Removed(winrt::Windows::Foundation::TypedEventHandler const& handler) const { winrt::event_token token{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Devices::Input::Preview::IGazeDeviceWatcherPreview)->add_Removed(*(void**)(&handler), put_abi(token))); return token; } template auto consume_Windows_Devices_Input_Preview_IGazeDeviceWatcherPreview::Removed(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler const& handler) const { return impl::make_event_revoker(this, Removed(handler)); } template auto consume_Windows_Devices_Input_Preview_IGazeDeviceWatcherPreview::Removed(winrt::event_token const& token) const noexcept { WINRT_IMPL_SHIM(winrt::Windows::Devices::Input::Preview::IGazeDeviceWatcherPreview)->remove_Removed(impl::bind_in(token)); } template auto consume_Windows_Devices_Input_Preview_IGazeDeviceWatcherPreview::Updated(winrt::Windows::Foundation::TypedEventHandler const& handler) const { winrt::event_token token{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Devices::Input::Preview::IGazeDeviceWatcherPreview)->add_Updated(*(void**)(&handler), put_abi(token))); return token; } template auto consume_Windows_Devices_Input_Preview_IGazeDeviceWatcherPreview::Updated(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler const& handler) const { return impl::make_event_revoker(this, Updated(handler)); } template auto consume_Windows_Devices_Input_Preview_IGazeDeviceWatcherPreview::Updated(winrt::event_token const& token) const noexcept { WINRT_IMPL_SHIM(winrt::Windows::Devices::Input::Preview::IGazeDeviceWatcherPreview)->remove_Updated(impl::bind_in(token)); } template auto consume_Windows_Devices_Input_Preview_IGazeDeviceWatcherPreview::EnumerationCompleted(winrt::Windows::Foundation::TypedEventHandler const& handler) const { winrt::event_token token{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Devices::Input::Preview::IGazeDeviceWatcherPreview)->add_EnumerationCompleted(*(void**)(&handler), put_abi(token))); return token; } template auto consume_Windows_Devices_Input_Preview_IGazeDeviceWatcherPreview::EnumerationCompleted(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler const& handler) const { return impl::make_event_revoker(this, EnumerationCompleted(handler)); } template auto consume_Windows_Devices_Input_Preview_IGazeDeviceWatcherPreview::EnumerationCompleted(winrt::event_token const& token) const noexcept { WINRT_IMPL_SHIM(winrt::Windows::Devices::Input::Preview::IGazeDeviceWatcherPreview)->remove_EnumerationCompleted(impl::bind_in(token)); } template auto consume_Windows_Devices_Input_Preview_IGazeDeviceWatcherPreview::Start() const { check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Devices::Input::Preview::IGazeDeviceWatcherPreview)->Start()); } template auto consume_Windows_Devices_Input_Preview_IGazeDeviceWatcherPreview::Stop() const { check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Devices::Input::Preview::IGazeDeviceWatcherPreview)->Stop()); } template auto consume_Windows_Devices_Input_Preview_IGazeDeviceWatcherRemovedPreviewEventArgs::Device() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Devices::Input::Preview::IGazeDeviceWatcherRemovedPreviewEventArgs)->get_Device(&value)); return winrt::Windows::Devices::Input::Preview::GazeDevicePreview{ value, take_ownership_from_abi }; } template auto consume_Windows_Devices_Input_Preview_IGazeDeviceWatcherUpdatedPreviewEventArgs::Device() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Devices::Input::Preview::IGazeDeviceWatcherUpdatedPreviewEventArgs)->get_Device(&value)); return winrt::Windows::Devices::Input::Preview::GazeDevicePreview{ value, take_ownership_from_abi }; } template auto consume_Windows_Devices_Input_Preview_IGazeEnteredPreviewEventArgs::Handled() const { bool value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Devices::Input::Preview::IGazeEnteredPreviewEventArgs)->get_Handled(&value)); return value; } template auto consume_Windows_Devices_Input_Preview_IGazeEnteredPreviewEventArgs::Handled(bool value) const { check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Devices::Input::Preview::IGazeEnteredPreviewEventArgs)->put_Handled(value)); } template auto consume_Windows_Devices_Input_Preview_IGazeEnteredPreviewEventArgs::CurrentPoint() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Devices::Input::Preview::IGazeEnteredPreviewEventArgs)->get_CurrentPoint(&value)); return winrt::Windows::Devices::Input::Preview::GazePointPreview{ value, take_ownership_from_abi }; } template auto consume_Windows_Devices_Input_Preview_IGazeExitedPreviewEventArgs::Handled() const { bool value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Devices::Input::Preview::IGazeExitedPreviewEventArgs)->get_Handled(&value)); return value; } template auto consume_Windows_Devices_Input_Preview_IGazeExitedPreviewEventArgs::Handled(bool value) const { check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Devices::Input::Preview::IGazeExitedPreviewEventArgs)->put_Handled(value)); } template auto consume_Windows_Devices_Input_Preview_IGazeExitedPreviewEventArgs::CurrentPoint() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Devices::Input::Preview::IGazeExitedPreviewEventArgs)->get_CurrentPoint(&value)); return winrt::Windows::Devices::Input::Preview::GazePointPreview{ value, take_ownership_from_abi }; } template auto consume_Windows_Devices_Input_Preview_IGazeInputSourcePreview::GazeMoved(winrt::Windows::Foundation::TypedEventHandler const& handler) const { winrt::event_token token{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Devices::Input::Preview::IGazeInputSourcePreview)->add_GazeMoved(*(void**)(&handler), put_abi(token))); return token; } template auto consume_Windows_Devices_Input_Preview_IGazeInputSourcePreview::GazeMoved(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler const& handler) const { return impl::make_event_revoker(this, GazeMoved(handler)); } template auto consume_Windows_Devices_Input_Preview_IGazeInputSourcePreview::GazeMoved(winrt::event_token const& token) const noexcept { WINRT_IMPL_SHIM(winrt::Windows::Devices::Input::Preview::IGazeInputSourcePreview)->remove_GazeMoved(impl::bind_in(token)); } template auto consume_Windows_Devices_Input_Preview_IGazeInputSourcePreview::GazeEntered(winrt::Windows::Foundation::TypedEventHandler const& handler) const { winrt::event_token token{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Devices::Input::Preview::IGazeInputSourcePreview)->add_GazeEntered(*(void**)(&handler), put_abi(token))); return token; } template auto consume_Windows_Devices_Input_Preview_IGazeInputSourcePreview::GazeEntered(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler const& handler) const { return impl::make_event_revoker(this, GazeEntered(handler)); } template auto consume_Windows_Devices_Input_Preview_IGazeInputSourcePreview::GazeEntered(winrt::event_token const& token) const noexcept { WINRT_IMPL_SHIM(winrt::Windows::Devices::Input::Preview::IGazeInputSourcePreview)->remove_GazeEntered(impl::bind_in(token)); } template auto consume_Windows_Devices_Input_Preview_IGazeInputSourcePreview::GazeExited(winrt::Windows::Foundation::TypedEventHandler const& handler) const { winrt::event_token token{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Devices::Input::Preview::IGazeInputSourcePreview)->add_GazeExited(*(void**)(&handler), put_abi(token))); return token; } template auto consume_Windows_Devices_Input_Preview_IGazeInputSourcePreview::GazeExited(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler const& handler) const { return impl::make_event_revoker(this, GazeExited(handler)); } template auto consume_Windows_Devices_Input_Preview_IGazeInputSourcePreview::GazeExited(winrt::event_token const& token) const noexcept { WINRT_IMPL_SHIM(winrt::Windows::Devices::Input::Preview::IGazeInputSourcePreview)->remove_GazeExited(impl::bind_in(token)); } template auto consume_Windows_Devices_Input_Preview_IGazeInputSourcePreviewStatics::GetForCurrentView() const { void* result{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Devices::Input::Preview::IGazeInputSourcePreviewStatics)->GetForCurrentView(&result)); return winrt::Windows::Devices::Input::Preview::GazeInputSourcePreview{ result, take_ownership_from_abi }; } template auto consume_Windows_Devices_Input_Preview_IGazeInputSourcePreviewStatics::CreateWatcher() const { void* result{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Devices::Input::Preview::IGazeInputSourcePreviewStatics)->CreateWatcher(&result)); return winrt::Windows::Devices::Input::Preview::GazeDeviceWatcherPreview{ result, take_ownership_from_abi }; } template auto consume_Windows_Devices_Input_Preview_IGazeMovedPreviewEventArgs::Handled() const { bool value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Devices::Input::Preview::IGazeMovedPreviewEventArgs)->get_Handled(&value)); return value; } template auto consume_Windows_Devices_Input_Preview_IGazeMovedPreviewEventArgs::Handled(bool value) const { check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Devices::Input::Preview::IGazeMovedPreviewEventArgs)->put_Handled(value)); } template auto consume_Windows_Devices_Input_Preview_IGazeMovedPreviewEventArgs::CurrentPoint() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Devices::Input::Preview::IGazeMovedPreviewEventArgs)->get_CurrentPoint(&value)); return winrt::Windows::Devices::Input::Preview::GazePointPreview{ value, take_ownership_from_abi }; } template auto consume_Windows_Devices_Input_Preview_IGazeMovedPreviewEventArgs::GetIntermediatePoints() const { void* result{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Devices::Input::Preview::IGazeMovedPreviewEventArgs)->GetIntermediatePoints(&result)); return winrt::Windows::Foundation::Collections::IVector{ result, take_ownership_from_abi }; } template auto consume_Windows_Devices_Input_Preview_IGazePointPreview::SourceDevice() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Devices::Input::Preview::IGazePointPreview)->get_SourceDevice(&value)); return winrt::Windows::Devices::Input::Preview::GazeDevicePreview{ value, take_ownership_from_abi }; } template auto consume_Windows_Devices_Input_Preview_IGazePointPreview::EyeGazePosition() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Devices::Input::Preview::IGazePointPreview)->get_EyeGazePosition(&value)); return winrt::Windows::Foundation::IReference{ value, take_ownership_from_abi }; } template auto consume_Windows_Devices_Input_Preview_IGazePointPreview::HeadGazePosition() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Devices::Input::Preview::IGazePointPreview)->get_HeadGazePosition(&value)); return winrt::Windows::Foundation::IReference{ value, take_ownership_from_abi }; } template auto consume_Windows_Devices_Input_Preview_IGazePointPreview::Timestamp() const { uint64_t value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Devices::Input::Preview::IGazePointPreview)->get_Timestamp(&value)); return value; } template auto consume_Windows_Devices_Input_Preview_IGazePointPreview::HidInputReport() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Devices::Input::Preview::IGazePointPreview)->get_HidInputReport(&value)); return winrt::Windows::Devices::HumanInterfaceDevice::HidInputReport{ value, take_ownership_from_abi }; } #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_Id(uint32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Id()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_CanTrackEyes(bool* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().CanTrackEyes()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_CanTrackHead(bool* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().CanTrackHead()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_ConfigurationState(int32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().ConfigurationState()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall RequestCalibrationAsync(void** operation) noexcept final try { clear_abi(operation); typename D::abi_guard guard(this->shim()); *operation = detach_from>(this->shim().RequestCalibrationAsync()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall GetNumericControlDescriptions(uint16_t usagePage, uint16_t usageId, void** result) noexcept final try { clear_abi(result); typename D::abi_guard guard(this->shim()); *result = detach_from>(this->shim().GetNumericControlDescriptions(usagePage, usageId)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall GetBooleanControlDescriptions(uint16_t usagePage, uint16_t usageId, void** result) noexcept final try { clear_abi(result); typename D::abi_guard guard(this->shim()); *result = detach_from>(this->shim().GetBooleanControlDescriptions(usagePage, usageId)); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_Device(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Device()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall add_Added(void* handler, winrt::event_token* token) noexcept final try { zero_abi(token); typename D::abi_guard guard(this->shim()); *token = detach_from(this->shim().Added(*reinterpret_cast const*>(&handler))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall remove_Added(winrt::event_token token) noexcept final { typename D::abi_guard guard(this->shim()); this->shim().Added(*reinterpret_cast(&token)); return 0; } int32_t __stdcall add_Removed(void* handler, winrt::event_token* token) noexcept final try { zero_abi(token); typename D::abi_guard guard(this->shim()); *token = detach_from(this->shim().Removed(*reinterpret_cast const*>(&handler))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall remove_Removed(winrt::event_token token) noexcept final { typename D::abi_guard guard(this->shim()); this->shim().Removed(*reinterpret_cast(&token)); return 0; } int32_t __stdcall add_Updated(void* handler, winrt::event_token* token) noexcept final try { zero_abi(token); typename D::abi_guard guard(this->shim()); *token = detach_from(this->shim().Updated(*reinterpret_cast const*>(&handler))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall remove_Updated(winrt::event_token token) noexcept final { typename D::abi_guard guard(this->shim()); this->shim().Updated(*reinterpret_cast(&token)); return 0; } int32_t __stdcall add_EnumerationCompleted(void* handler, winrt::event_token* token) noexcept final try { zero_abi(token); typename D::abi_guard guard(this->shim()); *token = detach_from(this->shim().EnumerationCompleted(*reinterpret_cast const*>(&handler))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall remove_EnumerationCompleted(winrt::event_token token) noexcept final { typename D::abi_guard guard(this->shim()); this->shim().EnumerationCompleted(*reinterpret_cast(&token)); return 0; } int32_t __stdcall Start() noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().Start(); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall Stop() noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().Stop(); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_Device(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Device()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_Device(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Device()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_Handled(bool* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Handled()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_Handled(bool value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().Handled(value); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_CurrentPoint(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().CurrentPoint()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_Handled(bool* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Handled()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_Handled(bool value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().Handled(value); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_CurrentPoint(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().CurrentPoint()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall add_GazeMoved(void* handler, winrt::event_token* token) noexcept final try { zero_abi(token); typename D::abi_guard guard(this->shim()); *token = detach_from(this->shim().GazeMoved(*reinterpret_cast const*>(&handler))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall remove_GazeMoved(winrt::event_token token) noexcept final { typename D::abi_guard guard(this->shim()); this->shim().GazeMoved(*reinterpret_cast(&token)); return 0; } int32_t __stdcall add_GazeEntered(void* handler, winrt::event_token* token) noexcept final try { zero_abi(token); typename D::abi_guard guard(this->shim()); *token = detach_from(this->shim().GazeEntered(*reinterpret_cast const*>(&handler))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall remove_GazeEntered(winrt::event_token token) noexcept final { typename D::abi_guard guard(this->shim()); this->shim().GazeEntered(*reinterpret_cast(&token)); return 0; } int32_t __stdcall add_GazeExited(void* handler, winrt::event_token* token) noexcept final try { zero_abi(token); typename D::abi_guard guard(this->shim()); *token = detach_from(this->shim().GazeExited(*reinterpret_cast const*>(&handler))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall remove_GazeExited(winrt::event_token token) noexcept final { typename D::abi_guard guard(this->shim()); this->shim().GazeExited(*reinterpret_cast(&token)); return 0; } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall GetForCurrentView(void** result) noexcept final try { clear_abi(result); typename D::abi_guard guard(this->shim()); *result = detach_from(this->shim().GetForCurrentView()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall CreateWatcher(void** result) noexcept final try { clear_abi(result); typename D::abi_guard guard(this->shim()); *result = detach_from(this->shim().CreateWatcher()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_Handled(bool* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Handled()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_Handled(bool value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().Handled(value); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_CurrentPoint(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().CurrentPoint()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall GetIntermediatePoints(void** result) noexcept final try { clear_abi(result); typename D::abi_guard guard(this->shim()); *result = detach_from>(this->shim().GetIntermediatePoints()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_SourceDevice(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().SourceDevice()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_EyeGazePosition(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from>(this->shim().EyeGazePosition()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_HeadGazePosition(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from>(this->shim().HeadGazePosition()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_Timestamp(uint64_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Timestamp()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_HidInputReport(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().HidInputReport()); return 0; } catch (...) { return to_hresult(); } }; #endif } WINRT_EXPORT namespace winrt::Windows::Devices::Input::Preview { inline auto GazeInputSourcePreview::GetForCurrentView() { return impl::call_factory_cast([](IGazeInputSourcePreviewStatics const& f) { return f.GetForCurrentView(); }); } inline auto GazeInputSourcePreview::CreateWatcher() { return impl::call_factory_cast([](IGazeInputSourcePreviewStatics const& f) { return f.CreateWatcher(); }); } } 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 {}; #endif #ifdef __cpp_lib_format #endif } #endif