Skip to content

Commit

Permalink
code gen
Browse files Browse the repository at this point in the history
  • Loading branch information
kennykerr committed Dec 14, 2023
1 parent b905279 commit 8af39f9
Show file tree
Hide file tree
Showing 58 changed files with 1,056 additions and 1,056 deletions.
6 changes: 3 additions & 3 deletions crates/libs/core/src/imp/com_bindings.rs
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ impl IAgileReference {
T: ::windows_core::ComInterface,
{
let mut result__ = ::std::ptr::null_mut();
(::windows_core::Interface::vtable(self).Resolve)(::windows_core::Interface::as_raw(self), &<T as ::windows_core::ComInterface>::IID, &mut result__).from_abi(result__)
(::windows_core::Interface::vtable(self).Resolve)(::windows_core::Interface::as_raw(self), &T::IID, &mut result__).from_abi(result__)
}
}
::windows_core::imp::interface_hierarchy!(IAgileReference, ::windows_core::IUnknown);
Expand Down Expand Up @@ -796,7 +796,7 @@ impl<T: ::windows_core::RuntimeType + 'static> ::windows_core::CanInto<::windows
impl<T: ::windows_core::RuntimeType + 'static> ::windows_core::CanInto<::windows_core::IInspectable> for IReference<T> {}
impl<T: ::windows_core::RuntimeType + 'static> ::windows_core::CanTryInto<IPropertyValue> for IReference<T> {}
impl<T: ::windows_core::RuntimeType + 'static> ::windows_core::RuntimeType for IReference<T> {
const SIGNATURE: ::windows_core::imp::ConstBuffer = { ::windows_core::imp::ConstBuffer::new().push_slice(b"pinterface(").push_slice(b"{61c17706-2d65-11e0-9ae8-d48564015472}").push_slice(b";").push_other(<T as ::windows_core::RuntimeType>::SIGNATURE).push_slice(b")") };
const SIGNATURE: ::windows_core::imp::ConstBuffer = { ::windows_core::imp::ConstBuffer::new().push_slice(b"pinterface(").push_slice(b"{61c17706-2d65-11e0-9ae8-d48564015472}").push_slice(b";").push_other(T::SIGNATURE).push_slice(b")") };
}
unsafe impl<T: ::windows_core::RuntimeType + 'static> ::windows_core::Interface for IReference<T> {
type Vtable = IReference_Vtbl<T>;
Expand Down Expand Up @@ -879,7 +879,7 @@ impl IWeakReference {
T: ::windows_core::ComInterface,
{
let mut result__ = ::std::ptr::null_mut();
(::windows_core::Interface::vtable(self).Resolve)(::windows_core::Interface::as_raw(self), &<T as ::windows_core::ComInterface>::IID, &mut result__).from_abi(result__)
(::windows_core::Interface::vtable(self).Resolve)(::windows_core::Interface::as_raw(self), &T::IID, &mut result__).from_abi(result__)
}
}
::windows_core::imp::interface_hierarchy!(IWeakReference, ::windows_core::IUnknown);
Expand Down
54 changes: 27 additions & 27 deletions crates/libs/windows/src/Windows/Foundation/Collections/impl.rs
Original file line number Diff line number Diff line change
Expand Up @@ -712,15 +712,15 @@ impl<T: ::windows_core::RuntimeType + 'static> IVectorView_Vtbl<T> {
struct StockIterable<T>
where
T: ::windows_core::RuntimeType + 'static,
<T as ::windows_core::Type<T>>::Default: Clone,
T::Default: Clone,
{
values: Vec<T::Default>,
}

