// WARNING: Please don't edit this file. It was generated by C++/WinRT v2.0.240405.15 #pragma once #ifndef WINRT_Windows_Data_Text_H #define WINRT_Windows_Data_Text_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/impl/Windows.Foundation.2.h" #include "winrt/impl/Windows.Foundation.Collections.2.h" #include "winrt/impl/Windows.UI.Text.Core.2.h" #include "winrt/impl/Windows.Data.Text.2.h" namespace winrt::impl { template auto consume_Windows_Data_Text_IAlternateWordForm::SourceTextSegment() const { winrt::Windows::Data::Text::TextSegment value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Data::Text::IAlternateWordForm)->get_SourceTextSegment(put_abi(value))); return value; } template auto consume_Windows_Data_Text_IAlternateWordForm::AlternateText() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Data::Text::IAlternateWordForm)->get_AlternateText(&value)); return hstring{ value, take_ownership_from_abi }; } template auto consume_Windows_Data_Text_IAlternateWordForm::NormalizationFormat() const { winrt::Windows::Data::Text::AlternateNormalizationFormat value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Data::Text::IAlternateWordForm)->get_NormalizationFormat(reinterpret_cast(&value))); return value; } template auto consume_Windows_Data_Text_ISelectableWordSegment::Text() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Data::Text::ISelectableWordSegment)->get_Text(&value)); return hstring{ value, take_ownership_from_abi }; } template auto consume_Windows_Data_Text_ISelectableWordSegment::SourceTextSegment() const { winrt::Windows::Data::Text::TextSegment value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Data::Text::ISelectableWordSegment)->get_SourceTextSegment(put_abi(value))); return value; } template auto consume_Windows_Data_Text_ISelectableWordsSegmenter::ResolvedLanguage() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Data::Text::ISelectableWordsSegmenter)->get_ResolvedLanguage(&value)); return hstring{ value, take_ownership_from_abi }; } template auto consume_Windows_Data_Text_ISelectableWordsSegmenter::GetTokenAt(param::hstring const& text, uint32_t startIndex) const { void* result{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Data::Text::ISelectableWordsSegmenter)->GetTokenAt(*(void**)(&text), startIndex, &result)); return winrt::Windows::Data::Text::SelectableWordSegment{ result, take_ownership_from_abi }; } template auto consume_Windows_Data_Text_ISelectableWordsSegmenter::GetTokens(param::hstring const& text) const { void* result{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Data::Text::ISelectableWordsSegmenter)->GetTokens(*(void**)(&text), &result)); return winrt::Windows::Foundation::Collections::IVectorView{ result, take_ownership_from_abi }; } template auto consume_Windows_Data_Text_ISelectableWordsSegmenter::Tokenize(param::hstring const& text, uint32_t startIndex, winrt::Windows::Data::Text::SelectableWordSegmentsTokenizingHandler const& handler) const { check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Data::Text::ISelectableWordsSegmenter)->Tokenize(*(void**)(&text), startIndex, *(void**)(&handler))); } template auto consume_Windows_Data_Text_ISelectableWordsSegmenterFactory::CreateWithLanguage(param::hstring const& language) const { void* result{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Data::Text::ISelectableWordsSegmenterFactory)->CreateWithLanguage(*(void**)(&language), &result)); return winrt::Windows::Data::Text::SelectableWordsSegmenter{ result, take_ownership_from_abi }; } template auto consume_Windows_Data_Text_ISemanticTextQuery::Find(param::hstring const& content) const { void* result{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Data::Text::ISemanticTextQuery)->Find(*(void**)(&content), &result)); return winrt::Windows::Foundation::Collections::IVectorView{ result, take_ownership_from_abi }; } template auto consume_Windows_Data_Text_ISemanticTextQuery::FindInProperty(param::hstring const& propertyContent, param::hstring const& propertyName) const { void* result{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Data::Text::ISemanticTextQuery)->FindInProperty(*(void**)(&propertyContent), *(void**)(&propertyName), &result)); return winrt::Windows::Foundation::Collections::IVectorView{ result, take_ownership_from_abi }; } template auto consume_Windows_Data_Text_ISemanticTextQueryFactory::Create(param::hstring const& aqsFilter) const { void* result{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Data::Text::ISemanticTextQueryFactory)->Create(*(void**)(&aqsFilter), &result)); return winrt::Windows::Data::Text::SemanticTextQuery{ result, take_ownership_from_abi }; } template auto consume_Windows_Data_Text_ISemanticTextQueryFactory::CreateWithLanguage(param::hstring const& aqsFilter, param::hstring const& filterLanguage) const { void* result{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Data::Text::ISemanticTextQueryFactory)->CreateWithLanguage(*(void**)(&aqsFilter), *(void**)(&filterLanguage), &result)); return winrt::Windows::Data::Text::SemanticTextQuery{ result, take_ownership_from_abi }; } template auto consume_Windows_Data_Text_ITextConversionGenerator::ResolvedLanguage() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Data::Text::ITextConversionGenerator)->get_ResolvedLanguage(&value)); return hstring{ value, take_ownership_from_abi }; } template auto consume_Windows_Data_Text_ITextConversionGenerator::LanguageAvailableButNotInstalled() const { bool value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Data::Text::ITextConversionGenerator)->get_LanguageAvailableButNotInstalled(&value)); return value; } template auto consume_Windows_Data_Text_ITextConversionGenerator::GetCandidatesAsync(param::hstring const& input) const { void* result{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Data::Text::ITextConversionGenerator)->GetCandidatesAsync(*(void**)(&input), &result)); return winrt::Windows::Foundation::IAsyncOperation>{ result, take_ownership_from_abi }; } template auto consume_Windows_Data_Text_ITextConversionGenerator::GetCandidatesAsync(param::hstring const& input, uint32_t maxCandidates) const { void* result{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Data::Text::ITextConversionGenerator)->GetCandidatesWithMaxCountAsync(*(void**)(&input), maxCandidates, &result)); return winrt::Windows::Foundation::IAsyncOperation>{ result, take_ownership_from_abi }; } template auto consume_Windows_Data_Text_ITextConversionGeneratorFactory::Create(param::hstring const& languageTag) const { void* result{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Data::Text::ITextConversionGeneratorFactory)->Create(*(void**)(&languageTag), &result)); return winrt::Windows::Data::Text::TextConversionGenerator{ result, take_ownership_from_abi }; } template auto consume_Windows_Data_Text_ITextPhoneme::DisplayText() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Data::Text::ITextPhoneme)->get_DisplayText(&value)); return hstring{ value, take_ownership_from_abi }; } template auto consume_Windows_Data_Text_ITextPhoneme::ReadingText() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Data::Text::ITextPhoneme)->get_ReadingText(&value)); return hstring{ value, take_ownership_from_abi }; } template auto consume_Windows_Data_Text_ITextPredictionGenerator::ResolvedLanguage() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Data::Text::ITextPredictionGenerator)->get_ResolvedLanguage(&value)); return hstring{ value, take_ownership_from_abi }; } template auto consume_Windows_Data_Text_ITextPredictionGenerator::LanguageAvailableButNotInstalled() const { bool value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Data::Text::ITextPredictionGenerator)->get_LanguageAvailableButNotInstalled(&value)); return value; } template auto consume_Windows_Data_Text_ITextPredictionGenerator::GetCandidatesAsync(param::hstring const& input) const { void* result{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Data::Text::ITextPredictionGenerator)->GetCandidatesAsync(*(void**)(&input), &result)); return winrt::Windows::Foundation::IAsyncOperation>{ result, take_ownership_from_abi }; } template auto consume_Windows_Data_Text_ITextPredictionGenerator::GetCandidatesAsync(param::hstring const& input, uint32_t maxCandidates) const { void* result{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Data::Text::ITextPredictionGenerator)->GetCandidatesWithMaxCountAsync(*(void**)(&input), maxCandidates, &result)); return winrt::Windows::Foundation::IAsyncOperation>{ result, take_ownership_from_abi }; } template auto consume_Windows_Data_Text_ITextPredictionGenerator2::GetCandidatesAsync(param::hstring const& input, uint32_t maxCandidates, winrt::Windows::Data::Text::TextPredictionOptions const& predictionOptions, param::async_iterable const& previousStrings) const { void* result{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Data::Text::ITextPredictionGenerator2)->GetCandidatesWithParametersAsync(*(void**)(&input), maxCandidates, static_cast(predictionOptions), *(void**)(&previousStrings), &result)); return winrt::Windows::Foundation::IAsyncOperation>{ result, take_ownership_from_abi }; } template auto consume_Windows_Data_Text_ITextPredictionGenerator2::GetNextWordCandidatesAsync(uint32_t maxCandidates, param::async_iterable const& previousStrings) const { void* result{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Data::Text::ITextPredictionGenerator2)->GetNextWordCandidatesAsync(maxCandidates, *(void**)(&previousStrings), &result)); return winrt::Windows::Foundation::IAsyncOperation>{ result, take_ownership_from_abi }; } template auto consume_Windows_Data_Text_ITextPredictionGenerator2::InputScope() const { winrt::Windows::UI::Text::Core::CoreTextInputScope value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Data::Text::ITextPredictionGenerator2)->get_InputScope(reinterpret_cast(&value))); return value; } template auto consume_Windows_Data_Text_ITextPredictionGenerator2::InputScope(winrt::Windows::UI::Text::Core::CoreTextInputScope const& value) const { check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Data::Text::ITextPredictionGenerator2)->put_InputScope(static_cast(value))); } template auto consume_Windows_Data_Text_ITextPredictionGeneratorFactory::Create(param::hstring const& languageTag) const { void* result{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Data::Text::ITextPredictionGeneratorFactory)->Create(*(void**)(&languageTag), &result)); return winrt::Windows::Data::Text::TextPredictionGenerator{ result, take_ownership_from_abi }; } template auto consume_Windows_Data_Text_ITextReverseConversionGenerator::ResolvedLanguage() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Data::Text::ITextReverseConversionGenerator)->get_ResolvedLanguage(&value)); return hstring{ value, take_ownership_from_abi }; } template auto consume_Windows_Data_Text_ITextReverseConversionGenerator::LanguageAvailableButNotInstalled() const { bool value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Data::Text::ITextReverseConversionGenerator)->get_LanguageAvailableButNotInstalled(&value)); return value; } template auto consume_Windows_Data_Text_ITextReverseConversionGenerator::ConvertBackAsync(param::hstring const& input) const { void* result{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Data::Text::ITextReverseConversionGenerator)->ConvertBackAsync(*(void**)(&input), &result)); return winrt::Windows::Foundation::IAsyncOperation{ result, take_ownership_from_abi }; } template auto consume_Windows_Data_Text_ITextReverseConversionGenerator2::GetPhonemesAsync(param::hstring const& input) const { void* result{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Data::Text::ITextReverseConversionGenerator2)->GetPhonemesAsync(*(void**)(&input), &result)); return winrt::Windows::Foundation::IAsyncOperation>{ result, take_ownership_from_abi }; } template auto consume_Windows_Data_Text_ITextReverseConversionGeneratorFactory::Create(param::hstring const& languageTag) const { void* result{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Data::Text::ITextReverseConversionGeneratorFactory)->Create(*(void**)(&languageTag), &result)); return winrt::Windows::Data::Text::TextReverseConversionGenerator{ result, take_ownership_from_abi }; } template auto consume_Windows_Data_Text_IUnicodeCharactersStatics::GetCodepointFromSurrogatePair(uint32_t highSurrogate, uint32_t lowSurrogate) const { uint32_t codepoint{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Data::Text::IUnicodeCharactersStatics)->GetCodepointFromSurrogatePair(highSurrogate, lowSurrogate, &codepoint)); return codepoint; } template auto consume_Windows_Data_Text_IUnicodeCharactersStatics::GetSurrogatePairFromCodepoint(uint32_t codepoint, char16_t& highSurrogate, char16_t& lowSurrogate) const { check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Data::Text::IUnicodeCharactersStatics)->GetSurrogatePairFromCodepoint(codepoint, &highSurrogate, &lowSurrogate)); } template auto consume_Windows_Data_Text_IUnicodeCharactersStatics::IsHighSurrogate(uint32_t codepoint) const { bool value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Data::Text::IUnicodeCharactersStatics)->IsHighSurrogate(codepoint, &value)); return value; } template auto consume_Windows_Data_Text_IUnicodeCharactersStatics::IsLowSurrogate(uint32_t codepoint) const { bool value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Data::Text::IUnicodeCharactersStatics)->IsLowSurrogate(codepoint, &value)); return value; } template auto consume_Windows_Data_Text_IUnicodeCharactersStatics::IsSupplementary(uint32_t codepoint) const { bool value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Data::Text::IUnicodeCharactersStatics)->IsSupplementary(codepoint, &value)); return value; } template auto consume_Windows_Data_Text_IUnicodeCharactersStatics::IsNoncharacter(uint32_t codepoint) const { bool value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Data::Text::IUnicodeCharactersStatics)->IsNoncharacter(codepoint, &value)); return value; } template auto consume_Windows_Data_Text_IUnicodeCharactersStatics::IsWhitespace(uint32_t codepoint) const { bool value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Data::Text::IUnicodeCharactersStatics)->IsWhitespace(codepoint, &value)); return value; } template auto consume_Windows_Data_Text_IUnicodeCharactersStatics::IsAlphabetic(uint32_t codepoint) const { bool value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Data::Text::IUnicodeCharactersStatics)->IsAlphabetic(codepoint, &value)); return value; } template auto consume_Windows_Data_Text_IUnicodeCharactersStatics::IsCased(uint32_t codepoint) const { bool value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Data::Text::IUnicodeCharactersStatics)->IsCased(codepoint, &value)); return value; } template auto consume_Windows_Data_Text_IUnicodeCharactersStatics::IsUppercase(uint32_t codepoint) const { bool value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Data::Text::IUnicodeCharactersStatics)->IsUppercase(codepoint, &value)); return value; } template auto consume_Windows_Data_Text_IUnicodeCharactersStatics::IsLowercase(uint32_t codepoint) const { bool value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Data::Text::IUnicodeCharactersStatics)->IsLowercase(codepoint, &value)); return value; } template auto consume_Windows_Data_Text_IUnicodeCharactersStatics::IsIdStart(uint32_t codepoint) const { bool value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Data::Text::IUnicodeCharactersStatics)->IsIdStart(codepoint, &value)); return value; } template auto consume_Windows_Data_Text_IUnicodeCharactersStatics::IsIdContinue(uint32_t codepoint) const { bool value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Data::Text::IUnicodeCharactersStatics)->IsIdContinue(codepoint, &value)); return value; } template auto consume_Windows_Data_Text_IUnicodeCharactersStatics::IsGraphemeBase(uint32_t codepoint) const { bool value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Data::Text::IUnicodeCharactersStatics)->IsGraphemeBase(codepoint, &value)); return value; } template auto consume_Windows_Data_Text_IUnicodeCharactersStatics::IsGraphemeExtend(uint32_t codepoint) const { bool value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Data::Text::IUnicodeCharactersStatics)->IsGraphemeExtend(codepoint, &value)); return value; } template auto consume_Windows_Data_Text_IUnicodeCharactersStatics::GetNumericType(uint32_t codepoint) const { winrt::Windows::Data::Text::UnicodeNumericType value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Data::Text::IUnicodeCharactersStatics)->GetNumericType(codepoint, reinterpret_cast(&value))); return value; } template auto consume_Windows_Data_Text_IUnicodeCharactersStatics::GetGeneralCategory(uint32_t codepoint) const { winrt::Windows::Data::Text::UnicodeGeneralCategory value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Data::Text::IUnicodeCharactersStatics)->GetGeneralCategory(codepoint, reinterpret_cast(&value))); return value; } template auto consume_Windows_Data_Text_IWordSegment::Text() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Data::Text::IWordSegment)->get_Text(&value)); return hstring{ value, take_ownership_from_abi }; } template auto consume_Windows_Data_Text_IWordSegment::SourceTextSegment() const { winrt::Windows::Data::Text::TextSegment value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Data::Text::IWordSegment)->get_SourceTextSegment(put_abi(value))); return value; } template auto consume_Windows_Data_Text_IWordSegment::AlternateForms() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Data::Text::IWordSegment)->get_AlternateForms(&value)); return winrt::Windows::Foundation::Collections::IVectorView{ value, take_ownership_from_abi }; } template auto consume_Windows_Data_Text_IWordsSegmenter::ResolvedLanguage() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Data::Text::IWordsSegmenter)->get_ResolvedLanguage(&value)); return hstring{ value, take_ownership_from_abi }; } template auto consume_Windows_Data_Text_IWordsSegmenter::GetTokenAt(param::hstring const& text, uint32_t startIndex) const { void* result{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Data::Text::IWordsSegmenter)->GetTokenAt(*(void**)(&text), startIndex, &result)); return winrt::Windows::Data::Text::WordSegment{ result, take_ownership_from_abi }; } template auto consume_Windows_Data_Text_IWordsSegmenter::GetTokens(param::hstring const& text) const { void* result{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Data::Text::IWordsSegmenter)->GetTokens(*(void**)(&text), &result)); return winrt::Windows::Foundation::Collections::IVectorView{ result, take_ownership_from_abi }; } template auto consume_Windows_Data_Text_IWordsSegmenter::Tokenize(param::hstring const& text, uint32_t startIndex, winrt::Windows::Data::Text::WordSegmentsTokenizingHandler const& handler) const { check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Data::Text::IWordsSegmenter)->Tokenize(*(void**)(&text), startIndex, *(void**)(&handler))); } template auto consume_Windows_Data_Text_IWordsSegmenterFactory::CreateWithLanguage(param::hstring const& language) const { void* result{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Data::Text::IWordsSegmenterFactory)->CreateWithLanguage(*(void**)(&language), &result)); return winrt::Windows::Data::Text::WordsSegmenter{ result, take_ownership_from_abi }; } template struct delegate final : implements_delegate { delegate(H&& handler) : implements_delegate(std::forward(handler)) {} int32_t __stdcall Invoke(void* precedingWords, void* words) noexcept final try { (*this)(*reinterpret_cast const*>(&precedingWords), *reinterpret_cast const*>(&words)); return 0; } catch (...) { return to_hresult(); } }; template struct delegate final : implements_delegate { delegate(H&& handler) : implements_delegate(std::forward(handler)) {} int32_t __stdcall Invoke(void* precedingWords, void* words) noexcept final try { (*this)(*reinterpret_cast const*>(&precedingWords), *reinterpret_cast const*>(&words)); return 0; } catch (...) { return to_hresult(); } }; #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_SourceTextSegment(struct struct_Windows_Data_Text_TextSegment* value) noexcept final try { zero_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().SourceTextSegment()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_AlternateText(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().AlternateText()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_NormalizationFormat(int32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().NormalizationFormat()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_Text(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Text()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_SourceTextSegment(struct struct_Windows_Data_Text_TextSegment* value) noexcept final try { zero_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().SourceTextSegment()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_ResolvedLanguage(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().ResolvedLanguage()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall GetTokenAt(void* text, uint32_t startIndex, void** result) noexcept final try { clear_abi(result); typename D::abi_guard guard(this->shim()); *result = detach_from(this->shim().GetTokenAt(*reinterpret_cast(&text), startIndex)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall GetTokens(void* text, void** result) noexcept final try { clear_abi(result); typename D::abi_guard guard(this->shim()); *result = detach_from>(this->shim().GetTokens(*reinterpret_cast(&text))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall Tokenize(void* text, uint32_t startIndex, void* handler) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().Tokenize(*reinterpret_cast(&text), startIndex, *reinterpret_cast(&handler)); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall CreateWithLanguage(void* language, void** result) noexcept final try { clear_abi(result); typename D::abi_guard guard(this->shim()); *result = detach_from(this->shim().CreateWithLanguage(*reinterpret_cast(&language))); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall Find(void* content, void** result) noexcept final try { clear_abi(result); typename D::abi_guard guard(this->shim()); *result = detach_from>(this->shim().Find(*reinterpret_cast(&content))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall FindInProperty(void* propertyContent, void* propertyName, void** result) noexcept final try { clear_abi(result); typename D::abi_guard guard(this->shim()); *result = detach_from>(this->shim().FindInProperty(*reinterpret_cast(&propertyContent), *reinterpret_cast(&propertyName))); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall Create(void* aqsFilter, void** result) noexcept final try { clear_abi(result); typename D::abi_guard guard(this->shim()); *result = detach_from(this->shim().Create(*reinterpret_cast(&aqsFilter))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall CreateWithLanguage(void* aqsFilter, void* filterLanguage, void** result) noexcept final try { clear_abi(result); typename D::abi_guard guard(this->shim()); *result = detach_from(this->shim().CreateWithLanguage(*reinterpret_cast(&aqsFilter), *reinterpret_cast(&filterLanguage))); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_ResolvedLanguage(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().ResolvedLanguage()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_LanguageAvailableButNotInstalled(bool* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().LanguageAvailableButNotInstalled()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall GetCandidatesAsync(void* input, void** result) noexcept final try { clear_abi(result); typename D::abi_guard guard(this->shim()); *result = detach_from>>(this->shim().GetCandidatesAsync(*reinterpret_cast(&input))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall GetCandidatesWithMaxCountAsync(void* input, uint32_t maxCandidates, void** result) noexcept final try { clear_abi(result); typename D::abi_guard guard(this->shim()); *result = detach_from>>(this->shim().GetCandidatesAsync(*reinterpret_cast(&input), maxCandidates)); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall Create(void* languageTag, void** result) noexcept final try { clear_abi(result); typename D::abi_guard guard(this->shim()); *result = detach_from(this->shim().Create(*reinterpret_cast(&languageTag))); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_DisplayText(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().DisplayText()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_ReadingText(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().ReadingText()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_ResolvedLanguage(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().ResolvedLanguage()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_LanguageAvailableButNotInstalled(bool* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().LanguageAvailableButNotInstalled()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall GetCandidatesAsync(void* input, void** result) noexcept final try { clear_abi(result); typename D::abi_guard guard(this->shim()); *result = detach_from>>(this->shim().GetCandidatesAsync(*reinterpret_cast(&input))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall GetCandidatesWithMaxCountAsync(void* input, uint32_t maxCandidates, void** result) noexcept final try { clear_abi(result); typename D::abi_guard guard(this->shim()); *result = detach_from>>(this->shim().GetCandidatesAsync(*reinterpret_cast(&input), maxCandidates)); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall GetCandidatesWithParametersAsync(void* input, uint32_t maxCandidates, uint32_t predictionOptions, void* previousStrings, void** result) noexcept final try { clear_abi(result); typename D::abi_guard guard(this->shim()); *result = detach_from>>(this->shim().GetCandidatesAsync(*reinterpret_cast(&input), maxCandidates, *reinterpret_cast(&predictionOptions), *reinterpret_cast const*>(&previousStrings))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall GetNextWordCandidatesAsync(uint32_t maxCandidates, void* previousStrings, void** result) noexcept final try { clear_abi(result); typename D::abi_guard guard(this->shim()); *result = detach_from>>(this->shim().GetNextWordCandidatesAsync(maxCandidates, *reinterpret_cast const*>(&previousStrings))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_InputScope(int32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().InputScope()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_InputScope(int32_t value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().InputScope(*reinterpret_cast(&value)); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall Create(void* languageTag, void** result) noexcept final try { clear_abi(result); typename D::abi_guard guard(this->shim()); *result = detach_from(this->shim().Create(*reinterpret_cast(&languageTag))); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_ResolvedLanguage(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().ResolvedLanguage()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_LanguageAvailableButNotInstalled(bool* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().LanguageAvailableButNotInstalled()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall ConvertBackAsync(void* input, void** result) noexcept final try { clear_abi(result); typename D::abi_guard guard(this->shim()); *result = detach_from>(this->shim().ConvertBackAsync(*reinterpret_cast(&input))); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall GetPhonemesAsync(void* input, void** result) noexcept final try { clear_abi(result); typename D::abi_guard guard(this->shim()); *result = detach_from>>(this->shim().GetPhonemesAsync(*reinterpret_cast(&input))); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall Create(void* languageTag, void** result) noexcept final try { clear_abi(result); typename D::abi_guard guard(this->shim()); *result = detach_from(this->shim().Create(*reinterpret_cast(&languageTag))); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall GetCodepointFromSurrogatePair(uint32_t highSurrogate, uint32_t lowSurrogate, uint32_t* codepoint) noexcept final try { typename D::abi_guard guard(this->shim()); *codepoint = detach_from(this->shim().GetCodepointFromSurrogatePair(highSurrogate, lowSurrogate)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall GetSurrogatePairFromCodepoint(uint32_t codepoint, char16_t* highSurrogate, char16_t* lowSurrogate) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().GetSurrogatePairFromCodepoint(codepoint, *highSurrogate, *lowSurrogate); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall IsHighSurrogate(uint32_t codepoint, bool* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().IsHighSurrogate(codepoint)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall IsLowSurrogate(uint32_t codepoint, bool* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().IsLowSurrogate(codepoint)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall IsSupplementary(uint32_t codepoint, bool* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().IsSupplementary(codepoint)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall IsNoncharacter(uint32_t codepoint, bool* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().IsNoncharacter(codepoint)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall IsWhitespace(uint32_t codepoint, bool* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().IsWhitespace(codepoint)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall IsAlphabetic(uint32_t codepoint, bool* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().IsAlphabetic(codepoint)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall IsCased(uint32_t codepoint, bool* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().IsCased(codepoint)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall IsUppercase(uint32_t codepoint, bool* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().IsUppercase(codepoint)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall IsLowercase(uint32_t codepoint, bool* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().IsLowercase(codepoint)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall IsIdStart(uint32_t codepoint, bool* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().IsIdStart(codepoint)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall IsIdContinue(uint32_t codepoint, bool* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().IsIdContinue(codepoint)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall IsGraphemeBase(uint32_t codepoint, bool* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().IsGraphemeBase(codepoint)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall IsGraphemeExtend(uint32_t codepoint, bool* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().IsGraphemeExtend(codepoint)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall GetNumericType(uint32_t codepoint, int32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().GetNumericType(codepoint)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall GetGeneralCategory(uint32_t codepoint, int32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().GetGeneralCategory(codepoint)); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_Text(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Text()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_SourceTextSegment(struct struct_Windows_Data_Text_TextSegment* value) noexcept final try { zero_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().SourceTextSegment()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_AlternateForms(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from>(this->shim().AlternateForms()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_ResolvedLanguage(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().ResolvedLanguage()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall GetTokenAt(void* text, uint32_t startIndex, void** result) noexcept final try { clear_abi(result); typename D::abi_guard guard(this->shim()); *result = detach_from(this->shim().GetTokenAt(*reinterpret_cast(&text), startIndex)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall GetTokens(void* text, void** result) noexcept final try { clear_abi(result); typename D::abi_guard guard(this->shim()); *result = detach_from>(this->shim().GetTokens(*reinterpret_cast(&text))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall Tokenize(void* text, uint32_t startIndex, void* handler) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().Tokenize(*reinterpret_cast(&text), startIndex, *reinterpret_cast(&handler)); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall CreateWithLanguage(void* language, void** result) noexcept final try { clear_abi(result); typename D::abi_guard guard(this->shim()); *result = detach_from(this->shim().CreateWithLanguage(*reinterpret_cast(&language))); return 0; } catch (...) { return to_hresult(); } }; #endif } WINRT_EXPORT namespace winrt::Windows::Data::Text { constexpr auto operator|(TextPredictionOptions const left, TextPredictionOptions const right) noexcept { return static_cast(impl::to_underlying_type(left) | impl::to_underlying_type(right)); } constexpr auto operator|=(TextPredictionOptions& left, TextPredictionOptions const right) noexcept { left = left | right; return left; } constexpr auto operator&(TextPredictionOptions const left, TextPredictionOptions const right) noexcept { return static_cast(impl::to_underlying_type(left) & impl::to_underlying_type(right)); } constexpr auto operator&=(TextPredictionOptions& left, TextPredictionOptions const right) noexcept { left = left & right; return left; } constexpr auto operator~(TextPredictionOptions const value) noexcept { return static_cast(~impl::to_underlying_type(value)); } constexpr auto operator^(TextPredictionOptions const left, TextPredictionOptions const right) noexcept { return static_cast(impl::to_underlying_type(left) ^ impl::to_underlying_type(right)); } constexpr auto operator^=(TextPredictionOptions& left, TextPredictionOptions const right) noexcept { left = left ^ right; return left; } inline SelectableWordsSegmenter::SelectableWordsSegmenter(param::hstring const& language) : SelectableWordsSegmenter(impl::call_factory([&](ISelectableWordsSegmenterFactory const& f) { return f.CreateWithLanguage(language); })) { } inline SemanticTextQuery::SemanticTextQuery(param::hstring const& aqsFilter) : SemanticTextQuery(impl::call_factory([&](ISemanticTextQueryFactory const& f) { return f.Create(aqsFilter); })) { } inline SemanticTextQuery::SemanticTextQuery(param::hstring const& aqsFilter, param::hstring const& filterLanguage) : SemanticTextQuery(impl::call_factory([&](ISemanticTextQueryFactory const& f) { return f.CreateWithLanguage(aqsFilter, filterLanguage); })) { } inline TextConversionGenerator::TextConversionGenerator(param::hstring const& languageTag) : TextConversionGenerator(impl::call_factory([&](ITextConversionGeneratorFactory const& f) { return f.Create(languageTag); })) { } inline TextPredictionGenerator::TextPredictionGenerator(param::hstring const& languageTag) : TextPredictionGenerator(impl::call_factory([&](ITextPredictionGeneratorFactory const& f) { return f.Create(languageTag); })) { } inline TextReverseConversionGenerator::TextReverseConversionGenerator(param::hstring const& languageTag) : TextReverseConversionGenerator(impl::call_factory([&](ITextReverseConversionGeneratorFactory const& f) { return f.Create(languageTag); })) { } inline auto UnicodeCharacters::GetCodepointFromSurrogatePair(uint32_t highSurrogate, uint32_t lowSurrogate) { return impl::call_factory([&](IUnicodeCharactersStatics const& f) { return f.GetCodepointFromSurrogatePair(highSurrogate, lowSurrogate); }); } inline auto UnicodeCharacters::GetSurrogatePairFromCodepoint(uint32_t codepoint, char16_t& highSurrogate, char16_t& lowSurrogate) { impl::call_factory([&](IUnicodeCharactersStatics const& f) { return f.GetSurrogatePairFromCodepoint(codepoint, highSurrogate, lowSurrogate); }); } inline auto UnicodeCharacters::IsHighSurrogate(uint32_t codepoint) { return impl::call_factory([&](IUnicodeCharactersStatics const& f) { return f.IsHighSurrogate(codepoint); }); } inline auto UnicodeCharacters::IsLowSurrogate(uint32_t codepoint) { return impl::call_factory([&](IUnicodeCharactersStatics const& f) { return f.IsLowSurrogate(codepoint); }); } inline auto UnicodeCharacters::IsSupplementary(uint32_t codepoint) { return impl::call_factory([&](IUnicodeCharactersStatics const& f) { return f.IsSupplementary(codepoint); }); } inline auto UnicodeCharacters::IsNoncharacter(uint32_t codepoint) { return impl::call_factory([&](IUnicodeCharactersStatics const& f) { return f.IsNoncharacter(codepoint); }); } inline auto UnicodeCharacters::IsWhitespace(uint32_t codepoint) { return impl::call_factory([&](IUnicodeCharactersStatics const& f) { return f.IsWhitespace(codepoint); }); } inline auto UnicodeCharacters::IsAlphabetic(uint32_t codepoint) { return impl::call_factory([&](IUnicodeCharactersStatics const& f) { return f.IsAlphabetic(codepoint); }); } inline auto UnicodeCharacters::IsCased(uint32_t codepoint) { return impl::call_factory([&](IUnicodeCharactersStatics const& f) { return f.IsCased(codepoint); }); } inline auto UnicodeCharacters::IsUppercase(uint32_t codepoint) { return impl::call_factory([&](IUnicodeCharactersStatics const& f) { return f.IsUppercase(codepoint); }); } inline auto UnicodeCharacters::IsLowercase(uint32_t codepoint) { return impl::call_factory([&](IUnicodeCharactersStatics const& f) { return f.IsLowercase(codepoint); }); } inline auto UnicodeCharacters::IsIdStart(uint32_t codepoint) { return impl::call_factory([&](IUnicodeCharactersStatics const& f) { return f.IsIdStart(codepoint); }); } inline auto UnicodeCharacters::IsIdContinue(uint32_t codepoint) { return impl::call_factory([&](IUnicodeCharactersStatics const& f) { return f.IsIdContinue(codepoint); }); } inline auto UnicodeCharacters::IsGraphemeBase(uint32_t codepoint) { return impl::call_factory([&](IUnicodeCharactersStatics const& f) { return f.IsGraphemeBase(codepoint); }); } inline auto UnicodeCharacters::IsGraphemeExtend(uint32_t codepoint) { return impl::call_factory([&](IUnicodeCharactersStatics const& f) { return f.IsGraphemeExtend(codepoint); }); } inline auto UnicodeCharacters::GetNumericType(uint32_t codepoint) { return impl::call_factory([&](IUnicodeCharactersStatics const& f) { return f.GetNumericType(codepoint); }); } inline auto UnicodeCharacters::GetGeneralCategory(uint32_t codepoint) { return impl::call_factory([&](IUnicodeCharactersStatics const& f) { return f.GetGeneralCategory(codepoint); }); } inline WordsSegmenter::WordsSegmenter(param::hstring const& language) : WordsSegmenter(impl::call_factory([&](IWordsSegmenterFactory const& f) { return f.CreateWithLanguage(language); })) { } template SelectableWordSegmentsTokenizingHandler::SelectableWordSegmentsTokenizingHandler(L handler) : SelectableWordSegmentsTokenizingHandler(impl::make_delegate(std::forward(handler))) { } template SelectableWordSegmentsTokenizingHandler::SelectableWordSegmentsTokenizingHandler(F* handler) : SelectableWordSegmentsTokenizingHandler([=](auto&&... args) { return handler(args...); }) { } template SelectableWordSegmentsTokenizingHandler::SelectableWordSegmentsTokenizingHandler(O* object, M method) : SelectableWordSegmentsTokenizingHandler([=](auto&&... args) { return ((*object).*(method))(args...); }) { } template SelectableWordSegmentsTokenizingHandler::SelectableWordSegmentsTokenizingHandler(com_ptr&& object, M method) : SelectableWordSegmentsTokenizingHandler([o = std::move(object), method](auto&&... args) { return ((*o).*(method))(args...); }) { } template SelectableWordSegmentsTokenizingHandler::SelectableWordSegmentsTokenizingHandler(weak_ref&& object, LM&& lambda_or_method) : SelectableWordSegmentsTokenizingHandler([o = std::move(object), lm = std::forward(lambda_or_method)](auto&&... args) { if (auto s = o.get()) { if constexpr (std::is_member_function_pointer_v) ((*s).*(lm))(args...); else lm(args...); } }) { } template SelectableWordSegmentsTokenizingHandler::SelectableWordSegmentsTokenizingHandler(std::shared_ptr&& object, M method) : SelectableWordSegmentsTokenizingHandler([o = std::move(object), method](auto&&... args) { return ((*o).*(method))(args...); }) { } template SelectableWordSegmentsTokenizingHandler::SelectableWordSegmentsTokenizingHandler(std::weak_ptr&& object, LM&& lambda_or_method) : SelectableWordSegmentsTokenizingHandler([o = std::move(object), lm = std::forward(lambda_or_method)](auto&&... args) { if (auto s = o.lock()) { if constexpr (std::is_member_function_pointer_v) ((*s).*(lm))(args...); else lm(args...); } }) { } inline auto SelectableWordSegmentsTokenizingHandler::operator()(param::iterable const& precedingWords, param::iterable const& words) const { check_hresult((*(impl::abi_t**)this)->Invoke(*(void**)(&precedingWords), *(void**)(&words))); } template WordSegmentsTokenizingHandler::WordSegmentsTokenizingHandler(L handler) : WordSegmentsTokenizingHandler(impl::make_delegate(std::forward(handler))) { } template WordSegmentsTokenizingHandler::WordSegmentsTokenizingHandler(F* handler) : WordSegmentsTokenizingHandler([=](auto&&... args) { return handler(args...); }) { } template WordSegmentsTokenizingHandler::WordSegmentsTokenizingHandler(O* object, M method) : WordSegmentsTokenizingHandler([=](auto&&... args) { return ((*object).*(method))(args...); }) { } template WordSegmentsTokenizingHandler::WordSegmentsTokenizingHandler(com_ptr&& object, M method) : WordSegmentsTokenizingHandler([o = std::move(object), method](auto&&... args) { return ((*o).*(method))(args...); }) { } template WordSegmentsTokenizingHandler::WordSegmentsTokenizingHandler(weak_ref&& object, LM&& lambda_or_method) : WordSegmentsTokenizingHandler([o = std::move(object), lm = std::forward(lambda_or_method)](auto&&... args) { if (auto s = o.get()) { if constexpr (std::is_member_function_pointer_v) ((*s).*(lm))(args...); else lm(args...); } }) { } template WordSegmentsTokenizingHandler::WordSegmentsTokenizingHandler(std::shared_ptr&& object, M method) : WordSegmentsTokenizingHandler([o = std::move(object), method](auto&&... args) { return ((*o).*(method))(args...); }) { } template WordSegmentsTokenizingHandler::WordSegmentsTokenizingHandler(std::weak_ptr&& object, LM&& lambda_or_method) : WordSegmentsTokenizingHandler([o = std::move(object), lm = std::forward(lambda_or_method)](auto&&... args) { if (auto s = o.lock()) { if constexpr (std::is_member_function_pointer_v) ((*s).*(lm))(args...); else lm(args...); } }) { } inline auto WordSegmentsTokenizingHandler::operator()(param::iterable const& precedingWords, param::iterable const& words) const { check_hresult((*(impl::abi_t**)this)->Invoke(*(void**)(&precedingWords), *(void**)(&words))); } } 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 {}; 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