diff --git a/swiftwinrt/Resources/Support/MakeFromAbi.swift b/swiftwinrt/Resources/Support/MakeFromAbi.swift index 028d58c..17f3ba9 100644 --- a/swiftwinrt/Resources/Support/MakeFromAbi.swift +++ b/swiftwinrt/Resources/Support/MakeFromAbi.swift @@ -5,7 +5,7 @@ import Foundation // simples than we want public protocol MakeFromAbi { associatedtype SwiftType - static func from(abi: SUPPORT_MODULE.IInspectable) -> SwiftType? + static func from(abi: SUPPORT_MODULE.IInspectable) -> SwiftType } func make(typeName: SwiftTypeName, from abi: SUPPORT_MODULE.IInspectable) -> Any? { diff --git a/swiftwinrt/code_writers.h b/swiftwinrt/code_writers.h index 3864fb9..2ffc57a 100644 --- a/swiftwinrt/code_writers.h +++ b/swiftwinrt/code_writers.h @@ -1213,7 +1213,7 @@ bind_bridge_fullname(type)); { fromAbi = w.write_temp("let swiftAbi: %.% = try! abi.QueryInterface()\n", abi_namespace(type), type.swift_type_name()); - fromAbi += w.write_temp(" return %.from(abi: RawPointer(swiftAbi))", bind_bridge_fullname(type)); + fromAbi += w.write_temp(" return %.from(abi: RawPointer(swiftAbi))!", bind_bridge_fullname(type)); swiftType = w.write_temp("%", bind(type)); } else if (is_class(&type)) @@ -1229,7 +1229,7 @@ bind_bridge_fullname(type)); w.write(R"(^@_spi(WinRTInternal) public class %Maker: MakeFromAbi { public typealias SwiftType = % - public static func from(abi: %.IInspectable) -> SwiftType? { + public static func from(abi: %.IInspectable) -> SwiftType { % } } diff --git a/swiftwinrt/file_writers.h b/swiftwinrt/file_writers.h index 5b7b6d7..d18c516 100644 --- a/swiftwinrt/file_writers.h +++ b/swiftwinrt/file_writers.h @@ -237,6 +237,10 @@ namespace swiftwinrt w.write("%", w.filter.bind_each(members.structs)); + // MakeFromAbi has to be in impl file (or main file) otherwise they get stripped away + w.write("%", w.filter.bind_each(members.interfaces)); + w.write("%", w.filter.bind_each(members.classes)); + w.swap(); write_preamble(w, /* swift_code: */ true); @@ -274,21 +278,4 @@ namespace swiftwinrt write_preamble(w, /* swift_code: */ true); w.save_file("Generics"); } - - static void write_module_make_from_abi(std::string_view const& module, type_cache const& members, include_only_used_filter const& filter) - { - writer w; - w.filter = filter; - w.support = settings.support; - w.c_mod = settings.get_c_module_name(); - w.type_namespace = module; - w.swift_module = module; - w.cache = members.cache; - w.write("%", w.filter.bind_each(members.interfaces)); - w.write("%", w.filter.bind_each(members.classes)); - - w.swap(); - write_preamble(w, /* swift_code: */ true); - w.save_file("MakeFromAbi"); - } } diff --git a/swiftwinrt/main.cpp b/swiftwinrt/main.cpp index 8d9b37e..72923f4 100644 --- a/swiftwinrt/main.cpp +++ b/swiftwinrt/main.cpp @@ -363,7 +363,6 @@ Where is one or more of: // amount of code that is generated. auto types = mdCache.compile_namespaces(namespaces, mf); write_module_generics(module, types, mf); - write_module_make_from_abi(module, types, mf); }); if (module == settings.support) diff --git a/tests/test_component/Sources/test_component/Windows.Foundation+Impl.swift b/tests/test_component/Sources/test_component/Windows.Foundation+Impl.swift index 1532852..699c777 100644 --- a/tests/test_component/Sources/test_component/Windows.Foundation+Impl.swift +++ b/tests/test_component/Sources/test_component/Windows.Foundation+Impl.swift @@ -547,3 +547,87 @@ extension TimeSpan: WinRTBridgeable { } } +@_spi(WinRTInternal) +public class IAsyncActionMaker: MakeFromAbi { + public typealias SwiftType = AnyIAsyncAction + public static func from(abi: test_component.IInspectable) -> SwiftType { + let swiftAbi: __ABI_Windows_Foundation.IAsyncAction = try! abi.QueryInterface() + return __IMPL_Windows_Foundation.IAsyncActionBridge.from(abi: RawPointer(swiftAbi))! + } +} +@_spi(WinRTInternal) +public class IAsyncInfoMaker: MakeFromAbi { + public typealias SwiftType = AnyIAsyncInfo + public static func from(abi: test_component.IInspectable) -> SwiftType { + let swiftAbi: __ABI_Windows_Foundation.IAsyncInfo = try! abi.QueryInterface() + return __IMPL_Windows_Foundation.IAsyncInfoBridge.from(abi: RawPointer(swiftAbi))! + } +} +@_spi(WinRTInternal) +public class IClosableMaker: MakeFromAbi { + public typealias SwiftType = AnyIClosable + public static func from(abi: test_component.IInspectable) -> SwiftType { + let swiftAbi: __ABI_Windows_Foundation.IClosable = try! abi.QueryInterface() + return __IMPL_Windows_Foundation.IClosableBridge.from(abi: RawPointer(swiftAbi))! + } +} +@_spi(WinRTInternal) +public class IMemoryBufferMaker: MakeFromAbi { + public typealias SwiftType = AnyIMemoryBuffer + public static func from(abi: test_component.IInspectable) -> SwiftType { + let swiftAbi: __ABI_Windows_Foundation.IMemoryBuffer = try! abi.QueryInterface() + return __IMPL_Windows_Foundation.IMemoryBufferBridge.from(abi: RawPointer(swiftAbi))! + } +} +@_spi(WinRTInternal) +public class IMemoryBufferReferenceMaker: MakeFromAbi { + public typealias SwiftType = AnyIMemoryBufferReference + public static func from(abi: test_component.IInspectable) -> SwiftType { + let swiftAbi: __ABI_Windows_Foundation.IMemoryBufferReference = try! abi.QueryInterface() + return __IMPL_Windows_Foundation.IMemoryBufferReferenceBridge.from(abi: RawPointer(swiftAbi))! + } +} +@_spi(WinRTInternal) +public class IStringableMaker: MakeFromAbi { + public typealias SwiftType = AnyIStringable + public static func from(abi: test_component.IInspectable) -> SwiftType { + let swiftAbi: __ABI_Windows_Foundation.IStringable = try! abi.QueryInterface() + return __IMPL_Windows_Foundation.IStringableBridge.from(abi: RawPointer(swiftAbi))! + } +} +@_spi(WinRTInternal) +public class IWwwFormUrlDecoderEntryMaker: MakeFromAbi { + public typealias SwiftType = AnyIWwwFormUrlDecoderEntry + public static func from(abi: test_component.IInspectable) -> SwiftType { + let swiftAbi: __ABI_Windows_Foundation.IWwwFormUrlDecoderEntry = try! abi.QueryInterface() + return __IMPL_Windows_Foundation.IWwwFormUrlDecoderEntryBridge.from(abi: RawPointer(swiftAbi))! + } +} +@_spi(WinRTInternal) +public class DeferralMaker: MakeFromAbi { + public typealias SwiftType = Deferral + public static func from(abi: test_component.IInspectable) -> SwiftType { + return Deferral(fromAbi: abi) + } +} +@_spi(WinRTInternal) +public class MemoryBufferMaker: MakeFromAbi { + public typealias SwiftType = MemoryBuffer + public static func from(abi: test_component.IInspectable) -> SwiftType { + return MemoryBuffer(fromAbi: abi) + } +} +@_spi(WinRTInternal) +public class UriMaker: MakeFromAbi { + public typealias SwiftType = Uri + public static func from(abi: test_component.IInspectable) -> SwiftType { + return Uri(fromAbi: abi) + } +} +@_spi(WinRTInternal) +public class WwwFormUrlDecoderMaker: MakeFromAbi { + public typealias SwiftType = WwwFormUrlDecoder + public static func from(abi: test_component.IInspectable) -> SwiftType { + return WwwFormUrlDecoder(fromAbi: abi) + } +} diff --git a/tests/test_component/Sources/test_component/Windows.Foundation.Collections+Impl.swift b/tests/test_component/Sources/test_component/Windows.Foundation.Collections+Impl.swift index c300eaf..6b9dc26 100644 --- a/tests/test_component/Sources/test_component/Windows.Foundation.Collections+Impl.swift +++ b/tests/test_component/Sources/test_component/Windows.Foundation.Collections+Impl.swift @@ -152,3 +152,40 @@ public enum __IMPL_Windows_Foundation_Collections { } } +@_spi(WinRTInternal) +public class IPropertySetMaker: MakeFromAbi { + public typealias SwiftType = AnyIPropertySet + public static func from(abi: test_component.IInspectable) -> SwiftType { + let swiftAbi: __ABI_Windows_Foundation_Collections.IPropertySet = try! abi.QueryInterface() + return __IMPL_Windows_Foundation_Collections.IPropertySetBridge.from(abi: RawPointer(swiftAbi))! + } +} +@_spi(WinRTInternal) +public class IVectorChangedEventArgsMaker: MakeFromAbi { + public typealias SwiftType = AnyIVectorChangedEventArgs + public static func from(abi: test_component.IInspectable) -> SwiftType { + let swiftAbi: __ABI_Windows_Foundation_Collections.IVectorChangedEventArgs = try! abi.QueryInterface() + return __IMPL_Windows_Foundation_Collections.IVectorChangedEventArgsBridge.from(abi: RawPointer(swiftAbi))! + } +} +@_spi(WinRTInternal) +public class PropertySetMaker: MakeFromAbi { + public typealias SwiftType = PropertySet + public static func from(abi: test_component.IInspectable) -> SwiftType { + return PropertySet(fromAbi: abi) + } +} +@_spi(WinRTInternal) +public class StringMapMaker: MakeFromAbi { + public typealias SwiftType = StringMap + public static func from(abi: test_component.IInspectable) -> SwiftType { + return StringMap(fromAbi: abi) + } +} +@_spi(WinRTInternal) +public class ValueSetMaker: MakeFromAbi { + public typealias SwiftType = ValueSet + public static func from(abi: test_component.IInspectable) -> SwiftType { + return ValueSet(fromAbi: abi) + } +} diff --git a/tests/test_component/Sources/test_component/Windows.Storage+Impl.swift b/tests/test_component/Sources/test_component/Windows.Storage+Impl.swift index 6e4ee7b..d746c52 100644 --- a/tests/test_component/Sources/test_component/Windows.Storage+Impl.swift +++ b/tests/test_component/Sources/test_component/Windows.Storage+Impl.swift @@ -854,3 +854,147 @@ public enum __IMPL_Windows_Storage { } } +@_spi(WinRTInternal) +public class IStorageFileMaker: MakeFromAbi { + public typealias SwiftType = AnyIStorageFile + public static func from(abi: test_component.IInspectable) -> SwiftType { + let swiftAbi: __ABI_Windows_Storage.IStorageFile = try! abi.QueryInterface() + return __IMPL_Windows_Storage.IStorageFileBridge.from(abi: RawPointer(swiftAbi))! + } +} +@_spi(WinRTInternal) +public class IStorageFile2Maker: MakeFromAbi { + public typealias SwiftType = AnyIStorageFile2 + public static func from(abi: test_component.IInspectable) -> SwiftType { + let swiftAbi: __ABI_Windows_Storage.IStorageFile2 = try! abi.QueryInterface() + return __IMPL_Windows_Storage.IStorageFile2Bridge.from(abi: RawPointer(swiftAbi))! + } +} +@_spi(WinRTInternal) +public class IStorageFilePropertiesWithAvailabilityMaker: MakeFromAbi { + public typealias SwiftType = AnyIStorageFilePropertiesWithAvailability + public static func from(abi: test_component.IInspectable) -> SwiftType { + let swiftAbi: __ABI_Windows_Storage.IStorageFilePropertiesWithAvailability = try! abi.QueryInterface() + return __IMPL_Windows_Storage.IStorageFilePropertiesWithAvailabilityBridge.from(abi: RawPointer(swiftAbi))! + } +} +@_spi(WinRTInternal) +public class IStorageFolderMaker: MakeFromAbi { + public typealias SwiftType = AnyIStorageFolder + public static func from(abi: test_component.IInspectable) -> SwiftType { + let swiftAbi: __ABI_Windows_Storage.IStorageFolder = try! abi.QueryInterface() + return __IMPL_Windows_Storage.IStorageFolderBridge.from(abi: RawPointer(swiftAbi))! + } +} +@_spi(WinRTInternal) +public class IStorageFolder2Maker: MakeFromAbi { + public typealias SwiftType = AnyIStorageFolder2 + public static func from(abi: test_component.IInspectable) -> SwiftType { + let swiftAbi: __ABI_Windows_Storage.IStorageFolder2 = try! abi.QueryInterface() + return __IMPL_Windows_Storage.IStorageFolder2Bridge.from(abi: RawPointer(swiftAbi))! + } +} +@_spi(WinRTInternal) +public class IStorageItemMaker: MakeFromAbi { + public typealias SwiftType = AnyIStorageItem + public static func from(abi: test_component.IInspectable) -> SwiftType { + let swiftAbi: __ABI_Windows_Storage.IStorageItem = try! abi.QueryInterface() + return __IMPL_Windows_Storage.IStorageItemBridge.from(abi: RawPointer(swiftAbi))! + } +} +@_spi(WinRTInternal) +public class IStorageItem2Maker: MakeFromAbi { + public typealias SwiftType = AnyIStorageItem2 + public static func from(abi: test_component.IInspectable) -> SwiftType { + let swiftAbi: __ABI_Windows_Storage.IStorageItem2 = try! abi.QueryInterface() + return __IMPL_Windows_Storage.IStorageItem2Bridge.from(abi: RawPointer(swiftAbi))! + } +} +@_spi(WinRTInternal) +public class IStorageItemPropertiesMaker: MakeFromAbi { + public typealias SwiftType = AnyIStorageItemProperties + public static func from(abi: test_component.IInspectable) -> SwiftType { + let swiftAbi: __ABI_Windows_Storage.IStorageItemProperties = try! abi.QueryInterface() + return __IMPL_Windows_Storage.IStorageItemPropertiesBridge.from(abi: RawPointer(swiftAbi))! + } +} +@_spi(WinRTInternal) +public class IStorageItemProperties2Maker: MakeFromAbi { + public typealias SwiftType = AnyIStorageItemProperties2 + public static func from(abi: test_component.IInspectable) -> SwiftType { + let swiftAbi: __ABI_Windows_Storage.IStorageItemProperties2 = try! abi.QueryInterface() + return __IMPL_Windows_Storage.IStorageItemProperties2Bridge.from(abi: RawPointer(swiftAbi))! + } +} +@_spi(WinRTInternal) +public class IStorageItemPropertiesWithProviderMaker: MakeFromAbi { + public typealias SwiftType = AnyIStorageItemPropertiesWithProvider + public static func from(abi: test_component.IInspectable) -> SwiftType { + let swiftAbi: __ABI_Windows_Storage.IStorageItemPropertiesWithProvider = try! abi.QueryInterface() + return __IMPL_Windows_Storage.IStorageItemPropertiesWithProviderBridge.from(abi: RawPointer(swiftAbi))! + } +} +@_spi(WinRTInternal) +public class IStreamedFileDataRequestMaker: MakeFromAbi { + public typealias SwiftType = AnyIStreamedFileDataRequest + public static func from(abi: test_component.IInspectable) -> SwiftType { + let swiftAbi: __ABI_Windows_Storage.IStreamedFileDataRequest = try! abi.QueryInterface() + return __IMPL_Windows_Storage.IStreamedFileDataRequestBridge.from(abi: RawPointer(swiftAbi))! + } +} +@_spi(WinRTInternal) +public class StorageFileMaker: MakeFromAbi { + public typealias SwiftType = StorageFile + public static func from(abi: test_component.IInspectable) -> SwiftType { + return StorageFile(fromAbi: abi) + } +} +@_spi(WinRTInternal) +public class StorageFolderMaker: MakeFromAbi { + public typealias SwiftType = StorageFolder + public static func from(abi: test_component.IInspectable) -> SwiftType { + return StorageFolder(fromAbi: abi) + } +} +@_spi(WinRTInternal) +public class StorageLibraryChangeMaker: MakeFromAbi { + public typealias SwiftType = StorageLibraryChange + public static func from(abi: test_component.IInspectable) -> SwiftType { + return StorageLibraryChange(fromAbi: abi) + } +} +@_spi(WinRTInternal) +public class StorageLibraryChangeReaderMaker: MakeFromAbi { + public typealias SwiftType = StorageLibraryChangeReader + public static func from(abi: test_component.IInspectable) -> SwiftType { + return StorageLibraryChangeReader(fromAbi: abi) + } +} +@_spi(WinRTInternal) +public class StorageLibraryChangeTrackerMaker: MakeFromAbi { + public typealias SwiftType = StorageLibraryChangeTracker + public static func from(abi: test_component.IInspectable) -> SwiftType { + return StorageLibraryChangeTracker(fromAbi: abi) + } +} +@_spi(WinRTInternal) +public class StorageProviderMaker: MakeFromAbi { + public typealias SwiftType = StorageProvider + public static func from(abi: test_component.IInspectable) -> SwiftType { + return StorageProvider(fromAbi: abi) + } +} +@_spi(WinRTInternal) +public class StorageStreamTransactionMaker: MakeFromAbi { + public typealias SwiftType = StorageStreamTransaction + public static func from(abi: test_component.IInspectable) -> SwiftType { + return StorageStreamTransaction(fromAbi: abi) + } +} +@_spi(WinRTInternal) +public class StreamedFileDataRequestMaker: MakeFromAbi { + public typealias SwiftType = StreamedFileDataRequest + public static func from(abi: test_component.IInspectable) -> SwiftType { + return StreamedFileDataRequest(fromAbi: abi) + } +} diff --git a/tests/test_component/Sources/test_component/Windows.Storage.FileProperties+Impl.swift b/tests/test_component/Sources/test_component/Windows.Storage.FileProperties+Impl.swift index 0ea129d..c76fccb 100644 --- a/tests/test_component/Sources/test_component/Windows.Storage.FileProperties+Impl.swift +++ b/tests/test_component/Sources/test_component/Windows.Storage.FileProperties+Impl.swift @@ -109,3 +109,60 @@ public enum __IMPL_Windows_Storage_FileProperties { } } +@_spi(WinRTInternal) +public class IStorageItemExtraPropertiesMaker: MakeFromAbi { + public typealias SwiftType = AnyIStorageItemExtraProperties + public static func from(abi: test_component.IInspectable) -> SwiftType { + let swiftAbi: __ABI_Windows_Storage_FileProperties.IStorageItemExtraProperties = try! abi.QueryInterface() + return __IMPL_Windows_Storage_FileProperties.IStorageItemExtraPropertiesBridge.from(abi: RawPointer(swiftAbi))! + } +} +@_spi(WinRTInternal) +public class BasicPropertiesMaker: MakeFromAbi { + public typealias SwiftType = BasicProperties + public static func from(abi: test_component.IInspectable) -> SwiftType { + return BasicProperties(fromAbi: abi) + } +} +@_spi(WinRTInternal) +public class DocumentPropertiesMaker: MakeFromAbi { + public typealias SwiftType = DocumentProperties + public static func from(abi: test_component.IInspectable) -> SwiftType { + return DocumentProperties(fromAbi: abi) + } +} +@_spi(WinRTInternal) +public class ImagePropertiesMaker: MakeFromAbi { + public typealias SwiftType = ImageProperties + public static func from(abi: test_component.IInspectable) -> SwiftType { + return ImageProperties(fromAbi: abi) + } +} +@_spi(WinRTInternal) +public class MusicPropertiesMaker: MakeFromAbi { + public typealias SwiftType = MusicProperties + public static func from(abi: test_component.IInspectable) -> SwiftType { + return MusicProperties(fromAbi: abi) + } +} +@_spi(WinRTInternal) +public class StorageItemContentPropertiesMaker: MakeFromAbi { + public typealias SwiftType = StorageItemContentProperties + public static func from(abi: test_component.IInspectable) -> SwiftType { + return StorageItemContentProperties(fromAbi: abi) + } +} +@_spi(WinRTInternal) +public class StorageItemThumbnailMaker: MakeFromAbi { + public typealias SwiftType = StorageItemThumbnail + public static func from(abi: test_component.IInspectable) -> SwiftType { + return StorageItemThumbnail(fromAbi: abi) + } +} +@_spi(WinRTInternal) +public class VideoPropertiesMaker: MakeFromAbi { + public typealias SwiftType = VideoProperties + public static func from(abi: test_component.IInspectable) -> SwiftType { + return VideoProperties(fromAbi: abi) + } +} diff --git a/tests/test_component/Sources/test_component/Windows.Storage.Search+Impl.swift b/tests/test_component/Sources/test_component/Windows.Storage.Search+Impl.swift index 319da28..9746a43 100644 --- a/tests/test_component/Sources/test_component/Windows.Storage.Search+Impl.swift +++ b/tests/test_component/Sources/test_component/Windows.Storage.Search+Impl.swift @@ -239,3 +239,47 @@ extension SortEntry: WinRTBridgeable { } } +@_spi(WinRTInternal) +public class IStorageFolderQueryOperationsMaker: MakeFromAbi { + public typealias SwiftType = AnyIStorageFolderQueryOperations + public static func from(abi: test_component.IInspectable) -> SwiftType { + let swiftAbi: __ABI_Windows_Storage_Search.IStorageFolderQueryOperations = try! abi.QueryInterface() + return __IMPL_Windows_Storage_Search.IStorageFolderQueryOperationsBridge.from(abi: RawPointer(swiftAbi))! + } +} +@_spi(WinRTInternal) +public class IStorageQueryResultBaseMaker: MakeFromAbi { + public typealias SwiftType = AnyIStorageQueryResultBase + public static func from(abi: test_component.IInspectable) -> SwiftType { + let swiftAbi: __ABI_Windows_Storage_Search.IStorageQueryResultBase = try! abi.QueryInterface() + return __IMPL_Windows_Storage_Search.IStorageQueryResultBaseBridge.from(abi: RawPointer(swiftAbi))! + } +} +@_spi(WinRTInternal) +public class QueryOptionsMaker: MakeFromAbi { + public typealias SwiftType = QueryOptions + public static func from(abi: test_component.IInspectable) -> SwiftType { + return QueryOptions(fromAbi: abi) + } +} +@_spi(WinRTInternal) +public class StorageFileQueryResultMaker: MakeFromAbi { + public typealias SwiftType = StorageFileQueryResult + public static func from(abi: test_component.IInspectable) -> SwiftType { + return StorageFileQueryResult(fromAbi: abi) + } +} +@_spi(WinRTInternal) +public class StorageFolderQueryResultMaker: MakeFromAbi { + public typealias SwiftType = StorageFolderQueryResult + public static func from(abi: test_component.IInspectable) -> SwiftType { + return StorageFolderQueryResult(fromAbi: abi) + } +} +@_spi(WinRTInternal) +public class StorageItemQueryResultMaker: MakeFromAbi { + public typealias SwiftType = StorageItemQueryResult + public static func from(abi: test_component.IInspectable) -> SwiftType { + return StorageItemQueryResult(fromAbi: abi) + } +} diff --git a/tests/test_component/Sources/test_component/Windows.Storage.Streams+Impl.swift b/tests/test_component/Sources/test_component/Windows.Storage.Streams+Impl.swift index f842ace..f16418f 100644 --- a/tests/test_component/Sources/test_component/Windows.Storage.Streams+Impl.swift +++ b/tests/test_component/Sources/test_component/Windows.Storage.Streams+Impl.swift @@ -410,3 +410,74 @@ public enum __IMPL_Windows_Storage_Streams { } } +@_spi(WinRTInternal) +public class IBufferMaker: MakeFromAbi { + public typealias SwiftType = AnyIBuffer + public static func from(abi: test_component.IInspectable) -> SwiftType { + let swiftAbi: __ABI_Windows_Storage_Streams.IBuffer = try! abi.QueryInterface() + return __IMPL_Windows_Storage_Streams.IBufferBridge.from(abi: RawPointer(swiftAbi))! + } +} +@_spi(WinRTInternal) +public class IContentTypeProviderMaker: MakeFromAbi { + public typealias SwiftType = AnyIContentTypeProvider + public static func from(abi: test_component.IInspectable) -> SwiftType { + let swiftAbi: __ABI_Windows_Storage_Streams.IContentTypeProvider = try! abi.QueryInterface() + return __IMPL_Windows_Storage_Streams.IContentTypeProviderBridge.from(abi: RawPointer(swiftAbi))! + } +} +@_spi(WinRTInternal) +public class IInputStreamMaker: MakeFromAbi { + public typealias SwiftType = AnyIInputStream + public static func from(abi: test_component.IInspectable) -> SwiftType { + let swiftAbi: __ABI_Windows_Storage_Streams.IInputStream = try! abi.QueryInterface() + return __IMPL_Windows_Storage_Streams.IInputStreamBridge.from(abi: RawPointer(swiftAbi))! + } +} +@_spi(WinRTInternal) +public class IInputStreamReferenceMaker: MakeFromAbi { + public typealias SwiftType = AnyIInputStreamReference + public static func from(abi: test_component.IInspectable) -> SwiftType { + let swiftAbi: __ABI_Windows_Storage_Streams.IInputStreamReference = try! abi.QueryInterface() + return __IMPL_Windows_Storage_Streams.IInputStreamReferenceBridge.from(abi: RawPointer(swiftAbi))! + } +} +@_spi(WinRTInternal) +public class IOutputStreamMaker: MakeFromAbi { + public typealias SwiftType = AnyIOutputStream + public static func from(abi: test_component.IInspectable) -> SwiftType { + let swiftAbi: __ABI_Windows_Storage_Streams.IOutputStream = try! abi.QueryInterface() + return __IMPL_Windows_Storage_Streams.IOutputStreamBridge.from(abi: RawPointer(swiftAbi))! + } +} +@_spi(WinRTInternal) +public class IRandomAccessStreamMaker: MakeFromAbi { + public typealias SwiftType = AnyIRandomAccessStream + public static func from(abi: test_component.IInspectable) -> SwiftType { + let swiftAbi: __ABI_Windows_Storage_Streams.IRandomAccessStream = try! abi.QueryInterface() + return __IMPL_Windows_Storage_Streams.IRandomAccessStreamBridge.from(abi: RawPointer(swiftAbi))! + } +} +@_spi(WinRTInternal) +public class IRandomAccessStreamReferenceMaker: MakeFromAbi { + public typealias SwiftType = AnyIRandomAccessStreamReference + public static func from(abi: test_component.IInspectable) -> SwiftType { + let swiftAbi: __ABI_Windows_Storage_Streams.IRandomAccessStreamReference = try! abi.QueryInterface() + return __IMPL_Windows_Storage_Streams.IRandomAccessStreamReferenceBridge.from(abi: RawPointer(swiftAbi))! + } +} +@_spi(WinRTInternal) +public class IRandomAccessStreamWithContentTypeMaker: MakeFromAbi { + public typealias SwiftType = AnyIRandomAccessStreamWithContentType + public static func from(abi: test_component.IInspectable) -> SwiftType { + let swiftAbi: __ABI_Windows_Storage_Streams.IRandomAccessStreamWithContentType = try! abi.QueryInterface() + return __IMPL_Windows_Storage_Streams.IRandomAccessStreamWithContentTypeBridge.from(abi: RawPointer(swiftAbi))! + } +} +@_spi(WinRTInternal) +public class BufferMaker: MakeFromAbi { + public typealias SwiftType = Buffer + public static func from(abi: test_component.IInspectable) -> SwiftType { + return Buffer(fromAbi: abi) + } +} diff --git a/tests/test_component/Sources/test_component/test_component+Impl.swift b/tests/test_component/Sources/test_component/test_component+Impl.swift index 6b70210..e18be8f 100644 --- a/tests/test_component/Sources/test_component/test_component+Impl.swift +++ b/tests/test_component/Sources/test_component/test_component+Impl.swift @@ -863,3 +863,231 @@ extension StructWithIReference: WinRTBridgeable { } } +@_spi(WinRTInternal) +public class IArrayScenariosMaker: MakeFromAbi { + public typealias SwiftType = AnyIArrayScenarios + public static func from(abi: test_component.IInspectable) -> SwiftType { + let swiftAbi: __ABI_test_component.IArrayScenarios = try! abi.QueryInterface() + return __IMPL_test_component.IArrayScenariosBridge.from(abi: RawPointer(swiftAbi))! + } +} +@_spi(WinRTInternal) +public class IAsyncMethodsWithProgressMaker: MakeFromAbi { + public typealias SwiftType = AnyIAsyncMethodsWithProgress + public static func from(abi: test_component.IInspectable) -> SwiftType { + let swiftAbi: __ABI_test_component.IAsyncMethodsWithProgress = try! abi.QueryInterface() + return __IMPL_test_component.IAsyncMethodsWithProgressBridge.from(abi: RawPointer(swiftAbi))! + } +} +@_spi(WinRTInternal) +public class IAsyncOperationIntMaker: MakeFromAbi { + public typealias SwiftType = AnyIAsyncOperationInt + public static func from(abi: test_component.IInspectable) -> SwiftType { + let swiftAbi: __ABI_test_component.IAsyncOperationInt = try! abi.QueryInterface() + return __IMPL_test_component.IAsyncOperationIntBridge.from(abi: RawPointer(swiftAbi))! + } +} +@_spi(WinRTInternal) +public class IBasicMaker: MakeFromAbi { + public typealias SwiftType = AnyIBasic + public static func from(abi: test_component.IInspectable) -> SwiftType { + let swiftAbi: __ABI_test_component.IBasic = try! abi.QueryInterface() + return __IMPL_test_component.IBasicBridge.from(abi: RawPointer(swiftAbi))! + } +} +@_spi(WinRTInternal) +public class IIAmImplementableMaker: MakeFromAbi { + public typealias SwiftType = AnyIIAmImplementable + public static func from(abi: test_component.IInspectable) -> SwiftType { + let swiftAbi: __ABI_test_component.IIAmImplementable = try! abi.QueryInterface() + return __IMPL_test_component.IIAmImplementableBridge.from(abi: RawPointer(swiftAbi))! + } +} +@_spi(WinRTInternal) +public class IInterfaceWithObservableVectorMaker: MakeFromAbi { + public typealias SwiftType = AnyIInterfaceWithObservableVector + public static func from(abi: test_component.IInspectable) -> SwiftType { + let swiftAbi: __ABI_test_component.IInterfaceWithObservableVector = try! abi.QueryInterface() + return __IMPL_test_component.IInterfaceWithObservableVectorBridge.from(abi: RawPointer(swiftAbi))! + } +} +@_spi(WinRTInternal) +public class IReferenceTargetMaker: MakeFromAbi { + public typealias SwiftType = AnyIReferenceTarget + public static func from(abi: test_component.IInspectable) -> SwiftType { + let swiftAbi: __ABI_test_component.IReferenceTarget = try! abi.QueryInterface() + return __IMPL_test_component.IReferenceTargetBridge.from(abi: RawPointer(swiftAbi))! + } +} +@_spi(WinRTInternal) +public class ISimpleDelegateMaker: MakeFromAbi { + public typealias SwiftType = AnyISimpleDelegate + public static func from(abi: test_component.IInspectable) -> SwiftType { + let swiftAbi: __ABI_test_component.ISimpleDelegate = try! abi.QueryInterface() + return __IMPL_test_component.ISimpleDelegateBridge.from(abi: RawPointer(swiftAbi))! + } +} +@_spi(WinRTInternal) +public class InterfaceWithReturnDelegateMaker: MakeFromAbi { + public typealias SwiftType = AnyInterfaceWithReturnDelegate + public static func from(abi: test_component.IInspectable) -> SwiftType { + let swiftAbi: __ABI_test_component.InterfaceWithReturnDelegate = try! abi.QueryInterface() + return __IMPL_test_component.InterfaceWithReturnDelegateBridge.from(abi: RawPointer(swiftAbi))! + } +} +@_spi(WinRTInternal) +public class WithIterableGuidsMaker: MakeFromAbi { + public typealias SwiftType = AnyWithIterableGuids + public static func from(abi: test_component.IInspectable) -> SwiftType { + let swiftAbi: __ABI_test_component.WithIterableGuids = try! abi.QueryInterface() + return __IMPL_test_component.WithIterableGuidsBridge.from(abi: RawPointer(swiftAbi))! + } +} +@_spi(WinRTInternal) +public class WithKeywordMaker: MakeFromAbi { + public typealias SwiftType = AnyWithKeyword + public static func from(abi: test_component.IInspectable) -> SwiftType { + let swiftAbi: __ABI_test_component.WithKeyword = try! abi.QueryInterface() + return __IMPL_test_component.WithKeywordBridge.from(abi: RawPointer(swiftAbi))! + } +} +@_spi(WinRTInternal) +public class AsyncOperationIntMaker: MakeFromAbi { + public typealias SwiftType = AsyncOperationInt + public static func from(abi: test_component.IInspectable) -> SwiftType { + return AsyncOperationInt(fromAbi: abi) + } +} +@_spi(WinRTInternal) +public class BaseMaker: MakeFromAbi { + public typealias SwiftType = Base + public static func from(abi: test_component.IInspectable) -> SwiftType { + return Base(fromAbi: abi) + } +} +@_spi(WinRTInternal) +public class BaseCollectionMaker: MakeFromAbi { + public typealias SwiftType = BaseCollection + public static func from(abi: test_component.IInspectable) -> SwiftType { + return BaseCollection(fromAbi: abi) + } +} +@_spi(WinRTInternal) +public class BaseMapCollectionMaker: MakeFromAbi { + public typealias SwiftType = BaseMapCollection + public static func from(abi: test_component.IInspectable) -> SwiftType { + return BaseMapCollection(fromAbi: abi) + } +} +@_spi(WinRTInternal) +public class BaseNoOverridesMaker: MakeFromAbi { + public typealias SwiftType = BaseNoOverrides + public static func from(abi: test_component.IInspectable) -> SwiftType { + return BaseNoOverrides(fromAbi: abi) + } +} +@_spi(WinRTInternal) +public class BaseObservableCollectionMaker: MakeFromAbi { + public typealias SwiftType = BaseObservableCollection + public static func from(abi: test_component.IInspectable) -> SwiftType { + return BaseObservableCollection(fromAbi: abi) + } +} +@_spi(WinRTInternal) +public class ClassMaker: MakeFromAbi { + public typealias SwiftType = Class + public static func from(abi: test_component.IInspectable) -> SwiftType { + return Class(fromAbi: abi) + } +} +@_spi(WinRTInternal) +public class CollectionTesterMaker: MakeFromAbi { + public typealias SwiftType = CollectionTester + public static func from(abi: test_component.IInspectable) -> SwiftType { + return CollectionTester(fromAbi: abi) + } +} +@_spi(WinRTInternal) +public class DeferrableEventArgsMaker: MakeFromAbi { + public typealias SwiftType = DeferrableEventArgs + public static func from(abi: test_component.IInspectable) -> SwiftType { + return DeferrableEventArgs(fromAbi: abi) + } +} +@_spi(WinRTInternal) +public class DerivedMaker: MakeFromAbi { + public typealias SwiftType = Derived + public static func from(abi: test_component.IInspectable) -> SwiftType { + return Derived(fromAbi: abi) + } +} +@_spi(WinRTInternal) +public class DerivedFromNoConstructorMaker: MakeFromAbi { + public typealias SwiftType = DerivedFromNoConstructor + public static func from(abi: test_component.IInspectable) -> SwiftType { + return DerivedFromNoConstructor(fromAbi: abi) + } +} +@_spi(WinRTInternal) +public class EventTesterMaker: MakeFromAbi { + public typealias SwiftType = EventTester + public static func from(abi: test_component.IInspectable) -> SwiftType { + return EventTester(fromAbi: abi) + } +} +@_spi(WinRTInternal) +public class NoopClosableMaker: MakeFromAbi { + public typealias SwiftType = NoopClosable + public static func from(abi: test_component.IInspectable) -> SwiftType { + return NoopClosable(fromAbi: abi) + } +} +@_spi(WinRTInternal) +public class SimpleMaker: MakeFromAbi { + public typealias SwiftType = Simple + public static func from(abi: test_component.IInspectable) -> SwiftType { + return Simple(fromAbi: abi) + } +} +@_spi(WinRTInternal) +public class UnsealedDerivedMaker: MakeFromAbi { + public typealias SwiftType = UnsealedDerived + public static func from(abi: test_component.IInspectable) -> SwiftType { + return UnsealedDerived(fromAbi: abi) + } +} +@_spi(WinRTInternal) +public class UnsealedDerived2Maker: MakeFromAbi { + public typealias SwiftType = UnsealedDerived2 + public static func from(abi: test_component.IInspectable) -> SwiftType { + return UnsealedDerived2(fromAbi: abi) + } +} +@_spi(WinRTInternal) +public class UnsealedDerivedFromNoConstructorMaker: MakeFromAbi { + public typealias SwiftType = UnsealedDerivedFromNoConstructor + public static func from(abi: test_component.IInspectable) -> SwiftType { + return UnsealedDerivedFromNoConstructor(fromAbi: abi) + } +} +@_spi(WinRTInternal) +public class UnsealedDerivedNoConstructorMaker: MakeFromAbi { + public typealias SwiftType = UnsealedDerivedNoConstructor + public static func from(abi: test_component.IInspectable) -> SwiftType { + return UnsealedDerivedNoConstructor(fromAbi: abi) + } +} +@_spi(WinRTInternal) +public class UnsealedDerivedNoOverridesMaker: MakeFromAbi { + public typealias SwiftType = UnsealedDerivedNoOverrides + public static func from(abi: test_component.IInspectable) -> SwiftType { + return UnsealedDerivedNoOverrides(fromAbi: abi) + } +} +@_spi(WinRTInternal) +public class WeakReferencerMaker: MakeFromAbi { + public typealias SwiftType = WeakReferencer + public static func from(abi: test_component.IInspectable) -> SwiftType { + return WeakReferencer(fromAbi: abi) + } +} diff --git a/tests/test_component/Sources/test_component/test_component+MakeFromAbi.swift b/tests/test_component/Sources/test_component/test_component+MakeFromAbi.swift deleted file mode 100644 index d2f98d2..0000000 --- a/tests/test_component/Sources/test_component/test_component+MakeFromAbi.swift +++ /dev/null @@ -1,670 +0,0 @@ -// WARNING: Please don't edit this file. It was generated by Swift/WinRT v0.0.1 -// swiftlint:disable all -import Foundation -import Ctest_component - -@_spi(WinRTInternal) -public class IAsyncActionMaker: MakeFromAbi { - public typealias SwiftType = test_component.AnyIAsyncAction - public static func from(abi: test_component.IInspectable) -> SwiftType? { - let swiftAbi: __ABI_Windows_Foundation.IAsyncAction = try! abi.QueryInterface() - return __IMPL_Windows_Foundation.IAsyncActionBridge.from(abi: RawPointer(swiftAbi)) - } -} -@_spi(WinRTInternal) -public class IAsyncInfoMaker: MakeFromAbi { - public typealias SwiftType = test_component.AnyIAsyncInfo - public static func from(abi: test_component.IInspectable) -> SwiftType? { - let swiftAbi: __ABI_Windows_Foundation.IAsyncInfo = try! abi.QueryInterface() - return __IMPL_Windows_Foundation.IAsyncInfoBridge.from(abi: RawPointer(swiftAbi)) - } -} -@_spi(WinRTInternal) -public class IClosableMaker: MakeFromAbi { - public typealias SwiftType = test_component.AnyIClosable - public static func from(abi: test_component.IInspectable) -> SwiftType? { - let swiftAbi: __ABI_Windows_Foundation.IClosable = try! abi.QueryInterface() - return __IMPL_Windows_Foundation.IClosableBridge.from(abi: RawPointer(swiftAbi)) - } -} -@_spi(WinRTInternal) -public class IMemoryBufferMaker: MakeFromAbi { - public typealias SwiftType = test_component.AnyIMemoryBuffer - public static func from(abi: test_component.IInspectable) -> SwiftType? { - let swiftAbi: __ABI_Windows_Foundation.IMemoryBuffer = try! abi.QueryInterface() - return __IMPL_Windows_Foundation.IMemoryBufferBridge.from(abi: RawPointer(swiftAbi)) - } -} -@_spi(WinRTInternal) -public class IMemoryBufferReferenceMaker: MakeFromAbi { - public typealias SwiftType = test_component.AnyIMemoryBufferReference - public static func from(abi: test_component.IInspectable) -> SwiftType? { - let swiftAbi: __ABI_Windows_Foundation.IMemoryBufferReference = try! abi.QueryInterface() - return __IMPL_Windows_Foundation.IMemoryBufferReferenceBridge.from(abi: RawPointer(swiftAbi)) - } -} -@_spi(WinRTInternal) -public class IStringableMaker: MakeFromAbi { - public typealias SwiftType = test_component.AnyIStringable - public static func from(abi: test_component.IInspectable) -> SwiftType? { - let swiftAbi: __ABI_Windows_Foundation.IStringable = try! abi.QueryInterface() - return __IMPL_Windows_Foundation.IStringableBridge.from(abi: RawPointer(swiftAbi)) - } -} -@_spi(WinRTInternal) -public class IWwwFormUrlDecoderEntryMaker: MakeFromAbi { - public typealias SwiftType = test_component.AnyIWwwFormUrlDecoderEntry - public static func from(abi: test_component.IInspectable) -> SwiftType? { - let swiftAbi: __ABI_Windows_Foundation.IWwwFormUrlDecoderEntry = try! abi.QueryInterface() - return __IMPL_Windows_Foundation.IWwwFormUrlDecoderEntryBridge.from(abi: RawPointer(swiftAbi)) - } -} -@_spi(WinRTInternal) -public class IPropertySetMaker: MakeFromAbi { - public typealias SwiftType = test_component.AnyIPropertySet - public static func from(abi: test_component.IInspectable) -> SwiftType? { - let swiftAbi: __ABI_Windows_Foundation_Collections.IPropertySet = try! abi.QueryInterface() - return __IMPL_Windows_Foundation_Collections.IPropertySetBridge.from(abi: RawPointer(swiftAbi)) - } -} -@_spi(WinRTInternal) -public class IVectorChangedEventArgsMaker: MakeFromAbi { - public typealias SwiftType = test_component.AnyIVectorChangedEventArgs - public static func from(abi: test_component.IInspectable) -> SwiftType? { - let swiftAbi: __ABI_Windows_Foundation_Collections.IVectorChangedEventArgs = try! abi.QueryInterface() - return __IMPL_Windows_Foundation_Collections.IVectorChangedEventArgsBridge.from(abi: RawPointer(swiftAbi)) - } -} -@_spi(WinRTInternal) -public class IStorageFileMaker: MakeFromAbi { - public typealias SwiftType = test_component.AnyIStorageFile - public static func from(abi: test_component.IInspectable) -> SwiftType? { - let swiftAbi: __ABI_Windows_Storage.IStorageFile = try! abi.QueryInterface() - return __IMPL_Windows_Storage.IStorageFileBridge.from(abi: RawPointer(swiftAbi)) - } -} -@_spi(WinRTInternal) -public class IStorageFile2Maker: MakeFromAbi { - public typealias SwiftType = test_component.AnyIStorageFile2 - public static func from(abi: test_component.IInspectable) -> SwiftType? { - let swiftAbi: __ABI_Windows_Storage.IStorageFile2 = try! abi.QueryInterface() - return __IMPL_Windows_Storage.IStorageFile2Bridge.from(abi: RawPointer(swiftAbi)) - } -} -@_spi(WinRTInternal) -public class IStorageFilePropertiesWithAvailabilityMaker: MakeFromAbi { - public typealias SwiftType = test_component.AnyIStorageFilePropertiesWithAvailability - public static func from(abi: test_component.IInspectable) -> SwiftType? { - let swiftAbi: __ABI_Windows_Storage.IStorageFilePropertiesWithAvailability = try! abi.QueryInterface() - return __IMPL_Windows_Storage.IStorageFilePropertiesWithAvailabilityBridge.from(abi: RawPointer(swiftAbi)) - } -} -@_spi(WinRTInternal) -public class IStorageFolderMaker: MakeFromAbi { - public typealias SwiftType = test_component.AnyIStorageFolder - public static func from(abi: test_component.IInspectable) -> SwiftType? { - let swiftAbi: __ABI_Windows_Storage.IStorageFolder = try! abi.QueryInterface() - return __IMPL_Windows_Storage.IStorageFolderBridge.from(abi: RawPointer(swiftAbi)) - } -} -@_spi(WinRTInternal) -public class IStorageFolder2Maker: MakeFromAbi { - public typealias SwiftType = test_component.AnyIStorageFolder2 - public static func from(abi: test_component.IInspectable) -> SwiftType? { - let swiftAbi: __ABI_Windows_Storage.IStorageFolder2 = try! abi.QueryInterface() - return __IMPL_Windows_Storage.IStorageFolder2Bridge.from(abi: RawPointer(swiftAbi)) - } -} -@_spi(WinRTInternal) -public class IStorageItemMaker: MakeFromAbi { - public typealias SwiftType = test_component.AnyIStorageItem - public static func from(abi: test_component.IInspectable) -> SwiftType? { - let swiftAbi: __ABI_Windows_Storage.IStorageItem = try! abi.QueryInterface() - return __IMPL_Windows_Storage.IStorageItemBridge.from(abi: RawPointer(swiftAbi)) - } -} -@_spi(WinRTInternal) -public class IStorageItem2Maker: MakeFromAbi { - public typealias SwiftType = test_component.AnyIStorageItem2 - public static func from(abi: test_component.IInspectable) -> SwiftType? { - let swiftAbi: __ABI_Windows_Storage.IStorageItem2 = try! abi.QueryInterface() - return __IMPL_Windows_Storage.IStorageItem2Bridge.from(abi: RawPointer(swiftAbi)) - } -} -@_spi(WinRTInternal) -public class IStorageItemPropertiesMaker: MakeFromAbi { - public typealias SwiftType = test_component.AnyIStorageItemProperties - public static func from(abi: test_component.IInspectable) -> SwiftType? { - let swiftAbi: __ABI_Windows_Storage.IStorageItemProperties = try! abi.QueryInterface() - return __IMPL_Windows_Storage.IStorageItemPropertiesBridge.from(abi: RawPointer(swiftAbi)) - } -} -@_spi(WinRTInternal) -public class IStorageItemProperties2Maker: MakeFromAbi { - public typealias SwiftType = test_component.AnyIStorageItemProperties2 - public static func from(abi: test_component.IInspectable) -> SwiftType? { - let swiftAbi: __ABI_Windows_Storage.IStorageItemProperties2 = try! abi.QueryInterface() - return __IMPL_Windows_Storage.IStorageItemProperties2Bridge.from(abi: RawPointer(swiftAbi)) - } -} -@_spi(WinRTInternal) -public class IStorageItemPropertiesWithProviderMaker: MakeFromAbi { - public typealias SwiftType = test_component.AnyIStorageItemPropertiesWithProvider - public static func from(abi: test_component.IInspectable) -> SwiftType? { - let swiftAbi: __ABI_Windows_Storage.IStorageItemPropertiesWithProvider = try! abi.QueryInterface() - return __IMPL_Windows_Storage.IStorageItemPropertiesWithProviderBridge.from(abi: RawPointer(swiftAbi)) - } -} -@_spi(WinRTInternal) -public class IStreamedFileDataRequestMaker: MakeFromAbi { - public typealias SwiftType = test_component.AnyIStreamedFileDataRequest - public static func from(abi: test_component.IInspectable) -> SwiftType? { - let swiftAbi: __ABI_Windows_Storage.IStreamedFileDataRequest = try! abi.QueryInterface() - return __IMPL_Windows_Storage.IStreamedFileDataRequestBridge.from(abi: RawPointer(swiftAbi)) - } -} -@_spi(WinRTInternal) -public class IStorageItemExtraPropertiesMaker: MakeFromAbi { - public typealias SwiftType = test_component.AnyIStorageItemExtraProperties - public static func from(abi: test_component.IInspectable) -> SwiftType? { - let swiftAbi: __ABI_Windows_Storage_FileProperties.IStorageItemExtraProperties = try! abi.QueryInterface() - return __IMPL_Windows_Storage_FileProperties.IStorageItemExtraPropertiesBridge.from(abi: RawPointer(swiftAbi)) - } -} -@_spi(WinRTInternal) -public class IStorageFolderQueryOperationsMaker: MakeFromAbi { - public typealias SwiftType = test_component.AnyIStorageFolderQueryOperations - public static func from(abi: test_component.IInspectable) -> SwiftType? { - let swiftAbi: __ABI_Windows_Storage_Search.IStorageFolderQueryOperations = try! abi.QueryInterface() - return __IMPL_Windows_Storage_Search.IStorageFolderQueryOperationsBridge.from(abi: RawPointer(swiftAbi)) - } -} -@_spi(WinRTInternal) -public class IStorageQueryResultBaseMaker: MakeFromAbi { - public typealias SwiftType = test_component.AnyIStorageQueryResultBase - public static func from(abi: test_component.IInspectable) -> SwiftType? { - let swiftAbi: __ABI_Windows_Storage_Search.IStorageQueryResultBase = try! abi.QueryInterface() - return __IMPL_Windows_Storage_Search.IStorageQueryResultBaseBridge.from(abi: RawPointer(swiftAbi)) - } -} -@_spi(WinRTInternal) -public class IBufferMaker: MakeFromAbi { - public typealias SwiftType = test_component.AnyIBuffer - public static func from(abi: test_component.IInspectable) -> SwiftType? { - let swiftAbi: __ABI_Windows_Storage_Streams.IBuffer = try! abi.QueryInterface() - return __IMPL_Windows_Storage_Streams.IBufferBridge.from(abi: RawPointer(swiftAbi)) - } -} -@_spi(WinRTInternal) -public class IContentTypeProviderMaker: MakeFromAbi { - public typealias SwiftType = test_component.AnyIContentTypeProvider - public static func from(abi: test_component.IInspectable) -> SwiftType? { - let swiftAbi: __ABI_Windows_Storage_Streams.IContentTypeProvider = try! abi.QueryInterface() - return __IMPL_Windows_Storage_Streams.IContentTypeProviderBridge.from(abi: RawPointer(swiftAbi)) - } -} -@_spi(WinRTInternal) -public class IInputStreamMaker: MakeFromAbi { - public typealias SwiftType = test_component.AnyIInputStream - public static func from(abi: test_component.IInspectable) -> SwiftType? { - let swiftAbi: __ABI_Windows_Storage_Streams.IInputStream = try! abi.QueryInterface() - return __IMPL_Windows_Storage_Streams.IInputStreamBridge.from(abi: RawPointer(swiftAbi)) - } -} -@_spi(WinRTInternal) -public class IInputStreamReferenceMaker: MakeFromAbi { - public typealias SwiftType = test_component.AnyIInputStreamReference - public static func from(abi: test_component.IInspectable) -> SwiftType? { - let swiftAbi: __ABI_Windows_Storage_Streams.IInputStreamReference = try! abi.QueryInterface() - return __IMPL_Windows_Storage_Streams.IInputStreamReferenceBridge.from(abi: RawPointer(swiftAbi)) - } -} -@_spi(WinRTInternal) -public class IOutputStreamMaker: MakeFromAbi { - public typealias SwiftType = test_component.AnyIOutputStream - public static func from(abi: test_component.IInspectable) -> SwiftType? { - let swiftAbi: __ABI_Windows_Storage_Streams.IOutputStream = try! abi.QueryInterface() - return __IMPL_Windows_Storage_Streams.IOutputStreamBridge.from(abi: RawPointer(swiftAbi)) - } -} -@_spi(WinRTInternal) -public class IRandomAccessStreamMaker: MakeFromAbi { - public typealias SwiftType = test_component.AnyIRandomAccessStream - public static func from(abi: test_component.IInspectable) -> SwiftType? { - let swiftAbi: __ABI_Windows_Storage_Streams.IRandomAccessStream = try! abi.QueryInterface() - return __IMPL_Windows_Storage_Streams.IRandomAccessStreamBridge.from(abi: RawPointer(swiftAbi)) - } -} -@_spi(WinRTInternal) -public class IRandomAccessStreamReferenceMaker: MakeFromAbi { - public typealias SwiftType = test_component.AnyIRandomAccessStreamReference - public static func from(abi: test_component.IInspectable) -> SwiftType? { - let swiftAbi: __ABI_Windows_Storage_Streams.IRandomAccessStreamReference = try! abi.QueryInterface() - return __IMPL_Windows_Storage_Streams.IRandomAccessStreamReferenceBridge.from(abi: RawPointer(swiftAbi)) - } -} -@_spi(WinRTInternal) -public class IRandomAccessStreamWithContentTypeMaker: MakeFromAbi { - public typealias SwiftType = test_component.AnyIRandomAccessStreamWithContentType - public static func from(abi: test_component.IInspectable) -> SwiftType? { - let swiftAbi: __ABI_Windows_Storage_Streams.IRandomAccessStreamWithContentType = try! abi.QueryInterface() - return __IMPL_Windows_Storage_Streams.IRandomAccessStreamWithContentTypeBridge.from(abi: RawPointer(swiftAbi)) - } -} -@_spi(WinRTInternal) -public class IArrayScenariosMaker: MakeFromAbi { - public typealias SwiftType = AnyIArrayScenarios - public static func from(abi: test_component.IInspectable) -> SwiftType? { - let swiftAbi: __ABI_test_component.IArrayScenarios = try! abi.QueryInterface() - return __IMPL_test_component.IArrayScenariosBridge.from(abi: RawPointer(swiftAbi)) - } -} -@_spi(WinRTInternal) -public class IAsyncMethodsWithProgressMaker: MakeFromAbi { - public typealias SwiftType = AnyIAsyncMethodsWithProgress - public static func from(abi: test_component.IInspectable) -> SwiftType? { - let swiftAbi: __ABI_test_component.IAsyncMethodsWithProgress = try! abi.QueryInterface() - return __IMPL_test_component.IAsyncMethodsWithProgressBridge.from(abi: RawPointer(swiftAbi)) - } -} -@_spi(WinRTInternal) -public class IAsyncOperationIntMaker: MakeFromAbi { - public typealias SwiftType = AnyIAsyncOperationInt - public static func from(abi: test_component.IInspectable) -> SwiftType? { - let swiftAbi: __ABI_test_component.IAsyncOperationInt = try! abi.QueryInterface() - return __IMPL_test_component.IAsyncOperationIntBridge.from(abi: RawPointer(swiftAbi)) - } -} -@_spi(WinRTInternal) -public class IBasicMaker: MakeFromAbi { - public typealias SwiftType = AnyIBasic - public static func from(abi: test_component.IInspectable) -> SwiftType? { - let swiftAbi: __ABI_test_component.IBasic = try! abi.QueryInterface() - return __IMPL_test_component.IBasicBridge.from(abi: RawPointer(swiftAbi)) - } -} -@_spi(WinRTInternal) -public class IIAmImplementableMaker: MakeFromAbi { - public typealias SwiftType = AnyIIAmImplementable - public static func from(abi: test_component.IInspectable) -> SwiftType? { - let swiftAbi: __ABI_test_component.IIAmImplementable = try! abi.QueryInterface() - return __IMPL_test_component.IIAmImplementableBridge.from(abi: RawPointer(swiftAbi)) - } -} -@_spi(WinRTInternal) -public class IInterfaceWithObservableVectorMaker: MakeFromAbi { - public typealias SwiftType = AnyIInterfaceWithObservableVector - public static func from(abi: test_component.IInspectable) -> SwiftType? { - let swiftAbi: __ABI_test_component.IInterfaceWithObservableVector = try! abi.QueryInterface() - return __IMPL_test_component.IInterfaceWithObservableVectorBridge.from(abi: RawPointer(swiftAbi)) - } -} -@_spi(WinRTInternal) -public class IReferenceTargetMaker: MakeFromAbi { - public typealias SwiftType = AnyIReferenceTarget - public static func from(abi: test_component.IInspectable) -> SwiftType? { - let swiftAbi: __ABI_test_component.IReferenceTarget = try! abi.QueryInterface() - return __IMPL_test_component.IReferenceTargetBridge.from(abi: RawPointer(swiftAbi)) - } -} -@_spi(WinRTInternal) -public class ISimpleDelegateMaker: MakeFromAbi { - public typealias SwiftType = AnyISimpleDelegate - public static func from(abi: test_component.IInspectable) -> SwiftType? { - let swiftAbi: __ABI_test_component.ISimpleDelegate = try! abi.QueryInterface() - return __IMPL_test_component.ISimpleDelegateBridge.from(abi: RawPointer(swiftAbi)) - } -} -@_spi(WinRTInternal) -public class InterfaceWithReturnDelegateMaker: MakeFromAbi { - public typealias SwiftType = AnyInterfaceWithReturnDelegate - public static func from(abi: test_component.IInspectable) -> SwiftType? { - let swiftAbi: __ABI_test_component.InterfaceWithReturnDelegate = try! abi.QueryInterface() - return __IMPL_test_component.InterfaceWithReturnDelegateBridge.from(abi: RawPointer(swiftAbi)) - } -} -@_spi(WinRTInternal) -public class WithIterableGuidsMaker: MakeFromAbi { - public typealias SwiftType = AnyWithIterableGuids - public static func from(abi: test_component.IInspectable) -> SwiftType? { - let swiftAbi: __ABI_test_component.WithIterableGuids = try! abi.QueryInterface() - return __IMPL_test_component.WithIterableGuidsBridge.from(abi: RawPointer(swiftAbi)) - } -} -@_spi(WinRTInternal) -public class WithKeywordMaker: MakeFromAbi { - public typealias SwiftType = AnyWithKeyword - public static func from(abi: test_component.IInspectable) -> SwiftType? { - let swiftAbi: __ABI_test_component.WithKeyword = try! abi.QueryInterface() - return __IMPL_test_component.WithKeywordBridge.from(abi: RawPointer(swiftAbi)) - } -} -@_spi(WinRTInternal) -public class DeferralMaker: MakeFromAbi { - public typealias SwiftType = test_component.Deferral - public static func from(abi: test_component.IInspectable) -> SwiftType? { - return Deferral(fromAbi: abi) - } -} -@_spi(WinRTInternal) -public class MemoryBufferMaker: MakeFromAbi { - public typealias SwiftType = test_component.MemoryBuffer - public static func from(abi: test_component.IInspectable) -> SwiftType? { - return MemoryBuffer(fromAbi: abi) - } -} -@_spi(WinRTInternal) -public class UriMaker: MakeFromAbi { - public typealias SwiftType = test_component.Uri - public static func from(abi: test_component.IInspectable) -> SwiftType? { - return Uri(fromAbi: abi) - } -} -@_spi(WinRTInternal) -public class WwwFormUrlDecoderMaker: MakeFromAbi { - public typealias SwiftType = test_component.WwwFormUrlDecoder - public static func from(abi: test_component.IInspectable) -> SwiftType? { - return WwwFormUrlDecoder(fromAbi: abi) - } -} -@_spi(WinRTInternal) -public class PropertySetMaker: MakeFromAbi { - public typealias SwiftType = test_component.PropertySet - public static func from(abi: test_component.IInspectable) -> SwiftType? { - return PropertySet(fromAbi: abi) - } -} -@_spi(WinRTInternal) -public class StringMapMaker: MakeFromAbi { - public typealias SwiftType = test_component.StringMap - public static func from(abi: test_component.IInspectable) -> SwiftType? { - return StringMap(fromAbi: abi) - } -} -@_spi(WinRTInternal) -public class ValueSetMaker: MakeFromAbi { - public typealias SwiftType = test_component.ValueSet - public static func from(abi: test_component.IInspectable) -> SwiftType? { - return ValueSet(fromAbi: abi) - } -} -@_spi(WinRTInternal) -public class StorageFileMaker: MakeFromAbi { - public typealias SwiftType = test_component.StorageFile - public static func from(abi: test_component.IInspectable) -> SwiftType? { - return StorageFile(fromAbi: abi) - } -} -@_spi(WinRTInternal) -public class StorageFolderMaker: MakeFromAbi { - public typealias SwiftType = test_component.StorageFolder - public static func from(abi: test_component.IInspectable) -> SwiftType? { - return StorageFolder(fromAbi: abi) - } -} -@_spi(WinRTInternal) -public class StorageLibraryChangeMaker: MakeFromAbi { - public typealias SwiftType = test_component.StorageLibraryChange - public static func from(abi: test_component.IInspectable) -> SwiftType? { - return StorageLibraryChange(fromAbi: abi) - } -} -@_spi(WinRTInternal) -public class StorageLibraryChangeReaderMaker: MakeFromAbi { - public typealias SwiftType = test_component.StorageLibraryChangeReader - public static func from(abi: test_component.IInspectable) -> SwiftType? { - return StorageLibraryChangeReader(fromAbi: abi) - } -} -@_spi(WinRTInternal) -public class StorageLibraryChangeTrackerMaker: MakeFromAbi { - public typealias SwiftType = test_component.StorageLibraryChangeTracker - public static func from(abi: test_component.IInspectable) -> SwiftType? { - return StorageLibraryChangeTracker(fromAbi: abi) - } -} -@_spi(WinRTInternal) -public class StorageProviderMaker: MakeFromAbi { - public typealias SwiftType = test_component.StorageProvider - public static func from(abi: test_component.IInspectable) -> SwiftType? { - return StorageProvider(fromAbi: abi) - } -} -@_spi(WinRTInternal) -public class StorageStreamTransactionMaker: MakeFromAbi { - public typealias SwiftType = test_component.StorageStreamTransaction - public static func from(abi: test_component.IInspectable) -> SwiftType? { - return StorageStreamTransaction(fromAbi: abi) - } -} -@_spi(WinRTInternal) -public class StreamedFileDataRequestMaker: MakeFromAbi { - public typealias SwiftType = test_component.StreamedFileDataRequest - public static func from(abi: test_component.IInspectable) -> SwiftType? { - return StreamedFileDataRequest(fromAbi: abi) - } -} -@_spi(WinRTInternal) -public class BasicPropertiesMaker: MakeFromAbi { - public typealias SwiftType = test_component.BasicProperties - public static func from(abi: test_component.IInspectable) -> SwiftType? { - return BasicProperties(fromAbi: abi) - } -} -@_spi(WinRTInternal) -public class DocumentPropertiesMaker: MakeFromAbi { - public typealias SwiftType = test_component.DocumentProperties - public static func from(abi: test_component.IInspectable) -> SwiftType? { - return DocumentProperties(fromAbi: abi) - } -} -@_spi(WinRTInternal) -public class ImagePropertiesMaker: MakeFromAbi { - public typealias SwiftType = test_component.ImageProperties - public static func from(abi: test_component.IInspectable) -> SwiftType? { - return ImageProperties(fromAbi: abi) - } -} -@_spi(WinRTInternal) -public class MusicPropertiesMaker: MakeFromAbi { - public typealias SwiftType = test_component.MusicProperties - public static func from(abi: test_component.IInspectable) -> SwiftType? { - return MusicProperties(fromAbi: abi) - } -} -@_spi(WinRTInternal) -public class StorageItemContentPropertiesMaker: MakeFromAbi { - public typealias SwiftType = test_component.StorageItemContentProperties - public static func from(abi: test_component.IInspectable) -> SwiftType? { - return StorageItemContentProperties(fromAbi: abi) - } -} -@_spi(WinRTInternal) -public class StorageItemThumbnailMaker: MakeFromAbi { - public typealias SwiftType = test_component.StorageItemThumbnail - public static func from(abi: test_component.IInspectable) -> SwiftType? { - return StorageItemThumbnail(fromAbi: abi) - } -} -@_spi(WinRTInternal) -public class VideoPropertiesMaker: MakeFromAbi { - public typealias SwiftType = test_component.VideoProperties - public static func from(abi: test_component.IInspectable) -> SwiftType? { - return VideoProperties(fromAbi: abi) - } -} -@_spi(WinRTInternal) -public class QueryOptionsMaker: MakeFromAbi { - public typealias SwiftType = test_component.QueryOptions - public static func from(abi: test_component.IInspectable) -> SwiftType? { - return QueryOptions(fromAbi: abi) - } -} -@_spi(WinRTInternal) -public class StorageFileQueryResultMaker: MakeFromAbi { - public typealias SwiftType = test_component.StorageFileQueryResult - public static func from(abi: test_component.IInspectable) -> SwiftType? { - return StorageFileQueryResult(fromAbi: abi) - } -} -@_spi(WinRTInternal) -public class StorageFolderQueryResultMaker: MakeFromAbi { - public typealias SwiftType = test_component.StorageFolderQueryResult - public static func from(abi: test_component.IInspectable) -> SwiftType? { - return StorageFolderQueryResult(fromAbi: abi) - } -} -@_spi(WinRTInternal) -public class StorageItemQueryResultMaker: MakeFromAbi { - public typealias SwiftType = test_component.StorageItemQueryResult - public static func from(abi: test_component.IInspectable) -> SwiftType? { - return StorageItemQueryResult(fromAbi: abi) - } -} -@_spi(WinRTInternal) -public class BufferMaker: MakeFromAbi { - public typealias SwiftType = test_component.Buffer - public static func from(abi: test_component.IInspectable) -> SwiftType? { - return Buffer(fromAbi: abi) - } -} -@_spi(WinRTInternal) -public class AsyncOperationIntMaker: MakeFromAbi { - public typealias SwiftType = AsyncOperationInt - public static func from(abi: test_component.IInspectable) -> SwiftType? { - return AsyncOperationInt(fromAbi: abi) - } -} -@_spi(WinRTInternal) -public class BaseMaker: MakeFromAbi { - public typealias SwiftType = Base - public static func from(abi: test_component.IInspectable) -> SwiftType? { - return Base(fromAbi: abi) - } -} -@_spi(WinRTInternal) -public class BaseCollectionMaker: MakeFromAbi { - public typealias SwiftType = BaseCollection - public static func from(abi: test_component.IInspectable) -> SwiftType? { - return BaseCollection(fromAbi: abi) - } -} -@_spi(WinRTInternal) -public class BaseMapCollectionMaker: MakeFromAbi { - public typealias SwiftType = BaseMapCollection - public static func from(abi: test_component.IInspectable) -> SwiftType? { - return BaseMapCollection(fromAbi: abi) - } -} -@_spi(WinRTInternal) -public class BaseNoOverridesMaker: MakeFromAbi { - public typealias SwiftType = BaseNoOverrides - public static func from(abi: test_component.IInspectable) -> SwiftType? { - return BaseNoOverrides(fromAbi: abi) - } -} -@_spi(WinRTInternal) -public class BaseObservableCollectionMaker: MakeFromAbi { - public typealias SwiftType = BaseObservableCollection - public static func from(abi: test_component.IInspectable) -> SwiftType? { - return BaseObservableCollection(fromAbi: abi) - } -} -@_spi(WinRTInternal) -public class ClassMaker: MakeFromAbi { - public typealias SwiftType = Class - public static func from(abi: test_component.IInspectable) -> SwiftType? { - return Class(fromAbi: abi) - } -} -@_spi(WinRTInternal) -public class CollectionTesterMaker: MakeFromAbi { - public typealias SwiftType = CollectionTester - public static func from(abi: test_component.IInspectable) -> SwiftType? { - return CollectionTester(fromAbi: abi) - } -} -@_spi(WinRTInternal) -public class DeferrableEventArgsMaker: MakeFromAbi { - public typealias SwiftType = DeferrableEventArgs - public static func from(abi: test_component.IInspectable) -> SwiftType? { - return DeferrableEventArgs(fromAbi: abi) - } -} -@_spi(WinRTInternal) -public class DerivedMaker: MakeFromAbi { - public typealias SwiftType = Derived - public static func from(abi: test_component.IInspectable) -> SwiftType? { - return Derived(fromAbi: abi) - } -} -@_spi(WinRTInternal) -public class DerivedFromNoConstructorMaker: MakeFromAbi { - public typealias SwiftType = DerivedFromNoConstructor - public static func from(abi: test_component.IInspectable) -> SwiftType? { - return DerivedFromNoConstructor(fromAbi: abi) - } -} -@_spi(WinRTInternal) -public class EventTesterMaker: MakeFromAbi { - public typealias SwiftType = EventTester - public static func from(abi: test_component.IInspectable) -> SwiftType? { - return EventTester(fromAbi: abi) - } -} -@_spi(WinRTInternal) -public class NoopClosableMaker: MakeFromAbi { - public typealias SwiftType = NoopClosable - public static func from(abi: test_component.IInspectable) -> SwiftType? { - return NoopClosable(fromAbi: abi) - } -} -@_spi(WinRTInternal) -public class SimpleMaker: MakeFromAbi { - public typealias SwiftType = Simple - public static func from(abi: test_component.IInspectable) -> SwiftType? { - return Simple(fromAbi: abi) - } -} -@_spi(WinRTInternal) -public class UnsealedDerivedMaker: MakeFromAbi { - public typealias SwiftType = UnsealedDerived - public static func from(abi: test_component.IInspectable) -> SwiftType? { - return UnsealedDerived(fromAbi: abi) - } -} -@_spi(WinRTInternal) -public class UnsealedDerived2Maker: MakeFromAbi { - public typealias SwiftType = UnsealedDerived2 - public static func from(abi: test_component.IInspectable) -> SwiftType? { - return UnsealedDerived2(fromAbi: abi) - } -} -@_spi(WinRTInternal) -public class UnsealedDerivedFromNoConstructorMaker: MakeFromAbi { - public typealias SwiftType = UnsealedDerivedFromNoConstructor - public static func from(abi: test_component.IInspectable) -> SwiftType? { - return UnsealedDerivedFromNoConstructor(fromAbi: abi) - } -} -@_spi(WinRTInternal) -public class UnsealedDerivedNoConstructorMaker: MakeFromAbi { - public typealias SwiftType = UnsealedDerivedNoConstructor - public static func from(abi: test_component.IInspectable) -> SwiftType? { - return UnsealedDerivedNoConstructor(fromAbi: abi) - } -} -@_spi(WinRTInternal) -public class UnsealedDerivedNoOverridesMaker: MakeFromAbi { - public typealias SwiftType = UnsealedDerivedNoOverrides - public static func from(abi: test_component.IInspectable) -> SwiftType? { - return UnsealedDerivedNoOverrides(fromAbi: abi) - } -} -@_spi(WinRTInternal) -public class WeakReferencerMaker: MakeFromAbi { - public typealias SwiftType = WeakReferencer - public static func from(abi: test_component.IInspectable) -> SwiftType? { - return WeakReferencer(fromAbi: abi) - } -}