#![allow(
non_snake_case,
clippy::too_many_arguments,
clippy::missing_safety_doc,
dead_code
)]
use core::ffi::c_void;
pub unsafe trait SwapChainMethods: Sized {
fn inner(&self) -> *mut c_void;
unsafe fn QueryInterface(
&self,
iid: *const windows::core::GUID,
out: *mut *mut c_void,
) -> windows::core::HRESULT;
unsafe fn AddRef(&self) -> u32;
unsafe fn Release(&self) -> u32;
unsafe fn SetPrivateData(
&self,
a0: *const windows::core::GUID,
a1: u32,
a2: *const core::ffi::c_void,
) -> windows::core::HRESULT {
unsafe { real::SetPrivateData(self.inner(), a0, a1, a2) }
}
unsafe fn SetPrivateDataInterface(
&self,
a0: *const windows::core::GUID,
a1: *mut core::ffi::c_void,
) -> windows::core::HRESULT {
unsafe { real::SetPrivateDataInterface(self.inner(), a0, a1) }
}
unsafe fn GetPrivateData(
&self,
a0: *const windows::core::GUID,
a1: *mut u32,
a2: *mut core::ffi::c_void,
) -> windows::core::HRESULT {
unsafe { real::GetPrivateData(self.inner(), a0, a1, a2) }
}
unsafe fn GetParent(
&self,
a0: *const windows::core::GUID,
a1: *mut *mut core::ffi::c_void,
) -> windows::core::HRESULT {
unsafe { real::GetParent(self.inner(), a0, a1) }
}
unsafe fn GetDevice(
&self,
a0: *const windows::core::GUID,
a1: *mut *mut core::ffi::c_void,
) -> windows::core::HRESULT {
unsafe { real::GetDevice(self.inner(), a0, a1) }
}
unsafe fn Present(
&self,
a0: u32,
a1: windows::Win32::Graphics::Dxgi::DXGI_PRESENT,
) -> windows::core::HRESULT {
unsafe { real::Present(self.inner(), a0, a1) }
}
unsafe fn GetBuffer(
&self,
a0: u32,
a1: *const windows::core::GUID,
a2: *mut *mut core::ffi::c_void,
) -> windows::core::HRESULT {
unsafe { real::GetBuffer(self.inner(), a0, a1, a2) }
}
unsafe fn SetFullscreenState(
&self,
a0: windows::core::BOOL,
a1: *mut core::ffi::c_void,
) -> windows::core::HRESULT {
unsafe { real::SetFullscreenState(self.inner(), a0, a1) }
}
unsafe fn GetFullscreenState(
&self,
a0: *mut windows::core::BOOL,
a1: *mut *mut core::ffi::c_void,
) -> windows::core::HRESULT {
unsafe { real::GetFullscreenState(self.inner(), a0, a1) }
}
unsafe fn GetDesc(
&self,
a0: *mut windows::Win32::Graphics::Dxgi::DXGI_SWAP_CHAIN_DESC,
) -> windows::core::HRESULT {
unsafe { real::GetDesc(self.inner(), a0) }
}
unsafe fn ResizeBuffers(
&self,
a0: u32,
a1: u32,
a2: u32,
a3: windows::Win32::Graphics::Dxgi::Common::DXGI_FORMAT,
a4: u32,
) -> windows::core::HRESULT {
unsafe { real::ResizeBuffers(self.inner(), a0, a1, a2, a3, a4) }
}
unsafe fn ResizeTarget(
&self,
a0: *const windows::Win32::Graphics::Dxgi::Common::DXGI_MODE_DESC,
) -> windows::core::HRESULT {
unsafe { real::ResizeTarget(self.inner(), a0) }
}
unsafe fn GetContainingOutput(&self, a0: *mut *mut core::ffi::c_void) -> windows::core::HRESULT {
unsafe { real::GetContainingOutput(self.inner(), a0) }
}
unsafe fn GetFrameStatistics(
&self,
a0: *mut windows::Win32::Graphics::Dxgi::DXGI_FRAME_STATISTICS,
) -> windows::core::HRESULT {
unsafe { real::GetFrameStatistics(self.inner(), a0) }
}
unsafe fn GetLastPresentCount(&self, a0: *mut u32) -> windows::core::HRESULT {
unsafe { real::GetLastPresentCount(self.inner(), a0) }
}
unsafe fn GetDesc1(
&self,
a0: *mut windows::Win32::Graphics::Dxgi::DXGI_SWAP_CHAIN_DESC1,
) -> windows::core::HRESULT {
unsafe { real::GetDesc1(self.inner(), a0) }
}
unsafe fn GetFullscreenDesc(
&self,
a0: *mut windows::Win32::Graphics::Dxgi::DXGI_SWAP_CHAIN_FULLSCREEN_DESC,
) -> windows::core::HRESULT {
unsafe { real::GetFullscreenDesc(self.inner(), a0) }
}
unsafe fn GetHwnd(&self, a0: *mut windows::Win32::Foundation::HWND) -> windows::core::HRESULT {
unsafe { real::GetHwnd(self.inner(), a0) }
}
unsafe fn GetCoreWindow(
&self,
a0: *const windows::core::GUID,
a1: *mut *mut core::ffi::c_void,
) -> windows::core::HRESULT {
unsafe { real::GetCoreWindow(self.inner(), a0, a1) }
}
unsafe fn Present1(
&self,
a0: u32,
a1: windows::Win32::Graphics::Dxgi::DXGI_PRESENT,
a2: *const windows::Win32::Graphics::Dxgi::DXGI_PRESENT_PARAMETERS,
) -> windows::core::HRESULT {
unsafe { real::Present1(self.inner(), a0, a1, a2) }
}
unsafe fn IsTemporaryMonoSupported(&self) -> windows::core::BOOL {
unsafe { real::IsTemporaryMonoSupported(self.inner()) }
}
unsafe fn GetRestrictToOutput(&self, a0: *mut *mut core::ffi::c_void) -> windows::core::HRESULT {
unsafe { real::GetRestrictToOutput(self.inner(), a0) }
}
unsafe fn SetBackgroundColor(
&self,
a0: *const windows::Win32::Graphics::Dxgi::DXGI_RGBA,
) -> windows::core::HRESULT {
unsafe { real::SetBackgroundColor(self.inner(), a0) }
}
unsafe fn GetBackgroundColor(
&self,
a0: *mut windows::Win32::Graphics::Dxgi::DXGI_RGBA,
) -> windows::core::HRESULT {
unsafe { real::GetBackgroundColor(self.inner(), a0) }
}
unsafe fn SetRotation(
&self,
a0: windows::Win32::Graphics::Dxgi::Common::DXGI_MODE_ROTATION,
) -> windows::core::HRESULT {
unsafe { real::SetRotation(self.inner(), a0) }
}
unsafe fn GetRotation(
&self,
a0: *mut windows::Win32::Graphics::Dxgi::Common::DXGI_MODE_ROTATION,
) -> windows::core::HRESULT {
unsafe { real::GetRotation(self.inner(), a0) }
}
unsafe fn SetSourceSize(&self, a0: u32, a1: u32) -> windows::core::HRESULT {
unsafe { real::SetSourceSize(self.inner(), a0, a1) }
}
unsafe fn GetSourceSize(&self, a0: *mut u32, a1: *mut u32) -> windows::core::HRESULT {
unsafe { real::GetSourceSize(self.inner(), a0, a1) }
}
unsafe fn SetMaximumFrameLatency(&self, a0: u32) -> windows::core::HRESULT {
unsafe { real::SetMaximumFrameLatency(self.inner(), a0) }
}
unsafe fn GetMaximumFrameLatency(&self, a0: *mut u32) -> windows::core::HRESULT {
unsafe { real::GetMaximumFrameLatency(self.inner(), a0) }
}
unsafe fn GetFrameLatencyWaitableObject(&self) -> windows::Win32::Foundation::HANDLE {
unsafe { real::GetFrameLatencyWaitableObject(self.inner()) }
}
unsafe fn SetMatrixTransform(
&self,
a0: *const windows::Win32::Graphics::Dxgi::DXGI_MATRIX_3X2_F,
) -> windows::core::HRESULT {
unsafe { real::SetMatrixTransform(self.inner(), a0) }
}
unsafe fn GetMatrixTransform(
&self,
a0: *mut windows::Win32::Graphics::Dxgi::DXGI_MATRIX_3X2_F,
) -> windows::core::HRESULT {
unsafe { real::GetMatrixTransform(self.inner(), a0) }
}
unsafe fn GetCurrentBackBufferIndex(&self) -> u32 {
unsafe { real::GetCurrentBackBufferIndex(self.inner()) }
}
unsafe fn CheckColorSpaceSupport(
&self,
a0: windows::Win32::Graphics::Dxgi::Common::DXGI_COLOR_SPACE_TYPE,
a1: *mut u32,
) -> windows::core::HRESULT {
unsafe { real::CheckColorSpaceSupport(self.inner(), a0, a1) }
}
unsafe fn SetColorSpace1(
&self,
a0: windows::Win32::Graphics::Dxgi::Common::DXGI_COLOR_SPACE_TYPE,
) -> windows::core::HRESULT {
unsafe { real::SetColorSpace1(self.inner(), a0) }
}
unsafe fn ResizeBuffers1(
&self,
a0: u32,
a1: u32,
a2: u32,
a3: windows::Win32::Graphics::Dxgi::Common::DXGI_FORMAT,
a4: u32,
a5: *const u32,
a6: *const *mut core::ffi::c_void,
) -> windows::core::HRESULT {
unsafe { real::ResizeBuffers1(self.inner(), a0, a1, a2, a3, a4, a5, a6) }
}
unsafe fn SetHDRMetaData(
&self,
a0: windows::Win32::Graphics::Dxgi::DXGI_HDR_METADATA_TYPE,
a1: u32,
a2: *const core::ffi::c_void,
) -> windows::core::HRESULT {
unsafe { real::SetHDRMetaData(self.inner(), a0, a1, a2) }
}
}
pub mod real {
use core::ffi::c_void;
pub unsafe fn SetPrivateData(
inner: *mut c_void,
a0: *const windows::core::GUID,
a1: u32,
a2: *const core::ffi::c_void,
) -> windows::core::HRESULT {
unsafe {
((*(*(inner as *const *const windows::Win32::Graphics::Dxgi::IDXGISwapChain4_Vtbl)))
.base__
.base__
.base__
.base__
.base__
.base__
.SetPrivateData)(inner, a0, a1, a2)
}
}
pub unsafe fn SetPrivateDataInterface(
inner: *mut c_void,
a0: *const windows::core::GUID,
a1: *mut core::ffi::c_void,
) -> windows::core::HRESULT {
unsafe {
((*(*(inner as *const *const windows::Win32::Graphics::Dxgi::IDXGISwapChain4_Vtbl)))
.base__
.base__
.base__
.base__
.base__
.base__
.SetPrivateDataInterface)(inner, a0, a1)
}
}
pub unsafe fn GetPrivateData(
inner: *mut c_void,
a0: *const windows::core::GUID,
a1: *mut u32,
a2: *mut core::ffi::c_void,
) -> windows::core::HRESULT {
unsafe {
((*(*(inner as *const *const windows::Win32::Graphics::Dxgi::IDXGISwapChain4_Vtbl)))
.base__
.base__
.base__
.base__
.base__
.base__
.GetPrivateData)(inner, a0, a1, a2)
}
}
pub unsafe fn GetParent(
inner: *mut c_void,
a0: *const windows::core::GUID,
a1: *mut *mut core::ffi::c_void,
) -> windows::core::HRESULT {
unsafe {
((*(*(inner as *const *const windows::Win32::Graphics::Dxgi::IDXGISwapChain4_Vtbl)))
.base__
.base__
.base__
.base__
.base__
.base__
.GetParent)(inner, a0, a1)
}
}
pub unsafe fn GetDevice(
inner: *mut c_void,
a0: *const windows::core::GUID,
a1: *mut *mut core::ffi::c_void,
) -> windows::core::HRESULT {
unsafe {
((*(*(inner as *const *const windows::Win32::Graphics::Dxgi::IDXGISwapChain4_Vtbl)))
.base__
.base__
.base__
.base__
.base__
.GetDevice)(inner, a0, a1)
}
}
pub unsafe fn Present(
inner: *mut c_void,
a0: u32,
a1: windows::Win32::Graphics::Dxgi::DXGI_PRESENT,
) -> windows::core::HRESULT {
unsafe {
((*(*(inner as *const *const windows::Win32::Graphics::Dxgi::IDXGISwapChain4_Vtbl)))
.base__
.base__
.base__
.base__
.Present)(inner, a0, a1)
}
}
pub unsafe fn GetBuffer(
inner: *mut c_void,
a0: u32,
a1: *const windows::core::GUID,
a2: *mut *mut core::ffi::c_void,
) -> windows::core::HRESULT {
unsafe {
((*(*(inner as *const *const windows::Win32::Graphics::Dxgi::IDXGISwapChain4_Vtbl)))
.base__
.base__
.base__
.base__
.GetBuffer)(inner, a0, a1, a2)
}
}
pub unsafe fn SetFullscreenState(
inner: *mut c_void,
a0: windows::core::BOOL,
a1: *mut core::ffi::c_void,
) -> windows::core::HRESULT {
unsafe {
((*(*(inner as *const *const windows::Win32::Graphics::Dxgi::IDXGISwapChain4_Vtbl)))
.base__
.base__
.base__
.base__
.SetFullscreenState)(inner, a0, a1)
}
}
pub unsafe fn GetFullscreenState(
inner: *mut c_void,
a0: *mut windows::core::BOOL,
a1: *mut *mut core::ffi::c_void,
) -> windows::core::HRESULT {
unsafe {
((*(*(inner as *const *const windows::Win32::Graphics::Dxgi::IDXGISwapChain4_Vtbl)))
.base__
.base__
.base__
.base__
.GetFullscreenState)(inner, a0, a1)
}
}
pub unsafe fn GetDesc(
inner: *mut c_void,
a0: *mut windows::Win32::Graphics::Dxgi::DXGI_SWAP_CHAIN_DESC,
) -> windows::core::HRESULT {
unsafe {
((*(*(inner as *const *const windows::Win32::Graphics::Dxgi::IDXGISwapChain4_Vtbl)))
.base__
.base__
.base__
.base__
.GetDesc)(inner, a0)
}
}
pub unsafe fn ResizeBuffers(
inner: *mut c_void,
a0: u32,
a1: u32,
a2: u32,
a3: windows::Win32::Graphics::Dxgi::Common::DXGI_FORMAT,
a4: u32,
) -> windows::core::HRESULT {
unsafe {
((*(*(inner as *const *const windows::Win32::Graphics::Dxgi::IDXGISwapChain4_Vtbl)))
.base__
.base__
.base__
.base__
.ResizeBuffers)(inner, a0, a1, a2, a3, a4)
}
}
pub unsafe fn ResizeTarget(
inner: *mut c_void,
a0: *const windows::Win32::Graphics::Dxgi::Common::DXGI_MODE_DESC,
) -> windows::core::HRESULT {
unsafe {
((*(*(inner as *const *const windows::Win32::Graphics::Dxgi::IDXGISwapChain4_Vtbl)))
.base__
.base__
.base__
.base__
.ResizeTarget)(inner, a0)
}
}
pub unsafe fn GetContainingOutput(
inner: *mut c_void,
a0: *mut *mut core::ffi::c_void,
) -> windows::core::HRESULT {
unsafe {
((*(*(inner as *const *const windows::Win32::Graphics::Dxgi::IDXGISwapChain4_Vtbl)))
.base__
.base__
.base__
.base__
.GetContainingOutput)(inner, a0)
}
}
pub unsafe fn GetFrameStatistics(
inner: *mut c_void,
a0: *mut windows::Win32::Graphics::Dxgi::DXGI_FRAME_STATISTICS,
) -> windows::core::HRESULT {
unsafe {
((*(*(inner as *const *const windows::Win32::Graphics::Dxgi::IDXGISwapChain4_Vtbl)))
.base__
.base__
.base__
.base__
.GetFrameStatistics)(inner, a0)
}
}
pub unsafe fn GetLastPresentCount(inner: *mut c_void, a0: *mut u32) -> windows::core::HRESULT {
unsafe {
((*(*(inner as *const *const windows::Win32::Graphics::Dxgi::IDXGISwapChain4_Vtbl)))
.base__
.base__
.base__
.base__
.GetLastPresentCount)(inner, a0)
}
}
pub unsafe fn GetDesc1(
inner: *mut c_void,
a0: *mut windows::Win32::Graphics::Dxgi::DXGI_SWAP_CHAIN_DESC1,
) -> windows::core::HRESULT {
unsafe {
((*(*(inner as *const *const windows::Win32::Graphics::Dxgi::IDXGISwapChain4_Vtbl)))
.base__
.base__
.base__
.GetDesc1)(inner, a0)
}
}
pub unsafe fn GetFullscreenDesc(
inner: *mut c_void,
a0: *mut windows::Win32::Graphics::Dxgi::DXGI_SWAP_CHAIN_FULLSCREEN_DESC,
) -> windows::core::HRESULT {
unsafe {
((*(*(inner as *const *const windows::Win32::Graphics::Dxgi::IDXGISwapChain4_Vtbl)))
.base__
.base__
.base__
.GetFullscreenDesc)(inner, a0)
}
}
pub unsafe fn GetHwnd(
inner: *mut c_void,
a0: *mut windows::Win32::Foundation::HWND,
) -> windows::core::HRESULT {
unsafe {
((*(*(inner as *const *const windows::Win32::Graphics::Dxgi::IDXGISwapChain4_Vtbl)))
.base__
.base__
.base__
.GetHwnd)(inner, a0)
}
}
pub unsafe fn GetCoreWindow(
inner: *mut c_void,
a0: *const windows::core::GUID,
a1: *mut *mut core::ffi::c_void,
) -> windows::core::HRESULT {
unsafe {
((*(*(inner as *const *const windows::Win32::Graphics::Dxgi::IDXGISwapChain4_Vtbl)))
.base__
.base__
.base__
.GetCoreWindow)(inner, a0, a1)
}
}
pub unsafe fn Present1(
inner: *mut c_void,
a0: u32,
a1: windows::Win32::Graphics::Dxgi::DXGI_PRESENT,
a2: *const windows::Win32::Graphics::Dxgi::DXGI_PRESENT_PARAMETERS,
) -> windows::core::HRESULT {
unsafe {
((*(*(inner as *const *const windows::Win32::Graphics::Dxgi::IDXGISwapChain4_Vtbl)))
.base__
.base__
.base__
.Present1)(inner, a0, a1, a2)
}
}
pub unsafe fn IsTemporaryMonoSupported(inner: *mut c_void) -> windows::core::BOOL {
unsafe {
((*(*(inner as *const *const windows::Win32::Graphics::Dxgi::IDXGISwapChain4_Vtbl)))
.base__
.base__
.base__
.IsTemporaryMonoSupported)(inner)
}
}
pub unsafe fn GetRestrictToOutput(
inner: *mut c_void,
a0: *mut *mut core::ffi::c_void,
) -> windows::core::HRESULT {
unsafe {
((*(*(inner as *const *const windows::Win32::Graphics::Dxgi::IDXGISwapChain4_Vtbl)))
.base__
.base__
.base__
.GetRestrictToOutput)(inner, a0)
}
}
pub unsafe fn SetBackgroundColor(
inner: *mut c_void,
a0: *const windows::Win32::Graphics::Dxgi::DXGI_RGBA,
) -> windows::core::HRESULT {
unsafe {
((*(*(inner as *const *const windows::Win32::Graphics::Dxgi::IDXGISwapChain4_Vtbl)))
.base__
.base__
.base__
.SetBackgroundColor)(inner, a0)
}
}
pub unsafe fn GetBackgroundColor(
inner: *mut c_void,
a0: *mut windows::Win32::Graphics::Dxgi::DXGI_RGBA,
) -> windows::core::HRESULT {
unsafe {
((*(*(inner as *const *const windows::Win32::Graphics::Dxgi::IDXGISwapChain4_Vtbl)))
.base__
.base__
.base__
.GetBackgroundColor)(inner, a0)
}
}
pub unsafe fn SetRotation(
inner: *mut c_void,
a0: windows::Win32::Graphics::Dxgi::Common::DXGI_MODE_ROTATION,
) -> windows::core::HRESULT {
unsafe {
((*(*(inner as *const *const windows::Win32::Graphics::Dxgi::IDXGISwapChain4_Vtbl)))
.base__
.base__
.base__
.SetRotation)(inner, a0)
}
}
pub unsafe fn GetRotation(
inner: *mut c_void,
a0: *mut windows::Win32::Graphics::Dxgi::Common::DXGI_MODE_ROTATION,
) -> windows::core::HRESULT {
unsafe {
((*(*(inner as *const *const windows::Win32::Graphics::Dxgi::IDXGISwapChain4_Vtbl)))
.base__
.base__
.base__
.GetRotation)(inner, a0)
}
}
pub unsafe fn SetSourceSize(inner: *mut c_void, a0: u32, a1: u32) -> windows::core::HRESULT {
unsafe {
((*(*(inner as *const *const windows::Win32::Graphics::Dxgi::IDXGISwapChain4_Vtbl)))
.base__
.base__
.SetSourceSize)(inner, a0, a1)
}
}
pub unsafe fn GetSourceSize(inner: *mut c_void, a0: *mut u32, a1: *mut u32) -> windows::core::HRESULT {
unsafe {
((*(*(inner as *const *const windows::Win32::Graphics::Dxgi::IDXGISwapChain4_Vtbl)))
.base__
.base__
.GetSourceSize)(inner, a0, a1)
}
}
pub unsafe fn SetMaximumFrameLatency(inner: *mut c_void, a0: u32) -> windows::core::HRESULT {
unsafe {
((*(*(inner as *const *const windows::Win32::Graphics::Dxgi::IDXGISwapChain4_Vtbl)))
.base__
.base__
.SetMaximumFrameLatency)(inner, a0)
}
}
pub unsafe fn GetMaximumFrameLatency(inner: *mut c_void, a0: *mut u32) -> windows::core::HRESULT {
unsafe {
((*(*(inner as *const *const windows::Win32::Graphics::Dxgi::IDXGISwapChain4_Vtbl)))
.base__
.base__
.GetMaximumFrameLatency)(inner, a0)
}
}
pub unsafe fn GetFrameLatencyWaitableObject(inner: *mut c_void) -> windows::Win32::Foundation::HANDLE {
unsafe {
((*(*(inner as *const *const windows::Win32::Graphics::Dxgi::IDXGISwapChain4_Vtbl)))
.base__
.base__
.GetFrameLatencyWaitableObject)(inner)
}
}
pub unsafe fn SetMatrixTransform(
inner: *mut c_void,
a0: *const windows::Win32::Graphics::Dxgi::DXGI_MATRIX_3X2_F,
) -> windows::core::HRESULT {
unsafe {
((*(*(inner as *const *const windows::Win32::Graphics::Dxgi::IDXGISwapChain4_Vtbl)))
.base__
.base__
.SetMatrixTransform)(inner, a0)
}
}
pub unsafe fn GetMatrixTransform(
inner: *mut c_void,
a0: *mut windows::Win32::Graphics::Dxgi::DXGI_MATRIX_3X2_F,
) -> windows::core::HRESULT {
unsafe {
((*(*(inner as *const *const windows::Win32::Graphics::Dxgi::IDXGISwapChain4_Vtbl)))
.base__
.base__
.GetMatrixTransform)(inner, a0)
}
}
pub unsafe fn GetCurrentBackBufferIndex(inner: *mut c_void) -> u32 {
unsafe {
((*(*(inner as *const *const windows::Win32::Graphics::Dxgi::IDXGISwapChain4_Vtbl)))
.base__
.GetCurrentBackBufferIndex)(inner)
}
}
pub unsafe fn CheckColorSpaceSupport(
inner: *mut c_void,
a0: windows::Win32::Graphics::Dxgi::Common::DXGI_COLOR_SPACE_TYPE,
a1: *mut u32,
) -> windows::core::HRESULT {
unsafe {
((*(*(inner as *const *const windows::Win32::Graphics::Dxgi::IDXGISwapChain4_Vtbl)))
.base__
.CheckColorSpaceSupport)(inner, a0, a1)
}
}
pub unsafe fn SetColorSpace1(
inner: *mut c_void,
a0: windows::Win32::Graphics::Dxgi::Common::DXGI_COLOR_SPACE_TYPE,
) -> windows::core::HRESULT {
unsafe {
((*(*(inner as *const *const windows::Win32::Graphics::Dxgi::IDXGISwapChain4_Vtbl)))
.base__
.SetColorSpace1)(inner, a0)
}
}
pub unsafe fn ResizeBuffers1(
inner: *mut c_void,
a0: u32,
a1: u32,
a2: u32,
a3: windows::Win32::Graphics::Dxgi::Common::DXGI_FORMAT,
a4: u32,
a5: *const u32,
a6: *const *mut core::ffi::c_void,
) -> windows::core::HRESULT {
unsafe {
((*(*(inner as *const *const windows::Win32::Graphics::Dxgi::IDXGISwapChain4_Vtbl)))
.base__
.ResizeBuffers1)(inner, a0, a1, a2, a3, a4, a5, a6)
}
}
pub unsafe fn SetHDRMetaData(
inner: *mut c_void,
a0: windows::Win32::Graphics::Dxgi::DXGI_HDR_METADATA_TYPE,
a1: u32,
a2: *const core::ffi::c_void,
) -> windows::core::HRESULT {
unsafe {
((*(*(inner as *const *const windows::Win32::Graphics::Dxgi::IDXGISwapChain4_Vtbl)))
.SetHDRMetaData)(inner, a0, a1, a2)
}
}
}
unsafe extern "system" fn QueryInterface<T: SwapChainMethods>(
this: *mut c_void,
iid: *const windows::core::GUID,
out: *mut *mut c_void,
) -> windows::core::HRESULT {
unsafe { (*(this as *const T)).QueryInterface(iid, out) }
}
unsafe extern "system" fn AddRef<T: SwapChainMethods>(this: *mut c_void) -> u32 {
unsafe { (*(this as *const T)).AddRef() }
}
unsafe extern "system" fn Release<T: SwapChainMethods>(this: *mut c_void) -> u32 {
unsafe { (*(this as *const T)).Release() }
}
unsafe extern "system" fn SetPrivateData<T: SwapChainMethods>(
this: *mut c_void,
a0: *const windows::core::GUID,
a1: u32,
a2: *const core::ffi::c_void,
) -> windows::core::HRESULT {
unsafe { (*(this as *const T)).SetPrivateData(a0, a1, a2) }
}
unsafe extern "system" fn SetPrivateDataInterface<T: SwapChainMethods>(
this: *mut c_void,
a0: *const windows::core::GUID,
a1: *mut core::ffi::c_void,
) -> windows::core::HRESULT {
unsafe { (*(this as *const T)).SetPrivateDataInterface(a0, a1) }
}
unsafe extern "system" fn GetPrivateData<T: SwapChainMethods>(
this: *mut c_void,
a0: *const windows::core::GUID,
a1: *mut u32,
a2: *mut core::ffi::c_void,
) -> windows::core::HRESULT {
unsafe { (*(this as *const T)).GetPrivateData(a0, a1, a2) }
}
unsafe extern "system" fn GetParent<T: SwapChainMethods>(
this: *mut c_void,
a0: *const windows::core::GUID,
a1: *mut *mut core::ffi::c_void,
) -> windows::core::HRESULT {
unsafe { (*(this as *const T)).GetParent(a0, a1) }
}
unsafe extern "system" fn GetDevice<T: SwapChainMethods>(
this: *mut c_void,
a0: *const windows::core::GUID,
a1: *mut *mut core::ffi::c_void,
) -> windows::core::HRESULT {
unsafe { (*(this as *const T)).GetDevice(a0, a1) }
}
unsafe extern "system" fn Present<T: SwapChainMethods>(
this: *mut c_void,
a0: u32,
a1: windows::Win32::Graphics::Dxgi::DXGI_PRESENT,
) -> windows::core::HRESULT {
unsafe { (*(this as *const T)).Present(a0, a1) }
}
unsafe extern "system" fn GetBuffer<T: SwapChainMethods>(
this: *mut c_void,
a0: u32,
a1: *const windows::core::GUID,
a2: *mut *mut core::ffi::c_void,
) -> windows::core::HRESULT {
unsafe { (*(this as *const T)).GetBuffer(a0, a1, a2) }
}
unsafe extern "system" fn SetFullscreenState<T: SwapChainMethods>(
this: *mut c_void,
a0: windows::core::BOOL,
a1: *mut core::ffi::c_void,
) -> windows::core::HRESULT {
unsafe { (*(this as *const T)).SetFullscreenState(a0, a1) }
}
unsafe extern "system" fn GetFullscreenState<T: SwapChainMethods>(
this: *mut c_void,
a0: *mut windows::core::BOOL,
a1: *mut *mut core::ffi::c_void,
) -> windows::core::HRESULT {
unsafe { (*(this as *const T)).GetFullscreenState(a0, a1) }
}
unsafe extern "system" fn GetDesc<T: SwapChainMethods>(
this: *mut c_void,
a0: *mut windows::Win32::Graphics::Dxgi::DXGI_SWAP_CHAIN_DESC,
) -> windows::core::HRESULT {
unsafe { (*(this as *const T)).GetDesc(a0) }
}
unsafe extern "system" fn ResizeBuffers<T: SwapChainMethods>(
this: *mut c_void,
a0: u32,
a1: u32,
a2: u32,
a3: windows::Win32::Graphics::Dxgi::Common::DXGI_FORMAT,
a4: u32,
) -> windows::core::HRESULT {
unsafe { (*(this as *const T)).ResizeBuffers(a0, a1, a2, a3, a4) }
}
unsafe extern "system" fn ResizeTarget<T: SwapChainMethods>(
this: *mut c_void,
a0: *const windows::Win32::Graphics::Dxgi::Common::DXGI_MODE_DESC,
) -> windows::core::HRESULT {
unsafe { (*(this as *const T)).ResizeTarget(a0) }
}
unsafe extern "system" fn GetContainingOutput<T: SwapChainMethods>(
this: *mut c_void,
a0: *mut *mut core::ffi::c_void,
) -> windows::core::HRESULT {
unsafe { (*(this as *const T)).GetContainingOutput(a0) }
}
unsafe extern "system" fn GetFrameStatistics<T: SwapChainMethods>(
this: *mut c_void,
a0: *mut windows::Win32::Graphics::Dxgi::DXGI_FRAME_STATISTICS,
) -> windows::core::HRESULT {
unsafe { (*(this as *const T)).GetFrameStatistics(a0) }
}
unsafe extern "system" fn GetLastPresentCount<T: SwapChainMethods>(
this: *mut c_void,
a0: *mut u32,
) -> windows::core::HRESULT {
unsafe { (*(this as *const T)).GetLastPresentCount(a0) }
}
unsafe extern "system" fn GetDesc1<T: SwapChainMethods>(
this: *mut c_void,
a0: *mut windows::Win32::Graphics::Dxgi::DXGI_SWAP_CHAIN_DESC1,
) -> windows::core::HRESULT {
unsafe { (*(this as *const T)).GetDesc1(a0) }
}
unsafe extern "system" fn GetFullscreenDesc<T: SwapChainMethods>(
this: *mut c_void,
a0: *mut windows::Win32::Graphics::Dxgi::DXGI_SWAP_CHAIN_FULLSCREEN_DESC,
) -> windows::core::HRESULT {
unsafe { (*(this as *const T)).GetFullscreenDesc(a0) }
}
unsafe extern "system" fn GetHwnd<T: SwapChainMethods>(
this: *mut c_void,
a0: *mut windows::Win32::Foundation::HWND,
) -> windows::core::HRESULT {
unsafe { (*(this as *const T)).GetHwnd(a0) }
}
unsafe extern "system" fn GetCoreWindow<T: SwapChainMethods>(
this: *mut c_void,
a0: *const windows::core::GUID,
a1: *mut *mut core::ffi::c_void,
) -> windows::core::HRESULT {
unsafe { (*(this as *const T)).GetCoreWindow(a0, a1) }
}
unsafe extern "system" fn Present1<T: SwapChainMethods>(
this: *mut c_void,
a0: u32,
a1: windows::Win32::Graphics::Dxgi::DXGI_PRESENT,
a2: *const windows::Win32::Graphics::Dxgi::DXGI_PRESENT_PARAMETERS,
) -> windows::core::HRESULT {
unsafe { (*(this as *const T)).Present1(a0, a1, a2) }
}
unsafe extern "system" fn IsTemporaryMonoSupported<T: SwapChainMethods>(
this: *mut c_void,
) -> windows::core::BOOL {
unsafe { (*(this as *const T)).IsTemporaryMonoSupported() }
}
unsafe extern "system" fn GetRestrictToOutput<T: SwapChainMethods>(
this: *mut c_void,
a0: *mut *mut core::ffi::c_void,
) -> windows::core::HRESULT {
unsafe { (*(this as *const T)).GetRestrictToOutput(a0) }
}
unsafe extern "system" fn SetBackgroundColor<T: SwapChainMethods>(
this: *mut c_void,
a0: *const windows::Win32::Graphics::Dxgi::DXGI_RGBA,
) -> windows::core::HRESULT {
unsafe { (*(this as *const T)).SetBackgroundColor(a0) }
}
unsafe extern "system" fn GetBackgroundColor<T: SwapChainMethods>(
this: *mut c_void,
a0: *mut windows::Win32::Graphics::Dxgi::DXGI_RGBA,
) -> windows::core::HRESULT {
unsafe { (*(this as *const T)).GetBackgroundColor(a0) }
}
unsafe extern "system" fn SetRotation<T: SwapChainMethods>(
this: *mut c_void,
a0: windows::Win32::Graphics::Dxgi::Common::DXGI_MODE_ROTATION,
) -> windows::core::HRESULT {
unsafe { (*(this as *const T)).SetRotation(a0) }
}
unsafe extern "system" fn GetRotation<T: SwapChainMethods>(
this: *mut c_void,
a0: *mut windows::Win32::Graphics::Dxgi::Common::DXGI_MODE_ROTATION,
) -> windows::core::HRESULT {
unsafe { (*(this as *const T)).GetRotation(a0) }
}
unsafe extern "system" fn SetSourceSize<T: SwapChainMethods>(
this: *mut c_void,
a0: u32,
a1: u32,
) -> windows::core::HRESULT {
unsafe { (*(this as *const T)).SetSourceSize(a0, a1) }
}
unsafe extern "system" fn GetSourceSize<T: SwapChainMethods>(
this: *mut c_void,
a0: *mut u32,
a1: *mut u32,
) -> windows::core::HRESULT {
unsafe { (*(this as *const T)).GetSourceSize(a0, a1) }
}
unsafe extern "system" fn SetMaximumFrameLatency<T: SwapChainMethods>(
this: *mut c_void,
a0: u32,
) -> windows::core::HRESULT {
unsafe { (*(this as *const T)).SetMaximumFrameLatency(a0) }
}
unsafe extern "system" fn GetMaximumFrameLatency<T: SwapChainMethods>(
this: *mut c_void,
a0: *mut u32,
) -> windows::core::HRESULT {
unsafe { (*(this as *const T)).GetMaximumFrameLatency(a0) }
}
unsafe extern "system" fn GetFrameLatencyWaitableObject<T: SwapChainMethods>(
this: *mut c_void,
) -> windows::Win32::Foundation::HANDLE {
unsafe { (*(this as *const T)).GetFrameLatencyWaitableObject() }
}
unsafe extern "system" fn SetMatrixTransform<T: SwapChainMethods>(
this: *mut c_void,
a0: *const windows::Win32::Graphics::Dxgi::DXGI_MATRIX_3X2_F,
) -> windows::core::HRESULT {
unsafe { (*(this as *const T)).SetMatrixTransform(a0) }
}
unsafe extern "system" fn GetMatrixTransform<T: SwapChainMethods>(
this: *mut c_void,
a0: *mut windows::Win32::Graphics::Dxgi::DXGI_MATRIX_3X2_F,
) -> windows::core::HRESULT {
unsafe { (*(this as *const T)).GetMatrixTransform(a0) }
}
unsafe extern "system" fn GetCurrentBackBufferIndex<T: SwapChainMethods>(this: *mut c_void) -> u32 {
unsafe { (*(this as *const T)).GetCurrentBackBufferIndex() }
}
unsafe extern "system" fn CheckColorSpaceSupport<T: SwapChainMethods>(
this: *mut c_void,
a0: windows::Win32::Graphics::Dxgi::Common::DXGI_COLOR_SPACE_TYPE,
a1: *mut u32,
) -> windows::core::HRESULT {
unsafe { (*(this as *const T)).CheckColorSpaceSupport(a0, a1) }
}
unsafe extern "system" fn SetColorSpace1<T: SwapChainMethods>(
this: *mut c_void,
a0: windows::Win32::Graphics::Dxgi::Common::DXGI_COLOR_SPACE_TYPE,
) -> windows::core::HRESULT {
unsafe { (*(this as *const T)).SetColorSpace1(a0) }
}
unsafe extern "system" fn ResizeBuffers1<T: SwapChainMethods>(
this: *mut c_void,
a0: u32,
a1: u32,
a2: u32,
a3: windows::Win32::Graphics::Dxgi::Common::DXGI_FORMAT,
a4: u32,
a5: *const u32,
a6: *const *mut core::ffi::c_void,
) -> windows::core::HRESULT {
unsafe { (*(this as *const T)).ResizeBuffers1(a0, a1, a2, a3, a4, a5, a6) }
}
unsafe extern "system" fn SetHDRMetaData<T: SwapChainMethods>(
this: *mut c_void,
a0: windows::Win32::Graphics::Dxgi::DXGI_HDR_METADATA_TYPE,
a1: u32,
a2: *const core::ffi::c_void,
) -> windows::core::HRESULT {
unsafe { (*(this as *const T)).SetHDRMetaData(a0, a1, a2) }
}
pub const fn vtable<T: SwapChainMethods>() -> windows::Win32::Graphics::Dxgi::IDXGISwapChain4_Vtbl {
windows::Win32::Graphics::Dxgi::IDXGISwapChain4_Vtbl {
base__: windows::Win32::Graphics::Dxgi::IDXGISwapChain3_Vtbl {
base__: windows::Win32::Graphics::Dxgi::IDXGISwapChain2_Vtbl {
base__: windows::Win32::Graphics::Dxgi::IDXGISwapChain1_Vtbl {
base__: windows::Win32::Graphics::Dxgi::IDXGISwapChain_Vtbl {
base__: windows::Win32::Graphics::Dxgi::IDXGIDeviceSubObject_Vtbl {
base__: windows::Win32::Graphics::Dxgi::IDXGIObject_Vtbl {
base__: windows::core::IUnknown_Vtbl {
QueryInterface: QueryInterface::<T>,
AddRef: AddRef::<T>,
Release: Release::<T>,
},
SetPrivateData: SetPrivateData::<T>,
SetPrivateDataInterface: SetPrivateDataInterface::<T>,
GetPrivateData: GetPrivateData::<T>,
GetParent: GetParent::<T>,
},
GetDevice: GetDevice::<T>,
},
Present: Present::<T>,
GetBuffer: GetBuffer::<T>,
SetFullscreenState: SetFullscreenState::<T>,
GetFullscreenState: GetFullscreenState::<T>,
GetDesc: GetDesc::<T>,
ResizeBuffers: ResizeBuffers::<T>,
ResizeTarget: ResizeTarget::<T>,
GetContainingOutput: GetContainingOutput::<T>,
GetFrameStatistics: GetFrameStatistics::<T>,
GetLastPresentCount: GetLastPresentCount::<T>,
},
GetDesc1: GetDesc1::<T>,
GetFullscreenDesc: GetFullscreenDesc::<T>,
GetHwnd: GetHwnd::<T>,
GetCoreWindow: GetCoreWindow::<T>,
Present1: Present1::<T>,
IsTemporaryMonoSupported: IsTemporaryMonoSupported::<T>,
GetRestrictToOutput: GetRestrictToOutput::<T>,
SetBackgroundColor: SetBackgroundColor::<T>,
GetBackgroundColor: GetBackgroundColor::<T>,
SetRotation: SetRotation::<T>,
GetRotation: GetRotation::<T>,
},
SetSourceSize: SetSourceSize::<T>,
GetSourceSize: GetSourceSize::<T>,
SetMaximumFrameLatency: SetMaximumFrameLatency::<T>,
GetMaximumFrameLatency: GetMaximumFrameLatency::<T>,
GetFrameLatencyWaitableObject: GetFrameLatencyWaitableObject::<T>,
SetMatrixTransform: SetMatrixTransform::<T>,
GetMatrixTransform: GetMatrixTransform::<T>,
},
GetCurrentBackBufferIndex: GetCurrentBackBufferIndex::<T>,
CheckColorSpaceSupport: CheckColorSpaceSupport::<T>,
SetColorSpace1: SetColorSpace1::<T>,
ResizeBuffers1: ResizeBuffers1::<T>,
},
SetHDRMetaData: SetHDRMetaData::<T>,
}
}