impl<T> IIterable_Impl<T> for StockIterable<T>
where
T: ::windows_core::RuntimeType,
<T as ::windows_core::Type<T>>::Default: Clone,
T::Default: Clone,
{
fn First(&self) -> ::windows_core::Result<IIterator<T>> {
unsafe {
Expand All @@ -735,7 +735,7 @@ where
struct StockIterator<T>
where
T: ::windows_core::RuntimeType + 'static,
<T as ::windows_core::Type<T>>::Default: Clone,
T::Default: Clone,
{
owner: IIterable<T>,
current: ::std::sync::atomic::AtomicUsize,
Expand All @@ -744,7 +744,7 @@ where
impl<T> IIterator_Impl<T> for StockIterator<T>
where
T: ::windows_core::RuntimeType,
<T as ::windows_core::Type<T>>::Default: Clone,
T::Default: Clone,
{
fn Current(&self) -> ::windows_core::Result<T> {
let owner: &StockIterable<T> = unsafe { ::windows_core::AsImpl::as_impl(&self.owner) };
Expand Down Expand Up @@ -790,7 +790,7 @@ where
impl<T> ::core::convert::TryFrom<Vec<T::Default>> for IIterable<T>
where
T: ::windows_core::RuntimeType,
<T as ::windows_core::Type<T>>::Default: Clone,
T::Default: Clone,
{
type Error = ::windows_core::Error;
fn try_from(values: Vec<T::Default>) -> ::windows_core::Result<Self> {
Expand All @@ -803,8 +803,8 @@ struct StockMapView<K, V>
where
K: ::windows_core::RuntimeType + 'static,
V: ::windows_core::RuntimeType + 'static,
<K as ::windows_core::Type<K>>::Default: Clone + Ord,
<V as ::windows_core::Type<V>>::Default: Clone,
K::Default: Clone + Ord,
V::Default: Clone,
{
map: std::collections::BTreeMap<K::Default, V::Default>,
}
Expand All @@ -813,8 +813,8 @@ impl<K, V> IIterable_Impl<IKeyValuePair<K, V>> for StockMapView<K, V>
where
K: ::windows_core::RuntimeType,
V: ::windows_core::RuntimeType,
<K as ::windows_core::Type<K>>::Default: Clone + Ord,
<V as ::windows_core::Type<V>>::Default: Clone,
K::Default: Clone + Ord,
V::Default: Clone,
{
fn First(&self) -> ::windows_core::Result<IIterator<IKeyValuePair<K, V>>> {
unsafe {
Expand All @@ -829,8 +829,8 @@ impl<K, V> IMapView_Impl<K, V> for StockMapView<K, V>
where
K: ::windows_core::RuntimeType,
V: ::windows_core::RuntimeType,
<K as ::windows_core::Type<K>>::Default: Clone + Ord,
<V as ::windows_core::Type<V>>::Default: Clone,
K::Default: Clone + Ord,
V::Default: Clone,
{
fn Lookup(&self, key: &K::Default) -> ::windows_core::Result<V> {
let value = self.map.get(key).ok_or_else(|| ::windows_core::Error::from(::windows_core::imp::E_BOUNDS))?;
Expand All @@ -854,8 +854,8 @@ struct StockMapViewIterator<'a, K, V>
where
K: ::windows_core::RuntimeType + 'static,
V: ::windows_core::RuntimeType + 'static,
<K as ::windows_core::Type<K>>::Default: Clone + Ord,
<V as ::windows_core::Type<V>>::Default: Clone,
K::Default: Clone + Ord,
V::Default: Clone,
{
_owner: IIterable<IKeyValuePair<K, V>>,
current: ::std::sync::RwLock<std::collections::btree_map::Iter<'a, K::Default, V::Default>>,
Expand All @@ -865,8 +865,8 @@ impl<'a, K, V> IIterator_Impl<IKeyValuePair<K, V>> for StockMapViewIterator<'a,
where
K: ::windows_core::RuntimeType,
V: ::windows_core::RuntimeType,
<K as ::windows_core::Type<K>>::Default: Clone + Ord,
<V as ::windows_core::Type<V>>::Default: Clone,
K::Default: Clone + Ord,
V::Default: Clone,
{
fn Current(&self) -> ::windows_core::Result<IKeyValuePair<K, V>> {
let mut current = self.current.read().unwrap().clone().peekable();
Expand Down Expand Up @@ -913,8 +913,8 @@ struct StockKeyValuePair<K, V>
where
K: ::windows_core::RuntimeType + 'static,
V: ::windows_core::RuntimeType + 'static,
<K as ::windows_core::Type<K>>::Default: Clone,
<V as ::windows_core::Type<V>>::Default: Clone,
K::Default: Clone,
V::Default: Clone,
{
key: K::Default,
value: V::Default,
Expand All @@ -924,8 +924,8 @@ impl<K, V> IKeyValuePair_Impl<K, V> for StockKeyValuePair<K, V>
where
K: ::windows_core::RuntimeType,
V: ::windows_core::RuntimeType,
<K as ::windows_core::Type<K>>::Default: Clone,
<V as ::windows_core::Type<V>>::Default: Clone,
K::Default: Clone,
V::Default: Clone,
{
fn Key(&self) -> ::windows_core::Result<K> {
K::from_default(&self.key)
Expand All @@ -939,8 +939,8 @@ impl<K, V> ::core::convert::TryFrom<std::collections::BTreeMap<K::Default, V::De
where
K: ::windows_core::RuntimeType,
V: ::windows_core::RuntimeType,
<K as ::windows_core::Type<K>>::Default: Clone + Ord,
<V as ::windows_core::Type<V>>::Default: Clone,
K::Default: Clone + Ord,
V::Default: Clone,
{
type Error = ::windows_core::Error;
fn try_from(map: std::collections::BTreeMap<K::Default, V::Default>) -> ::windows_core::Result<Self> {
Expand All @@ -952,15 +952,15 @@ where
struct StockVectorView<T>
where
T: ::windows_core::RuntimeType + 'static,
<T as ::windows_core::Type<T>>::Default: Clone + PartialEq,
T::Default: Clone + PartialEq,
{
values: Vec<T::Default>,
}

impl<T> IIterable_Impl<T> for StockVectorView<T>
where
T: ::windows_core::RuntimeType,
<T as ::windows_core::Type<T>>::Default: Clone + PartialEq,
T::Default: Clone + PartialEq,
{
fn First(&self) -> ::windows_core::Result<IIterator<T>> {
unsafe {
Expand All @@ -974,7 +974,7 @@ where
impl<T> IVectorView_Impl<T> for StockVectorView<T>
where
T: ::windows_core::RuntimeType,
<T as ::windows_core::Type<T>>::Default: Clone + PartialEq,
T::Default: Clone + PartialEq,
{
fn GetAt(&self, index: u32) -> ::windows_core::Result<T> {
let item = self.values.get(index as usize).ok_or_else(|| ::windows_core::Error::from(::windows_core::imp::E_BOUNDS))?;
Expand Down Expand Up @@ -1008,7 +1008,7 @@ where
struct StockVectorViewIterator<T>
where
T: ::windows_core::RuntimeType + 'static,
<T as ::windows_core::Type<T>>::Default: Clone + PartialEq,
T::Default: Clone + PartialEq,
{
owner: IIterable<T>,
current: ::std::sync::atomic::AtomicUsize,
Expand All @@ -1017,7 +1017,7 @@ where
impl<T> IIterator_Impl<T> for StockVectorViewIterator<T>
where
T: ::windows_core::RuntimeType,
<T as ::windows_core::Type<T>>::Default: Clone + PartialEq,
T::Default: Clone + PartialEq,
{
fn Current(&self) -> ::windows_core::Result<T> {
let owner: &StockVectorView<T> = unsafe { ::windows_core::AsImpl::as_impl(&self.owner) };
Expand Down Expand Up @@ -1063,7 +1063,7 @@ where
impl<T> ::core::convert::TryFrom<Vec<T::Default>> for IVectorView<T>
where
T: ::windows_core::RuntimeType,
<T as ::windows_core::Type<T>>::Default: Clone + PartialEq,
T::Default: Clone + PartialEq,
{
type Error = ::windows_core::Error;
fn try_from(values: Vec<T::Default>) -> ::windows_core::Result<Self> {
Expand Down
Loading

0 comments on commit 8af39f9

Please sign in to comment.