1 #![allow(unused_variables, non_upper_case_globals, non_snake_case, unused_unsafe, non_camel_case_types, dead_code, clippy::all)]
2 #[derive(:: std :: cmp :: PartialEq, :: std :: cmp :: Eq, :: std :: marker :: Copy, :: std :: clone :: Clone, :: std :: default :: Default, :: std :: fmt :: Debug)]
3 #[repr(transparent)]
4 pub struct Direct3DBindings(pub u32);
5 impl Direct3DBindings {
6     pub const VertexBuffer: Direct3DBindings = Direct3DBindings(1u32);
7     pub const IndexBuffer: Direct3DBindings = Direct3DBindings(2u32);
8     pub const ConstantBuffer: Direct3DBindings = Direct3DBindings(4u32);
9     pub const ShaderResource: Direct3DBindings = Direct3DBindings(8u32);
10     pub const StreamOutput: Direct3DBindings = Direct3DBindings(16u32);
11     pub const RenderTarget: Direct3DBindings = Direct3DBindings(32u32);
12     pub const DepthStencil: Direct3DBindings = Direct3DBindings(64u32);
13     pub const UnorderedAccess: Direct3DBindings = Direct3DBindings(128u32);
14     pub const Decoder: Direct3DBindings = Direct3DBindings(512u32);
15     pub const VideoEncoder: Direct3DBindings = Direct3DBindings(1024u32);
16 }
17 impl ::std::convert::From<u32> for Direct3DBindings {
from(value: u32) -> Self18     fn from(value: u32) -> Self {
19         Self(value)
20     }
21 }
22 unsafe impl ::windows::runtime::Abi for Direct3DBindings {
23     type Abi = Self;
24     type DefaultType = Self;
25 }
26 unsafe impl ::windows::runtime::RuntimeType for Direct3DBindings {
27     const SIGNATURE: ::windows::runtime::ConstBuffer = ::windows::runtime::ConstBuffer::from_slice(b"enum(Windows.Graphics.DirectX.Direct3D11.Direct3DBindings;u4)");
28 }
29 impl ::std::ops::BitOr for Direct3DBindings {
30     type Output = Self;
bitor(self, rhs: Self) -> Self31     fn bitor(self, rhs: Self) -> Self {
32         Self(self.0 | rhs.0)
33     }
34 }
35 impl ::std::ops::BitAnd for Direct3DBindings {
36     type Output = Self;
bitand(self, rhs: Self) -> Self37     fn bitand(self, rhs: Self) -> Self {
38         Self(self.0 & rhs.0)
39     }
40 }
41 impl ::std::ops::BitOrAssign for Direct3DBindings {
bitor_assign(&mut self, rhs: Self)42     fn bitor_assign(&mut self, rhs: Self) {
43         self.0.bitor_assign(rhs.0)
44     }
45 }
46 impl ::std::ops::BitAndAssign for Direct3DBindings {
bitand_assign(&mut self, rhs: Self)47     fn bitand_assign(&mut self, rhs: Self) {
48         self.0.bitand_assign(rhs.0)
49     }
50 }
51 impl ::std::ops::Not for Direct3DBindings {
52     type Output = Self;
not(self) -> Self53     fn not(self) -> Self {
54         Self(self.0.not())
55     }
56 }
57 #[derive(:: std :: clone :: Clone, :: std :: marker :: Copy)]
58 #[repr(C)]
59 pub struct Direct3DMultisampleDescription {
60     pub Count: i32,
61     pub Quality: i32,
62 }
63 impl Direct3DMultisampleDescription {}
64 impl ::std::default::Default for Direct3DMultisampleDescription {
default() -> Self65     fn default() -> Self {
66         unsafe { ::std::mem::zeroed() }
67     }
68 }
69 impl ::std::fmt::Debug for Direct3DMultisampleDescription {
fmt(&self, fmt: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result70     fn fmt(&self, fmt: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
71         fmt.debug_struct("Direct3DMultisampleDescription").field("Count", &self.Count).field("Quality", &self.Quality).finish()
72     }
73 }
74 impl ::std::cmp::PartialEq for Direct3DMultisampleDescription {
eq(&self, other: &Self) -> bool75     fn eq(&self, other: &Self) -> bool {
76         self.Count == other.Count && self.Quality == other.Quality
77     }
78 }
79 impl ::std::cmp::Eq for Direct3DMultisampleDescription {}
80 unsafe impl ::windows::runtime::Abi for Direct3DMultisampleDescription {
81     type Abi = Self;
82     type DefaultType = Self;
83 }
84 unsafe impl ::windows::runtime::RuntimeType for Direct3DMultisampleDescription {
85     const SIGNATURE: ::windows::runtime::ConstBuffer = ::windows::runtime::ConstBuffer::from_slice(b"struct(Windows.Graphics.DirectX.Direct3D11.Direct3DMultisampleDescription;i4;i4)");
86 }
87 #[derive(:: std :: clone :: Clone, :: std :: marker :: Copy)]
88 #[repr(C)]
89 pub struct Direct3DSurfaceDescription {
90     pub Width: i32,
91     pub Height: i32,
92     pub Format: super::DirectXPixelFormat,
93     pub MultisampleDescription: Direct3DMultisampleDescription,
94 }
95 impl Direct3DSurfaceDescription {}
96 impl ::std::default::Default for Direct3DSurfaceDescription {
default() -> Self97     fn default() -> Self {
98         unsafe { ::std::mem::zeroed() }
99     }
100 }
101 impl ::std::fmt::Debug for Direct3DSurfaceDescription {
fmt(&self, fmt: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result102     fn fmt(&self, fmt: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
103         fmt.debug_struct("Direct3DSurfaceDescription").field("Width", &self.Width).field("Height", &self.Height).field("Format", &self.Format).field("MultisampleDescription", &self.MultisampleDescription).finish()
104     }
105 }
106 impl ::std::cmp::PartialEq for Direct3DSurfaceDescription {
eq(&self, other: &Self) -> bool107     fn eq(&self, other: &Self) -> bool {
108         self.Width == other.Width && self.Height == other.Height && self.Format == other.Format && self.MultisampleDescription == other.MultisampleDescription
109     }
110 }
111 impl ::std::cmp::Eq for Direct3DSurfaceDescription {}
112 unsafe impl ::windows::runtime::Abi for Direct3DSurfaceDescription {
113     type Abi = Self;
114     type DefaultType = Self;
115 }
116 unsafe impl ::windows::runtime::RuntimeType for Direct3DSurfaceDescription {
117     const SIGNATURE: ::windows::runtime::ConstBuffer = ::windows::runtime::ConstBuffer::from_slice(b"struct(Windows.Graphics.DirectX.Direct3D11.Direct3DSurfaceDescription;i4;i4;enum(Windows.Graphics.DirectX.DirectXPixelFormat;i4);struct(Windows.Graphics.DirectX.Direct3D11.Direct3DMultisampleDescription;i4;i4))");
118 }
119 #[derive(:: std :: cmp :: PartialEq, :: std :: cmp :: Eq, :: std :: marker :: Copy, :: std :: clone :: Clone, :: std :: default :: Default, :: std :: fmt :: Debug)]
120 #[repr(transparent)]
121 pub struct Direct3DUsage(pub i32);
122 impl Direct3DUsage {
123     pub const Default: Direct3DUsage = Direct3DUsage(0i32);
124     pub const Immutable: Direct3DUsage = Direct3DUsage(1i32);
125     pub const Dynamic: Direct3DUsage = Direct3DUsage(2i32);
126     pub const Staging: Direct3DUsage = Direct3DUsage(3i32);
127 }
128 impl ::std::convert::From<i32> for Direct3DUsage {
from(value: i32) -> Self129     fn from(value: i32) -> Self {
130         Self(value)
131     }
132 }
133 unsafe impl ::windows::runtime::Abi for Direct3DUsage {
134     type Abi = Self;
135     type DefaultType = Self;
136 }
137 unsafe impl ::windows::runtime::RuntimeType for Direct3DUsage {
138     const SIGNATURE: ::windows::runtime::ConstBuffer = ::windows::runtime::ConstBuffer::from_slice(b"enum(Windows.Graphics.DirectX.Direct3D11.Direct3DUsage;i4)");
139 }
140 #[repr(transparent)]
141 #[derive(:: std :: cmp :: PartialEq, :: std :: cmp :: Eq, :: std :: clone :: Clone, :: std :: fmt :: Debug)]
142 pub struct IDirect3DDevice(::windows::runtime::IInspectable);
143 unsafe impl ::windows::runtime::Interface for IDirect3DDevice {
144     type Vtable = IDirect3DDevice_abi;
145     const IID: ::windows::runtime::GUID = ::windows::runtime::GUID::from_values(2742428843, 36191, 18000, [157, 62, 158, 174, 61, 155, 198, 112]);
146 }
147 impl IDirect3DDevice {
Trim(&self) -> ::windows::runtime::Result<()>148     pub fn Trim(&self) -> ::windows::runtime::Result<()> {
149         let this = self;
150         unsafe { (::windows::runtime::Interface::vtable(this).6)(::std::mem::transmute_copy(this)).ok() }
151     }
152     #[cfg(feature = "Foundation")]
Close(&self) -> ::windows::runtime::Result<()>153     pub fn Close(&self) -> ::windows::runtime::Result<()> {
154         let this = &::windows::runtime::Interface::cast::<super::super::super::Foundation::IClosable>(self)?;
155         unsafe { (::windows::runtime::Interface::vtable(this).6)(::std::mem::transmute_copy(this)).ok() }
156     }
157 }
158 unsafe impl ::windows::runtime::RuntimeType for IDirect3DDevice {
159     const SIGNATURE: ::windows::runtime::ConstBuffer = ::windows::runtime::ConstBuffer::from_slice(b"{a37624ab-8d5f-4650-9d3e-9eae3d9bc670}");
160 }
161 impl ::std::convert::From<IDirect3DDevice> for ::windows::runtime::IUnknown {
from(value: IDirect3DDevice) -> Self162     fn from(value: IDirect3DDevice) -> Self {
163         unsafe { ::std::mem::transmute(value) }
164     }
165 }
166 impl ::std::convert::From<&IDirect3DDevice> for ::windows::runtime::IUnknown {
from(value: &IDirect3DDevice) -> Self167     fn from(value: &IDirect3DDevice) -> Self {
168         ::std::convert::From::from(::std::clone::Clone::clone(value))
169     }
170 }
171 impl<'a> ::windows::runtime::IntoParam<'a, ::windows::runtime::IUnknown> for IDirect3DDevice {
into_param(self) -> ::windows::runtime::Param<'a, ::windows::runtime::IUnknown>172     fn into_param(self) -> ::windows::runtime::Param<'a, ::windows::runtime::IUnknown> {
173         ::windows::runtime::Param::Owned(::std::convert::Into::<::windows::runtime::IUnknown>::into(self))
174     }
175 }
176 impl<'a> ::windows::runtime::IntoParam<'a, ::windows::runtime::IUnknown> for &IDirect3DDevice {
into_param(self) -> ::windows::runtime::Param<'a, ::windows::runtime::IUnknown>177     fn into_param(self) -> ::windows::runtime::Param<'a, ::windows::runtime::IUnknown> {
178         ::windows::runtime::Param::Owned(::std::convert::Into::<::windows::runtime::IUnknown>::into(::std::clone::Clone::clone(self)))
179     }
180 }
181 impl ::std::convert::From<IDirect3DDevice> for ::windows::runtime::IInspectable {
from(value: IDirect3DDevice) -> Self182     fn from(value: IDirect3DDevice) -> Self {
183         value.0
184     }
185 }
186 impl ::std::convert::From<&IDirect3DDevice> for ::windows::runtime::IInspectable {
from(value: &IDirect3DDevice) -> Self187     fn from(value: &IDirect3DDevice) -> Self {
188         value.0.clone()
189     }
190 }
191 impl<'a> ::windows::runtime::IntoParam<'a, ::windows::runtime::IInspectable> for IDirect3DDevice {
into_param(self) -> ::windows::runtime::Param<'a, ::windows::runtime::IInspectable>192     fn into_param(self) -> ::windows::runtime::Param<'a, ::windows::runtime::IInspectable> {
193         ::windows::runtime::Param::Owned(self.0)
194     }
195 }
196 impl<'a> ::windows::runtime::IntoParam<'a, ::windows::runtime::IInspectable> for &'a IDirect3DDevice {
into_param(self) -> ::windows::runtime::Param<'a, ::windows::runtime::IInspectable>197     fn into_param(self) -> ::windows::runtime::Param<'a, ::windows::runtime::IInspectable> {
198         ::windows::runtime::Param::Borrowed(&self.0)
199     }
200 }
201 #[cfg(feature = "Foundation")]
202 impl ::std::convert::TryFrom<IDirect3DDevice> for super::super::super::Foundation::IClosable {
203     type Error = ::windows::runtime::Error;
try_from(value: IDirect3DDevice) -> ::windows::runtime::Result<Self>204     fn try_from(value: IDirect3DDevice) -> ::windows::runtime::Result<Self> {
205         ::std::convert::TryFrom::try_from(&value)
206     }
207 }
208 #[cfg(feature = "Foundation")]
209 impl ::std::convert::TryFrom<&IDirect3DDevice> for super::super::super::Foundation::IClosable {
210     type Error = ::windows::runtime::Error;
try_from(value: &IDirect3DDevice) -> ::windows::runtime::Result<Self>211     fn try_from(value: &IDirect3DDevice) -> ::windows::runtime::Result<Self> {
212         ::windows::runtime::Interface::cast(value)
213     }
214 }
215 #[cfg(feature = "Foundation")]
216 impl<'a> ::windows::runtime::IntoParam<'a, super::super::super::Foundation::IClosable> for IDirect3DDevice {
into_param(self) -> ::windows::runtime::Param<'a, super::super::super::Foundation::IClosable>217     fn into_param(self) -> ::windows::runtime::Param<'a, super::super::super::Foundation::IClosable> {
218         ::windows::runtime::IntoParam::into_param(&self)
219     }
220 }
221 #[cfg(feature = "Foundation")]
222 impl<'a> ::windows::runtime::IntoParam<'a, super::super::super::Foundation::IClosable> for &IDirect3DDevice {
into_param(self) -> ::windows::runtime::Param<'a, super::super::super::Foundation::IClosable>223     fn into_param(self) -> ::windows::runtime::Param<'a, super::super::super::Foundation::IClosable> {
224         ::std::convert::TryInto::<super::super::super::Foundation::IClosable>::try_into(self).map(::windows::runtime::Param::Owned).unwrap_or(::windows::runtime::Param::None)
225     }
226 }
227 #[repr(C)]
228 #[doc(hidden)]
229 pub struct IDirect3DDevice_abi(
230     pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr, iid: &::windows::runtime::GUID, interface: *mut ::windows::runtime::RawPtr) -> ::windows::runtime::HRESULT,
231     pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr) -> u32,
232     pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr) -> u32,
233     pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr, count: *mut u32, values: *mut *mut ::windows::runtime::GUID) -> ::windows::runtime::HRESULT,
234     pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr, value: *mut ::windows::runtime::RawPtr) -> ::windows::runtime::HRESULT,
235     pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr, value: *mut i32) -> ::windows::runtime::HRESULT,
236     pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr) -> ::windows::runtime::HRESULT,
237 );
238 #[repr(transparent)]
239 #[derive(:: std :: cmp :: PartialEq, :: std :: cmp :: Eq, :: std :: clone :: Clone, :: std :: fmt :: Debug)]
240 pub struct IDirect3DSurface(::windows::runtime::IInspectable);
241 unsafe impl ::windows::runtime::Interface for IDirect3DSurface {
242     type Vtable = IDirect3DSurface_abi;
243     const IID: ::windows::runtime::GUID = ::windows::runtime::GUID::from_values(200581446, 5057, 18068, [190, 227, 122, 191, 21, 234, 245, 134]);
244 }
245 impl IDirect3DSurface {
Description(&self) -> ::windows::runtime::Result<Direct3DSurfaceDescription>246     pub fn Description(&self) -> ::windows::runtime::Result<Direct3DSurfaceDescription> {
247         let this = self;
248         unsafe {
249             let mut result__: Direct3DSurfaceDescription = ::std::mem::zeroed();
250             (::windows::runtime::Interface::vtable(this).6)(::std::mem::transmute_copy(this), &mut result__).from_abi::<Direct3DSurfaceDescription>(result__)
251         }
252     }
253     #[cfg(feature = "Foundation")]
Close(&self) -> ::windows::runtime::Result<()>254     pub fn Close(&self) -> ::windows::runtime::Result<()> {
255         let this = &::windows::runtime::Interface::cast::<super::super::super::Foundation::IClosable>(self)?;
256         unsafe { (::windows::runtime::Interface::vtable(this).6)(::std::mem::transmute_copy(this)).ok() }
257     }
258 }
259 unsafe impl ::windows::runtime::RuntimeType for IDirect3DSurface {
260     const SIGNATURE: ::windows::runtime::ConstBuffer = ::windows::runtime::ConstBuffer::from_slice(b"{0bf4a146-13c1-4694-bee3-7abf15eaf586}");
261 }
262 impl ::std::convert::From<IDirect3DSurface> for ::windows::runtime::IUnknown {
from(value: IDirect3DSurface) -> Self263     fn from(value: IDirect3DSurface) -> Self {
264         unsafe { ::std::mem::transmute(value) }
265     }
266 }
267 impl ::std::convert::From<&IDirect3DSurface> for ::windows::runtime::IUnknown {
from(value: &IDirect3DSurface) -> Self268     fn from(value: &IDirect3DSurface) -> Self {
269         ::std::convert::From::from(::std::clone::Clone::clone(value))
270     }
271 }
272 impl<'a> ::windows::runtime::IntoParam<'a, ::windows::runtime::IUnknown> for IDirect3DSurface {
into_param(self) -> ::windows::runtime::Param<'a, ::windows::runtime::IUnknown>273     fn into_param(self) -> ::windows::runtime::Param<'a, ::windows::runtime::IUnknown> {
274         ::windows::runtime::Param::Owned(::std::convert::Into::<::windows::runtime::IUnknown>::into(self))
275     }
276 }
277 impl<'a> ::windows::runtime::IntoParam<'a, ::windows::runtime::IUnknown> for &IDirect3DSurface {
into_param(self) -> ::windows::runtime::Param<'a, ::windows::runtime::IUnknown>278     fn into_param(self) -> ::windows::runtime::Param<'a, ::windows::runtime::IUnknown> {
279         ::windows::runtime::Param::Owned(::std::convert::Into::<::windows::runtime::IUnknown>::into(::std::clone::Clone::clone(self)))
280     }
281 }
282 impl ::std::convert::From<IDirect3DSurface> for ::windows::runtime::IInspectable {
from(value: IDirect3DSurface) -> Self283     fn from(value: IDirect3DSurface) -> Self {
284         value.0
285     }
286 }
287 impl ::std::convert::From<&IDirect3DSurface> for ::windows::runtime::IInspectable {
from(value: &IDirect3DSurface) -> Self288     fn from(value: &IDirect3DSurface) -> Self {
289         value.0.clone()
290     }
291 }
292 impl<'a> ::windows::runtime::IntoParam<'a, ::windows::runtime::IInspectable> for IDirect3DSurface {
into_param(self) -> ::windows::runtime::Param<'a, ::windows::runtime::IInspectable>293     fn into_param(self) -> ::windows::runtime::Param<'a, ::windows::runtime::IInspectable> {
294         ::windows::runtime::Param::Owned(self.0)
295     }
296 }
297 impl<'a> ::windows::runtime::IntoParam<'a, ::windows::runtime::IInspectable> for &'a IDirect3DSurface {
into_param(self) -> ::windows::runtime::Param<'a, ::windows::runtime::IInspectable>298     fn into_param(self) -> ::windows::runtime::Param<'a, ::windows::runtime::IInspectable> {
299         ::windows::runtime::Param::Borrowed(&self.0)
300     }
301 }
302 #[cfg(feature = "Foundation")]
303 impl ::std::convert::TryFrom<IDirect3DSurface> for super::super::super::Foundation::IClosable {
304     type Error = ::windows::runtime::Error;
try_from(value: IDirect3DSurface) -> ::windows::runtime::Result<Self>305     fn try_from(value: IDirect3DSurface) -> ::windows::runtime::Result<Self> {
306         ::std::convert::TryFrom::try_from(&value)
307     }
308 }
309 #[cfg(feature = "Foundation")]
310 impl ::std::convert::TryFrom<&IDirect3DSurface> for super::super::super::Foundation::IClosable {
311     type Error = ::windows::runtime::Error;
try_from(value: &IDirect3DSurface) -> ::windows::runtime::Result<Self>312     fn try_from(value: &IDirect3DSurface) -> ::windows::runtime::Result<Self> {
313         ::windows::runtime::Interface::cast(value)
314     }
315 }
316 #[cfg(feature = "Foundation")]
317 impl<'a> ::windows::runtime::IntoParam<'a, super::super::super::Foundation::IClosable> for IDirect3DSurface {
into_param(self) -> ::windows::runtime::Param<'a, super::super::super::Foundation::IClosable>318     fn into_param(self) -> ::windows::runtime::Param<'a, super::super::super::Foundation::IClosable> {
319         ::windows::runtime::IntoParam::into_param(&self)
320     }
321 }
322 #[cfg(feature = "Foundation")]
323 impl<'a> ::windows::runtime::IntoParam<'a, super::super::super::Foundation::IClosable> for &IDirect3DSurface {
into_param(self) -> ::windows::runtime::Param<'a, super::super::super::Foundation::IClosable>324     fn into_param(self) -> ::windows::runtime::Param<'a, super::super::super::Foundation::IClosable> {
325         ::std::convert::TryInto::<super::super::super::Foundation::IClosable>::try_into(self).map(::windows::runtime::Param::Owned).unwrap_or(::windows::runtime::Param::None)
326     }
327 }
328 #[repr(C)]
329 #[doc(hidden)]
330 pub struct IDirect3DSurface_abi(
331     pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr, iid: &::windows::runtime::GUID, interface: *mut ::windows::runtime::RawPtr) -> ::windows::runtime::HRESULT,
332     pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr) -> u32,
333     pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr) -> u32,
334     pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr, count: *mut u32, values: *mut *mut ::windows::runtime::GUID) -> ::windows::runtime::HRESULT,
335     pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr, value: *mut ::windows::runtime::RawPtr) -> ::windows::runtime::HRESULT,
336     pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr, value: *mut i32) -> ::windows::runtime::HRESULT,
337     pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr, result__: *mut Direct3DSurfaceDescription) -> ::windows::runtime::HRESULT,
338 );
339