swift-uwp/Sources/UWP/Generated/Windows.Graphics.DirectX.Direct3D11+ABI.swift
2024-02-15 17:14:48 -08:00

128 lines
5.8 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_CWindows_CGraphics_CDirectX_CDirect3D11_CIDirect3DDevice: WindowsFoundation.IID {
.init(Data1: 0xA37624AB, Data2: 0x8D5F, Data3: 0x4650, Data4: ( 0x9D,0x3E,0x9E,0xAE,0x3D,0x9B,0xC6,0x70 ))// A37624AB-8D5F-4650-9D3E-9EAE3D9BC670
}
private var IID___x_ABI_CWindows_CGraphics_CDirectX_CDirect3D11_CIDirect3DSurface: WindowsFoundation.IID {
.init(Data1: 0x0BF4A146, Data2: 0x13C1, Data3: 0x4694, Data4: ( 0xBE,0xE3,0x7A,0xBF,0x15,0xEA,0xF5,0x86 ))// 0BF4A146-13C1-4694-BEE3-7ABF15EAF586
}
public enum __ABI_Windows_Graphics_DirectX_Direct3D11 {
public class IDirect3DDevice: WindowsFoundation.IInspectable {
override public class var IID: WindowsFoundation.IID { IID___x_ABI_CWindows_CGraphics_CDirectX_CDirect3D11_CIDirect3DDevice }
open func TrimImpl() throws {
_ = try perform(as: __x_ABI_CWindows_CGraphics_CDirectX_CDirect3D11_CIDirect3DDevice.self) { pThis in
try CHECKED(pThis.pointee.lpVtbl.pointee.Trim(pThis))
}
}
}
internal static var IDirect3DDeviceVTable: __x_ABI_CWindows_CGraphics_CDirectX_CDirect3D11_CIDirect3DDeviceVtbl = .init(
QueryInterface: { IDirect3DDeviceWrapper.queryInterface($0, $1, $2) },
AddRef: { IDirect3DDeviceWrapper.addRef($0) },
Release: { IDirect3DDeviceWrapper.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_Windows_Graphics_DirectX_Direct3D11.IDirect3DDeviceWrapper.IID
iids[3] = __ABI_Windows_Foundation.IClosableWrapper.IID
$1!.pointee = 4
$2!.pointee = iids
return S_OK
},
GetRuntimeClassName: {
_ = $0
let hstring = try! HString("Windows.Graphics.DirectX.Direct3D11.IDirect3DDevice").detach()
$1!.pointee = hstring
return S_OK
},
GetTrustLevel: {
_ = $0
$1!.pointee = TrustLevel(rawValue: 0)
return S_OK
},
Trim: {
do {
guard let __unwrapped__instance = IDirect3DDeviceWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG }
try __unwrapped__instance.trim()
return S_OK
} catch { return failWith(err: E_FAIL) }
}
)
public typealias IDirect3DDeviceWrapper = InterfaceWrapperBase<__IMPL_Windows_Graphics_DirectX_Direct3D11.IDirect3DDeviceBridge>
public class IDirect3DSurface: WindowsFoundation.IInspectable {
override public class var IID: WindowsFoundation.IID { IID___x_ABI_CWindows_CGraphics_CDirectX_CDirect3D11_CIDirect3DSurface }
open func get_DescriptionImpl() throws -> UWP.Direct3DSurfaceDescription {
var value: __x_ABI_CWindows_CGraphics_CDirectX_CDirect3D11_CDirect3DSurfaceDescription = .init()
_ = try perform(as: __x_ABI_CWindows_CGraphics_CDirectX_CDirect3D11_CIDirect3DSurface.self) { pThis in
try CHECKED(pThis.pointee.lpVtbl.pointee.get_Description(pThis, &value))
}
return .from(abi: value)
}
}
internal static var IDirect3DSurfaceVTable: __x_ABI_CWindows_CGraphics_CDirectX_CDirect3D11_CIDirect3DSurfaceVtbl = .init(
QueryInterface: { IDirect3DSurfaceWrapper.queryInterface($0, $1, $2) },
AddRef: { IDirect3DSurfaceWrapper.addRef($0) },
Release: { IDirect3DSurfaceWrapper.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_Windows_Graphics_DirectX_Direct3D11.IDirect3DSurfaceWrapper.IID
iids[3] = __ABI_Windows_Foundation.IClosableWrapper.IID
$1!.pointee = 4
$2!.pointee = iids
return S_OK
},
GetRuntimeClassName: {
_ = $0
let hstring = try! HString("Windows.Graphics.DirectX.Direct3D11.IDirect3DSurface").detach()
$1!.pointee = hstring
return S_OK
},
GetTrustLevel: {
_ = $0
$1!.pointee = TrustLevel(rawValue: 0)
return S_OK
},
get_Description: {
guard let __unwrapped__instance = IDirect3DSurfaceWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG }
let value = __unwrapped__instance.description
$1?.initialize(to: .from(swift: value))
return S_OK
}
)
public typealias IDirect3DSurfaceWrapper = InterfaceWrapperBase<__IMPL_Windows_Graphics_DirectX_Direct3D11.IDirect3DSurfaceBridge>
}
extension __x_ABI_CWindows_CGraphics_CDirectX_CDirect3D11_CDirect3DMultisampleDescription {
public static func from(swift: UWP.Direct3DMultisampleDescription) -> __x_ABI_CWindows_CGraphics_CDirectX_CDirect3D11_CDirect3DMultisampleDescription {
.init(Count: swift.count, Quality: swift.quality)
}
}
extension __x_ABI_CWindows_CGraphics_CDirectX_CDirect3D11_CDirect3DSurfaceDescription {
public static func from(swift: UWP.Direct3DSurfaceDescription) -> __x_ABI_CWindows_CGraphics_CDirectX_CDirect3D11_CDirect3DSurfaceDescription {
.init(Width: swift.width, Height: swift.height, Format: swift.format, MultisampleDescription: .from(swift: swift.multisampleDescription))
}
}