652 lines
30 KiB
Swift
652 lines
30 KiB
Swift
// WARNING: Please don't edit this file. It was generated by Swift/WinRT v0.0.1
|
|
// swiftlint:disable all
|
|
import Foundation
|
|
@_spi(WinRTInternal) @_spi(WinRTImplements) import WindowsFoundation
|
|
import CWinRT
|
|
|
|
private var IID___x_ABI_CMicrosoft_CUI_CXaml_CInterop_CIBindableIterable: WindowsFoundation.IID {
|
|
.init(Data1: 0x036D2C08, Data2: 0xDF29, Data3: 0x41AF, Data4: ( 0x8A,0xA2,0xD7,0x74,0xBE,0x62,0xBA,0x6F ))// 036D2C08-DF29-41AF-8AA2-D774BE62BA6F
|
|
}
|
|
|
|
private var IID___x_ABI_CMicrosoft_CUI_CXaml_CInterop_CIBindableIterator: WindowsFoundation.IID {
|
|
.init(Data1: 0x6A1D6C07, Data2: 0x076D, Data3: 0x49F2, Data4: ( 0x83,0x14,0xF5,0x2C,0x9C,0x9A,0x83,0x31 ))// 6A1D6C07-076D-49F2-8314-F52C9C9A8331
|
|
}
|
|
|
|
private var IID___x_ABI_CMicrosoft_CUI_CXaml_CInterop_CIBindableVector: WindowsFoundation.IID {
|
|
.init(Data1: 0x393DE7DE, Data2: 0x6FD0, Data3: 0x4C0D, Data4: ( 0xBB,0x71,0x47,0x24,0x4A,0x11,0x3E,0x93 ))// 393DE7DE-6FD0-4C0D-BB71-47244A113E93
|
|
}
|
|
|
|
private var IID___x_ABI_CMicrosoft_CUI_CXaml_CInterop_CIBindableVectorView: WindowsFoundation.IID {
|
|
.init(Data1: 0x346DD6E7, Data2: 0x976E, Data3: 0x4BC3, Data4: ( 0x81,0x5D,0xEC,0xE2,0x43,0xBC,0x0F,0x33 ))// 346DD6E7-976E-4BC3-815D-ECE243BC0F33
|
|
}
|
|
|
|
private var IID___x_ABI_CMicrosoft_CUI_CXaml_CInterop_CINotifyCollectionChanged: WindowsFoundation.IID {
|
|
.init(Data1: 0x530155E1, Data2: 0x28A5, Data3: 0x5693, Data4: ( 0x87,0xCE,0x30,0x72,0x4D,0x95,0xA0,0x6D ))// 530155E1-28A5-5693-87CE-30724D95A06D
|
|
}
|
|
|
|
private var IID___x_ABI_CMicrosoft_CUI_CXaml_CInterop_CINotifyCollectionChangedEventArgs: WindowsFoundation.IID {
|
|
.init(Data1: 0xDA049FF2, Data2: 0xD2E0, Data3: 0x5FE8, Data4: ( 0x8C,0x7B,0xF8,0x7F,0x26,0x06,0x0B,0x6F ))// DA049FF2-D2E0-5FE8-8C7B-F87F26060B6F
|
|
}
|
|
|
|
private var IID___x_ABI_CMicrosoft_CUI_CXaml_CInterop_CINotifyCollectionChangedEventArgsFactory: WindowsFoundation.IID {
|
|
.init(Data1: 0x5108EBA4, Data2: 0x4892, Data3: 0x5A20, Data4: ( 0x83,0x74,0xA9,0x68,0x15,0xE0,0xFD,0x27 ))// 5108EBA4-4892-5A20-8374-A96815E0FD27
|
|
}
|
|
|
|
private var IID___x_ABI_CMicrosoft_CUI_CXaml_CInterop_CINotifyCollectionChangedEventHandler: WindowsFoundation.IID {
|
|
.init(Data1: 0x8B0909DC, Data2: 0x2005, Data3: 0x5D93, Data4: ( 0xBF,0x8A,0x72,0x5F,0x01,0x7B,0xAA,0x8D ))// 8B0909DC-2005-5D93-BF8A-725F017BAA8D
|
|
}
|
|
|
|
public enum __ABI_Microsoft_UI_Xaml_Interop {
|
|
public class IBindableIterable: WindowsFoundation.IInspectable {
|
|
override public class var IID: WindowsFoundation.IID { IID___x_ABI_CMicrosoft_CUI_CXaml_CInterop_CIBindableIterable }
|
|
|
|
open func FirstImpl() throws -> WinUI.AnyIBindableIterator? {
|
|
let (result) = try ComPtrs.initialize { resultAbi in
|
|
_ = try perform(as: __x_ABI_CMicrosoft_CUI_CXaml_CInterop_CIBindableIterable.self) { pThis in
|
|
try CHECKED(pThis.pointee.lpVtbl.pointee.First(pThis, &resultAbi))
|
|
}
|
|
}
|
|
return __ABI_Microsoft_UI_Xaml_Interop.IBindableIteratorWrapper.unwrapFrom(abi: result)
|
|
}
|
|
|
|
}
|
|
|
|
internal static var IBindableIterableVTable: __x_ABI_CMicrosoft_CUI_CXaml_CInterop_CIBindableIterableVtbl = .init(
|
|
QueryInterface: { IBindableIterableWrapper.queryInterface($0, $1, $2) },
|
|
AddRef: { IBindableIterableWrapper.addRef($0) },
|
|
Release: { IBindableIterableWrapper.release($0) },
|
|
GetIids: {
|
|
let size = MemoryLayout<WindowsFoundation.IID>.size
|
|
let iids = CoTaskMemAlloc(UInt64(size) * 3).assumingMemoryBound(to: WindowsFoundation.IID.self)
|
|
iids[0] = IUnknown.IID
|
|
iids[1] = IInspectable.IID
|
|
iids[2] = __ABI_Microsoft_UI_Xaml_Interop.IBindableIterableWrapper.IID
|
|
$1!.pointee = 3
|
|
$2!.pointee = iids
|
|
return S_OK
|
|
},
|
|
|
|
GetRuntimeClassName: {
|
|
_ = $0
|
|
let hstring = try! HString("Microsoft.UI.Xaml.Interop.IBindableIterable").detach()
|
|
$1!.pointee = hstring
|
|
return S_OK
|
|
},
|
|
|
|
GetTrustLevel: {
|
|
_ = $0
|
|
$1!.pointee = TrustLevel(rawValue: 0)
|
|
return S_OK
|
|
},
|
|
|
|
First: {
|
|
do {
|
|
guard let __unwrapped__instance = IBindableIterableWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG }
|
|
let result = try __unwrapped__instance.first()
|
|
let resultWrapper = __ABI_Microsoft_UI_Xaml_Interop.IBindableIteratorWrapper(result)
|
|
resultWrapper?.copyTo($1)
|
|
return S_OK
|
|
} catch { return failWith(err: E_FAIL) }
|
|
}
|
|
)
|
|
|
|
public typealias IBindableIterableWrapper = InterfaceWrapperBase<__IMPL_Microsoft_UI_Xaml_Interop.IBindableIterableBridge>
|
|
public class IBindableIterator: WindowsFoundation.IInspectable {
|
|
override public class var IID: WindowsFoundation.IID { IID___x_ABI_CMicrosoft_CUI_CXaml_CInterop_CIBindableIterator }
|
|
|
|
open func get_CurrentImpl() throws -> Any? {
|
|
let (value) = try ComPtrs.initialize { valueAbi in
|
|
_ = try perform(as: __x_ABI_CMicrosoft_CUI_CXaml_CInterop_CIBindableIterator.self) { pThis in
|
|
try CHECKED(pThis.pointee.lpVtbl.pointee.get_Current(pThis, &valueAbi))
|
|
}
|
|
}
|
|
return __ABI_.AnyWrapper.unwrapFrom(abi: value)
|
|
}
|
|
|
|
open func get_HasCurrentImpl() throws -> Bool {
|
|
var value: boolean = 0
|
|
_ = try perform(as: __x_ABI_CMicrosoft_CUI_CXaml_CInterop_CIBindableIterator.self) { pThis in
|
|
try CHECKED(pThis.pointee.lpVtbl.pointee.get_HasCurrent(pThis, &value))
|
|
}
|
|
return .init(from: value)
|
|
}
|
|
|
|
open func MoveNextImpl() throws -> Bool {
|
|
var result: boolean = 0
|
|
_ = try perform(as: __x_ABI_CMicrosoft_CUI_CXaml_CInterop_CIBindableIterator.self) { pThis in
|
|
try CHECKED(pThis.pointee.lpVtbl.pointee.MoveNext(pThis, &result))
|
|
}
|
|
return .init(from: result)
|
|
}
|
|
|
|
}
|
|
|
|
internal static var IBindableIteratorVTable: __x_ABI_CMicrosoft_CUI_CXaml_CInterop_CIBindableIteratorVtbl = .init(
|
|
QueryInterface: { IBindableIteratorWrapper.queryInterface($0, $1, $2) },
|
|
AddRef: { IBindableIteratorWrapper.addRef($0) },
|
|
Release: { IBindableIteratorWrapper.release($0) },
|
|
GetIids: {
|
|
let size = MemoryLayout<WindowsFoundation.IID>.size
|
|
let iids = CoTaskMemAlloc(UInt64(size) * 3).assumingMemoryBound(to: WindowsFoundation.IID.self)
|
|
iids[0] = IUnknown.IID
|
|
iids[1] = IInspectable.IID
|
|
iids[2] = __ABI_Microsoft_UI_Xaml_Interop.IBindableIteratorWrapper.IID
|
|
$1!.pointee = 3
|
|
$2!.pointee = iids
|
|
return S_OK
|
|
},
|
|
|
|
GetRuntimeClassName: {
|
|
_ = $0
|
|
let hstring = try! HString("Microsoft.UI.Xaml.Interop.IBindableIterator").detach()
|
|
$1!.pointee = hstring
|
|
return S_OK
|
|
},
|
|
|
|
GetTrustLevel: {
|
|
_ = $0
|
|
$1!.pointee = TrustLevel(rawValue: 0)
|
|
return S_OK
|
|
},
|
|
|
|
get_Current: {
|
|
guard let __unwrapped__instance = IBindableIteratorWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG }
|
|
let value = __unwrapped__instance.current
|
|
let valueWrapper = __ABI_.AnyWrapper(value)
|
|
valueWrapper?.copyTo($1)
|
|
return S_OK
|
|
},
|
|
|
|
get_HasCurrent: {
|
|
guard let __unwrapped__instance = IBindableIteratorWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG }
|
|
let value = __unwrapped__instance.hasCurrent
|
|
$1?.initialize(to: .init(from: value))
|
|
return S_OK
|
|
},
|
|
|
|
MoveNext: {
|
|
do {
|
|
guard let __unwrapped__instance = IBindableIteratorWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG }
|
|
let result = try __unwrapped__instance.moveNext()
|
|
$1?.initialize(to: .init(from: result))
|
|
return S_OK
|
|
} catch { return failWith(err: E_FAIL) }
|
|
}
|
|
)
|
|
|
|
public typealias IBindableIteratorWrapper = InterfaceWrapperBase<__IMPL_Microsoft_UI_Xaml_Interop.IBindableIteratorBridge>
|
|
public class IBindableVector: WindowsFoundation.IInspectable {
|
|
override public class var IID: WindowsFoundation.IID { IID___x_ABI_CMicrosoft_CUI_CXaml_CInterop_CIBindableVector }
|
|
|
|
open func GetAtImpl(_ index: UInt32) throws -> Any? {
|
|
let (result) = try ComPtrs.initialize { resultAbi in
|
|
_ = try perform(as: __x_ABI_CMicrosoft_CUI_CXaml_CInterop_CIBindableVector.self) { pThis in
|
|
try CHECKED(pThis.pointee.lpVtbl.pointee.GetAt(pThis, index, &resultAbi))
|
|
}
|
|
}
|
|
return __ABI_.AnyWrapper.unwrapFrom(abi: result)
|
|
}
|
|
|
|
open func get_SizeImpl() throws -> UInt32 {
|
|
var value: UINT32 = 0
|
|
_ = try perform(as: __x_ABI_CMicrosoft_CUI_CXaml_CInterop_CIBindableVector.self) { pThis in
|
|
try CHECKED(pThis.pointee.lpVtbl.pointee.get_Size(pThis, &value))
|
|
}
|
|
return value
|
|
}
|
|
|
|
open func GetViewImpl() throws -> WinUI.AnyIBindableVectorView? {
|
|
let (result) = try ComPtrs.initialize { resultAbi in
|
|
_ = try perform(as: __x_ABI_CMicrosoft_CUI_CXaml_CInterop_CIBindableVector.self) { pThis in
|
|
try CHECKED(pThis.pointee.lpVtbl.pointee.GetView(pThis, &resultAbi))
|
|
}
|
|
}
|
|
return __ABI_Microsoft_UI_Xaml_Interop.IBindableVectorViewWrapper.unwrapFrom(abi: result)
|
|
}
|
|
|
|
open func IndexOfImpl(_ value: Any?, _ index: inout UInt32) throws -> Bool {
|
|
var returnValue: boolean = 0
|
|
let valueWrapper = __ABI_.AnyWrapper(value)
|
|
let _value = try! valueWrapper?.toABI { $0 }
|
|
_ = try perform(as: __x_ABI_CMicrosoft_CUI_CXaml_CInterop_CIBindableVector.self) { pThis in
|
|
try CHECKED(pThis.pointee.lpVtbl.pointee.IndexOf(pThis, _value, &index, &returnValue))
|
|
}
|
|
return .init(from: returnValue)
|
|
}
|
|
|
|
open func SetAtImpl(_ index: UInt32, _ value: Any?) throws {
|
|
let valueWrapper = __ABI_.AnyWrapper(value)
|
|
let _value = try! valueWrapper?.toABI { $0 }
|
|
_ = try perform(as: __x_ABI_CMicrosoft_CUI_CXaml_CInterop_CIBindableVector.self) { pThis in
|
|
try CHECKED(pThis.pointee.lpVtbl.pointee.SetAt(pThis, index, _value))
|
|
}
|
|
}
|
|
|
|
open func InsertAtImpl(_ index: UInt32, _ value: Any?) throws {
|
|
let valueWrapper = __ABI_.AnyWrapper(value)
|
|
let _value = try! valueWrapper?.toABI { $0 }
|
|
_ = try perform(as: __x_ABI_CMicrosoft_CUI_CXaml_CInterop_CIBindableVector.self) { pThis in
|
|
try CHECKED(pThis.pointee.lpVtbl.pointee.InsertAt(pThis, index, _value))
|
|
}
|
|
}
|
|
|
|
open func RemoveAtImpl(_ index: UInt32) throws {
|
|
_ = try perform(as: __x_ABI_CMicrosoft_CUI_CXaml_CInterop_CIBindableVector.self) { pThis in
|
|
try CHECKED(pThis.pointee.lpVtbl.pointee.RemoveAt(pThis, index))
|
|
}
|
|
}
|
|
|
|
open func AppendImpl(_ value: Any?) throws {
|
|
let valueWrapper = __ABI_.AnyWrapper(value)
|
|
let _value = try! valueWrapper?.toABI { $0 }
|
|
_ = try perform(as: __x_ABI_CMicrosoft_CUI_CXaml_CInterop_CIBindableVector.self) { pThis in
|
|
try CHECKED(pThis.pointee.lpVtbl.pointee.Append(pThis, _value))
|
|
}
|
|
}
|
|
|
|
open func RemoveAtEndImpl() throws {
|
|
_ = try perform(as: __x_ABI_CMicrosoft_CUI_CXaml_CInterop_CIBindableVector.self) { pThis in
|
|
try CHECKED(pThis.pointee.lpVtbl.pointee.RemoveAtEnd(pThis))
|
|
}
|
|
}
|
|
|
|
open func ClearImpl() throws {
|
|
_ = try perform(as: __x_ABI_CMicrosoft_CUI_CXaml_CInterop_CIBindableVector.self) { pThis in
|
|
try CHECKED(pThis.pointee.lpVtbl.pointee.Clear(pThis))
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
internal static var IBindableVectorVTable: __x_ABI_CMicrosoft_CUI_CXaml_CInterop_CIBindableVectorVtbl = .init(
|
|
QueryInterface: { IBindableVectorWrapper.queryInterface($0, $1, $2) },
|
|
AddRef: { IBindableVectorWrapper.addRef($0) },
|
|
Release: { IBindableVectorWrapper.release($0) },
|
|
GetIids: {
|
|
let size = MemoryLayout<WindowsFoundation.IID>.size
|
|
let iids = CoTaskMemAlloc(UInt64(size) * 4).assumingMemoryBound(to: WindowsFoundation.IID.self)
|
|
iids[0] = IUnknown.IID
|
|
iids[1] = IInspectable.IID
|
|
iids[2] = __ABI_Microsoft_UI_Xaml_Interop.IBindableVectorWrapper.IID
|
|
iids[3] = __ABI_Microsoft_UI_Xaml_Interop.IBindableIterableWrapper.IID
|
|
$1!.pointee = 4
|
|
$2!.pointee = iids
|
|
return S_OK
|
|
},
|
|
|
|
GetRuntimeClassName: {
|
|
_ = $0
|
|
let hstring = try! HString("Microsoft.UI.Xaml.Interop.IBindableVector").detach()
|
|
$1!.pointee = hstring
|
|
return S_OK
|
|
},
|
|
|
|
GetTrustLevel: {
|
|
_ = $0
|
|
$1!.pointee = TrustLevel(rawValue: 0)
|
|
return S_OK
|
|
},
|
|
|
|
GetAt: {
|
|
do {
|
|
guard let __unwrapped__instance = IBindableVectorWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG }
|
|
let index: UInt32 = $1
|
|
let result = try __unwrapped__instance.getAt(index)
|
|
let resultWrapper = __ABI_.AnyWrapper(result)
|
|
resultWrapper?.copyTo($2)
|
|
return S_OK
|
|
} catch { return failWith(err: E_FAIL) }
|
|
},
|
|
|
|
get_Size: {
|
|
guard let __unwrapped__instance = IBindableVectorWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG }
|
|
let value = __unwrapped__instance.size
|
|
$1?.initialize(to: value)
|
|
return S_OK
|
|
},
|
|
|
|
GetView: {
|
|
do {
|
|
guard let __unwrapped__instance = IBindableVectorWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG }
|
|
let result = try __unwrapped__instance.getView()
|
|
let resultWrapper = __ABI_Microsoft_UI_Xaml_Interop.IBindableVectorViewWrapper(result)
|
|
resultWrapper?.copyTo($1)
|
|
return S_OK
|
|
} catch { return failWith(err: E_FAIL) }
|
|
},
|
|
|
|
IndexOf: {
|
|
do {
|
|
guard let __unwrapped__instance = IBindableVectorWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG }
|
|
let value: Any? = __ABI_.AnyWrapper.unwrapFrom(abi: ComPtr($1))
|
|
var index: UInt32 = 0
|
|
let returnValue = try __unwrapped__instance.indexOf(value, &index)
|
|
$2?.initialize(to: index)
|
|
$3?.initialize(to: .init(from: returnValue))
|
|
return S_OK
|
|
} catch { return failWith(err: E_FAIL) }
|
|
},
|
|
|
|
SetAt: {
|
|
do {
|
|
guard let __unwrapped__instance = IBindableVectorWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG }
|
|
let index: UInt32 = $1
|
|
let value: Any? = __ABI_.AnyWrapper.unwrapFrom(abi: ComPtr($2))
|
|
try __unwrapped__instance.setAt(index, value)
|
|
return S_OK
|
|
} catch { return failWith(err: E_FAIL) }
|
|
},
|
|
|
|
InsertAt: {
|
|
do {
|
|
guard let __unwrapped__instance = IBindableVectorWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG }
|
|
let index: UInt32 = $1
|
|
let value: Any? = __ABI_.AnyWrapper.unwrapFrom(abi: ComPtr($2))
|
|
try __unwrapped__instance.insertAt(index, value)
|
|
return S_OK
|
|
} catch { return failWith(err: E_FAIL) }
|
|
},
|
|
|
|
RemoveAt: {
|
|
do {
|
|
guard let __unwrapped__instance = IBindableVectorWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG }
|
|
let index: UInt32 = $1
|
|
try __unwrapped__instance.removeAt(index)
|
|
return S_OK
|
|
} catch { return failWith(err: E_FAIL) }
|
|
},
|
|
|
|
Append: {
|
|
do {
|
|
guard let __unwrapped__instance = IBindableVectorWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG }
|
|
let value: Any? = __ABI_.AnyWrapper.unwrapFrom(abi: ComPtr($1))
|
|
try __unwrapped__instance.append(value)
|
|
return S_OK
|
|
} catch { return failWith(err: E_FAIL) }
|
|
},
|
|
|
|
RemoveAtEnd: {
|
|
do {
|
|
guard let __unwrapped__instance = IBindableVectorWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG }
|
|
try __unwrapped__instance.removeAtEnd()
|
|
return S_OK
|
|
} catch { return failWith(err: E_FAIL) }
|
|
},
|
|
|
|
Clear: {
|
|
do {
|
|
guard let __unwrapped__instance = IBindableVectorWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG }
|
|
try __unwrapped__instance.clear()
|
|
return S_OK
|
|
} catch { return failWith(err: E_FAIL) }
|
|
}
|
|
)
|
|
|
|
public typealias IBindableVectorWrapper = InterfaceWrapperBase<__IMPL_Microsoft_UI_Xaml_Interop.IBindableVectorBridge>
|
|
public class IBindableVectorView: WindowsFoundation.IInspectable {
|
|
override public class var IID: WindowsFoundation.IID { IID___x_ABI_CMicrosoft_CUI_CXaml_CInterop_CIBindableVectorView }
|
|
|
|
open func GetAtImpl(_ index: UInt32) throws -> Any? {
|
|
let (result) = try ComPtrs.initialize { resultAbi in
|
|
_ = try perform(as: __x_ABI_CMicrosoft_CUI_CXaml_CInterop_CIBindableVectorView.self) { pThis in
|
|
try CHECKED(pThis.pointee.lpVtbl.pointee.GetAt(pThis, index, &resultAbi))
|
|
}
|
|
}
|
|
return __ABI_.AnyWrapper.unwrapFrom(abi: result)
|
|
}
|
|
|
|
open func get_SizeImpl() throws -> UInt32 {
|
|
var value: UINT32 = 0
|
|
_ = try perform(as: __x_ABI_CMicrosoft_CUI_CXaml_CInterop_CIBindableVectorView.self) { pThis in
|
|
try CHECKED(pThis.pointee.lpVtbl.pointee.get_Size(pThis, &value))
|
|
}
|
|
return value
|
|
}
|
|
|
|
open func IndexOfImpl(_ value: Any?, _ index: inout UInt32) throws -> Bool {
|
|
var returnValue: boolean = 0
|
|
let valueWrapper = __ABI_.AnyWrapper(value)
|
|
let _value = try! valueWrapper?.toABI { $0 }
|
|
_ = try perform(as: __x_ABI_CMicrosoft_CUI_CXaml_CInterop_CIBindableVectorView.self) { pThis in
|
|
try CHECKED(pThis.pointee.lpVtbl.pointee.IndexOf(pThis, _value, &index, &returnValue))
|
|
}
|
|
return .init(from: returnValue)
|
|
}
|
|
|
|
}
|
|
|
|
internal static var IBindableVectorViewVTable: __x_ABI_CMicrosoft_CUI_CXaml_CInterop_CIBindableVectorViewVtbl = .init(
|
|
QueryInterface: { IBindableVectorViewWrapper.queryInterface($0, $1, $2) },
|
|
AddRef: { IBindableVectorViewWrapper.addRef($0) },
|
|
Release: { IBindableVectorViewWrapper.release($0) },
|
|
GetIids: {
|
|
let size = MemoryLayout<WindowsFoundation.IID>.size
|
|
let iids = CoTaskMemAlloc(UInt64(size) * 4).assumingMemoryBound(to: WindowsFoundation.IID.self)
|
|
iids[0] = IUnknown.IID
|
|
iids[1] = IInspectable.IID
|
|
iids[2] = __ABI_Microsoft_UI_Xaml_Interop.IBindableVectorViewWrapper.IID
|
|
iids[3] = __ABI_Microsoft_UI_Xaml_Interop.IBindableIterableWrapper.IID
|
|
$1!.pointee = 4
|
|
$2!.pointee = iids
|
|
return S_OK
|
|
},
|
|
|
|
GetRuntimeClassName: {
|
|
_ = $0
|
|
let hstring = try! HString("Microsoft.UI.Xaml.Interop.IBindableVectorView").detach()
|
|
$1!.pointee = hstring
|
|
return S_OK
|
|
},
|
|
|
|
GetTrustLevel: {
|
|
_ = $0
|
|
$1!.pointee = TrustLevel(rawValue: 0)
|
|
return S_OK
|
|
},
|
|
|
|
GetAt: {
|
|
do {
|
|
guard let __unwrapped__instance = IBindableVectorViewWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG }
|
|
let index: UInt32 = $1
|
|
let result = try __unwrapped__instance.getAt(index)
|
|
let resultWrapper = __ABI_.AnyWrapper(result)
|
|
resultWrapper?.copyTo($2)
|
|
return S_OK
|
|
} catch { return failWith(err: E_FAIL) }
|
|
},
|
|
|
|
get_Size: {
|
|
guard let __unwrapped__instance = IBindableVectorViewWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG }
|
|
let value = __unwrapped__instance.size
|
|
$1?.initialize(to: value)
|
|
return S_OK
|
|
},
|
|
|
|
IndexOf: {
|
|
do {
|
|
guard let __unwrapped__instance = IBindableVectorViewWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG }
|
|
let value: Any? = __ABI_.AnyWrapper.unwrapFrom(abi: ComPtr($1))
|
|
var index: UInt32 = 0
|
|
let returnValue = try __unwrapped__instance.indexOf(value, &index)
|
|
$2?.initialize(to: index)
|
|
$3?.initialize(to: .init(from: returnValue))
|
|
return S_OK
|
|
} catch { return failWith(err: E_FAIL) }
|
|
}
|
|
)
|
|
|
|
public typealias IBindableVectorViewWrapper = InterfaceWrapperBase<__IMPL_Microsoft_UI_Xaml_Interop.IBindableVectorViewBridge>
|
|
public class INotifyCollectionChanged: WindowsFoundation.IInspectable {
|
|
override public class var IID: WindowsFoundation.IID { IID___x_ABI_CMicrosoft_CUI_CXaml_CInterop_CINotifyCollectionChanged }
|
|
|
|
open func add_CollectionChangedImpl(_ handler: WinUI.NotifyCollectionChangedEventHandler?) throws -> EventRegistrationToken {
|
|
var token: EventRegistrationToken = .init()
|
|
let handlerWrapper = __ABI_Microsoft_UI_Xaml_Interop.NotifyCollectionChangedEventHandlerWrapper(handler)
|
|
let _handler = try! handlerWrapper?.toABI { $0 }
|
|
_ = try perform(as: __x_ABI_CMicrosoft_CUI_CXaml_CInterop_CINotifyCollectionChanged.self) { pThis in
|
|
try CHECKED(pThis.pointee.lpVtbl.pointee.add_CollectionChanged(pThis, _handler, &token))
|
|
}
|
|
return token
|
|
}
|
|
|
|
open func remove_CollectionChangedImpl(_ token: EventRegistrationToken) throws {
|
|
_ = try perform(as: __x_ABI_CMicrosoft_CUI_CXaml_CInterop_CINotifyCollectionChanged.self) { pThis in
|
|
try CHECKED(pThis.pointee.lpVtbl.pointee.remove_CollectionChanged(pThis, token))
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
internal static var INotifyCollectionChangedVTable: __x_ABI_CMicrosoft_CUI_CXaml_CInterop_CINotifyCollectionChangedVtbl = .init(
|
|
QueryInterface: { INotifyCollectionChangedWrapper.queryInterface($0, $1, $2) },
|
|
AddRef: { INotifyCollectionChangedWrapper.addRef($0) },
|
|
Release: { INotifyCollectionChangedWrapper.release($0) },
|
|
GetIids: {
|
|
let size = MemoryLayout<WindowsFoundation.IID>.size
|
|
let iids = CoTaskMemAlloc(UInt64(size) * 3).assumingMemoryBound(to: WindowsFoundation.IID.self)
|
|
iids[0] = IUnknown.IID
|
|
iids[1] = IInspectable.IID
|
|
iids[2] = __ABI_Microsoft_UI_Xaml_Interop.INotifyCollectionChangedWrapper.IID
|
|
$1!.pointee = 3
|
|
$2!.pointee = iids
|
|
return S_OK
|
|
},
|
|
|
|
GetRuntimeClassName: {
|
|
_ = $0
|
|
let hstring = try! HString("Microsoft.UI.Xaml.Interop.INotifyCollectionChanged").detach()
|
|
$1!.pointee = hstring
|
|
return S_OK
|
|
},
|
|
|
|
GetTrustLevel: {
|
|
_ = $0
|
|
$1!.pointee = TrustLevel(rawValue: 0)
|
|
return S_OK
|
|
},
|
|
|
|
add_CollectionChanged: {
|
|
guard let __unwrapped__instance = INotifyCollectionChangedWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG }
|
|
guard let handler = __ABI_Microsoft_UI_Xaml_Interop.NotifyCollectionChangedEventHandlerWrapper.unwrapFrom(abi: ComPtr($1)) else { return E_INVALIDARG }
|
|
let token = __unwrapped__instance.collectionChanged.addHandler(handler)
|
|
$2?.initialize(to: .from(swift: token))
|
|
return S_OK
|
|
},
|
|
|
|
remove_CollectionChanged: {
|
|
guard let __unwrapped__instance = INotifyCollectionChangedWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG }
|
|
let token: EventRegistrationToken = $1
|
|
__unwrapped__instance.collectionChanged.removeHandler(token)
|
|
return S_OK
|
|
}
|
|
)
|
|
|
|
public typealias INotifyCollectionChangedWrapper = InterfaceWrapperBase<__IMPL_Microsoft_UI_Xaml_Interop.INotifyCollectionChangedBridge>
|
|
public class INotifyCollectionChangedEventArgs: WindowsFoundation.IInspectable {
|
|
override public class var IID: WindowsFoundation.IID { IID___x_ABI_CMicrosoft_CUI_CXaml_CInterop_CINotifyCollectionChangedEventArgs }
|
|
|
|
internal func get_ActionImpl() throws -> WinUI.NotifyCollectionChangedAction {
|
|
var value: __x_ABI_CMicrosoft_CUI_CXaml_CInterop_CNotifyCollectionChangedAction = .init(0)
|
|
_ = try perform(as: __x_ABI_CMicrosoft_CUI_CXaml_CInterop_CINotifyCollectionChangedEventArgs.self) { pThis in
|
|
try CHECKED(pThis.pointee.lpVtbl.pointee.get_Action(pThis, &value))
|
|
}
|
|
return value
|
|
}
|
|
|
|
internal func get_NewItemsImpl() throws -> WinUI.AnyIBindableVector? {
|
|
let (value) = try ComPtrs.initialize { valueAbi in
|
|
_ = try perform(as: __x_ABI_CMicrosoft_CUI_CXaml_CInterop_CINotifyCollectionChangedEventArgs.self) { pThis in
|
|
try CHECKED(pThis.pointee.lpVtbl.pointee.get_NewItems(pThis, &valueAbi))
|
|
}
|
|
}
|
|
return __ABI_Microsoft_UI_Xaml_Interop.IBindableVectorWrapper.unwrapFrom(abi: value)
|
|
}
|
|
|
|
internal func get_OldItemsImpl() throws -> WinUI.AnyIBindableVector? {
|
|
let (value) = try ComPtrs.initialize { valueAbi in
|
|
_ = try perform(as: __x_ABI_CMicrosoft_CUI_CXaml_CInterop_CINotifyCollectionChangedEventArgs.self) { pThis in
|
|
try CHECKED(pThis.pointee.lpVtbl.pointee.get_OldItems(pThis, &valueAbi))
|
|
}
|
|
}
|
|
return __ABI_Microsoft_UI_Xaml_Interop.IBindableVectorWrapper.unwrapFrom(abi: value)
|
|
}
|
|
|
|
internal func get_NewStartingIndexImpl() throws -> Int32 {
|
|
var value: INT32 = 0
|
|
_ = try perform(as: __x_ABI_CMicrosoft_CUI_CXaml_CInterop_CINotifyCollectionChangedEventArgs.self) { pThis in
|
|
try CHECKED(pThis.pointee.lpVtbl.pointee.get_NewStartingIndex(pThis, &value))
|
|
}
|
|
return value
|
|
}
|
|
|
|
internal func get_OldStartingIndexImpl() throws -> Int32 {
|
|
var value: INT32 = 0
|
|
_ = try perform(as: __x_ABI_CMicrosoft_CUI_CXaml_CInterop_CINotifyCollectionChangedEventArgs.self) { pThis in
|
|
try CHECKED(pThis.pointee.lpVtbl.pointee.get_OldStartingIndex(pThis, &value))
|
|
}
|
|
return value
|
|
}
|
|
|
|
}
|
|
|
|
public class INotifyCollectionChangedEventArgsFactory: WindowsFoundation.IInspectable {
|
|
override public class var IID: WindowsFoundation.IID { IID___x_ABI_CMicrosoft_CUI_CXaml_CInterop_CINotifyCollectionChangedEventArgsFactory }
|
|
|
|
internal func CreateInstanceWithAllParametersImpl(_ action: WinUI.NotifyCollectionChangedAction, _ newItems: WinUI.AnyIBindableVector?, _ oldItems: WinUI.AnyIBindableVector?, _ newIndex: Int32, _ oldIndex: Int32, _ baseInterface: UnsealedWinRTClassWrapper<WinUI.NotifyCollectionChangedEventArgs.Composable>?, _ innerInterface: inout WindowsFoundation.IInspectable?) throws -> INotifyCollectionChangedEventArgs {
|
|
let (value) = try ComPtrs.initialize { valueAbi in
|
|
let newItemsWrapper = __ABI_Microsoft_UI_Xaml_Interop.IBindableVectorWrapper(newItems)
|
|
let _newItems = try! newItemsWrapper?.toABI { $0 }
|
|
let oldItemsWrapper = __ABI_Microsoft_UI_Xaml_Interop.IBindableVectorWrapper(oldItems)
|
|
let _oldItems = try! oldItemsWrapper?.toABI { $0 }
|
|
let _baseInterface = baseInterface?.toIInspectableABI { $0 }
|
|
let (_innerInterface) = try ComPtrs.initialize { _innerInterfaceAbi in
|
|
_ = try perform(as: __x_ABI_CMicrosoft_CUI_CXaml_CInterop_CINotifyCollectionChangedEventArgsFactory.self) { pThis in
|
|
try CHECKED(pThis.pointee.lpVtbl.pointee.CreateInstanceWithAllParameters(pThis, action, _newItems, _oldItems, newIndex, oldIndex, _baseInterface, &_innerInterfaceAbi, &valueAbi))
|
|
}
|
|
}
|
|
innerInterface = WindowsFoundation.IInspectable(_innerInterface!)
|
|
}
|
|
return INotifyCollectionChangedEventArgs(value!)
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
// MARK - NotifyCollectionChangedEventHandler
|
|
extension __ABI_Microsoft_UI_Xaml_Interop {
|
|
public class NotifyCollectionChangedEventHandler: WindowsFoundation.IUnknown {
|
|
override public class var IID: WindowsFoundation.IID { IID___x_ABI_CMicrosoft_CUI_CXaml_CInterop_CINotifyCollectionChangedEventHandler }
|
|
|
|
open func InvokeImpl(_ sender: Any?, _ e: WinUI.NotifyCollectionChangedEventArgs?) throws {
|
|
let senderWrapper = __ABI_.AnyWrapper(sender)
|
|
let _sender = try! senderWrapper?.toABI { $0 }
|
|
_ = try perform(as: __x_ABI_CMicrosoft_CUI_CXaml_CInterop_CINotifyCollectionChangedEventHandler.self) { pThis in
|
|
try CHECKED(pThis.pointee.lpVtbl.pointee.Invoke(pThis, _sender, RawPointer(e)))
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
|
|
typealias NotifyCollectionChangedEventHandlerWrapper = InterfaceWrapperBase<__IMPL_Microsoft_UI_Xaml_Interop.NotifyCollectionChangedEventHandlerBridge>
|
|
internal static var NotifyCollectionChangedEventHandlerVTable: __x_ABI_CMicrosoft_CUI_CXaml_CInterop_CINotifyCollectionChangedEventHandlerVtbl = .init(
|
|
QueryInterface: { NotifyCollectionChangedEventHandlerWrapper.queryInterface($0, $1, $2) },
|
|
AddRef: { NotifyCollectionChangedEventHandlerWrapper.addRef($0) },
|
|
Release: { NotifyCollectionChangedEventHandlerWrapper.release($0) },
|
|
Invoke: {
|
|
guard let __unwrapped__instance = NotifyCollectionChangedEventHandlerWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG }
|
|
let sender: Any? = __ABI_.AnyWrapper.unwrapFrom(abi: ComPtr($1))
|
|
let e: WinUI.NotifyCollectionChangedEventArgs? = .from(abi: ComPtr($2))
|
|
__unwrapped__instance(sender, e)
|
|
return S_OK
|
|
}
|
|
)
|
|
}
|
|
public extension WinRTDelegateBridge where CABI == __x_ABI_CMicrosoft_CUI_CXaml_CInterop_CINotifyCollectionChangedEventHandler {
|
|
static func makeAbi() -> CABI {
|
|
let vtblPtr = withUnsafeMutablePointer(to: &__ABI_Microsoft_UI_Xaml_Interop.NotifyCollectionChangedEventHandlerVTable) { $0 }
|
|
return .init(lpVtbl:vtblPtr)
|
|
}
|
|
}
|
|
|