Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
4 changes: 2 additions & 2 deletions crates/libs/bindgen/src/types/cpp_fn.rs
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ impl CppFn {
pub unsafe fn #name<#generics T>(#params) -> #result Result<T> #where_clause {
#link
let mut result__ = core::ptr::null_mut();
unsafe { #name(#args).and_then(||windows_core::Type::from_abi(result__)) }
unsafe { #name(#args).and_then(||windows_core::imp::Type::from_abi(result__)) }
}
}
}
Expand Down Expand Up @@ -203,7 +203,7 @@ impl CppFn {
unsafe {
let mut result__ = core::mem::zeroed();
#name(#args);
windows_core::Type::from_abi(result__)
windows_core::imp::Type::from_abi(result__)
}
}
}
Expand Down
4 changes: 2 additions & 2 deletions crates/libs/bindgen/src/types/cpp_method.rs
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,7 @@ impl CppMethod {
quote! {
pub unsafe fn #name<#generics T>(&self, #params) -> #result Result<T> #where_clause {
let mut result__ = core::ptr::null_mut();
unsafe { (windows_core::Interface::vtable(self).#vname)(windows_core::Interface::as_raw(self),#args).and_then(||windows_core::Type::from_abi(result__)) }
unsafe { (windows_core::Interface::vtable(self).#vname)(windows_core::Interface::as_raw(self),#args).and_then(||windows_core::imp::Type::from_abi(result__)) }
}
}
}
Expand Down Expand Up @@ -321,7 +321,7 @@ impl CppMethod {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).#vname)(windows_core::Interface::as_raw(self), #args);
windows_core::Type::from_abi(result__)
windows_core::imp::Type::from_abi(result__)
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion crates/libs/bindgen/src/types/method.rs
Original file line number Diff line number Diff line change
Expand Up @@ -622,7 +622,7 @@ impl Method {
// Keep `derived__` alive until the factory returns; its owning
// ref is replaced by the delegating ref in `result__`.
let _ = &derived__;
windows_core::Type::from_abi(result__)
windows_core::imp::Type::from_abi(result__)
})
}
}
Expand Down
4 changes: 2 additions & 2 deletions crates/libs/bindgen/src/types/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -493,7 +493,7 @@ impl Type {
let tokens = self.write_name(config);

if matches!(self, Self::Generic(_)) {
quote! { <#tokens as windows_core::Type<#tokens>>::Default }
quote! { <#tokens as windows_core::imp::Type<#tokens>>::Default }
} else if self.is_interface() {
quote! { Option<#tokens> }
} else {
Expand Down Expand Up @@ -915,7 +915,7 @@ impl Type {
if self.is_copyable(reader) {
quote! { map(|| result__) }
} else if self.is_convertible() {
quote! { and_then(||windows_core::Type::from_abi(result__)) }
quote! { and_then(||windows_core::imp::Type::from_abi(result__)) }
} else {
quote! { map(|| core::mem::transmute(result__)) }
}
Expand Down
62 changes: 31 additions & 31 deletions crates/libs/collections/src/bindings.rs
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ impl<T: windows_core::RuntimeType + 'static> IIterable<T> {
windows_core::Interface::as_raw(self),
&mut result__,
)
.and_then(|| windows_core::Type::from_abi(result__))
.and_then(|| windows_core::imp::Type::from_abi(result__))
}
}
}
Expand Down Expand Up @@ -154,7 +154,7 @@ impl<T: windows_core::RuntimeType + 'static> IIterator<T> {
windows_core::Interface::as_raw(self),
&mut result__,
)
.and_then(|| windows_core::Type::from_abi(result__))
.and_then(|| windows_core::imp::Type::from_abi(result__))
}
}
pub fn HasCurrent(&self) -> windows_core::Result<bool> {
Expand All @@ -179,7 +179,7 @@ impl<T: windows_core::RuntimeType + 'static> IIterator<T> {
}
pub fn GetMany(
&self,
items: &mut [<T as windows_core::Type<T>>::Default],
items: &mut [<T as windows_core::imp::Type<T>>::Default],
) -> windows_core::Result<u32> {
unsafe {
let mut result__ = core::mem::zeroed();
Expand All @@ -205,7 +205,7 @@ where
fn MoveNext(&self) -> windows_core::Result<bool>;
fn GetMany(
&self,
items: &mut [<T as windows_core::Type<T>>::Default],
items: &mut [<T as windows_core::imp::Type<T>>::Default],
) -> windows_core::Result<u32>;
}
impl<T: windows_core::RuntimeType + 'static> IIterator_Vtbl<T> {
Expand Down Expand Up @@ -395,7 +395,7 @@ impl<K: windows_core::RuntimeType + 'static, V: windows_core::RuntimeType + 'sta
windows_core::Interface::as_raw(self),
&mut result__,
)
.and_then(|| windows_core::Type::from_abi(result__))
.and_then(|| windows_core::imp::Type::from_abi(result__))
}
}
pub fn Value(&self) -> windows_core::Result<V> {
Expand All @@ -405,7 +405,7 @@ impl<K: windows_core::RuntimeType + 'static, V: windows_core::RuntimeType + 'sta
windows_core::Interface::as_raw(self),
&mut result__,
)
.and_then(|| windows_core::Type::from_abi(result__))
.and_then(|| windows_core::imp::Type::from_abi(result__))
}
}
}
Expand Down Expand Up @@ -554,7 +554,7 @@ impl<K: windows_core::RuntimeType + 'static, V: windows_core::RuntimeType + 'sta
key.param().abi(),
&mut result__,
)
.and_then(|| windows_core::Type::from_abi(result__))
.and_then(|| windows_core::imp::Type::from_abi(result__))
}
}
pub fn Size(&self) -> windows_core::Result<u32> {
Expand Down Expand Up @@ -588,7 +588,7 @@ impl<K: windows_core::RuntimeType + 'static, V: windows_core::RuntimeType + 'sta
windows_core::Interface::as_raw(self),
&mut result__,
)
.and_then(|| windows_core::Type::from_abi(result__))
.and_then(|| windows_core::imp::Type::from_abi(result__))
}
}
pub fn Insert<P0, P1>(&self, key: P0, value: P1) -> windows_core::Result<bool>
Expand Down Expand Up @@ -633,7 +633,7 @@ impl<K: windows_core::RuntimeType + 'static, V: windows_core::RuntimeType + 'sta
windows_core::Interface::as_raw(this),
&mut result__,
)
.and_then(|| windows_core::Type::from_abi(result__))
.and_then(|| windows_core::imp::Type::from_abi(result__))
}
}
}
Expand Down Expand Up @@ -924,7 +924,7 @@ impl<K: windows_core::RuntimeType + 'static> IMapChangedEventArgs<K> {
windows_core::Interface::as_raw(self),
&mut result__,
)
.and_then(|| windows_core::Type::from_abi(result__))
.and_then(|| windows_core::imp::Type::from_abi(result__))
}
}
}
Expand Down Expand Up @@ -1065,7 +1065,7 @@ impl<K: windows_core::RuntimeType + 'static, V: windows_core::RuntimeType + 'sta
key.param().abi(),
&mut result__,
)
.and_then(|| windows_core::Type::from_abi(result__))
.and_then(|| windows_core::imp::Type::from_abi(result__))
}
}
pub fn Size(&self) -> windows_core::Result<u32> {
Expand Down Expand Up @@ -1114,7 +1114,7 @@ impl<K: windows_core::RuntimeType + 'static, V: windows_core::RuntimeType + 'sta
windows_core::Interface::as_raw(this),
&mut result__,
)
.and_then(|| windows_core::Type::from_abi(result__))
.and_then(|| windows_core::imp::Type::from_abi(result__))
}
}
}
Expand Down Expand Up @@ -1367,7 +1367,7 @@ impl<K: windows_core::RuntimeType + 'static, V: windows_core::RuntimeType + 'sta
windows_core::Interface::as_raw(this),
&mut result__,
)
.and_then(|| windows_core::Type::from_abi(result__))
.and_then(|| windows_core::imp::Type::from_abi(result__))
}
}
pub fn Lookup<P0>(&self, key: P0) -> windows_core::Result<V>
Expand All @@ -1382,7 +1382,7 @@ impl<K: windows_core::RuntimeType + 'static, V: windows_core::RuntimeType + 'sta
key.param().abi(),
&mut result__,
)
.and_then(|| windows_core::Type::from_abi(result__))
.and_then(|| windows_core::imp::Type::from_abi(result__))
}
}
pub fn Size(&self) -> windows_core::Result<u32> {
Expand Down Expand Up @@ -1419,7 +1419,7 @@ impl<K: windows_core::RuntimeType + 'static, V: windows_core::RuntimeType + 'sta
windows_core::Interface::as_raw(this),
&mut result__,
)
.and_then(|| windows_core::Type::from_abi(result__))
.and_then(|| windows_core::imp::Type::from_abi(result__))
}
}
pub fn Insert<P0, P1>(&self, key: P0, value: P1) -> windows_core::Result<bool>
Expand Down Expand Up @@ -1635,7 +1635,7 @@ impl<T: windows_core::RuntimeType + 'static> IObservableVector<T> {
windows_core::Interface::as_raw(this),
&mut result__,
)
.and_then(|| windows_core::Type::from_abi(result__))
.and_then(|| windows_core::imp::Type::from_abi(result__))
}
}
pub fn GetAt(&self, index: u32) -> windows_core::Result<T> {
Expand All @@ -1647,7 +1647,7 @@ impl<T: windows_core::RuntimeType + 'static> IObservableVector<T> {
index,
&mut result__,
)
.and_then(|| windows_core::Type::from_abi(result__))
.and_then(|| windows_core::imp::Type::from_abi(result__))
}
}
pub fn Size(&self) -> windows_core::Result<u32> {
Expand All @@ -1669,7 +1669,7 @@ impl<T: windows_core::RuntimeType + 'static> IObservableVector<T> {
windows_core::Interface::as_raw(this),
&mut result__,
)
.and_then(|| windows_core::Type::from_abi(result__))
.and_then(|| windows_core::imp::Type::from_abi(result__))
}
}
pub fn IndexOf<P0>(&self, value: P0, index: &mut u32) -> windows_core::Result<bool>
Expand Down Expand Up @@ -1758,7 +1758,7 @@ impl<T: windows_core::RuntimeType + 'static> IObservableVector<T> {
pub fn GetMany(
&self,
startindex: u32,
items: &mut [<T as windows_core::Type<T>>::Default],
items: &mut [<T as windows_core::imp::Type<T>>::Default],
) -> windows_core::Result<u32> {
let this = &windows_core::Interface::cast::<IVector<T>>(self)?;
unsafe {
Expand All @@ -1775,7 +1775,7 @@ impl<T: windows_core::RuntimeType + 'static> IObservableVector<T> {
}
pub fn ReplaceAll(
&self,
items: &[<T as windows_core::Type<T>>::Default],
items: &[<T as windows_core::imp::Type<T>>::Default],
) -> windows_core::Result<()> {
let this = &windows_core::Interface::cast::<IVector<T>>(self)?;
unsafe {
Expand Down Expand Up @@ -1920,7 +1920,7 @@ impl<T: windows_core::RuntimeType + 'static> IVector<T> {
index,
&mut result__,
)
.and_then(|| windows_core::Type::from_abi(result__))
.and_then(|| windows_core::imp::Type::from_abi(result__))
}
}
pub fn Size(&self) -> windows_core::Result<u32> {
Expand All @@ -1940,7 +1940,7 @@ impl<T: windows_core::RuntimeType + 'static> IVector<T> {
windows_core::Interface::as_raw(self),
&mut result__,
)
.and_then(|| windows_core::Type::from_abi(result__))
.and_then(|| windows_core::imp::Type::from_abi(result__))
}
}
pub fn IndexOf<P0>(&self, value: P0, index: &mut u32) -> windows_core::Result<bool>
Expand Down Expand Up @@ -2022,7 +2022,7 @@ impl<T: windows_core::RuntimeType + 'static> IVector<T> {
pub fn GetMany(
&self,
startindex: u32,
items: &mut [<T as windows_core::Type<T>>::Default],
items: &mut [<T as windows_core::imp::Type<T>>::Default],
) -> windows_core::Result<u32> {
unsafe {
let mut result__ = core::mem::zeroed();
Expand All @@ -2038,7 +2038,7 @@ impl<T: windows_core::RuntimeType + 'static> IVector<T> {
}
pub fn ReplaceAll(
&self,
items: &[<T as windows_core::Type<T>>::Default],
items: &[<T as windows_core::imp::Type<T>>::Default],
) -> windows_core::Result<()> {
unsafe {
(windows_core::Interface::vtable(self).ReplaceAll)(
Expand All @@ -2057,7 +2057,7 @@ impl<T: windows_core::RuntimeType + 'static> IVector<T> {
windows_core::Interface::as_raw(this),
&mut result__,
)
.and_then(|| windows_core::Type::from_abi(result__))
.and_then(|| windows_core::imp::Type::from_abi(result__))
}
}
}
Expand Down Expand Up @@ -2095,11 +2095,11 @@ where
fn GetMany(
&self,
startIndex: u32,
items: &mut [<T as windows_core::Type<T>>::Default],
items: &mut [<T as windows_core::imp::Type<T>>::Default],
) -> windows_core::Result<u32>;
fn ReplaceAll(
&self,
items: &[<T as windows_core::Type<T>>::Default],
items: &[<T as windows_core::imp::Type<T>>::Default],
) -> windows_core::Result<()>;
}
impl<T: windows_core::RuntimeType + 'static> IVector_Vtbl<T> {
Expand Down Expand Up @@ -2547,7 +2547,7 @@ impl<T: windows_core::RuntimeType + 'static> IVectorView<T> {
index,
&mut result__,
)
.and_then(|| windows_core::Type::from_abi(result__))
.and_then(|| windows_core::imp::Type::from_abi(result__))
}
}
pub fn Size(&self) -> windows_core::Result<u32> {
Expand Down Expand Up @@ -2578,7 +2578,7 @@ impl<T: windows_core::RuntimeType + 'static> IVectorView<T> {
pub fn GetMany(
&self,
startindex: u32,
items: &mut [<T as windows_core::Type<T>>::Default],
items: &mut [<T as windows_core::imp::Type<T>>::Default],
) -> windows_core::Result<u32> {
unsafe {
let mut result__ = core::mem::zeroed();
Expand All @@ -2600,7 +2600,7 @@ impl<T: windows_core::RuntimeType + 'static> IVectorView<T> {
windows_core::Interface::as_raw(this),
&mut result__,
)
.and_then(|| windows_core::Type::from_abi(result__))
.and_then(|| windows_core::imp::Type::from_abi(result__))
}
}
}
Expand Down Expand Up @@ -2631,7 +2631,7 @@ where
fn GetMany(
&self,
startIndex: u32,
items: &mut [<T as windows_core::Type<T>>::Default],
items: &mut [<T as windows_core::imp::Type<T>>::Default],
) -> windows_core::Result<u32>;
}
impl<T: windows_core::RuntimeType + 'static> IVectorView_Vtbl<T> {
Expand Down
8 changes: 4 additions & 4 deletions crates/libs/core/src/imp/com_bindings.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ where
unsafe {
let mut result__ = core::mem::zeroed();
RoGetAgileReference(options, riid, punk.param().abi(), &mut result__)
.and_then(|| windows_core::Type::from_abi(result__))
.and_then(|| windows_core::imp::Type::from_abi(result__))
}
}
pub const AGILEREFERENCE_DEFAULT: AgileReferenceOptions = AgileReferenceOptions(0i32);
Expand Down Expand Up @@ -63,7 +63,7 @@ impl IAgileReference {
&T::IID,
&mut result__,
)
.and_then(|| windows_core::Type::from_abi(result__))
.and_then(|| windows_core::imp::Type::from_abi(result__))
}
}
}
Expand Down Expand Up @@ -130,7 +130,7 @@ impl IWeakReference {
&T::IID,
&mut result__,
)
.and_then(|| windows_core::Type::from_abi(result__))
.and_then(|| windows_core::imp::Type::from_abi(result__))
}
}
}
Expand Down Expand Up @@ -193,7 +193,7 @@ impl IWeakReferenceSource {
windows_core::Interface::as_raw(self),
&mut result__,
)
.and_then(|| windows_core::Type::from_abi(result__))
.and_then(|| windows_core::imp::Type::from_abi(result__))
}
}
}
Expand Down
3 changes: 3 additions & 0 deletions crates/libs/core/src/imp/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -118,5 +118,8 @@ macro_rules! define_interface {
#[doc(hidden)]
pub use define_interface;

#[doc(hidden)]
pub use crate::r#type::Type;

#[doc(hidden)]
pub use alloc::boxed::Box;
3 changes: 2 additions & 1 deletion crates/libs/core/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,8 @@ pub use out_param::*;
pub use out_ref::*;
pub use param::*;
pub use param_value::*;
pub use r#type::*;
pub(crate) use r#type::Type;
pub use r#type::{ref_as_default, AbiType, CloneType, CopyType, InterfaceType, Ref, TypeKind};
pub use runtime_name::*;
pub use runtime_type::*;
pub use scoped_interface::*;
Expand Down
Loading
Loading