Skip to content

Commit

Permalink
wonky com
Browse files Browse the repository at this point in the history
  • Loading branch information
kennykerr committed Oct 29, 2024
1 parent 94c1cb3 commit dc23715
Show file tree
Hide file tree
Showing 13 changed files with 147 additions and 0 deletions.
3 changes: 3 additions & 0 deletions crates/libs/bindgen/src/rust/implements.rs
Original file line number Diff line number Diff line change
Expand Up @@ -190,12 +190,15 @@ pub fn writer(writer: &Writer, def: metadata::TypeDef) -> TokenStream {
}
}
#[doc(hidden)]
#[cfg(feature = "std")]
#features
struct #implvtbl_ident<T: #impl_ident> (core::marker::PhantomData<T>);
#[cfg(feature = "std")]
#features
impl<T: #impl_ident> #implvtbl_ident<T> {
const VTABLE: #vtbl_ident = #vtbl_ident::new::<T>();
}
#[cfg(feature = "std")]
#features
impl #type_ident {
pub fn new<'a, T: #impl_ident>(this: &'a T) -> windows_core::ScopedInterface<'a, Self> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -146,10 +146,13 @@ impl ID3DInclude_Vtbl {
}
}
#[doc(hidden)]
#[cfg(feature = "std")]
struct ID3DInclude_ImplVtbl<T: ID3DInclude_Impl>(core::marker::PhantomData<T>);
#[cfg(feature = "std")]
impl<T: ID3DInclude_Impl> ID3DInclude_ImplVtbl<T> {
const VTABLE: ID3DInclude_Vtbl = ID3DInclude_Vtbl::new::<T>();
}
#[cfg(feature = "std")]
impl ID3DInclude {
pub fn new<'a, T: ID3DInclude_Impl>(this: &'a T) -> windows_core::ScopedInterface<'a, Self> {
let this = windows_core::ScopedHeap { vtable: &ID3DInclude_ImplVtbl::<T>::VTABLE as *const _ as *const _, this: this as *const _ as *const _ };
Expand Down
60 changes: 60 additions & 0 deletions crates/libs/windows/src/Windows/Win32/Graphics/Direct3D10/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2191,10 +2191,13 @@ impl ID3D10EffectBlendVariable_Vtbl {
}
}
#[doc(hidden)]
#[cfg(feature = "std")]
struct ID3D10EffectBlendVariable_ImplVtbl<T: ID3D10EffectBlendVariable_Impl>(core::marker::PhantomData<T>);
#[cfg(feature = "std")]
impl<T: ID3D10EffectBlendVariable_Impl> ID3D10EffectBlendVariable_ImplVtbl<T> {
const VTABLE: ID3D10EffectBlendVariable_Vtbl = ID3D10EffectBlendVariable_Vtbl::new::<T>();
}
#[cfg(feature = "std")]
impl ID3D10EffectBlendVariable {
pub fn new<'a, T: ID3D10EffectBlendVariable_Impl>(this: &'a T) -> windows_core::ScopedInterface<'a, Self> {
let this = windows_core::ScopedHeap { vtable: &ID3D10EffectBlendVariable_ImplVtbl::<T>::VTABLE as *const _ as *const _, this: this as *const _ as *const _ };
Expand Down Expand Up @@ -2292,10 +2295,13 @@ impl ID3D10EffectConstantBuffer_Vtbl {
}
}
#[doc(hidden)]
#[cfg(feature = "std")]
struct ID3D10EffectConstantBuffer_ImplVtbl<T: ID3D10EffectConstantBuffer_Impl>(core::marker::PhantomData<T>);
#[cfg(feature = "std")]
impl<T: ID3D10EffectConstantBuffer_Impl> ID3D10EffectConstantBuffer_ImplVtbl<T> {
const VTABLE: ID3D10EffectConstantBuffer_Vtbl = ID3D10EffectConstantBuffer_Vtbl::new::<T>();
}
#[cfg(feature = "std")]
impl ID3D10EffectConstantBuffer {
pub fn new<'a, T: ID3D10EffectConstantBuffer_Impl>(this: &'a T) -> windows_core::ScopedInterface<'a, Self> {
let this = windows_core::ScopedHeap { vtable: &ID3D10EffectConstantBuffer_ImplVtbl::<T>::VTABLE as *const _ as *const _, this: this as *const _ as *const _ };
Expand Down Expand Up @@ -2354,10 +2360,13 @@ impl ID3D10EffectDepthStencilVariable_Vtbl {
}
}
#[doc(hidden)]
#[cfg(feature = "std")]
struct ID3D10EffectDepthStencilVariable_ImplVtbl<T: ID3D10EffectDepthStencilVariable_Impl>(core::marker::PhantomData<T>);
#[cfg(feature = "std")]
impl<T: ID3D10EffectDepthStencilVariable_Impl> ID3D10EffectDepthStencilVariable_ImplVtbl<T> {
const VTABLE: ID3D10EffectDepthStencilVariable_Vtbl = ID3D10EffectDepthStencilVariable_Vtbl::new::<T>();
}
#[cfg(feature = "std")]
impl ID3D10EffectDepthStencilVariable {
pub fn new<'a, T: ID3D10EffectDepthStencilVariable_Impl>(this: &'a T) -> windows_core::ScopedInterface<'a, Self> {
let this = windows_core::ScopedHeap { vtable: &ID3D10EffectDepthStencilVariable_ImplVtbl::<T>::VTABLE as *const _ as *const _, this: this as *const _ as *const _ };
Expand Down Expand Up @@ -2445,10 +2454,13 @@ impl ID3D10EffectDepthStencilViewVariable_Vtbl {
}
}
#[doc(hidden)]
#[cfg(feature = "std")]
struct ID3D10EffectDepthStencilViewVariable_ImplVtbl<T: ID3D10EffectDepthStencilViewVariable_Impl>(core::marker::PhantomData<T>);
#[cfg(feature = "std")]
impl<T: ID3D10EffectDepthStencilViewVariable_Impl> ID3D10EffectDepthStencilViewVariable_ImplVtbl<T> {
const VTABLE: ID3D10EffectDepthStencilViewVariable_Vtbl = ID3D10EffectDepthStencilViewVariable_Vtbl::new::<T>();
}
#[cfg(feature = "std")]
impl ID3D10EffectDepthStencilViewVariable {
pub fn new<'a, T: ID3D10EffectDepthStencilViewVariable_Impl>(this: &'a T) -> windows_core::ScopedInterface<'a, Self> {
let this = windows_core::ScopedHeap { vtable: &ID3D10EffectDepthStencilViewVariable_ImplVtbl::<T>::VTABLE as *const _ as *const _, this: this as *const _ as *const _ };
Expand Down Expand Up @@ -2570,10 +2582,13 @@ impl ID3D10EffectMatrixVariable_Vtbl {
}
}
#[doc(hidden)]
#[cfg(feature = "std")]
struct ID3D10EffectMatrixVariable_ImplVtbl<T: ID3D10EffectMatrixVariable_Impl>(core::marker::PhantomData<T>);
#[cfg(feature = "std")]
impl<T: ID3D10EffectMatrixVariable_Impl> ID3D10EffectMatrixVariable_ImplVtbl<T> {
const VTABLE: ID3D10EffectMatrixVariable_Vtbl = ID3D10EffectMatrixVariable_Vtbl::new::<T>();
}
#[cfg(feature = "std")]
impl ID3D10EffectMatrixVariable {
pub fn new<'a, T: ID3D10EffectMatrixVariable_Impl>(this: &'a T) -> windows_core::ScopedInterface<'a, Self> {
let this = windows_core::ScopedHeap { vtable: &ID3D10EffectMatrixVariable_ImplVtbl::<T>::VTABLE as *const _ as *const _, this: this as *const _ as *const _ };
Expand Down Expand Up @@ -2700,10 +2715,13 @@ impl ID3D10EffectPass_Vtbl {
}
}
#[doc(hidden)]
#[cfg(feature = "std")]
struct ID3D10EffectPass_ImplVtbl<T: ID3D10EffectPass_Impl>(core::marker::PhantomData<T>);
#[cfg(feature = "std")]
impl<T: ID3D10EffectPass_Impl> ID3D10EffectPass_ImplVtbl<T> {
const VTABLE: ID3D10EffectPass_Vtbl = ID3D10EffectPass_Vtbl::new::<T>();
}
#[cfg(feature = "std")]
impl ID3D10EffectPass {
pub fn new<'a, T: ID3D10EffectPass_Impl>(this: &'a T) -> windows_core::ScopedInterface<'a, Self> {
let this = windows_core::ScopedHeap { vtable: &ID3D10EffectPass_ImplVtbl::<T>::VTABLE as *const _ as *const _, this: this as *const _ as *const _ };
Expand Down Expand Up @@ -2798,10 +2816,13 @@ impl ID3D10EffectRasterizerVariable_Vtbl {
}
}
#[doc(hidden)]
#[cfg(feature = "std")]
struct ID3D10EffectRasterizerVariable_ImplVtbl<T: ID3D10EffectRasterizerVariable_Impl>(core::marker::PhantomData<T>);
#[cfg(feature = "std")]
impl<T: ID3D10EffectRasterizerVariable_Impl> ID3D10EffectRasterizerVariable_ImplVtbl<T> {
const VTABLE: ID3D10EffectRasterizerVariable_Vtbl = ID3D10EffectRasterizerVariable_Vtbl::new::<T>();
}
#[cfg(feature = "std")]
impl ID3D10EffectRasterizerVariable {
pub fn new<'a, T: ID3D10EffectRasterizerVariable_Impl>(this: &'a T) -> windows_core::ScopedInterface<'a, Self> {
let this = windows_core::ScopedHeap { vtable: &ID3D10EffectRasterizerVariable_ImplVtbl::<T>::VTABLE as *const _ as *const _, this: this as *const _ as *const _ };
Expand Down Expand Up @@ -2889,10 +2910,13 @@ impl ID3D10EffectRenderTargetViewVariable_Vtbl {
}
}
#[doc(hidden)]
#[cfg(feature = "std")]
struct ID3D10EffectRenderTargetViewVariable_ImplVtbl<T: ID3D10EffectRenderTargetViewVariable_Impl>(core::marker::PhantomData<T>);
#[cfg(feature = "std")]
impl<T: ID3D10EffectRenderTargetViewVariable_Impl> ID3D10EffectRenderTargetViewVariable_ImplVtbl<T> {
const VTABLE: ID3D10EffectRenderTargetViewVariable_Vtbl = ID3D10EffectRenderTargetViewVariable_Vtbl::new::<T>();
}
#[cfg(feature = "std")]
impl ID3D10EffectRenderTargetViewVariable {
pub fn new<'a, T: ID3D10EffectRenderTargetViewVariable_Impl>(this: &'a T) -> windows_core::ScopedInterface<'a, Self> {
let this = windows_core::ScopedHeap { vtable: &ID3D10EffectRenderTargetViewVariable_ImplVtbl::<T>::VTABLE as *const _ as *const _, this: this as *const _ as *const _ };
Expand Down Expand Up @@ -2951,10 +2975,13 @@ impl ID3D10EffectSamplerVariable_Vtbl {
}
}
#[doc(hidden)]
#[cfg(feature = "std")]
struct ID3D10EffectSamplerVariable_ImplVtbl<T: ID3D10EffectSamplerVariable_Impl>(core::marker::PhantomData<T>);
#[cfg(feature = "std")]
impl<T: ID3D10EffectSamplerVariable_Impl> ID3D10EffectSamplerVariable_ImplVtbl<T> {
const VTABLE: ID3D10EffectSamplerVariable_Vtbl = ID3D10EffectSamplerVariable_Vtbl::new::<T>();
}
#[cfg(feature = "std")]
impl ID3D10EffectSamplerVariable {
pub fn new<'a, T: ID3D10EffectSamplerVariable_Impl>(this: &'a T) -> windows_core::ScopedInterface<'a, Self> {
let this = windows_core::ScopedHeap { vtable: &ID3D10EffectSamplerVariable_ImplVtbl::<T>::VTABLE as *const _ as *const _, this: this as *const _ as *const _ };
Expand Down Expand Up @@ -3144,10 +3171,13 @@ impl ID3D10EffectScalarVariable_Vtbl {
}
}
#[doc(hidden)]
#[cfg(feature = "std")]
struct ID3D10EffectScalarVariable_ImplVtbl<T: ID3D10EffectScalarVariable_Impl>(core::marker::PhantomData<T>);
#[cfg(feature = "std")]
impl<T: ID3D10EffectScalarVariable_Impl> ID3D10EffectScalarVariable_ImplVtbl<T> {
const VTABLE: ID3D10EffectScalarVariable_Vtbl = ID3D10EffectScalarVariable_Vtbl::new::<T>();
}
#[cfg(feature = "std")]
impl ID3D10EffectScalarVariable {
pub fn new<'a, T: ID3D10EffectScalarVariable_Impl>(this: &'a T) -> windows_core::ScopedInterface<'a, Self> {
let this = windows_core::ScopedHeap { vtable: &ID3D10EffectScalarVariable_ImplVtbl::<T>::VTABLE as *const _ as *const _, this: this as *const _ as *const _ };
Expand Down Expand Up @@ -3235,10 +3265,13 @@ impl ID3D10EffectShaderResourceVariable_Vtbl {
}
}
#[doc(hidden)]
#[cfg(feature = "std")]
struct ID3D10EffectShaderResourceVariable_ImplVtbl<T: ID3D10EffectShaderResourceVariable_Impl>(core::marker::PhantomData<T>);
#[cfg(feature = "std")]
impl<T: ID3D10EffectShaderResourceVariable_Impl> ID3D10EffectShaderResourceVariable_ImplVtbl<T> {
const VTABLE: ID3D10EffectShaderResourceVariable_Vtbl = ID3D10EffectShaderResourceVariable_Vtbl::new::<T>();
}
#[cfg(feature = "std")]
impl ID3D10EffectShaderResourceVariable {
pub fn new<'a, T: ID3D10EffectShaderResourceVariable_Impl>(this: &'a T) -> windows_core::ScopedInterface<'a, Self> {
let this = windows_core::ScopedHeap { vtable: &ID3D10EffectShaderResourceVariable_ImplVtbl::<T>::VTABLE as *const _ as *const _, this: this as *const _ as *const _ };
Expand Down Expand Up @@ -3369,12 +3402,15 @@ impl ID3D10EffectShaderVariable_Vtbl {
}
}
#[doc(hidden)]
#[cfg(feature = "std")]
#[cfg(feature = "Win32_Graphics_Direct3D")]
struct ID3D10EffectShaderVariable_ImplVtbl<T: ID3D10EffectShaderVariable_Impl>(core::marker::PhantomData<T>);
#[cfg(feature = "std")]
#[cfg(feature = "Win32_Graphics_Direct3D")]
impl<T: ID3D10EffectShaderVariable_Impl> ID3D10EffectShaderVariable_ImplVtbl<T> {
const VTABLE: ID3D10EffectShaderVariable_Vtbl = ID3D10EffectShaderVariable_Vtbl::new::<T>();
}
#[cfg(feature = "std")]
#[cfg(feature = "Win32_Graphics_Direct3D")]
impl ID3D10EffectShaderVariable {
pub fn new<'a, T: ID3D10EffectShaderVariable_Impl>(this: &'a T) -> windows_core::ScopedInterface<'a, Self> {
Expand Down Expand Up @@ -3434,10 +3470,13 @@ impl ID3D10EffectStringVariable_Vtbl {
}
}
#[doc(hidden)]
#[cfg(feature = "std")]
struct ID3D10EffectStringVariable_ImplVtbl<T: ID3D10EffectStringVariable_Impl>(core::marker::PhantomData<T>);
#[cfg(feature = "std")]
impl<T: ID3D10EffectStringVariable_Impl> ID3D10EffectStringVariable_ImplVtbl<T> {
const VTABLE: ID3D10EffectStringVariable_Vtbl = ID3D10EffectStringVariable_Vtbl::new::<T>();
}
#[cfg(feature = "std")]
impl ID3D10EffectStringVariable {
pub fn new<'a, T: ID3D10EffectStringVariable_Impl>(this: &'a T) -> windows_core::ScopedInterface<'a, Self> {
let this = windows_core::ScopedHeap { vtable: &ID3D10EffectStringVariable_ImplVtbl::<T>::VTABLE as *const _ as *const _, this: this as *const _ as *const _ };
Expand Down Expand Up @@ -3545,10 +3584,13 @@ impl ID3D10EffectTechnique_Vtbl {
}
}
#[doc(hidden)]
#[cfg(feature = "std")]
struct ID3D10EffectTechnique_ImplVtbl<T: ID3D10EffectTechnique_Impl>(core::marker::PhantomData<T>);
#[cfg(feature = "std")]
impl<T: ID3D10EffectTechnique_Impl> ID3D10EffectTechnique_ImplVtbl<T> {
const VTABLE: ID3D10EffectTechnique_Vtbl = ID3D10EffectTechnique_Vtbl::new::<T>();
}
#[cfg(feature = "std")]
impl ID3D10EffectTechnique {
pub fn new<'a, T: ID3D10EffectTechnique_Impl>(this: &'a T) -> windows_core::ScopedInterface<'a, Self> {
let this = windows_core::ScopedHeap { vtable: &ID3D10EffectTechnique_ImplVtbl::<T>::VTABLE as *const _ as *const _, this: this as *const _ as *const _ };
Expand Down Expand Up @@ -3662,12 +3704,15 @@ impl ID3D10EffectType_Vtbl {
}
}
#[doc(hidden)]
#[cfg(feature = "std")]
#[cfg(feature = "Win32_Graphics_Direct3D")]
struct ID3D10EffectType_ImplVtbl<T: ID3D10EffectType_Impl>(core::marker::PhantomData<T>);
#[cfg(feature = "std")]
#[cfg(feature = "Win32_Graphics_Direct3D")]
impl<T: ID3D10EffectType_Impl> ID3D10EffectType_ImplVtbl<T> {
const VTABLE: ID3D10EffectType_Vtbl = ID3D10EffectType_Vtbl::new::<T>();
}
#[cfg(feature = "std")]
#[cfg(feature = "Win32_Graphics_Direct3D")]
impl ID3D10EffectType {
pub fn new<'a, T: ID3D10EffectType_Impl>(this: &'a T) -> windows_core::ScopedInterface<'a, Self> {
Expand Down Expand Up @@ -3977,10 +4022,13 @@ impl ID3D10EffectVariable_Vtbl {
}
}
#[doc(hidden)]
#[cfg(feature = "std")]
struct ID3D10EffectVariable_ImplVtbl<T: ID3D10EffectVariable_Impl>(core::marker::PhantomData<T>);
#[cfg(feature = "std")]
impl<T: ID3D10EffectVariable_Impl> ID3D10EffectVariable_ImplVtbl<T> {
const VTABLE: ID3D10EffectVariable_Vtbl = ID3D10EffectVariable_Vtbl::new::<T>();
}
#[cfg(feature = "std")]
impl ID3D10EffectVariable {
pub fn new<'a, T: ID3D10EffectVariable_Impl>(this: &'a T) -> windows_core::ScopedInterface<'a, Self> {
let this = windows_core::ScopedHeap { vtable: &ID3D10EffectVariable_ImplVtbl::<T>::VTABLE as *const _ as *const _, this: this as *const _ as *const _ };
Expand Down Expand Up @@ -4146,10 +4194,13 @@ impl ID3D10EffectVectorVariable_Vtbl {
}
}
#[doc(hidden)]
#[cfg(feature = "std")]
struct ID3D10EffectVectorVariable_ImplVtbl<T: ID3D10EffectVectorVariable_Impl>(core::marker::PhantomData<T>);
#[cfg(feature = "std")]
impl<T: ID3D10EffectVectorVariable_Impl> ID3D10EffectVectorVariable_ImplVtbl<T> {
const VTABLE: ID3D10EffectVectorVariable_Vtbl = ID3D10EffectVectorVariable_Vtbl::new::<T>();
}
#[cfg(feature = "std")]
impl ID3D10EffectVectorVariable {
pub fn new<'a, T: ID3D10EffectVectorVariable_Impl>(this: &'a T) -> windows_core::ScopedInterface<'a, Self> {
let this = windows_core::ScopedHeap { vtable: &ID3D10EffectVectorVariable_ImplVtbl::<T>::VTABLE as *const _ as *const _, this: this as *const _ as *const _ };
Expand Down Expand Up @@ -5370,12 +5421,15 @@ impl ID3D10ShaderReflectionConstantBuffer_Vtbl {
}
}
#[doc(hidden)]
#[cfg(feature = "std")]
#[cfg(feature = "Win32_Graphics_Direct3D")]
struct ID3D10ShaderReflectionConstantBuffer_ImplVtbl<T: ID3D10ShaderReflectionConstantBuffer_Impl>(core::marker::PhantomData<T>);
#[cfg(feature = "std")]
#[cfg(feature = "Win32_Graphics_Direct3D")]
impl<T: ID3D10ShaderReflectionConstantBuffer_Impl> ID3D10ShaderReflectionConstantBuffer_ImplVtbl<T> {
const VTABLE: ID3D10ShaderReflectionConstantBuffer_Vtbl = ID3D10ShaderReflectionConstantBuffer_Vtbl::new::<T>();
}
#[cfg(feature = "std")]
#[cfg(feature = "Win32_Graphics_Direct3D")]
impl ID3D10ShaderReflectionConstantBuffer {
pub fn new<'a, T: ID3D10ShaderReflectionConstantBuffer_Impl>(this: &'a T) -> windows_core::ScopedInterface<'a, Self> {
Expand Down Expand Up @@ -5454,12 +5508,15 @@ impl ID3D10ShaderReflectionType_Vtbl {
}
}
#[doc(hidden)]
#[cfg(feature = "std")]
#[cfg(feature = "Win32_Graphics_Direct3D")]
struct ID3D10ShaderReflectionType_ImplVtbl<T: ID3D10ShaderReflectionType_Impl>(core::marker::PhantomData<T>);
#[cfg(feature = "std")]
#[cfg(feature = "Win32_Graphics_Direct3D")]
impl<T: ID3D10ShaderReflectionType_Impl> ID3D10ShaderReflectionType_ImplVtbl<T> {
const VTABLE: ID3D10ShaderReflectionType_Vtbl = ID3D10ShaderReflectionType_Vtbl::new::<T>();
}
#[cfg(feature = "std")]
#[cfg(feature = "Win32_Graphics_Direct3D")]
impl ID3D10ShaderReflectionType {
pub fn new<'a, T: ID3D10ShaderReflectionType_Impl>(this: &'a T) -> windows_core::ScopedInterface<'a, Self> {
Expand Down Expand Up @@ -5504,10 +5561,13 @@ impl ID3D10ShaderReflectionVariable_Vtbl {
}
}
#[doc(hidden)]
#[cfg(feature = "std")]
struct ID3D10ShaderReflectionVariable_ImplVtbl<T: ID3D10ShaderReflectionVariable_Impl>(core::marker::PhantomData<T>);
#[cfg(feature = "std")]
impl<T: ID3D10ShaderReflectionVariable_Impl> ID3D10ShaderReflectionVariable_ImplVtbl<T> {
const VTABLE: ID3D10ShaderReflectionVariable_Vtbl = ID3D10ShaderReflectionVariable_Vtbl::new::<T>();
}
#[cfg(feature = "std")]
impl ID3D10ShaderReflectionVariable {
pub fn new<'a, T: ID3D10ShaderReflectionVariable_Impl>(this: &'a T) -> windows_core::ScopedInterface<'a, Self> {
let this = windows_core::ScopedHeap { vtable: &ID3D10ShaderReflectionVariable_ImplVtbl::<T>::VTABLE as *const _ as *const _, this: this as *const _ as *const _ };
Expand Down
Loading

0 comments on commit dc23715

Please sign in to comment.