swift-windowsappsdk/Sources/WinAppSDK/Microsoft.UI.Input+Impl.swift
2024-02-13 23:50:08 -08:00

49 lines
2.4 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
public enum __IMPL_Microsoft_UI_Input {
public enum IPointerPointTransformBridge : AbiInterfaceBridge {
public typealias CABI = __x_ABI_CMicrosoft_CUI_CInput_CIPointerPointTransform
public typealias SwiftABI = __ABI_Microsoft_UI_Input.IPointerPointTransform
public typealias SwiftProjection = AnyIPointerPointTransform
public static func from(abi: ComPtr<CABI>?) -> SwiftProjection? {
guard let abi = abi else { return nil }
return IPointerPointTransformImpl(abi)
}
public static func makeAbi() -> CABI {
let vtblPtr = withUnsafeMutablePointer(to: &__ABI_Microsoft_UI_Input.IPointerPointTransformVTable) { $0 }
return .init(lpVtbl: vtblPtr)
}
}
fileprivate class IPointerPointTransformImpl: IPointerPointTransform, WinRTAbiImpl {
fileprivate typealias Bridge = IPointerPointTransformBridge
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/windows/windows-app-sdk/api/winrt/microsoft.ui.input.ipointerpointtransform.trytransform)
fileprivate func tryTransform(_ inPoint: WindowsFoundation.Point, _ outPoint: inout WindowsFoundation.Point) throws -> Bool {
try _default.TryTransformImpl(inPoint, &outPoint)
}
/// [Open Microsoft documentation](https://learn.microsoft.com/windows/windows-app-sdk/api/winrt/microsoft.ui.input.ipointerpointtransform.trytransformbounds)
fileprivate func tryTransformBounds(_ inRect: WindowsFoundation.Rect, _ outRect: inout WindowsFoundation.Rect) throws -> Bool {
try _default.TryTransformBoundsImpl(inRect, &outRect)
}
/// [Open Microsoft documentation](https://learn.microsoft.com/windows/windows-app-sdk/api/winrt/microsoft.ui.input.ipointerpointtransform.inverse)
fileprivate var inverse : AnyIPointerPointTransform! {
get { try! _default.get_InverseImpl() }
}
}
}