127 lines
5.7 KiB
Swift
127 lines
5.7 KiB
Swift
// WARNING: Please don't edit this file. It was generated by Swift/WinRT v0.0.1
|
|
// swiftlint:disable all
|
|
import Foundation
|
|
import CWinRT
|
|
|
|
public enum __IMPL_Windows_Foundation_Collections {
|
|
public enum IPropertySetBridge : AbiInterfaceBridge {
|
|
public typealias CABI = __x_ABI_CWindows_CFoundation_CCollections_CIPropertySet
|
|
public typealias SwiftABI = __ABI_Windows_Foundation_Collections.IPropertySet
|
|
public typealias SwiftProjection = AnyIPropertySet
|
|
public static func from(abi: ComPtr<CABI>?) -> SwiftProjection? {
|
|
guard let abi = abi else { return nil }
|
|
return IPropertySetImpl(abi)
|
|
}
|
|
|
|
public static func makeAbi() -> CABI {
|
|
let vtblPtr = withUnsafeMutablePointer(to: &__ABI_Windows_Foundation_Collections.IPropertySetVTable) { $0 }
|
|
return .init(lpVtbl: vtblPtr)
|
|
}
|
|
}
|
|
|
|
fileprivate class IPropertySetImpl: IPropertySet, WinRTAbiImpl {
|
|
fileprivate typealias Bridge = IPropertySetBridge
|
|
fileprivate let _default: Bridge.SwiftABI
|
|
fileprivate var thisPtr: WindowsFoundation.IInspectable { _default }
|
|
fileprivate init(_ fromAbi: ComPtr<Bridge.CABI>) {
|
|
_default = Bridge.SwiftABI(fromAbi)
|
|
}
|
|
|
|
public typealias K = String
|
|
public typealias V = Any?
|
|
public typealias T = AnyIKeyValuePair<String, Any?>?
|
|
private lazy var _IObservableMap: IObservableMapString_Any! = getInterfaceForCaching()
|
|
/// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.ipropertyset.mapchanged)
|
|
fileprivate lazy var mapChanged : Event<MapChangedEventHandler<String, Any?>> = {
|
|
.init(
|
|
add: { [weak self] in
|
|
guard let this = self?._IObservableMap else { return .init() }
|
|
return try! this.add_MapChangedImpl($0)
|
|
},
|
|
remove: { [weak self] in
|
|
try? self?._IObservableMap.remove_MapChangedImpl($0)
|
|
}
|
|
)
|
|
}()
|
|
|
|
private lazy var _IMap: IMapString_Any! = getInterfaceForCaching()
|
|
/// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.ipropertyset.lookup)
|
|
fileprivate func lookup(_ key: String) -> Any? {
|
|
try! _IMap.LookupImpl(key)
|
|
}
|
|
|
|
/// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.ipropertyset.haskey)
|
|
fileprivate func hasKey(_ key: String) -> Bool {
|
|
try! _IMap.HasKeyImpl(key)
|
|
}
|
|
|
|
/// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.ipropertyset.getview)
|
|
fileprivate func getView() -> AnyIMapView<String, Any?>? {
|
|
try! _IMap.GetViewImpl()
|
|
}
|
|
|
|
/// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.ipropertyset.insert)
|
|
fileprivate func insert(_ key: String, _ value: Any?) -> Bool {
|
|
try! _IMap.InsertImpl(key, value)
|
|
}
|
|
|
|
/// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.ipropertyset.remove)
|
|
fileprivate func remove(_ key: String) {
|
|
try! _IMap.RemoveImpl(key)
|
|
}
|
|
|
|
/// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.ipropertyset.clear)
|
|
fileprivate func clear() {
|
|
try! _IMap.ClearImpl()
|
|
}
|
|
|
|
/// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.ipropertyset.size)
|
|
fileprivate var size : UInt32 {
|
|
get { try! _IMap.get_SizeImpl() }
|
|
}
|
|
|
|
private lazy var _IIterable: IIterableIKeyValuePairString_Any! = getInterfaceForCaching()
|
|
/// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.ipropertyset.first)
|
|
fileprivate func first() -> AnyIIterator<AnyIKeyValuePair<String, Any?>?>? {
|
|
try! _IIterable.FirstImpl()
|
|
}
|
|
|
|
}
|
|
|
|
public enum IVectorChangedEventArgsBridge : AbiInterfaceBridge {
|
|
public typealias CABI = __x_ABI_CWindows_CFoundation_CCollections_CIVectorChangedEventArgs
|
|
public typealias SwiftABI = __ABI_Windows_Foundation_Collections.IVectorChangedEventArgs
|
|
public typealias SwiftProjection = AnyIVectorChangedEventArgs
|
|
public static func from(abi: ComPtr<CABI>?) -> SwiftProjection? {
|
|
guard let abi = abi else { return nil }
|
|
return IVectorChangedEventArgsImpl(abi)
|
|
}
|
|
|
|
public static func makeAbi() -> CABI {
|
|
let vtblPtr = withUnsafeMutablePointer(to: &__ABI_Windows_Foundation_Collections.IVectorChangedEventArgsVTable) { $0 }
|
|
return .init(lpVtbl: vtblPtr)
|
|
}
|
|
}
|
|
|
|
fileprivate class IVectorChangedEventArgsImpl: IVectorChangedEventArgs, WinRTAbiImpl {
|
|
fileprivate typealias Bridge = IVectorChangedEventArgsBridge
|
|
fileprivate let _default: Bridge.SwiftABI
|
|
fileprivate var thisPtr: WindowsFoundation.IInspectable { _default }
|
|
fileprivate init(_ fromAbi: ComPtr<Bridge.CABI>) {
|
|
_default = Bridge.SwiftABI(fromAbi)
|
|
}
|
|
|
|
/// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.ivectorchangedeventargs.collectionchange)
|
|
fileprivate var collectionChange : CollectionChange {
|
|
get { try! _default.get_CollectionChangeImpl() }
|
|
}
|
|
|
|
/// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.ivectorchangedeventargs.index)
|
|
fileprivate var index : UInt32 {
|
|
get { try! _default.get_IndexImpl() }
|
|
}
|
|
|
|
}
|
|
|
|
}
|