Skip to content

Commit

Permalink
yet more bindings updates
Browse files Browse the repository at this point in the history
  • Loading branch information
Arlie Davis committed May 18, 2024
1 parent e18384f commit 3be5345
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 35 deletions.
40 changes: 20 additions & 20 deletions crates/tests/riddle/src/generic_interfaces.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@
pub struct IIterable<T>(windows_core::IUnknown, core::marker::PhantomData<T>)
where
T: windows_core::RuntimeType + 'static;
impl<T: windows_core::RuntimeType + 'static> std::ops::Deref for IIterable<T> {
impl<T: windows_core::RuntimeType + 'static> core::ops::Deref for IIterable<T> {
type Target = windows_core::IInspectable;
fn deref(&self) -> &Self::Target {
unsafe { std::mem::transmute(self) }
unsafe { core::mem::transmute(self) }
}
}
impl<T: windows_core::RuntimeType + 'static> windows_core::imp::CanInto<windows_core::IUnknown>
Expand All @@ -28,7 +28,7 @@ impl<T: windows_core::RuntimeType + 'static> IIterable<T> {
pub fn First(&self) -> windows_core::Result<IIterator<T>> {
let this = self;
unsafe {
let mut result__ = std::mem::zeroed();
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).First)(
windows_core::Interface::as_raw(this),
&mut result__,
Expand Down Expand Up @@ -69,10 +69,10 @@ where
pub struct IIterator<T>(windows_core::IUnknown, core::marker::PhantomData<T>)
where
T: windows_core::RuntimeType + 'static;
impl<T: windows_core::RuntimeType + 'static> std::ops::Deref for IIterator<T> {
impl<T: windows_core::RuntimeType + 'static> core::ops::Deref for IIterator<T> {
type Target = windows_core::IInspectable;
fn deref(&self) -> &Self::Target {
unsafe { std::mem::transmute(self) }
unsafe { core::mem::transmute(self) }
}
}
impl<T: windows_core::RuntimeType + 'static> windows_core::imp::CanInto<windows_core::IUnknown>
Expand All @@ -87,7 +87,7 @@ impl<T: windows_core::RuntimeType + 'static> IIterator<T> {
pub fn get_Current(&self) -> windows_core::Result<T> {
let this = self;
unsafe {
let mut result__ = std::mem::zeroed();
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).get_Current)(
windows_core::Interface::as_raw(this),
&mut result__,
Expand All @@ -98,7 +98,7 @@ impl<T: windows_core::RuntimeType + 'static> IIterator<T> {
pub fn get_HasCurrent(&self) -> windows_core::Result<bool> {
let this = self;
unsafe {
let mut result__ = std::mem::zeroed();
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).get_HasCurrent)(
windows_core::Interface::as_raw(this),
&mut result__,
Expand All @@ -109,7 +109,7 @@ impl<T: windows_core::RuntimeType + 'static> IIterator<T> {
pub fn MoveNext(&self) -> windows_core::Result<bool> {
let this = self;
unsafe {
let mut result__ = std::mem::zeroed();
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).MoveNext)(
windows_core::Interface::as_raw(this),
&mut result__,
Expand Down Expand Up @@ -159,12 +159,12 @@ pub struct IKeyValuePair<K, V>(
where
K: windows_core::RuntimeType + 'static,
V: windows_core::RuntimeType + 'static;
impl<K: windows_core::RuntimeType + 'static, V: windows_core::RuntimeType + 'static> std::ops::Deref
for IKeyValuePair<K, V>
impl<K: windows_core::RuntimeType + 'static, V: windows_core::RuntimeType + 'static>
core::ops::Deref for IKeyValuePair<K, V>
{
type Target = windows_core::IInspectable;
fn deref(&self) -> &Self::Target {
unsafe { std::mem::transmute(self) }
unsafe { core::mem::transmute(self) }
}
}
impl<K: windows_core::RuntimeType + 'static, V: windows_core::RuntimeType + 'static>
Expand All @@ -181,7 +181,7 @@ impl<K: windows_core::RuntimeType + 'static, V: windows_core::RuntimeType + 'sta
pub fn get_Key(&self) -> windows_core::Result<K> {
let this = self;
unsafe {
let mut result__ = std::mem::zeroed();
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).get_Key)(
windows_core::Interface::as_raw(this),
&mut result__,
Expand All @@ -192,7 +192,7 @@ impl<K: windows_core::RuntimeType + 'static, V: windows_core::RuntimeType + 'sta
pub fn get_Value(&self) -> windows_core::Result<V> {
let this = self;
unsafe {
let mut result__ = std::mem::zeroed();
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).get_Value)(
windows_core::Interface::as_raw(this),
&mut result__,
Expand Down Expand Up @@ -250,12 +250,12 @@ pub struct IMapView<K, V>(
where
K: windows_core::RuntimeType + 'static,
V: windows_core::RuntimeType + 'static;
impl<K: windows_core::RuntimeType + 'static, V: windows_core::RuntimeType + 'static> std::ops::Deref
for IMapView<K, V>
impl<K: windows_core::RuntimeType + 'static, V: windows_core::RuntimeType + 'static>
core::ops::Deref for IMapView<K, V>
{
type Target = windows_core::IInspectable;
fn deref(&self) -> &Self::Target {
unsafe { std::mem::transmute(self) }
unsafe { core::mem::transmute(self) }
}
}
impl<K: windows_core::RuntimeType + 'static, V: windows_core::RuntimeType + 'static>
Expand Down Expand Up @@ -283,7 +283,7 @@ impl<K: windows_core::RuntimeType + 'static, V: windows_core::RuntimeType + 'sta
{
let this = self;
unsafe {
let mut result__ = std::mem::zeroed();
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).Lookup)(
windows_core::Interface::as_raw(this),
key as *mut _ as _,
Expand All @@ -295,7 +295,7 @@ impl<K: windows_core::RuntimeType + 'static, V: windows_core::RuntimeType + 'sta
pub fn get_Size(&self) -> windows_core::Result<u32> {
let this = self;
unsafe {
let mut result__ = std::mem::zeroed();
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).get_Size)(
windows_core::Interface::as_raw(this),
&mut result__,
Expand All @@ -312,7 +312,7 @@ impl<K: windows_core::RuntimeType + 'static, V: windows_core::RuntimeType + 'sta
{
let this = self;
unsafe {
let mut result__ = std::mem::zeroed();
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).HasKey)(
windows_core::Interface::as_raw(this),
key as *mut _ as _,
Expand All @@ -324,7 +324,7 @@ impl<K: windows_core::RuntimeType + 'static, V: windows_core::RuntimeType + 'sta
pub fn First(&self) -> windows_core::Result<IIterator<IKeyValuePair<K, V>>> {
let this = &windows_core::Interface::cast::<IIterable<IKeyValuePair<K, V>>>(self)?;
unsafe {
let mut result__ = std::mem::zeroed();
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).First)(
windows_core::Interface::as_raw(this),
&mut result__,
Expand Down
30 changes: 15 additions & 15 deletions crates/tests/riddle/src/params.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@
clippy::all
)]
windows_core::imp::define_interface!(IParams, IParams_Vtbl, 0);
impl std::ops::Deref for IParams {
impl core::ops::Deref for IParams {
type Target = windows_core::IInspectable;
fn deref(&self) -> &Self::Target {
unsafe { std::mem::transmute(self) }
unsafe { core::mem::transmute(self) }
}
}
windows_core::imp::interface_hierarchy!(
Expand All @@ -28,7 +28,7 @@ impl IParams {
pub fn Bool(&self, a: &mut bool, b: &mut bool) -> windows_core::Result<bool> {
let this = self;
unsafe {
let mut result__ = std::mem::zeroed();
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).Bool)(
windows_core::Interface::as_raw(this),
a,
Expand All @@ -41,7 +41,7 @@ impl IParams {
pub fn I8(&self, a: &mut i8, b: &mut i8) -> windows_core::Result<i8> {
let this = self;
unsafe {
let mut result__ = std::mem::zeroed();
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).I8)(
windows_core::Interface::as_raw(this),
a,
Expand All @@ -54,7 +54,7 @@ impl IParams {
pub fn U8(&self, a: &mut u8, b: &mut u8) -> windows_core::Result<u8> {
let this = self;
unsafe {
let mut result__ = std::mem::zeroed();
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).U8)(
windows_core::Interface::as_raw(this),
a,
Expand All @@ -67,7 +67,7 @@ impl IParams {
pub fn I16(&self, a: &mut i16, b: &mut i16) -> windows_core::Result<i16> {
let this = self;
unsafe {
let mut result__ = std::mem::zeroed();
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).I16)(
windows_core::Interface::as_raw(this),
a,
Expand All @@ -80,7 +80,7 @@ impl IParams {
pub fn U16(&self, a: &mut u16, b: &mut u16) -> windows_core::Result<u16> {
let this = self;
unsafe {
let mut result__ = std::mem::zeroed();
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).U16)(
windows_core::Interface::as_raw(this),
a,
Expand All @@ -93,7 +93,7 @@ impl IParams {
pub fn I32(&self, a: &mut i32, b: &mut i32) -> windows_core::Result<i32> {
let this = self;
unsafe {
let mut result__ = std::mem::zeroed();
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).I32)(
windows_core::Interface::as_raw(this),
a,
Expand All @@ -106,7 +106,7 @@ impl IParams {
pub fn U32(&self, a: &mut u32, b: &mut u32) -> windows_core::Result<u32> {
let this = self;
unsafe {
let mut result__ = std::mem::zeroed();
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).U32)(
windows_core::Interface::as_raw(this),
a,
Expand All @@ -119,7 +119,7 @@ impl IParams {
pub fn I64(&self, a: &mut i64, b: &mut i64) -> windows_core::Result<i64> {
let this = self;
unsafe {
let mut result__ = std::mem::zeroed();
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).I64)(
windows_core::Interface::as_raw(this),
a,
Expand All @@ -132,7 +132,7 @@ impl IParams {
pub fn U64(&self, a: &mut u64, b: &mut u64) -> windows_core::Result<u64> {
let this = self;
unsafe {
let mut result__ = std::mem::zeroed();
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).U64)(
windows_core::Interface::as_raw(this),
a,
Expand All @@ -145,7 +145,7 @@ impl IParams {
pub fn F32(&self, a: &mut f32, b: &mut f32) -> windows_core::Result<f32> {
let this = self;
unsafe {
let mut result__ = std::mem::zeroed();
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).F32)(
windows_core::Interface::as_raw(this),
a,
Expand All @@ -158,7 +158,7 @@ impl IParams {
pub fn F64(&self, a: &mut f64, b: &mut f64) -> windows_core::Result<f64> {
let this = self;
unsafe {
let mut result__ = std::mem::zeroed();
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).F64)(
windows_core::Interface::as_raw(this),
a,
Expand All @@ -171,7 +171,7 @@ impl IParams {
pub fn ISize(&self, a: &mut isize, b: &mut isize) -> windows_core::Result<isize> {
let this = self;
unsafe {
let mut result__ = std::mem::zeroed();
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).ISize)(
windows_core::Interface::as_raw(this),
a,
Expand All @@ -184,7 +184,7 @@ impl IParams {
pub fn USize(&self, a: &mut usize, b: &mut usize) -> windows_core::Result<usize> {
let this = self;
unsafe {
let mut result__ = std::mem::zeroed();
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).USize)(
windows_core::Interface::as_raw(this),
a,
Expand Down

0 comments on commit 3be5345

Please sign in to comment.