From 7ae86c47ff7a6c3230821df71ce4ac0e0bdba046 Mon Sep 17 00:00:00 2001 From: Kenny Kerr Date: Tue, 27 Sep 2022 13:16:29 -0500 Subject: [PATCH 1/2] less generic --- crates/libs/metadata/src/reader/mod.rs | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/crates/libs/metadata/src/reader/mod.rs b/crates/libs/metadata/src/reader/mod.rs index a7d7df60e3..0c4e9bb0e3 100644 --- a/crates/libs/metadata/src/reader/mod.rs +++ b/crates/libs/metadata/src/reader/mod.rs @@ -854,14 +854,17 @@ impl<'a> Reader<'a> { pub fn type_def_is_contract(&self, row: TypeDef) -> bool { self.type_def_attributes(row).any(|attribute| self.attribute_name(attribute) == "ApiContractAttribute") } + fn type_def_is_composable(&self, row: TypeDef) -> bool { + self.type_def_attributes(row).any(|attribute| self.attribute_name(attribute) == "ComposableAttribute") + } pub fn type_def_is_udt(&self, row: TypeDef) -> bool { // TODO: should this just check whether the struct has > 1 fields rather than type_def_is_handle? self.type_def_kind(row) == TypeKind::Struct && !self.type_def_is_handle(row) } - pub fn type_def_is_borrowed(&self, row: TypeDef) -> bool { + fn type_def_is_borrowed(&self, row: TypeDef) -> bool { match self.type_def_kind(row) { - TypeKind::Class => true, - TypeKind::Delegate => self.type_def_flags(row).winrt(), + TypeKind::Class => self.type_def_is_composable(row), + TypeKind::Delegate => false, _ => !self.type_def_is_blittable(row), } } From 102e9f6ad94c5fdaaed203a6de8f5d0e4abf5e9e Mon Sep 17 00:00:00 2001 From: Kenny Kerr Date: Tue, 27 Sep 2022 13:16:38 -0500 Subject: [PATCH 2/2] code gen --- .../Windows/AI/MachineLearning/Preview/mod.rs | 21 +- .../src/Windows/AI/MachineLearning/mod.rs | 52 +- .../ApplicationModel/Activation/mod.rs | 7 +- .../ApplicationModel/AppExtensions/mod.rs | 35 +- .../ApplicationModel/AppService/mod.rs | 51 +- .../Appointments/DataProvider/mod.rs | 49 +- .../ApplicationModel/Appointments/mod.rs | 255 +-- .../ApplicationModel/Background/mod.rs | 191 +- .../ApplicationModel/Calls/Provider/mod.rs | 14 +- .../src/Windows/ApplicationModel/Calls/mod.rs | 244 +-- .../src/Windows/ApplicationModel/Chat/mod.rs | 140 +- .../Contacts/DataProvider/mod.rs | 42 +- .../ApplicationModel/Contacts/Provider/mod.rs | 21 +- .../Windows/ApplicationModel/Contacts/mod.rs | 307 +-- .../ConversationalAgent/mod.rs | 42 +- .../src/Windows/ApplicationModel/Core/mod.rs | 112 +- .../DataTransfer/DragDrop/Core/mod.rs | 65 +- .../DataTransfer/ShareTarget/mod.rs | 14 +- .../ApplicationModel/DataTransfer/mod.rs | 198 +- .../Email/DataProvider/mod.rs | 126 +- .../src/Windows/ApplicationModel/Email/mod.rs | 205 +- .../ExtendedExecution/Foreground/mod.rs | 7 +- .../ApplicationModel/ExtendedExecution/mod.rs | 7 +- .../ApplicationModel/Holographic/mod.rs | 14 +- .../ApplicationModel/LockScreen/mod.rs | 35 +- .../ApplicationModel/Payments/Provider/mod.rs | 28 +- .../Windows/ApplicationModel/Payments/mod.rs | 187 +- .../Preview/Holographic/mod.rs | 14 +- .../Preview/InkWorkspace/mod.rs | 7 +- .../ApplicationModel/Preview/Notes/mod.rs | 40 +- .../ApplicationModel/Resources/Core/mod.rs | 49 +- .../Resources/Management/mod.rs | 29 +- .../Windows/ApplicationModel/Resources/mod.rs | 21 +- .../ApplicationModel/Search/Core/mod.rs | 28 +- .../Windows/ApplicationModel/Search/mod.rs | 42 +- .../SocialInfo/Provider/mod.rs | 14 +- .../ApplicationModel/SocialInfo/mod.rs | 84 +- .../Store/Preview/InstallControl/mod.rs | 144 +- .../ApplicationModel/Store/Preview/mod.rs | 87 +- .../src/Windows/ApplicationModel/Store/mod.rs | 35 +- .../UserActivities/Core/mod.rs | 14 +- .../ApplicationModel/UserActivities/mod.rs | 70 +- .../UserDataAccounts/SystemAccess/mod.rs | 35 +- .../ApplicationModel/UserDataAccounts/mod.rs | 14 +- .../UserDataTasks/DataProvider/mod.rs | 42 +- .../ApplicationModel/UserDataTasks/mod.rs | 49 +- .../ApplicationModel/VoiceCommands/mod.rs | 111 +- .../ApplicationModel/Wallet/System/mod.rs | 28 +- .../Windows/ApplicationModel/Wallet/mod.rs | 21 +- .../src/Windows/ApplicationModel/mod.rs | 49 +- .../libs/windows/src/Windows/Data/Json/mod.rs | 21 +- .../libs/windows/src/Windows/Data/Pdf/mod.rs | 5 +- .../libs/windows/src/Windows/Data/Text/mod.rs | 14 +- .../windows/src/Windows/Data/Xml/Dom/mod.rs | 53 +- .../windows/src/Windows/Data/Xml/Xsl/mod.rs | 7 +- .../src/Windows/Devices/AllJoyn/mod.rs | 157 +- .../Devices/Bluetooth/Advertisement/mod.rs | 56 +- .../Devices/Bluetooth/Background/mod.rs | 14 +- .../Bluetooth/GenericAttributeProfile/mod.rs | 154 +- .../Windows/Devices/Bluetooth/Rfcomm/mod.rs | 58 +- .../src/Windows/Devices/Bluetooth/mod.rs | 98 +- .../src/Windows/Devices/Display/Core/mod.rs | 233 +-- .../Windows/Devices/Enumeration/Pnp/mod.rs | 49 +- .../src/Windows/Devices/Enumeration/mod.rs | 98 +- .../Devices/Geolocation/Geofencing/mod.rs | 14 +- .../src/Windows/Devices/Geolocation/mod.rs | 21 +- .../src/Windows/Devices/Gpio/Provider/mod.rs | 7 +- .../windows/src/Windows/Devices/Gpio/mod.rs | 28 +- .../src/Windows/Devices/Haptics/mod.rs | 28 +- .../Devices/HumanInterfaceDevice/mod.rs | 63 +- .../src/Windows/Devices/I2c/Provider/mod.rs | 7 +- .../windows/src/Windows/Devices/I2c/mod.rs | 21 +- .../src/Windows/Devices/Input/Preview/mod.rs | 49 +- .../windows/src/Windows/Devices/Input/mod.rs | 56 +- .../src/Windows/Devices/Lights/Effects/mod.rs | 56 +- .../windows/src/Windows/Devices/Lights/mod.rs | 7 +- .../windows/src/Windows/Devices/Midi/mod.rs | 21 +- .../Devices/Perception/Provider/mod.rs | 86 +- .../src/Windows/Devices/Perception/mod.rs | 346 +--- .../Devices/PointOfService/Provider/mod.rs | 92 +- .../src/Windows/Devices/PointOfService/mod.rs | 469 ++--- .../windows/src/Windows/Devices/Power/mod.rs | 7 +- .../Devices/Printers/Extensions/mod.rs | 21 +- .../src/Windows/Devices/Printers/mod.rs | 35 +- .../windows/src/Windows/Devices/Radios/mod.rs | 7 +- .../src/Windows/Devices/Scanners/mod.rs | 7 +- .../src/Windows/Devices/Sensors/Custom/mod.rs | 7 +- .../src/Windows/Devices/Sensors/mod.rs | 133 +- .../Devices/SerialCommunication/mod.rs | 14 +- .../src/Windows/Devices/SmartCards/mod.rs | 105 +- .../windows/src/Windows/Devices/Sms/mod.rs | 134 +- .../src/Windows/Devices/Spi/Provider/mod.rs | 7 +- .../windows/src/Windows/Devices/Spi/mod.rs | 21 +- .../windows/src/Windows/Devices/Usb/mod.rs | 95 +- .../windows/src/Windows/Devices/WiFi/mod.rs | 45 +- .../Devices/WiFiDirect/Services/mod.rs | 70 +- .../src/Windows/Devices/WiFiDirect/mod.rs | 42 +- .../src/Windows/Foundation/Collections/mod.rs | 42 +- .../src/Windows/Foundation/Diagnostics/mod.rs | 196 +- .../windows/src/Windows/Foundation/mod.rs | 63 +- .../windows/src/Windows/Gaming/Input/mod.rs | 231 +-- .../Gaming/Preview/GamesEnumeration/mod.rs | 43 +- .../libs/windows/src/Windows/Gaming/UI/mod.rs | 28 +- .../Windows/Gaming/XboxLive/Storage/mod.rs | 14 +- .../Windows/Globalization/Collation/mod.rs | 7 +- .../PhoneNumberFormatting/mod.rs | 21 +- .../windows/src/Windows/Globalization/mod.rs | 21 +- .../src/Windows/Graphics/Capture/mod.rs | 21 +- .../src/Windows/Graphics/Display/Core/mod.rs | 35 +- .../src/Windows/Graphics/Display/mod.rs | 140 +- .../src/Windows/Graphics/Holographic/mod.rs | 105 +- .../src/Windows/Graphics/Imaging/mod.rs | 103 +- .../Graphics/Printing/OptionDetails/mod.rs | 21 +- .../Graphics/Printing/PrintSupport/mod.rs | 28 +- .../Graphics/Printing/PrintTicket/mod.rs | 21 +- .../Windows/Graphics/Printing/Workflow/mod.rs | 74 +- .../src/Windows/Graphics/Printing/mod.rs | 56 +- .../src/Windows/Graphics/Printing3D/mod.rs | 147 +- .../src/Windows/Management/Deployment/mod.rs | 378 ++-- .../src/Windows/Management/Policies/mod.rs | 14 +- .../src/Windows/Media/AppBroadcasting/mod.rs | 14 +- .../src/Windows/Media/AppRecording/mod.rs | 23 +- .../windows/src/Windows/Media/Audio/mod.rs | 234 +-- .../src/Windows/Media/Capture/Core/mod.rs | 14 +- .../src/Windows/Media/Capture/Frames/mod.rs | 50 +- .../windows/src/Windows/Media/Capture/mod.rs | 625 ++----- .../windows/src/Windows/Media/Casting/mod.rs | 63 +- .../Windows/Media/ContentRestrictions/mod.rs | 21 +- .../windows/src/Windows/Media/Control/mod.rs | 35 +- .../src/Windows/Media/Core/Preview/mod.rs | 7 +- .../windows/src/Windows/Media/Core/mod.rs | 409 ++-- .../src/Windows/Media/Devices/Core/mod.rs | 30 +- .../windows/src/Windows/Media/Devices/mod.rs | 129 +- .../src/Windows/Media/DialProtocol/mod.rs | 35 +- .../windows/src/Windows/Media/Editing/mod.rs | 40 +- .../windows/src/Windows/Media/Effects/mod.rs | 60 +- .../src/Windows/Media/FaceAnalysis/mod.rs | 21 +- .../windows/src/Windows/Media/Import/mod.rs | 14 +- .../src/Windows/Media/MediaProperties/mod.rs | 21 +- .../windows/src/Windows/Media/Miracast/mod.rs | 105 +- .../libs/windows/src/Windows/Media/Ocr/mod.rs | 21 +- .../windows/src/Windows/Media/PlayTo/mod.rs | 119 +- .../windows/src/Windows/Media/Playback/mod.rs | 546 ++---- .../Windows/Media/Protection/PlayReady/mod.rs | 238 +-- .../src/Windows/Media/Protection/mod.rs | 58 +- .../Windows/Media/SpeechRecognition/mod.rs | 70 +- .../src/Windows/Media/SpeechSynthesis/mod.rs | 14 +- .../Windows/Media/Streaming/Adaptive/mod.rs | 75 +- .../src/Windows/Media/Transcoding/mod.rs | 15 +- crates/libs/windows/src/Windows/Media/mod.rs | 210 +-- .../Networking/BackgroundTransfer/mod.rs | 235 +-- .../Windows/Networking/Connectivity/mod.rs | 50 +- .../Networking/NetworkOperators/mod.rs | 177 +- .../src/Windows/Networking/Proximity/mod.rs | 133 +- .../Networking/PushNotifications/mod.rs | 21 +- .../Networking/ServiceDiscovery/Dnssd/mod.rs | 72 +- .../src/Windows/Networking/Sockets/mod.rs | 344 +--- .../windows/src/Windows/Networking/Vpn/mod.rs | 236 +-- .../src/Windows/Networking/XboxLive/mod.rs | 85 +- .../windows/src/Windows/Networking/mod.rs | 29 +- .../src/Windows/Perception/People/mod.rs | 21 +- .../Windows/Perception/Spatial/Preview/mod.rs | 21 +- .../Perception/Spatial/Surfaces/mod.rs | 28 +- .../src/Windows/Perception/Spatial/mod.rs | 207 +-- .../src/Windows/Phone/Devices/Power/mod.rs | 7 +- .../Phone/Management/Deployment/mod.rs | 31 +- .../src/Windows/Phone/Media/Devices/mod.rs | 7 +- .../Phone/Notification/Management/mod.rs | 7 +- .../PersonalInformation/Provisioning/mod.rs | 14 +- .../Windows/Phone/PersonalInformation/mod.rs | 22 +- .../src/Windows/Phone/System/Power/mod.rs | 7 +- .../UserProfile/GameServices/Core/mod.rs | 14 +- .../windows/src/Windows/Phone/UI/Input/mod.rs | 28 +- .../Authentication/Identity/Core/mod.rs | 14 +- .../Authentication/Identity/Provider/mod.rs | 7 +- .../Security/Authentication/OnlineId/mod.rs | 35 +- .../Security/Authentication/Web/Core/mod.rs | 136 +- .../Authentication/Web/Provider/mod.rs | 252 +-- .../Security/Authentication/Web/mod.rs | 53 +- .../Authorization/AppCapabilityAccess/mod.rs | 23 +- .../Windows/Security/Credentials/UI/mod.rs | 7 +- .../src/Windows/Security/Credentials/mod.rs | 35 +- .../Security/Cryptography/Certificates/mod.rs | 103 +- .../Windows/Security/Cryptography/Core/mod.rs | 121 +- .../Windows/Security/DataProtection/mod.rs | 14 +- .../Windows/Security/EnterpriseData/mod.rs | 109 +- .../src/Windows/Security/Isolation/mod.rs | 92 +- .../src/Windows/Services/Cortana/mod.rs | 41 +- .../src/Windows/Services/Maps/Guidance/mod.rs | 98 +- .../Windows/Services/Maps/LocalSearch/mod.rs | 14 +- .../Windows/Services/Maps/OfflineMaps/mod.rs | 28 +- .../windows/src/Windows/Services/Maps/mod.rs | 119 +- .../windows/src/Windows/Services/Store/mod.rs | 113 +- .../Windows/Services/TargetedContent/mod.rs | 21 +- .../src/Windows/Storage/AccessCache/mod.rs | 21 +- .../src/Windows/Storage/BulkAccess/mod.rs | 70 +- .../src/Windows/Storage/FileProperties/mod.rs | 10 +- .../Windows/Storage/Pickers/Provider/mod.rs | 28 +- .../src/Windows/Storage/Pickers/mod.rs | 35 +- .../src/Windows/Storage/Provider/mod.rs | 77 +- .../windows/src/Windows/Storage/Search/mod.rs | 119 +- .../src/Windows/Storage/Streams/mod.rs | 49 +- .../libs/windows/src/Windows/Storage/mod.rs | 218 +-- .../System/Diagnostics/DevicePortal/mod.rs | 56 +- .../System/Diagnostics/Telemetry/mod.rs | 7 +- .../src/Windows/System/Diagnostics/mod.rs | 14 +- .../System/Implementation/FileExplorer/mod.rs | 14 +- .../windows/src/Windows/System/Power/mod.rs | 63 +- .../windows/src/Windows/System/Preview/mod.rs | 7 +- .../windows/src/Windows/System/Profile/mod.rs | 28 +- .../Windows/System/RemoteDesktop/Input/mod.rs | 7 +- .../src/Windows/System/RemoteSystems/mod.rs | 229 +-- .../src/Windows/System/Threading/Core/mod.rs | 56 +- .../src/Windows/System/Threading/mod.rs | 65 +- .../windows/src/Windows/System/Update/mod.rs | 7 +- .../src/Windows/System/UserProfile/mod.rs | 56 +- crates/libs/windows/src/Windows/System/mod.rs | 426 ++--- .../src/Windows/UI/Accessibility/mod.rs | 7 +- .../src/Windows/UI/ApplicationSettings/mod.rs | 93 +- .../src/Windows/UI/Composition/Core/mod.rs | 7 +- .../src/Windows/UI/Composition/Desktop/mod.rs | 14 +- .../Windows/UI/Composition/Diagnostics/mod.rs | 7 +- .../UI/Composition/Interactions/mod.rs | 332 +--- .../src/Windows/UI/Composition/Scenes/mod.rs | 329 +--- .../windows/src/Windows/UI/Composition/mod.rs | 1642 +++++------------ .../src/Windows/UI/Core/Preview/mod.rs | 14 +- .../libs/windows/src/Windows/UI/Core/mod.rs | 728 +++----- .../windows/src/Windows/UI/Input/Core/mod.rs | 7 +- .../Windows/UI/Input/Inking/Analysis/mod.rs | 14 +- .../src/Windows/UI/Input/Inking/Core/mod.rs | 112 +- .../src/Windows/UI/Input/Inking/mod.rs | 252 +-- .../Windows/UI/Input/Preview/Injection/mod.rs | 14 +- .../src/Windows/UI/Input/Preview/mod.rs | 7 +- .../src/Windows/UI/Input/Spatial/mod.rs | 253 +-- .../libs/windows/src/Windows/UI/Input/mod.rs | 280 +-- .../UI/Notifications/Management/mod.rs | 7 +- .../src/Windows/UI/Notifications/mod.rs | 252 +-- .../libs/windows/src/Windows/UI/Popups/mod.rs | 35 +- .../libs/windows/src/Windows/UI/Shell/mod.rs | 49 +- .../windows/src/Windows/UI/StartScreen/mod.rs | 148 +- .../windows/src/Windows/UI/Text/Core/mod.rs | 77 +- .../libs/windows/src/Windows/UI/Text/mod.rs | 14 +- .../src/Windows/UI/UIAutomation/Core/mod.rs | 42 +- .../src/Windows/UI/ViewManagement/Core/mod.rs | 77 +- .../src/Windows/UI/ViewManagement/mod.rs | 126 +- .../windows/src/Windows/UI/WebUI/Core/mod.rs | 56 +- .../libs/windows/src/Windows/UI/WebUI/mod.rs | 240 +-- .../UI/WindowManagement/Preview/mod.rs | 7 +- .../src/Windows/UI/WindowManagement/mod.rs | 63 +- .../windows/src/Windows/Web/AtomPub/mod.rs | 125 +- .../src/Windows/Web/Http/Diagnostics/mod.rs | 28 +- .../src/Windows/Web/Http/Filters/mod.rs | 49 +- .../src/Windows/Web/Http/Headers/mod.rs | 434 ++--- .../libs/windows/src/Windows/Web/Http/mod.rs | 212 +-- .../src/Windows/Web/Syndication/mod.rs | 274 +-- .../windows/src/Windows/Web/UI/Interop/mod.rs | 191 +- crates/libs/windows/src/Windows/Web/UI/mod.rs | 156 +- crates/libs/windows/src/Windows/Web/mod.rs | 7 +- 258 files changed, 6821 insertions(+), 16612 deletions(-) diff --git a/crates/libs/windows/src/Windows/AI/MachineLearning/Preview/mod.rs b/crates/libs/windows/src/Windows/AI/MachineLearning/Preview/mod.rs index 877e7d477a..b6aac52dfd 100644 --- a/crates/libs/windows/src/Windows/AI/MachineLearning/Preview/mod.rs +++ b/crates/libs/windows/src/Windows/AI/MachineLearning/Preview/mod.rs @@ -866,13 +866,10 @@ impl LearningModelBindingPreview { } #[doc = "*Required features: `\"deprecated\"`*"] #[cfg(feature = "deprecated")] - pub fn CreateFromModel<'a, P0>(model: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, LearningModelPreview>>, - { + pub fn CreateFromModel(model: &LearningModelPreview) -> ::windows::core::Result { Self::ILearningModelBindingPreviewFactory(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).CreateFromModel)(::windows::core::Vtable::as_raw(this), model.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).CreateFromModel)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(model), result__.as_mut_ptr()).from_abi::(result__) }) } #[doc = "*Required features: `\"Foundation_Collections\"`*"] @@ -1315,14 +1312,11 @@ pub struct LearningModelPreview(::windows::core::IUnknown); impl LearningModelPreview { #[doc = "*Required features: `\"Foundation\"`, `\"deprecated\"`*"] #[cfg(all(feature = "Foundation", feature = "deprecated"))] - pub fn EvaluateAsync<'a, P0>(&self, binding: P0, correlationid: &::windows::core::HSTRING) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, LearningModelBindingPreview>>, - { + pub fn EvaluateAsync(&self, binding: &LearningModelBindingPreview, correlationid: &::windows::core::HSTRING) -> ::windows::core::Result> { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).EvaluateAsync)(::windows::core::Vtable::as_raw(this), binding.into().abi(), ::core::mem::transmute_copy(correlationid), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).EvaluateAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(binding), ::core::mem::transmute_copy(correlationid), result__.as_mut_ptr()).from_abi::>(result__) } } #[doc = "*Required features: `\"Foundation_Collections\"`, `\"deprecated\"`*"] @@ -1358,12 +1352,9 @@ impl LearningModelPreview { } #[doc = "*Required features: `\"deprecated\"`*"] #[cfg(feature = "deprecated")] - pub fn SetInferencingOptions<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, InferencingOptionsPreview>>, - { + pub fn SetInferencingOptions(&self, value: &InferencingOptionsPreview) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).SetInferencingOptions)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetInferencingOptions)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } #[doc = "*Required features: `\"Foundation\"`, `\"Storage\"`, `\"deprecated\"`*"] #[cfg(all(feature = "Foundation", feature = "Storage", feature = "deprecated"))] diff --git a/crates/libs/windows/src/Windows/AI/MachineLearning/mod.rs b/crates/libs/windows/src/Windows/AI/MachineLearning/mod.rs index 29a4d0b961..2953903fbd 100644 --- a/crates/libs/windows/src/Windows/AI/MachineLearning/mod.rs +++ b/crates/libs/windows/src/Windows/AI/MachineLearning/mod.rs @@ -1778,13 +1778,10 @@ impl ImageFeatureValue { } #[doc = "*Required features: `\"Media\"`*"] #[cfg(feature = "Media")] - pub fn CreateFromVideoFrame<'a, P0>(image: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Media::VideoFrame>>, - { + pub fn CreateFromVideoFrame(image: &super::super::Media::VideoFrame) -> ::windows::core::Result { Self::IImageFeatureValueStatics(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).CreateFromVideoFrame)(::windows::core::Vtable::as_raw(this), image.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).CreateFromVideoFrame)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(image), result__.as_mut_ptr()).from_abi::(result__) }) } pub fn Kind(&self) -> ::windows::core::Result { @@ -2176,13 +2173,10 @@ impl LearningModelBinding { let this = self; unsafe { (::windows::core::Vtable::vtable(this).Clear)(::windows::core::Vtable::as_raw(this)).ok() } } - pub fn CreateFromSession<'a, P0>(session: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, LearningModelSession>>, - { + pub fn CreateFromSession(session: &LearningModelSession) -> ::windows::core::Result { Self::ILearningModelBindingFactory(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).CreateFromSession)(::windows::core::Vtable::as_raw(this), session.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).CreateFromSession)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(session), result__.as_mut_ptr()).from_abi::(result__) }) } #[doc = "*Required features: `\"Foundation_Collections\"`*"] @@ -2597,14 +2591,11 @@ impl LearningModelSession { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn EvaluateAsync<'a, P0>(&self, bindings: P0, correlationid: &::windows::core::HSTRING) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, LearningModelBinding>>, - { + pub fn EvaluateAsync(&self, bindings: &LearningModelBinding, correlationid: &::windows::core::HSTRING) -> ::windows::core::Result> { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).EvaluateAsync)(::windows::core::Vtable::as_raw(this), bindings.into().abi(), ::core::mem::transmute_copy(correlationid), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).EvaluateAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(bindings), ::core::mem::transmute_copy(correlationid), result__.as_mut_ptr()).from_abi::>(result__) } } #[doc = "*Required features: `\"Foundation_Collections\"`*"] @@ -2620,14 +2611,11 @@ impl LearningModelSession { (::windows::core::Vtable::vtable(this).EvaluateFeaturesAsync)(::windows::core::Vtable::as_raw(this), features.try_into().map_err(|e| e.into())?.abi(), ::core::mem::transmute_copy(correlationid), result__.as_mut_ptr()).from_abi::>(result__) } } - pub fn Evaluate<'a, P0>(&self, bindings: P0, correlationid: &::windows::core::HSTRING) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, LearningModelBinding>>, - { + pub fn Evaluate(&self, bindings: &LearningModelBinding, correlationid: &::windows::core::HSTRING) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).Evaluate)(::windows::core::Vtable::as_raw(this), bindings.into().abi(), ::core::mem::transmute_copy(correlationid), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).Evaluate)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(bindings), ::core::mem::transmute_copy(correlationid), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation_Collections\"`*"] @@ -2643,34 +2631,22 @@ impl LearningModelSession { (::windows::core::Vtable::vtable(this).EvaluateFeatures)(::windows::core::Vtable::as_raw(this), features.try_into().map_err(|e| e.into())?.abi(), ::core::mem::transmute_copy(correlationid), result__.as_mut_ptr()).from_abi::(result__) } } - pub fn CreateFromModel<'a, P0>(model: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, LearningModel>>, - { + pub fn CreateFromModel(model: &LearningModel) -> ::windows::core::Result { Self::ILearningModelSessionFactory(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).CreateFromModel)(::windows::core::Vtable::as_raw(this), model.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).CreateFromModel)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(model), result__.as_mut_ptr()).from_abi::(result__) }) } - pub fn CreateFromModelOnDevice<'a, P0, P1>(model: P0, devicetorunon: P1) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, LearningModel>>, - P1: ::std::convert::Into<::windows::core::InParam<'a, LearningModelDevice>>, - { + pub fn CreateFromModelOnDevice(model: &LearningModel, devicetorunon: &LearningModelDevice) -> ::windows::core::Result { Self::ILearningModelSessionFactory(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).CreateFromModelOnDevice)(::windows::core::Vtable::as_raw(this), model.into().abi(), devicetorunon.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).CreateFromModelOnDevice)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(model), ::core::mem::transmute_copy(devicetorunon), result__.as_mut_ptr()).from_abi::(result__) }) } - pub fn CreateFromModelOnDeviceWithSessionOptions<'a, P0, P1, P2>(model: P0, devicetorunon: P1, learningmodelsessionoptions: P2) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, LearningModel>>, - P1: ::std::convert::Into<::windows::core::InParam<'a, LearningModelDevice>>, - P2: ::std::convert::Into<::windows::core::InParam<'a, LearningModelSessionOptions>>, - { + pub fn CreateFromModelOnDeviceWithSessionOptions(model: &LearningModel, devicetorunon: &LearningModelDevice, learningmodelsessionoptions: &LearningModelSessionOptions) -> ::windows::core::Result { Self::ILearningModelSessionFactory2(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).CreateFromModelOnDeviceWithSessionOptions)(::windows::core::Vtable::as_raw(this), model.into().abi(), devicetorunon.into().abi(), learningmodelsessionoptions.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).CreateFromModelOnDeviceWithSessionOptions)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(model), ::core::mem::transmute_copy(devicetorunon), ::core::mem::transmute_copy(learningmodelsessionoptions), result__.as_mut_ptr()).from_abi::(result__) }) } #[doc(hidden)] diff --git a/crates/libs/windows/src/Windows/ApplicationModel/Activation/mod.rs b/crates/libs/windows/src/Windows/ApplicationModel/Activation/mod.rs index 1beb8f9089..e3718f5264 100644 --- a/crates/libs/windows/src/Windows/ApplicationModel/Activation/mod.rs +++ b/crates/libs/windows/src/Windows/ApplicationModel/Activation/mod.rs @@ -15397,14 +15397,11 @@ impl SplashScreen { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn Dismissed<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn Dismissed(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).Dismissed)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).Dismissed)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] diff --git a/crates/libs/windows/src/Windows/ApplicationModel/AppExtensions/mod.rs b/crates/libs/windows/src/Windows/ApplicationModel/AppExtensions/mod.rs index 39a3413b94..ffaf832352 100644 --- a/crates/libs/windows/src/Windows/ApplicationModel/AppExtensions/mod.rs +++ b/crates/libs/windows/src/Windows/ApplicationModel/AppExtensions/mod.rs @@ -358,14 +358,11 @@ impl AppExtensionCatalog { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn PackageInstalled<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn PackageInstalled(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).PackageInstalled)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).PackageInstalled)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -376,14 +373,11 @@ impl AppExtensionCatalog { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn PackageUpdating<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn PackageUpdating(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).PackageUpdating)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).PackageUpdating)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -394,14 +388,11 @@ impl AppExtensionCatalog { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn PackageUpdated<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn PackageUpdated(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).PackageUpdated)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).PackageUpdated)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -412,14 +403,11 @@ impl AppExtensionCatalog { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn PackageUninstalling<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn PackageUninstalling(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).PackageUninstalling)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).PackageUninstalling)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -430,14 +418,11 @@ impl AppExtensionCatalog { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn PackageStatusChanged<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn PackageStatusChanged(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).PackageStatusChanged)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).PackageStatusChanged)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] diff --git a/crates/libs/windows/src/Windows/ApplicationModel/AppService/mod.rs b/crates/libs/windows/src/Windows/ApplicationModel/AppService/mod.rs index 65f9f6a28f..fa0049bb02 100644 --- a/crates/libs/windows/src/Windows/ApplicationModel/AppService/mod.rs +++ b/crates/libs/windows/src/Windows/ApplicationModel/AppService/mod.rs @@ -413,26 +413,20 @@ impl AppServiceConnection { } #[doc = "*Required features: `\"Foundation_Collections\"`*"] #[cfg(feature = "Foundation_Collections")] - pub fn SendMessageAsync<'a, P0>(&self, message: P0) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::Collections::ValueSet>>, - { + pub fn SendMessageAsync(&self, message: &super::super::Foundation::Collections::ValueSet) -> ::windows::core::Result> { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).SendMessageAsync)(::windows::core::Vtable::as_raw(this), message.into().abi(), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).SendMessageAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(message), result__.as_mut_ptr()).from_abi::>(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn RequestReceived<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn RequestReceived(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).RequestReceived)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).RequestReceived)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -443,14 +437,11 @@ impl AppServiceConnection { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn ServiceClosed<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn ServiceClosed(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).ServiceClosed)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).ServiceClosed)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -461,14 +452,11 @@ impl AppServiceConnection { } #[doc = "*Required features: `\"Foundation\"`, `\"System_RemoteSystems\"`*"] #[cfg(all(feature = "Foundation", feature = "System_RemoteSystems"))] - pub fn OpenRemoteAsync<'a, P0>(&self, remotesystemconnectionrequest: P0) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::System::RemoteSystems::RemoteSystemConnectionRequest>>, - { + pub fn OpenRemoteAsync(&self, remotesystemconnectionrequest: &super::super::System::RemoteSystems::RemoteSystemConnectionRequest) -> ::windows::core::Result> { let this = &::windows::core::Interface::cast::(self)?; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).OpenRemoteAsync)(::windows::core::Vtable::as_raw(this), remotesystemconnectionrequest.into().abi(), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).OpenRemoteAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(remotesystemconnectionrequest), result__.as_mut_ptr()).from_abi::>(result__) } } #[doc = "*Required features: `\"System\"`*"] @@ -482,24 +470,16 @@ impl AppServiceConnection { } #[doc = "*Required features: `\"System\"`*"] #[cfg(feature = "System")] - pub fn SetUser<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::System::User>>, - { + pub fn SetUser(&self, value: &super::super::System::User) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).SetUser)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetUser)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } #[doc = "*Required features: `\"Foundation_Collections\"`, `\"System_RemoteSystems\"`*"] #[cfg(all(feature = "Foundation_Collections", feature = "System_RemoteSystems"))] - pub fn SendStatelessMessageAsync<'a, P0, P1, P2>(connection: P0, connectionrequest: P1, message: P2) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, AppServiceConnection>>, - P1: ::std::convert::Into<::windows::core::InParam<'a, super::super::System::RemoteSystems::RemoteSystemConnectionRequest>>, - P2: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::Collections::ValueSet>>, - { + pub fn SendStatelessMessageAsync(connection: &AppServiceConnection, connectionrequest: &super::super::System::RemoteSystems::RemoteSystemConnectionRequest, message: &super::super::Foundation::Collections::ValueSet) -> ::windows::core::Result> { Self::IAppServiceConnectionStatics(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).SendStatelessMessageAsync)(::windows::core::Vtable::as_raw(this), connection.into().abi(), connectionrequest.into().abi(), message.into().abi(), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).SendStatelessMessageAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(connection), ::core::mem::transmute_copy(connectionrequest), ::core::mem::transmute_copy(message), result__.as_mut_ptr()).from_abi::>(result__) }) } #[doc = "*Required features: `\"Foundation\"`*"] @@ -688,14 +668,11 @@ impl AppServiceRequest { } #[doc = "*Required features: `\"Foundation_Collections\"`*"] #[cfg(feature = "Foundation_Collections")] - pub fn SendResponseAsync<'a, P0>(&self, message: P0) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::Collections::ValueSet>>, - { + pub fn SendResponseAsync(&self, message: &super::super::Foundation::Collections::ValueSet) -> ::windows::core::Result> { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).SendResponseAsync)(::windows::core::Vtable::as_raw(this), message.into().abi(), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).SendResponseAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(message), result__.as_mut_ptr()).from_abi::>(result__) } } } diff --git a/crates/libs/windows/src/Windows/ApplicationModel/Appointments/DataProvider/mod.rs b/crates/libs/windows/src/Windows/ApplicationModel/Appointments/DataProvider/mod.rs index 546fc257db..3ead029744 100644 --- a/crates/libs/windows/src/Windows/ApplicationModel/Appointments/DataProvider/mod.rs +++ b/crates/libs/windows/src/Windows/ApplicationModel/Appointments/DataProvider/mod.rs @@ -630,14 +630,11 @@ impl AppointmentCalendarCreateOrUpdateAppointmentRequest { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn ReportCompletedAsync<'a, P0>(&self, createdorupdatedappointment: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::Appointment>>, - { + pub fn ReportCompletedAsync(&self, createdorupdatedappointment: &super::Appointment) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).ReportCompletedAsync)(::windows::core::Vtable::as_raw(this), createdorupdatedappointment.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).ReportCompletedAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(createdorupdatedappointment), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -1659,14 +1656,11 @@ pub struct AppointmentDataProviderConnection(::windows::core::IUnknown); impl AppointmentDataProviderConnection { #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn SyncRequested<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Foundation::TypedEventHandler>>, - { + pub fn SyncRequested(&self, handler: &super::super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).SyncRequested)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).SyncRequested)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -1677,14 +1671,11 @@ impl AppointmentDataProviderConnection { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn CreateOrUpdateAppointmentRequested<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Foundation::TypedEventHandler>>, - { + pub fn CreateOrUpdateAppointmentRequested(&self, handler: &super::super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).CreateOrUpdateAppointmentRequested)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).CreateOrUpdateAppointmentRequested)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -1695,14 +1686,11 @@ impl AppointmentDataProviderConnection { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn CancelMeetingRequested<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Foundation::TypedEventHandler>>, - { + pub fn CancelMeetingRequested(&self, handler: &super::super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).CancelMeetingRequested)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).CancelMeetingRequested)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -1713,14 +1701,11 @@ impl AppointmentDataProviderConnection { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn ForwardMeetingRequested<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Foundation::TypedEventHandler>>, - { + pub fn ForwardMeetingRequested(&self, handler: &super::super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).ForwardMeetingRequested)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).ForwardMeetingRequested)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -1731,14 +1716,11 @@ impl AppointmentDataProviderConnection { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn ProposeNewTimeForMeetingRequested<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Foundation::TypedEventHandler>>, - { + pub fn ProposeNewTimeForMeetingRequested(&self, handler: &super::super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).ProposeNewTimeForMeetingRequested)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).ProposeNewTimeForMeetingRequested)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -1749,14 +1731,11 @@ impl AppointmentDataProviderConnection { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn UpdateMeetingResponseRequested<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Foundation::TypedEventHandler>>, - { + pub fn UpdateMeetingResponseRequested(&self, handler: &super::super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).UpdateMeetingResponseRequested)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).UpdateMeetingResponseRequested)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] diff --git a/crates/libs/windows/src/Windows/ApplicationModel/Appointments/mod.rs b/crates/libs/windows/src/Windows/ApplicationModel/Appointments/mod.rs index 309a66b1a2..9276e8e79d 100644 --- a/crates/libs/windows/src/Windows/ApplicationModel/Appointments/mod.rs +++ b/crates/libs/windows/src/Windows/ApplicationModel/Appointments/mod.rs @@ -1188,12 +1188,9 @@ impl Appointment { (::windows::core::Vtable::vtable(this).Organizer)(::windows::core::Vtable::as_raw(this), result__.as_mut_ptr()).from_abi::(result__) } } - pub fn SetOrganizer<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, AppointmentOrganizer>>, - { + pub fn SetOrganizer(&self, value: &AppointmentOrganizer) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).SetOrganizer)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetOrganizer)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } #[doc = "*Required features: `\"Foundation_Collections\"`*"] #[cfg(feature = "Foundation_Collections")] @@ -1211,12 +1208,9 @@ impl Appointment { (::windows::core::Vtable::vtable(this).Recurrence)(::windows::core::Vtable::as_raw(this), result__.as_mut_ptr()).from_abi::(result__) } } - pub fn SetRecurrence<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, AppointmentRecurrence>>, - { + pub fn SetRecurrence(&self, value: &AppointmentRecurrence) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).SetRecurrence)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetRecurrence)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } pub fn BusyStatus(&self) -> ::windows::core::Result { let this = self; @@ -1262,12 +1256,9 @@ impl Appointment { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn SetUri<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::Uri>>, - { + pub fn SetUri(&self, value: &super::super::Foundation::Uri) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).SetUri)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetUri)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } pub fn LocalId(&self) -> ::windows::core::Result<::windows::core::HSTRING> { let this = &::windows::core::Interface::cast::(self)?; @@ -1578,14 +1569,11 @@ impl AppointmentCalendar { } #[doc = "*Required features: `\"Foundation_Collections\"`*"] #[cfg(feature = "Foundation_Collections")] - pub fn FindAppointmentsAsyncWithOptions<'a, P0>(&self, rangestart: super::super::Foundation::DateTime, rangelength: super::super::Foundation::TimeSpan, options: P0) -> ::windows::core::Result>> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, FindAppointmentsOptions>>, - { + pub fn FindAppointmentsAsyncWithOptions(&self, rangestart: super::super::Foundation::DateTime, rangelength: super::super::Foundation::TimeSpan, options: &FindAppointmentsOptions) -> ::windows::core::Result>> { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).FindAppointmentsAsyncWithOptions)(::windows::core::Vtable::as_raw(this), rangestart, rangelength, options.into().abi(), result__.as_mut_ptr()).from_abi::>>(result__) + (::windows::core::Vtable::vtable(this).FindAppointmentsAsyncWithOptions)(::windows::core::Vtable::as_raw(this), rangestart, rangelength, ::core::mem::transmute_copy(options), result__.as_mut_ptr()).from_abi::>>(result__) } } #[doc = "*Required features: `\"Foundation_Collections\"`*"] @@ -1608,14 +1596,11 @@ impl AppointmentCalendar { } #[doc = "*Required features: `\"Foundation_Collections\"`*"] #[cfg(feature = "Foundation_Collections")] - pub fn FindAllInstancesAsyncWithOptions<'a, P0>(&self, masterlocalid: &::windows::core::HSTRING, rangestart: super::super::Foundation::DateTime, rangelength: super::super::Foundation::TimeSpan, poptions: P0) -> ::windows::core::Result>> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, FindAppointmentsOptions>>, - { + pub fn FindAllInstancesAsyncWithOptions(&self, masterlocalid: &::windows::core::HSTRING, rangestart: super::super::Foundation::DateTime, rangelength: super::super::Foundation::TimeSpan, poptions: &FindAppointmentsOptions) -> ::windows::core::Result>> { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).FindAllInstancesAsyncWithOptions)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(masterlocalid), rangestart, rangelength, poptions.into().abi(), result__.as_mut_ptr()).from_abi::>>(result__) + (::windows::core::Vtable::vtable(this).FindAllInstancesAsyncWithOptions)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(masterlocalid), rangestart, rangelength, ::core::mem::transmute_copy(poptions), result__.as_mut_ptr()).from_abi::>>(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -1647,14 +1632,11 @@ impl AppointmentCalendar { } #[doc = "*Required features: `\"Foundation_Collections\"`*"] #[cfg(feature = "Foundation_Collections")] - pub fn FindUnexpandedAppointmentsAsyncWithOptions<'a, P0>(&self, options: P0) -> ::windows::core::Result>> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, FindAppointmentsOptions>>, - { + pub fn FindUnexpandedAppointmentsAsyncWithOptions(&self, options: &FindAppointmentsOptions) -> ::windows::core::Result>> { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).FindUnexpandedAppointmentsAsyncWithOptions)(::windows::core::Vtable::as_raw(this), options.into().abi(), result__.as_mut_ptr()).from_abi::>>(result__) + (::windows::core::Vtable::vtable(this).FindUnexpandedAppointmentsAsyncWithOptions)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(options), result__.as_mut_ptr()).from_abi::>>(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -1695,14 +1677,11 @@ impl AppointmentCalendar { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn SaveAppointmentAsync<'a, P0>(&self, pappointment: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, Appointment>>, - { + pub fn SaveAppointmentAsync(&self, pappointment: &Appointment) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).SaveAppointmentAsync)(::windows::core::Vtable::as_raw(this), pappointment.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).SaveAppointmentAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(pappointment), result__.as_mut_ptr()).from_abi::(result__) } } pub fn SyncManager(&self) -> ::windows::core::Result { @@ -1819,64 +1798,51 @@ impl AppointmentCalendar { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn TryCreateOrUpdateAppointmentAsync<'a, P0>(&self, appointment: P0, notifyinvitees: bool) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, Appointment>>, - { + pub fn TryCreateOrUpdateAppointmentAsync(&self, appointment: &Appointment, notifyinvitees: bool) -> ::windows::core::Result> { let this = &::windows::core::Interface::cast::(self)?; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).TryCreateOrUpdateAppointmentAsync)(::windows::core::Vtable::as_raw(this), appointment.into().abi(), notifyinvitees, result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).TryCreateOrUpdateAppointmentAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(appointment), notifyinvitees, result__.as_mut_ptr()).from_abi::>(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn TryCancelMeetingAsync<'a, P0>(&self, meeting: P0, subject: &::windows::core::HSTRING, comment: &::windows::core::HSTRING, notifyinvitees: bool) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, Appointment>>, - { + pub fn TryCancelMeetingAsync(&self, meeting: &Appointment, subject: &::windows::core::HSTRING, comment: &::windows::core::HSTRING, notifyinvitees: bool) -> ::windows::core::Result> { let this = &::windows::core::Interface::cast::(self)?; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).TryCancelMeetingAsync)(::windows::core::Vtable::as_raw(this), meeting.into().abi(), ::core::mem::transmute_copy(subject), ::core::mem::transmute_copy(comment), notifyinvitees, result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).TryCancelMeetingAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(meeting), ::core::mem::transmute_copy(subject), ::core::mem::transmute_copy(comment), notifyinvitees, result__.as_mut_ptr()).from_abi::>(result__) } } #[doc = "*Required features: `\"Foundation_Collections\"`*"] #[cfg(feature = "Foundation_Collections")] - pub fn TryForwardMeetingAsync<'a, P0, P1, E1>(&self, meeting: P0, invitees: P1, subject: &::windows::core::HSTRING, forwardheader: &::windows::core::HSTRING, comment: &::windows::core::HSTRING) -> ::windows::core::Result> + pub fn TryForwardMeetingAsync<'a, P0, E0>(&self, meeting: &Appointment, invitees: P0, subject: &::windows::core::HSTRING, forwardheader: &::windows::core::HSTRING, comment: &::windows::core::HSTRING) -> ::windows::core::Result> where - P0: ::std::convert::Into<::windows::core::InParam<'a, Appointment>>, - P1: ::std::convert::TryInto<::windows::core::InParam<'a, super::super::Foundation::Collections::IIterable>, Error = E1>, - E1: ::std::convert::Into<::windows::core::Error>, + P0: ::std::convert::TryInto<::windows::core::InParam<'a, super::super::Foundation::Collections::IIterable>, Error = E0>, + E0: ::std::convert::Into<::windows::core::Error>, { let this = &::windows::core::Interface::cast::(self)?; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).TryForwardMeetingAsync)(::windows::core::Vtable::as_raw(this), meeting.into().abi(), invitees.try_into().map_err(|e| e.into())?.abi(), ::core::mem::transmute_copy(subject), ::core::mem::transmute_copy(forwardheader), ::core::mem::transmute_copy(comment), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).TryForwardMeetingAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(meeting), invitees.try_into().map_err(|e| e.into())?.abi(), ::core::mem::transmute_copy(subject), ::core::mem::transmute_copy(forwardheader), ::core::mem::transmute_copy(comment), result__.as_mut_ptr()).from_abi::>(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn TryProposeNewTimeForMeetingAsync<'a, P0>(&self, meeting: P0, newstarttime: super::super::Foundation::DateTime, newduration: super::super::Foundation::TimeSpan, subject: &::windows::core::HSTRING, comment: &::windows::core::HSTRING) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, Appointment>>, - { + pub fn TryProposeNewTimeForMeetingAsync(&self, meeting: &Appointment, newstarttime: super::super::Foundation::DateTime, newduration: super::super::Foundation::TimeSpan, subject: &::windows::core::HSTRING, comment: &::windows::core::HSTRING) -> ::windows::core::Result> { let this = &::windows::core::Interface::cast::(self)?; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).TryProposeNewTimeForMeetingAsync)(::windows::core::Vtable::as_raw(this), meeting.into().abi(), newstarttime, newduration, ::core::mem::transmute_copy(subject), ::core::mem::transmute_copy(comment), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).TryProposeNewTimeForMeetingAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(meeting), newstarttime, newduration, ::core::mem::transmute_copy(subject), ::core::mem::transmute_copy(comment), result__.as_mut_ptr()).from_abi::>(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn TryUpdateMeetingResponseAsync<'a, P0>(&self, meeting: P0, response: AppointmentParticipantResponse, subject: &::windows::core::HSTRING, comment: &::windows::core::HSTRING, sendupdate: bool) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, Appointment>>, - { + pub fn TryUpdateMeetingResponseAsync(&self, meeting: &Appointment, response: AppointmentParticipantResponse, subject: &::windows::core::HSTRING, comment: &::windows::core::HSTRING, sendupdate: bool) -> ::windows::core::Result> { let this = &::windows::core::Interface::cast::(self)?; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).TryUpdateMeetingResponseAsync)(::windows::core::Vtable::as_raw(this), meeting.into().abi(), response, ::core::mem::transmute_copy(subject), ::core::mem::transmute_copy(comment), sendupdate, result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).TryUpdateMeetingResponseAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(meeting), response, ::core::mem::transmute_copy(subject), ::core::mem::transmute_copy(comment), sendupdate, result__.as_mut_ptr()).from_abi::>(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -1993,14 +1959,11 @@ impl AppointmentCalendarSyncManager { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn SyncStatusChanged<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn SyncStatusChanged(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).SyncStatusChanged)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).SyncStatusChanged)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -2411,57 +2374,42 @@ pub struct AppointmentManager; impl AppointmentManager { #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn ShowAddAppointmentAsync<'a, P0>(appointment: P0, selection: super::super::Foundation::Rect) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, Appointment>>, - { + pub fn ShowAddAppointmentAsync(appointment: &Appointment, selection: super::super::Foundation::Rect) -> ::windows::core::Result> { Self::IAppointmentManagerStatics(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).ShowAddAppointmentAsync)(::windows::core::Vtable::as_raw(this), appointment.into().abi(), selection, result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).ShowAddAppointmentAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(appointment), selection, result__.as_mut_ptr()).from_abi::>(result__) }) } #[doc = "*Required features: `\"Foundation\"`, `\"UI_Popups\"`*"] #[cfg(all(feature = "Foundation", feature = "UI_Popups"))] - pub fn ShowAddAppointmentWithPlacementAsync<'a, P0>(appointment: P0, selection: super::super::Foundation::Rect, preferredplacement: super::super::UI::Popups::Placement) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, Appointment>>, - { + pub fn ShowAddAppointmentWithPlacementAsync(appointment: &Appointment, selection: super::super::Foundation::Rect, preferredplacement: super::super::UI::Popups::Placement) -> ::windows::core::Result> { Self::IAppointmentManagerStatics(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).ShowAddAppointmentWithPlacementAsync)(::windows::core::Vtable::as_raw(this), appointment.into().abi(), selection, preferredplacement, result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).ShowAddAppointmentWithPlacementAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(appointment), selection, preferredplacement, result__.as_mut_ptr()).from_abi::>(result__) }) } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn ShowReplaceAppointmentAsync<'a, P0>(appointmentid: &::windows::core::HSTRING, appointment: P0, selection: super::super::Foundation::Rect) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, Appointment>>, - { + pub fn ShowReplaceAppointmentAsync(appointmentid: &::windows::core::HSTRING, appointment: &Appointment, selection: super::super::Foundation::Rect) -> ::windows::core::Result> { Self::IAppointmentManagerStatics(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).ShowReplaceAppointmentAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(appointmentid), appointment.into().abi(), selection, result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).ShowReplaceAppointmentAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(appointmentid), ::core::mem::transmute_copy(appointment), selection, result__.as_mut_ptr()).from_abi::>(result__) }) } #[doc = "*Required features: `\"Foundation\"`, `\"UI_Popups\"`*"] #[cfg(all(feature = "Foundation", feature = "UI_Popups"))] - pub fn ShowReplaceAppointmentWithPlacementAsync<'a, P0>(appointmentid: &::windows::core::HSTRING, appointment: P0, selection: super::super::Foundation::Rect, preferredplacement: super::super::UI::Popups::Placement) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, Appointment>>, - { + pub fn ShowReplaceAppointmentWithPlacementAsync(appointmentid: &::windows::core::HSTRING, appointment: &Appointment, selection: super::super::Foundation::Rect, preferredplacement: super::super::UI::Popups::Placement) -> ::windows::core::Result> { Self::IAppointmentManagerStatics(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).ShowReplaceAppointmentWithPlacementAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(appointmentid), appointment.into().abi(), selection, preferredplacement, result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).ShowReplaceAppointmentWithPlacementAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(appointmentid), ::core::mem::transmute_copy(appointment), selection, preferredplacement, result__.as_mut_ptr()).from_abi::>(result__) }) } #[doc = "*Required features: `\"Foundation\"`, `\"UI_Popups\"`*"] #[cfg(all(feature = "Foundation", feature = "UI_Popups"))] - pub fn ShowReplaceAppointmentWithPlacementAndDateAsync<'a, P0>(appointmentid: &::windows::core::HSTRING, appointment: P0, selection: super::super::Foundation::Rect, preferredplacement: super::super::UI::Popups::Placement, instancestartdate: super::super::Foundation::DateTime) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, Appointment>>, - { + pub fn ShowReplaceAppointmentWithPlacementAndDateAsync(appointmentid: &::windows::core::HSTRING, appointment: &Appointment, selection: super::super::Foundation::Rect, preferredplacement: super::super::UI::Popups::Placement, instancestartdate: super::super::Foundation::DateTime) -> ::windows::core::Result> { Self::IAppointmentManagerStatics(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).ShowReplaceAppointmentWithPlacementAndDateAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(appointmentid), appointment.into().abi(), selection, preferredplacement, instancestartdate, result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).ShowReplaceAppointmentWithPlacementAndDateAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(appointmentid), ::core::mem::transmute_copy(appointment), selection, preferredplacement, instancestartdate, result__.as_mut_ptr()).from_abi::>(result__) }) } #[doc = "*Required features: `\"Foundation\"`*"] @@ -2514,13 +2462,10 @@ impl AppointmentManager { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn ShowEditNewAppointmentAsync<'a, P0>(appointment: P0) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, Appointment>>, - { + pub fn ShowEditNewAppointmentAsync(appointment: &Appointment) -> ::windows::core::Result> { Self::IAppointmentManagerStatics2(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).ShowEditNewAppointmentAsync)(::windows::core::Vtable::as_raw(this), appointment.into().abi(), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).ShowEditNewAppointmentAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(appointment), result__.as_mut_ptr()).from_abi::>(result__) }) } #[doc = "*Required features: `\"Foundation\"`*"] @@ -2533,13 +2478,10 @@ impl AppointmentManager { } #[doc = "*Required features: `\"System\"`*"] #[cfg(feature = "System")] - pub fn GetForUser<'a, P0>(user: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::System::User>>, - { + pub fn GetForUser(user: &super::super::System::User) -> ::windows::core::Result { Self::IAppointmentManagerStatics3(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).GetForUser)(::windows::core::Vtable::as_raw(this), user.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).GetForUser)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(user), result__.as_mut_ptr()).from_abi::(result__) }) } #[doc(hidden)] @@ -2567,62 +2509,47 @@ pub struct AppointmentManagerForUser(::windows::core::IUnknown); impl AppointmentManagerForUser { #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn ShowAddAppointmentAsync<'a, P0>(&self, appointment: P0, selection: super::super::Foundation::Rect) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, Appointment>>, - { + pub fn ShowAddAppointmentAsync(&self, appointment: &Appointment, selection: super::super::Foundation::Rect) -> ::windows::core::Result> { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).ShowAddAppointmentAsync)(::windows::core::Vtable::as_raw(this), appointment.into().abi(), selection, result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).ShowAddAppointmentAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(appointment), selection, result__.as_mut_ptr()).from_abi::>(result__) } } #[doc = "*Required features: `\"Foundation\"`, `\"UI_Popups\"`*"] #[cfg(all(feature = "Foundation", feature = "UI_Popups"))] - pub fn ShowAddAppointmentWithPlacementAsync<'a, P0>(&self, appointment: P0, selection: super::super::Foundation::Rect, preferredplacement: super::super::UI::Popups::Placement) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, Appointment>>, - { + pub fn ShowAddAppointmentWithPlacementAsync(&self, appointment: &Appointment, selection: super::super::Foundation::Rect, preferredplacement: super::super::UI::Popups::Placement) -> ::windows::core::Result> { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).ShowAddAppointmentWithPlacementAsync)(::windows::core::Vtable::as_raw(this), appointment.into().abi(), selection, preferredplacement, result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).ShowAddAppointmentWithPlacementAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(appointment), selection, preferredplacement, result__.as_mut_ptr()).from_abi::>(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn ShowReplaceAppointmentAsync<'a, P0>(&self, appointmentid: &::windows::core::HSTRING, appointment: P0, selection: super::super::Foundation::Rect) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, Appointment>>, - { + pub fn ShowReplaceAppointmentAsync(&self, appointmentid: &::windows::core::HSTRING, appointment: &Appointment, selection: super::super::Foundation::Rect) -> ::windows::core::Result> { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).ShowReplaceAppointmentAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(appointmentid), appointment.into().abi(), selection, result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).ShowReplaceAppointmentAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(appointmentid), ::core::mem::transmute_copy(appointment), selection, result__.as_mut_ptr()).from_abi::>(result__) } } #[doc = "*Required features: `\"Foundation\"`, `\"UI_Popups\"`*"] #[cfg(all(feature = "Foundation", feature = "UI_Popups"))] - pub fn ShowReplaceAppointmentWithPlacementAsync<'a, P0>(&self, appointmentid: &::windows::core::HSTRING, appointment: P0, selection: super::super::Foundation::Rect, preferredplacement: super::super::UI::Popups::Placement) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, Appointment>>, - { + pub fn ShowReplaceAppointmentWithPlacementAsync(&self, appointmentid: &::windows::core::HSTRING, appointment: &Appointment, selection: super::super::Foundation::Rect, preferredplacement: super::super::UI::Popups::Placement) -> ::windows::core::Result> { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).ShowReplaceAppointmentWithPlacementAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(appointmentid), appointment.into().abi(), selection, preferredplacement, result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).ShowReplaceAppointmentWithPlacementAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(appointmentid), ::core::mem::transmute_copy(appointment), selection, preferredplacement, result__.as_mut_ptr()).from_abi::>(result__) } } #[doc = "*Required features: `\"Foundation\"`, `\"UI_Popups\"`*"] #[cfg(all(feature = "Foundation", feature = "UI_Popups"))] - pub fn ShowReplaceAppointmentWithPlacementAndDateAsync<'a, P0>(&self, appointmentid: &::windows::core::HSTRING, appointment: P0, selection: super::super::Foundation::Rect, preferredplacement: super::super::UI::Popups::Placement, instancestartdate: super::super::Foundation::DateTime) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, Appointment>>, - { + pub fn ShowReplaceAppointmentWithPlacementAndDateAsync(&self, appointmentid: &::windows::core::HSTRING, appointment: &Appointment, selection: super::super::Foundation::Rect, preferredplacement: super::super::UI::Popups::Placement, instancestartdate: super::super::Foundation::DateTime) -> ::windows::core::Result> { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).ShowReplaceAppointmentWithPlacementAndDateAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(appointmentid), appointment.into().abi(), selection, preferredplacement, instancestartdate, result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).ShowReplaceAppointmentWithPlacementAndDateAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(appointmentid), ::core::mem::transmute_copy(appointment), selection, preferredplacement, instancestartdate, result__.as_mut_ptr()).from_abi::>(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -2681,14 +2608,11 @@ impl AppointmentManagerForUser { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn ShowEditNewAppointmentAsync<'a, P0>(&self, appointment: P0) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, Appointment>>, - { + pub fn ShowEditNewAppointmentAsync(&self, appointment: &Appointment) -> ::windows::core::Result> { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).ShowEditNewAppointmentAsync)(::windows::core::Vtable::as_raw(this), appointment.into().abi(), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).ShowEditNewAppointmentAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(appointment), result__.as_mut_ptr()).from_abi::>(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -3347,87 +3271,65 @@ impl AppointmentStore { } #[doc = "*Required features: `\"Foundation_Collections\"`*"] #[cfg(feature = "Foundation_Collections")] - pub fn FindAppointmentsAsyncWithOptions<'a, P0>(&self, rangestart: super::super::Foundation::DateTime, rangelength: super::super::Foundation::TimeSpan, options: P0) -> ::windows::core::Result>> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, FindAppointmentsOptions>>, - { + pub fn FindAppointmentsAsyncWithOptions(&self, rangestart: super::super::Foundation::DateTime, rangelength: super::super::Foundation::TimeSpan, options: &FindAppointmentsOptions) -> ::windows::core::Result>> { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).FindAppointmentsAsyncWithOptions)(::windows::core::Vtable::as_raw(this), rangestart, rangelength, options.into().abi(), result__.as_mut_ptr()).from_abi::>>(result__) + (::windows::core::Vtable::vtable(this).FindAppointmentsAsyncWithOptions)(::windows::core::Vtable::as_raw(this), rangestart, rangelength, ::core::mem::transmute_copy(options), result__.as_mut_ptr()).from_abi::>>(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn FindConflictAsync<'a, P0>(&self, appointment: P0) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, Appointment>>, - { + pub fn FindConflictAsync(&self, appointment: &Appointment) -> ::windows::core::Result> { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).FindConflictAsync)(::windows::core::Vtable::as_raw(this), appointment.into().abi(), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).FindConflictAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(appointment), result__.as_mut_ptr()).from_abi::>(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn FindConflictAsyncWithInstanceStart<'a, P0>(&self, appointment: P0, instancestarttime: super::super::Foundation::DateTime) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, Appointment>>, - { + pub fn FindConflictAsyncWithInstanceStart(&self, appointment: &Appointment, instancestarttime: super::super::Foundation::DateTime) -> ::windows::core::Result> { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).FindConflictAsyncWithInstanceStart)(::windows::core::Vtable::as_raw(this), appointment.into().abi(), instancestarttime, result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).FindConflictAsyncWithInstanceStart)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(appointment), instancestarttime, result__.as_mut_ptr()).from_abi::>(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn MoveAppointmentAsync<'a, P0, P1>(&self, appointment: P0, destinationcalendar: P1) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, Appointment>>, - P1: ::std::convert::Into<::windows::core::InParam<'a, AppointmentCalendar>>, - { + pub fn MoveAppointmentAsync(&self, appointment: &Appointment, destinationcalendar: &AppointmentCalendar) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).MoveAppointmentAsync)(::windows::core::Vtable::as_raw(this), appointment.into().abi(), destinationcalendar.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).MoveAppointmentAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(appointment), ::core::mem::transmute_copy(destinationcalendar), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn ShowAddAppointmentAsync<'a, P0>(&self, appointment: P0, selection: super::super::Foundation::Rect) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, Appointment>>, - { + pub fn ShowAddAppointmentAsync(&self, appointment: &Appointment, selection: super::super::Foundation::Rect) -> ::windows::core::Result> { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).ShowAddAppointmentAsync)(::windows::core::Vtable::as_raw(this), appointment.into().abi(), selection, result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).ShowAddAppointmentAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(appointment), selection, result__.as_mut_ptr()).from_abi::>(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn ShowReplaceAppointmentAsync<'a, P0>(&self, localid: &::windows::core::HSTRING, appointment: P0, selection: super::super::Foundation::Rect) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, Appointment>>, - { + pub fn ShowReplaceAppointmentAsync(&self, localid: &::windows::core::HSTRING, appointment: &Appointment, selection: super::super::Foundation::Rect) -> ::windows::core::Result> { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).ShowReplaceAppointmentAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(localid), appointment.into().abi(), selection, result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).ShowReplaceAppointmentAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(localid), ::core::mem::transmute_copy(appointment), selection, result__.as_mut_ptr()).from_abi::>(result__) } } #[doc = "*Required features: `\"Foundation\"`, `\"UI_Popups\"`*"] #[cfg(all(feature = "Foundation", feature = "UI_Popups"))] - pub fn ShowReplaceAppointmentWithPlacementAndDateAsync<'a, P0>(&self, localid: &::windows::core::HSTRING, appointment: P0, selection: super::super::Foundation::Rect, preferredplacement: super::super::UI::Popups::Placement, instancestartdate: super::super::Foundation::DateTime) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, Appointment>>, - { + pub fn ShowReplaceAppointmentWithPlacementAndDateAsync(&self, localid: &::windows::core::HSTRING, appointment: &Appointment, selection: super::super::Foundation::Rect, preferredplacement: super::super::UI::Popups::Placement, instancestartdate: super::super::Foundation::DateTime) -> ::windows::core::Result> { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).ShowReplaceAppointmentWithPlacementAndDateAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(localid), appointment.into().abi(), selection, preferredplacement, instancestartdate, result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).ShowReplaceAppointmentWithPlacementAndDateAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(localid), ::core::mem::transmute_copy(appointment), selection, preferredplacement, instancestartdate, result__.as_mut_ptr()).from_abi::>(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -3468,14 +3370,11 @@ impl AppointmentStore { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn ShowEditNewAppointmentAsync<'a, P0>(&self, appointment: P0) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, Appointment>>, - { + pub fn ShowEditNewAppointmentAsync(&self, appointment: &Appointment) -> ::windows::core::Result> { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).ShowEditNewAppointmentAsync)(::windows::core::Vtable::as_raw(this), appointment.into().abi(), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).ShowEditNewAppointmentAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(appointment), result__.as_mut_ptr()).from_abi::>(result__) } } #[doc = "*Required features: `\"Foundation_Collections\"`*"] @@ -3489,14 +3388,11 @@ impl AppointmentStore { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn StoreChanged<'a, P0>(&self, phandler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn StoreChanged(&self, phandler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = &::windows::core::Interface::cast::(self)?; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).StoreChanged)(::windows::core::Vtable::as_raw(this), phandler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).StoreChanged)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(phandler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -3693,12 +3589,9 @@ impl AppointmentStoreChangeReader { let this = self; unsafe { (::windows::core::Vtable::vtable(this).AcceptChanges)(::windows::core::Vtable::as_raw(this)).ok() } } - pub fn AcceptChangesThrough<'a, P0>(&self, lastchangetoaccept: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, AppointmentStoreChange>>, - { + pub fn AcceptChangesThrough(&self, lastchangetoaccept: &AppointmentStoreChange) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).AcceptChangesThrough)(::windows::core::Vtable::as_raw(this), lastchangetoaccept.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).AcceptChangesThrough)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(lastchangetoaccept)).ok() } } } impl ::core::clone::Clone for AppointmentStoreChangeReader { diff --git a/crates/libs/windows/src/Windows/ApplicationModel/Background/mod.rs b/crates/libs/windows/src/Windows/ApplicationModel/Background/mod.rs index 28b677a9f1..0a0664707b 100644 --- a/crates/libs/windows/src/Windows/ApplicationModel/Background/mod.rs +++ b/crates/libs/windows/src/Windows/ApplicationModel/Background/mod.rs @@ -536,14 +536,11 @@ impl IBackgroundTaskInstance { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn Canceled<'a, P0>(&self, cancelhandler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, BackgroundTaskCanceledEventHandler>>, - { + pub fn Canceled(&self, cancelhandler: &BackgroundTaskCanceledEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).Canceled)(::windows::core::Vtable::as_raw(this), cancelhandler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).Canceled)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(cancelhandler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -691,14 +688,11 @@ impl IBackgroundTaskInstance2 { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn Canceled<'a, P0>(&self, cancelhandler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, BackgroundTaskCanceledEventHandler>>, - { + pub fn Canceled(&self, cancelhandler: &BackgroundTaskCanceledEventHandler) -> ::windows::core::Result { let this = &::windows::core::Interface::cast::(self)?; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).Canceled)(::windows::core::Vtable::as_raw(this), cancelhandler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).Canceled)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(cancelhandler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -853,14 +847,11 @@ impl IBackgroundTaskInstance4 { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn Canceled<'a, P0>(&self, cancelhandler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, BackgroundTaskCanceledEventHandler>>, - { + pub fn Canceled(&self, cancelhandler: &BackgroundTaskCanceledEventHandler) -> ::windows::core::Result { let this = &::windows::core::Interface::cast::(self)?; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).Canceled)(::windows::core::Vtable::as_raw(this), cancelhandler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).Canceled)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(cancelhandler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -1007,14 +998,11 @@ impl IBackgroundTaskRegistration { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn Progress<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, BackgroundTaskProgressEventHandler>>, - { + pub fn Progress(&self, handler: &BackgroundTaskProgressEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).Progress)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).Progress)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -1025,14 +1013,11 @@ impl IBackgroundTaskRegistration { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn Completed<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, BackgroundTaskCompletedEventHandler>>, - { + pub fn Completed(&self, handler: &BackgroundTaskCompletedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).Completed)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).Completed)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -1156,14 +1141,11 @@ impl IBackgroundTaskRegistration2 { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn Progress<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, BackgroundTaskProgressEventHandler>>, - { + pub fn Progress(&self, handler: &BackgroundTaskProgressEventHandler) -> ::windows::core::Result { let this = &::windows::core::Interface::cast::(self)?; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).Progress)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).Progress)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -1174,14 +1156,11 @@ impl IBackgroundTaskRegistration2 { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn Completed<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, BackgroundTaskCompletedEventHandler>>, - { + pub fn Completed(&self, handler: &BackgroundTaskCompletedEventHandler) -> ::windows::core::Result { let this = &::windows::core::Interface::cast::(self)?; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).Completed)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).Completed)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -1306,14 +1285,11 @@ impl IBackgroundTaskRegistration3 { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn Progress<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, BackgroundTaskProgressEventHandler>>, - { + pub fn Progress(&self, handler: &BackgroundTaskProgressEventHandler) -> ::windows::core::Result { let this = &::windows::core::Interface::cast::(self)?; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).Progress)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).Progress)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -1324,14 +1300,11 @@ impl IBackgroundTaskRegistration3 { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn Completed<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, BackgroundTaskCompletedEventHandler>>, - { + pub fn Completed(&self, handler: &BackgroundTaskCompletedEventHandler) -> ::windows::core::Result { let this = &::windows::core::Interface::cast::(self)?; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).Completed)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).Completed)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -2882,12 +2855,9 @@ impl ::windows::core::RuntimeName for AlarmApplicationManager { #[repr(transparent)] pub struct AppBroadcastTrigger(::windows::core::IUnknown); impl AppBroadcastTrigger { - pub fn SetProviderInfo<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, AppBroadcastTriggerProviderInfo>>, - { + pub fn SetProviderInfo(&self, value: &AppBroadcastTriggerProviderInfo) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).SetProviderInfo)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetProviderInfo)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } pub fn ProviderInfo(&self) -> ::windows::core::Result { let this = self; @@ -3152,14 +3122,11 @@ impl ApplicationTrigger { } #[doc = "*Required features: `\"Foundation_Collections\"`*"] #[cfg(feature = "Foundation_Collections")] - pub fn RequestAsyncWithArguments<'a, P0>(&self, arguments: P0) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::Collections::ValueSet>>, - { + pub fn RequestAsyncWithArguments(&self, arguments: &super::super::Foundation::Collections::ValueSet) -> ::windows::core::Result> { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).RequestAsyncWithArguments)(::windows::core::Vtable::as_raw(this), arguments.into().abi(), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).RequestAsyncWithArguments)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(arguments), result__.as_mut_ptr()).from_abi::>(result__) } } } @@ -3588,12 +3555,9 @@ impl BackgroundTaskBuilder { (::windows::core::Vtable::vtable(this).TaskGroup)(::windows::core::Vtable::as_raw(this), result__.as_mut_ptr()).from_abi::(result__) } } - pub fn SetTaskGroup<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, BackgroundTaskRegistrationGroup>>, - { + pub fn SetTaskGroup(&self, value: &BackgroundTaskRegistrationGroup) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).SetTaskGroup)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetTaskGroup)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } pub fn SetTaskEntryPointClsid(&self, taskentrypoint: ::windows::core::GUID) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; @@ -3918,14 +3882,11 @@ impl BackgroundTaskRegistration { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn Progress<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, BackgroundTaskProgressEventHandler>>, - { + pub fn Progress(&self, handler: &BackgroundTaskProgressEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).Progress)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).Progress)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -3936,14 +3897,11 @@ impl BackgroundTaskRegistration { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn Completed<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, BackgroundTaskCompletedEventHandler>>, - { + pub fn Completed(&self, handler: &BackgroundTaskCompletedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).Completed)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).Completed)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -4144,14 +4102,11 @@ impl BackgroundTaskRegistrationGroup { } #[doc = "*Required features: `\"ApplicationModel_Activation\"`, `\"Foundation\"`*"] #[cfg(all(feature = "ApplicationModel_Activation", feature = "Foundation"))] - pub fn BackgroundActivated<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn BackgroundActivated(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).BackgroundActivated)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).BackgroundActivated)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -4483,12 +4438,9 @@ impl BluetoothLEAdvertisementWatcherTrigger { } #[doc = "*Required features: `\"Devices_Bluetooth\"`*"] #[cfg(feature = "Devices_Bluetooth")] - pub fn SetSignalStrengthFilter<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Devices::Bluetooth::BluetoothSignalStrengthFilter>>, - { + pub fn SetSignalStrengthFilter(&self, value: &super::super::Devices::Bluetooth::BluetoothSignalStrengthFilter) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).SetSignalStrengthFilter)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetSignalStrengthFilter)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } #[doc = "*Required features: `\"Devices_Bluetooth_Advertisement\"`*"] #[cfg(feature = "Devices_Bluetooth_Advertisement")] @@ -4501,12 +4453,9 @@ impl BluetoothLEAdvertisementWatcherTrigger { } #[doc = "*Required features: `\"Devices_Bluetooth_Advertisement\"`*"] #[cfg(feature = "Devices_Bluetooth_Advertisement")] - pub fn SetAdvertisementFilter<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Devices::Bluetooth::Advertisement::BluetoothLEAdvertisementFilter>>, - { + pub fn SetAdvertisementFilter(&self, value: &super::super::Devices::Bluetooth::Advertisement::BluetoothLEAdvertisementFilter) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).SetAdvertisementFilter)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetAdvertisementFilter)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } pub fn AllowExtendedAdvertisements(&self) -> ::windows::core::Result { let this = &::windows::core::Interface::cast::(self)?; @@ -6184,24 +6133,18 @@ impl GattCharacteristicNotificationTrigger { } #[doc = "*Required features: `\"Devices_Bluetooth_GenericAttributeProfile\"`*"] #[cfg(feature = "Devices_Bluetooth_GenericAttributeProfile")] - pub fn Create<'a, P0>(characteristic: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Devices::Bluetooth::GenericAttributeProfile::GattCharacteristic>>, - { + pub fn Create(characteristic: &super::super::Devices::Bluetooth::GenericAttributeProfile::GattCharacteristic) -> ::windows::core::Result { Self::IGattCharacteristicNotificationTriggerFactory(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).Create)(::windows::core::Vtable::as_raw(this), characteristic.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).Create)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(characteristic), result__.as_mut_ptr()).from_abi::(result__) }) } #[doc = "*Required features: `\"Devices_Bluetooth_Background\"`, `\"Devices_Bluetooth_GenericAttributeProfile\"`*"] #[cfg(all(feature = "Devices_Bluetooth_Background", feature = "Devices_Bluetooth_GenericAttributeProfile"))] - pub fn CreateWithEventTriggeringMode<'a, P0>(characteristic: P0, eventtriggeringmode: super::super::Devices::Bluetooth::Background::BluetoothEventTriggeringMode) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Devices::Bluetooth::GenericAttributeProfile::GattCharacteristic>>, - { + pub fn CreateWithEventTriggeringMode(characteristic: &super::super::Devices::Bluetooth::GenericAttributeProfile::GattCharacteristic, eventtriggeringmode: super::super::Devices::Bluetooth::Background::BluetoothEventTriggeringMode) -> ::windows::core::Result { Self::IGattCharacteristicNotificationTriggerFactory2(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).CreateWithEventTriggeringMode)(::windows::core::Vtable::as_raw(this), characteristic.into().abi(), eventtriggeringmode, result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).CreateWithEventTriggeringMode)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(characteristic), eventtriggeringmode, result__.as_mut_ptr()).from_abi::(result__) }) } #[doc(hidden)] @@ -6320,12 +6263,9 @@ impl GattServiceProviderTrigger { } #[doc = "*Required features: `\"Devices_Bluetooth_GenericAttributeProfile\"`*"] #[cfg(feature = "Devices_Bluetooth_GenericAttributeProfile")] - pub fn SetAdvertisingParameters<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Devices::Bluetooth::GenericAttributeProfile::GattServiceProviderAdvertisingParameters>>, - { + pub fn SetAdvertisingParameters(&self, value: &super::super::Devices::Bluetooth::GenericAttributeProfile::GattServiceProviderAdvertisingParameters) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).SetAdvertisingParameters)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetAdvertisingParameters)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } #[doc = "*Required features: `\"Devices_Bluetooth_GenericAttributeProfile\"`*"] #[cfg(feature = "Devices_Bluetooth_GenericAttributeProfile")] @@ -6867,14 +6807,11 @@ impl MediaProcessingTrigger { } #[doc = "*Required features: `\"Foundation_Collections\"`*"] #[cfg(feature = "Foundation_Collections")] - pub fn RequestAsyncWithArguments<'a, P0>(&self, arguments: P0) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::Collections::ValueSet>>, - { + pub fn RequestAsyncWithArguments(&self, arguments: &super::super::Foundation::Collections::ValueSet) -> ::windows::core::Result> { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).RequestAsyncWithArguments)(::windows::core::Vtable::as_raw(this), arguments.into().abi(), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).RequestAsyncWithArguments)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(arguments), result__.as_mut_ptr()).from_abi::>(result__) } } } @@ -8205,12 +8142,9 @@ impl RfcommConnectionTrigger { } #[doc = "*Required features: `\"Networking\"`*"] #[cfg(feature = "Networking")] - pub fn SetRemoteHostName<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Networking::HostName>>, - { + pub fn SetRemoteHostName(&self, value: &super::super::Networking::HostName) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).SetRemoteHostName)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetRemoteHostName)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } } impl ::core::clone::Clone for RfcommConnectionTrigger { @@ -8627,13 +8561,10 @@ pub struct SmsMessageReceivedTrigger(::windows::core::IUnknown); impl SmsMessageReceivedTrigger { #[doc = "*Required features: `\"Devices_Sms\"`*"] #[cfg(feature = "Devices_Sms")] - pub fn Create<'a, P0>(filterrules: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Devices::Sms::SmsFilterRules>>, - { + pub fn Create(filterrules: &super::super::Devices::Sms::SmsFilterRules) -> ::windows::core::Result { Self::ISmsMessageReceivedTriggerFactory(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).Create)(::windows::core::Vtable::as_raw(this), filterrules.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).Create)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(filterrules), result__.as_mut_ptr()).from_abi::(result__) }) } #[doc(hidden)] @@ -8833,13 +8764,10 @@ pub struct StorageLibraryChangeTrackerTrigger(::windows::core::IUnknown); impl StorageLibraryChangeTrackerTrigger { #[doc = "*Required features: `\"Storage\"`*"] #[cfg(feature = "Storage")] - pub fn Create<'a, P0>(tracker: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Storage::StorageLibraryChangeTracker>>, - { + pub fn Create(tracker: &super::super::Storage::StorageLibraryChangeTracker) -> ::windows::core::Result { Self::IStorageLibraryChangeTrackerTriggerFactory(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).Create)(::windows::core::Vtable::as_raw(this), tracker.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).Create)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(tracker), result__.as_mut_ptr()).from_abi::(result__) }) } #[doc(hidden)] @@ -8937,13 +8865,10 @@ pub struct StorageLibraryContentChangedTrigger(::windows::core::IUnknown); impl StorageLibraryContentChangedTrigger { #[doc = "*Required features: `\"Storage\"`*"] #[cfg(feature = "Storage")] - pub fn Create<'a, P0>(storagelibrary: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Storage::StorageLibrary>>, - { + pub fn Create(storagelibrary: &super::super::Storage::StorageLibrary) -> ::windows::core::Result { Self::IStorageLibraryContentChangedTriggerStatics(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).Create)(::windows::core::Vtable::as_raw(this), storagelibrary.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).Create)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(storagelibrary), result__.as_mut_ptr()).from_abi::(result__) }) } #[doc = "*Required features: `\"Foundation_Collections\"`, `\"Storage\"`*"] @@ -10365,13 +10290,9 @@ impl BackgroundTaskCompletedEventHandler { let com = BackgroundTaskCompletedEventHandlerBox:: { vtable: &BackgroundTaskCompletedEventHandlerBox::::VTABLE, count: ::windows::core::RefCount::new(1), invoke }; unsafe { ::core::mem::transmute(::windows::core::alloc::boxed::Box::new(com)) } } - pub fn Invoke<'a, P0, P1>(&self, sender: P0, args: P1) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, BackgroundTaskRegistration>>, - P1: ::std::convert::Into<::windows::core::InParam<'a, BackgroundTaskCompletedEventArgs>>, - { + pub fn Invoke(&self, sender: &BackgroundTaskRegistration, args: &BackgroundTaskCompletedEventArgs) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).Invoke)(::windows::core::Vtable::as_raw(this), sender.into().abi(), args.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).Invoke)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(sender), ::core::mem::transmute_copy(args)).ok() } } } #[repr(C)] @@ -10455,13 +10376,9 @@ impl BackgroundTaskProgressEventHandler { let com = BackgroundTaskProgressEventHandlerBox:: { vtable: &BackgroundTaskProgressEventHandlerBox::::VTABLE, count: ::windows::core::RefCount::new(1), invoke }; unsafe { ::core::mem::transmute(::windows::core::alloc::boxed::Box::new(com)) } } - pub fn Invoke<'a, P0, P1>(&self, sender: P0, args: P1) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, BackgroundTaskRegistration>>, - P1: ::std::convert::Into<::windows::core::InParam<'a, BackgroundTaskProgressEventArgs>>, - { + pub fn Invoke(&self, sender: &BackgroundTaskRegistration, args: &BackgroundTaskProgressEventArgs) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).Invoke)(::windows::core::Vtable::as_raw(this), sender.into().abi(), args.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).Invoke)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(sender), ::core::mem::transmute_copy(args)).ok() } } } #[repr(C)] diff --git a/crates/libs/windows/src/Windows/ApplicationModel/Calls/Provider/mod.rs b/crates/libs/windows/src/Windows/ApplicationModel/Calls/Provider/mod.rs index 6f78dd811b..cf01207fd3 100644 --- a/crates/libs/windows/src/Windows/ApplicationModel/Calls/Provider/mod.rs +++ b/crates/libs/windows/src/Windows/ApplicationModel/Calls/Provider/mod.rs @@ -172,12 +172,9 @@ impl PhoneCallOrigin { } #[doc = "*Required features: `\"Storage\"`*"] #[cfg(feature = "Storage")] - pub fn SetDisplayPicture<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Storage::StorageFile>>, - { + pub fn SetDisplayPicture(&self, value: &super::super::super::Storage::StorageFile) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).SetDisplayPicture)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetDisplayPicture)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } } impl ::core::clone::Clone for PhoneCallOrigin { @@ -256,11 +253,8 @@ impl PhoneCallOriginManager { pub fn ShowPhoneCallOriginSettingsUI() -> ::windows::core::Result<()> { Self::IPhoneCallOriginManagerStatics(|this| unsafe { (::windows::core::Vtable::vtable(this).ShowPhoneCallOriginSettingsUI)(::windows::core::Vtable::as_raw(this)).ok() }) } - pub fn SetCallOrigin<'a, P0>(requestid: ::windows::core::GUID, callorigin: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, PhoneCallOrigin>>, - { - Self::IPhoneCallOriginManagerStatics(|this| unsafe { (::windows::core::Vtable::vtable(this).SetCallOrigin)(::windows::core::Vtable::as_raw(this), requestid, callorigin.into().abi()).ok() }) + pub fn SetCallOrigin(requestid: ::windows::core::GUID, callorigin: &PhoneCallOrigin) -> ::windows::core::Result<()> { + Self::IPhoneCallOriginManagerStatics(|this| unsafe { (::windows::core::Vtable::vtable(this).SetCallOrigin)(::windows::core::Vtable::as_raw(this), requestid, ::core::mem::transmute_copy(callorigin)).ok() }) } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] diff --git a/crates/libs/windows/src/Windows/ApplicationModel/Calls/mod.rs b/crates/libs/windows/src/Windows/ApplicationModel/Calls/mod.rs index 8b6ee3f1ca..216d77c922 100644 --- a/crates/libs/windows/src/Windows/ApplicationModel/Calls/mod.rs +++ b/crates/libs/windows/src/Windows/ApplicationModel/Calls/mod.rs @@ -1623,14 +1623,11 @@ impl LockScreenCallUI { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn EndRequested<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn EndRequested(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).EndRequested)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).EndRequested)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -1641,14 +1638,11 @@ impl LockScreenCallUI { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn Closed<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn Closed(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).Closed)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).Closed)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -1815,14 +1809,11 @@ pub struct PhoneCall(::windows::core::IUnknown); impl PhoneCall { #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn StatusChanged<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn StatusChanged(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).StatusChanged)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).StatusChanged)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -1833,14 +1824,11 @@ impl PhoneCall { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn AudioDeviceChanged<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn AudioDeviceChanged(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).AudioDeviceChanged)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).AudioDeviceChanged)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -1851,14 +1839,11 @@ impl PhoneCall { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn IsMutedChanged<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn IsMutedChanged(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).IsMutedChanged)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).IsMutedChanged)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -2198,12 +2183,9 @@ impl PhoneCallHistoryEntry { (::windows::core::Vtable::vtable(this).Address)(::windows::core::Vtable::as_raw(this), result__.as_mut_ptr()).from_abi::(result__) } } - pub fn SetAddress<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, PhoneCallHistoryEntryAddress>>, - { + pub fn SetAddress(&self, value: &PhoneCallHistoryEntryAddress) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).SetAddress)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetAddress)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] @@ -2772,13 +2754,10 @@ impl PhoneCallHistoryManager { } #[doc = "*Required features: `\"System\"`*"] #[cfg(feature = "System")] - pub fn GetForUser<'a, P0>(user: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::System::User>>, - { + pub fn GetForUser(user: &super::super::System::User) -> ::windows::core::Result { Self::IPhoneCallHistoryManagerStatics2(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).GetForUser)(::windows::core::Vtable::as_raw(this), user.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).GetForUser)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(user), result__.as_mut_ptr()).from_abi::(result__) }) } #[doc(hidden)] @@ -2902,38 +2881,29 @@ impl PhoneCallHistoryStore { (::windows::core::Vtable::vtable(this).GetEntryReader)(::windows::core::Vtable::as_raw(this), result__.as_mut_ptr()).from_abi::(result__) } } - pub fn GetEntryReaderWithOptions<'a, P0>(&self, queryoptions: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, PhoneCallHistoryEntryQueryOptions>>, - { + pub fn GetEntryReaderWithOptions(&self, queryoptions: &PhoneCallHistoryEntryQueryOptions) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).GetEntryReaderWithOptions)(::windows::core::Vtable::as_raw(this), queryoptions.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).GetEntryReaderWithOptions)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(queryoptions), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn SaveEntryAsync<'a, P0>(&self, callhistoryentry: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, PhoneCallHistoryEntry>>, - { + pub fn SaveEntryAsync(&self, callhistoryentry: &PhoneCallHistoryEntry) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).SaveEntryAsync)(::windows::core::Vtable::as_raw(this), callhistoryentry.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).SaveEntryAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(callhistoryentry), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn DeleteEntryAsync<'a, P0>(&self, callhistoryentry: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, PhoneCallHistoryEntry>>, - { + pub fn DeleteEntryAsync(&self, callhistoryentry: &PhoneCallHistoryEntry) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).DeleteEntryAsync)(::windows::core::Vtable::as_raw(this), callhistoryentry.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).DeleteEntryAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(callhistoryentry), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation_Collections\"`*"] @@ -2951,14 +2921,11 @@ impl PhoneCallHistoryStore { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn MarkEntryAsSeenAsync<'a, P0>(&self, callhistoryentry: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, PhoneCallHistoryEntry>>, - { + pub fn MarkEntryAsSeenAsync(&self, callhistoryentry: &PhoneCallHistoryEntry) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).MarkEntryAsSeenAsync)(::windows::core::Vtable::as_raw(this), callhistoryentry.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).MarkEntryAsSeenAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(callhistoryentry), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation_Collections\"`*"] @@ -3204,13 +3171,10 @@ impl PhoneCallManager { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn CallStateChanged<'a, P0>(handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::EventHandler<::windows::core::IInspectable>>>, - { + pub fn CallStateChanged(handler: &super::super::Foundation::EventHandler<::windows::core::IInspectable>) -> ::windows::core::Result { Self::IPhoneCallManagerStatics2(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).CallStateChanged)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).CallStateChanged)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) }) } #[doc = "*Required features: `\"Foundation\"`*"] @@ -3574,12 +3538,9 @@ impl PhoneDialOptions { } #[doc = "*Required features: `\"ApplicationModel_Contacts\"`*"] #[cfg(feature = "ApplicationModel_Contacts")] - pub fn SetContact<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::Contacts::Contact>>, - { + pub fn SetContact(&self, value: &super::Contacts::Contact) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).SetContact)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetContact)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } #[doc = "*Required features: `\"ApplicationModel_Contacts\"`*"] #[cfg(feature = "ApplicationModel_Contacts")] @@ -3592,12 +3553,9 @@ impl PhoneDialOptions { } #[doc = "*Required features: `\"ApplicationModel_Contacts\"`*"] #[cfg(feature = "ApplicationModel_Contacts")] - pub fn SetContactPhone<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::Contacts::ContactPhone>>, - { + pub fn SetContactPhone(&self, value: &super::Contacts::ContactPhone) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).SetContactPhone)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetContactPhone)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } pub fn Media(&self) -> ::windows::core::Result { let this = self; @@ -3692,14 +3650,11 @@ pub struct PhoneLine(::windows::core::IUnknown); impl PhoneLine { #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn LineChanged<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn LineChanged(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).LineChanged)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).LineChanged)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -3807,12 +3762,9 @@ impl PhoneLine { let this = self; unsafe { (::windows::core::Vtable::vtable(this).Dial)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(number), ::core::mem::transmute_copy(displayname)).ok() } } - pub fn DialWithOptions<'a, P0>(&self, options: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, PhoneDialOptions>>, - { + pub fn DialWithOptions(&self, options: &PhoneDialOptions) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).DialWithOptions)(::windows::core::Vtable::as_raw(this), options.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).DialWithOptions)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(options)).ok() } } pub fn EnableTextReply(&self, value: bool) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; @@ -4240,12 +4192,9 @@ impl PhoneLineTransportDevice { } #[doc = "*Required features: `\"System\"`*"] #[cfg(feature = "System")] - pub fn RegisterAppForUser<'a, P0>(&self, user: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::System::User>>, - { + pub fn RegisterAppForUser(&self, user: &super::super::System::User) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).RegisterAppForUser)(::windows::core::Vtable::as_raw(this), user.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).RegisterAppForUser)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(user)).ok() } } pub fn UnregisterApp(&self) -> ::windows::core::Result<()> { let this = self; @@ -4253,12 +4202,9 @@ impl PhoneLineTransportDevice { } #[doc = "*Required features: `\"System\"`*"] #[cfg(feature = "System")] - pub fn UnregisterAppForUser<'a, P0>(&self, user: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::System::User>>, - { + pub fn UnregisterAppForUser(&self, user: &super::super::System::User) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).UnregisterAppForUser)(::windows::core::Vtable::as_raw(this), user.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).UnregisterAppForUser)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(user)).ok() } } pub fn IsRegistered(&self) -> ::windows::core::Result { let this = self; @@ -4292,14 +4238,11 @@ impl PhoneLineTransportDevice { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn AudioRoutingStatusChanged<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn AudioRoutingStatusChanged(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = &::windows::core::Interface::cast::(self)?; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).AudioRoutingStatusChanged)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).AudioRoutingStatusChanged)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -4317,14 +4260,11 @@ impl PhoneLineTransportDevice { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn InBandRingingEnabledChanged<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn InBandRingingEnabledChanged(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = &::windows::core::Interface::cast::(self)?; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).InBandRingingEnabledChanged)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).InBandRingingEnabledChanged)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -4435,14 +4375,11 @@ impl PhoneLineWatcher { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn LineAdded<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn LineAdded(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).LineAdded)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).LineAdded)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -4453,14 +4390,11 @@ impl PhoneLineWatcher { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn LineRemoved<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn LineRemoved(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).LineRemoved)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).LineRemoved)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -4471,14 +4405,11 @@ impl PhoneLineWatcher { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn LineUpdated<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn LineUpdated(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).LineUpdated)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).LineUpdated)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -4489,14 +4420,11 @@ impl PhoneLineWatcher { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn EnumerationCompleted<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn EnumerationCompleted(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).EnumerationCompleted)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).EnumerationCompleted)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -4507,14 +4435,11 @@ impl PhoneLineWatcher { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn Stopped<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn Stopped(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).Stopped)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).Stopped)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -4785,14 +4710,11 @@ impl VoipCallCoordinator { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn MuteStateChanged<'a, P0>(&self, mutechangehandler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn MuteStateChanged(&self, mutechangehandler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).MuteStateChanged)(::windows::core::Vtable::as_raw(this), mutechangehandler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).MuteStateChanged)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(mutechangehandler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -4803,16 +4725,11 @@ impl VoipCallCoordinator { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn RequestNewIncomingCall<'a, P0, P1, P2>(&self, context: &::windows::core::HSTRING, contactname: &::windows::core::HSTRING, contactnumber: &::windows::core::HSTRING, contactimage: P0, servicename: &::windows::core::HSTRING, brandingimage: P1, calldetails: &::windows::core::HSTRING, ringtone: P2, media: VoipPhoneCallMedia, ringtimeout: super::super::Foundation::TimeSpan) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::Uri>>, - P1: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::Uri>>, - P2: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::Uri>>, - { + pub fn RequestNewIncomingCall(&self, context: &::windows::core::HSTRING, contactname: &::windows::core::HSTRING, contactnumber: &::windows::core::HSTRING, contactimage: &super::super::Foundation::Uri, servicename: &::windows::core::HSTRING, brandingimage: &super::super::Foundation::Uri, calldetails: &::windows::core::HSTRING, ringtone: &super::super::Foundation::Uri, media: VoipPhoneCallMedia, ringtimeout: super::super::Foundation::TimeSpan) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).RequestNewIncomingCall)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(context), ::core::mem::transmute_copy(contactname), ::core::mem::transmute_copy(contactnumber), contactimage.into().abi(), ::core::mem::transmute_copy(servicename), brandingimage.into().abi(), ::core::mem::transmute_copy(calldetails), ringtone.into().abi(), media, ringtimeout, result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).RequestNewIncomingCall)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(context), ::core::mem::transmute_copy(contactname), ::core::mem::transmute_copy(contactnumber), ::core::mem::transmute_copy(contactimage), ::core::mem::transmute_copy(servicename), ::core::mem::transmute_copy(brandingimage), ::core::mem::transmute_copy(calldetails), ::core::mem::transmute_copy(ringtone), media, ringtimeout, result__.as_mut_ptr()).from_abi::(result__) } } pub fn RequestNewOutgoingCall(&self, context: &::windows::core::HSTRING, contactname: &::windows::core::HSTRING, servicename: &::windows::core::HSTRING, media: VoipPhoneCallMedia) -> ::windows::core::Result { @@ -4839,16 +4756,11 @@ impl VoipCallCoordinator { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn RequestIncomingUpgradeToVideoCall<'a, P0, P1, P2>(&self, context: &::windows::core::HSTRING, contactname: &::windows::core::HSTRING, contactnumber: &::windows::core::HSTRING, contactimage: P0, servicename: &::windows::core::HSTRING, brandingimage: P1, calldetails: &::windows::core::HSTRING, ringtone: P2, ringtimeout: super::super::Foundation::TimeSpan) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::Uri>>, - P1: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::Uri>>, - P2: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::Uri>>, - { + pub fn RequestIncomingUpgradeToVideoCall(&self, context: &::windows::core::HSTRING, contactname: &::windows::core::HSTRING, contactnumber: &::windows::core::HSTRING, contactimage: &super::super::Foundation::Uri, servicename: &::windows::core::HSTRING, brandingimage: &super::super::Foundation::Uri, calldetails: &::windows::core::HSTRING, ringtone: &super::super::Foundation::Uri, ringtimeout: super::super::Foundation::TimeSpan) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).RequestIncomingUpgradeToVideoCall)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(context), ::core::mem::transmute_copy(contactname), ::core::mem::transmute_copy(contactnumber), contactimage.into().abi(), ::core::mem::transmute_copy(servicename), brandingimage.into().abi(), ::core::mem::transmute_copy(calldetails), ringtone.into().abi(), ringtimeout, result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).RequestIncomingUpgradeToVideoCall)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(context), ::core::mem::transmute_copy(contactname), ::core::mem::transmute_copy(contactnumber), ::core::mem::transmute_copy(contactimage), ::core::mem::transmute_copy(servicename), ::core::mem::transmute_copy(brandingimage), ::core::mem::transmute_copy(calldetails), ::core::mem::transmute_copy(ringtone), ringtimeout, result__.as_mut_ptr()).from_abi::(result__) } } pub fn TerminateCellularCall(&self, callupgradeguid: ::windows::core::GUID) -> ::windows::core::Result<()> { @@ -4875,16 +4787,11 @@ impl VoipCallCoordinator { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn RequestNewIncomingCallWithContactRemoteId<'a, P0, P1, P2>(&self, context: &::windows::core::HSTRING, contactname: &::windows::core::HSTRING, contactnumber: &::windows::core::HSTRING, contactimage: P0, servicename: &::windows::core::HSTRING, brandingimage: P1, calldetails: &::windows::core::HSTRING, ringtone: P2, media: VoipPhoneCallMedia, ringtimeout: super::super::Foundation::TimeSpan, contactremoteid: &::windows::core::HSTRING) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::Uri>>, - P1: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::Uri>>, - P2: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::Uri>>, - { + pub fn RequestNewIncomingCallWithContactRemoteId(&self, context: &::windows::core::HSTRING, contactname: &::windows::core::HSTRING, contactnumber: &::windows::core::HSTRING, contactimage: &super::super::Foundation::Uri, servicename: &::windows::core::HSTRING, brandingimage: &super::super::Foundation::Uri, calldetails: &::windows::core::HSTRING, ringtone: &super::super::Foundation::Uri, media: VoipPhoneCallMedia, ringtimeout: super::super::Foundation::TimeSpan, contactremoteid: &::windows::core::HSTRING) -> ::windows::core::Result { let this = &::windows::core::Interface::cast::(self)?; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).RequestNewIncomingCallWithContactRemoteId)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(context), ::core::mem::transmute_copy(contactname), ::core::mem::transmute_copy(contactnumber), contactimage.into().abi(), ::core::mem::transmute_copy(servicename), brandingimage.into().abi(), ::core::mem::transmute_copy(calldetails), ringtone.into().abi(), media, ringtimeout, ::core::mem::transmute_copy(contactremoteid), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).RequestNewIncomingCallWithContactRemoteId)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(context), ::core::mem::transmute_copy(contactname), ::core::mem::transmute_copy(contactnumber), ::core::mem::transmute_copy(contactimage), ::core::mem::transmute_copy(servicename), ::core::mem::transmute_copy(brandingimage), ::core::mem::transmute_copy(calldetails), ::core::mem::transmute_copy(ringtone), media, ringtimeout, ::core::mem::transmute_copy(contactremoteid), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -4978,14 +4885,11 @@ pub struct VoipPhoneCall(::windows::core::IUnknown); impl VoipPhoneCall { #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn EndRequested<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn EndRequested(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).EndRequested)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).EndRequested)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -4996,14 +4900,11 @@ impl VoipPhoneCall { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn HoldRequested<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn HoldRequested(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).HoldRequested)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).HoldRequested)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -5014,14 +4915,11 @@ impl VoipPhoneCall { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn ResumeRequested<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn ResumeRequested(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).ResumeRequested)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).ResumeRequested)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -5032,14 +4930,11 @@ impl VoipPhoneCall { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn AnswerRequested<'a, P0>(&self, accepthandler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn AnswerRequested(&self, accepthandler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).AnswerRequested)(::windows::core::Vtable::as_raw(this), accepthandler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).AnswerRequested)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(accepthandler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -5050,14 +4945,11 @@ impl VoipPhoneCall { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn RejectRequested<'a, P0>(&self, rejecthandler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn RejectRequested(&self, rejecthandler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).RejectRequested)(::windows::core::Vtable::as_raw(this), rejecthandler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).RejectRequested)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(rejecthandler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] diff --git a/crates/libs/windows/src/Windows/ApplicationModel/Chat/mod.rs b/crates/libs/windows/src/Windows/ApplicationModel/Chat/mod.rs index 5ce040d815..e347a5248b 100644 --- a/crates/libs/windows/src/Windows/ApplicationModel/Chat/mod.rs +++ b/crates/libs/windows/src/Windows/ApplicationModel/Chat/mod.rs @@ -1571,14 +1571,11 @@ impl ChatConversation { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn RemoteParticipantComposingChanged<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn RemoteParticipantComposingChanged(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).RemoteParticipantComposingChanged)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).RemoteParticipantComposingChanged)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -2184,12 +2181,9 @@ impl ChatMessage { (::windows::core::Vtable::vtable(this).ThreadingInfo)(::windows::core::Vtable::as_raw(this), result__.as_mut_ptr()).from_abi::(result__) } } - pub fn SetThreadingInfo<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, ChatConversationThreadingInfo>>, - { + pub fn SetThreadingInfo(&self, value: &ChatConversationThreadingInfo) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).SetThreadingInfo)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetThreadingInfo)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } #[doc = "*Required features: `\"Foundation_Collections\"`*"] #[cfg(feature = "Foundation_Collections")] @@ -2592,12 +2586,9 @@ impl ChatMessageChangeReader { let this = self; unsafe { (::windows::core::Vtable::vtable(this).AcceptChanges)(::windows::core::Vtable::as_raw(this)).ok() } } - pub fn AcceptChangesThrough<'a, P0>(&self, lastchangetoacknowledge: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, ChatMessageChange>>, - { + pub fn AcceptChangesThrough(&self, lastchangetoacknowledge: &ChatMessageChange) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).AcceptChangesThrough)(::windows::core::Vtable::as_raw(this), lastchangetoacknowledge.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).AcceptChangesThrough)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(lastchangetoacknowledge)).ok() } } #[doc = "*Required features: `\"Foundation_Collections\"`*"] #[cfg(feature = "Foundation_Collections")] @@ -2943,13 +2934,10 @@ impl ChatMessageManager { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn ShowComposeSmsMessageAsync<'a, P0>(message: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, ChatMessage>>, - { + pub fn ShowComposeSmsMessageAsync(message: &ChatMessage) -> ::windows::core::Result { Self::IChatMessageManagerStatic(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).ShowComposeSmsMessageAsync)(::windows::core::Vtable::as_raw(this), message.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).ShowComposeSmsMessageAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(message), result__.as_mut_ptr()).from_abi::(result__) }) } pub fn ShowSmsSettings() -> ::windows::core::Result<()> { @@ -3247,36 +3235,27 @@ impl ChatMessageStore { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn SendMessageAsync<'a, P0>(&self, chatmessage: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, ChatMessage>>, - { + pub fn SendMessageAsync(&self, chatmessage: &ChatMessage) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).SendMessageAsync)(::windows::core::Vtable::as_raw(this), chatmessage.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).SendMessageAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(chatmessage), result__.as_mut_ptr()).from_abi::(result__) } } - pub fn ValidateMessage<'a, P0>(&self, chatmessage: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, ChatMessage>>, - { + pub fn ValidateMessage(&self, chatmessage: &ChatMessage) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).ValidateMessage)(::windows::core::Vtable::as_raw(this), chatmessage.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).ValidateMessage)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(chatmessage), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn MessageChanged<'a, P0>(&self, value: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn MessageChanged(&self, value: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).MessageChanged)(::windows::core::Vtable::as_raw(this), value.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).MessageChanged)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -3322,14 +3301,11 @@ impl ChatMessageStore { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn GetConversationFromThreadingInfoAsync<'a, P0>(&self, threadinginfo: P0) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, ChatConversationThreadingInfo>>, - { + pub fn GetConversationFromThreadingInfoAsync(&self, threadinginfo: &ChatConversationThreadingInfo) -> ::windows::core::Result> { let this = &::windows::core::Interface::cast::(self)?; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).GetConversationFromThreadingInfoAsync)(::windows::core::Vtable::as_raw(this), threadinginfo.into().abi(), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).GetConversationFromThreadingInfoAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(threadinginfo), result__.as_mut_ptr()).from_abi::>(result__) } } pub fn GetConversationReader(&self) -> ::windows::core::Result { @@ -3405,26 +3381,20 @@ impl ChatMessageStore { (::windows::core::Vtable::vtable(this).MarkAsSeenForTransportsAsync)(::windows::core::Vtable::as_raw(this), transportids.try_into().map_err(|e| e.into())?.abi(), result__.as_mut_ptr()).from_abi::(result__) } } - pub fn GetSearchReader<'a, P0>(&self, value: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, ChatQueryOptions>>, - { + pub fn GetSearchReader(&self, value: &ChatQueryOptions) -> ::windows::core::Result { let this = &::windows::core::Interface::cast::(self)?; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).GetSearchReader)(::windows::core::Vtable::as_raw(this), value.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).GetSearchReader)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn SaveMessageAsync<'a, P0>(&self, chatmessage: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, ChatMessage>>, - { + pub fn SaveMessageAsync(&self, chatmessage: &ChatMessage) -> ::windows::core::Result { let this = &::windows::core::Interface::cast::(self)?; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).SaveMessageAsync)(::windows::core::Vtable::as_raw(this), chatmessage.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).SaveMessageAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(chatmessage), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -3447,14 +3417,11 @@ impl ChatMessageStore { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn StoreChanged<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn StoreChanged(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = &::windows::core::Interface::cast::(self)?; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).StoreChanged)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).StoreChanged)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -4389,14 +4356,11 @@ impl ChatSyncManager { } #[doc = "*Required features: `\"Foundation\"`, `\"Security_Credentials\"`*"] #[cfg(all(feature = "Foundation", feature = "Security_Credentials"))] - pub fn AssociateAccountAsync<'a, P0>(&self, webaccount: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Security::Credentials::WebAccount>>, - { + pub fn AssociateAccountAsync(&self, webaccount: &super::super::Security::Credentials::WebAccount) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).AssociateAccountAsync)(::windows::core::Vtable::as_raw(this), webaccount.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).AssociateAccountAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(webaccount), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -4410,14 +4374,11 @@ impl ChatSyncManager { } #[doc = "*Required features: `\"Security_Credentials\"`*"] #[cfg(feature = "Security_Credentials")] - pub fn IsAccountAssociated<'a, P0>(&self, webaccount: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Security::Credentials::WebAccount>>, - { + pub fn IsAccountAssociated(&self, webaccount: &super::super::Security::Credentials::WebAccount) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).IsAccountAssociated)(::windows::core::Vtable::as_raw(this), webaccount.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).IsAccountAssociated)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(webaccount), result__.as_mut_ptr()).from_abi::(result__) } } pub fn StartSync(&self) -> ::windows::core::Result<()> { @@ -4426,14 +4387,11 @@ impl ChatSyncManager { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn SetConfigurationAsync<'a, P0>(&self, configuration: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, ChatSyncConfiguration>>, - { + pub fn SetConfigurationAsync(&self, configuration: &ChatSyncConfiguration) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).SetConfigurationAsync)(::windows::core::Vtable::as_raw(this), configuration.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).SetConfigurationAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(configuration), result__.as_mut_ptr()).from_abi::(result__) } } } @@ -4544,26 +4502,20 @@ impl RcsEndUserMessage { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn SendResponseAsync<'a, P0>(&self, action: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, RcsEndUserMessageAction>>, - { + pub fn SendResponseAsync(&self, action: &RcsEndUserMessageAction) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).SendResponseAsync)(::windows::core::Vtable::as_raw(this), action.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).SendResponseAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(action), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn SendResponseWithPinAsync<'a, P0>(&self, action: P0, pin: &::windows::core::HSTRING) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, RcsEndUserMessageAction>>, - { + pub fn SendResponseWithPinAsync(&self, action: &RcsEndUserMessageAction, pin: &::windows::core::HSTRING) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).SendResponseWithPinAsync)(::windows::core::Vtable::as_raw(this), action.into().abi(), ::core::mem::transmute_copy(pin), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).SendResponseWithPinAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(action), ::core::mem::transmute_copy(pin), result__.as_mut_ptr()).from_abi::(result__) } } } @@ -4879,14 +4831,11 @@ pub struct RcsEndUserMessageManager(::windows::core::IUnknown); impl RcsEndUserMessageManager { #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn MessageAvailableChanged<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn MessageAvailableChanged(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).MessageAvailableChanged)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).MessageAvailableChanged)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -4987,24 +4936,18 @@ impl RcsManager { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn LeaveConversationAsync<'a, P0>(conversation: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, ChatConversation>>, - { + pub fn LeaveConversationAsync(conversation: &ChatConversation) -> ::windows::core::Result { Self::IRcsManagerStatics(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).LeaveConversationAsync)(::windows::core::Vtable::as_raw(this), conversation.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).LeaveConversationAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(conversation), result__.as_mut_ptr()).from_abi::(result__) }) } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn TransportListChanged<'a, P0>(handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::EventHandler<::windows::core::IInspectable>>>, - { + pub fn TransportListChanged(handler: &super::super::Foundation::EventHandler<::windows::core::IInspectable>) -> ::windows::core::Result { Self::IRcsManagerStatics2(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).TransportListChanged)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).TransportListChanged)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) }) } #[doc = "*Required features: `\"Foundation\"`*"] @@ -5159,14 +5102,11 @@ impl RcsTransport { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn ServiceKindSupportedChanged<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn ServiceKindSupportedChanged(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).ServiceKindSupportedChanged)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).ServiceKindSupportedChanged)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] diff --git a/crates/libs/windows/src/Windows/ApplicationModel/Contacts/DataProvider/mod.rs b/crates/libs/windows/src/Windows/ApplicationModel/Contacts/DataProvider/mod.rs index 219f5cdb64..44d01b1bc6 100644 --- a/crates/libs/windows/src/Windows/ApplicationModel/Contacts/DataProvider/mod.rs +++ b/crates/libs/windows/src/Windows/ApplicationModel/Contacts/DataProvider/mod.rs @@ -257,14 +257,11 @@ pub struct ContactDataProviderConnection(::windows::core::IUnknown); impl ContactDataProviderConnection { #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn SyncRequested<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Foundation::TypedEventHandler>>, - { + pub fn SyncRequested(&self, handler: &super::super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).SyncRequested)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).SyncRequested)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -275,14 +272,11 @@ impl ContactDataProviderConnection { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn ServerSearchReadBatchRequested<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Foundation::TypedEventHandler>>, - { + pub fn ServerSearchReadBatchRequested(&self, handler: &super::super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).ServerSearchReadBatchRequested)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).ServerSearchReadBatchRequested)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -297,14 +291,11 @@ impl ContactDataProviderConnection { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn CreateOrUpdateContactRequested<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Foundation::TypedEventHandler>>, - { + pub fn CreateOrUpdateContactRequested(&self, handler: &super::super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = &::windows::core::Interface::cast::(self)?; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).CreateOrUpdateContactRequested)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).CreateOrUpdateContactRequested)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -315,14 +306,11 @@ impl ContactDataProviderConnection { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn DeleteContactRequested<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Foundation::TypedEventHandler>>, - { + pub fn DeleteContactRequested(&self, handler: &super::super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = &::windows::core::Interface::cast::(self)?; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).DeleteContactRequested)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).DeleteContactRequested)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -492,14 +480,11 @@ impl ContactListCreateOrUpdateContactRequest { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn ReportCompletedAsync<'a, P0>(&self, createdorupdatedcontact: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::Contact>>, - { + pub fn ReportCompletedAsync(&self, createdorupdatedcontact: &super::Contact) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).ReportCompletedAsync)(::windows::core::Vtable::as_raw(this), createdorupdatedcontact.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).ReportCompletedAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(createdorupdatedcontact), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -881,14 +866,11 @@ impl ContactListServerSearchReadBatchRequest { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn SaveContactAsync<'a, P0>(&self, contact: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::Contact>>, - { + pub fn SaveContactAsync(&self, contact: &super::Contact) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).SaveContactAsync)(::windows::core::Vtable::as_raw(this), contact.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).SaveContactAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(contact), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] diff --git a/crates/libs/windows/src/Windows/ApplicationModel/Contacts/Provider/mod.rs b/crates/libs/windows/src/Windows/ApplicationModel/Contacts/Provider/mod.rs index 449880faab..1280f72943 100644 --- a/crates/libs/windows/src/Windows/ApplicationModel/Contacts/Provider/mod.rs +++ b/crates/libs/windows/src/Windows/ApplicationModel/Contacts/Provider/mod.rs @@ -71,14 +71,11 @@ pub struct ContactPickerUI(::windows::core::IUnknown); impl ContactPickerUI { #[doc = "*Required features: `\"deprecated\"`*"] #[cfg(feature = "deprecated")] - pub fn AddContact<'a, P0>(&self, id: &::windows::core::HSTRING, contact: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::Contact>>, - { + pub fn AddContact(&self, id: &::windows::core::HSTRING, contact: &super::Contact) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).AddContact)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(id), contact.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).AddContact)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(id), ::core::mem::transmute_copy(contact), result__.as_mut_ptr()).from_abi::(result__) } } pub fn RemoveContact(&self, id: &::windows::core::HSTRING) -> ::windows::core::Result<()> { @@ -110,14 +107,11 @@ impl ContactPickerUI { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn ContactRemoved<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Foundation::TypedEventHandler>>, - { + pub fn ContactRemoved(&self, handler: &super::super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).ContactRemoved)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).ContactRemoved)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -126,14 +120,11 @@ impl ContactPickerUI { let this = self; unsafe { (::windows::core::Vtable::vtable(this).RemoveContactRemoved)(::windows::core::Vtable::as_raw(this), token).ok() } } - pub fn AddContact2<'a, P0>(&self, contact: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::Contact>>, - { + pub fn AddContact2(&self, contact: &super::Contact) -> ::windows::core::Result { let this = &::windows::core::Interface::cast::(self)?; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).AddContact)(::windows::core::Vtable::as_raw(this), contact.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).AddContact)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(contact), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation_Collections\"`*"] diff --git a/crates/libs/windows/src/Windows/ApplicationModel/Contacts/mod.rs b/crates/libs/windows/src/Windows/ApplicationModel/Contacts/mod.rs index 74afe4cbbe..d9104d5656 100644 --- a/crates/libs/windows/src/Windows/ApplicationModel/Contacts/mod.rs +++ b/crates/libs/windows/src/Windows/ApplicationModel/Contacts/mod.rs @@ -907,14 +907,11 @@ impl IContactInstantMessageFieldFactory { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn CreateInstantMessage_All<'a, P0>(&self, username: &::windows::core::HSTRING, category: ContactFieldCategory, service: &::windows::core::HSTRING, displaytext: &::windows::core::HSTRING, verb: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::Uri>>, - { + pub fn CreateInstantMessage_All(&self, username: &::windows::core::HSTRING, category: ContactFieldCategory, service: &::windows::core::HSTRING, displaytext: &::windows::core::HSTRING, verb: &super::super::Foundation::Uri) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).CreateInstantMessage_All)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(username), category, ::core::mem::transmute_copy(service), ::core::mem::transmute_copy(displaytext), verb.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).CreateInstantMessage_All)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(username), category, ::core::mem::transmute_copy(service), ::core::mem::transmute_copy(displaytext), ::core::mem::transmute_copy(verb), result__.as_mut_ptr()).from_abi::(result__) } } } @@ -2398,52 +2395,38 @@ pub struct AggregateContactManager(::windows::core::IUnknown); impl AggregateContactManager { #[doc = "*Required features: `\"Foundation_Collections\"`*"] #[cfg(feature = "Foundation_Collections")] - pub fn FindRawContactsAsync<'a, P0>(&self, contact: P0) -> ::windows::core::Result>> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, Contact>>, - { + pub fn FindRawContactsAsync(&self, contact: &Contact) -> ::windows::core::Result>> { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).FindRawContactsAsync)(::windows::core::Vtable::as_raw(this), contact.into().abi(), result__.as_mut_ptr()).from_abi::>>(result__) + (::windows::core::Vtable::vtable(this).FindRawContactsAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(contact), result__.as_mut_ptr()).from_abi::>>(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn TryLinkContactsAsync<'a, P0, P1>(&self, primarycontact: P0, secondarycontact: P1) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, Contact>>, - P1: ::std::convert::Into<::windows::core::InParam<'a, Contact>>, - { + pub fn TryLinkContactsAsync(&self, primarycontact: &Contact, secondarycontact: &Contact) -> ::windows::core::Result> { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).TryLinkContactsAsync)(::windows::core::Vtable::as_raw(this), primarycontact.into().abi(), secondarycontact.into().abi(), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).TryLinkContactsAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(primarycontact), ::core::mem::transmute_copy(secondarycontact), result__.as_mut_ptr()).from_abi::>(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn UnlinkRawContactAsync<'a, P0>(&self, contact: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, Contact>>, - { + pub fn UnlinkRawContactAsync(&self, contact: &Contact) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).UnlinkRawContactAsync)(::windows::core::Vtable::as_raw(this), contact.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).UnlinkRawContactAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(contact), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn TrySetPreferredSourceForPictureAsync<'a, P0, P1>(&self, aggregatecontact: P0, rawcontact: P1) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, Contact>>, - P1: ::std::convert::Into<::windows::core::InParam<'a, Contact>>, - { + pub fn TrySetPreferredSourceForPictureAsync(&self, aggregatecontact: &Contact, rawcontact: &Contact) -> ::windows::core::Result> { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).TrySetPreferredSourceForPictureAsync)(::windows::core::Vtable::as_raw(this), aggregatecontact.into().abi(), rawcontact.into().abi(), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).TrySetPreferredSourceForPictureAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(aggregatecontact), ::core::mem::transmute_copy(rawcontact), result__.as_mut_ptr()).from_abi::>(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -3333,14 +3316,11 @@ impl ContactAnnotationList { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn TrySaveAnnotationAsync<'a, P0>(&self, annotation: P0) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, ContactAnnotation>>, - { + pub fn TrySaveAnnotationAsync(&self, annotation: &ContactAnnotation) -> ::windows::core::Result> { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).TrySaveAnnotationAsync)(::windows::core::Vtable::as_raw(this), annotation.into().abi(), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).TrySaveAnnotationAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(annotation), result__.as_mut_ptr()).from_abi::>(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -3372,14 +3352,11 @@ impl ContactAnnotationList { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn DeleteAnnotationAsync<'a, P0>(&self, annotation: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, ContactAnnotation>>, - { + pub fn DeleteAnnotationAsync(&self, annotation: &ContactAnnotation) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).DeleteAnnotationAsync)(::windows::core::Vtable::as_raw(this), annotation.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).DeleteAnnotationAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(annotation), result__.as_mut_ptr()).from_abi::(result__) } } } @@ -3471,26 +3448,20 @@ impl ContactAnnotationStore { } #[doc = "*Required features: `\"Foundation_Collections\"`*"] #[cfg(feature = "Foundation_Collections")] - pub fn FindAnnotationsForContactAsync<'a, P0>(&self, contact: P0) -> ::windows::core::Result>> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, Contact>>, - { + pub fn FindAnnotationsForContactAsync(&self, contact: &Contact) -> ::windows::core::Result>> { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).FindAnnotationsForContactAsync)(::windows::core::Vtable::as_raw(this), contact.into().abi(), result__.as_mut_ptr()).from_abi::>>(result__) + (::windows::core::Vtable::vtable(this).FindAnnotationsForContactAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(contact), result__.as_mut_ptr()).from_abi::>>(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn DisableAnnotationAsync<'a, P0>(&self, annotation: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, ContactAnnotation>>, - { + pub fn DisableAnnotationAsync(&self, annotation: &ContactAnnotation) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).DisableAnnotationAsync)(::windows::core::Vtable::as_raw(this), annotation.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).DisableAnnotationAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(annotation), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -3698,12 +3669,9 @@ impl ContactCardDelayedDataLoader { let this = &::windows::core::Interface::cast::(self)?; unsafe { (::windows::core::Vtable::vtable(this).Close)(::windows::core::Vtable::as_raw(this)).ok() } } - pub fn SetData<'a, P0>(&self, contact: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, Contact>>, - { + pub fn SetData(&self, contact: &Contact) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).SetData)(::windows::core::Vtable::as_raw(this), contact.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetData)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(contact)).ok() } } } impl ::core::clone::Clone for ContactCardDelayedDataLoader { @@ -3990,12 +3958,9 @@ impl ContactChangeReader { let this = self; unsafe { (::windows::core::Vtable::vtable(this).AcceptChanges)(::windows::core::Vtable::as_raw(this)).ok() } } - pub fn AcceptChangesThrough<'a, P0>(&self, lastchangetoaccept: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, ContactChange>>, - { + pub fn AcceptChangesThrough(&self, lastchangetoaccept: &ContactChange) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).AcceptChangesThrough)(::windows::core::Vtable::as_raw(this), lastchangetoaccept.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).AcceptChangesThrough)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(lastchangetoaccept)).ok() } } #[doc = "*Required features: `\"Foundation_Collections\"`*"] #[cfg(feature = "Foundation_Collections")] @@ -4860,14 +4825,11 @@ impl ContactFieldFactory { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn CreateInstantMessage_All<'a, P0>(&self, username: &::windows::core::HSTRING, category: ContactFieldCategory, service: &::windows::core::HSTRING, displaytext: &::windows::core::HSTRING, verb: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::Uri>>, - { + pub fn CreateInstantMessage_All(&self, username: &::windows::core::HSTRING, category: ContactFieldCategory, service: &::windows::core::HSTRING, displaytext: &::windows::core::HSTRING, verb: &super::super::Foundation::Uri) -> ::windows::core::Result { let this = &::windows::core::Interface::cast::(self)?; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).CreateInstantMessage_All)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(username), category, ::core::mem::transmute_copy(service), ::core::mem::transmute_copy(displaytext), verb.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).CreateInstantMessage_All)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(username), category, ::core::mem::transmute_copy(service), ::core::mem::transmute_copy(displaytext), ::core::mem::transmute_copy(verb), result__.as_mut_ptr()).from_abi::(result__) } } pub fn CreateLocation_Default(&self, unstructuredaddress: &::windows::core::HSTRING) -> ::windows::core::Result { @@ -5294,13 +5256,10 @@ impl ContactInstantMessageField { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn CreateInstantMessage_All<'a, P0>(username: &::windows::core::HSTRING, category: ContactFieldCategory, service: &::windows::core::HSTRING, displaytext: &::windows::core::HSTRING, verb: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::Uri>>, - { + pub fn CreateInstantMessage_All(username: &::windows::core::HSTRING, category: ContactFieldCategory, service: &::windows::core::HSTRING, displaytext: &::windows::core::HSTRING, verb: &super::super::Foundation::Uri) -> ::windows::core::Result { Self::IContactInstantMessageFieldFactory(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).CreateInstantMessage_All)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(username), category, ::core::mem::transmute_copy(service), ::core::mem::transmute_copy(displaytext), verb.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).CreateInstantMessage_All)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(username), category, ::core::mem::transmute_copy(service), ::core::mem::transmute_copy(displaytext), ::core::mem::transmute_copy(verb), result__.as_mut_ptr()).from_abi::(result__) }) } #[doc(hidden)] @@ -5690,14 +5649,11 @@ impl ContactList { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn ContactChanged<'a, P0>(&self, value: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn ContactChanged(&self, value: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).ContactChanged)(::windows::core::Vtable::as_raw(this), value.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).ContactChanged)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -5749,38 +5705,29 @@ impl ContactList { (::windows::core::Vtable::vtable(this).GetContactReader)(::windows::core::Vtable::as_raw(this), result__.as_mut_ptr()).from_abi::(result__) } } - pub fn GetContactReaderWithOptions<'a, P0>(&self, options: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, ContactQueryOptions>>, - { + pub fn GetContactReaderWithOptions(&self, options: &ContactQueryOptions) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).GetContactReaderWithOptions)(::windows::core::Vtable::as_raw(this), options.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).GetContactReaderWithOptions)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(options), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn SaveContactAsync<'a, P0>(&self, contact: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, Contact>>, - { + pub fn SaveContactAsync(&self, contact: &Contact) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).SaveContactAsync)(::windows::core::Vtable::as_raw(this), contact.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).SaveContactAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(contact), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn DeleteContactAsync<'a, P0>(&self, contact: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, Contact>>, - { + pub fn DeleteContactAsync(&self, contact: &Contact) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).DeleteContactAsync)(::windows::core::Vtable::as_raw(this), contact.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).DeleteContactAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(contact), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -5897,14 +5844,11 @@ pub struct ContactListLimitedWriteOperations(::windows::core::IUnknown); impl ContactListLimitedWriteOperations { #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn TryCreateOrUpdateContactAsync<'a, P0>(&self, contact: P0) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, Contact>>, - { + pub fn TryCreateOrUpdateContactAsync(&self, contact: &Contact) -> ::windows::core::Result> { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).TryCreateOrUpdateContactAsync)(::windows::core::Vtable::as_raw(this), contact.into().abi(), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).TryCreateOrUpdateContactAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(contact), result__.as_mut_ptr()).from_abi::>(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -6614,14 +6558,11 @@ impl ContactListSyncManager { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn SyncStatusChanged<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn SyncStatusChanged(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).SyncStatusChanged)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).SyncStatusChanged)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -6897,29 +6838,20 @@ pub struct ContactManager; impl ContactManager { #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn ShowContactCard<'a, P0>(contact: P0, selection: super::super::Foundation::Rect) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, Contact>>, - { - Self::IContactManagerStatics(|this| unsafe { (::windows::core::Vtable::vtable(this).ShowContactCard)(::windows::core::Vtable::as_raw(this), contact.into().abi(), selection).ok() }) + pub fn ShowContactCard(contact: &Contact, selection: super::super::Foundation::Rect) -> ::windows::core::Result<()> { + Self::IContactManagerStatics(|this| unsafe { (::windows::core::Vtable::vtable(this).ShowContactCard)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(contact), selection).ok() }) } #[doc = "*Required features: `\"Foundation\"`, `\"UI_Popups\"`*"] #[cfg(all(feature = "Foundation", feature = "UI_Popups"))] - pub fn ShowContactCardWithPlacement<'a, P0>(contact: P0, selection: super::super::Foundation::Rect, preferredplacement: super::super::UI::Popups::Placement) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, Contact>>, - { - Self::IContactManagerStatics(|this| unsafe { (::windows::core::Vtable::vtable(this).ShowContactCardWithPlacement)(::windows::core::Vtable::as_raw(this), contact.into().abi(), selection, preferredplacement).ok() }) + pub fn ShowContactCardWithPlacement(contact: &Contact, selection: super::super::Foundation::Rect, preferredplacement: super::super::UI::Popups::Placement) -> ::windows::core::Result<()> { + Self::IContactManagerStatics(|this| unsafe { (::windows::core::Vtable::vtable(this).ShowContactCardWithPlacement)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(contact), selection, preferredplacement).ok() }) } #[doc = "*Required features: `\"Foundation\"`, `\"UI_Popups\"`*"] #[cfg(all(feature = "Foundation", feature = "UI_Popups"))] - pub fn ShowDelayLoadedContactCard<'a, P0>(contact: P0, selection: super::super::Foundation::Rect, preferredplacement: super::super::UI::Popups::Placement) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, Contact>>, - { + pub fn ShowDelayLoadedContactCard(contact: &Contact, selection: super::super::Foundation::Rect, preferredplacement: super::super::UI::Popups::Placement) -> ::windows::core::Result { Self::IContactManagerStatics(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).ShowDelayLoadedContactCard)(::windows::core::Vtable::as_raw(this), contact.into().abi(), selection, preferredplacement, result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).ShowDelayLoadedContactCard)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(contact), selection, preferredplacement, result__.as_mut_ptr()).from_abi::(result__) }) } #[doc = "*Required features: `\"Foundation\"`*"] @@ -6932,24 +6864,18 @@ impl ContactManager { } #[doc = "*Required features: `\"Foundation\"`, `\"Storage_Streams\"`*"] #[cfg(all(feature = "Foundation", feature = "Storage_Streams"))] - pub fn ConvertContactToVCardAsync<'a, P0>(contact: P0) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, Contact>>, - { + pub fn ConvertContactToVCardAsync(contact: &Contact) -> ::windows::core::Result> { Self::IContactManagerStatics3(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).ConvertContactToVCardAsync)(::windows::core::Vtable::as_raw(this), contact.into().abi(), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).ConvertContactToVCardAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(contact), result__.as_mut_ptr()).from_abi::>(result__) }) } #[doc = "*Required features: `\"Foundation\"`, `\"Storage_Streams\"`*"] #[cfg(all(feature = "Foundation", feature = "Storage_Streams"))] - pub fn ConvertContactToVCardAsyncWithMaxBytes<'a, P0>(contact: P0, maxbytes: u32) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, Contact>>, - { + pub fn ConvertContactToVCardAsyncWithMaxBytes(contact: &Contact, maxbytes: u32) -> ::windows::core::Result> { Self::IContactManagerStatics3(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).ConvertContactToVCardAsyncWithMaxBytes)(::windows::core::Vtable::as_raw(this), contact.into().abi(), maxbytes, result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).ConvertContactToVCardAsyncWithMaxBytes)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(contact), maxbytes, result__.as_mut_ptr()).from_abi::>(result__) }) } #[doc = "*Required features: `\"Foundation\"`, `\"Storage_Streams\"`*"] @@ -6988,12 +6914,8 @@ impl ContactManager { } #[doc = "*Required features: `\"Foundation\"`, `\"UI_Popups\"`*"] #[cfg(all(feature = "Foundation", feature = "UI_Popups"))] - pub fn ShowContactCardWithOptions<'a, P0, P1>(contact: P0, selection: super::super::Foundation::Rect, preferredplacement: super::super::UI::Popups::Placement, contactcardoptions: P1) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, Contact>>, - P1: ::std::convert::Into<::windows::core::InParam<'a, ContactCardOptions>>, - { - Self::IContactManagerStatics3(|this| unsafe { (::windows::core::Vtable::vtable(this).ShowContactCardWithOptions)(::windows::core::Vtable::as_raw(this), contact.into().abi(), selection, preferredplacement, contactcardoptions.into().abi()).ok() }) + pub fn ShowContactCardWithOptions(contact: &Contact, selection: super::super::Foundation::Rect, preferredplacement: super::super::UI::Popups::Placement, contactcardoptions: &ContactCardOptions) -> ::windows::core::Result<()> { + Self::IContactManagerStatics3(|this| unsafe { (::windows::core::Vtable::vtable(this).ShowContactCardWithOptions)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(contact), selection, preferredplacement, ::core::mem::transmute_copy(contactcardoptions)).ok() }) } pub fn IsShowDelayLoadedContactCardSupported() -> ::windows::core::Result { Self::IContactManagerStatics3(|this| unsafe { @@ -7003,22 +6925,14 @@ impl ContactManager { } #[doc = "*Required features: `\"Foundation\"`, `\"UI_Popups\"`*"] #[cfg(all(feature = "Foundation", feature = "UI_Popups"))] - pub fn ShowDelayLoadedContactCardWithOptions<'a, P0, P1>(contact: P0, selection: super::super::Foundation::Rect, preferredplacement: super::super::UI::Popups::Placement, contactcardoptions: P1) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, Contact>>, - P1: ::std::convert::Into<::windows::core::InParam<'a, ContactCardOptions>>, - { + pub fn ShowDelayLoadedContactCardWithOptions(contact: &Contact, selection: super::super::Foundation::Rect, preferredplacement: super::super::UI::Popups::Placement, contactcardoptions: &ContactCardOptions) -> ::windows::core::Result { Self::IContactManagerStatics3(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).ShowDelayLoadedContactCardWithOptions)(::windows::core::Vtable::as_raw(this), contact.into().abi(), selection, preferredplacement, contactcardoptions.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).ShowDelayLoadedContactCardWithOptions)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(contact), selection, preferredplacement, ::core::mem::transmute_copy(contactcardoptions), result__.as_mut_ptr()).from_abi::(result__) }) } - pub fn ShowFullContactCard<'a, P0, P1>(contact: P0, fullcontactcardoptions: P1) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, Contact>>, - P1: ::std::convert::Into<::windows::core::InParam<'a, FullContactCardOptions>>, - { - Self::IContactManagerStatics3(|this| unsafe { (::windows::core::Vtable::vtable(this).ShowFullContactCard)(::windows::core::Vtable::as_raw(this), contact.into().abi(), fullcontactcardoptions.into().abi()).ok() }) + pub fn ShowFullContactCard(contact: &Contact, fullcontactcardoptions: &FullContactCardOptions) -> ::windows::core::Result<()> { + Self::IContactManagerStatics3(|this| unsafe { (::windows::core::Vtable::vtable(this).ShowFullContactCard)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(contact), ::core::mem::transmute_copy(fullcontactcardoptions)).ok() }) } pub fn SystemDisplayNameOrder() -> ::windows::core::Result { Self::IContactManagerStatics3(|this| unsafe { @@ -7040,13 +6954,10 @@ impl ContactManager { } #[doc = "*Required features: `\"System\"`*"] #[cfg(feature = "System")] - pub fn GetForUser<'a, P0>(user: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::System::User>>, - { + pub fn GetForUser(user: &super::super::System::User) -> ::windows::core::Result { Self::IContactManagerStatics4(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).GetForUser)(::windows::core::Vtable::as_raw(this), user.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).GetForUser)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(user), result__.as_mut_ptr()).from_abi::(result__) }) } #[doc = "*Required features: `\"Foundation\"`*"] @@ -7101,26 +7012,20 @@ pub struct ContactManagerForUser(::windows::core::IUnknown); impl ContactManagerForUser { #[doc = "*Required features: `\"Foundation\"`, `\"Storage_Streams\"`*"] #[cfg(all(feature = "Foundation", feature = "Storage_Streams"))] - pub fn ConvertContactToVCardAsync<'a, P0>(&self, contact: P0) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, Contact>>, - { + pub fn ConvertContactToVCardAsync(&self, contact: &Contact) -> ::windows::core::Result> { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).ConvertContactToVCardAsync)(::windows::core::Vtable::as_raw(this), contact.into().abi(), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).ConvertContactToVCardAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(contact), result__.as_mut_ptr()).from_abi::>(result__) } } #[doc = "*Required features: `\"Foundation\"`, `\"Storage_Streams\"`*"] #[cfg(all(feature = "Foundation", feature = "Storage_Streams"))] - pub fn ConvertContactToVCardAsyncWithMaxBytes<'a, P0>(&self, contact: P0, maxbytes: u32) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, Contact>>, - { + pub fn ConvertContactToVCardAsyncWithMaxBytes(&self, contact: &Contact, maxbytes: u32) -> ::windows::core::Result> { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).ConvertContactToVCardAsyncWithMaxBytes)(::windows::core::Vtable::as_raw(this), contact.into().abi(), maxbytes, result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).ConvertContactToVCardAsyncWithMaxBytes)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(contact), maxbytes, result__.as_mut_ptr()).from_abi::>(result__) } } #[doc = "*Required features: `\"Foundation\"`, `\"Storage_Streams\"`*"] @@ -7185,13 +7090,9 @@ impl ContactManagerForUser { (::windows::core::Vtable::vtable(this).User)(::windows::core::Vtable::as_raw(this), result__.as_mut_ptr()).from_abi::(result__) } } - pub fn ShowFullContactCard<'a, P0, P1>(&self, contact: P0, fullcontactcardoptions: P1) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, Contact>>, - P1: ::std::convert::Into<::windows::core::InParam<'a, FullContactCardOptions>>, - { + pub fn ShowFullContactCard(&self, contact: &Contact, fullcontactcardoptions: &FullContactCardOptions) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).ShowFullContactCard)(::windows::core::Vtable::as_raw(this), contact.into().abi(), fullcontactcardoptions.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).ShowFullContactCard)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(contact), ::core::mem::transmute_copy(fullcontactcardoptions)).ok() } } } impl ::core::clone::Clone for ContactManagerForUser { @@ -7379,14 +7280,11 @@ impl ContactPanel { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn LaunchFullAppRequested<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn LaunchFullAppRequested(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).LaunchFullAppRequested)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).LaunchFullAppRequested)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -7397,14 +7295,11 @@ impl ContactPanel { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn Closing<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn Closing(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).Closing)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).Closing)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -7843,13 +7738,10 @@ impl ContactPicker { } #[doc = "*Required features: `\"System\"`*"] #[cfg(feature = "System")] - pub fn CreateForUser<'a, P0>(user: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::System::User>>, - { + pub fn CreateForUser(user: &super::super::System::User) -> ::windows::core::Result { Self::IContactPickerStatics(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).CreateForUser)(::windows::core::Vtable::as_raw(this), user.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).CreateForUser)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(user), result__.as_mut_ptr()).from_abi::(result__) }) } #[doc = "*Required features: `\"Foundation\"`*"] @@ -8196,14 +8088,11 @@ impl ContactReader { } #[doc = "*Required features: `\"Foundation_Collections\"`*"] #[cfg(feature = "Foundation_Collections")] - pub fn GetMatchingPropertiesWithMatchReason<'a, P0>(&self, contact: P0) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, Contact>>, - { + pub fn GetMatchingPropertiesWithMatchReason(&self, contact: &Contact) -> ::windows::core::Result> { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).GetMatchingPropertiesWithMatchReason)(::windows::core::Vtable::as_raw(this), contact.into().abi(), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).GetMatchingPropertiesWithMatchReason)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(contact), result__.as_mut_ptr()).from_abi::>(result__) } } } @@ -8420,14 +8309,11 @@ impl ContactStore { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn ContactChanged<'a, P0>(&self, value: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn ContactChanged(&self, value: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = &::windows::core::Interface::cast::(self)?; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).ContactChanged)(::windows::core::Vtable::as_raw(this), value.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).ContactChanged)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -8486,14 +8372,11 @@ impl ContactStore { (::windows::core::Vtable::vtable(this).GetContactReader)(::windows::core::Vtable::as_raw(this), result__.as_mut_ptr()).from_abi::(result__) } } - pub fn GetContactReaderWithOptions<'a, P0>(&self, options: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, ContactQueryOptions>>, - { + pub fn GetContactReaderWithOptions(&self, options: &ContactQueryOptions) -> ::windows::core::Result { let this = &::windows::core::Interface::cast::(self)?; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).GetContactReaderWithOptions)(::windows::core::Vtable::as_raw(this), options.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).GetContactReaderWithOptions)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(options), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -8667,12 +8550,9 @@ impl ContactWebsite { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn SetUri<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::Uri>>, - { + pub fn SetUri(&self, value: &super::super::Foundation::Uri) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).SetUri)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetUri)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } pub fn Description(&self) -> ::windows::core::Result<::windows::core::HSTRING> { let this = self; @@ -9014,26 +8894,20 @@ impl PinnedContactManager { (::windows::core::Vtable::vtable(this).IsPinSurfaceSupported)(::windows::core::Vtable::as_raw(this), surface, result__.as_mut_ptr()).from_abi::(result__) } } - pub fn IsContactPinned<'a, P0>(&self, contact: P0, surface: PinnedContactSurface) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, Contact>>, - { + pub fn IsContactPinned(&self, contact: &Contact, surface: PinnedContactSurface) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).IsContactPinned)(::windows::core::Vtable::as_raw(this), contact.into().abi(), surface, result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).IsContactPinned)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(contact), surface, result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn RequestPinContactAsync<'a, P0>(&self, contact: P0, surface: PinnedContactSurface) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, Contact>>, - { + pub fn RequestPinContactAsync(&self, contact: &Contact, surface: PinnedContactSurface) -> ::windows::core::Result> { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).RequestPinContactAsync)(::windows::core::Vtable::as_raw(this), contact.into().abi(), surface, result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).RequestPinContactAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(contact), surface, result__.as_mut_ptr()).from_abi::>(result__) } } #[doc = "*Required features: `\"Foundation_Collections\"`*"] @@ -9051,22 +8925,16 @@ impl PinnedContactManager { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn RequestUnpinContactAsync<'a, P0>(&self, contact: P0, surface: PinnedContactSurface) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, Contact>>, - { + pub fn RequestUnpinContactAsync(&self, contact: &Contact, surface: PinnedContactSurface) -> ::windows::core::Result> { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).RequestUnpinContactAsync)(::windows::core::Vtable::as_raw(this), contact.into().abi(), surface, result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).RequestUnpinContactAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(contact), surface, result__.as_mut_ptr()).from_abi::>(result__) } } - pub fn SignalContactActivity<'a, P0>(&self, contact: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, Contact>>, - { + pub fn SignalContactActivity(&self, contact: &Contact) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).SignalContactActivity)(::windows::core::Vtable::as_raw(this), contact.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SignalContactActivity)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(contact)).ok() } } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] @@ -9085,13 +8953,10 @@ impl PinnedContactManager { } #[doc = "*Required features: `\"System\"`*"] #[cfg(feature = "System")] - pub fn GetForUser<'a, P0>(user: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::System::User>>, - { + pub fn GetForUser(user: &super::super::System::User) -> ::windows::core::Result { Self::IPinnedContactManagerStatics(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).GetForUser)(::windows::core::Vtable::as_raw(this), user.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).GetForUser)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(user), result__.as_mut_ptr()).from_abi::(result__) }) } pub fn IsSupported() -> ::windows::core::Result { diff --git a/crates/libs/windows/src/Windows/ApplicationModel/ConversationalAgent/mod.rs b/crates/libs/windows/src/Windows/ApplicationModel/ConversationalAgent/mod.rs index 11b181a59f..92ad2de94c 100644 --- a/crates/libs/windows/src/Windows/ApplicationModel/ConversationalAgent/mod.rs +++ b/crates/libs/windows/src/Windows/ApplicationModel/ConversationalAgent/mod.rs @@ -628,14 +628,11 @@ impl ActivationSignalDetectionConfiguration { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn AvailabilityChanged<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn AvailabilityChanged(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).AvailabilityChanged)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).AvailabilityChanged)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -1395,14 +1392,11 @@ impl ConversationalAgentSession { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn SessionInterrupted<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn SessionInterrupted(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).SessionInterrupted)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).SessionInterrupted)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -1413,14 +1407,11 @@ impl ConversationalAgentSession { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn SignalDetected<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn SignalDetected(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).SignalDetected)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).SignalDetected)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -1431,14 +1422,11 @@ impl ConversationalAgentSession { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn SystemStateChanged<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn SystemStateChanged(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).SystemStateChanged)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).SystemStateChanged)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -1569,26 +1557,20 @@ impl ConversationalAgentSession { } #[doc = "*Required features: `\"Foundation\"`, `\"Media_Audio\"`*"] #[cfg(all(feature = "Foundation", feature = "Media_Audio"))] - pub fn CreateAudioDeviceInputNodeAsync<'a, P0>(&self, graph: P0) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Media::Audio::AudioGraph>>, - { + pub fn CreateAudioDeviceInputNodeAsync(&self, graph: &super::super::Media::Audio::AudioGraph) -> ::windows::core::Result> { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).CreateAudioDeviceInputNodeAsync)(::windows::core::Vtable::as_raw(this), graph.into().abi(), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).CreateAudioDeviceInputNodeAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(graph), result__.as_mut_ptr()).from_abi::>(result__) } } #[doc = "*Required features: `\"Media_Audio\"`*"] #[cfg(feature = "Media_Audio")] - pub fn CreateAudioDeviceInputNode<'a, P0>(&self, graph: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Media::Audio::AudioGraph>>, - { + pub fn CreateAudioDeviceInputNode(&self, graph: &super::super::Media::Audio::AudioGraph) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).CreateAudioDeviceInputNode)(::windows::core::Vtable::as_raw(this), graph.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).CreateAudioDeviceInputNode)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(graph), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] diff --git a/crates/libs/windows/src/Windows/ApplicationModel/Core/mod.rs b/crates/libs/windows/src/Windows/ApplicationModel/Core/mod.rs index 3c239994b1..3b06586a25 100644 --- a/crates/libs/windows/src/Windows/ApplicationModel/Core/mod.rs +++ b/crates/libs/windows/src/Windows/ApplicationModel/Core/mod.rs @@ -196,14 +196,11 @@ pub struct ICoreApplicationUnhandledError(::windows::core::IUnknown); impl ICoreApplicationUnhandledError { #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn UnhandledErrorDetected<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::EventHandler>>, - { + pub fn UnhandledErrorDetected(&self, handler: &super::super::Foundation::EventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).UnhandledErrorDetected)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).UnhandledErrorDetected)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -497,21 +494,15 @@ pub struct ICoreImmersiveApplication3_Vtbl { #[repr(transparent)] pub struct IFrameworkView(::windows::core::IUnknown); impl IFrameworkView { - pub fn Initialize<'a, P0>(&self, applicationview: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, CoreApplicationView>>, - { + pub fn Initialize(&self, applicationview: &CoreApplicationView) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).Initialize)(::windows::core::Vtable::as_raw(this), applicationview.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).Initialize)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(applicationview)).ok() } } #[doc = "*Required features: `\"UI_Core\"`*"] #[cfg(feature = "UI_Core")] - pub fn SetWindow<'a, P0>(&self, window: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::UI::Core::CoreWindow>>, - { + pub fn SetWindow(&self, window: &super::super::UI::Core::CoreWindow) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).SetWindow)(::windows::core::Vtable::as_raw(this), window.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetWindow)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(window)).ok() } } pub fn Load(&self, entrypoint: &::windows::core::HSTRING) -> ::windows::core::Result<()> { let this = self; @@ -753,14 +744,11 @@ impl AppListEntry { } #[doc = "*Required features: `\"Foundation\"`, `\"System\"`*"] #[cfg(all(feature = "Foundation", feature = "System"))] - pub fn LaunchForUserAsync<'a, P0>(&self, user: P0) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::System::User>>, - { + pub fn LaunchForUserAsync(&self, user: &super::super::System::User) -> ::windows::core::Result> { let this = &::windows::core::Interface::cast::(self)?; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).LaunchForUserAsync)(::windows::core::Vtable::as_raw(this), user.into().abi(), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).LaunchForUserAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(user), result__.as_mut_ptr()).from_abi::>(result__) } } pub fn AppInfo(&self) -> ::windows::core::Result { @@ -846,13 +834,10 @@ impl CoreApplication { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn Suspending<'a, P0>(handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::EventHandler>>, - { + pub fn Suspending(handler: &super::super::Foundation::EventHandler) -> ::windows::core::Result { Self::ICoreApplication(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).Suspending)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).Suspending)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) }) } #[doc = "*Required features: `\"Foundation\"`*"] @@ -862,13 +847,10 @@ impl CoreApplication { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn Resuming<'a, P0>(handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::EventHandler<::windows::core::IInspectable>>>, - { + pub fn Resuming(handler: &super::super::Foundation::EventHandler<::windows::core::IInspectable>) -> ::windows::core::Result { Self::ICoreApplication(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).Resuming)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).Resuming)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) }) } #[doc = "*Required features: `\"Foundation\"`*"] @@ -908,13 +890,10 @@ impl CoreApplication { } #[doc = "*Required features: `\"ApplicationModel_Activation\"`, `\"Foundation\"`*"] #[cfg(all(feature = "ApplicationModel_Activation", feature = "Foundation"))] - pub fn BackgroundActivated<'a, P0>(handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::EventHandler>>, - { + pub fn BackgroundActivated(handler: &super::super::Foundation::EventHandler) -> ::windows::core::Result { Self::ICoreApplication2(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).BackgroundActivated)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).BackgroundActivated)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) }) } #[doc = "*Required features: `\"Foundation\"`*"] @@ -924,13 +903,10 @@ impl CoreApplication { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn LeavingBackground<'a, P0>(handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::EventHandler>>, - { + pub fn LeavingBackground(handler: &super::super::Foundation::EventHandler) -> ::windows::core::Result { Self::ICoreApplication2(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).LeavingBackground)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).LeavingBackground)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) }) } #[doc = "*Required features: `\"Foundation\"`*"] @@ -940,13 +916,10 @@ impl CoreApplication { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn EnteredBackground<'a, P0>(handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::EventHandler>>, - { + pub fn EnteredBackground(handler: &super::super::Foundation::EventHandler) -> ::windows::core::Result { Self::ICoreApplication2(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).EnteredBackground)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).EnteredBackground)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) }) } #[doc = "*Required features: `\"Foundation\"`*"] @@ -967,13 +940,10 @@ impl CoreApplication { } #[doc = "*Required features: `\"Foundation\"`, `\"System\"`*"] #[cfg(all(feature = "Foundation", feature = "System"))] - pub fn RequestRestartForUserAsync<'a, P0>(user: P0, launcharguments: &::windows::core::HSTRING) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::System::User>>, - { + pub fn RequestRestartForUserAsync(user: &super::super::System::User, launcharguments: &::windows::core::HSTRING) -> ::windows::core::Result> { Self::ICoreApplication3(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).RequestRestartForUserAsync)(::windows::core::Vtable::as_raw(this), user.into().abi(), ::core::mem::transmute_copy(launcharguments), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).RequestRestartForUserAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(user), ::core::mem::transmute_copy(launcharguments), result__.as_mut_ptr()).from_abi::>(result__) }) } pub fn Exit() -> ::windows::core::Result<()> { @@ -981,13 +951,10 @@ impl CoreApplication { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn Exiting<'a, P0>(handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::EventHandler<::windows::core::IInspectable>>>, - { + pub fn Exiting(handler: &super::super::Foundation::EventHandler<::windows::core::IInspectable>) -> ::windows::core::Result { Self::ICoreApplicationExit(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).Exiting)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).Exiting)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) }) } #[doc = "*Required features: `\"Foundation\"`*"] @@ -997,13 +964,10 @@ impl CoreApplication { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn UnhandledErrorDetected<'a, P0>(handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::EventHandler>>, - { + pub fn UnhandledErrorDetected(handler: &super::super::Foundation::EventHandler) -> ::windows::core::Result { Self::ICoreApplicationUnhandledError(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).UnhandledErrorDetected)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).UnhandledErrorDetected)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) }) } #[doc = "*Required features: `\"Foundation\"`*"] @@ -1117,14 +1081,11 @@ impl CoreApplicationView { } #[doc = "*Required features: `\"ApplicationModel_Activation\"`, `\"Foundation\"`*"] #[cfg(all(feature = "ApplicationModel_Activation", feature = "Foundation"))] - pub fn Activated<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn Activated(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).Activated)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).Activated)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -1172,14 +1133,11 @@ impl CoreApplicationView { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn HostedViewClosing<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn HostedViewClosing(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = &::windows::core::Interface::cast::(self)?; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).HostedViewClosing)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).HostedViewClosing)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -1307,14 +1265,11 @@ impl CoreApplicationViewTitleBar { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn LayoutMetricsChanged<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn LayoutMetricsChanged(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).LayoutMetricsChanged)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).LayoutMetricsChanged)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -1332,14 +1287,11 @@ impl CoreApplicationViewTitleBar { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn IsVisibleChanged<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn IsVisibleChanged(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).IsVisibleChanged)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).IsVisibleChanged)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] diff --git a/crates/libs/windows/src/Windows/ApplicationModel/DataTransfer/DragDrop/Core/mod.rs b/crates/libs/windows/src/Windows/ApplicationModel/DataTransfer/DragDrop/Core/mod.rs index 3cd0a305cb..ba8627a22c 100644 --- a/crates/libs/windows/src/Windows/ApplicationModel/DataTransfer/DragDrop/Core/mod.rs +++ b/crates/libs/windows/src/Windows/ApplicationModel/DataTransfer/DragDrop/Core/mod.rs @@ -155,52 +155,38 @@ pub struct ICoreDropOperationTarget(::windows::core::IUnknown); impl ICoreDropOperationTarget { #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn EnterAsync<'a, P0, P1>(&self, draginfo: P0, draguioverride: P1) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, CoreDragInfo>>, - P1: ::std::convert::Into<::windows::core::InParam<'a, CoreDragUIOverride>>, - { + pub fn EnterAsync(&self, draginfo: &CoreDragInfo, draguioverride: &CoreDragUIOverride) -> ::windows::core::Result> { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).EnterAsync)(::windows::core::Vtable::as_raw(this), draginfo.into().abi(), draguioverride.into().abi(), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).EnterAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(draginfo), ::core::mem::transmute_copy(draguioverride), result__.as_mut_ptr()).from_abi::>(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn OverAsync<'a, P0, P1>(&self, draginfo: P0, draguioverride: P1) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, CoreDragInfo>>, - P1: ::std::convert::Into<::windows::core::InParam<'a, CoreDragUIOverride>>, - { + pub fn OverAsync(&self, draginfo: &CoreDragInfo, draguioverride: &CoreDragUIOverride) -> ::windows::core::Result> { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).OverAsync)(::windows::core::Vtable::as_raw(this), draginfo.into().abi(), draguioverride.into().abi(), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).OverAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(draginfo), ::core::mem::transmute_copy(draguioverride), result__.as_mut_ptr()).from_abi::>(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn LeaveAsync<'a, P0>(&self, draginfo: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, CoreDragInfo>>, - { + pub fn LeaveAsync(&self, draginfo: &CoreDragInfo) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).LeaveAsync)(::windows::core::Vtable::as_raw(this), draginfo.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).LeaveAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(draginfo), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn DropAsync<'a, P0>(&self, draginfo: P0) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, CoreDragInfo>>, - { + pub fn DropAsync(&self, draginfo: &CoreDragInfo) -> ::windows::core::Result> { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).DropAsync)(::windows::core::Vtable::as_raw(this), draginfo.into().abi(), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).DropAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(draginfo), result__.as_mut_ptr()).from_abi::>(result__) } } } @@ -305,14 +291,11 @@ pub struct CoreDragDropManager(::windows::core::IUnknown); impl CoreDragDropManager { #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn TargetRequested<'a, P0>(&self, value: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::super::Foundation::TypedEventHandler>>, - { + pub fn TargetRequested(&self, value: &super::super::super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).TargetRequested)(::windows::core::Vtable::as_raw(this), value.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).TargetRequested)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -531,21 +514,15 @@ impl CoreDragOperation { } #[doc = "*Required features: `\"Graphics_Imaging\"`*"] #[cfg(feature = "Graphics_Imaging")] - pub fn SetDragUIContentFromSoftwareBitmap<'a, P0>(&self, softwarebitmap: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::super::Graphics::Imaging::SoftwareBitmap>>, - { + pub fn SetDragUIContentFromSoftwareBitmap(&self, softwarebitmap: &super::super::super::super::Graphics::Imaging::SoftwareBitmap) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).SetDragUIContentFromSoftwareBitmap)(::windows::core::Vtable::as_raw(this), softwarebitmap.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetDragUIContentFromSoftwareBitmap)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(softwarebitmap)).ok() } } #[doc = "*Required features: `\"Foundation\"`, `\"Graphics_Imaging\"`*"] #[cfg(all(feature = "Foundation", feature = "Graphics_Imaging"))] - pub fn SetDragUIContentFromSoftwareBitmapWithAnchorPoint<'a, P0>(&self, softwarebitmap: P0, anchorpoint: super::super::super::super::Foundation::Point) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::super::Graphics::Imaging::SoftwareBitmap>>, - { + pub fn SetDragUIContentFromSoftwareBitmapWithAnchorPoint(&self, softwarebitmap: &super::super::super::super::Graphics::Imaging::SoftwareBitmap, anchorpoint: super::super::super::super::Foundation::Point) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).SetDragUIContentFromSoftwareBitmapWithAnchorPoint)(::windows::core::Vtable::as_raw(this), softwarebitmap.into().abi(), anchorpoint).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetDragUIContentFromSoftwareBitmapWithAnchorPoint)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(softwarebitmap), anchorpoint).ok() } } pub fn DragUIContentMode(&self) -> ::windows::core::Result { let this = self; @@ -649,21 +626,15 @@ pub struct CoreDragUIOverride(::windows::core::IUnknown); impl CoreDragUIOverride { #[doc = "*Required features: `\"Graphics_Imaging\"`*"] #[cfg(feature = "Graphics_Imaging")] - pub fn SetContentFromSoftwareBitmap<'a, P0>(&self, softwarebitmap: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::super::Graphics::Imaging::SoftwareBitmap>>, - { + pub fn SetContentFromSoftwareBitmap(&self, softwarebitmap: &super::super::super::super::Graphics::Imaging::SoftwareBitmap) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).SetContentFromSoftwareBitmap)(::windows::core::Vtable::as_raw(this), softwarebitmap.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetContentFromSoftwareBitmap)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(softwarebitmap)).ok() } } #[doc = "*Required features: `\"Foundation\"`, `\"Graphics_Imaging\"`*"] #[cfg(all(feature = "Foundation", feature = "Graphics_Imaging"))] - pub fn SetContentFromSoftwareBitmapWithAnchorPoint<'a, P0>(&self, softwarebitmap: P0, anchorpoint: super::super::super::super::Foundation::Point) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::super::Graphics::Imaging::SoftwareBitmap>>, - { + pub fn SetContentFromSoftwareBitmapWithAnchorPoint(&self, softwarebitmap: &super::super::super::super::Graphics::Imaging::SoftwareBitmap, anchorpoint: super::super::super::super::Foundation::Point) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).SetContentFromSoftwareBitmapWithAnchorPoint)(::windows::core::Vtable::as_raw(this), softwarebitmap.into().abi(), anchorpoint).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetContentFromSoftwareBitmapWithAnchorPoint)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(softwarebitmap), anchorpoint).ok() } } pub fn IsContentVisible(&self) -> ::windows::core::Result { let this = self; diff --git a/crates/libs/windows/src/Windows/ApplicationModel/DataTransfer/ShareTarget/mod.rs b/crates/libs/windows/src/Windows/ApplicationModel/DataTransfer/ShareTarget/mod.rs index efb22a37f4..622ab5b144 100644 --- a/crates/libs/windows/src/Windows/ApplicationModel/DataTransfer/ShareTarget/mod.rs +++ b/crates/libs/windows/src/Windows/ApplicationModel/DataTransfer/ShareTarget/mod.rs @@ -121,12 +121,9 @@ impl QuickLink { } #[doc = "*Required features: `\"Storage_Streams\"`*"] #[cfg(feature = "Storage_Streams")] - pub fn SetThumbnail<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Storage::Streams::RandomAccessStreamReference>>, - { + pub fn SetThumbnail(&self, value: &super::super::super::Storage::Streams::RandomAccessStreamReference) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).SetThumbnail)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetThumbnail)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } pub fn Id(&self) -> ::windows::core::Result<::windows::core::HSTRING> { let this = self; @@ -254,12 +251,9 @@ impl ShareOperation { let this = self; unsafe { (::windows::core::Vtable::vtable(this).ReportSubmittedBackgroundTask)(::windows::core::Vtable::as_raw(this)).ok() } } - pub fn ReportCompletedWithQuickLink<'a, P0>(&self, quicklink: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, QuickLink>>, - { + pub fn ReportCompletedWithQuickLink(&self, quicklink: &QuickLink) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).ReportCompletedWithQuickLink)(::windows::core::Vtable::as_raw(this), quicklink.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).ReportCompletedWithQuickLink)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(quicklink)).ok() } } pub fn ReportCompleted(&self) -> ::windows::core::Result<()> { let this = self; diff --git a/crates/libs/windows/src/Windows/ApplicationModel/DataTransfer/mod.rs b/crates/libs/windows/src/Windows/ApplicationModel/DataTransfer/mod.rs index 61af362285..2ee19f94a2 100644 --- a/crates/libs/windows/src/Windows/ApplicationModel/DataTransfer/mod.rs +++ b/crates/libs/windows/src/Windows/ApplicationModel/DataTransfer/mod.rs @@ -1097,11 +1097,8 @@ impl Clipboard { (::windows::core::Vtable::vtable(this).GetContent)(::windows::core::Vtable::as_raw(this), result__.as_mut_ptr()).from_abi::(result__) }) } - pub fn SetContent<'a, P0>(content: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, DataPackage>>, - { - Self::IClipboardStatics(|this| unsafe { (::windows::core::Vtable::vtable(this).SetContent)(::windows::core::Vtable::as_raw(this), content.into().abi()).ok() }) + pub fn SetContent(content: &DataPackage) -> ::windows::core::Result<()> { + Self::IClipboardStatics(|this| unsafe { (::windows::core::Vtable::vtable(this).SetContent)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(content)).ok() }) } pub fn Flush() -> ::windows::core::Result<()> { Self::IClipboardStatics(|this| unsafe { (::windows::core::Vtable::vtable(this).Flush)(::windows::core::Vtable::as_raw(this)).ok() }) @@ -1111,13 +1108,10 @@ impl Clipboard { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn ContentChanged<'a, P0>(handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::EventHandler<::windows::core::IInspectable>>>, - { + pub fn ContentChanged(handler: &super::super::Foundation::EventHandler<::windows::core::IInspectable>) -> ::windows::core::Result { Self::IClipboardStatics(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).ContentChanged)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).ContentChanged)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) }) } #[doc = "*Required features: `\"Foundation\"`*"] @@ -1139,22 +1133,16 @@ impl Clipboard { (::windows::core::Vtable::vtable(this).ClearHistory)(::windows::core::Vtable::as_raw(this), result__.as_mut_ptr()).from_abi::(result__) }) } - pub fn DeleteItemFromHistory<'a, P0>(item: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, ClipboardHistoryItem>>, - { + pub fn DeleteItemFromHistory(item: &ClipboardHistoryItem) -> ::windows::core::Result { Self::IClipboardStatics2(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).DeleteItemFromHistory)(::windows::core::Vtable::as_raw(this), item.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).DeleteItemFromHistory)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(item), result__.as_mut_ptr()).from_abi::(result__) }) } - pub fn SetHistoryItemAsContent<'a, P0>(item: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, ClipboardHistoryItem>>, - { + pub fn SetHistoryItemAsContent(item: &ClipboardHistoryItem) -> ::windows::core::Result { Self::IClipboardStatics2(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).SetHistoryItemAsContent)(::windows::core::Vtable::as_raw(this), item.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).SetHistoryItemAsContent)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(item), result__.as_mut_ptr()).from_abi::(result__) }) } pub fn IsHistoryEnabled() -> ::windows::core::Result { @@ -1169,25 +1157,18 @@ impl Clipboard { (::windows::core::Vtable::vtable(this).IsRoamingEnabled)(::windows::core::Vtable::as_raw(this), result__.as_mut_ptr()).from_abi::(result__) }) } - pub fn SetContentWithOptions<'a, P0, P1>(content: P0, options: P1) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, DataPackage>>, - P1: ::std::convert::Into<::windows::core::InParam<'a, ClipboardContentOptions>>, - { + pub fn SetContentWithOptions(content: &DataPackage, options: &ClipboardContentOptions) -> ::windows::core::Result { Self::IClipboardStatics2(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).SetContentWithOptions)(::windows::core::Vtable::as_raw(this), content.into().abi(), options.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).SetContentWithOptions)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(content), ::core::mem::transmute_copy(options), result__.as_mut_ptr()).from_abi::(result__) }) } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn HistoryChanged<'a, P0>(handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::EventHandler>>, - { + pub fn HistoryChanged(handler: &super::super::Foundation::EventHandler) -> ::windows::core::Result { Self::IClipboardStatics2(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).HistoryChanged)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).HistoryChanged)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) }) } #[doc = "*Required features: `\"Foundation\"`*"] @@ -1197,13 +1178,10 @@ impl Clipboard { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn RoamingEnabledChanged<'a, P0>(handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::EventHandler<::windows::core::IInspectable>>>, - { + pub fn RoamingEnabledChanged(handler: &super::super::Foundation::EventHandler<::windows::core::IInspectable>) -> ::windows::core::Result { Self::IClipboardStatics2(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).RoamingEnabledChanged)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).RoamingEnabledChanged)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) }) } #[doc = "*Required features: `\"Foundation\"`*"] @@ -1213,13 +1191,10 @@ impl Clipboard { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn HistoryEnabledChanged<'a, P0>(handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::EventHandler<::windows::core::IInspectable>>>, - { + pub fn HistoryEnabledChanged(handler: &super::super::Foundation::EventHandler<::windows::core::IInspectable>) -> ::windows::core::Result { Self::IClipboardStatics2(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).HistoryEnabledChanged)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).HistoryEnabledChanged)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) }) } #[doc = "*Required features: `\"Foundation\"`*"] @@ -1640,14 +1615,11 @@ impl DataPackage { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn OperationCompleted<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn OperationCompleted(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).OperationCompleted)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).OperationCompleted)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -1658,14 +1630,11 @@ impl DataPackage { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn Destroyed<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn Destroyed(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).Destroyed)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).Destroyed)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -1681,12 +1650,9 @@ impl DataPackage { let this = self; unsafe { (::windows::core::Vtable::vtable(this).SetData)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(formatid), value.into().abi()).ok() } } - pub fn SetDataProvider<'a, P0>(&self, formatid: &::windows::core::HSTRING, delayrenderer: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, DataProviderHandler>>, - { + pub fn SetDataProvider(&self, formatid: &::windows::core::HSTRING, delayrenderer: &DataProviderHandler) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).SetDataProvider)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(formatid), delayrenderer.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetDataProvider)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(formatid), ::core::mem::transmute_copy(delayrenderer)).ok() } } pub fn SetText(&self, value: &::windows::core::HSTRING) -> ::windows::core::Result<()> { let this = self; @@ -1694,12 +1660,9 @@ impl DataPackage { } #[doc = "*Required features: `\"Foundation\"`, `\"deprecated\"`*"] #[cfg(all(feature = "Foundation", feature = "deprecated"))] - pub fn SetUri<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::Uri>>, - { + pub fn SetUri(&self, value: &super::super::Foundation::Uri) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).SetUri)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetUri)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } pub fn SetHtmlFormat(&self, value: &::windows::core::HSTRING) -> ::windows::core::Result<()> { let this = self; @@ -1720,12 +1683,9 @@ impl DataPackage { } #[doc = "*Required features: `\"Storage_Streams\"`*"] #[cfg(feature = "Storage_Streams")] - pub fn SetBitmap<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Storage::Streams::RandomAccessStreamReference>>, - { + pub fn SetBitmap(&self, value: &super::super::Storage::Streams::RandomAccessStreamReference) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).SetBitmap)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetBitmap)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } #[doc = "*Required features: `\"Foundation_Collections\"`, `\"Storage\"`*"] #[cfg(all(feature = "Foundation_Collections", feature = "Storage"))] @@ -1749,32 +1709,23 @@ impl DataPackage { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn SetApplicationLink<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::Uri>>, - { + pub fn SetApplicationLink(&self, value: &super::super::Foundation::Uri) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).SetApplicationLink)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetApplicationLink)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn SetWebLink<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::Uri>>, - { + pub fn SetWebLink(&self, value: &super::super::Foundation::Uri) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).SetWebLink)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetWebLink)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn ShareCompleted<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn ShareCompleted(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = &::windows::core::Interface::cast::(self)?; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).ShareCompleted)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).ShareCompleted)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -1785,14 +1736,11 @@ impl DataPackage { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn ShareCanceled<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn ShareCanceled(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = &::windows::core::Interface::cast::(self)?; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).ShareCanceled)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).ShareCanceled)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -1942,12 +1890,9 @@ impl DataPackagePropertySet { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn SetApplicationListingUri<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::Uri>>, - { + pub fn SetApplicationListingUri(&self, value: &super::super::Foundation::Uri) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).SetApplicationListingUri)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetApplicationListingUri)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] @@ -1960,12 +1905,9 @@ impl DataPackagePropertySet { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn SetContentSourceWebLink<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::Uri>>, - { + pub fn SetContentSourceWebLink(&self, value: &super::super::Foundation::Uri) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).SetContentSourceWebLink)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetContentSourceWebLink)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] @@ -1978,12 +1920,9 @@ impl DataPackagePropertySet { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn SetContentSourceApplicationLink<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::Uri>>, - { + pub fn SetContentSourceApplicationLink(&self, value: &super::super::Foundation::Uri) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).SetContentSourceApplicationLink)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetContentSourceApplicationLink)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } pub fn PackageFamilyName(&self) -> ::windows::core::Result<::windows::core::HSTRING> { let this = &::windows::core::Interface::cast::(self)?; @@ -2945,12 +2884,9 @@ impl DataRequest { (::windows::core::Vtable::vtable(this).Data)(::windows::core::Vtable::as_raw(this), result__.as_mut_ptr()).from_abi::(result__) } } - pub fn SetData<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, DataPackage>>, - { + pub fn SetData(&self, value: &DataPackage) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).SetData)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetData)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] @@ -3192,14 +3128,11 @@ pub struct DataTransferManager(::windows::core::IUnknown); impl DataTransferManager { #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn DataRequested<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn DataRequested(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).DataRequested)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).DataRequested)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -3210,14 +3143,11 @@ impl DataTransferManager { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn TargetApplicationChosen<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn TargetApplicationChosen(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).TargetApplicationChosen)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).TargetApplicationChosen)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -3228,14 +3158,11 @@ impl DataTransferManager { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn ShareProvidersRequested<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn ShareProvidersRequested(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = &::windows::core::Interface::cast::(self)?; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).ShareProvidersRequested)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).ShareProvidersRequested)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -3259,11 +3186,8 @@ impl DataTransferManager { (::windows::core::Vtable::vtable(this).IsSupported)(::windows::core::Vtable::as_raw(this), result__.as_mut_ptr()).from_abi::(result__) }) } - pub fn ShowShareUIWithOptions<'a, P0>(options: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, ShareUIOptions>>, - { - Self::IDataTransferManagerStatics3(|this| unsafe { (::windows::core::Vtable::vtable(this).ShowShareUIWithOptions)(::windows::core::Vtable::as_raw(this), options.into().abi()).ok() }) + pub fn ShowShareUIWithOptions(options: &ShareUIOptions) -> ::windows::core::Result<()> { + Self::IDataTransferManagerStatics3(|this| unsafe { (::windows::core::Vtable::vtable(this).ShowShareUIWithOptions)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(options)).ok() }) } #[doc(hidden)] pub fn IDataTransferManagerStatics ::windows::core::Result>(callback: F) -> ::windows::core::Result { @@ -3571,14 +3495,10 @@ impl ShareProvider { } #[doc = "*Required features: `\"Storage_Streams\"`, `\"UI\"`*"] #[cfg(all(feature = "Storage_Streams", feature = "UI"))] - pub fn Create<'a, P0, P1>(title: &::windows::core::HSTRING, displayicon: P0, backgroundcolor: super::super::UI::Color, handler: P1) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Storage::Streams::RandomAccessStreamReference>>, - P1: ::std::convert::Into<::windows::core::InParam<'a, ShareProviderHandler>>, - { + pub fn Create(title: &::windows::core::HSTRING, displayicon: &super::super::Storage::Streams::RandomAccessStreamReference, backgroundcolor: super::super::UI::Color, handler: &ShareProviderHandler) -> ::windows::core::Result { Self::IShareProviderFactory(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).Create)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(title), displayicon.into().abi(), backgroundcolor, handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).Create)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(title), ::core::mem::transmute_copy(displayicon), backgroundcolor, ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) }) } #[doc(hidden)] @@ -4387,12 +4307,9 @@ impl DataProviderHandler { let com = DataProviderHandlerBox:: { vtable: &DataProviderHandlerBox::::VTABLE, count: ::windows::core::RefCount::new(1), invoke }; unsafe { ::core::mem::transmute(::windows::core::alloc::boxed::Box::new(com)) } } - pub fn Invoke<'a, P0>(&self, request: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, DataProviderRequest>>, - { + pub fn Invoke(&self, request: &DataProviderRequest) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).Invoke)(::windows::core::Vtable::as_raw(this), request.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).Invoke)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(request)).ok() } } } #[repr(C)] @@ -4476,12 +4393,9 @@ impl ShareProviderHandler { let com = ShareProviderHandlerBox:: { vtable: &ShareProviderHandlerBox::::VTABLE, count: ::windows::core::RefCount::new(1), invoke }; unsafe { ::core::mem::transmute(::windows::core::alloc::boxed::Box::new(com)) } } - pub fn Invoke<'a, P0>(&self, operation: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, ShareProviderOperation>>, - { + pub fn Invoke(&self, operation: &ShareProviderOperation) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).Invoke)(::windows::core::Vtable::as_raw(this), operation.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).Invoke)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(operation)).ok() } } } #[repr(C)] diff --git a/crates/libs/windows/src/Windows/ApplicationModel/Email/DataProvider/mod.rs b/crates/libs/windows/src/Windows/ApplicationModel/Email/DataProvider/mod.rs index 68813c4a4e..ca84b9b043 100644 --- a/crates/libs/windows/src/Windows/ApplicationModel/Email/DataProvider/mod.rs +++ b/crates/libs/windows/src/Windows/ApplicationModel/Email/DataProvider/mod.rs @@ -837,14 +837,11 @@ pub struct EmailDataProviderConnection(::windows::core::IUnknown); impl EmailDataProviderConnection { #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn MailboxSyncRequested<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Foundation::TypedEventHandler>>, - { + pub fn MailboxSyncRequested(&self, handler: &super::super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).MailboxSyncRequested)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).MailboxSyncRequested)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -855,14 +852,11 @@ impl EmailDataProviderConnection { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn DownloadMessageRequested<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Foundation::TypedEventHandler>>, - { + pub fn DownloadMessageRequested(&self, handler: &super::super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).DownloadMessageRequested)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).DownloadMessageRequested)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -873,14 +867,11 @@ impl EmailDataProviderConnection { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn DownloadAttachmentRequested<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Foundation::TypedEventHandler>>, - { + pub fn DownloadAttachmentRequested(&self, handler: &super::super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).DownloadAttachmentRequested)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).DownloadAttachmentRequested)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -891,14 +882,11 @@ impl EmailDataProviderConnection { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn CreateFolderRequested<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Foundation::TypedEventHandler>>, - { + pub fn CreateFolderRequested(&self, handler: &super::super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).CreateFolderRequested)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).CreateFolderRequested)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -909,14 +897,11 @@ impl EmailDataProviderConnection { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn DeleteFolderRequested<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Foundation::TypedEventHandler>>, - { + pub fn DeleteFolderRequested(&self, handler: &super::super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).DeleteFolderRequested)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).DeleteFolderRequested)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -927,14 +912,11 @@ impl EmailDataProviderConnection { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn EmptyFolderRequested<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Foundation::TypedEventHandler>>, - { + pub fn EmptyFolderRequested(&self, handler: &super::super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).EmptyFolderRequested)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).EmptyFolderRequested)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -945,14 +927,11 @@ impl EmailDataProviderConnection { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn MoveFolderRequested<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Foundation::TypedEventHandler>>, - { + pub fn MoveFolderRequested(&self, handler: &super::super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).MoveFolderRequested)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).MoveFolderRequested)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -963,14 +942,11 @@ impl EmailDataProviderConnection { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn UpdateMeetingResponseRequested<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Foundation::TypedEventHandler>>, - { + pub fn UpdateMeetingResponseRequested(&self, handler: &super::super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).UpdateMeetingResponseRequested)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).UpdateMeetingResponseRequested)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -981,14 +957,11 @@ impl EmailDataProviderConnection { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn ForwardMeetingRequested<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Foundation::TypedEventHandler>>, - { + pub fn ForwardMeetingRequested(&self, handler: &super::super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).ForwardMeetingRequested)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).ForwardMeetingRequested)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -999,14 +972,11 @@ impl EmailDataProviderConnection { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn ProposeNewTimeForMeetingRequested<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Foundation::TypedEventHandler>>, - { + pub fn ProposeNewTimeForMeetingRequested(&self, handler: &super::super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).ProposeNewTimeForMeetingRequested)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).ProposeNewTimeForMeetingRequested)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -1017,14 +987,11 @@ impl EmailDataProviderConnection { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn SetAutoReplySettingsRequested<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Foundation::TypedEventHandler>>, - { + pub fn SetAutoReplySettingsRequested(&self, handler: &super::super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).SetAutoReplySettingsRequested)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).SetAutoReplySettingsRequested)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -1035,14 +1002,11 @@ impl EmailDataProviderConnection { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn GetAutoReplySettingsRequested<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Foundation::TypedEventHandler>>, - { + pub fn GetAutoReplySettingsRequested(&self, handler: &super::super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).GetAutoReplySettingsRequested)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).GetAutoReplySettingsRequested)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -1053,14 +1017,11 @@ impl EmailDataProviderConnection { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn ResolveRecipientsRequested<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Foundation::TypedEventHandler>>, - { + pub fn ResolveRecipientsRequested(&self, handler: &super::super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).ResolveRecipientsRequested)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).ResolveRecipientsRequested)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -1071,14 +1032,11 @@ impl EmailDataProviderConnection { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn ValidateCertificatesRequested<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Foundation::TypedEventHandler>>, - { + pub fn ValidateCertificatesRequested(&self, handler: &super::super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).ValidateCertificatesRequested)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).ValidateCertificatesRequested)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -1089,14 +1047,11 @@ impl EmailDataProviderConnection { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn ServerSearchReadBatchRequested<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Foundation::TypedEventHandler>>, - { + pub fn ServerSearchReadBatchRequested(&self, handler: &super::super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).ServerSearchReadBatchRequested)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).ServerSearchReadBatchRequested)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -1277,14 +1232,11 @@ impl EmailMailboxCreateFolderRequest { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn ReportCompletedAsync<'a, P0>(&self, folder: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::EmailFolder>>, - { + pub fn ReportCompletedAsync(&self, folder: &super::EmailFolder) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).ReportCompletedAsync)(::windows::core::Vtable::as_raw(this), folder.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).ReportCompletedAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(folder), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -2440,14 +2392,11 @@ impl EmailMailboxGetAutoReplySettingsRequest { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn ReportCompletedAsync<'a, P0>(&self, autoreplysettings: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::EmailMailboxAutoReplySettings>>, - { + pub fn ReportCompletedAsync(&self, autoreplysettings: &super::EmailMailboxAutoReplySettings) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).ReportCompletedAsync)(::windows::core::Vtable::as_raw(this), autoreplysettings.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).ReportCompletedAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(autoreplysettings), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -3260,14 +3209,11 @@ impl EmailMailboxServerSearchReadBatchRequest { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn SaveMessageAsync<'a, P0>(&self, message: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::EmailMessage>>, - { + pub fn SaveMessageAsync(&self, message: &super::EmailMessage) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).SaveMessageAsync)(::windows::core::Vtable::as_raw(this), message.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).SaveMessageAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(message), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] diff --git a/crates/libs/windows/src/Windows/ApplicationModel/Email/mod.rs b/crates/libs/windows/src/Windows/ApplicationModel/Email/mod.rs index 6679649805..697caa4f1d 100644 --- a/crates/libs/windows/src/Windows/ApplicationModel/Email/mod.rs +++ b/crates/libs/windows/src/Windows/ApplicationModel/Email/mod.rs @@ -2188,14 +2188,11 @@ impl EmailFolder { (::windows::core::Vtable::vtable(this).GetConversationReader)(::windows::core::Vtable::as_raw(this), result__.as_mut_ptr()).from_abi::(result__) } } - pub fn GetConversationReaderWithOptions<'a, P0>(&self, options: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, EmailQueryOptions>>, - { + pub fn GetConversationReaderWithOptions(&self, options: &EmailQueryOptions) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).GetConversationReaderWithOptions)(::windows::core::Vtable::as_raw(this), options.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).GetConversationReaderWithOptions)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(options), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -2214,14 +2211,11 @@ impl EmailFolder { (::windows::core::Vtable::vtable(this).GetMessageReader)(::windows::core::Vtable::as_raw(this), result__.as_mut_ptr()).from_abi::(result__) } } - pub fn GetMessageReaderWithOptions<'a, P0>(&self, options: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, EmailQueryOptions>>, - { + pub fn GetMessageReaderWithOptions(&self, options: &EmailQueryOptions) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).GetMessageReaderWithOptions)(::windows::core::Vtable::as_raw(this), options.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).GetMessageReaderWithOptions)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(options), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -2235,26 +2229,20 @@ impl EmailFolder { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn TryMoveAsync<'a, P0>(&self, newparentfolder: P0) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, EmailFolder>>, - { + pub fn TryMoveAsync(&self, newparentfolder: &EmailFolder) -> ::windows::core::Result> { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).TryMoveAsync)(::windows::core::Vtable::as_raw(this), newparentfolder.into().abi(), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).TryMoveAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(newparentfolder), result__.as_mut_ptr()).from_abi::>(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn TryMoveWithNewNameAsync<'a, P0>(&self, newparentfolder: P0, newfoldername: &::windows::core::HSTRING) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, EmailFolder>>, - { + pub fn TryMoveWithNewNameAsync(&self, newparentfolder: &EmailFolder, newfoldername: &::windows::core::HSTRING) -> ::windows::core::Result> { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).TryMoveWithNewNameAsync)(::windows::core::Vtable::as_raw(this), newparentfolder.into().abi(), ::core::mem::transmute_copy(newfoldername), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).TryMoveWithNewNameAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(newparentfolder), ::core::mem::transmute_copy(newfoldername), result__.as_mut_ptr()).from_abi::>(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -2268,14 +2256,11 @@ impl EmailFolder { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn SaveMessageAsync<'a, P0>(&self, message: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, EmailMessage>>, - { + pub fn SaveMessageAsync(&self, message: &EmailMessage) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).SaveMessageAsync)(::windows::core::Vtable::as_raw(this), message.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).SaveMessageAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(message), result__.as_mut_ptr()).from_abi::(result__) } } } @@ -2486,22 +2471,16 @@ impl EmailIrmInfo { (::windows::core::Vtable::vtable(this).Template)(::windows::core::Vtable::as_raw(this), result__.as_mut_ptr()).from_abi::(result__) } } - pub fn SetTemplate<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, EmailIrmTemplate>>, - { + pub fn SetTemplate(&self, value: &EmailIrmTemplate) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).SetTemplate)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetTemplate)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn Create<'a, P0>(expiration: super::super::Foundation::DateTime, irmtemplate: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, EmailIrmTemplate>>, - { + pub fn Create(expiration: super::super::Foundation::DateTime, irmtemplate: &EmailIrmTemplate) -> ::windows::core::Result { Self::IEmailIrmInfoFactory(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).Create)(::windows::core::Vtable::as_raw(this), expiration, irmtemplate.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).Create)(::windows::core::Vtable::as_raw(this), expiration, ::core::mem::transmute_copy(irmtemplate), result__.as_mut_ptr()).from_abi::(result__) }) } #[doc(hidden)] @@ -2918,14 +2897,11 @@ impl EmailMailbox { (::windows::core::Vtable::vtable(this).GetConversationReader)(::windows::core::Vtable::as_raw(this), result__.as_mut_ptr()).from_abi::(result__) } } - pub fn GetConversationReaderWithOptions<'a, P0>(&self, options: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, EmailQueryOptions>>, - { + pub fn GetConversationReaderWithOptions(&self, options: &EmailQueryOptions) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).GetConversationReaderWithOptions)(::windows::core::Vtable::as_raw(this), options.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).GetConversationReaderWithOptions)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(options), result__.as_mut_ptr()).from_abi::(result__) } } pub fn GetMessageReader(&self) -> ::windows::core::Result { @@ -2935,14 +2911,11 @@ impl EmailMailbox { (::windows::core::Vtable::vtable(this).GetMessageReader)(::windows::core::Vtable::as_raw(this), result__.as_mut_ptr()).from_abi::(result__) } } - pub fn GetMessageReaderWithOptions<'a, P0>(&self, options: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, EmailQueryOptions>>, - { + pub fn GetMessageReaderWithOptions(&self, options: &EmailQueryOptions) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).GetMessageReaderWithOptions)(::windows::core::Vtable::as_raw(this), options.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).GetMessageReaderWithOptions)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(options), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -3082,26 +3055,20 @@ impl EmailMailbox { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn SendMessageAsync<'a, P0>(&self, message: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, EmailMessage>>, - { + pub fn SendMessageAsync(&self, message: &EmailMessage) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).SendMessageAsync)(::windows::core::Vtable::as_raw(this), message.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).SendMessageAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(message), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn SaveDraftAsync<'a, P0>(&self, message: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, EmailMessage>>, - { + pub fn SaveDraftAsync(&self, message: &EmailMessage) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).SaveDraftAsync)(::windows::core::Vtable::as_raw(this), message.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).SaveDraftAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(message), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -3133,52 +3100,42 @@ impl EmailMailbox { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn TryUpdateMeetingResponseAsync<'a, P0>(&self, meeting: P0, response: EmailMeetingResponseType, subject: &::windows::core::HSTRING, comment: &::windows::core::HSTRING, sendupdate: bool) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, EmailMessage>>, - { + pub fn TryUpdateMeetingResponseAsync(&self, meeting: &EmailMessage, response: EmailMeetingResponseType, subject: &::windows::core::HSTRING, comment: &::windows::core::HSTRING, sendupdate: bool) -> ::windows::core::Result> { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).TryUpdateMeetingResponseAsync)(::windows::core::Vtable::as_raw(this), meeting.into().abi(), response, ::core::mem::transmute_copy(subject), ::core::mem::transmute_copy(comment), sendupdate, result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).TryUpdateMeetingResponseAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(meeting), response, ::core::mem::transmute_copy(subject), ::core::mem::transmute_copy(comment), sendupdate, result__.as_mut_ptr()).from_abi::>(result__) } } #[doc = "*Required features: `\"Foundation_Collections\"`*"] #[cfg(feature = "Foundation_Collections")] - pub fn TryForwardMeetingAsync<'a, P0, P1, E1>(&self, meeting: P0, recipients: P1, subject: &::windows::core::HSTRING, forwardheadertype: EmailMessageBodyKind, forwardheader: &::windows::core::HSTRING, comment: &::windows::core::HSTRING) -> ::windows::core::Result> + pub fn TryForwardMeetingAsync<'a, P0, E0>(&self, meeting: &EmailMessage, recipients: P0, subject: &::windows::core::HSTRING, forwardheadertype: EmailMessageBodyKind, forwardheader: &::windows::core::HSTRING, comment: &::windows::core::HSTRING) -> ::windows::core::Result> where - P0: ::std::convert::Into<::windows::core::InParam<'a, EmailMessage>>, - P1: ::std::convert::TryInto<::windows::core::InParam<'a, super::super::Foundation::Collections::IIterable>, Error = E1>, - E1: ::std::convert::Into<::windows::core::Error>, + P0: ::std::convert::TryInto<::windows::core::InParam<'a, super::super::Foundation::Collections::IIterable>, Error = E0>, + E0: ::std::convert::Into<::windows::core::Error>, { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).TryForwardMeetingAsync)(::windows::core::Vtable::as_raw(this), meeting.into().abi(), recipients.try_into().map_err(|e| e.into())?.abi(), ::core::mem::transmute_copy(subject), forwardheadertype, ::core::mem::transmute_copy(forwardheader), ::core::mem::transmute_copy(comment), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).TryForwardMeetingAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(meeting), recipients.try_into().map_err(|e| e.into())?.abi(), ::core::mem::transmute_copy(subject), forwardheadertype, ::core::mem::transmute_copy(forwardheader), ::core::mem::transmute_copy(comment), result__.as_mut_ptr()).from_abi::>(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn TryProposeNewTimeForMeetingAsync<'a, P0>(&self, meeting: P0, newstarttime: super::super::Foundation::DateTime, newduration: super::super::Foundation::TimeSpan, subject: &::windows::core::HSTRING, comment: &::windows::core::HSTRING) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, EmailMessage>>, - { + pub fn TryProposeNewTimeForMeetingAsync(&self, meeting: &EmailMessage, newstarttime: super::super::Foundation::DateTime, newduration: super::super::Foundation::TimeSpan, subject: &::windows::core::HSTRING, comment: &::windows::core::HSTRING) -> ::windows::core::Result> { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).TryProposeNewTimeForMeetingAsync)(::windows::core::Vtable::as_raw(this), meeting.into().abi(), newstarttime, newduration, ::core::mem::transmute_copy(subject), ::core::mem::transmute_copy(comment), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).TryProposeNewTimeForMeetingAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(meeting), newstarttime, newduration, ::core::mem::transmute_copy(subject), ::core::mem::transmute_copy(comment), result__.as_mut_ptr()).from_abi::>(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn MailboxChanged<'a, P0>(&self, phandler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn MailboxChanged(&self, phandler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).MailboxChanged)(::windows::core::Vtable::as_raw(this), phandler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).MailboxChanged)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(phandler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -3189,26 +3146,20 @@ impl EmailMailbox { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn SmartSendMessageAsync<'a, P0>(&self, message: P0, smartsend: bool) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, EmailMessage>>, - { + pub fn SmartSendMessageAsync(&self, message: &EmailMessage, smartsend: bool) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).SmartSendMessageAsync)(::windows::core::Vtable::as_raw(this), message.into().abi(), smartsend, result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).SmartSendMessageAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(message), smartsend, result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn TrySetAutoReplySettingsAsync<'a, P0>(&self, autoreplysettings: P0) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, EmailMailboxAutoReplySettings>>, - { + pub fn TrySetAutoReplySettingsAsync(&self, autoreplysettings: &EmailMailboxAutoReplySettings) -> ::windows::core::Result> { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).TrySetAutoReplySettingsAsync)(::windows::core::Vtable::as_raw(this), autoreplysettings.into().abi(), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).TrySetAutoReplySettingsAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(autoreplysettings), result__.as_mut_ptr()).from_abi::>(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -4036,12 +3987,9 @@ impl EmailMailboxChangeReader { let this = self; unsafe { (::windows::core::Vtable::vtable(this).AcceptChanges)(::windows::core::Vtable::as_raw(this)).ok() } } - pub fn AcceptChangesThrough<'a, P0>(&self, lastchangetoacknowledge: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, EmailMailboxChange>>, - { + pub fn AcceptChangesThrough(&self, lastchangetoacknowledge: &EmailMailboxChange) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).AcceptChangesThrough)(::windows::core::Vtable::as_raw(this), lastchangetoacknowledge.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).AcceptChangesThrough)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(lastchangetoacknowledge)).ok() } } #[doc = "*Required features: `\"Foundation_Collections\"`*"] #[cfg(feature = "Foundation_Collections")] @@ -4631,14 +4579,11 @@ impl EmailMailboxSyncManager { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn SyncStatusChanged<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn SyncStatusChanged(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).SyncStatusChanged)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).SyncStatusChanged)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -4733,13 +4678,10 @@ pub struct EmailManager; impl EmailManager { #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn ShowComposeNewEmailAsync<'a, P0>(message: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, EmailMessage>>, - { + pub fn ShowComposeNewEmailAsync(message: &EmailMessage) -> ::windows::core::Result { Self::IEmailManagerStatics(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).ShowComposeNewEmailAsync)(::windows::core::Vtable::as_raw(this), message.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).ShowComposeNewEmailAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(message), result__.as_mut_ptr()).from_abi::(result__) }) } #[doc = "*Required features: `\"Foundation\"`*"] @@ -4752,13 +4694,10 @@ impl EmailManager { } #[doc = "*Required features: `\"System\"`*"] #[cfg(feature = "System")] - pub fn GetForUser<'a, P0>(user: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::System::User>>, - { + pub fn GetForUser(user: &super::super::System::User) -> ::windows::core::Result { Self::IEmailManagerStatics3(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).GetForUser)(::windows::core::Vtable::as_raw(this), user.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).GetForUser)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(user), result__.as_mut_ptr()).from_abi::(result__) }) } #[doc(hidden)] @@ -4786,14 +4725,11 @@ pub struct EmailManagerForUser(::windows::core::IUnknown); impl EmailManagerForUser { #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn ShowComposeNewEmailAsync<'a, P0>(&self, message: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, EmailMessage>>, - { + pub fn ShowComposeNewEmailAsync(&self, message: &EmailMessage) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).ShowComposeNewEmailAsync)(::windows::core::Vtable::as_raw(this), message.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).ShowComposeNewEmailAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(message), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -5047,12 +4983,9 @@ impl EmailMeetingInfo { } #[doc = "*Required features: `\"ApplicationModel_Appointments\"`*"] #[cfg(feature = "ApplicationModel_Appointments")] - pub fn SetRecurrence<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::Appointments::AppointmentRecurrence>>, - { + pub fn SetRecurrence(&self, value: &super::Appointments::AppointmentRecurrence) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).SetRecurrence)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetRecurrence)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } pub fn RemoteChangeNumber(&self) -> ::windows::core::Result { let this = self; @@ -5343,12 +5276,9 @@ impl EmailMessage { (::windows::core::Vtable::vtable(this).IrmInfo)(::windows::core::Vtable::as_raw(this), result__.as_mut_ptr()).from_abi::(result__) } } - pub fn SetIrmInfo<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, EmailIrmInfo>>, - { + pub fn SetIrmInfo(&self, value: &EmailIrmInfo) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).SetIrmInfo)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetIrmInfo)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } pub fn IsDraftMessage(&self) -> ::windows::core::Result { let this = &::windows::core::Interface::cast::(self)?; @@ -5451,12 +5381,9 @@ impl EmailMessage { (::windows::core::Vtable::vtable(this).Sender)(::windows::core::Vtable::as_raw(this), result__.as_mut_ptr()).from_abi::(result__) } } - pub fn SetSender<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, EmailRecipient>>, - { + pub fn SetSender(&self, value: &EmailRecipient) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).SetSender)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetSender)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] @@ -5484,12 +5411,9 @@ impl EmailMessage { (::windows::core::Vtable::vtable(this).MeetingInfo)(::windows::core::Vtable::as_raw(this), result__.as_mut_ptr()).from_abi::(result__) } } - pub fn SetMeetingInfo<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, EmailMeetingInfo>>, - { + pub fn SetMeetingInfo(&self, value: &EmailMeetingInfo) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).SetMeetingInfo)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetMeetingInfo)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } #[doc = "*Required features: `\"Storage_Streams\"`*"] #[cfg(feature = "Storage_Streams")] @@ -5556,12 +5480,9 @@ impl EmailMessage { (::windows::core::Vtable::vtable(this).SentRepresenting)(::windows::core::Vtable::as_raw(this), result__.as_mut_ptr()).from_abi::(result__) } } - pub fn SetSentRepresenting<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, EmailRecipient>>, - { + pub fn SetSentRepresenting(&self, value: &EmailRecipient) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).SetSentRepresenting)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetSentRepresenting)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } } impl ::core::clone::Clone for EmailMessage { @@ -6276,14 +6197,11 @@ impl EmailStore { (::windows::core::Vtable::vtable(this).GetConversationReader)(::windows::core::Vtable::as_raw(this), result__.as_mut_ptr()).from_abi::(result__) } } - pub fn GetConversationReaderWithOptions<'a, P0>(&self, options: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, EmailQueryOptions>>, - { + pub fn GetConversationReaderWithOptions(&self, options: &EmailQueryOptions) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).GetConversationReaderWithOptions)(::windows::core::Vtable::as_raw(this), options.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).GetConversationReaderWithOptions)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(options), result__.as_mut_ptr()).from_abi::(result__) } } pub fn GetMessageReader(&self) -> ::windows::core::Result { @@ -6293,14 +6211,11 @@ impl EmailStore { (::windows::core::Vtable::vtable(this).GetMessageReader)(::windows::core::Vtable::as_raw(this), result__.as_mut_ptr()).from_abi::(result__) } } - pub fn GetMessageReaderWithOptions<'a, P0>(&self, options: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, EmailQueryOptions>>, - { + pub fn GetMessageReaderWithOptions(&self, options: &EmailQueryOptions) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).GetMessageReaderWithOptions)(::windows::core::Vtable::as_raw(this), options.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).GetMessageReaderWithOptions)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(options), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] diff --git a/crates/libs/windows/src/Windows/ApplicationModel/ExtendedExecution/Foreground/mod.rs b/crates/libs/windows/src/Windows/ApplicationModel/ExtendedExecution/Foreground/mod.rs index 3cbe366f36..343e91a0bb 100644 --- a/crates/libs/windows/src/Windows/ApplicationModel/ExtendedExecution/Foreground/mod.rs +++ b/crates/libs/windows/src/Windows/ApplicationModel/ExtendedExecution/Foreground/mod.rs @@ -149,14 +149,11 @@ impl ExtendedExecutionForegroundSession { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn Revoked<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Foundation::TypedEventHandler<::windows::core::IInspectable, ExtendedExecutionForegroundRevokedEventArgs>>>, - { + pub fn Revoked(&self, handler: &super::super::super::Foundation::TypedEventHandler<::windows::core::IInspectable, ExtendedExecutionForegroundRevokedEventArgs>) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).Revoked)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).Revoked)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] diff --git a/crates/libs/windows/src/Windows/ApplicationModel/ExtendedExecution/mod.rs b/crates/libs/windows/src/Windows/ApplicationModel/ExtendedExecution/mod.rs index 78dfdf77c9..2b1b07a9da 100644 --- a/crates/libs/windows/src/Windows/ApplicationModel/ExtendedExecution/mod.rs +++ b/crates/libs/windows/src/Windows/ApplicationModel/ExtendedExecution/mod.rs @@ -175,14 +175,11 @@ impl ExtendedExecutionSession { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn Revoked<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler<::windows::core::IInspectable, ExtendedExecutionRevokedEventArgs>>>, - { + pub fn Revoked(&self, handler: &super::super::Foundation::TypedEventHandler<::windows::core::IInspectable, ExtendedExecutionRevokedEventArgs>) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).Revoked)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).Revoked)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] diff --git a/crates/libs/windows/src/Windows/ApplicationModel/Holographic/mod.rs b/crates/libs/windows/src/Windows/ApplicationModel/Holographic/mod.rs index 8f48cbc325..6a345f879d 100644 --- a/crates/libs/windows/src/Windows/ApplicationModel/Holographic/mod.rs +++ b/crates/libs/windows/src/Windows/ApplicationModel/Holographic/mod.rs @@ -42,21 +42,15 @@ pub struct HolographicKeyboard(::windows::core::IUnknown); impl HolographicKeyboard { #[doc = "*Required features: `\"Foundation_Numerics\"`, `\"Perception_Spatial\"`*"] #[cfg(all(feature = "Foundation_Numerics", feature = "Perception_Spatial"))] - pub fn SetPlacementOverride<'a, P0>(&self, coordinatesystem: P0, topcenterposition: super::super::Foundation::Numerics::Vector3, orientation: super::super::Foundation::Numerics::Quaternion) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Perception::Spatial::SpatialCoordinateSystem>>, - { + pub fn SetPlacementOverride(&self, coordinatesystem: &super::super::Perception::Spatial::SpatialCoordinateSystem, topcenterposition: super::super::Foundation::Numerics::Vector3, orientation: super::super::Foundation::Numerics::Quaternion) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).SetPlacementOverride)(::windows::core::Vtable::as_raw(this), coordinatesystem.into().abi(), topcenterposition, orientation).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetPlacementOverride)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(coordinatesystem), topcenterposition, orientation).ok() } } #[doc = "*Required features: `\"Foundation_Numerics\"`, `\"Perception_Spatial\"`*"] #[cfg(all(feature = "Foundation_Numerics", feature = "Perception_Spatial"))] - pub fn SetPlacementOverrideWithMaxSize<'a, P0>(&self, coordinatesystem: P0, topcenterposition: super::super::Foundation::Numerics::Vector3, orientation: super::super::Foundation::Numerics::Quaternion, maxsize: super::super::Foundation::Numerics::Vector2) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Perception::Spatial::SpatialCoordinateSystem>>, - { + pub fn SetPlacementOverrideWithMaxSize(&self, coordinatesystem: &super::super::Perception::Spatial::SpatialCoordinateSystem, topcenterposition: super::super::Foundation::Numerics::Vector3, orientation: super::super::Foundation::Numerics::Quaternion, maxsize: super::super::Foundation::Numerics::Vector2) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).SetPlacementOverrideWithMaxSize)(::windows::core::Vtable::as_raw(this), coordinatesystem.into().abi(), topcenterposition, orientation, maxsize).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetPlacementOverrideWithMaxSize)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(coordinatesystem), topcenterposition, orientation, maxsize).ok() } } pub fn ResetPlacementOverride(&self) -> ::windows::core::Result<()> { let this = self; diff --git a/crates/libs/windows/src/Windows/ApplicationModel/LockScreen/mod.rs b/crates/libs/windows/src/Windows/ApplicationModel/LockScreen/mod.rs index b70b5ef4bb..7252bb522c 100644 --- a/crates/libs/windows/src/Windows/ApplicationModel/LockScreen/mod.rs +++ b/crates/libs/windows/src/Windows/ApplicationModel/LockScreen/mod.rs @@ -170,14 +170,11 @@ impl LockApplicationHost { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn Unlocking<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn Unlocking(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).Unlocking)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).Unlocking)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -375,14 +372,11 @@ pub struct LockScreenInfo(::windows::core::IUnknown); impl LockScreenInfo { #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn LockScreenImageChanged<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn LockScreenImageChanged(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).LockScreenImageChanged)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).LockScreenImageChanged)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -402,14 +396,11 @@ impl LockScreenInfo { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn BadgesChanged<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn BadgesChanged(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).BadgesChanged)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).BadgesChanged)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -429,14 +420,11 @@ impl LockScreenInfo { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn DetailTextChanged<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn DetailTextChanged(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).DetailTextChanged)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).DetailTextChanged)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -456,14 +444,11 @@ impl LockScreenInfo { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn AlarmIconChanged<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn AlarmIconChanged(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).AlarmIconChanged)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).AlarmIconChanged)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] diff --git a/crates/libs/windows/src/Windows/ApplicationModel/Payments/Provider/mod.rs b/crates/libs/windows/src/Windows/ApplicationModel/Payments/Provider/mod.rs index 7dcffe7fad..e4d0c65f22 100644 --- a/crates/libs/windows/src/Windows/ApplicationModel/Payments/Provider/mod.rs +++ b/crates/libs/windows/src/Windows/ApplicationModel/Payments/Provider/mod.rs @@ -129,12 +129,9 @@ impl PaymentAppCanMakePaymentTriggerDetails { (::windows::core::Vtable::vtable(this).Request)(::windows::core::Vtable::as_raw(this), result__.as_mut_ptr()).from_abi::(result__) } } - pub fn ReportCanMakePaymentResult<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::PaymentCanMakePaymentResult>>, - { + pub fn ReportCanMakePaymentResult(&self, value: &super::PaymentCanMakePaymentResult) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).ReportCanMakePaymentResult)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).ReportCanMakePaymentResult)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } } impl ::core::clone::Clone for PaymentAppCanMakePaymentTriggerDetails { @@ -349,38 +346,29 @@ impl PaymentTransaction { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn UpdateShippingAddressAsync<'a, P0>(&self, shippingaddress: P0) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::PaymentAddress>>, - { + pub fn UpdateShippingAddressAsync(&self, shippingaddress: &super::PaymentAddress) -> ::windows::core::Result> { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).UpdateShippingAddressAsync)(::windows::core::Vtable::as_raw(this), shippingaddress.into().abi(), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).UpdateShippingAddressAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(shippingaddress), result__.as_mut_ptr()).from_abi::>(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn UpdateSelectedShippingOptionAsync<'a, P0>(&self, selectedshippingoption: P0) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::PaymentShippingOption>>, - { + pub fn UpdateSelectedShippingOptionAsync(&self, selectedshippingoption: &super::PaymentShippingOption) -> ::windows::core::Result> { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).UpdateSelectedShippingOptionAsync)(::windows::core::Vtable::as_raw(this), selectedshippingoption.into().abi(), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).UpdateSelectedShippingOptionAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(selectedshippingoption), result__.as_mut_ptr()).from_abi::>(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn AcceptAsync<'a, P0>(&self, paymenttoken: P0) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::PaymentToken>>, - { + pub fn AcceptAsync(&self, paymenttoken: &super::PaymentToken) -> ::windows::core::Result> { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).AcceptAsync)(::windows::core::Vtable::as_raw(this), paymenttoken.into().abi(), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).AcceptAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(paymenttoken), result__.as_mut_ptr()).from_abi::>(result__) } } pub fn Reject(&self) -> ::windows::core::Result<()> { diff --git a/crates/libs/windows/src/Windows/ApplicationModel/Payments/mod.rs b/crates/libs/windows/src/Windows/ApplicationModel/Payments/mod.rs index 187571a69d..0d98fcf44b 100644 --- a/crates/libs/windows/src/Windows/ApplicationModel/Payments/mod.rs +++ b/crates/libs/windows/src/Windows/ApplicationModel/Payments/mod.rs @@ -1085,12 +1085,9 @@ impl PaymentDetails { (::windows::core::Vtable::vtable(this).Total)(::windows::core::Vtable::as_raw(this), result__.as_mut_ptr()).from_abi::(result__) } } - pub fn SetTotal<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, PaymentItem>>, - { + pub fn SetTotal(&self, value: &PaymentItem) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).SetTotal)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetTotal)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } #[doc = "*Required features: `\"Foundation_Collections\"`*"] #[cfg(feature = "Foundation_Collections")] @@ -1149,26 +1146,22 @@ impl PaymentDetails { let this = self; unsafe { (::windows::core::Vtable::vtable(this).SetModifiers)(::windows::core::Vtable::as_raw(this), value.try_into().map_err(|e| e.into())?.abi()).ok() } } - pub fn Create<'a, P0>(total: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, PaymentItem>>, - { + pub fn Create(total: &PaymentItem) -> ::windows::core::Result { Self::IPaymentDetailsFactory(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).Create)(::windows::core::Vtable::as_raw(this), total.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).Create)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(total), result__.as_mut_ptr()).from_abi::(result__) }) } #[doc = "*Required features: `\"Foundation_Collections\"`*"] #[cfg(feature = "Foundation_Collections")] - pub fn CreateWithDisplayItems<'a, P0, P1, E1>(total: P0, displayitems: P1) -> ::windows::core::Result + pub fn CreateWithDisplayItems<'a, P0, E0>(total: &PaymentItem, displayitems: P0) -> ::windows::core::Result where - P0: ::std::convert::Into<::windows::core::InParam<'a, PaymentItem>>, - P1: ::std::convert::TryInto<::windows::core::InParam<'a, super::super::Foundation::Collections::IIterable>, Error = E1>, - E1: ::std::convert::Into<::windows::core::Error>, + P0: ::std::convert::TryInto<::windows::core::InParam<'a, super::super::Foundation::Collections::IIterable>, Error = E0>, + E0: ::std::convert::Into<::windows::core::Error>, { Self::IPaymentDetailsFactory(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).CreateWithDisplayItems)(::windows::core::Vtable::as_raw(this), total.into().abi(), displayitems.try_into().map_err(|e| e.into())?.abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).CreateWithDisplayItems)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(total), displayitems.try_into().map_err(|e| e.into())?.abi(), result__.as_mut_ptr()).from_abi::(result__) }) } #[doc(hidden)] @@ -1279,45 +1272,42 @@ impl PaymentDetailsModifier { } #[doc = "*Required features: `\"Foundation_Collections\"`*"] #[cfg(feature = "Foundation_Collections")] - pub fn Create<'a, P0, E0, P1>(supportedmethodids: P0, total: P1) -> ::windows::core::Result + pub fn Create<'a, P0, E0>(supportedmethodids: P0, total: &PaymentItem) -> ::windows::core::Result where P0: ::std::convert::TryInto<::windows::core::InParam<'a, super::super::Foundation::Collections::IIterable<::windows::core::HSTRING>>, Error = E0>, E0: ::std::convert::Into<::windows::core::Error>, - P1: ::std::convert::Into<::windows::core::InParam<'a, PaymentItem>>, { Self::IPaymentDetailsModifierFactory(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).Create)(::windows::core::Vtable::as_raw(this), supportedmethodids.try_into().map_err(|e| e.into())?.abi(), total.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).Create)(::windows::core::Vtable::as_raw(this), supportedmethodids.try_into().map_err(|e| e.into())?.abi(), ::core::mem::transmute_copy(total), result__.as_mut_ptr()).from_abi::(result__) }) } #[doc = "*Required features: `\"Foundation_Collections\"`*"] #[cfg(feature = "Foundation_Collections")] - pub fn CreateWithAdditionalDisplayItems<'a, P0, E0, P1, P2, E2>(supportedmethodids: P0, total: P1, additionaldisplayitems: P2) -> ::windows::core::Result + pub fn CreateWithAdditionalDisplayItems<'a, P0, E0, P1, E1>(supportedmethodids: P0, total: &PaymentItem, additionaldisplayitems: P1) -> ::windows::core::Result where P0: ::std::convert::TryInto<::windows::core::InParam<'a, super::super::Foundation::Collections::IIterable<::windows::core::HSTRING>>, Error = E0>, E0: ::std::convert::Into<::windows::core::Error>, - P1: ::std::convert::Into<::windows::core::InParam<'a, PaymentItem>>, - P2: ::std::convert::TryInto<::windows::core::InParam<'a, super::super::Foundation::Collections::IIterable>, Error = E2>, - E2: ::std::convert::Into<::windows::core::Error>, + P1: ::std::convert::TryInto<::windows::core::InParam<'a, super::super::Foundation::Collections::IIterable>, Error = E1>, + E1: ::std::convert::Into<::windows::core::Error>, { Self::IPaymentDetailsModifierFactory(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).CreateWithAdditionalDisplayItems)(::windows::core::Vtable::as_raw(this), supportedmethodids.try_into().map_err(|e| e.into())?.abi(), total.into().abi(), additionaldisplayitems.try_into().map_err(|e| e.into())?.abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).CreateWithAdditionalDisplayItems)(::windows::core::Vtable::as_raw(this), supportedmethodids.try_into().map_err(|e| e.into())?.abi(), ::core::mem::transmute_copy(total), additionaldisplayitems.try_into().map_err(|e| e.into())?.abi(), result__.as_mut_ptr()).from_abi::(result__) }) } #[doc = "*Required features: `\"Foundation_Collections\"`*"] #[cfg(feature = "Foundation_Collections")] - pub fn CreateWithAdditionalDisplayItemsAndJsonData<'a, P0, E0, P1, P2, E2>(supportedmethodids: P0, total: P1, additionaldisplayitems: P2, jsondata: &::windows::core::HSTRING) -> ::windows::core::Result + pub fn CreateWithAdditionalDisplayItemsAndJsonData<'a, P0, E0, P1, E1>(supportedmethodids: P0, total: &PaymentItem, additionaldisplayitems: P1, jsondata: &::windows::core::HSTRING) -> ::windows::core::Result where P0: ::std::convert::TryInto<::windows::core::InParam<'a, super::super::Foundation::Collections::IIterable<::windows::core::HSTRING>>, Error = E0>, E0: ::std::convert::Into<::windows::core::Error>, - P1: ::std::convert::Into<::windows::core::InParam<'a, PaymentItem>>, - P2: ::std::convert::TryInto<::windows::core::InParam<'a, super::super::Foundation::Collections::IIterable>, Error = E2>, - E2: ::std::convert::Into<::windows::core::Error>, + P1: ::std::convert::TryInto<::windows::core::InParam<'a, super::super::Foundation::Collections::IIterable>, Error = E1>, + E1: ::std::convert::Into<::windows::core::Error>, { Self::IPaymentDetailsModifierFactory(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).CreateWithAdditionalDisplayItemsAndJsonData)(::windows::core::Vtable::as_raw(this), supportedmethodids.try_into().map_err(|e| e.into())?.abi(), total.into().abi(), additionaldisplayitems.try_into().map_err(|e| e.into())?.abi(), ::core::mem::transmute_copy(jsondata), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).CreateWithAdditionalDisplayItemsAndJsonData)(::windows::core::Vtable::as_raw(this), supportedmethodids.try_into().map_err(|e| e.into())?.abi(), ::core::mem::transmute_copy(total), additionaldisplayitems.try_into().map_err(|e| e.into())?.abi(), ::core::mem::transmute_copy(jsondata), result__.as_mut_ptr()).from_abi::(result__) }) } #[doc(hidden)] @@ -1412,12 +1402,9 @@ impl PaymentItem { (::windows::core::Vtable::vtable(this).Amount)(::windows::core::Vtable::as_raw(this), result__.as_mut_ptr()).from_abi::(result__) } } - pub fn SetAmount<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, PaymentCurrencyAmount>>, - { + pub fn SetAmount(&self, value: &PaymentCurrencyAmount) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).SetAmount)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetAmount)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } pub fn Pending(&self) -> ::windows::core::Result { let this = self; @@ -1430,13 +1417,10 @@ impl PaymentItem { let this = self; unsafe { (::windows::core::Vtable::vtable(this).SetPending)(::windows::core::Vtable::as_raw(this), value).ok() } } - pub fn Create<'a, P0>(label: &::windows::core::HSTRING, amount: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, PaymentCurrencyAmount>>, - { + pub fn Create(label: &::windows::core::HSTRING, amount: &PaymentCurrencyAmount) -> ::windows::core::Result { Self::IPaymentItemFactory(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).Create)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(label), amount.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).Create)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(label), ::core::mem::transmute_copy(amount), result__.as_mut_ptr()).from_abi::(result__) }) } #[doc(hidden)] @@ -1531,39 +1515,29 @@ impl PaymentMediator { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn SubmitPaymentRequestAsync<'a, P0>(&self, paymentrequest: P0) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, PaymentRequest>>, - { + pub fn SubmitPaymentRequestAsync(&self, paymentrequest: &PaymentRequest) -> ::windows::core::Result> { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).SubmitPaymentRequestAsync)(::windows::core::Vtable::as_raw(this), paymentrequest.into().abi(), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).SubmitPaymentRequestAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(paymentrequest), result__.as_mut_ptr()).from_abi::>(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn SubmitPaymentRequestWithChangeHandlerAsync<'a, P0, P1>(&self, paymentrequest: P0, changehandler: P1) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, PaymentRequest>>, - P1: ::std::convert::Into<::windows::core::InParam<'a, PaymentRequestChangedHandler>>, - { + pub fn SubmitPaymentRequestWithChangeHandlerAsync(&self, paymentrequest: &PaymentRequest, changehandler: &PaymentRequestChangedHandler) -> ::windows::core::Result> { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).SubmitPaymentRequestWithChangeHandlerAsync)(::windows::core::Vtable::as_raw(this), paymentrequest.into().abi(), changehandler.into().abi(), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).SubmitPaymentRequestWithChangeHandlerAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(paymentrequest), ::core::mem::transmute_copy(changehandler), result__.as_mut_ptr()).from_abi::>(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn CanMakePaymentAsync<'a, P0>(&self, paymentrequest: P0) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, PaymentRequest>>, - { + pub fn CanMakePaymentAsync(&self, paymentrequest: &PaymentRequest) -> ::windows::core::Result> { let this = &::windows::core::Interface::cast::(self)?; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).CanMakePaymentAsync)(::windows::core::Vtable::as_raw(this), paymentrequest.into().abi(), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).CanMakePaymentAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(paymentrequest), result__.as_mut_ptr()).from_abi::>(result__) } } } @@ -1660,13 +1634,10 @@ impl PaymentMerchantInfo { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn Create<'a, P0>(uri: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::Uri>>, - { + pub fn Create(uri: &super::super::Foundation::Uri) -> ::windows::core::Result { Self::IPaymentMerchantInfoFactory(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).Create)(::windows::core::Vtable::as_raw(this), uri.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).Create)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(uri), result__.as_mut_ptr()).from_abi::(result__) }) } #[doc(hidden)] @@ -2027,59 +1998,50 @@ impl PaymentRequest { } #[doc = "*Required features: `\"Foundation_Collections\"`*"] #[cfg(feature = "Foundation_Collections")] - pub fn Create<'a, P0, P1, E1>(details: P0, methoddata: P1) -> ::windows::core::Result + pub fn Create<'a, P0, E0>(details: &PaymentDetails, methoddata: P0) -> ::windows::core::Result where - P0: ::std::convert::Into<::windows::core::InParam<'a, PaymentDetails>>, - P1: ::std::convert::TryInto<::windows::core::InParam<'a, super::super::Foundation::Collections::IIterable>, Error = E1>, - E1: ::std::convert::Into<::windows::core::Error>, + P0: ::std::convert::TryInto<::windows::core::InParam<'a, super::super::Foundation::Collections::IIterable>, Error = E0>, + E0: ::std::convert::Into<::windows::core::Error>, { Self::IPaymentRequestFactory(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).Create)(::windows::core::Vtable::as_raw(this), details.into().abi(), methoddata.try_into().map_err(|e| e.into())?.abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).Create)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(details), methoddata.try_into().map_err(|e| e.into())?.abi(), result__.as_mut_ptr()).from_abi::(result__) }) } #[doc = "*Required features: `\"Foundation_Collections\"`*"] #[cfg(feature = "Foundation_Collections")] - pub fn CreateWithMerchantInfo<'a, P0, P1, E1, P2>(details: P0, methoddata: P1, merchantinfo: P2) -> ::windows::core::Result + pub fn CreateWithMerchantInfo<'a, P0, E0>(details: &PaymentDetails, methoddata: P0, merchantinfo: &PaymentMerchantInfo) -> ::windows::core::Result where - P0: ::std::convert::Into<::windows::core::InParam<'a, PaymentDetails>>, - P1: ::std::convert::TryInto<::windows::core::InParam<'a, super::super::Foundation::Collections::IIterable>, Error = E1>, - E1: ::std::convert::Into<::windows::core::Error>, - P2: ::std::convert::Into<::windows::core::InParam<'a, PaymentMerchantInfo>>, + P0: ::std::convert::TryInto<::windows::core::InParam<'a, super::super::Foundation::Collections::IIterable>, Error = E0>, + E0: ::std::convert::Into<::windows::core::Error>, { Self::IPaymentRequestFactory(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).CreateWithMerchantInfo)(::windows::core::Vtable::as_raw(this), details.into().abi(), methoddata.try_into().map_err(|e| e.into())?.abi(), merchantinfo.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).CreateWithMerchantInfo)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(details), methoddata.try_into().map_err(|e| e.into())?.abi(), ::core::mem::transmute_copy(merchantinfo), result__.as_mut_ptr()).from_abi::(result__) }) } #[doc = "*Required features: `\"Foundation_Collections\"`*"] #[cfg(feature = "Foundation_Collections")] - pub fn CreateWithMerchantInfoAndOptions<'a, P0, P1, E1, P2, P3>(details: P0, methoddata: P1, merchantinfo: P2, options: P3) -> ::windows::core::Result + pub fn CreateWithMerchantInfoAndOptions<'a, P0, E0>(details: &PaymentDetails, methoddata: P0, merchantinfo: &PaymentMerchantInfo, options: &PaymentOptions) -> ::windows::core::Result where - P0: ::std::convert::Into<::windows::core::InParam<'a, PaymentDetails>>, - P1: ::std::convert::TryInto<::windows::core::InParam<'a, super::super::Foundation::Collections::IIterable>, Error = E1>, - E1: ::std::convert::Into<::windows::core::Error>, - P2: ::std::convert::Into<::windows::core::InParam<'a, PaymentMerchantInfo>>, - P3: ::std::convert::Into<::windows::core::InParam<'a, PaymentOptions>>, + P0: ::std::convert::TryInto<::windows::core::InParam<'a, super::super::Foundation::Collections::IIterable>, Error = E0>, + E0: ::std::convert::Into<::windows::core::Error>, { Self::IPaymentRequestFactory(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).CreateWithMerchantInfoAndOptions)(::windows::core::Vtable::as_raw(this), details.into().abi(), methoddata.try_into().map_err(|e| e.into())?.abi(), merchantinfo.into().abi(), options.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).CreateWithMerchantInfoAndOptions)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(details), methoddata.try_into().map_err(|e| e.into())?.abi(), ::core::mem::transmute_copy(merchantinfo), ::core::mem::transmute_copy(options), result__.as_mut_ptr()).from_abi::(result__) }) } #[doc = "*Required features: `\"Foundation_Collections\"`*"] #[cfg(feature = "Foundation_Collections")] - pub fn CreateWithMerchantInfoOptionsAndId<'a, P0, P1, E1, P2, P3>(details: P0, methoddata: P1, merchantinfo: P2, options: P3, id: &::windows::core::HSTRING) -> ::windows::core::Result + pub fn CreateWithMerchantInfoOptionsAndId<'a, P0, E0>(details: &PaymentDetails, methoddata: P0, merchantinfo: &PaymentMerchantInfo, options: &PaymentOptions, id: &::windows::core::HSTRING) -> ::windows::core::Result where - P0: ::std::convert::Into<::windows::core::InParam<'a, PaymentDetails>>, - P1: ::std::convert::TryInto<::windows::core::InParam<'a, super::super::Foundation::Collections::IIterable>, Error = E1>, - E1: ::std::convert::Into<::windows::core::Error>, - P2: ::std::convert::Into<::windows::core::InParam<'a, PaymentMerchantInfo>>, - P3: ::std::convert::Into<::windows::core::InParam<'a, PaymentOptions>>, + P0: ::std::convert::TryInto<::windows::core::InParam<'a, super::super::Foundation::Collections::IIterable>, Error = E0>, + E0: ::std::convert::Into<::windows::core::Error>, { Self::IPaymentRequestFactory2(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).CreateWithMerchantInfoOptionsAndId)(::windows::core::Vtable::as_raw(this), details.into().abi(), methoddata.try_into().map_err(|e| e.into())?.abi(), merchantinfo.into().abi(), options.into().abi(), ::core::mem::transmute_copy(id), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).CreateWithMerchantInfoOptionsAndId)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(details), methoddata.try_into().map_err(|e| e.into())?.abi(), ::core::mem::transmute_copy(merchantinfo), ::core::mem::transmute_copy(options), ::core::mem::transmute_copy(id), result__.as_mut_ptr()).from_abi::(result__) }) } #[doc(hidden)] @@ -2182,12 +2144,9 @@ impl PaymentRequestChangedArgs { (::windows::core::Vtable::vtable(this).SelectedShippingOption)(::windows::core::Vtable::as_raw(this), result__.as_mut_ptr()).from_abi::(result__) } } - pub fn Acknowledge<'a, P0>(&self, changeresult: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, PaymentRequestChangedResult>>, - { + pub fn Acknowledge(&self, changeresult: &PaymentRequestChangedResult) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).Acknowledge)(::windows::core::Vtable::as_raw(this), changeresult.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).Acknowledge)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(changeresult)).ok() } } } impl ::core::clone::Clone for PaymentRequestChangedArgs { @@ -2287,12 +2246,9 @@ impl PaymentRequestChangedResult { (::windows::core::Vtable::vtable(this).UpdatedPaymentDetails)(::windows::core::Vtable::as_raw(this), result__.as_mut_ptr()).from_abi::(result__) } } - pub fn SetUpdatedPaymentDetails<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, PaymentDetails>>, - { + pub fn SetUpdatedPaymentDetails(&self, value: &PaymentDetails) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).SetUpdatedPaymentDetails)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetUpdatedPaymentDetails)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } pub fn Create(changeacceptedbymerchant: bool) -> ::windows::core::Result { Self::IPaymentRequestChangedResultFactory(|this| unsafe { @@ -2300,13 +2256,10 @@ impl PaymentRequestChangedResult { (::windows::core::Vtable::vtable(this).Create)(::windows::core::Vtable::as_raw(this), changeacceptedbymerchant, result__.as_mut_ptr()).from_abi::(result__) }) } - pub fn CreateWithPaymentDetails<'a, P0>(changeacceptedbymerchant: bool, updatedpaymentdetails: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, PaymentDetails>>, - { + pub fn CreateWithPaymentDetails(changeacceptedbymerchant: bool, updatedpaymentdetails: &PaymentDetails) -> ::windows::core::Result { Self::IPaymentRequestChangedResultFactory(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).CreateWithPaymentDetails)(::windows::core::Vtable::as_raw(this), changeacceptedbymerchant, updatedpaymentdetails.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).CreateWithPaymentDetails)(::windows::core::Vtable::as_raw(this), changeacceptedbymerchant, ::core::mem::transmute_copy(updatedpaymentdetails), result__.as_mut_ptr()).from_abi::(result__) }) } #[doc(hidden)] @@ -2604,12 +2557,9 @@ impl PaymentShippingOption { (::windows::core::Vtable::vtable(this).Amount)(::windows::core::Vtable::as_raw(this), result__.as_mut_ptr()).from_abi::(result__) } } - pub fn SetAmount<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, PaymentCurrencyAmount>>, - { + pub fn SetAmount(&self, value: &PaymentCurrencyAmount) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).SetAmount)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetAmount)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } pub fn Tag(&self) -> ::windows::core::Result<::windows::core::HSTRING> { let this = self; @@ -2633,31 +2583,22 @@ impl PaymentShippingOption { let this = self; unsafe { (::windows::core::Vtable::vtable(this).SetIsSelected)(::windows::core::Vtable::as_raw(this), value).ok() } } - pub fn Create<'a, P0>(label: &::windows::core::HSTRING, amount: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, PaymentCurrencyAmount>>, - { + pub fn Create(label: &::windows::core::HSTRING, amount: &PaymentCurrencyAmount) -> ::windows::core::Result { Self::IPaymentShippingOptionFactory(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).Create)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(label), amount.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).Create)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(label), ::core::mem::transmute_copy(amount), result__.as_mut_ptr()).from_abi::(result__) }) } - pub fn CreateWithSelected<'a, P0>(label: &::windows::core::HSTRING, amount: P0, selected: bool) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, PaymentCurrencyAmount>>, - { + pub fn CreateWithSelected(label: &::windows::core::HSTRING, amount: &PaymentCurrencyAmount, selected: bool) -> ::windows::core::Result { Self::IPaymentShippingOptionFactory(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).CreateWithSelected)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(label), amount.into().abi(), selected, result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).CreateWithSelected)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(label), ::core::mem::transmute_copy(amount), selected, result__.as_mut_ptr()).from_abi::(result__) }) } - pub fn CreateWithSelectedAndTag<'a, P0>(label: &::windows::core::HSTRING, amount: P0, selected: bool, tag: &::windows::core::HSTRING) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, PaymentCurrencyAmount>>, - { + pub fn CreateWithSelectedAndTag(label: &::windows::core::HSTRING, amount: &PaymentCurrencyAmount, selected: bool, tag: &::windows::core::HSTRING) -> ::windows::core::Result { Self::IPaymentShippingOptionFactory(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).CreateWithSelectedAndTag)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(label), amount.into().abi(), selected, ::core::mem::transmute_copy(tag), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).CreateWithSelectedAndTag)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(label), ::core::mem::transmute_copy(amount), selected, ::core::mem::transmute_copy(tag), result__.as_mut_ptr()).from_abi::(result__) }) } #[doc(hidden)] @@ -3051,13 +2992,9 @@ impl PaymentRequestChangedHandler { let com = PaymentRequestChangedHandlerBox:: { vtable: &PaymentRequestChangedHandlerBox::::VTABLE, count: ::windows::core::RefCount::new(1), invoke }; unsafe { ::core::mem::transmute(::windows::core::alloc::boxed::Box::new(com)) } } - pub fn Invoke<'a, P0, P1>(&self, paymentrequest: P0, args: P1) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, PaymentRequest>>, - P1: ::std::convert::Into<::windows::core::InParam<'a, PaymentRequestChangedArgs>>, - { + pub fn Invoke(&self, paymentrequest: &PaymentRequest, args: &PaymentRequestChangedArgs) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).Invoke)(::windows::core::Vtable::as_raw(this), paymentrequest.into().abi(), args.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).Invoke)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(paymentrequest), ::core::mem::transmute_copy(args)).ok() } } } #[repr(C)] diff --git a/crates/libs/windows/src/Windows/ApplicationModel/Preview/Holographic/mod.rs b/crates/libs/windows/src/Windows/ApplicationModel/Preview/Holographic/mod.rs index ce76e68c8b..e27e5d4665 100644 --- a/crates/libs/windows/src/Windows/ApplicationModel/Preview/Holographic/mod.rs +++ b/crates/libs/windows/src/Windows/ApplicationModel/Preview/Holographic/mod.rs @@ -107,21 +107,15 @@ pub struct HolographicKeyboardPlacementOverridePreview(::windows::core::IUnknown impl HolographicKeyboardPlacementOverridePreview { #[doc = "*Required features: `\"Foundation_Numerics\"`, `\"Perception_Spatial\"`, `\"deprecated\"`*"] #[cfg(all(feature = "Foundation_Numerics", feature = "Perception_Spatial", feature = "deprecated"))] - pub fn SetPlacementOverride<'a, P0>(&self, coordinatesystem: P0, topcenterposition: super::super::super::Foundation::Numerics::Vector3, normal: super::super::super::Foundation::Numerics::Vector3) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Perception::Spatial::SpatialCoordinateSystem>>, - { + pub fn SetPlacementOverride(&self, coordinatesystem: &super::super::super::Perception::Spatial::SpatialCoordinateSystem, topcenterposition: super::super::super::Foundation::Numerics::Vector3, normal: super::super::super::Foundation::Numerics::Vector3) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).SetPlacementOverride)(::windows::core::Vtable::as_raw(this), coordinatesystem.into().abi(), topcenterposition, normal).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetPlacementOverride)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(coordinatesystem), topcenterposition, normal).ok() } } #[doc = "*Required features: `\"Foundation_Numerics\"`, `\"Perception_Spatial\"`, `\"deprecated\"`*"] #[cfg(all(feature = "Foundation_Numerics", feature = "Perception_Spatial", feature = "deprecated"))] - pub fn SetPlacementOverrideWithMaxSize<'a, P0>(&self, coordinatesystem: P0, topcenterposition: super::super::super::Foundation::Numerics::Vector3, normal: super::super::super::Foundation::Numerics::Vector3, maxsize: super::super::super::Foundation::Numerics::Vector2) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Perception::Spatial::SpatialCoordinateSystem>>, - { + pub fn SetPlacementOverrideWithMaxSize(&self, coordinatesystem: &super::super::super::Perception::Spatial::SpatialCoordinateSystem, topcenterposition: super::super::super::Foundation::Numerics::Vector3, normal: super::super::super::Foundation::Numerics::Vector3, maxsize: super::super::super::Foundation::Numerics::Vector2) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).SetPlacementOverrideWithMaxSize)(::windows::core::Vtable::as_raw(this), coordinatesystem.into().abi(), topcenterposition, normal, maxsize).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetPlacementOverrideWithMaxSize)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(coordinatesystem), topcenterposition, normal, maxsize).ok() } } #[doc = "*Required features: `\"deprecated\"`*"] #[cfg(feature = "deprecated")] diff --git a/crates/libs/windows/src/Windows/ApplicationModel/Preview/InkWorkspace/mod.rs b/crates/libs/windows/src/Windows/ApplicationModel/Preview/InkWorkspace/mod.rs index d8903c45fe..0d169b51b0 100644 --- a/crates/libs/windows/src/Windows/ApplicationModel/Preview/InkWorkspace/mod.rs +++ b/crates/libs/windows/src/Windows/ApplicationModel/Preview/InkWorkspace/mod.rs @@ -37,14 +37,11 @@ pub struct InkWorkspaceHostedAppManager(::windows::core::IUnknown); impl InkWorkspaceHostedAppManager { #[doc = "*Required features: `\"Foundation\"`, `\"Graphics_Imaging\"`*"] #[cfg(all(feature = "Foundation", feature = "Graphics_Imaging"))] - pub fn SetThumbnailAsync<'a, P0>(&self, bitmap: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Graphics::Imaging::SoftwareBitmap>>, - { + pub fn SetThumbnailAsync(&self, bitmap: &super::super::super::Graphics::Imaging::SoftwareBitmap) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).SetThumbnailAsync)(::windows::core::Vtable::as_raw(this), bitmap.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).SetThumbnailAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(bitmap), result__.as_mut_ptr()).from_abi::(result__) } } pub fn GetForCurrentApp() -> ::windows::core::Result { diff --git a/crates/libs/windows/src/Windows/ApplicationModel/Preview/Notes/mod.rs b/crates/libs/windows/src/Windows/ApplicationModel/Preview/Notes/mod.rs index 0796ebd495..fc07629522 100644 --- a/crates/libs/windows/src/Windows/ApplicationModel/Preview/Notes/mod.rs +++ b/crates/libs/windows/src/Windows/ApplicationModel/Preview/Notes/mod.rs @@ -372,14 +372,11 @@ impl NotesWindowManagerPreview { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn SystemLockStateChanged<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Foundation::TypedEventHandler>>, - { + pub fn SystemLockStateChanged(&self, handler: &super::super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).SystemLockStateChanged)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).SystemLockStateChanged)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -390,14 +387,11 @@ impl NotesWindowManagerPreview { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn NotePlacementChanged<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Foundation::TypedEventHandler>>, - { + pub fn NotePlacementChanged(&self, handler: &super::super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).NotePlacementChanged)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).NotePlacementChanged)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -408,14 +402,11 @@ impl NotesWindowManagerPreview { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn NoteVisibilityChanged<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Foundation::TypedEventHandler>>, - { + pub fn NoteVisibilityChanged(&self, handler: &super::super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).NoteVisibilityChanged)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).NoteVisibilityChanged)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -424,23 +415,19 @@ impl NotesWindowManagerPreview { let this = self; unsafe { (::windows::core::Vtable::vtable(this).RemoveNoteVisibilityChanged)(::windows::core::Vtable::as_raw(this), token).ok() } } - pub fn ShowNoteRelativeToWithOptions<'a, P0>(&self, noteviewid: i32, anchornoteviewid: i32, options: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, NotesWindowManagerPreviewShowNoteOptions>>, - { + pub fn ShowNoteRelativeToWithOptions(&self, noteviewid: i32, anchornoteviewid: i32, options: &NotesWindowManagerPreviewShowNoteOptions) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).ShowNoteRelativeToWithOptions)(::windows::core::Vtable::as_raw(this), noteviewid, anchornoteviewid, options.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).ShowNoteRelativeToWithOptions)(::windows::core::Vtable::as_raw(this), noteviewid, anchornoteviewid, ::core::mem::transmute_copy(options)).ok() } } #[doc = "*Required features: `\"Storage_Streams\"`*"] #[cfg(feature = "Storage_Streams")] - pub fn ShowNoteWithPlacementWithOptions<'a, P0, E0, P1>(&self, noteviewid: i32, data: P0, options: P1) -> ::windows::core::Result<()> + pub fn ShowNoteWithPlacementWithOptions<'a, P0, E0>(&self, noteviewid: i32, data: P0, options: &NotesWindowManagerPreviewShowNoteOptions) -> ::windows::core::Result<()> where P0: ::std::convert::TryInto<::windows::core::InParam<'a, super::super::super::Storage::Streams::IBuffer>, Error = E0>, E0: ::std::convert::Into<::windows::core::Error>, - P1: ::std::convert::Into<::windows::core::InParam<'a, NotesWindowManagerPreviewShowNoteOptions>>, { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).ShowNoteWithPlacementWithOptions)(::windows::core::Vtable::as_raw(this), noteviewid, data.try_into().map_err(|e| e.into())?.abi(), options.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).ShowNoteWithPlacementWithOptions)(::windows::core::Vtable::as_raw(this), noteviewid, data.try_into().map_err(|e| e.into())?.abi(), ::core::mem::transmute_copy(options)).ok() } } pub fn SetFocusToPreviousView(&self) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; @@ -448,14 +435,11 @@ impl NotesWindowManagerPreview { } #[doc = "*Required features: `\"Foundation\"`, `\"Graphics_Imaging\"`*"] #[cfg(all(feature = "Foundation", feature = "Graphics_Imaging"))] - pub fn SetThumbnailImageForTaskSwitcherAsync<'a, P0>(&self, bitmap: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Graphics::Imaging::SoftwareBitmap>>, - { + pub fn SetThumbnailImageForTaskSwitcherAsync(&self, bitmap: &super::super::super::Graphics::Imaging::SoftwareBitmap) -> ::windows::core::Result { let this = &::windows::core::Interface::cast::(self)?; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).SetThumbnailImageForTaskSwitcherAsync)(::windows::core::Vtable::as_raw(this), bitmap.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).SetThumbnailImageForTaskSwitcherAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(bitmap), result__.as_mut_ptr()).from_abi::(result__) } } pub fn GetForCurrentApp() -> ::windows::core::Result { diff --git a/crates/libs/windows/src/Windows/ApplicationModel/Resources/Core/mod.rs b/crates/libs/windows/src/Windows/ApplicationModel/Resources/Core/mod.rs index 2297a73aa6..01ba7606f4 100644 --- a/crates/libs/windows/src/Windows/ApplicationModel/Resources/Core/mod.rs +++ b/crates/libs/windows/src/Windows/ApplicationModel/Resources/Core/mod.rs @@ -334,14 +334,11 @@ impl NamedResource { (::windows::core::Vtable::vtable(this).Resolve)(::windows::core::Vtable::as_raw(this), result__.as_mut_ptr()).from_abi::(result__) } } - pub fn ResolveForContext<'a, P0>(&self, resourcecontext: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, ResourceContext>>, - { + pub fn ResolveForContext(&self, resourcecontext: &ResourceContext) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).ResolveForContext)(::windows::core::Vtable::as_raw(this), resourcecontext.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).ResolveForContext)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(resourcecontext), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation_Collections\"`*"] @@ -355,14 +352,11 @@ impl NamedResource { } #[doc = "*Required features: `\"Foundation_Collections\"`*"] #[cfg(feature = "Foundation_Collections")] - pub fn ResolveAllForContext<'a, P0>(&self, resourcecontext: P0) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, ResourceContext>>, - { + pub fn ResolveAllForContext(&self, resourcecontext: &ResourceContext) -> ::windows::core::Result> { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).ResolveAllForContext)(::windows::core::Vtable::as_raw(this), resourcecontext.into().abi(), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).ResolveAllForContext)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(resourcecontext), result__.as_mut_ptr()).from_abi::>(result__) } } } @@ -603,14 +597,11 @@ impl ResourceCandidateVectorView { } #[doc = "*Required features: `\"Foundation_Collections\"`*"] #[cfg(feature = "Foundation_Collections")] - pub fn IndexOf<'a, P0>(&self, value: P0, index: &mut u32) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, ResourceCandidate>>, - { + pub fn IndexOf(&self, value: &ResourceCandidate, index: &mut u32) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).IndexOf)(::windows::core::Vtable::as_raw(this), value.into().abi(), index, result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).IndexOf)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value), index, result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation_Collections\"`*"] @@ -877,13 +868,10 @@ impl ResourceContext { } #[doc = "*Required features: `\"UI\"`*"] #[cfg(feature = "UI")] - pub fn GetForUIContext<'a, P0>(context: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::UI::UIContext>>, - { + pub fn GetForUIContext(context: &super::super::super::UI::UIContext) -> ::windows::core::Result { Self::IResourceContextStatics4(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).GetForUIContext)(::windows::core::Vtable::as_raw(this), context.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).GetForUIContext)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(context), result__.as_mut_ptr()).from_abi::(result__) }) } #[doc(hidden)] @@ -1372,14 +1360,11 @@ impl ResourceMap { (::windows::core::Vtable::vtable(this).GetValue)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(resource), result__.as_mut_ptr()).from_abi::(result__) } } - pub fn GetValueForContext<'a, P0>(&self, resource: &::windows::core::HSTRING, context: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, ResourceContext>>, - { + pub fn GetValueForContext(&self, resource: &::windows::core::HSTRING, context: &ResourceContext) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).GetValueForContext)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(resource), context.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).GetValueForContext)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(resource), ::core::mem::transmute_copy(context), result__.as_mut_ptr()).from_abi::(result__) } } pub fn GetSubtree(&self, reference: &::windows::core::HSTRING) -> ::windows::core::Result { @@ -2360,14 +2345,11 @@ impl ResourceQualifierObservableMap { } #[doc = "*Required features: `\"Foundation_Collections\"`*"] #[cfg(feature = "Foundation_Collections")] - pub fn MapChanged<'a, P0>(&self, vhnd: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Foundation::Collections::MapChangedEventHandler<::windows::core::HSTRING, ::windows::core::HSTRING>>>, - { + pub fn MapChanged(&self, vhnd: &super::super::super::Foundation::Collections::MapChangedEventHandler<::windows::core::HSTRING, ::windows::core::HSTRING>) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).MapChanged)(::windows::core::Vtable::as_raw(this), vhnd.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).MapChanged)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(vhnd), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation_Collections\"`*"] @@ -2574,14 +2556,11 @@ impl ResourceQualifierVectorView { } #[doc = "*Required features: `\"Foundation_Collections\"`*"] #[cfg(feature = "Foundation_Collections")] - pub fn IndexOf<'a, P0>(&self, value: P0, index: &mut u32) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, ResourceQualifier>>, - { + pub fn IndexOf(&self, value: &ResourceQualifier, index: &mut u32) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).IndexOf)(::windows::core::Vtable::as_raw(this), value.into().abi(), index, result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).IndexOf)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value), index, result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation_Collections\"`*"] diff --git a/crates/libs/windows/src/Windows/ApplicationModel/Resources/Management/mod.rs b/crates/libs/windows/src/Windows/ApplicationModel/Resources/Management/mod.rs index 70a4e69c2e..f691b36a86 100644 --- a/crates/libs/windows/src/Windows/ApplicationModel/Resources/Management/mod.rs +++ b/crates/libs/windows/src/Windows/ApplicationModel/Resources/Management/mod.rs @@ -321,49 +321,36 @@ pub struct ResourceIndexer(::windows::core::IUnknown); impl ResourceIndexer { #[doc = "*Required features: `\"Foundation\"`, `\"deprecated\"`*"] #[cfg(all(feature = "Foundation", feature = "deprecated"))] - pub fn IndexFilePath<'a, P0>(&self, filepath: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Foundation::Uri>>, - { + pub fn IndexFilePath(&self, filepath: &super::super::super::Foundation::Uri) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).IndexFilePath)(::windows::core::Vtable::as_raw(this), filepath.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).IndexFilePath)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(filepath), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation_Collections\"`, `\"deprecated\"`*"] #[cfg(all(feature = "Foundation_Collections", feature = "deprecated"))] - pub fn IndexFileContentsAsync<'a, P0>(&self, file: P0) -> ::windows::core::Result>> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Foundation::Uri>>, - { + pub fn IndexFileContentsAsync(&self, file: &super::super::super::Foundation::Uri) -> ::windows::core::Result>> { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).IndexFileContentsAsync)(::windows::core::Vtable::as_raw(this), file.into().abi(), result__.as_mut_ptr()).from_abi::>>(result__) + (::windows::core::Vtable::vtable(this).IndexFileContentsAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(file), result__.as_mut_ptr()).from_abi::>>(result__) } } #[doc = "*Required features: `\"Foundation\"`, `\"deprecated\"`*"] #[cfg(all(feature = "Foundation", feature = "deprecated"))] - pub fn CreateResourceIndexer<'a, P0>(projectroot: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Foundation::Uri>>, - { + pub fn CreateResourceIndexer(projectroot: &super::super::super::Foundation::Uri) -> ::windows::core::Result { Self::IResourceIndexerFactory(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).CreateResourceIndexer)(::windows::core::Vtable::as_raw(this), projectroot.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).CreateResourceIndexer)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(projectroot), result__.as_mut_ptr()).from_abi::(result__) }) } #[doc = "*Required features: `\"Foundation\"`, `\"deprecated\"`*"] #[cfg(all(feature = "Foundation", feature = "deprecated"))] - pub fn CreateResourceIndexerWithExtension<'a, P0, P1>(projectroot: P0, extensiondllpath: P1) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Foundation::Uri>>, - P1: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Foundation::Uri>>, - { + pub fn CreateResourceIndexerWithExtension(projectroot: &super::super::super::Foundation::Uri, extensiondllpath: &super::super::super::Foundation::Uri) -> ::windows::core::Result { Self::IResourceIndexerFactory2(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).CreateResourceIndexerWithExtension)(::windows::core::Vtable::as_raw(this), projectroot.into().abi(), extensiondllpath.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).CreateResourceIndexerWithExtension)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(projectroot), ::core::mem::transmute_copy(extensiondllpath), result__.as_mut_ptr()).from_abi::(result__) }) } #[doc(hidden)] diff --git a/crates/libs/windows/src/Windows/ApplicationModel/Resources/mod.rs b/crates/libs/windows/src/Windows/ApplicationModel/Resources/mod.rs index e08fe32397..b4f80acd45 100644 --- a/crates/libs/windows/src/Windows/ApplicationModel/Resources/mod.rs +++ b/crates/libs/windows/src/Windows/ApplicationModel/Resources/mod.rs @@ -139,14 +139,11 @@ impl ResourceLoader { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn GetStringForUri<'a, P0>(&self, uri: P0) -> ::windows::core::Result<::windows::core::HSTRING> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::Uri>>, - { + pub fn GetStringForUri(&self, uri: &super::super::Foundation::Uri) -> ::windows::core::Result<::windows::core::HSTRING> { let this = &::windows::core::Interface::cast::(self)?; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).GetStringForUri)(::windows::core::Vtable::as_raw(this), uri.into().abi(), result__.as_mut_ptr()).from_abi::<::windows::core::HSTRING>(result__) + (::windows::core::Vtable::vtable(this).GetStringForUri)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(uri), result__.as_mut_ptr()).from_abi::<::windows::core::HSTRING>(result__) } } pub fn CreateResourceLoaderByName(name: &::windows::core::HSTRING) -> ::windows::core::Result { @@ -157,13 +154,10 @@ impl ResourceLoader { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn GetStringForReference<'a, P0>(uri: P0) -> ::windows::core::Result<::windows::core::HSTRING> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::Uri>>, - { + pub fn GetStringForReference(uri: &super::super::Foundation::Uri) -> ::windows::core::Result<::windows::core::HSTRING> { Self::IResourceLoaderStatics(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).GetStringForReference)(::windows::core::Vtable::as_raw(this), uri.into().abi(), result__.as_mut_ptr()).from_abi::<::windows::core::HSTRING>(result__) + (::windows::core::Vtable::vtable(this).GetStringForReference)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(uri), result__.as_mut_ptr()).from_abi::<::windows::core::HSTRING>(result__) }) } pub fn GetForCurrentView() -> ::windows::core::Result { @@ -192,13 +186,10 @@ impl ResourceLoader { } #[doc = "*Required features: `\"UI\"`*"] #[cfg(feature = "UI")] - pub fn GetForUIContext<'a, P0>(context: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::UI::UIContext>>, - { + pub fn GetForUIContext(context: &super::super::UI::UIContext) -> ::windows::core::Result { Self::IResourceLoaderStatics3(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).GetForUIContext)(::windows::core::Vtable::as_raw(this), context.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).GetForUIContext)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(context), result__.as_mut_ptr()).from_abi::(result__) }) } pub fn GetDefaultPriPath(packagefullname: &::windows::core::HSTRING) -> ::windows::core::Result<::windows::core::HSTRING> { diff --git a/crates/libs/windows/src/Windows/ApplicationModel/Search/Core/mod.rs b/crates/libs/windows/src/Windows/ApplicationModel/Search/Core/mod.rs index 69c853d0ed..8676baae59 100644 --- a/crates/libs/windows/src/Windows/ApplicationModel/Search/Core/mod.rs +++ b/crates/libs/windows/src/Windows/ApplicationModel/Search/Core/mod.rs @@ -310,12 +310,9 @@ impl SearchSuggestionManager { let this = self; unsafe { (::windows::core::Vtable::vtable(this).SetSearchHistoryContext)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } - pub fn SetLocalContentSuggestionSettings<'a, P0>(&self, settings: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::LocalContentSuggestionSettings>>, - { + pub fn SetLocalContentSuggestionSettings(&self, settings: &super::LocalContentSuggestionSettings) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).SetLocalContentSuggestionSettings)(::windows::core::Vtable::as_raw(this), settings.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetLocalContentSuggestionSettings)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(settings)).ok() } } pub fn SetQuery(&self, querytext: &::windows::core::HSTRING) -> ::windows::core::Result<()> { let this = self; @@ -325,12 +322,9 @@ impl SearchSuggestionManager { let this = self; unsafe { (::windows::core::Vtable::vtable(this).SetQueryWithLanguage)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(querytext), ::core::mem::transmute_copy(language)).ok() } } - pub fn SetQueryWithSearchQueryLinguisticDetails<'a, P0>(&self, querytext: &::windows::core::HSTRING, language: &::windows::core::HSTRING, linguisticdetails: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::SearchQueryLinguisticDetails>>, - { + pub fn SetQueryWithSearchQueryLinguisticDetails(&self, querytext: &::windows::core::HSTRING, language: &::windows::core::HSTRING, linguisticdetails: &super::SearchQueryLinguisticDetails) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).SetQueryWithSearchQueryLinguisticDetails)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(querytext), ::core::mem::transmute_copy(language), linguisticdetails.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetQueryWithSearchQueryLinguisticDetails)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(querytext), ::core::mem::transmute_copy(language), ::core::mem::transmute_copy(linguisticdetails)).ok() } } #[doc = "*Required features: `\"Foundation_Collections\"`*"] #[cfg(feature = "Foundation_Collections")] @@ -355,14 +349,11 @@ impl SearchSuggestionManager { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn SuggestionsRequested<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Foundation::TypedEventHandler>>, - { + pub fn SuggestionsRequested(&self, handler: &super::super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).SuggestionsRequested)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).SuggestionsRequested)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -373,14 +364,11 @@ impl SearchSuggestionManager { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn RequestingFocusOnKeyboardInput<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Foundation::TypedEventHandler>>, - { + pub fn RequestingFocusOnKeyboardInput(&self, handler: &super::super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).RequestingFocusOnKeyboardInput)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).RequestingFocusOnKeyboardInput)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] diff --git a/crates/libs/windows/src/Windows/ApplicationModel/Search/mod.rs b/crates/libs/windows/src/Windows/ApplicationModel/Search/mod.rs index c549c3b515..5d89a75aa0 100644 --- a/crates/libs/windows/src/Windows/ApplicationModel/Search/mod.rs +++ b/crates/libs/windows/src/Windows/ApplicationModel/Search/mod.rs @@ -787,14 +787,11 @@ impl SearchPane { } #[doc = "*Required features: `\"Foundation\"`, `\"deprecated\"`*"] #[cfg(all(feature = "Foundation", feature = "deprecated"))] - pub fn VisibilityChanged<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn VisibilityChanged(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).VisibilityChanged)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).VisibilityChanged)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`, `\"deprecated\"`*"] @@ -805,14 +802,11 @@ impl SearchPane { } #[doc = "*Required features: `\"Foundation\"`, `\"deprecated\"`*"] #[cfg(all(feature = "Foundation", feature = "deprecated"))] - pub fn QueryChanged<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn QueryChanged(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).QueryChanged)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).QueryChanged)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`, `\"deprecated\"`*"] @@ -823,14 +817,11 @@ impl SearchPane { } #[doc = "*Required features: `\"Foundation\"`, `\"deprecated\"`*"] #[cfg(all(feature = "Foundation", feature = "deprecated"))] - pub fn SuggestionsRequested<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn SuggestionsRequested(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).SuggestionsRequested)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).SuggestionsRequested)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`, `\"deprecated\"`*"] @@ -841,14 +832,11 @@ impl SearchPane { } #[doc = "*Required features: `\"Foundation\"`, `\"deprecated\"`*"] #[cfg(all(feature = "Foundation", feature = "deprecated"))] - pub fn QuerySubmitted<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn QuerySubmitted(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).QuerySubmitted)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).QuerySubmitted)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`, `\"deprecated\"`*"] @@ -859,14 +847,11 @@ impl SearchPane { } #[doc = "*Required features: `\"Foundation\"`, `\"deprecated\"`*"] #[cfg(all(feature = "Foundation", feature = "deprecated"))] - pub fn ResultSuggestionChosen<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn ResultSuggestionChosen(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).ResultSuggestionChosen)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).ResultSuggestionChosen)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`, `\"deprecated\"`*"] @@ -877,12 +862,9 @@ impl SearchPane { } #[doc = "*Required features: `\"deprecated\"`*"] #[cfg(feature = "deprecated")] - pub fn SetLocalContentSuggestionSettings<'a, P0>(&self, settings: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, LocalContentSuggestionSettings>>, - { + pub fn SetLocalContentSuggestionSettings(&self, settings: &LocalContentSuggestionSettings) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).SetLocalContentSuggestionSettings)(::windows::core::Vtable::as_raw(this), settings.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetLocalContentSuggestionSettings)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(settings)).ok() } } #[doc = "*Required features: `\"deprecated\"`*"] #[cfg(feature = "deprecated")] diff --git a/crates/libs/windows/src/Windows/ApplicationModel/SocialInfo/Provider/mod.rs b/crates/libs/windows/src/Windows/ApplicationModel/SocialInfo/Provider/mod.rs index e256824983..e48a3e94d6 100644 --- a/crates/libs/windows/src/Windows/ApplicationModel/SocialInfo/Provider/mod.rs +++ b/crates/libs/windows/src/Windows/ApplicationModel/SocialInfo/Provider/mod.rs @@ -169,12 +169,9 @@ impl SocialDashboardItemUpdater { } #[doc = "*Required features: `\"deprecated\"`*"] #[cfg(feature = "deprecated")] - pub fn SetThumbnail<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::SocialItemThumbnail>>, - { + pub fn SetThumbnail(&self, value: &super::SocialItemThumbnail) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).SetThumbnail)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetThumbnail)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } #[doc = "*Required features: `\"deprecated\"`*"] #[cfg(feature = "deprecated")] @@ -205,12 +202,9 @@ impl SocialDashboardItemUpdater { } #[doc = "*Required features: `\"Foundation\"`, `\"deprecated\"`*"] #[cfg(all(feature = "Foundation", feature = "deprecated"))] - pub fn SetTargetUri<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Foundation::Uri>>, - { + pub fn SetTargetUri(&self, value: &super::super::super::Foundation::Uri) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).SetTargetUri)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetTargetUri)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } } #[cfg(feature = "deprecated")] diff --git a/crates/libs/windows/src/Windows/ApplicationModel/SocialInfo/mod.rs b/crates/libs/windows/src/Windows/ApplicationModel/SocialInfo/mod.rs index 66e0ec7d16..4877108952 100644 --- a/crates/libs/windows/src/Windows/ApplicationModel/SocialInfo/mod.rs +++ b/crates/libs/windows/src/Windows/ApplicationModel/SocialInfo/mod.rs @@ -414,12 +414,9 @@ impl SocialFeedChildItem { } #[doc = "*Required features: `\"Foundation\"`, `\"deprecated\"`*"] #[cfg(all(feature = "Foundation", feature = "deprecated"))] - pub fn SetTargetUri<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::Uri>>, - { + pub fn SetTargetUri(&self, value: &super::super::Foundation::Uri) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).SetTargetUri)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetTargetUri)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } #[doc = "*Required features: `\"Foundation_Collections\"`, `\"deprecated\"`*"] #[cfg(all(feature = "Foundation_Collections", feature = "deprecated"))] @@ -441,12 +438,9 @@ impl SocialFeedChildItem { } #[doc = "*Required features: `\"deprecated\"`*"] #[cfg(feature = "deprecated")] - pub fn SetSharedItem<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, SocialFeedSharedItem>>, - { + pub fn SetSharedItem(&self, value: &SocialFeedSharedItem) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).SetSharedItem)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetSharedItem)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } } #[cfg(feature = "deprecated")] @@ -576,12 +570,9 @@ impl SocialFeedContent { } #[doc = "*Required features: `\"Foundation\"`, `\"deprecated\"`*"] #[cfg(all(feature = "Foundation", feature = "deprecated"))] - pub fn SetTargetUri<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::Uri>>, - { + pub fn SetTargetUri(&self, value: &super::super::Foundation::Uri) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).SetTargetUri)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetTargetUri)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } } #[cfg(feature = "deprecated")] @@ -730,12 +721,9 @@ impl SocialFeedItem { } #[doc = "*Required features: `\"Foundation\"`, `\"deprecated\"`*"] #[cfg(all(feature = "Foundation", feature = "deprecated"))] - pub fn SetTargetUri<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::Uri>>, - { + pub fn SetTargetUri(&self, value: &super::super::Foundation::Uri) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).SetTargetUri)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetTargetUri)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } #[doc = "*Required features: `\"Foundation_Collections\"`, `\"deprecated\"`*"] #[cfg(all(feature = "Foundation_Collections", feature = "deprecated"))] @@ -757,12 +745,9 @@ impl SocialFeedItem { } #[doc = "*Required features: `\"deprecated\"`*"] #[cfg(feature = "deprecated")] - pub fn SetSharedItem<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, SocialFeedSharedItem>>, - { + pub fn SetSharedItem(&self, value: &SocialFeedSharedItem) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).SetSharedItem)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetSharedItem)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } #[doc = "*Required features: `\"deprecated\"`*"] #[cfg(feature = "deprecated")] @@ -820,12 +805,9 @@ impl SocialFeedItem { } #[doc = "*Required features: `\"deprecated\"`*"] #[cfg(feature = "deprecated")] - pub fn SetChildItem<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, SocialFeedChildItem>>, - { + pub fn SetChildItem(&self, value: &SocialFeedChildItem) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).SetChildItem)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetChildItem)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } #[doc = "*Required features: `\"deprecated\"`*"] #[cfg(feature = "deprecated")] @@ -947,12 +929,9 @@ impl SocialFeedSharedItem { } #[doc = "*Required features: `\"Foundation\"`, `\"deprecated\"`*"] #[cfg(all(feature = "Foundation", feature = "deprecated"))] - pub fn SetOriginalSource<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::Uri>>, - { + pub fn SetOriginalSource(&self, value: &super::super::Foundation::Uri) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).SetOriginalSource)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetOriginalSource)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } #[doc = "*Required features: `\"deprecated\"`*"] #[cfg(feature = "deprecated")] @@ -989,21 +968,15 @@ impl SocialFeedSharedItem { } #[doc = "*Required features: `\"Foundation\"`, `\"deprecated\"`*"] #[cfg(all(feature = "Foundation", feature = "deprecated"))] - pub fn SetTargetUri<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::Uri>>, - { + pub fn SetTargetUri(&self, value: &super::super::Foundation::Uri) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).SetTargetUri)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetTargetUri)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } #[doc = "*Required features: `\"deprecated\"`*"] #[cfg(feature = "deprecated")] - pub fn SetThumbnail<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, SocialItemThumbnail>>, - { + pub fn SetThumbnail(&self, value: &SocialItemThumbnail) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).SetThumbnail)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetThumbnail)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } #[doc = "*Required features: `\"deprecated\"`*"] #[cfg(feature = "deprecated")] @@ -1119,12 +1092,9 @@ impl SocialItemThumbnail { } #[doc = "*Required features: `\"Foundation\"`, `\"deprecated\"`*"] #[cfg(all(feature = "Foundation", feature = "deprecated"))] - pub fn SetTargetUri<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::Uri>>, - { + pub fn SetTargetUri(&self, value: &super::super::Foundation::Uri) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).SetTargetUri)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetTargetUri)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } #[doc = "*Required features: `\"Foundation\"`, `\"deprecated\"`*"] #[cfg(all(feature = "Foundation", feature = "deprecated"))] @@ -1137,12 +1107,9 @@ impl SocialItemThumbnail { } #[doc = "*Required features: `\"Foundation\"`, `\"deprecated\"`*"] #[cfg(all(feature = "Foundation", feature = "deprecated"))] - pub fn SetImageUri<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::Uri>>, - { + pub fn SetImageUri(&self, value: &super::super::Foundation::Uri) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).SetImageUri)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetImageUri)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } #[doc = "*Required features: `\"Graphics_Imaging\"`, `\"deprecated\"`*"] #[cfg(all(feature = "Graphics_Imaging", feature = "deprecated"))] @@ -1315,12 +1282,9 @@ impl SocialUserInfo { } #[doc = "*Required features: `\"Foundation\"`, `\"deprecated\"`*"] #[cfg(all(feature = "Foundation", feature = "deprecated"))] - pub fn SetTargetUri<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::Uri>>, - { + pub fn SetTargetUri(&self, value: &super::super::Foundation::Uri) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).SetTargetUri)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetTargetUri)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } } #[cfg(feature = "deprecated")] diff --git a/crates/libs/windows/src/Windows/ApplicationModel/Store/Preview/InstallControl/mod.rs b/crates/libs/windows/src/Windows/ApplicationModel/Store/Preview/InstallControl/mod.rs index c1af0e7352..9943a4eb56 100644 --- a/crates/libs/windows/src/Windows/ApplicationModel/Store/Preview/InstallControl/mod.rs +++ b/crates/libs/windows/src/Windows/ApplicationModel/Store/Preview/InstallControl/mod.rs @@ -600,14 +600,11 @@ impl AppInstallItem { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn Completed<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::super::Foundation::TypedEventHandler>>, - { + pub fn Completed(&self, handler: &super::super::super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).Completed)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).Completed)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -618,14 +615,11 @@ impl AppInstallItem { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn StatusChanged<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::super::Foundation::TypedEventHandler>>, - { + pub fn StatusChanged(&self, handler: &super::super::super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).StatusChanged)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).StatusChanged)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -827,14 +821,11 @@ impl AppInstallManager { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn ItemCompleted<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::super::Foundation::TypedEventHandler>>, - { + pub fn ItemCompleted(&self, handler: &super::super::super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).ItemCompleted)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).ItemCompleted)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -845,14 +836,11 @@ impl AppInstallManager { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn ItemStatusChanged<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::super::Foundation::TypedEventHandler>>, - { + pub fn ItemStatusChanged(&self, handler: &super::super::super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).ItemStatusChanged)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).ItemStatusChanged)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -1005,87 +993,65 @@ impl AppInstallManager { } #[doc = "*Required features: `\"Foundation_Collections\"`, `\"Management_Deployment\"`*"] #[cfg(all(feature = "Foundation_Collections", feature = "Management_Deployment"))] - pub fn StartProductInstallAsync<'a, P0>(&self, productid: &::windows::core::HSTRING, catalogid: &::windows::core::HSTRING, flightid: &::windows::core::HSTRING, clientid: &::windows::core::HSTRING, repair: bool, forceuseofnonremovablestorage: bool, correlationvector: &::windows::core::HSTRING, targetvolume: P0) -> ::windows::core::Result>> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::super::Management::Deployment::PackageVolume>>, - { + pub fn StartProductInstallAsync(&self, productid: &::windows::core::HSTRING, catalogid: &::windows::core::HSTRING, flightid: &::windows::core::HSTRING, clientid: &::windows::core::HSTRING, repair: bool, forceuseofnonremovablestorage: bool, correlationvector: &::windows::core::HSTRING, targetvolume: &super::super::super::super::Management::Deployment::PackageVolume) -> ::windows::core::Result>> { let this = &::windows::core::Interface::cast::(self)?; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).StartProductInstallAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(productid), ::core::mem::transmute_copy(catalogid), ::core::mem::transmute_copy(flightid), ::core::mem::transmute_copy(clientid), repair, forceuseofnonremovablestorage, ::core::mem::transmute_copy(correlationvector), targetvolume.into().abi(), result__.as_mut_ptr()).from_abi::>>(result__) + (::windows::core::Vtable::vtable(this).StartProductInstallAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(productid), ::core::mem::transmute_copy(catalogid), ::core::mem::transmute_copy(flightid), ::core::mem::transmute_copy(clientid), repair, forceuseofnonremovablestorage, ::core::mem::transmute_copy(correlationvector), ::core::mem::transmute_copy(targetvolume), result__.as_mut_ptr()).from_abi::>>(result__) } } #[doc = "*Required features: `\"Foundation_Collections\"`, `\"Management_Deployment\"`, `\"System\"`*"] #[cfg(all(feature = "Foundation_Collections", feature = "Management_Deployment", feature = "System"))] - pub fn StartProductInstallForUserAsync<'a, P0, P1>(&self, user: P0, productid: &::windows::core::HSTRING, catalogid: &::windows::core::HSTRING, flightid: &::windows::core::HSTRING, clientid: &::windows::core::HSTRING, repair: bool, forceuseofnonremovablestorage: bool, correlationvector: &::windows::core::HSTRING, targetvolume: P1) -> ::windows::core::Result>> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::super::System::User>>, - P1: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::super::Management::Deployment::PackageVolume>>, - { + pub fn StartProductInstallForUserAsync(&self, user: &super::super::super::super::System::User, productid: &::windows::core::HSTRING, catalogid: &::windows::core::HSTRING, flightid: &::windows::core::HSTRING, clientid: &::windows::core::HSTRING, repair: bool, forceuseofnonremovablestorage: bool, correlationvector: &::windows::core::HSTRING, targetvolume: &super::super::super::super::Management::Deployment::PackageVolume) -> ::windows::core::Result>> { let this = &::windows::core::Interface::cast::(self)?; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).StartProductInstallForUserAsync)(::windows::core::Vtable::as_raw(this), user.into().abi(), ::core::mem::transmute_copy(productid), ::core::mem::transmute_copy(catalogid), ::core::mem::transmute_copy(flightid), ::core::mem::transmute_copy(clientid), repair, forceuseofnonremovablestorage, ::core::mem::transmute_copy(correlationvector), targetvolume.into().abi(), result__.as_mut_ptr()).from_abi::>>(result__) + (::windows::core::Vtable::vtable(this).StartProductInstallForUserAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(user), ::core::mem::transmute_copy(productid), ::core::mem::transmute_copy(catalogid), ::core::mem::transmute_copy(flightid), ::core::mem::transmute_copy(clientid), repair, forceuseofnonremovablestorage, ::core::mem::transmute_copy(correlationvector), ::core::mem::transmute_copy(targetvolume), result__.as_mut_ptr()).from_abi::>>(result__) } } #[doc = "*Required features: `\"Foundation\"`, `\"System\"`*"] #[cfg(all(feature = "Foundation", feature = "System"))] - pub fn UpdateAppByPackageFamilyNameForUserAsync<'a, P0>(&self, user: P0, packagefamilyname: &::windows::core::HSTRING, correlationvector: &::windows::core::HSTRING) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::super::System::User>>, - { + pub fn UpdateAppByPackageFamilyNameForUserAsync(&self, user: &super::super::super::super::System::User, packagefamilyname: &::windows::core::HSTRING, correlationvector: &::windows::core::HSTRING) -> ::windows::core::Result> { let this = &::windows::core::Interface::cast::(self)?; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).UpdateAppByPackageFamilyNameForUserAsync)(::windows::core::Vtable::as_raw(this), user.into().abi(), ::core::mem::transmute_copy(packagefamilyname), ::core::mem::transmute_copy(correlationvector), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).UpdateAppByPackageFamilyNameForUserAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(user), ::core::mem::transmute_copy(packagefamilyname), ::core::mem::transmute_copy(correlationvector), result__.as_mut_ptr()).from_abi::>(result__) } } #[doc = "*Required features: `\"Foundation\"`, `\"System\"`*"] #[cfg(all(feature = "Foundation", feature = "System"))] - pub fn SearchForUpdatesForUserAsync<'a, P0>(&self, user: P0, productid: &::windows::core::HSTRING, skuid: &::windows::core::HSTRING, catalogid: &::windows::core::HSTRING, correlationvector: &::windows::core::HSTRING) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::super::System::User>>, - { + pub fn SearchForUpdatesForUserAsync(&self, user: &super::super::super::super::System::User, productid: &::windows::core::HSTRING, skuid: &::windows::core::HSTRING, catalogid: &::windows::core::HSTRING, correlationvector: &::windows::core::HSTRING) -> ::windows::core::Result> { let this = &::windows::core::Interface::cast::(self)?; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).SearchForUpdatesForUserAsync)(::windows::core::Vtable::as_raw(this), user.into().abi(), ::core::mem::transmute_copy(productid), ::core::mem::transmute_copy(skuid), ::core::mem::transmute_copy(catalogid), ::core::mem::transmute_copy(correlationvector), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).SearchForUpdatesForUserAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(user), ::core::mem::transmute_copy(productid), ::core::mem::transmute_copy(skuid), ::core::mem::transmute_copy(catalogid), ::core::mem::transmute_copy(correlationvector), result__.as_mut_ptr()).from_abi::>(result__) } } #[doc = "*Required features: `\"Foundation_Collections\"`, `\"System\"`*"] #[cfg(all(feature = "Foundation_Collections", feature = "System"))] - pub fn SearchForAllUpdatesForUserAsync<'a, P0>(&self, user: P0, correlationvector: &::windows::core::HSTRING) -> ::windows::core::Result>> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::super::System::User>>, - { + pub fn SearchForAllUpdatesForUserAsync(&self, user: &super::super::super::super::System::User, correlationvector: &::windows::core::HSTRING) -> ::windows::core::Result>> { let this = &::windows::core::Interface::cast::(self)?; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).SearchForAllUpdatesForUserAsync)(::windows::core::Vtable::as_raw(this), user.into().abi(), ::core::mem::transmute_copy(correlationvector), result__.as_mut_ptr()).from_abi::>>(result__) + (::windows::core::Vtable::vtable(this).SearchForAllUpdatesForUserAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(user), ::core::mem::transmute_copy(correlationvector), result__.as_mut_ptr()).from_abi::>>(result__) } } #[doc = "*Required features: `\"Foundation\"`, `\"System\"`*"] #[cfg(all(feature = "Foundation", feature = "System"))] - pub fn GetIsAppAllowedToInstallForUserAsync<'a, P0>(&self, user: P0, productid: &::windows::core::HSTRING, skuid: &::windows::core::HSTRING, catalogid: &::windows::core::HSTRING, correlationvector: &::windows::core::HSTRING) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::super::System::User>>, - { + pub fn GetIsAppAllowedToInstallForUserAsync(&self, user: &super::super::super::super::System::User, productid: &::windows::core::HSTRING, skuid: &::windows::core::HSTRING, catalogid: &::windows::core::HSTRING, correlationvector: &::windows::core::HSTRING) -> ::windows::core::Result> { let this = &::windows::core::Interface::cast::(self)?; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).GetIsAppAllowedToInstallForUserAsync)(::windows::core::Vtable::as_raw(this), user.into().abi(), ::core::mem::transmute_copy(productid), ::core::mem::transmute_copy(skuid), ::core::mem::transmute_copy(catalogid), ::core::mem::transmute_copy(correlationvector), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).GetIsAppAllowedToInstallForUserAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(user), ::core::mem::transmute_copy(productid), ::core::mem::transmute_copy(skuid), ::core::mem::transmute_copy(catalogid), ::core::mem::transmute_copy(correlationvector), result__.as_mut_ptr()).from_abi::>(result__) } } #[doc = "*Required features: `\"Foundation\"`, `\"System\"`*"] #[cfg(all(feature = "Foundation", feature = "System"))] - pub fn GetIsApplicableForUserAsync<'a, P0>(&self, user: P0, productid: &::windows::core::HSTRING, skuid: &::windows::core::HSTRING) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::super::System::User>>, - { + pub fn GetIsApplicableForUserAsync(&self, user: &super::super::super::super::System::User, productid: &::windows::core::HSTRING, skuid: &::windows::core::HSTRING) -> ::windows::core::Result> { let this = &::windows::core::Interface::cast::(self)?; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).GetIsApplicableForUserAsync)(::windows::core::Vtable::as_raw(this), user.into().abi(), ::core::mem::transmute_copy(productid), ::core::mem::transmute_copy(skuid), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).GetIsApplicableForUserAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(user), ::core::mem::transmute_copy(productid), ::core::mem::transmute_copy(skuid), result__.as_mut_ptr()).from_abi::>(result__) } } pub fn MoveToFrontOfDownloadQueue(&self, productid: &::windows::core::HSTRING, correlationvector: &::windows::core::HSTRING) -> ::windows::core::Result<()> { @@ -1103,14 +1069,11 @@ impl AppInstallManager { } #[doc = "*Required features: `\"Foundation\"`, `\"System\"`*"] #[cfg(all(feature = "Foundation", feature = "System"))] - pub fn GetFreeUserEntitlementForUserAsync<'a, P0>(&self, user: P0, storeid: &::windows::core::HSTRING, campaignid: &::windows::core::HSTRING, correlationvector: &::windows::core::HSTRING) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::super::System::User>>, - { + pub fn GetFreeUserEntitlementForUserAsync(&self, user: &super::super::super::super::System::User, storeid: &::windows::core::HSTRING, campaignid: &::windows::core::HSTRING, correlationvector: &::windows::core::HSTRING) -> ::windows::core::Result> { let this = &::windows::core::Interface::cast::(self)?; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).GetFreeUserEntitlementForUserAsync)(::windows::core::Vtable::as_raw(this), user.into().abi(), ::core::mem::transmute_copy(storeid), ::core::mem::transmute_copy(campaignid), ::core::mem::transmute_copy(correlationvector), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).GetFreeUserEntitlementForUserAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(user), ::core::mem::transmute_copy(storeid), ::core::mem::transmute_copy(campaignid), ::core::mem::transmute_copy(correlationvector), result__.as_mut_ptr()).from_abi::>(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -1133,77 +1096,56 @@ impl AppInstallManager { } #[doc = "*Required features: `\"Foundation_Collections\"`*"] #[cfg(feature = "Foundation_Collections")] - pub fn SearchForAllUpdatesWithUpdateOptionsAsync<'a, P0>(&self, correlationvector: &::windows::core::HSTRING, clientid: &::windows::core::HSTRING, updateoptions: P0) -> ::windows::core::Result>> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, AppUpdateOptions>>, - { + pub fn SearchForAllUpdatesWithUpdateOptionsAsync(&self, correlationvector: &::windows::core::HSTRING, clientid: &::windows::core::HSTRING, updateoptions: &AppUpdateOptions) -> ::windows::core::Result>> { let this = &::windows::core::Interface::cast::(self)?; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).SearchForAllUpdatesWithUpdateOptionsAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(correlationvector), ::core::mem::transmute_copy(clientid), updateoptions.into().abi(), result__.as_mut_ptr()).from_abi::>>(result__) + (::windows::core::Vtable::vtable(this).SearchForAllUpdatesWithUpdateOptionsAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(correlationvector), ::core::mem::transmute_copy(clientid), ::core::mem::transmute_copy(updateoptions), result__.as_mut_ptr()).from_abi::>>(result__) } } #[doc = "*Required features: `\"Foundation_Collections\"`, `\"System\"`*"] #[cfg(all(feature = "Foundation_Collections", feature = "System"))] - pub fn SearchForAllUpdatesWithUpdateOptionsForUserAsync<'a, P0, P1>(&self, user: P0, correlationvector: &::windows::core::HSTRING, clientid: &::windows::core::HSTRING, updateoptions: P1) -> ::windows::core::Result>> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::super::System::User>>, - P1: ::std::convert::Into<::windows::core::InParam<'a, AppUpdateOptions>>, - { + pub fn SearchForAllUpdatesWithUpdateOptionsForUserAsync(&self, user: &super::super::super::super::System::User, correlationvector: &::windows::core::HSTRING, clientid: &::windows::core::HSTRING, updateoptions: &AppUpdateOptions) -> ::windows::core::Result>> { let this = &::windows::core::Interface::cast::(self)?; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).SearchForAllUpdatesWithUpdateOptionsForUserAsync)(::windows::core::Vtable::as_raw(this), user.into().abi(), ::core::mem::transmute_copy(correlationvector), ::core::mem::transmute_copy(clientid), updateoptions.into().abi(), result__.as_mut_ptr()).from_abi::>>(result__) + (::windows::core::Vtable::vtable(this).SearchForAllUpdatesWithUpdateOptionsForUserAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(user), ::core::mem::transmute_copy(correlationvector), ::core::mem::transmute_copy(clientid), ::core::mem::transmute_copy(updateoptions), result__.as_mut_ptr()).from_abi::>>(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn SearchForUpdatesWithUpdateOptionsAsync<'a, P0>(&self, productid: &::windows::core::HSTRING, skuid: &::windows::core::HSTRING, correlationvector: &::windows::core::HSTRING, clientid: &::windows::core::HSTRING, updateoptions: P0) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, AppUpdateOptions>>, - { + pub fn SearchForUpdatesWithUpdateOptionsAsync(&self, productid: &::windows::core::HSTRING, skuid: &::windows::core::HSTRING, correlationvector: &::windows::core::HSTRING, clientid: &::windows::core::HSTRING, updateoptions: &AppUpdateOptions) -> ::windows::core::Result> { let this = &::windows::core::Interface::cast::(self)?; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).SearchForUpdatesWithUpdateOptionsAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(productid), ::core::mem::transmute_copy(skuid), ::core::mem::transmute_copy(correlationvector), ::core::mem::transmute_copy(clientid), updateoptions.into().abi(), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).SearchForUpdatesWithUpdateOptionsAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(productid), ::core::mem::transmute_copy(skuid), ::core::mem::transmute_copy(correlationvector), ::core::mem::transmute_copy(clientid), ::core::mem::transmute_copy(updateoptions), result__.as_mut_ptr()).from_abi::>(result__) } } #[doc = "*Required features: `\"Foundation\"`, `\"System\"`*"] #[cfg(all(feature = "Foundation", feature = "System"))] - pub fn SearchForUpdatesWithUpdateOptionsForUserAsync<'a, P0, P1>(&self, user: P0, productid: &::windows::core::HSTRING, skuid: &::windows::core::HSTRING, correlationvector: &::windows::core::HSTRING, clientid: &::windows::core::HSTRING, updateoptions: P1) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::super::System::User>>, - P1: ::std::convert::Into<::windows::core::InParam<'a, AppUpdateOptions>>, - { + pub fn SearchForUpdatesWithUpdateOptionsForUserAsync(&self, user: &super::super::super::super::System::User, productid: &::windows::core::HSTRING, skuid: &::windows::core::HSTRING, correlationvector: &::windows::core::HSTRING, clientid: &::windows::core::HSTRING, updateoptions: &AppUpdateOptions) -> ::windows::core::Result> { let this = &::windows::core::Interface::cast::(self)?; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).SearchForUpdatesWithUpdateOptionsForUserAsync)(::windows::core::Vtable::as_raw(this), user.into().abi(), ::core::mem::transmute_copy(productid), ::core::mem::transmute_copy(skuid), ::core::mem::transmute_copy(correlationvector), ::core::mem::transmute_copy(clientid), updateoptions.into().abi(), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).SearchForUpdatesWithUpdateOptionsForUserAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(user), ::core::mem::transmute_copy(productid), ::core::mem::transmute_copy(skuid), ::core::mem::transmute_copy(correlationvector), ::core::mem::transmute_copy(clientid), ::core::mem::transmute_copy(updateoptions), result__.as_mut_ptr()).from_abi::>(result__) } } #[doc = "*Required features: `\"Foundation_Collections\"`*"] #[cfg(feature = "Foundation_Collections")] - pub fn StartProductInstallWithOptionsAsync<'a, P0>(&self, productid: &::windows::core::HSTRING, flightid: &::windows::core::HSTRING, clientid: &::windows::core::HSTRING, correlationvector: &::windows::core::HSTRING, installoptions: P0) -> ::windows::core::Result>> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, AppInstallOptions>>, - { + pub fn StartProductInstallWithOptionsAsync(&self, productid: &::windows::core::HSTRING, flightid: &::windows::core::HSTRING, clientid: &::windows::core::HSTRING, correlationvector: &::windows::core::HSTRING, installoptions: &AppInstallOptions) -> ::windows::core::Result>> { let this = &::windows::core::Interface::cast::(self)?; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).StartProductInstallWithOptionsAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(productid), ::core::mem::transmute_copy(flightid), ::core::mem::transmute_copy(clientid), ::core::mem::transmute_copy(correlationvector), installoptions.into().abi(), result__.as_mut_ptr()).from_abi::>>(result__) + (::windows::core::Vtable::vtable(this).StartProductInstallWithOptionsAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(productid), ::core::mem::transmute_copy(flightid), ::core::mem::transmute_copy(clientid), ::core::mem::transmute_copy(correlationvector), ::core::mem::transmute_copy(installoptions), result__.as_mut_ptr()).from_abi::>>(result__) } } #[doc = "*Required features: `\"Foundation_Collections\"`, `\"System\"`*"] #[cfg(all(feature = "Foundation_Collections", feature = "System"))] - pub fn StartProductInstallWithOptionsForUserAsync<'a, P0, P1>(&self, user: P0, productid: &::windows::core::HSTRING, flightid: &::windows::core::HSTRING, clientid: &::windows::core::HSTRING, correlationvector: &::windows::core::HSTRING, installoptions: P1) -> ::windows::core::Result>> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::super::System::User>>, - P1: ::std::convert::Into<::windows::core::InParam<'a, AppInstallOptions>>, - { + pub fn StartProductInstallWithOptionsForUserAsync(&self, user: &super::super::super::super::System::User, productid: &::windows::core::HSTRING, flightid: &::windows::core::HSTRING, clientid: &::windows::core::HSTRING, correlationvector: &::windows::core::HSTRING, installoptions: &AppInstallOptions) -> ::windows::core::Result>> { let this = &::windows::core::Interface::cast::(self)?; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).StartProductInstallWithOptionsForUserAsync)(::windows::core::Vtable::as_raw(this), user.into().abi(), ::core::mem::transmute_copy(productid), ::core::mem::transmute_copy(flightid), ::core::mem::transmute_copy(clientid), ::core::mem::transmute_copy(correlationvector), installoptions.into().abi(), result__.as_mut_ptr()).from_abi::>>(result__) + (::windows::core::Vtable::vtable(this).StartProductInstallWithOptionsForUserAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(user), ::core::mem::transmute_copy(productid), ::core::mem::transmute_copy(flightid), ::core::mem::transmute_copy(clientid), ::core::mem::transmute_copy(correlationvector), ::core::mem::transmute_copy(installoptions), result__.as_mut_ptr()).from_abi::>>(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -1217,14 +1159,11 @@ impl AppInstallManager { } #[doc = "*Required features: `\"Foundation\"`, `\"System\"`*"] #[cfg(all(feature = "Foundation", feature = "System"))] - pub fn GetIsPackageIdentityAllowedToInstallForUserAsync<'a, P0>(&self, user: P0, correlationvector: &::windows::core::HSTRING, packageidentityname: &::windows::core::HSTRING, publishercertificatename: &::windows::core::HSTRING) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::super::System::User>>, - { + pub fn GetIsPackageIdentityAllowedToInstallForUserAsync(&self, user: &super::super::super::super::System::User, correlationvector: &::windows::core::HSTRING, packageidentityname: &::windows::core::HSTRING, publishercertificatename: &::windows::core::HSTRING) -> ::windows::core::Result> { let this = &::windows::core::Interface::cast::(self)?; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).GetIsPackageIdentityAllowedToInstallForUserAsync)(::windows::core::Vtable::as_raw(this), user.into().abi(), ::core::mem::transmute_copy(correlationvector), ::core::mem::transmute_copy(packageidentityname), ::core::mem::transmute_copy(publishercertificatename), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).GetIsPackageIdentityAllowedToInstallForUserAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(user), ::core::mem::transmute_copy(correlationvector), ::core::mem::transmute_copy(packageidentityname), ::core::mem::transmute_copy(publishercertificatename), result__.as_mut_ptr()).from_abi::>(result__) } } pub fn CanInstallForAllUsers(&self) -> ::windows::core::Result { @@ -1441,12 +1380,9 @@ impl AppInstallOptions { } #[doc = "*Required features: `\"Management_Deployment\"`*"] #[cfg(feature = "Management_Deployment")] - pub fn SetTargetVolume<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::super::Management::Deployment::PackageVolume>>, - { + pub fn SetTargetVolume(&self, value: &super::super::super::super::Management::Deployment::PackageVolume) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).SetTargetVolume)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetTargetVolume)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } pub fn LaunchAfterInstall(&self) -> ::windows::core::Result { let this = self; diff --git a/crates/libs/windows/src/Windows/ApplicationModel/Store/Preview/mod.rs b/crates/libs/windows/src/Windows/ApplicationModel/Store/Preview/mod.rs index ecb0453bc6..b7d3bf3e62 100644 --- a/crates/libs/windows/src/Windows/ApplicationModel/Store/Preview/mod.rs +++ b/crates/libs/windows/src/Windows/ApplicationModel/Store/Preview/mod.rs @@ -453,13 +453,10 @@ impl StoreConfiguration { } #[doc = "*Required features: `\"System\"`*"] #[cfg(feature = "System")] - pub fn HasStoreWebAccountForUser<'a, P0>(user: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::System::User>>, - { + pub fn HasStoreWebAccountForUser(user: &super::super::super::System::User) -> ::windows::core::Result { Self::IStoreConfigurationStatics3(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).HasStoreWebAccountForUser)(::windows::core::Vtable::as_raw(this), user.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).HasStoreWebAccountForUser)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(user), result__.as_mut_ptr()).from_abi::(result__) }) } #[doc = "*Required features: `\"Foundation\"`, `\"Storage_Streams\"`*"] @@ -472,43 +469,33 @@ impl StoreConfiguration { } #[doc = "*Required features: `\"System\"`*"] #[cfg(feature = "System")] - pub fn SetStoreWebAccountIdForUser<'a, P0>(user: P0, webaccountid: &::windows::core::HSTRING) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::System::User>>, - { - Self::IStoreConfigurationStatics3(|this| unsafe { (::windows::core::Vtable::vtable(this).SetStoreWebAccountIdForUser)(::windows::core::Vtable::as_raw(this), user.into().abi(), ::core::mem::transmute_copy(webaccountid)).ok() }) + pub fn SetStoreWebAccountIdForUser(user: &super::super::super::System::User, webaccountid: &::windows::core::HSTRING) -> ::windows::core::Result<()> { + Self::IStoreConfigurationStatics3(|this| unsafe { (::windows::core::Vtable::vtable(this).SetStoreWebAccountIdForUser)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(user), ::core::mem::transmute_copy(webaccountid)).ok() }) } #[doc = "*Required features: `\"System\"`*"] #[cfg(feature = "System")] - pub fn IsStoreWebAccountIdForUser<'a, P0>(user: P0, webaccountid: &::windows::core::HSTRING) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::System::User>>, - { + pub fn IsStoreWebAccountIdForUser(user: &super::super::super::System::User, webaccountid: &::windows::core::HSTRING) -> ::windows::core::Result { Self::IStoreConfigurationStatics3(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).IsStoreWebAccountIdForUser)(::windows::core::Vtable::as_raw(this), user.into().abi(), ::core::mem::transmute_copy(webaccountid), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).IsStoreWebAccountIdForUser)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(user), ::core::mem::transmute_copy(webaccountid), result__.as_mut_ptr()).from_abi::(result__) }) } #[doc = "*Required features: `\"Foundation\"`, `\"System\"`*"] #[cfg(all(feature = "Foundation", feature = "System"))] - pub fn GetPurchasePromptingPolicyForUser<'a, P0>(user: P0) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::System::User>>, - { + pub fn GetPurchasePromptingPolicyForUser(user: &super::super::super::System::User) -> ::windows::core::Result> { Self::IStoreConfigurationStatics3(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).GetPurchasePromptingPolicyForUser)(::windows::core::Vtable::as_raw(this), user.into().abi(), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).GetPurchasePromptingPolicyForUser)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(user), result__.as_mut_ptr()).from_abi::>(result__) }) } #[doc = "*Required features: `\"Foundation\"`, `\"System\"`*"] #[cfg(all(feature = "Foundation", feature = "System"))] - pub fn SetPurchasePromptingPolicyForUser<'a, P0, P1, E1>(user: P0, value: P1) -> ::windows::core::Result<()> + pub fn SetPurchasePromptingPolicyForUser<'a, P0, E0>(user: &super::super::super::System::User, value: P0) -> ::windows::core::Result<()> where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::System::User>>, - P1: ::std::convert::TryInto<::windows::core::InParam<'a, super::super::super::Foundation::IReference>, Error = E1>, - E1: ::std::convert::Into<::windows::core::Error>, + P0: ::std::convert::TryInto<::windows::core::InParam<'a, super::super::super::Foundation::IReference>, Error = E0>, + E0: ::std::convert::Into<::windows::core::Error>, { - Self::IStoreConfigurationStatics3(|this| unsafe { (::windows::core::Vtable::vtable(this).SetPurchasePromptingPolicyForUser)(::windows::core::Vtable::as_raw(this), user.into().abi(), value.try_into().map_err(|e| e.into())?.abi()).ok() }) + Self::IStoreConfigurationStatics3(|this| unsafe { (::windows::core::Vtable::vtable(this).SetPurchasePromptingPolicyForUser)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(user), value.try_into().map_err(|e| e.into())?.abi()).ok() }) } pub fn GetStoreWebAccountId() -> ::windows::core::Result<::windows::core::HSTRING> { Self::IStoreConfigurationStatics4(|this| unsafe { @@ -518,13 +505,10 @@ impl StoreConfiguration { } #[doc = "*Required features: `\"System\"`*"] #[cfg(feature = "System")] - pub fn GetStoreWebAccountIdForUser<'a, P0>(user: P0) -> ::windows::core::Result<::windows::core::HSTRING> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::System::User>>, - { + pub fn GetStoreWebAccountIdForUser(user: &super::super::super::System::User) -> ::windows::core::Result<::windows::core::HSTRING> { Self::IStoreConfigurationStatics4(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).GetStoreWebAccountIdForUser)(::windows::core::Vtable::as_raw(this), user.into().abi(), result__.as_mut_ptr()).from_abi::<::windows::core::HSTRING>(result__) + (::windows::core::Vtable::vtable(this).GetStoreWebAccountIdForUser)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(user), result__.as_mut_ptr()).from_abi::<::windows::core::HSTRING>(result__) }) } pub fn SetEnterpriseStoreWebAccountId(webaccountid: &::windows::core::HSTRING) -> ::windows::core::Result<()> { @@ -532,11 +516,8 @@ impl StoreConfiguration { } #[doc = "*Required features: `\"System\"`*"] #[cfg(feature = "System")] - pub fn SetEnterpriseStoreWebAccountIdForUser<'a, P0>(user: P0, webaccountid: &::windows::core::HSTRING) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::System::User>>, - { - Self::IStoreConfigurationStatics4(|this| unsafe { (::windows::core::Vtable::vtable(this).SetEnterpriseStoreWebAccountIdForUser)(::windows::core::Vtable::as_raw(this), user.into().abi(), ::core::mem::transmute_copy(webaccountid)).ok() }) + pub fn SetEnterpriseStoreWebAccountIdForUser(user: &super::super::super::System::User, webaccountid: &::windows::core::HSTRING) -> ::windows::core::Result<()> { + Self::IStoreConfigurationStatics4(|this| unsafe { (::windows::core::Vtable::vtable(this).SetEnterpriseStoreWebAccountIdForUser)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(user), ::core::mem::transmute_copy(webaccountid)).ok() }) } pub fn GetEnterpriseStoreWebAccountId() -> ::windows::core::Result<::windows::core::HSTRING> { Self::IStoreConfigurationStatics4(|this| unsafe { @@ -546,13 +527,10 @@ impl StoreConfiguration { } #[doc = "*Required features: `\"System\"`*"] #[cfg(feature = "System")] - pub fn GetEnterpriseStoreWebAccountIdForUser<'a, P0>(user: P0) -> ::windows::core::Result<::windows::core::HSTRING> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::System::User>>, - { + pub fn GetEnterpriseStoreWebAccountIdForUser(user: &super::super::super::System::User) -> ::windows::core::Result<::windows::core::HSTRING> { Self::IStoreConfigurationStatics4(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).GetEnterpriseStoreWebAccountIdForUser)(::windows::core::Vtable::as_raw(this), user.into().abi(), result__.as_mut_ptr()).from_abi::<::windows::core::HSTRING>(result__) + (::windows::core::Vtable::vtable(this).GetEnterpriseStoreWebAccountIdForUser)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(user), result__.as_mut_ptr()).from_abi::<::windows::core::HSTRING>(result__) }) } pub fn ShouldRestrictToEnterpriseStoreOnly() -> ::windows::core::Result { @@ -563,13 +541,10 @@ impl StoreConfiguration { } #[doc = "*Required features: `\"System\"`*"] #[cfg(feature = "System")] - pub fn ShouldRestrictToEnterpriseStoreOnlyForUser<'a, P0>(user: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::System::User>>, - { + pub fn ShouldRestrictToEnterpriseStoreOnlyForUser(user: &super::super::super::System::User) -> ::windows::core::Result { Self::IStoreConfigurationStatics4(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).ShouldRestrictToEnterpriseStoreOnlyForUser)(::windows::core::Vtable::as_raw(this), user.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).ShouldRestrictToEnterpriseStoreOnlyForUser)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(user), result__.as_mut_ptr()).from_abi::(result__) }) } pub fn IsPinToDesktopSupported() -> ::windows::core::Result { @@ -595,11 +570,8 @@ impl StoreConfiguration { } #[doc = "*Required features: `\"System\"`*"] #[cfg(feature = "System")] - pub fn PinToDesktopForUser<'a, P0>(user: P0, apppackagefamilyname: &::windows::core::HSTRING) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::System::User>>, - { - Self::IStoreConfigurationStatics5(|this| unsafe { (::windows::core::Vtable::vtable(this).PinToDesktopForUser)(::windows::core::Vtable::as_raw(this), user.into().abi(), ::core::mem::transmute_copy(apppackagefamilyname)).ok() }) + pub fn PinToDesktopForUser(user: &super::super::super::System::User, apppackagefamilyname: &::windows::core::HSTRING) -> ::windows::core::Result<()> { + Self::IStoreConfigurationStatics5(|this| unsafe { (::windows::core::Vtable::vtable(this).PinToDesktopForUser)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(user), ::core::mem::transmute_copy(apppackagefamilyname)).ok() }) } #[doc(hidden)] pub fn IStoreConfigurationStatics ::windows::core::Result>(callback: F) -> ::windows::core::Result { @@ -1074,27 +1046,24 @@ pub struct WebAuthenticationCoreManagerHelper; impl WebAuthenticationCoreManagerHelper { #[doc = "*Required features: `\"Foundation\"`, `\"Security_Authentication_Web_Core\"`, `\"UI_Xaml\"`*"] #[cfg(all(feature = "Foundation", feature = "Security_Authentication_Web_Core", feature = "UI_Xaml"))] - pub fn RequestTokenWithUIElementHostingAsync<'a, P0, P1>(request: P0, uielement: P1) -> ::windows::core::Result> + pub fn RequestTokenWithUIElementHostingAsync<'a, P0>(request: &super::super::super::Security::Authentication::Web::Core::WebTokenRequest, uielement: P0) -> ::windows::core::Result> where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Security::Authentication::Web::Core::WebTokenRequest>>, - P1: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::UI::Xaml::UIElement>>, + P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::UI::Xaml::UIElement>>, { Self::IWebAuthenticationCoreManagerHelper(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).RequestTokenWithUIElementHostingAsync)(::windows::core::Vtable::as_raw(this), request.into().abi(), uielement.into().abi(), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).RequestTokenWithUIElementHostingAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(request), uielement.into().abi(), result__.as_mut_ptr()).from_abi::>(result__) }) } #[doc = "*Required features: `\"Foundation\"`, `\"Security_Authentication_Web_Core\"`, `\"Security_Credentials\"`, `\"UI_Xaml\"`*"] #[cfg(all(feature = "Foundation", feature = "Security_Authentication_Web_Core", feature = "Security_Credentials", feature = "UI_Xaml"))] - pub fn RequestTokenWithUIElementHostingAndWebAccountAsync<'a, P0, P1, P2>(request: P0, webaccount: P1, uielement: P2) -> ::windows::core::Result> + pub fn RequestTokenWithUIElementHostingAndWebAccountAsync<'a, P0>(request: &super::super::super::Security::Authentication::Web::Core::WebTokenRequest, webaccount: &super::super::super::Security::Credentials::WebAccount, uielement: P0) -> ::windows::core::Result> where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Security::Authentication::Web::Core::WebTokenRequest>>, - P1: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Security::Credentials::WebAccount>>, - P2: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::UI::Xaml::UIElement>>, + P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::UI::Xaml::UIElement>>, { Self::IWebAuthenticationCoreManagerHelper(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).RequestTokenWithUIElementHostingAndWebAccountAsync)(::windows::core::Vtable::as_raw(this), request.into().abi(), webaccount.into().abi(), uielement.into().abi(), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).RequestTokenWithUIElementHostingAndWebAccountAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(request), ::core::mem::transmute_copy(webaccount), uielement.into().abi(), result__.as_mut_ptr()).from_abi::>(result__) }) } #[doc(hidden)] diff --git a/crates/libs/windows/src/Windows/ApplicationModel/Store/mod.rs b/crates/libs/windows/src/Windows/ApplicationModel/Store/mod.rs index c4c2e4799f..ca409f5797 100644 --- a/crates/libs/windows/src/Windows/ApplicationModel/Store/mod.rs +++ b/crates/libs/windows/src/Windows/ApplicationModel/Store/mod.rs @@ -646,13 +646,10 @@ impl CurrentApp { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn RequestProductPurchaseWithDisplayPropertiesAsync<'a, P0>(productid: &::windows::core::HSTRING, offerid: &::windows::core::HSTRING, displayproperties: P0) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, ProductPurchaseDisplayProperties>>, - { + pub fn RequestProductPurchaseWithDisplayPropertiesAsync(productid: &::windows::core::HSTRING, offerid: &::windows::core::HSTRING, displayproperties: &ProductPurchaseDisplayProperties) -> ::windows::core::Result> { Self::ICurrentAppWithConsumables(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).RequestProductPurchaseWithDisplayPropertiesAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(productid), ::core::mem::transmute_copy(offerid), displayproperties.into().abi(), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).RequestProductPurchaseWithDisplayPropertiesAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(productid), ::core::mem::transmute_copy(offerid), ::core::mem::transmute_copy(displayproperties), result__.as_mut_ptr()).from_abi::>(result__) }) } #[doc = "*Required features: `\"Foundation_Collections\"`*"] @@ -757,13 +754,10 @@ impl CurrentAppSimulator { } #[doc = "*Required features: `\"Foundation\"`, `\"Storage\"`*"] #[cfg(all(feature = "Foundation", feature = "Storage"))] - pub fn ReloadSimulatorAsync<'a, P0>(simulatorsettingsfile: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Storage::StorageFile>>, - { + pub fn ReloadSimulatorAsync(simulatorsettingsfile: &super::super::Storage::StorageFile) -> ::windows::core::Result { Self::ICurrentAppSimulator(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).ReloadSimulatorAsync)(::windows::core::Vtable::as_raw(this), simulatorsettingsfile.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).ReloadSimulatorAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(simulatorsettingsfile), result__.as_mut_ptr()).from_abi::(result__) }) } #[doc = "*Required features: `\"Foundation_Collections\"`*"] @@ -816,13 +810,10 @@ impl CurrentAppSimulator { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn RequestProductPurchaseWithDisplayPropertiesAsync<'a, P0>(productid: &::windows::core::HSTRING, offerid: &::windows::core::HSTRING, displayproperties: P0) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, ProductPurchaseDisplayProperties>>, - { + pub fn RequestProductPurchaseWithDisplayPropertiesAsync(productid: &::windows::core::HSTRING, offerid: &::windows::core::HSTRING, displayproperties: &ProductPurchaseDisplayProperties) -> ::windows::core::Result> { Self::ICurrentAppSimulatorWithConsumables(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).RequestProductPurchaseWithDisplayPropertiesAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(productid), ::core::mem::transmute_copy(offerid), displayproperties.into().abi(), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).RequestProductPurchaseWithDisplayPropertiesAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(productid), ::core::mem::transmute_copy(offerid), ::core::mem::transmute_copy(displayproperties), result__.as_mut_ptr()).from_abi::>(result__) }) } #[doc = "*Required features: `\"Foundation_Collections\"`*"] @@ -895,14 +886,11 @@ impl LicenseInformation { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn LicenseChanged<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, LicenseChangedEventHandler>>, - { + pub fn LicenseChanged(&self, handler: &LicenseChangedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).LicenseChanged)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).LicenseChanged)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -1421,12 +1409,9 @@ impl ProductPurchaseDisplayProperties { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn SetImage<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::Uri>>, - { + pub fn SetImage(&self, value: &super::super::Foundation::Uri) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).SetImage)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetImage)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } pub fn CreateProductPurchaseDisplayProperties(name: &::windows::core::HSTRING) -> ::windows::core::Result { Self::IProductPurchaseDisplayPropertiesFactory(|this| unsafe { diff --git a/crates/libs/windows/src/Windows/ApplicationModel/UserActivities/Core/mod.rs b/crates/libs/windows/src/Windows/ApplicationModel/UserActivities/Core/mod.rs index e39c46e790..18bd25687e 100644 --- a/crates/libs/windows/src/Windows/ApplicationModel/UserActivities/Core/mod.rs +++ b/crates/libs/windows/src/Windows/ApplicationModel/UserActivities/Core/mod.rs @@ -20,24 +20,18 @@ pub struct ICoreUserActivityManagerStatics_Vtbl { #[doc = "*Required features: `\"ApplicationModel_UserActivities_Core\"`*"] pub struct CoreUserActivityManager; impl CoreUserActivityManager { - pub fn CreateUserActivitySessionInBackground<'a, P0>(activity: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::UserActivity>>, - { + pub fn CreateUserActivitySessionInBackground(activity: &super::UserActivity) -> ::windows::core::Result { Self::ICoreUserActivityManagerStatics(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).CreateUserActivitySessionInBackground)(::windows::core::Vtable::as_raw(this), activity.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).CreateUserActivitySessionInBackground)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(activity), result__.as_mut_ptr()).from_abi::(result__) }) } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn DeleteUserActivitySessionsInTimeRangeAsync<'a, P0>(channel: P0, starttime: super::super::super::Foundation::DateTime, endtime: super::super::super::Foundation::DateTime) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::UserActivityChannel>>, - { + pub fn DeleteUserActivitySessionsInTimeRangeAsync(channel: &super::UserActivityChannel, starttime: super::super::super::Foundation::DateTime, endtime: super::super::super::Foundation::DateTime) -> ::windows::core::Result { Self::ICoreUserActivityManagerStatics(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).DeleteUserActivitySessionsInTimeRangeAsync)(::windows::core::Vtable::as_raw(this), channel.into().abi(), starttime, endtime, result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).DeleteUserActivitySessionsInTimeRangeAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(channel), starttime, endtime, result__.as_mut_ptr()).from_abi::(result__) }) } #[doc(hidden)] diff --git a/crates/libs/windows/src/Windows/ApplicationModel/UserActivities/mod.rs b/crates/libs/windows/src/Windows/ApplicationModel/UserActivities/mod.rs index ef8d175fd0..3cfd156f51 100644 --- a/crates/libs/windows/src/Windows/ApplicationModel/UserActivities/mod.rs +++ b/crates/libs/windows/src/Windows/ApplicationModel/UserActivities/mod.rs @@ -552,12 +552,9 @@ impl UserActivity { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn SetContentUri<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::Uri>>, - { + pub fn SetContentUri(&self, value: &super::super::Foundation::Uri) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).SetContentUri)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetContentUri)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } pub fn ContentType(&self) -> ::windows::core::Result<::windows::core::HSTRING> { let this = self; @@ -581,12 +578,9 @@ impl UserActivity { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn SetFallbackUri<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::Uri>>, - { + pub fn SetFallbackUri(&self, value: &super::super::Foundation::Uri) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).SetFallbackUri)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetFallbackUri)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] @@ -599,12 +593,9 @@ impl UserActivity { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn SetActivationUri<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::Uri>>, - { + pub fn SetActivationUri(&self, value: &super::super::Foundation::Uri) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).SetActivationUri)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetActivationUri)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } pub fn ContentInfo(&self) -> ::windows::core::Result { let this = self; @@ -784,12 +775,9 @@ impl UserActivityAttribution { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn SetIconUri<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::Uri>>, - { + pub fn SetIconUri(&self, value: &super::super::Foundation::Uri) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).SetIconUri)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetIconUri)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } pub fn AlternateText(&self) -> ::windows::core::Result<::windows::core::HSTRING> { let this = self; @@ -815,13 +803,10 @@ impl UserActivityAttribution { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn CreateWithUri<'a, P0>(iconuri: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::Uri>>, - { + pub fn CreateWithUri(iconuri: &super::super::Foundation::Uri) -> ::windows::core::Result { Self::IUserActivityAttributionFactory(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).CreateWithUri)(::windows::core::Vtable::as_raw(this), iconuri.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).CreateWithUri)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(iconuri), result__.as_mut_ptr()).from_abi::(result__) }) } #[doc(hidden)] @@ -954,24 +939,18 @@ impl UserActivityChannel { } #[doc = "*Required features: `\"Security_Credentials\"`*"] #[cfg(feature = "Security_Credentials")] - pub fn TryGetForWebAccount<'a, P0>(account: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Security::Credentials::WebAccount>>, - { + pub fn TryGetForWebAccount(account: &super::super::Security::Credentials::WebAccount) -> ::windows::core::Result { Self::IUserActivityChannelStatics2(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).TryGetForWebAccount)(::windows::core::Vtable::as_raw(this), account.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).TryGetForWebAccount)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(account), result__.as_mut_ptr()).from_abi::(result__) }) } #[doc = "*Required features: `\"System\"`*"] #[cfg(feature = "System")] - pub fn GetForUser<'a, P0>(user: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::System::User>>, - { + pub fn GetForUser(user: &super::super::System::User) -> ::windows::core::Result { Self::IUserActivityChannelStatics3(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).GetForUser)(::windows::core::Vtable::as_raw(this), user.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).GetForUser)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(user), result__.as_mut_ptr()).from_abi::(result__) }) } #[doc(hidden)] @@ -1164,12 +1143,9 @@ unsafe impl ::core::marker::Sync for UserActivityContentInfo {} #[repr(transparent)] pub struct UserActivityRequest(::windows::core::IUnknown); impl UserActivityRequest { - pub fn SetUserActivity<'a, P0>(&self, activity: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, UserActivity>>, - { + pub fn SetUserActivity(&self, activity: &UserActivity) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).SetUserActivity)(::windows::core::Vtable::as_raw(this), activity.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetUserActivity)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(activity)).ok() } } } impl ::core::clone::Clone for UserActivityRequest { @@ -1242,14 +1218,11 @@ pub struct UserActivityRequestManager(::windows::core::IUnknown); impl UserActivityRequestManager { #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn UserActivityRequested<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn UserActivityRequested(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).UserActivityRequested)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).UserActivityRequested)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -1663,12 +1636,9 @@ impl UserActivityVisualElements { (::windows::core::Vtable::vtable(this).Attribution)(::windows::core::Vtable::as_raw(this), result__.as_mut_ptr()).from_abi::(result__) } } - pub fn SetAttribution<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, UserActivityAttribution>>, - { + pub fn SetAttribution(&self, value: &UserActivityAttribution) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).SetAttribution)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetAttribution)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } #[doc = "*Required features: `\"UI_Shell\"`*"] #[cfg(feature = "UI_Shell")] diff --git a/crates/libs/windows/src/Windows/ApplicationModel/UserDataAccounts/SystemAccess/mod.rs b/crates/libs/windows/src/Windows/ApplicationModel/UserDataAccounts/SystemAccess/mod.rs index abe767e6b5..f0f03c9b95 100644 --- a/crates/libs/windows/src/Windows/ApplicationModel/UserDataAccounts/SystemAccess/mod.rs +++ b/crates/libs/windows/src/Windows/ApplicationModel/UserDataAccounts/SystemAccess/mod.rs @@ -384,12 +384,9 @@ impl DeviceAccountConfiguration { } #[doc = "*Required features: `\"Security_Credentials\"`*"] #[cfg(feature = "Security_Credentials")] - pub fn SetIncomingServerCredential<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Security::Credentials::PasswordCredential>>, - { + pub fn SetIncomingServerCredential(&self, value: &super::super::super::Security::Credentials::PasswordCredential) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).SetIncomingServerCredential)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetIncomingServerCredential)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } #[doc = "*Required features: `\"Security_Credentials\"`*"] #[cfg(feature = "Security_Credentials")] @@ -402,12 +399,9 @@ impl DeviceAccountConfiguration { } #[doc = "*Required features: `\"Security_Credentials\"`*"] #[cfg(feature = "Security_Credentials")] - pub fn SetOutgoingServerCredential<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Security::Credentials::PasswordCredential>>, - { + pub fn SetOutgoingServerCredential(&self, value: &super::super::super::Security::Credentials::PasswordCredential) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).SetOutgoingServerCredential)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetOutgoingServerCredential)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } pub fn OAuthRefreshToken(&self) -> ::windows::core::Result<::windows::core::HSTRING> { let this = &::windows::core::Interface::cast::(self)?; @@ -577,12 +571,9 @@ impl DeviceAccountConfiguration { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn SetCardDavServerUrl<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Foundation::Uri>>, - { + pub fn SetCardDavServerUrl(&self, value: &super::super::super::Foundation::Uri) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).SetCardDavServerUrl)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetCardDavServerUrl)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } pub fn CardDavRequiresSsl(&self) -> ::windows::core::Result { let this = &::windows::core::Interface::cast::(self)?; @@ -606,12 +597,9 @@ impl DeviceAccountConfiguration { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn SetCalDavServerUrl<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Foundation::Uri>>, - { + pub fn SetCalDavServerUrl(&self, value: &super::super::super::Foundation::Uri) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).SetCalDavServerUrl)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetCalDavServerUrl)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } pub fn CalDavRequiresSsl(&self) -> ::windows::core::Result { let this = &::windows::core::Interface::cast::(self)?; @@ -802,13 +790,10 @@ impl UserDataAccountSystemAccessManager { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn CreateDeviceAccountAsync<'a, P0>(account: P0) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, DeviceAccountConfiguration>>, - { + pub fn CreateDeviceAccountAsync(account: &DeviceAccountConfiguration) -> ::windows::core::Result> { Self::IUserDataAccountSystemAccessManagerStatics2(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).CreateDeviceAccountAsync)(::windows::core::Vtable::as_raw(this), account.into().abi(), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).CreateDeviceAccountAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(account), result__.as_mut_ptr()).from_abi::>(result__) }) } #[doc = "*Required features: `\"Foundation\"`*"] diff --git a/crates/libs/windows/src/Windows/ApplicationModel/UserDataAccounts/mod.rs b/crates/libs/windows/src/Windows/ApplicationModel/UserDataAccounts/mod.rs index 6673e01074..c3e4feee1f 100644 --- a/crates/libs/windows/src/Windows/ApplicationModel/UserDataAccounts/mod.rs +++ b/crates/libs/windows/src/Windows/ApplicationModel/UserDataAccounts/mod.rs @@ -589,13 +589,10 @@ impl UserDataAccountManager { } #[doc = "*Required features: `\"System\"`*"] #[cfg(feature = "System")] - pub fn GetForUser<'a, P0>(user: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::System::User>>, - { + pub fn GetForUser(user: &super::super::System::User) -> ::windows::core::Result { Self::IUserDataAccountManagerStatics2(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).GetForUser)(::windows::core::Vtable::as_raw(this), user.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).GetForUser)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(user), result__.as_mut_ptr()).from_abi::(result__) }) } #[doc(hidden)] @@ -741,14 +738,11 @@ impl UserDataAccountStore { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn StoreChanged<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn StoreChanged(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = &::windows::core::Interface::cast::(self)?; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).StoreChanged)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).StoreChanged)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] diff --git a/crates/libs/windows/src/Windows/ApplicationModel/UserDataTasks/DataProvider/mod.rs b/crates/libs/windows/src/Windows/ApplicationModel/UserDataTasks/DataProvider/mod.rs index b4753e6d8d..a343904c1f 100644 --- a/crates/libs/windows/src/Windows/ApplicationModel/UserDataTasks/DataProvider/mod.rs +++ b/crates/libs/windows/src/Windows/ApplicationModel/UserDataTasks/DataProvider/mod.rs @@ -288,14 +288,11 @@ pub struct UserDataTaskDataProviderConnection(::windows::core::IUnknown); impl UserDataTaskDataProviderConnection { #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn CreateOrUpdateTaskRequested<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Foundation::TypedEventHandler>>, - { + pub fn CreateOrUpdateTaskRequested(&self, handler: &super::super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).CreateOrUpdateTaskRequested)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).CreateOrUpdateTaskRequested)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -306,14 +303,11 @@ impl UserDataTaskDataProviderConnection { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn SyncRequested<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Foundation::TypedEventHandler>>, - { + pub fn SyncRequested(&self, handler: &super::super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).SyncRequested)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).SyncRequested)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -324,14 +318,11 @@ impl UserDataTaskDataProviderConnection { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn SkipOccurrenceRequested<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Foundation::TypedEventHandler>>, - { + pub fn SkipOccurrenceRequested(&self, handler: &super::super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).SkipOccurrenceRequested)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).SkipOccurrenceRequested)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -342,14 +333,11 @@ impl UserDataTaskDataProviderConnection { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn CompleteTaskRequested<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Foundation::TypedEventHandler>>, - { + pub fn CompleteTaskRequested(&self, handler: &super::super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).CompleteTaskRequested)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).CompleteTaskRequested)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -360,14 +348,11 @@ impl UserDataTaskDataProviderConnection { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn DeleteTaskRequested<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Foundation::TypedEventHandler>>, - { + pub fn DeleteTaskRequested(&self, handler: &super::super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).DeleteTaskRequested)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).DeleteTaskRequested)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -727,14 +712,11 @@ impl UserDataTaskListCreateOrUpdateTaskRequest { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn ReportCompletedAsync<'a, P0>(&self, createdorupdateduserdatatask: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::UserDataTask>>, - { + pub fn ReportCompletedAsync(&self, createdorupdateduserdatatask: &super::UserDataTask) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).ReportCompletedAsync)(::windows::core::Vtable::as_raw(this), createdorupdateduserdatatask.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).ReportCompletedAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(createdorupdateduserdatatask), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] diff --git a/crates/libs/windows/src/Windows/ApplicationModel/UserDataTasks/mod.rs b/crates/libs/windows/src/Windows/ApplicationModel/UserDataTasks/mod.rs index 8c784daac9..5b1db2aef2 100644 --- a/crates/libs/windows/src/Windows/ApplicationModel/UserDataTasks/mod.rs +++ b/crates/libs/windows/src/Windows/ApplicationModel/UserDataTasks/mod.rs @@ -536,12 +536,9 @@ impl UserDataTask { (::windows::core::Vtable::vtable(this).RecurrenceProperties)(::windows::core::Vtable::as_raw(this), result__.as_mut_ptr()).from_abi::(result__) } } - pub fn SetRecurrenceProperties<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, UserDataTaskRecurrenceProperties>>, - { + pub fn SetRecurrenceProperties(&self, value: &UserDataTaskRecurrenceProperties) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).SetRecurrenceProperties)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetRecurrenceProperties)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } pub fn RegenerationProperties(&self) -> ::windows::core::Result { let this = self; @@ -550,12 +547,9 @@ impl UserDataTask { (::windows::core::Vtable::vtable(this).RegenerationProperties)(::windows::core::Vtable::as_raw(this), result__.as_mut_ptr()).from_abi::(result__) } } - pub fn SetRegenerationProperties<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, UserDataTaskRegenerationProperties>>, - { + pub fn SetRegenerationProperties(&self, value: &UserDataTaskRegenerationProperties) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).SetRegenerationProperties)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetRegenerationProperties)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] @@ -848,14 +842,11 @@ impl UserDataTaskList { (::windows::core::Vtable::vtable(this).GetTaskReader)(::windows::core::Vtable::as_raw(this), result__.as_mut_ptr()).from_abi::(result__) } } - pub fn GetTaskReaderWithOptions<'a, P0>(&self, options: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, UserDataTaskQueryOptions>>, - { + pub fn GetTaskReaderWithOptions(&self, options: &UserDataTaskQueryOptions) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).GetTaskReaderWithOptions)(::windows::core::Vtable::as_raw(this), options.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).GetTaskReaderWithOptions)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(options), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -869,14 +860,11 @@ impl UserDataTaskList { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn SaveTaskAsync<'a, P0>(&self, userdatatask: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, UserDataTask>>, - { + pub fn SaveTaskAsync(&self, userdatatask: &UserDataTask) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).SaveTaskAsync)(::windows::core::Vtable::as_raw(this), userdatatask.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).SaveTaskAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(userdatatask), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -986,14 +974,11 @@ impl UserDataTaskListLimitedWriteOperations { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn TryCreateOrUpdateTaskAsync<'a, P0>(&self, userdatatask: P0) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, UserDataTask>>, - { + pub fn TryCreateOrUpdateTaskAsync(&self, userdatatask: &UserDataTask) -> ::windows::core::Result> { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).TryCreateOrUpdateTaskAsync)(::windows::core::Vtable::as_raw(this), userdatatask.into().abi(), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).TryCreateOrUpdateTaskAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(userdatatask), result__.as_mut_ptr()).from_abi::>(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -1135,14 +1120,11 @@ impl UserDataTaskListSyncManager { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn SyncStatusChanged<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn SyncStatusChanged(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).SyncStatusChanged)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).SyncStatusChanged)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -1246,13 +1228,10 @@ impl UserDataTaskManager { } #[doc = "*Required features: `\"System\"`*"] #[cfg(feature = "System")] - pub fn GetForUser<'a, P0>(user: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::System::User>>, - { + pub fn GetForUser(user: &super::super::System::User) -> ::windows::core::Result { Self::IUserDataTaskManagerStatics(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).GetForUser)(::windows::core::Vtable::as_raw(this), user.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).GetForUser)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(user), result__.as_mut_ptr()).from_abi::(result__) }) } #[doc(hidden)] diff --git a/crates/libs/windows/src/Windows/ApplicationModel/VoiceCommands/mod.rs b/crates/libs/windows/src/Windows/ApplicationModel/VoiceCommands/mod.rs index 5846e950df..a6fc80719e 100644 --- a/crates/libs/windows/src/Windows/ApplicationModel/VoiceCommands/mod.rs +++ b/crates/libs/windows/src/Windows/ApplicationModel/VoiceCommands/mod.rs @@ -805,13 +805,10 @@ pub struct VoiceCommandDefinitionManager; impl VoiceCommandDefinitionManager { #[doc = "*Required features: `\"Foundation\"`, `\"Storage\"`*"] #[cfg(all(feature = "Foundation", feature = "Storage"))] - pub fn InstallCommandDefinitionsFromStorageFileAsync<'a, P0>(file: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Storage::StorageFile>>, - { + pub fn InstallCommandDefinitionsFromStorageFileAsync(file: &super::super::Storage::StorageFile) -> ::windows::core::Result { Self::IVoiceCommandDefinitionManagerStatics(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).InstallCommandDefinitionsFromStorageFileAsync)(::windows::core::Vtable::as_raw(this), file.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).InstallCommandDefinitionsFromStorageFileAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(file), result__.as_mut_ptr()).from_abi::(result__) }) } #[doc = "*Required features: `\"Foundation_Collections\"`*"] @@ -918,12 +915,9 @@ impl VoiceCommandResponse { (::windows::core::Vtable::vtable(this).Message)(::windows::core::Vtable::as_raw(this), result__.as_mut_ptr()).from_abi::(result__) } } - pub fn SetMessage<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, VoiceCommandUserMessage>>, - { + pub fn SetMessage(&self, value: &VoiceCommandUserMessage) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).SetMessage)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetMessage)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } pub fn RepeatMessage(&self) -> ::windows::core::Result { let this = self; @@ -932,12 +926,9 @@ impl VoiceCommandResponse { (::windows::core::Vtable::vtable(this).RepeatMessage)(::windows::core::Vtable::as_raw(this), result__.as_mut_ptr()).from_abi::(result__) } } - pub fn SetRepeatMessage<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, VoiceCommandUserMessage>>, - { + pub fn SetRepeatMessage(&self, value: &VoiceCommandUserMessage) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).SetRepeatMessage)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetRepeatMessage)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } pub fn AppLaunchArgument(&self) -> ::windows::core::Result<::windows::core::HSTRING> { let this = self; @@ -965,50 +956,40 @@ impl VoiceCommandResponse { (::windows::core::Vtable::vtable(this).MaxSupportedVoiceCommandContentTiles)(::windows::core::Vtable::as_raw(this), result__.as_mut_ptr()).from_abi::(result__) }) } - pub fn CreateResponse<'a, P0>(usermessage: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, VoiceCommandUserMessage>>, - { + pub fn CreateResponse(usermessage: &VoiceCommandUserMessage) -> ::windows::core::Result { Self::IVoiceCommandResponseStatics(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).CreateResponse)(::windows::core::Vtable::as_raw(this), usermessage.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).CreateResponse)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(usermessage), result__.as_mut_ptr()).from_abi::(result__) }) } #[doc = "*Required features: `\"Foundation_Collections\"`*"] #[cfg(feature = "Foundation_Collections")] - pub fn CreateResponseWithTiles<'a, P0, P1, E1>(message: P0, contenttiles: P1) -> ::windows::core::Result + pub fn CreateResponseWithTiles<'a, P0, E0>(message: &VoiceCommandUserMessage, contenttiles: P0) -> ::windows::core::Result where - P0: ::std::convert::Into<::windows::core::InParam<'a, VoiceCommandUserMessage>>, - P1: ::std::convert::TryInto<::windows::core::InParam<'a, super::super::Foundation::Collections::IIterable>, Error = E1>, - E1: ::std::convert::Into<::windows::core::Error>, + P0: ::std::convert::TryInto<::windows::core::InParam<'a, super::super::Foundation::Collections::IIterable>, Error = E0>, + E0: ::std::convert::Into<::windows::core::Error>, { Self::IVoiceCommandResponseStatics(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).CreateResponseWithTiles)(::windows::core::Vtable::as_raw(this), message.into().abi(), contenttiles.try_into().map_err(|e| e.into())?.abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).CreateResponseWithTiles)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(message), contenttiles.try_into().map_err(|e| e.into())?.abi(), result__.as_mut_ptr()).from_abi::(result__) }) } - pub fn CreateResponseForPrompt<'a, P0, P1>(message: P0, repeatmessage: P1) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, VoiceCommandUserMessage>>, - P1: ::std::convert::Into<::windows::core::InParam<'a, VoiceCommandUserMessage>>, - { + pub fn CreateResponseForPrompt(message: &VoiceCommandUserMessage, repeatmessage: &VoiceCommandUserMessage) -> ::windows::core::Result { Self::IVoiceCommandResponseStatics(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).CreateResponseForPrompt)(::windows::core::Vtable::as_raw(this), message.into().abi(), repeatmessage.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).CreateResponseForPrompt)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(message), ::core::mem::transmute_copy(repeatmessage), result__.as_mut_ptr()).from_abi::(result__) }) } #[doc = "*Required features: `\"Foundation_Collections\"`*"] #[cfg(feature = "Foundation_Collections")] - pub fn CreateResponseForPromptWithTiles<'a, P0, P1, P2, E2>(message: P0, repeatmessage: P1, contenttiles: P2) -> ::windows::core::Result + pub fn CreateResponseForPromptWithTiles<'a, P0, E0>(message: &VoiceCommandUserMessage, repeatmessage: &VoiceCommandUserMessage, contenttiles: P0) -> ::windows::core::Result where - P0: ::std::convert::Into<::windows::core::InParam<'a, VoiceCommandUserMessage>>, - P1: ::std::convert::Into<::windows::core::InParam<'a, VoiceCommandUserMessage>>, - P2: ::std::convert::TryInto<::windows::core::InParam<'a, super::super::Foundation::Collections::IIterable>, Error = E2>, - E2: ::std::convert::Into<::windows::core::Error>, + P0: ::std::convert::TryInto<::windows::core::InParam<'a, super::super::Foundation::Collections::IIterable>, Error = E0>, + E0: ::std::convert::Into<::windows::core::Error>, { Self::IVoiceCommandResponseStatics(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).CreateResponseForPromptWithTiles)(::windows::core::Vtable::as_raw(this), message.into().abi(), repeatmessage.into().abi(), contenttiles.try_into().map_err(|e| e.into())?.abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).CreateResponseForPromptWithTiles)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(message), ::core::mem::transmute_copy(repeatmessage), contenttiles.try_into().map_err(|e| e.into())?.abi(), result__.as_mut_ptr()).from_abi::(result__) }) } #[doc(hidden)] @@ -1096,74 +1077,56 @@ impl VoiceCommandServiceConnection { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn RequestConfirmationAsync<'a, P0>(&self, response: P0) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, VoiceCommandResponse>>, - { + pub fn RequestConfirmationAsync(&self, response: &VoiceCommandResponse) -> ::windows::core::Result> { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).RequestConfirmationAsync)(::windows::core::Vtable::as_raw(this), response.into().abi(), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).RequestConfirmationAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(response), result__.as_mut_ptr()).from_abi::>(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn RequestDisambiguationAsync<'a, P0>(&self, response: P0) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, VoiceCommandResponse>>, - { + pub fn RequestDisambiguationAsync(&self, response: &VoiceCommandResponse) -> ::windows::core::Result> { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).RequestDisambiguationAsync)(::windows::core::Vtable::as_raw(this), response.into().abi(), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).RequestDisambiguationAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(response), result__.as_mut_ptr()).from_abi::>(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn ReportProgressAsync<'a, P0>(&self, response: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, VoiceCommandResponse>>, - { + pub fn ReportProgressAsync(&self, response: &VoiceCommandResponse) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).ReportProgressAsync)(::windows::core::Vtable::as_raw(this), response.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).ReportProgressAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(response), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn ReportSuccessAsync<'a, P0>(&self, response: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, VoiceCommandResponse>>, - { + pub fn ReportSuccessAsync(&self, response: &VoiceCommandResponse) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).ReportSuccessAsync)(::windows::core::Vtable::as_raw(this), response.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).ReportSuccessAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(response), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn ReportFailureAsync<'a, P0>(&self, response: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, VoiceCommandResponse>>, - { + pub fn ReportFailureAsync(&self, response: &VoiceCommandResponse) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).ReportFailureAsync)(::windows::core::Vtable::as_raw(this), response.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).ReportFailureAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(response), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn RequestAppLaunchAsync<'a, P0>(&self, response: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, VoiceCommandResponse>>, - { + pub fn RequestAppLaunchAsync(&self, response: &VoiceCommandResponse) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).RequestAppLaunchAsync)(::windows::core::Vtable::as_raw(this), response.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).RequestAppLaunchAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(response), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Globalization\"`*"] @@ -1177,14 +1140,11 @@ impl VoiceCommandServiceConnection { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn VoiceCommandCompleted<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn VoiceCommandCompleted(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).VoiceCommandCompleted)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).VoiceCommandCompleted)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -1195,13 +1155,10 @@ impl VoiceCommandServiceConnection { } #[doc = "*Required features: `\"ApplicationModel_AppService\"`*"] #[cfg(feature = "ApplicationModel_AppService")] - pub fn FromAppServiceTriggerDetails<'a, P0>(triggerdetails: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::AppService::AppServiceTriggerDetails>>, - { + pub fn FromAppServiceTriggerDetails(triggerdetails: &super::AppService::AppServiceTriggerDetails) -> ::windows::core::Result { Self::IVoiceCommandServiceConnectionStatics(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).FromAppServiceTriggerDetails)(::windows::core::Vtable::as_raw(this), triggerdetails.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).FromAppServiceTriggerDetails)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(triggerdetails), result__.as_mut_ptr()).from_abi::(result__) }) } #[doc(hidden)] diff --git a/crates/libs/windows/src/Windows/ApplicationModel/Wallet/System/mod.rs b/crates/libs/windows/src/Windows/ApplicationModel/Wallet/System/mod.rs index ad62d7e91b..64dbcadaae 100644 --- a/crates/libs/windows/src/Windows/ApplicationModel/Wallet/System/mod.rs +++ b/crates/libs/windows/src/Windows/ApplicationModel/Wallet/System/mod.rs @@ -84,14 +84,11 @@ impl WalletItemSystemStore { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn DeleteAsync<'a, P0>(&self, item: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::WalletItem>>, - { + pub fn DeleteAsync(&self, item: &super::WalletItem) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).DeleteAsync)(::windows::core::Vtable::as_raw(this), item.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).DeleteAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(item), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`, `\"Storage_Streams\"`*"] @@ -107,38 +104,29 @@ impl WalletItemSystemStore { (::windows::core::Vtable::vtable(this).ImportItemAsync)(::windows::core::Vtable::as_raw(this), stream.try_into().map_err(|e| e.into())?.abi(), result__.as_mut_ptr()).from_abi::>(result__) } } - pub fn GetAppStatusForItem<'a, P0>(&self, item: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::WalletItem>>, - { + pub fn GetAppStatusForItem(&self, item: &super::WalletItem) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).GetAppStatusForItem)(::windows::core::Vtable::as_raw(this), item.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).GetAppStatusForItem)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(item), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn LaunchAppForItemAsync<'a, P0>(&self, item: P0) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::WalletItem>>, - { + pub fn LaunchAppForItemAsync(&self, item: &super::WalletItem) -> ::windows::core::Result> { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).LaunchAppForItemAsync)(::windows::core::Vtable::as_raw(this), item.into().abi(), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).LaunchAppForItemAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(item), result__.as_mut_ptr()).from_abi::>(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn ItemsChanged<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Foundation::TypedEventHandler>>, - { + pub fn ItemsChanged(&self, handler: &super::super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = &::windows::core::Interface::cast::(self)?; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).ItemsChanged)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).ItemsChanged)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] diff --git a/crates/libs/windows/src/Windows/ApplicationModel/Wallet/mod.rs b/crates/libs/windows/src/Windows/ApplicationModel/Wallet/mod.rs index 01562238cd..72951acea3 100644 --- a/crates/libs/windows/src/Windows/ApplicationModel/Wallet/mod.rs +++ b/crates/libs/windows/src/Windows/ApplicationModel/Wallet/mod.rs @@ -628,12 +628,9 @@ impl WalletItem { (::windows::core::Vtable::vtable(this).Barcode)(::windows::core::Vtable::as_raw(this), result__.as_mut_ptr()).from_abi::(result__) } } - pub fn SetBarcode<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, WalletBarcode>>, - { + pub fn SetBarcode(&self, value: &WalletBarcode) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).SetBarcode)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetBarcode)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] @@ -1174,14 +1171,11 @@ pub struct WalletItemStore(::windows::core::IUnknown); impl WalletItemStore { #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn AddAsync<'a, P0>(&self, id: &::windows::core::HSTRING, item: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, WalletItem>>, - { + pub fn AddAsync(&self, id: &::windows::core::HSTRING, item: &WalletItem) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).AddAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(id), item.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).AddAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(id), ::core::mem::transmute_copy(item), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -1262,14 +1256,11 @@ impl WalletItemStore { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn UpdateAsync<'a, P0>(&self, item: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, WalletItem>>, - { + pub fn UpdateAsync(&self, item: &WalletItem) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).UpdateAsync)(::windows::core::Vtable::as_raw(this), item.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).UpdateAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(item), result__.as_mut_ptr()).from_abi::(result__) } } } diff --git a/crates/libs/windows/src/Windows/ApplicationModel/mod.rs b/crates/libs/windows/src/Windows/ApplicationModel/mod.rs index f386e1ea0d..a2b8322cde 100644 --- a/crates/libs/windows/src/Windows/ApplicationModel/mod.rs +++ b/crates/libs/windows/src/Windows/ApplicationModel/mod.rs @@ -1713,13 +1713,10 @@ impl AppInfo { } #[doc = "*Required features: `\"System\"`*"] #[cfg(feature = "System")] - pub fn GetFromAppUserModelIdForUser<'a, P0>(user: P0, appusermodelid: &::windows::core::HSTRING) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::System::User>>, - { + pub fn GetFromAppUserModelIdForUser(user: &super::System::User, appusermodelid: &::windows::core::HSTRING) -> ::windows::core::Result { Self::IAppInfoStatics(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).GetFromAppUserModelIdForUser)(::windows::core::Vtable::as_raw(this), user.into().abi(), ::core::mem::transmute_copy(appusermodelid), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).GetFromAppUserModelIdForUser)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(user), ::core::mem::transmute_copy(appusermodelid), result__.as_mut_ptr()).from_abi::(result__) }) } #[doc(hidden)] @@ -3026,14 +3023,11 @@ pub struct PackageCatalog(::windows::core::IUnknown); impl PackageCatalog { #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn PackageStaging<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::Foundation::TypedEventHandler>>, - { + pub fn PackageStaging(&self, handler: &super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).PackageStaging)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).PackageStaging)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -3044,14 +3038,11 @@ impl PackageCatalog { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn PackageInstalling<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::Foundation::TypedEventHandler>>, - { + pub fn PackageInstalling(&self, handler: &super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).PackageInstalling)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).PackageInstalling)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -3062,14 +3053,11 @@ impl PackageCatalog { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn PackageUpdating<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::Foundation::TypedEventHandler>>, - { + pub fn PackageUpdating(&self, handler: &super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).PackageUpdating)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).PackageUpdating)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -3080,14 +3068,11 @@ impl PackageCatalog { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn PackageUninstalling<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::Foundation::TypedEventHandler>>, - { + pub fn PackageUninstalling(&self, handler: &super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).PackageUninstalling)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).PackageUninstalling)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -3098,14 +3083,11 @@ impl PackageCatalog { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn PackageStatusChanged<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::Foundation::TypedEventHandler>>, - { + pub fn PackageStatusChanged(&self, handler: &super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).PackageStatusChanged)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).PackageStatusChanged)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -3116,14 +3098,11 @@ impl PackageCatalog { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn PackageContentGroupStaging<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::Foundation::TypedEventHandler>>, - { + pub fn PackageContentGroupStaging(&self, handler: &super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = &::windows::core::Interface::cast::(self)?; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).PackageContentGroupStaging)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).PackageContentGroupStaging)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] diff --git a/crates/libs/windows/src/Windows/Data/Json/mod.rs b/crates/libs/windows/src/Windows/Data/Json/mod.rs index 567df5a0be..736244e829 100644 --- a/crates/libs/windows/src/Windows/Data/Json/mod.rs +++ b/crates/libs/windows/src/Windows/Data/Json/mod.rs @@ -763,24 +763,18 @@ impl JsonObject { (::windows::core::Vtable::vtable(this).TryParse)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(input), result as *mut _ as _, result__.as_mut_ptr()).from_abi::(result__) }) } - pub fn GetNamedValueOrDefault<'a, P0>(&self, name: &::windows::core::HSTRING, defaultvalue: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, JsonValue>>, - { + pub fn GetNamedValueOrDefault(&self, name: &::windows::core::HSTRING, defaultvalue: &JsonValue) -> ::windows::core::Result { let this = &::windows::core::Interface::cast::(self)?; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).GetNamedValueOrDefault)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(name), defaultvalue.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).GetNamedValueOrDefault)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(name), ::core::mem::transmute_copy(defaultvalue), result__.as_mut_ptr()).from_abi::(result__) } } - pub fn GetNamedObjectOrDefault<'a, P0>(&self, name: &::windows::core::HSTRING, defaultvalue: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, JsonObject>>, - { + pub fn GetNamedObjectOrDefault(&self, name: &::windows::core::HSTRING, defaultvalue: &JsonObject) -> ::windows::core::Result { let this = &::windows::core::Interface::cast::(self)?; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).GetNamedObjectOrDefault)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(name), defaultvalue.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).GetNamedObjectOrDefault)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(name), ::core::mem::transmute_copy(defaultvalue), result__.as_mut_ptr()).from_abi::(result__) } } pub fn GetNamedStringOrDefault(&self, name: &::windows::core::HSTRING, defaultvalue: &::windows::core::HSTRING) -> ::windows::core::Result<::windows::core::HSTRING> { @@ -790,14 +784,11 @@ impl JsonObject { (::windows::core::Vtable::vtable(this).GetNamedStringOrDefault)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(name), ::core::mem::transmute_copy(defaultvalue), result__.as_mut_ptr()).from_abi::<::windows::core::HSTRING>(result__) } } - pub fn GetNamedArrayOrDefault<'a, P0>(&self, name: &::windows::core::HSTRING, defaultvalue: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, JsonArray>>, - { + pub fn GetNamedArrayOrDefault(&self, name: &::windows::core::HSTRING, defaultvalue: &JsonArray) -> ::windows::core::Result { let this = &::windows::core::Interface::cast::(self)?; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).GetNamedArrayOrDefault)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(name), defaultvalue.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).GetNamedArrayOrDefault)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(name), ::core::mem::transmute_copy(defaultvalue), result__.as_mut_ptr()).from_abi::(result__) } } pub fn GetNamedNumberOrDefault(&self, name: &::windows::core::HSTRING, defaultvalue: f64) -> ::windows::core::Result { diff --git a/crates/libs/windows/src/Windows/Data/Pdf/mod.rs b/crates/libs/windows/src/Windows/Data/Pdf/mod.rs index ea2476e4a2..55347cc41c 100644 --- a/crates/libs/windows/src/Windows/Data/Pdf/mod.rs +++ b/crates/libs/windows/src/Windows/Data/Pdf/mod.rs @@ -319,16 +319,15 @@ impl PdfPage { } #[doc = "*Required features: `\"Foundation\"`, `\"Storage_Streams\"`*"] #[cfg(all(feature = "Foundation", feature = "Storage_Streams"))] - pub fn RenderWithOptionsToStreamAsync<'a, P0, E0, P1>(&self, outputstream: P0, options: P1) -> ::windows::core::Result + pub fn RenderWithOptionsToStreamAsync<'a, P0, E0>(&self, outputstream: P0, options: &PdfPageRenderOptions) -> ::windows::core::Result where P0: ::std::convert::TryInto<::windows::core::InParam<'a, super::super::Storage::Streams::IRandomAccessStream>, Error = E0>, E0: ::std::convert::Into<::windows::core::Error>, - P1: ::std::convert::Into<::windows::core::InParam<'a, PdfPageRenderOptions>>, { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).RenderWithOptionsToStreamAsync)(::windows::core::Vtable::as_raw(this), outputstream.try_into().map_err(|e| e.into())?.abi(), options.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).RenderWithOptionsToStreamAsync)(::windows::core::Vtable::as_raw(this), outputstream.try_into().map_err(|e| e.into())?.abi(), ::core::mem::transmute_copy(options), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] diff --git a/crates/libs/windows/src/Windows/Data/Text/mod.rs b/crates/libs/windows/src/Windows/Data/Text/mod.rs index 94f63f92fb..f58e67b548 100644 --- a/crates/libs/windows/src/Windows/Data/Text/mod.rs +++ b/crates/libs/windows/src/Windows/Data/Text/mod.rs @@ -577,12 +577,9 @@ impl SelectableWordsSegmenter { } #[doc = "*Required features: `\"Foundation_Collections\"`*"] #[cfg(feature = "Foundation_Collections")] - pub fn Tokenize<'a, P0>(&self, text: &::windows::core::HSTRING, startindex: u32, handler: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, SelectableWordSegmentsTokenizingHandler>>, - { + pub fn Tokenize(&self, text: &::windows::core::HSTRING, startindex: u32, handler: &SelectableWordSegmentsTokenizingHandler) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).Tokenize)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(text), startindex, handler.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).Tokenize)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(text), startindex, ::core::mem::transmute_copy(handler)).ok() } } pub fn CreateWithLanguage(language: &::windows::core::HSTRING) -> ::windows::core::Result { Self::ISelectableWordsSegmenterFactory(|this| unsafe { @@ -1456,12 +1453,9 @@ impl WordsSegmenter { } #[doc = "*Required features: `\"Foundation_Collections\"`*"] #[cfg(feature = "Foundation_Collections")] - pub fn Tokenize<'a, P0>(&self, text: &::windows::core::HSTRING, startindex: u32, handler: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, WordSegmentsTokenizingHandler>>, - { + pub fn Tokenize(&self, text: &::windows::core::HSTRING, startindex: u32, handler: &WordSegmentsTokenizingHandler) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).Tokenize)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(text), startindex, handler.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).Tokenize)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(text), startindex, ::core::mem::transmute_copy(handler)).ok() } } pub fn CreateWithLanguage(language: &::windows::core::HSTRING) -> ::windows::core::Result { Self::IWordsSegmenterFactory(|this| unsafe { diff --git a/crates/libs/windows/src/Windows/Data/Xml/Dom/mod.rs b/crates/libs/windows/src/Windows/Data/Xml/Dom/mod.rs index 2c59d12dbe..136bf8d236 100644 --- a/crates/libs/windows/src/Windows/Data/Xml/Dom/mod.rs +++ b/crates/libs/windows/src/Windows/Data/Xml/Dom/mod.rs @@ -3862,12 +3862,9 @@ impl XmlDocument { let this = &::windows::core::Interface::cast::(self)?; unsafe { (::windows::core::Vtable::vtable(this).LoadXml)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(xml)).ok() } } - pub fn LoadXmlWithSettings<'a, P0>(&self, xml: &::windows::core::HSTRING, loadsettings: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, XmlLoadSettings>>, - { + pub fn LoadXmlWithSettings(&self, xml: &::windows::core::HSTRING, loadsettings: &XmlLoadSettings) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).LoadXmlWithSettings)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(xml), loadsettings.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).LoadXmlWithSettings)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(xml), ::core::mem::transmute_copy(loadsettings)).ok() } } #[doc = "*Required features: `\"Foundation\"`, `\"Storage\"`*"] #[cfg(all(feature = "Foundation", feature = "Storage"))] @@ -3894,36 +3891,28 @@ impl XmlDocument { } #[doc = "*Required features: `\"Storage_Streams\"`*"] #[cfg(feature = "Storage_Streams")] - pub fn LoadXmlFromBufferWithSettings<'a, P0, E0, P1>(&self, buffer: P0, loadsettings: P1) -> ::windows::core::Result<()> + pub fn LoadXmlFromBufferWithSettings<'a, P0, E0>(&self, buffer: P0, loadsettings: &XmlLoadSettings) -> ::windows::core::Result<()> where P0: ::std::convert::TryInto<::windows::core::InParam<'a, super::super::super::Storage::Streams::IBuffer>, Error = E0>, E0: ::std::convert::Into<::windows::core::Error>, - P1: ::std::convert::Into<::windows::core::InParam<'a, XmlLoadSettings>>, { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).LoadXmlFromBufferWithSettings)(::windows::core::Vtable::as_raw(this), buffer.try_into().map_err(|e| e.into())?.abi(), loadsettings.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).LoadXmlFromBufferWithSettings)(::windows::core::Vtable::as_raw(this), buffer.try_into().map_err(|e| e.into())?.abi(), ::core::mem::transmute_copy(loadsettings)).ok() } } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn LoadFromUriAsync<'a, P0>(uri: P0) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Foundation::Uri>>, - { + pub fn LoadFromUriAsync(uri: &super::super::super::Foundation::Uri) -> ::windows::core::Result> { Self::IXmlDocumentStatics(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).LoadFromUriAsync)(::windows::core::Vtable::as_raw(this), uri.into().abi(), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).LoadFromUriAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(uri), result__.as_mut_ptr()).from_abi::>(result__) }) } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn LoadFromUriWithSettingsAsync<'a, P0, P1>(uri: P0, loadsettings: P1) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Foundation::Uri>>, - P1: ::std::convert::Into<::windows::core::InParam<'a, XmlLoadSettings>>, - { + pub fn LoadFromUriWithSettingsAsync(uri: &super::super::super::Foundation::Uri, loadsettings: &XmlLoadSettings) -> ::windows::core::Result> { Self::IXmlDocumentStatics(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).LoadFromUriWithSettingsAsync)(::windows::core::Vtable::as_raw(this), uri.into().abi(), loadsettings.into().abi(), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).LoadFromUriWithSettingsAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(uri), ::core::mem::transmute_copy(loadsettings), result__.as_mut_ptr()).from_abi::>(result__) }) } #[doc = "*Required features: `\"Foundation\"`, `\"Storage\"`*"] @@ -3940,15 +3929,14 @@ impl XmlDocument { } #[doc = "*Required features: `\"Foundation\"`, `\"Storage\"`*"] #[cfg(all(feature = "Foundation", feature = "Storage"))] - pub fn LoadFromFileWithSettingsAsync<'a, P0, E0, P1>(file: P0, loadsettings: P1) -> ::windows::core::Result> + pub fn LoadFromFileWithSettingsAsync<'a, P0, E0>(file: P0, loadsettings: &XmlLoadSettings) -> ::windows::core::Result> where P0: ::std::convert::TryInto<::windows::core::InParam<'a, super::super::super::Storage::IStorageFile>, Error = E0>, E0: ::std::convert::Into<::windows::core::Error>, - P1: ::std::convert::Into<::windows::core::InParam<'a, XmlLoadSettings>>, { Self::IXmlDocumentStatics(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).LoadFromFileWithSettingsAsync)(::windows::core::Vtable::as_raw(this), file.try_into().map_err(|e| e.into())?.abi(), loadsettings.into().abi(), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).LoadFromFileWithSettingsAsync)(::windows::core::Vtable::as_raw(this), file.try_into().map_err(|e| e.into())?.abi(), ::core::mem::transmute_copy(loadsettings), result__.as_mut_ptr()).from_abi::>(result__) }) } pub fn NodeValue(&self) -> ::windows::core::Result<::windows::core::IInspectable> { @@ -5153,24 +5141,18 @@ impl XmlElement { (::windows::core::Vtable::vtable(this).GetAttributeNode)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(attributename), result__.as_mut_ptr()).from_abi::(result__) } } - pub fn SetAttributeNode<'a, P0>(&self, newattribute: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, XmlAttribute>>, - { + pub fn SetAttributeNode(&self, newattribute: &XmlAttribute) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).SetAttributeNode)(::windows::core::Vtable::as_raw(this), newattribute.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).SetAttributeNode)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(newattribute), result__.as_mut_ptr()).from_abi::(result__) } } - pub fn RemoveAttributeNode<'a, P0>(&self, attributenode: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, XmlAttribute>>, - { + pub fn RemoveAttributeNode(&self, attributenode: &XmlAttribute) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).RemoveAttributeNode)(::windows::core::Vtable::as_raw(this), attributenode.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).RemoveAttributeNode)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(attributenode), result__.as_mut_ptr()).from_abi::(result__) } } pub fn GetElementsByTagName(&self, tagname: &::windows::core::HSTRING) -> ::windows::core::Result { @@ -5204,14 +5186,11 @@ impl XmlElement { let this = self; unsafe { (::windows::core::Vtable::vtable(this).RemoveAttributeNS)(::windows::core::Vtable::as_raw(this), namespaceuri.into().abi(), ::core::mem::transmute_copy(localname)).ok() } } - pub fn SetAttributeNodeNS<'a, P0>(&self, newattribute: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, XmlAttribute>>, - { + pub fn SetAttributeNodeNS(&self, newattribute: &XmlAttribute) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).SetAttributeNodeNS)(::windows::core::Vtable::as_raw(this), newattribute.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).SetAttributeNodeNS)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(newattribute), result__.as_mut_ptr()).from_abi::(result__) } } pub fn GetAttributeNodeNS<'a, P0>(&self, namespaceuri: P0, localname: &::windows::core::HSTRING) -> ::windows::core::Result diff --git a/crates/libs/windows/src/Windows/Data/Xml/Xsl/mod.rs b/crates/libs/windows/src/Windows/Data/Xml/Xsl/mod.rs index b0ea8158e5..9638fc5cc3 100644 --- a/crates/libs/windows/src/Windows/Data/Xml/Xsl/mod.rs +++ b/crates/libs/windows/src/Windows/Data/Xml/Xsl/mod.rs @@ -84,13 +84,10 @@ impl XsltProcessor { } #[doc = "*Required features: `\"Data_Xml_Dom\"`*"] #[cfg(feature = "Data_Xml_Dom")] - pub fn CreateInstance<'a, P0>(document: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::Dom::XmlDocument>>, - { + pub fn CreateInstance(document: &super::Dom::XmlDocument) -> ::windows::core::Result { Self::IXsltProcessorFactory(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).CreateInstance)(::windows::core::Vtable::as_raw(this), document.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).CreateInstance)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(document), result__.as_mut_ptr()).from_abi::(result__) }) } #[doc(hidden)] diff --git a/crates/libs/windows/src/Windows/Devices/AllJoyn/mod.rs b/crates/libs/windows/src/Windows/Devices/AllJoyn/mod.rs index 294f4d8836..a3ab8f0c23 100644 --- a/crates/libs/windows/src/Windows/Devices/AllJoyn/mod.rs +++ b/crates/libs/windows/src/Windows/Devices/AllJoyn/mod.rs @@ -897,12 +897,9 @@ pub struct IAllJoynProducer(::windows::core::IUnknown); impl IAllJoynProducer { #[doc = "*Required features: `\"deprecated\"`*"] #[cfg(feature = "deprecated")] - pub fn SetBusObject<'a, P0>(&self, busobject: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, AllJoynBusObject>>, - { + pub fn SetBusObject(&self, busobject: &AllJoynBusObject) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).SetBusObject)(::windows::core::Vtable::as_raw(this), busobject.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetBusObject)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(busobject)).ok() } } } #[cfg(feature = "deprecated")] @@ -1692,12 +1689,9 @@ impl AllJoynAboutData { } #[doc = "*Required features: `\"Foundation\"`, `\"deprecated\"`*"] #[cfg(all(feature = "Foundation", feature = "deprecated"))] - pub fn SetSupportUrl<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::Uri>>, - { + pub fn SetSupportUrl(&self, value: &super::super::Foundation::Uri) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).SetSupportUrl)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetSupportUrl)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } #[doc = "*Required features: `\"deprecated\"`*"] #[cfg(feature = "deprecated")] @@ -1947,25 +1941,18 @@ impl AllJoynAboutDataView { } #[doc = "*Required features: `\"Foundation\"`, `\"deprecated\"`*"] #[cfg(all(feature = "Foundation", feature = "deprecated"))] - pub fn GetDataBySessionPortAsync<'a, P0>(uniquename: &::windows::core::HSTRING, busattachment: P0, sessionport: u16) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, AllJoynBusAttachment>>, - { + pub fn GetDataBySessionPortAsync(uniquename: &::windows::core::HSTRING, busattachment: &AllJoynBusAttachment, sessionport: u16) -> ::windows::core::Result> { Self::IAllJoynAboutDataViewStatics(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).GetDataBySessionPortAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(uniquename), busattachment.into().abi(), sessionport, result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).GetDataBySessionPortAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(uniquename), ::core::mem::transmute_copy(busattachment), sessionport, result__.as_mut_ptr()).from_abi::>(result__) }) } #[doc = "*Required features: `\"Foundation\"`, `\"Globalization\"`, `\"deprecated\"`*"] #[cfg(all(feature = "Foundation", feature = "Globalization", feature = "deprecated"))] - pub fn GetDataBySessionPortWithLanguageAsync<'a, P0, P1>(uniquename: &::windows::core::HSTRING, busattachment: P0, sessionport: u16, language: P1) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, AllJoynBusAttachment>>, - P1: ::std::convert::Into<::windows::core::InParam<'a, super::super::Globalization::Language>>, - { + pub fn GetDataBySessionPortWithLanguageAsync(uniquename: &::windows::core::HSTRING, busattachment: &AllJoynBusAttachment, sessionport: u16, language: &super::super::Globalization::Language) -> ::windows::core::Result> { Self::IAllJoynAboutDataViewStatics(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).GetDataBySessionPortWithLanguageAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(uniquename), busattachment.into().abi(), sessionport, language.into().abi(), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).GetDataBySessionPortWithLanguageAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(uniquename), ::core::mem::transmute_copy(busattachment), sessionport, ::core::mem::transmute_copy(language), result__.as_mut_ptr()).from_abi::>(result__) }) } #[doc(hidden)] @@ -2397,14 +2384,11 @@ impl AllJoynBusAttachment { } #[doc = "*Required features: `\"Foundation\"`, `\"deprecated\"`*"] #[cfg(all(feature = "Foundation", feature = "deprecated"))] - pub fn StateChanged<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn StateChanged(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).StateChanged)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).StateChanged)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`, `\"deprecated\"`*"] @@ -2424,14 +2408,11 @@ impl AllJoynBusAttachment { } #[doc = "*Required features: `\"Foundation\"`, `\"deprecated\"`*"] #[cfg(all(feature = "Foundation", feature = "deprecated"))] - pub fn CredentialsRequested<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn CredentialsRequested(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).CredentialsRequested)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).CredentialsRequested)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`, `\"deprecated\"`*"] @@ -2442,14 +2423,11 @@ impl AllJoynBusAttachment { } #[doc = "*Required features: `\"Foundation\"`, `\"deprecated\"`*"] #[cfg(all(feature = "Foundation", feature = "deprecated"))] - pub fn CredentialsVerificationRequested<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn CredentialsVerificationRequested(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).CredentialsVerificationRequested)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).CredentialsVerificationRequested)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`, `\"deprecated\"`*"] @@ -2460,14 +2438,11 @@ impl AllJoynBusAttachment { } #[doc = "*Required features: `\"Foundation\"`, `\"deprecated\"`*"] #[cfg(all(feature = "Foundation", feature = "deprecated"))] - pub fn AuthenticationComplete<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn AuthenticationComplete(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).AuthenticationComplete)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).AuthenticationComplete)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`, `\"deprecated\"`*"] @@ -2478,39 +2453,29 @@ impl AllJoynBusAttachment { } #[doc = "*Required features: `\"Foundation\"`, `\"deprecated\"`*"] #[cfg(all(feature = "Foundation", feature = "deprecated"))] - pub fn GetAboutDataAsync<'a, P0>(&self, serviceinfo: P0) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, AllJoynServiceInfo>>, - { + pub fn GetAboutDataAsync(&self, serviceinfo: &AllJoynServiceInfo) -> ::windows::core::Result> { let this = &::windows::core::Interface::cast::(self)?; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).GetAboutDataAsync)(::windows::core::Vtable::as_raw(this), serviceinfo.into().abi(), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).GetAboutDataAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(serviceinfo), result__.as_mut_ptr()).from_abi::>(result__) } } #[doc = "*Required features: `\"Foundation\"`, `\"Globalization\"`, `\"deprecated\"`*"] #[cfg(all(feature = "Foundation", feature = "Globalization", feature = "deprecated"))] - pub fn GetAboutDataWithLanguageAsync<'a, P0, P1>(&self, serviceinfo: P0, language: P1) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, AllJoynServiceInfo>>, - P1: ::std::convert::Into<::windows::core::InParam<'a, super::super::Globalization::Language>>, - { + pub fn GetAboutDataWithLanguageAsync(&self, serviceinfo: &AllJoynServiceInfo, language: &super::super::Globalization::Language) -> ::windows::core::Result> { let this = &::windows::core::Interface::cast::(self)?; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).GetAboutDataWithLanguageAsync)(::windows::core::Vtable::as_raw(this), serviceinfo.into().abi(), language.into().abi(), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).GetAboutDataWithLanguageAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(serviceinfo), ::core::mem::transmute_copy(language), result__.as_mut_ptr()).from_abi::>(result__) } } #[doc = "*Required features: `\"Foundation\"`, `\"deprecated\"`*"] #[cfg(all(feature = "Foundation", feature = "deprecated"))] - pub fn AcceptSessionJoinerRequested<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn AcceptSessionJoinerRequested(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = &::windows::core::Interface::cast::(self)?; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).AcceptSessionJoinerRequested)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).AcceptSessionJoinerRequested)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`, `\"deprecated\"`*"] @@ -2521,14 +2486,11 @@ impl AllJoynBusAttachment { } #[doc = "*Required features: `\"Foundation\"`, `\"deprecated\"`*"] #[cfg(all(feature = "Foundation", feature = "deprecated"))] - pub fn SessionJoined<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn SessionJoined(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = &::windows::core::Interface::cast::(self)?; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).SessionJoined)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).SessionJoined)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`, `\"deprecated\"`*"] @@ -2818,14 +2780,11 @@ impl AllJoynBusObject { } #[doc = "*Required features: `\"Foundation\"`, `\"deprecated\"`*"] #[cfg(all(feature = "Foundation", feature = "deprecated"))] - pub fn Stopped<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn Stopped(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).Stopped)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).Stopped)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`, `\"deprecated\"`*"] @@ -2844,13 +2803,10 @@ impl AllJoynBusObject { } #[doc = "*Required features: `\"deprecated\"`*"] #[cfg(feature = "deprecated")] - pub fn CreateWithBusAttachment<'a, P0>(objectpath: &::windows::core::HSTRING, busattachment: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, AllJoynBusAttachment>>, - { + pub fn CreateWithBusAttachment(objectpath: &::windows::core::HSTRING, busattachment: &AllJoynBusAttachment) -> ::windows::core::Result { Self::IAllJoynBusObjectFactory(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).CreateWithBusAttachment)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(objectpath), busattachment.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).CreateWithBusAttachment)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(objectpath), ::core::mem::transmute_copy(busattachment), result__.as_mut_ptr()).from_abi::(result__) }) } #[doc(hidden)] @@ -3076,12 +3032,9 @@ impl AllJoynCredentials { } #[doc = "*Required features: `\"Security_Cryptography_Certificates\"`, `\"deprecated\"`*"] #[cfg(all(feature = "Security_Cryptography_Certificates", feature = "deprecated"))] - pub fn SetCertificate<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Security::Cryptography::Certificates::Certificate>>, - { + pub fn SetCertificate(&self, value: &super::super::Security::Cryptography::Certificates::Certificate) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).SetCertificate)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetCertificate)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } #[doc = "*Required features: `\"Security_Credentials\"`, `\"deprecated\"`*"] #[cfg(all(feature = "Security_Credentials", feature = "deprecated"))] @@ -3094,12 +3047,9 @@ impl AllJoynCredentials { } #[doc = "*Required features: `\"Security_Credentials\"`, `\"deprecated\"`*"] #[cfg(all(feature = "Security_Credentials", feature = "deprecated"))] - pub fn SetPasswordCredential<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Security::Credentials::PasswordCredential>>, - { + pub fn SetPasswordCredential(&self, value: &super::super::Security::Credentials::PasswordCredential) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).SetPasswordCredential)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetPasswordCredential)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } #[doc = "*Required features: `\"Foundation\"`, `\"deprecated\"`*"] #[cfg(all(feature = "Foundation", feature = "deprecated"))] @@ -3992,14 +3942,11 @@ impl AllJoynSession { } #[doc = "*Required features: `\"Foundation\"`, `\"deprecated\"`*"] #[cfg(all(feature = "Foundation", feature = "deprecated"))] - pub fn MemberAdded<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn MemberAdded(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).MemberAdded)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).MemberAdded)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`, `\"deprecated\"`*"] @@ -4010,14 +3957,11 @@ impl AllJoynSession { } #[doc = "*Required features: `\"Foundation\"`, `\"deprecated\"`*"] #[cfg(all(feature = "Foundation", feature = "deprecated"))] - pub fn MemberRemoved<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn MemberRemoved(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).MemberRemoved)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).MemberRemoved)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`, `\"deprecated\"`*"] @@ -4028,14 +3972,11 @@ impl AllJoynSession { } #[doc = "*Required features: `\"Foundation\"`, `\"deprecated\"`*"] #[cfg(all(feature = "Foundation", feature = "deprecated"))] - pub fn Lost<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn Lost(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).Lost)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).Lost)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`, `\"deprecated\"`*"] @@ -4046,25 +3987,18 @@ impl AllJoynSession { } #[doc = "*Required features: `\"Foundation\"`, `\"deprecated\"`*"] #[cfg(all(feature = "Foundation", feature = "deprecated"))] - pub fn GetFromServiceInfoAsync<'a, P0>(serviceinfo: P0) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, AllJoynServiceInfo>>, - { + pub fn GetFromServiceInfoAsync(serviceinfo: &AllJoynServiceInfo) -> ::windows::core::Result> { Self::IAllJoynSessionStatics(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).GetFromServiceInfoAsync)(::windows::core::Vtable::as_raw(this), serviceinfo.into().abi(), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).GetFromServiceInfoAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(serviceinfo), result__.as_mut_ptr()).from_abi::>(result__) }) } #[doc = "*Required features: `\"Foundation\"`, `\"deprecated\"`*"] #[cfg(all(feature = "Foundation", feature = "deprecated"))] - pub fn GetFromServiceInfoAndBusAttachmentAsync<'a, P0, P1>(serviceinfo: P0, busattachment: P1) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, AllJoynServiceInfo>>, - P1: ::std::convert::Into<::windows::core::InParam<'a, AllJoynBusAttachment>>, - { + pub fn GetFromServiceInfoAndBusAttachmentAsync(serviceinfo: &AllJoynServiceInfo, busattachment: &AllJoynBusAttachment) -> ::windows::core::Result> { Self::IAllJoynSessionStatics(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).GetFromServiceInfoAndBusAttachmentAsync)(::windows::core::Vtable::as_raw(this), serviceinfo.into().abi(), busattachment.into().abi(), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).GetFromServiceInfoAndBusAttachmentAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(serviceinfo), ::core::mem::transmute_copy(busattachment), result__.as_mut_ptr()).from_abi::>(result__) }) } #[doc(hidden)] @@ -4171,13 +4105,10 @@ impl AllJoynSessionJoinedEventArgs { } #[doc = "*Required features: `\"deprecated\"`*"] #[cfg(feature = "deprecated")] - pub fn Create<'a, P0>(session: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, AllJoynSession>>, - { + pub fn Create(session: &AllJoynSession) -> ::windows::core::Result { Self::IAllJoynSessionJoinedEventArgsFactory(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).Create)(::windows::core::Vtable::as_raw(this), session.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).Create)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(session), result__.as_mut_ptr()).from_abi::(result__) }) } #[doc(hidden)] diff --git a/crates/libs/windows/src/Windows/Devices/Bluetooth/Advertisement/mod.rs b/crates/libs/windows/src/Windows/Devices/Bluetooth/Advertisement/mod.rs index 69d686810b..73094a7bf8 100644 --- a/crates/libs/windows/src/Windows/Devices/Bluetooth/Advertisement/mod.rs +++ b/crates/libs/windows/src/Windows/Devices/Bluetooth/Advertisement/mod.rs @@ -1046,12 +1046,9 @@ impl BluetoothLEAdvertisementFilter { (::windows::core::Vtable::vtable(this).Advertisement)(::windows::core::Vtable::as_raw(this), result__.as_mut_ptr()).from_abi::(result__) } } - pub fn SetAdvertisement<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, BluetoothLEAdvertisement>>, - { + pub fn SetAdvertisement(&self, value: &BluetoothLEAdvertisement) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).SetAdvertisement)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetAdvertisement)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } #[doc = "*Required features: `\"Foundation_Collections\"`*"] #[cfg(feature = "Foundation_Collections")] @@ -1162,14 +1159,11 @@ impl BluetoothLEAdvertisementPublisher { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn StatusChanged<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Foundation::TypedEventHandler>>, - { + pub fn StatusChanged(&self, handler: &super::super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).StatusChanged)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).StatusChanged)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -1230,13 +1224,10 @@ impl BluetoothLEAdvertisementPublisher { let this = &::windows::core::Interface::cast::(self)?; unsafe { (::windows::core::Vtable::vtable(this).SetIncludeTransmitPowerLevel)(::windows::core::Vtable::as_raw(this), value).ok() } } - pub fn Create<'a, P0>(advertisement: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, BluetoothLEAdvertisement>>, - { + pub fn Create(advertisement: &BluetoothLEAdvertisement) -> ::windows::core::Result { Self::IBluetoothLEAdvertisementPublisherFactory(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).Create)(::windows::core::Vtable::as_raw(this), advertisement.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).Create)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(advertisement), result__.as_mut_ptr()).from_abi::(result__) }) } #[doc(hidden)] @@ -1630,12 +1621,9 @@ impl BluetoothLEAdvertisementWatcher { (::windows::core::Vtable::vtable(this).SignalStrengthFilter)(::windows::core::Vtable::as_raw(this), result__.as_mut_ptr()).from_abi::(result__) } } - pub fn SetSignalStrengthFilter<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::BluetoothSignalStrengthFilter>>, - { + pub fn SetSignalStrengthFilter(&self, value: &super::BluetoothSignalStrengthFilter) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).SetSignalStrengthFilter)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetSignalStrengthFilter)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } pub fn AdvertisementFilter(&self) -> ::windows::core::Result { let this = self; @@ -1644,12 +1632,9 @@ impl BluetoothLEAdvertisementWatcher { (::windows::core::Vtable::vtable(this).AdvertisementFilter)(::windows::core::Vtable::as_raw(this), result__.as_mut_ptr()).from_abi::(result__) } } - pub fn SetAdvertisementFilter<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, BluetoothLEAdvertisementFilter>>, - { + pub fn SetAdvertisementFilter(&self, value: &BluetoothLEAdvertisementFilter) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).SetAdvertisementFilter)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetAdvertisementFilter)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } pub fn Start(&self) -> ::windows::core::Result<()> { let this = self; @@ -1661,14 +1646,11 @@ impl BluetoothLEAdvertisementWatcher { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn Received<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Foundation::TypedEventHandler>>, - { + pub fn Received(&self, handler: &super::super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).Received)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).Received)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -1679,14 +1661,11 @@ impl BluetoothLEAdvertisementWatcher { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn Stopped<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Foundation::TypedEventHandler>>, - { + pub fn Stopped(&self, handler: &super::super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).Stopped)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).Stopped)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -1706,13 +1685,10 @@ impl BluetoothLEAdvertisementWatcher { let this = &::windows::core::Interface::cast::(self)?; unsafe { (::windows::core::Vtable::vtable(this).SetAllowExtendedAdvertisements)(::windows::core::Vtable::as_raw(this), value).ok() } } - pub fn Create<'a, P0>(advertisementfilter: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, BluetoothLEAdvertisementFilter>>, - { + pub fn Create(advertisementfilter: &BluetoothLEAdvertisementFilter) -> ::windows::core::Result { Self::IBluetoothLEAdvertisementWatcherFactory(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).Create)(::windows::core::Vtable::as_raw(this), advertisementfilter.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).Create)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(advertisementfilter), result__.as_mut_ptr()).from_abi::(result__) }) } #[doc(hidden)] diff --git a/crates/libs/windows/src/Windows/Devices/Bluetooth/Background/mod.rs b/crates/libs/windows/src/Windows/Devices/Bluetooth/Background/mod.rs index 0a8297115e..e880071b88 100644 --- a/crates/libs/windows/src/Windows/Devices/Bluetooth/Background/mod.rs +++ b/crates/libs/windows/src/Windows/Devices/Bluetooth/Background/mod.rs @@ -824,12 +824,9 @@ impl RfcommInboundConnectionInformation { } #[doc = "*Required features: `\"Devices_Bluetooth_Rfcomm\"`*"] #[cfg(feature = "Devices_Bluetooth_Rfcomm")] - pub fn SetLocalServiceId<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::Rfcomm::RfcommServiceId>>, - { + pub fn SetLocalServiceId(&self, value: &super::Rfcomm::RfcommServiceId) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).SetLocalServiceId)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetLocalServiceId)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } pub fn ServiceCapabilities(&self) -> ::windows::core::Result { let this = self; @@ -922,12 +919,9 @@ impl RfcommOutboundConnectionInformation { } #[doc = "*Required features: `\"Devices_Bluetooth_Rfcomm\"`*"] #[cfg(feature = "Devices_Bluetooth_Rfcomm")] - pub fn SetRemoteServiceId<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::Rfcomm::RfcommServiceId>>, - { + pub fn SetRemoteServiceId(&self, value: &super::Rfcomm::RfcommServiceId) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).SetRemoteServiceId)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetRemoteServiceId)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } } impl ::core::clone::Clone for RfcommOutboundConnectionInformation { diff --git a/crates/libs/windows/src/Windows/Devices/Bluetooth/GenericAttributeProfile/mod.rs b/crates/libs/windows/src/Windows/Devices/Bluetooth/GenericAttributeProfile/mod.rs index cccb284185..ec2d3fb354 100644 --- a/crates/libs/windows/src/Windows/Devices/Bluetooth/GenericAttributeProfile/mod.rs +++ b/crates/libs/windows/src/Windows/Devices/Bluetooth/GenericAttributeProfile/mod.rs @@ -1605,14 +1605,11 @@ impl GattCharacteristic { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn ValueChanged<'a, P0>(&self, valuechangedhandler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Foundation::TypedEventHandler>>, - { + pub fn ValueChanged(&self, valuechangedhandler: &super::super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).ValueChanged)(::windows::core::Vtable::as_raw(this), valuechangedhandler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).ValueChanged)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(valuechangedhandler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -3011,40 +3008,28 @@ impl GattDeviceService { (::windows::core::Vtable::vtable(this).FromIdWithSharingModeAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(deviceid), sharingmode, result__.as_mut_ptr()).from_abi::>(result__) }) } - pub fn GetDeviceSelectorForBluetoothDeviceId<'a, P0>(bluetoothdeviceid: P0) -> ::windows::core::Result<::windows::core::HSTRING> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::BluetoothDeviceId>>, - { + pub fn GetDeviceSelectorForBluetoothDeviceId(bluetoothdeviceid: &super::BluetoothDeviceId) -> ::windows::core::Result<::windows::core::HSTRING> { Self::IGattDeviceServiceStatics2(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).GetDeviceSelectorForBluetoothDeviceId)(::windows::core::Vtable::as_raw(this), bluetoothdeviceid.into().abi(), result__.as_mut_ptr()).from_abi::<::windows::core::HSTRING>(result__) + (::windows::core::Vtable::vtable(this).GetDeviceSelectorForBluetoothDeviceId)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(bluetoothdeviceid), result__.as_mut_ptr()).from_abi::<::windows::core::HSTRING>(result__) }) } - pub fn GetDeviceSelectorForBluetoothDeviceIdWithCacheMode<'a, P0>(bluetoothdeviceid: P0, cachemode: super::BluetoothCacheMode) -> ::windows::core::Result<::windows::core::HSTRING> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::BluetoothDeviceId>>, - { + pub fn GetDeviceSelectorForBluetoothDeviceIdWithCacheMode(bluetoothdeviceid: &super::BluetoothDeviceId, cachemode: super::BluetoothCacheMode) -> ::windows::core::Result<::windows::core::HSTRING> { Self::IGattDeviceServiceStatics2(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).GetDeviceSelectorForBluetoothDeviceIdWithCacheMode)(::windows::core::Vtable::as_raw(this), bluetoothdeviceid.into().abi(), cachemode, result__.as_mut_ptr()).from_abi::<::windows::core::HSTRING>(result__) + (::windows::core::Vtable::vtable(this).GetDeviceSelectorForBluetoothDeviceIdWithCacheMode)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(bluetoothdeviceid), cachemode, result__.as_mut_ptr()).from_abi::<::windows::core::HSTRING>(result__) }) } - pub fn GetDeviceSelectorForBluetoothDeviceIdAndUuid<'a, P0>(bluetoothdeviceid: P0, serviceuuid: ::windows::core::GUID) -> ::windows::core::Result<::windows::core::HSTRING> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::BluetoothDeviceId>>, - { + pub fn GetDeviceSelectorForBluetoothDeviceIdAndUuid(bluetoothdeviceid: &super::BluetoothDeviceId, serviceuuid: ::windows::core::GUID) -> ::windows::core::Result<::windows::core::HSTRING> { Self::IGattDeviceServiceStatics2(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).GetDeviceSelectorForBluetoothDeviceIdAndUuid)(::windows::core::Vtable::as_raw(this), bluetoothdeviceid.into().abi(), serviceuuid, result__.as_mut_ptr()).from_abi::<::windows::core::HSTRING>(result__) + (::windows::core::Vtable::vtable(this).GetDeviceSelectorForBluetoothDeviceIdAndUuid)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(bluetoothdeviceid), serviceuuid, result__.as_mut_ptr()).from_abi::<::windows::core::HSTRING>(result__) }) } - pub fn GetDeviceSelectorForBluetoothDeviceIdAndUuidWithCacheMode<'a, P0>(bluetoothdeviceid: P0, serviceuuid: ::windows::core::GUID, cachemode: super::BluetoothCacheMode) -> ::windows::core::Result<::windows::core::HSTRING> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::BluetoothDeviceId>>, - { + pub fn GetDeviceSelectorForBluetoothDeviceIdAndUuidWithCacheMode(bluetoothdeviceid: &super::BluetoothDeviceId, serviceuuid: ::windows::core::GUID, cachemode: super::BluetoothCacheMode) -> ::windows::core::Result<::windows::core::HSTRING> { Self::IGattDeviceServiceStatics2(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).GetDeviceSelectorForBluetoothDeviceIdAndUuidWithCacheMode)(::windows::core::Vtable::as_raw(this), bluetoothdeviceid.into().abi(), serviceuuid, cachemode, result__.as_mut_ptr()).from_abi::<::windows::core::HSTRING>(result__) + (::windows::core::Vtable::vtable(this).GetDeviceSelectorForBluetoothDeviceIdAndUuidWithCacheMode)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(bluetoothdeviceid), serviceuuid, cachemode, result__.as_mut_ptr()).from_abi::<::windows::core::HSTRING>(result__) }) } #[doc(hidden)] @@ -3281,14 +3266,11 @@ impl GattLocalCharacteristic { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn CreateDescriptorAsync<'a, P0>(&self, descriptoruuid: ::windows::core::GUID, parameters: P0) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, GattLocalDescriptorParameters>>, - { + pub fn CreateDescriptorAsync(&self, descriptoruuid: ::windows::core::GUID, parameters: &GattLocalDescriptorParameters) -> ::windows::core::Result> { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).CreateDescriptorAsync)(::windows::core::Vtable::as_raw(this), descriptoruuid, parameters.into().abi(), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).CreateDescriptorAsync)(::windows::core::Vtable::as_raw(this), descriptoruuid, ::core::mem::transmute_copy(parameters), result__.as_mut_ptr()).from_abi::>(result__) } } #[doc = "*Required features: `\"Foundation_Collections\"`*"] @@ -3327,14 +3309,11 @@ impl GattLocalCharacteristic { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn SubscribedClientsChanged<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Foundation::TypedEventHandler>>, - { + pub fn SubscribedClientsChanged(&self, handler: &super::super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).SubscribedClientsChanged)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).SubscribedClientsChanged)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -3345,14 +3324,11 @@ impl GattLocalCharacteristic { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn ReadRequested<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Foundation::TypedEventHandler>>, - { + pub fn ReadRequested(&self, handler: &super::super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).ReadRequested)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).ReadRequested)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -3363,14 +3339,11 @@ impl GattLocalCharacteristic { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn WriteRequested<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Foundation::TypedEventHandler>>, - { + pub fn WriteRequested(&self, handler: &super::super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).WriteRequested)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).WriteRequested)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -3394,16 +3367,15 @@ impl GattLocalCharacteristic { } #[doc = "*Required features: `\"Foundation\"`, `\"Storage_Streams\"`*"] #[cfg(all(feature = "Foundation", feature = "Storage_Streams"))] - pub fn NotifyValueForSubscribedClientAsync<'a, P0, E0, P1>(&self, value: P0, subscribedclient: P1) -> ::windows::core::Result> + pub fn NotifyValueForSubscribedClientAsync<'a, P0, E0>(&self, value: P0, subscribedclient: &GattSubscribedClient) -> ::windows::core::Result> where P0: ::std::convert::TryInto<::windows::core::InParam<'a, super::super::super::Storage::Streams::IBuffer>, Error = E0>, E0: ::std::convert::Into<::windows::core::Error>, - P1: ::std::convert::Into<::windows::core::InParam<'a, GattSubscribedClient>>, { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).NotifyValueForSubscribedClientAsync)(::windows::core::Vtable::as_raw(this), value.try_into().map_err(|e| e.into())?.abi(), subscribedclient.into().abi(), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).NotifyValueForSubscribedClientAsync)(::windows::core::Vtable::as_raw(this), value.try_into().map_err(|e| e.into())?.abi(), ::core::mem::transmute_copy(subscribedclient), result__.as_mut_ptr()).from_abi::>(result__) } } } @@ -3738,14 +3710,11 @@ impl GattLocalDescriptor { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn ReadRequested<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Foundation::TypedEventHandler>>, - { + pub fn ReadRequested(&self, handler: &super::super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).ReadRequested)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).ReadRequested)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -3756,14 +3725,11 @@ impl GattLocalDescriptor { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn WriteRequested<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Foundation::TypedEventHandler>>, - { + pub fn WriteRequested(&self, handler: &super::super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).WriteRequested)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).WriteRequested)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -4050,14 +4016,11 @@ impl GattLocalService { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn CreateCharacteristicAsync<'a, P0>(&self, characteristicuuid: ::windows::core::GUID, parameters: P0) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, GattLocalCharacteristicParameters>>, - { + pub fn CreateCharacteristicAsync(&self, characteristicuuid: ::windows::core::GUID, parameters: &GattLocalCharacteristicParameters) -> ::windows::core::Result> { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).CreateCharacteristicAsync)(::windows::core::Vtable::as_raw(this), characteristicuuid, parameters.into().abi(), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).CreateCharacteristicAsync)(::windows::core::Vtable::as_raw(this), characteristicuuid, ::core::mem::transmute_copy(parameters), result__.as_mut_ptr()).from_abi::>(result__) } } #[doc = "*Required features: `\"Foundation_Collections\"`*"] @@ -4667,14 +4630,11 @@ impl GattReadRequest { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn StateChanged<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Foundation::TypedEventHandler>>, - { + pub fn StateChanged(&self, handler: &super::super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).StateChanged)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).StateChanged)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -4963,14 +4923,13 @@ impl GattReliableWriteTransaction { } #[doc = "*Required features: `\"Storage_Streams\"`*"] #[cfg(feature = "Storage_Streams")] - pub fn WriteValue<'a, P0, P1, E1>(&self, characteristic: P0, value: P1) -> ::windows::core::Result<()> + pub fn WriteValue<'a, P0, E0>(&self, characteristic: &GattCharacteristic, value: P0) -> ::windows::core::Result<()> where - P0: ::std::convert::Into<::windows::core::InParam<'a, GattCharacteristic>>, - P1: ::std::convert::TryInto<::windows::core::InParam<'a, super::super::super::Storage::Streams::IBuffer>, Error = E1>, - E1: ::std::convert::Into<::windows::core::Error>, + P0: ::std::convert::TryInto<::windows::core::InParam<'a, super::super::super::Storage::Streams::IBuffer>, Error = E0>, + E0: ::std::convert::Into<::windows::core::Error>, { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).WriteValue)(::windows::core::Vtable::as_raw(this), characteristic.into().abi(), value.try_into().map_err(|e| e.into())?.abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).WriteValue)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(characteristic), value.try_into().map_err(|e| e.into())?.abi()).ok() } } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] @@ -5158,14 +5117,11 @@ impl GattServiceProvider { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn AdvertisementStatusChanged<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Foundation::TypedEventHandler>>, - { + pub fn AdvertisementStatusChanged(&self, handler: &super::super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).AdvertisementStatusChanged)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).AdvertisementStatusChanged)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -5178,12 +5134,9 @@ impl GattServiceProvider { let this = self; unsafe { (::windows::core::Vtable::vtable(this).StartAdvertising)(::windows::core::Vtable::as_raw(this)).ok() } } - pub fn StartAdvertisingWithParameters<'a, P0>(&self, parameters: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, GattServiceProviderAdvertisingParameters>>, - { + pub fn StartAdvertisingWithParameters(&self, parameters: &GattServiceProviderAdvertisingParameters) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).StartAdvertisingWithParameters)(::windows::core::Vtable::as_raw(this), parameters.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).StartAdvertisingWithParameters)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(parameters)).ok() } } pub fn StopAdvertising(&self) -> ::windows::core::Result<()> { let this = self; @@ -5750,14 +5703,11 @@ impl GattSession { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn MaxPduSizeChanged<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Foundation::TypedEventHandler>>, - { + pub fn MaxPduSizeChanged(&self, handler: &super::super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).MaxPduSizeChanged)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).MaxPduSizeChanged)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -5768,14 +5718,11 @@ impl GattSession { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn SessionStatusChanged<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Foundation::TypedEventHandler>>, - { + pub fn SessionStatusChanged(&self, handler: &super::super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).SessionStatusChanged)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).SessionStatusChanged)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -5786,13 +5733,10 @@ impl GattSession { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn FromDeviceIdAsync<'a, P0>(deviceid: P0) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::BluetoothDeviceId>>, - { + pub fn FromDeviceIdAsync(deviceid: &super::BluetoothDeviceId) -> ::windows::core::Result> { Self::IGattSessionStatics(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).FromDeviceIdAsync)(::windows::core::Vtable::as_raw(this), deviceid.into().abi(), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).FromDeviceIdAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(deviceid), result__.as_mut_ptr()).from_abi::>(result__) }) } #[doc(hidden)] @@ -5990,14 +5934,11 @@ impl GattSubscribedClient { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn MaxNotificationSizeChanged<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Foundation::TypedEventHandler>>, - { + pub fn MaxNotificationSizeChanged(&self, handler: &super::super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).MaxNotificationSizeChanged)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).MaxNotificationSizeChanged)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -6194,14 +6135,11 @@ impl GattWriteRequest { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn StateChanged<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Foundation::TypedEventHandler>>, - { + pub fn StateChanged(&self, handler: &super::super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).StateChanged)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).StateChanged)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] diff --git a/crates/libs/windows/src/Windows/Devices/Bluetooth/Rfcomm/mod.rs b/crates/libs/windows/src/Windows/Devices/Bluetooth/Rfcomm/mod.rs index 6df5eb533b..14a5fa4026 100644 --- a/crates/libs/windows/src/Windows/Devices/Bluetooth/Rfcomm/mod.rs +++ b/crates/libs/windows/src/Windows/Devices/Bluetooth/Rfcomm/mod.rs @@ -328,51 +328,34 @@ impl RfcommDeviceService { (::windows::core::Vtable::vtable(this).FromIdAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(deviceid), result__.as_mut_ptr()).from_abi::>(result__) }) } - pub fn GetDeviceSelector<'a, P0>(serviceid: P0) -> ::windows::core::Result<::windows::core::HSTRING> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, RfcommServiceId>>, - { + pub fn GetDeviceSelector(serviceid: &RfcommServiceId) -> ::windows::core::Result<::windows::core::HSTRING> { Self::IRfcommDeviceServiceStatics(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).GetDeviceSelector)(::windows::core::Vtable::as_raw(this), serviceid.into().abi(), result__.as_mut_ptr()).from_abi::<::windows::core::HSTRING>(result__) + (::windows::core::Vtable::vtable(this).GetDeviceSelector)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(serviceid), result__.as_mut_ptr()).from_abi::<::windows::core::HSTRING>(result__) }) } - pub fn GetDeviceSelectorForBluetoothDevice<'a, P0>(bluetoothdevice: P0) -> ::windows::core::Result<::windows::core::HSTRING> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::BluetoothDevice>>, - { + pub fn GetDeviceSelectorForBluetoothDevice(bluetoothdevice: &super::BluetoothDevice) -> ::windows::core::Result<::windows::core::HSTRING> { Self::IRfcommDeviceServiceStatics2(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).GetDeviceSelectorForBluetoothDevice)(::windows::core::Vtable::as_raw(this), bluetoothdevice.into().abi(), result__.as_mut_ptr()).from_abi::<::windows::core::HSTRING>(result__) + (::windows::core::Vtable::vtable(this).GetDeviceSelectorForBluetoothDevice)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(bluetoothdevice), result__.as_mut_ptr()).from_abi::<::windows::core::HSTRING>(result__) }) } - pub fn GetDeviceSelectorForBluetoothDeviceWithCacheMode<'a, P0>(bluetoothdevice: P0, cachemode: super::BluetoothCacheMode) -> ::windows::core::Result<::windows::core::HSTRING> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::BluetoothDevice>>, - { + pub fn GetDeviceSelectorForBluetoothDeviceWithCacheMode(bluetoothdevice: &super::BluetoothDevice, cachemode: super::BluetoothCacheMode) -> ::windows::core::Result<::windows::core::HSTRING> { Self::IRfcommDeviceServiceStatics2(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).GetDeviceSelectorForBluetoothDeviceWithCacheMode)(::windows::core::Vtable::as_raw(this), bluetoothdevice.into().abi(), cachemode, result__.as_mut_ptr()).from_abi::<::windows::core::HSTRING>(result__) + (::windows::core::Vtable::vtable(this).GetDeviceSelectorForBluetoothDeviceWithCacheMode)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(bluetoothdevice), cachemode, result__.as_mut_ptr()).from_abi::<::windows::core::HSTRING>(result__) }) } - pub fn GetDeviceSelectorForBluetoothDeviceAndServiceId<'a, P0, P1>(bluetoothdevice: P0, serviceid: P1) -> ::windows::core::Result<::windows::core::HSTRING> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::BluetoothDevice>>, - P1: ::std::convert::Into<::windows::core::InParam<'a, RfcommServiceId>>, - { + pub fn GetDeviceSelectorForBluetoothDeviceAndServiceId(bluetoothdevice: &super::BluetoothDevice, serviceid: &RfcommServiceId) -> ::windows::core::Result<::windows::core::HSTRING> { Self::IRfcommDeviceServiceStatics2(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).GetDeviceSelectorForBluetoothDeviceAndServiceId)(::windows::core::Vtable::as_raw(this), bluetoothdevice.into().abi(), serviceid.into().abi(), result__.as_mut_ptr()).from_abi::<::windows::core::HSTRING>(result__) + (::windows::core::Vtable::vtable(this).GetDeviceSelectorForBluetoothDeviceAndServiceId)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(bluetoothdevice), ::core::mem::transmute_copy(serviceid), result__.as_mut_ptr()).from_abi::<::windows::core::HSTRING>(result__) }) } - pub fn GetDeviceSelectorForBluetoothDeviceAndServiceIdWithCacheMode<'a, P0, P1>(bluetoothdevice: P0, serviceid: P1, cachemode: super::BluetoothCacheMode) -> ::windows::core::Result<::windows::core::HSTRING> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::BluetoothDevice>>, - P1: ::std::convert::Into<::windows::core::InParam<'a, RfcommServiceId>>, - { + pub fn GetDeviceSelectorForBluetoothDeviceAndServiceIdWithCacheMode(bluetoothdevice: &super::BluetoothDevice, serviceid: &RfcommServiceId, cachemode: super::BluetoothCacheMode) -> ::windows::core::Result<::windows::core::HSTRING> { Self::IRfcommDeviceServiceStatics2(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).GetDeviceSelectorForBluetoothDeviceAndServiceIdWithCacheMode)(::windows::core::Vtable::as_raw(this), bluetoothdevice.into().abi(), serviceid.into().abi(), cachemode, result__.as_mut_ptr()).from_abi::<::windows::core::HSTRING>(result__) + (::windows::core::Vtable::vtable(this).GetDeviceSelectorForBluetoothDeviceAndServiceIdWithCacheMode)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(bluetoothdevice), ::core::mem::transmute_copy(serviceid), cachemode, result__.as_mut_ptr()).from_abi::<::windows::core::HSTRING>(result__) }) } #[doc(hidden)] @@ -722,12 +705,9 @@ impl RfcommServiceProvider { } #[doc = "*Required features: `\"Networking_Sockets\"`*"] #[cfg(feature = "Networking_Sockets")] - pub fn StartAdvertising<'a, P0>(&self, listener: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Networking::Sockets::StreamSocketListener>>, - { + pub fn StartAdvertising(&self, listener: &super::super::super::Networking::Sockets::StreamSocketListener) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).StartAdvertising)(::windows::core::Vtable::as_raw(this), listener.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).StartAdvertising)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(listener)).ok() } } pub fn StopAdvertising(&self) -> ::windows::core::Result<()> { let this = self; @@ -735,22 +715,16 @@ impl RfcommServiceProvider { } #[doc = "*Required features: `\"Networking_Sockets\"`*"] #[cfg(feature = "Networking_Sockets")] - pub fn StartAdvertisingWithRadioDiscoverability<'a, P0>(&self, listener: P0, radiodiscoverable: bool) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Networking::Sockets::StreamSocketListener>>, - { + pub fn StartAdvertisingWithRadioDiscoverability(&self, listener: &super::super::super::Networking::Sockets::StreamSocketListener, radiodiscoverable: bool) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).StartAdvertisingWithRadioDiscoverability)(::windows::core::Vtable::as_raw(this), listener.into().abi(), radiodiscoverable).ok() } + unsafe { (::windows::core::Vtable::vtable(this).StartAdvertisingWithRadioDiscoverability)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(listener), radiodiscoverable).ok() } } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn CreateAsync<'a, P0>(serviceid: P0) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, RfcommServiceId>>, - { + pub fn CreateAsync(serviceid: &RfcommServiceId) -> ::windows::core::Result> { Self::IRfcommServiceProviderStatics(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).CreateAsync)(::windows::core::Vtable::as_raw(this), serviceid.into().abi(), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).CreateAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(serviceid), result__.as_mut_ptr()).from_abi::>(result__) }) } #[doc(hidden)] diff --git a/crates/libs/windows/src/Windows/Devices/Bluetooth/mod.rs b/crates/libs/windows/src/Windows/Devices/Bluetooth/mod.rs index c940efa0e9..fbef99955c 100644 --- a/crates/libs/windows/src/Windows/Devices/Bluetooth/mod.rs +++ b/crates/libs/windows/src/Windows/Devices/Bluetooth/mod.rs @@ -1197,14 +1197,11 @@ impl BluetoothDevice { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn NameChanged<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn NameChanged(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).NameChanged)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).NameChanged)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -1215,14 +1212,11 @@ impl BluetoothDevice { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn SdpRecordsChanged<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn SdpRecordsChanged(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).SdpRecordsChanged)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).SdpRecordsChanged)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -1233,14 +1227,11 @@ impl BluetoothDevice { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn ConnectionStatusChanged<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn ConnectionStatusChanged(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).ConnectionStatusChanged)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).ConnectionStatusChanged)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -1296,26 +1287,20 @@ impl BluetoothDevice { } #[doc = "*Required features: `\"Devices_Bluetooth_Rfcomm\"`, `\"Foundation\"`*"] #[cfg(all(feature = "Devices_Bluetooth_Rfcomm", feature = "Foundation"))] - pub fn GetRfcommServicesForIdAsync<'a, P0>(&self, serviceid: P0) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, Rfcomm::RfcommServiceId>>, - { + pub fn GetRfcommServicesForIdAsync(&self, serviceid: &Rfcomm::RfcommServiceId) -> ::windows::core::Result> { let this = &::windows::core::Interface::cast::(self)?; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).GetRfcommServicesForIdAsync)(::windows::core::Vtable::as_raw(this), serviceid.into().abi(), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).GetRfcommServicesForIdAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(serviceid), result__.as_mut_ptr()).from_abi::>(result__) } } #[doc = "*Required features: `\"Devices_Bluetooth_Rfcomm\"`, `\"Foundation\"`*"] #[cfg(all(feature = "Devices_Bluetooth_Rfcomm", feature = "Foundation"))] - pub fn GetRfcommServicesForIdWithCacheModeAsync<'a, P0>(&self, serviceid: P0, cachemode: BluetoothCacheMode) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, Rfcomm::RfcommServiceId>>, - { + pub fn GetRfcommServicesForIdWithCacheModeAsync(&self, serviceid: &Rfcomm::RfcommServiceId, cachemode: BluetoothCacheMode) -> ::windows::core::Result> { let this = &::windows::core::Interface::cast::(self)?; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).GetRfcommServicesForIdWithCacheModeAsync)(::windows::core::Vtable::as_raw(this), serviceid.into().abi(), cachemode, result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).GetRfcommServicesForIdWithCacheModeAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(serviceid), cachemode, result__.as_mut_ptr()).from_abi::>(result__) } } pub fn BluetoothDeviceId(&self) -> ::windows::core::Result { @@ -1342,13 +1327,10 @@ impl BluetoothDevice { } #[doc = "*Required features: `\"Foundation\"`, `\"Networking\"`*"] #[cfg(all(feature = "Foundation", feature = "Networking"))] - pub fn FromHostNameAsync<'a, P0>(hostname: P0) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Networking::HostName>>, - { + pub fn FromHostNameAsync(hostname: &super::super::Networking::HostName) -> ::windows::core::Result> { Self::IBluetoothDeviceStatics(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).FromHostNameAsync)(::windows::core::Vtable::as_raw(this), hostname.into().abi(), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).FromHostNameAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(hostname), result__.as_mut_ptr()).from_abi::>(result__) }) } #[doc = "*Required features: `\"Foundation\"`*"] @@ -1389,13 +1371,10 @@ impl BluetoothDevice { (::windows::core::Vtable::vtable(this).GetDeviceSelectorFromBluetoothAddress)(::windows::core::Vtable::as_raw(this), bluetoothaddress, result__.as_mut_ptr()).from_abi::<::windows::core::HSTRING>(result__) }) } - pub fn GetDeviceSelectorFromClassOfDevice<'a, P0>(classofdevice: P0) -> ::windows::core::Result<::windows::core::HSTRING> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, BluetoothClassOfDevice>>, - { + pub fn GetDeviceSelectorFromClassOfDevice(classofdevice: &BluetoothClassOfDevice) -> ::windows::core::Result<::windows::core::HSTRING> { Self::IBluetoothDeviceStatics2(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).GetDeviceSelectorFromClassOfDevice)(::windows::core::Vtable::as_raw(this), classofdevice.into().abi(), result__.as_mut_ptr()).from_abi::<::windows::core::HSTRING>(result__) + (::windows::core::Vtable::vtable(this).GetDeviceSelectorFromClassOfDevice)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(classofdevice), result__.as_mut_ptr()).from_abi::<::windows::core::HSTRING>(result__) }) } #[doc = "*Required features: `\"Foundation\"`*"] @@ -2348,14 +2327,11 @@ impl BluetoothLEDevice { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn NameChanged<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn NameChanged(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).NameChanged)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).NameChanged)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -2366,14 +2342,11 @@ impl BluetoothLEDevice { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn GattServicesChanged<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn GattServicesChanged(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).GattServicesChanged)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).GattServicesChanged)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -2384,14 +2357,11 @@ impl BluetoothLEDevice { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn ConnectionStatusChanged<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn ConnectionStatusChanged(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).ConnectionStatusChanged)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).ConnectionStatusChanged)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -2505,26 +2475,20 @@ impl BluetoothLEDevice { (::windows::core::Vtable::vtable(this).GetConnectionPhy)(::windows::core::Vtable::as_raw(this), result__.as_mut_ptr()).from_abi::(result__) } } - pub fn RequestPreferredConnectionParameters<'a, P0>(&self, preferredconnectionparameters: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, BluetoothLEPreferredConnectionParameters>>, - { + pub fn RequestPreferredConnectionParameters(&self, preferredconnectionparameters: &BluetoothLEPreferredConnectionParameters) -> ::windows::core::Result { let this = &::windows::core::Interface::cast::(self)?; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).RequestPreferredConnectionParameters)(::windows::core::Vtable::as_raw(this), preferredconnectionparameters.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).RequestPreferredConnectionParameters)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(preferredconnectionparameters), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn ConnectionParametersChanged<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn ConnectionParametersChanged(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = &::windows::core::Interface::cast::(self)?; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).ConnectionParametersChanged)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).ConnectionParametersChanged)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -2535,14 +2499,11 @@ impl BluetoothLEDevice { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn ConnectionPhyChanged<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn ConnectionPhyChanged(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = &::windows::core::Interface::cast::(self)?; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).ConnectionPhyChanged)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).ConnectionPhyChanged)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -2603,13 +2564,10 @@ impl BluetoothLEDevice { (::windows::core::Vtable::vtable(this).GetDeviceSelectorFromBluetoothAddressWithBluetoothAddressType)(::windows::core::Vtable::as_raw(this), bluetoothaddress, bluetoothaddresstype, result__.as_mut_ptr()).from_abi::<::windows::core::HSTRING>(result__) }) } - pub fn GetDeviceSelectorFromAppearance<'a, P0>(appearance: P0) -> ::windows::core::Result<::windows::core::HSTRING> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, BluetoothLEAppearance>>, - { + pub fn GetDeviceSelectorFromAppearance(appearance: &BluetoothLEAppearance) -> ::windows::core::Result<::windows::core::HSTRING> { Self::IBluetoothLEDeviceStatics2(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).GetDeviceSelectorFromAppearance)(::windows::core::Vtable::as_raw(this), appearance.into().abi(), result__.as_mut_ptr()).from_abi::<::windows::core::HSTRING>(result__) + (::windows::core::Vtable::vtable(this).GetDeviceSelectorFromAppearance)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(appearance), result__.as_mut_ptr()).from_abi::<::windows::core::HSTRING>(result__) }) } #[doc = "*Required features: `\"Foundation\"`*"] diff --git a/crates/libs/windows/src/Windows/Devices/Display/Core/mod.rs b/crates/libs/windows/src/Windows/Devices/Display/Core/mod.rs index ed1b57e1e0..3b38d86bc3 100644 --- a/crates/libs/windows/src/Windows/Devices/Display/Core/mod.rs +++ b/crates/libs/windows/src/Windows/Devices/Display/Core/mod.rs @@ -978,25 +978,18 @@ unsafe impl ::core::marker::Sync for DisplayAdapter {} #[repr(transparent)] pub struct DisplayDevice(::windows::core::IUnknown); impl DisplayDevice { - pub fn CreateScanoutSource<'a, P0>(&self, target: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, DisplayTarget>>, - { + pub fn CreateScanoutSource(&self, target: &DisplayTarget) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).CreateScanoutSource)(::windows::core::Vtable::as_raw(this), target.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).CreateScanoutSource)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(target), result__.as_mut_ptr()).from_abi::(result__) } } - pub fn CreatePrimary<'a, P0, P1>(&self, target: P0, desc: P1) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, DisplayTarget>>, - P1: ::std::convert::Into<::windows::core::InParam<'a, DisplayPrimaryDescription>>, - { + pub fn CreatePrimary(&self, target: &DisplayTarget, desc: &DisplayPrimaryDescription) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).CreatePrimary)(::windows::core::Vtable::as_raw(this), target.into().abi(), desc.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).CreatePrimary)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(target), ::core::mem::transmute_copy(desc), result__.as_mut_ptr()).from_abi::(result__) } } pub fn CreateTaskPool(&self) -> ::windows::core::Result { @@ -1008,32 +1001,22 @@ impl DisplayDevice { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn CreatePeriodicFence<'a, P0>(&self, target: P0, offsetfromvblank: super::super::super::Foundation::TimeSpan) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, DisplayTarget>>, - { + pub fn CreatePeriodicFence(&self, target: &DisplayTarget, offsetfromvblank: super::super::super::Foundation::TimeSpan) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).CreatePeriodicFence)(::windows::core::Vtable::as_raw(this), target.into().abi(), offsetfromvblank, result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).CreatePeriodicFence)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(target), offsetfromvblank, result__.as_mut_ptr()).from_abi::(result__) } } - pub fn WaitForVBlank<'a, P0>(&self, source: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, DisplaySource>>, - { + pub fn WaitForVBlank(&self, source: &DisplaySource) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).WaitForVBlank)(::windows::core::Vtable::as_raw(this), source.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).WaitForVBlank)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(source)).ok() } } - pub fn CreateSimpleScanout<'a, P0, P1>(&self, psource: P0, psurface: P1, subresourceindex: u32, syncinterval: u32) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, DisplaySource>>, - P1: ::std::convert::Into<::windows::core::InParam<'a, DisplaySurface>>, - { + pub fn CreateSimpleScanout(&self, psource: &DisplaySource, psurface: &DisplaySurface, subresourceindex: u32, syncinterval: u32) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).CreateSimpleScanout)(::windows::core::Vtable::as_raw(this), psource.into().abi(), psurface.into().abi(), subresourceindex, syncinterval, result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).CreateSimpleScanout)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(psource), ::core::mem::transmute_copy(psurface), subresourceindex, syncinterval, result__.as_mut_ptr()).from_abi::(result__) } } pub fn IsCapabilitySupported(&self, capability: DisplayDeviceCapability) -> ::windows::core::Result { @@ -1045,17 +1028,15 @@ impl DisplayDevice { } #[doc = "*Required features: `\"Foundation_Collections\"`, `\"Graphics\"`*"] #[cfg(all(feature = "Foundation_Collections", feature = "Graphics"))] - pub fn CreateSimpleScanoutWithDirtyRectsAndOptions<'a, P0, P1, P2, E2>(&self, source: P0, surface: P1, subresourceindex: u32, syncinterval: u32, dirtyrects: P2, options: DisplayScanoutOptions) -> ::windows::core::Result + pub fn CreateSimpleScanoutWithDirtyRectsAndOptions<'a, P0, E0>(&self, source: &DisplaySource, surface: &DisplaySurface, subresourceindex: u32, syncinterval: u32, dirtyrects: P0, options: DisplayScanoutOptions) -> ::windows::core::Result where - P0: ::std::convert::Into<::windows::core::InParam<'a, DisplaySource>>, - P1: ::std::convert::Into<::windows::core::InParam<'a, DisplaySurface>>, - P2: ::std::convert::TryInto<::windows::core::InParam<'a, super::super::super::Foundation::Collections::IIterable>, Error = E2>, - E2: ::std::convert::Into<::windows::core::Error>, + P0: ::std::convert::TryInto<::windows::core::InParam<'a, super::super::super::Foundation::Collections::IIterable>, Error = E0>, + E0: ::std::convert::Into<::windows::core::Error>, { let this = &::windows::core::Interface::cast::(self)?; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).CreateSimpleScanoutWithDirtyRectsAndOptions)(::windows::core::Vtable::as_raw(this), source.into().abi(), surface.into().abi(), subresourceindex, syncinterval, dirtyrects.try_into().map_err(|e| e.into())?.abi(), options, result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).CreateSimpleScanoutWithDirtyRectsAndOptions)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(source), ::core::mem::transmute_copy(surface), subresourceindex, syncinterval, dirtyrects.try_into().map_err(|e| e.into())?.abi(), options, result__.as_mut_ptr()).from_abi::(result__) } } } @@ -1219,22 +1200,16 @@ impl DisplayManager { (::windows::core::Vtable::vtable(this).GetCurrentAdapters)(::windows::core::Vtable::as_raw(this), result__.as_mut_ptr()).from_abi::>(result__) } } - pub fn TryAcquireTarget<'a, P0>(&self, target: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, DisplayTarget>>, - { + pub fn TryAcquireTarget(&self, target: &DisplayTarget) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).TryAcquireTarget)(::windows::core::Vtable::as_raw(this), target.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).TryAcquireTarget)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(target), result__.as_mut_ptr()).from_abi::(result__) } } - pub fn ReleaseTarget<'a, P0>(&self, target: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, DisplayTarget>>, - { + pub fn ReleaseTarget(&self, target: &DisplayTarget) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).ReleaseTarget)(::windows::core::Vtable::as_raw(this), target.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).ReleaseTarget)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(target)).ok() } } pub fn TryReadCurrentStateForAllTargets(&self) -> ::windows::core::Result { let this = self; @@ -1271,38 +1246,31 @@ impl DisplayManager { } #[doc = "*Required features: `\"Foundation_Collections\"`*"] #[cfg(feature = "Foundation_Collections")] - pub fn TryAcquireTargetsAndCreateSubstate<'a, P0, P1, E1>(&self, existingstate: P0, targets: P1) -> ::windows::core::Result + pub fn TryAcquireTargetsAndCreateSubstate<'a, P0, E0>(&self, existingstate: &DisplayState, targets: P0) -> ::windows::core::Result where - P0: ::std::convert::Into<::windows::core::InParam<'a, DisplayState>>, - P1: ::std::convert::TryInto<::windows::core::InParam<'a, super::super::super::Foundation::Collections::IIterable>, Error = E1>, - E1: ::std::convert::Into<::windows::core::Error>, + P0: ::std::convert::TryInto<::windows::core::InParam<'a, super::super::super::Foundation::Collections::IIterable>, Error = E0>, + E0: ::std::convert::Into<::windows::core::Error>, { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).TryAcquireTargetsAndCreateSubstate)(::windows::core::Vtable::as_raw(this), existingstate.into().abi(), targets.try_into().map_err(|e| e.into())?.abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).TryAcquireTargetsAndCreateSubstate)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(existingstate), targets.try_into().map_err(|e| e.into())?.abi(), result__.as_mut_ptr()).from_abi::(result__) } } - pub fn CreateDisplayDevice<'a, P0>(&self, adapter: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, DisplayAdapter>>, - { + pub fn CreateDisplayDevice(&self, adapter: &DisplayAdapter) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).CreateDisplayDevice)(::windows::core::Vtable::as_raw(this), adapter.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).CreateDisplayDevice)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(adapter), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn Enabled<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Foundation::TypedEventHandler>>, - { + pub fn Enabled(&self, handler: &super::super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).Enabled)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).Enabled)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -1313,14 +1281,11 @@ impl DisplayManager { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn Disabled<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Foundation::TypedEventHandler>>, - { + pub fn Disabled(&self, handler: &super::super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).Disabled)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).Disabled)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -1331,14 +1296,11 @@ impl DisplayManager { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn Changed<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Foundation::TypedEventHandler>>, - { + pub fn Changed(&self, handler: &super::super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).Changed)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).Changed)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -1349,14 +1311,11 @@ impl DisplayManager { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn PathsFailedOrInvalidated<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Foundation::TypedEventHandler>>, - { + pub fn PathsFailedOrInvalidated(&self, handler: &super::super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).PathsFailedOrInvalidated)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).PathsFailedOrInvalidated)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -1978,14 +1937,11 @@ impl DisplayModeInfo { (::windows::core::Vtable::vtable(this).GetWireFormatSupportedBitsPerChannel)(::windows::core::Vtable::as_raw(this), encoding, result__.as_mut_ptr()).from_abi::(result__) } } - pub fn IsWireFormatSupported<'a, P0>(&self, wireformat: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, DisplayWireFormat>>, - { + pub fn IsWireFormatSupported(&self, wireformat: &DisplayWireFormat) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).IsWireFormatSupported)(::windows::core::Vtable::as_raw(this), wireformat.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).IsWireFormatSupported)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(wireformat), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation_Collections\"`*"] @@ -2205,12 +2161,9 @@ impl DisplayPath { (::windows::core::Vtable::vtable(this).WireFormat)(::windows::core::Vtable::as_raw(this), result__.as_mut_ptr()).from_abi::(result__) } } - pub fn SetWireFormat<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, DisplayWireFormat>>, - { + pub fn SetWireFormat(&self, value: &DisplayWireFormat) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).SetWireFormat)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetWireFormat)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } pub fn Rotation(&self) -> ::windows::core::Result { let this = self; @@ -2243,12 +2196,9 @@ impl DisplayPath { (::windows::core::Vtable::vtable(this).FindModes)(::windows::core::Vtable::as_raw(this), flags, result__.as_mut_ptr()).from_abi::>(result__) } } - pub fn ApplyPropertiesFromMode<'a, P0>(&self, moderesult: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, DisplayModeInfo>>, - { + pub fn ApplyPropertiesFromMode(&self, moderesult: &DisplayModeInfo) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).ApplyPropertiesFromMode)(::windows::core::Vtable::as_raw(this), moderesult.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).ApplyPropertiesFromMode)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(moderesult)).ok() } } #[doc = "*Required features: `\"Foundation_Collections\"`*"] #[cfg(feature = "Foundation_Collections")] @@ -2605,14 +2555,11 @@ impl DisplaySource { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn StatusChanged<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Foundation::TypedEventHandler>>, - { + pub fn StatusChanged(&self, handler: &super::super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = &::windows::core::Interface::cast::(self)?; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).StatusChanged)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).StatusChanged)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -2731,64 +2678,44 @@ impl DisplayState { (::windows::core::Vtable::vtable(this).Properties)(::windows::core::Vtable::as_raw(this), result__.as_mut_ptr()).from_abi::>(result__) } } - pub fn ConnectTarget<'a, P0>(&self, target: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, DisplayTarget>>, - { + pub fn ConnectTarget(&self, target: &DisplayTarget) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).ConnectTarget)(::windows::core::Vtable::as_raw(this), target.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).ConnectTarget)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(target), result__.as_mut_ptr()).from_abi::(result__) } } - pub fn ConnectTargetToView<'a, P0, P1>(&self, target: P0, view: P1) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, DisplayTarget>>, - P1: ::std::convert::Into<::windows::core::InParam<'a, DisplayView>>, - { + pub fn ConnectTargetToView(&self, target: &DisplayTarget, view: &DisplayView) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).ConnectTargetToView)(::windows::core::Vtable::as_raw(this), target.into().abi(), view.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).ConnectTargetToView)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(target), ::core::mem::transmute_copy(view), result__.as_mut_ptr()).from_abi::(result__) } } - pub fn CanConnectTargetToView<'a, P0, P1>(&self, target: P0, view: P1) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, DisplayTarget>>, - P1: ::std::convert::Into<::windows::core::InParam<'a, DisplayView>>, - { + pub fn CanConnectTargetToView(&self, target: &DisplayTarget, view: &DisplayView) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).CanConnectTargetToView)(::windows::core::Vtable::as_raw(this), target.into().abi(), view.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).CanConnectTargetToView)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(target), ::core::mem::transmute_copy(view), result__.as_mut_ptr()).from_abi::(result__) } } - pub fn GetViewForTarget<'a, P0>(&self, target: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, DisplayTarget>>, - { + pub fn GetViewForTarget(&self, target: &DisplayTarget) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).GetViewForTarget)(::windows::core::Vtable::as_raw(this), target.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).GetViewForTarget)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(target), result__.as_mut_ptr()).from_abi::(result__) } } - pub fn GetPathForTarget<'a, P0>(&self, target: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, DisplayTarget>>, - { + pub fn GetPathForTarget(&self, target: &DisplayTarget) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).GetPathForTarget)(::windows::core::Vtable::as_raw(this), target.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).GetPathForTarget)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(target), result__.as_mut_ptr()).from_abi::(result__) } } - pub fn DisconnectTarget<'a, P0>(&self, target: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, DisplayTarget>>, - { + pub fn DisconnectTarget(&self, target: &DisplayTarget) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).DisconnectTarget)(::windows::core::Vtable::as_raw(this), target.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).DisconnectTarget)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(target)).ok() } } pub fn TryFunctionalize(&self, options: DisplayStateFunctionalizeOptions) -> ::windows::core::Result { let this = self; @@ -3117,24 +3044,18 @@ impl DisplayTarget { (::windows::core::Vtable::vtable(this).IsStale)(::windows::core::Vtable::as_raw(this), result__.as_mut_ptr()).from_abi::(result__) } } - pub fn IsSame<'a, P0>(&self, othertarget: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, DisplayTarget>>, - { + pub fn IsSame(&self, othertarget: &DisplayTarget) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).IsSame)(::windows::core::Vtable::as_raw(this), othertarget.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).IsSame)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(othertarget), result__.as_mut_ptr()).from_abi::(result__) } } - pub fn IsEqual<'a, P0>(&self, othertarget: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, DisplayTarget>>, - { + pub fn IsEqual(&self, othertarget: &DisplayTarget) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).IsEqual)(::windows::core::Vtable::as_raw(this), othertarget.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).IsEqual)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(othertarget), result__.as_mut_ptr()).from_abi::(result__) } } } @@ -3206,26 +3127,17 @@ unsafe impl ::core::marker::Sync for DisplayTarget {} #[repr(transparent)] pub struct DisplayTask(::windows::core::IUnknown); impl DisplayTask { - pub fn SetScanout<'a, P0>(&self, scanout: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, DisplayScanout>>, - { + pub fn SetScanout(&self, scanout: &DisplayScanout) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).SetScanout)(::windows::core::Vtable::as_raw(this), scanout.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetScanout)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(scanout)).ok() } } - pub fn SetWait<'a, P0>(&self, readyfence: P0, readyfencevalue: u64) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, DisplayFence>>, - { + pub fn SetWait(&self, readyfence: &DisplayFence, readyfencevalue: u64) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).SetWait)(::windows::core::Vtable::as_raw(this), readyfence.into().abi(), readyfencevalue).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetWait)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(readyfence), readyfencevalue).ok() } } - pub fn SetSignal<'a, P0>(&self, signalkind: DisplayTaskSignalKind, fence: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, DisplayFence>>, - { + pub fn SetSignal(&self, signalkind: DisplayTaskSignalKind, fence: &DisplayFence) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).SetSignal)(::windows::core::Vtable::as_raw(this), signalkind, fence.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetSignal)(::windows::core::Vtable::as_raw(this), signalkind, ::core::mem::transmute_copy(fence)).ok() } } } impl ::core::clone::Clone for DisplayTask { @@ -3305,21 +3217,15 @@ impl DisplayTaskPool { } #[doc = "*Required features: `\"deprecated\"`*"] #[cfg(feature = "deprecated")] - pub fn ExecuteTask<'a, P0>(&self, task: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, DisplayTask>>, - { + pub fn ExecuteTask(&self, task: &DisplayTask) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).ExecuteTask)(::windows::core::Vtable::as_raw(this), task.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).ExecuteTask)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(task)).ok() } } - pub fn TryExecuteTask<'a, P0>(&self, task: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, DisplayTask>>, - { + pub fn TryExecuteTask(&self, task: &DisplayTask) -> ::windows::core::Result { let this = &::windows::core::Interface::cast::(self)?; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).TryExecuteTask)(::windows::core::Vtable::as_raw(this), task.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).TryExecuteTask)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(task), result__.as_mut_ptr()).from_abi::(result__) } } } @@ -3509,12 +3415,9 @@ impl DisplayView { let this = self; unsafe { (::windows::core::Vtable::vtable(this).SetContentResolution)(::windows::core::Vtable::as_raw(this), value.try_into().map_err(|e| e.into())?.abi()).ok() } } - pub fn SetPrimaryPath<'a, P0>(&self, path: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, DisplayPath>>, - { + pub fn SetPrimaryPath(&self, path: &DisplayPath) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).SetPrimaryPath)(::windows::core::Vtable::as_raw(this), path.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetPrimaryPath)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(path)).ok() } } #[doc = "*Required features: `\"Foundation_Collections\"`*"] #[cfg(feature = "Foundation_Collections")] diff --git a/crates/libs/windows/src/Windows/Devices/Enumeration/Pnp/mod.rs b/crates/libs/windows/src/Windows/Devices/Enumeration/Pnp/mod.rs index 61dd96fdb5..e41e27ed83 100644 --- a/crates/libs/windows/src/Windows/Devices/Enumeration/Pnp/mod.rs +++ b/crates/libs/windows/src/Windows/Devices/Enumeration/Pnp/mod.rs @@ -157,12 +157,9 @@ impl PnpObject { (::windows::core::Vtable::vtable(this).Properties)(::windows::core::Vtable::as_raw(this), result__.as_mut_ptr()).from_abi::>(result__) } } - pub fn Update<'a, P0>(&self, updateinfo: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, PnpObjectUpdate>>, - { + pub fn Update(&self, updateinfo: &PnpObjectUpdate) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).Update)(::windows::core::Vtable::as_raw(this), updateinfo.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).Update)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(updateinfo)).ok() } } #[doc = "*Required features: `\"Foundation_Collections\"`*"] #[cfg(feature = "Foundation_Collections")] @@ -329,14 +326,11 @@ impl PnpObjectCollection { } #[doc = "*Required features: `\"Foundation_Collections\"`*"] #[cfg(feature = "Foundation_Collections")] - pub fn IndexOf<'a, P0>(&self, value: P0, index: &mut u32) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, PnpObject>>, - { + pub fn IndexOf(&self, value: &PnpObject, index: &mut u32) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).IndexOf)(::windows::core::Vtable::as_raw(this), value.into().abi(), index, result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).IndexOf)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value), index, result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation_Collections\"`*"] @@ -587,14 +581,11 @@ pub struct PnpObjectWatcher(::windows::core::IUnknown); impl PnpObjectWatcher { #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn Added<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Foundation::TypedEventHandler>>, - { + pub fn Added(&self, handler: &super::super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).Added)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).Added)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -605,14 +596,11 @@ impl PnpObjectWatcher { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn Updated<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Foundation::TypedEventHandler>>, - { + pub fn Updated(&self, handler: &super::super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).Updated)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).Updated)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -623,14 +611,11 @@ impl PnpObjectWatcher { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn Removed<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Foundation::TypedEventHandler>>, - { + pub fn Removed(&self, handler: &super::super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).Removed)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).Removed)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -641,14 +626,11 @@ impl PnpObjectWatcher { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn EnumerationCompleted<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Foundation::TypedEventHandler>>, - { + pub fn EnumerationCompleted(&self, handler: &super::super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).EnumerationCompleted)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).EnumerationCompleted)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -659,14 +641,11 @@ impl PnpObjectWatcher { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn Stopped<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Foundation::TypedEventHandler>>, - { + pub fn Stopped(&self, handler: &super::super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).Stopped)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).Stopped)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] diff --git a/crates/libs/windows/src/Windows/Devices/Enumeration/mod.rs b/crates/libs/windows/src/Windows/Devices/Enumeration/mod.rs index 5f18b0fcf2..c0c578dc01 100644 --- a/crates/libs/windows/src/Windows/Devices/Enumeration/mod.rs +++ b/crates/libs/windows/src/Windows/Devices/Enumeration/mod.rs @@ -900,14 +900,11 @@ pub struct DeviceAccessInformation(::windows::core::IUnknown); impl DeviceAccessInformation { #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn AccessChanged<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn AccessChanged(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).AccessChanged)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).AccessChanged)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -1211,12 +1208,9 @@ impl DeviceInformation { (::windows::core::Vtable::vtable(this).Properties)(::windows::core::Vtable::as_raw(this), result__.as_mut_ptr()).from_abi::>(result__) } } - pub fn Update<'a, P0>(&self, updateinfo: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, DeviceInformationUpdate>>, - { + pub fn Update(&self, updateinfo: &DeviceInformationUpdate) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).Update)(::windows::core::Vtable::as_raw(this), updateinfo.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).Update)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(updateinfo)).ok() } } #[doc = "*Required features: `\"Foundation\"`, `\"Storage_Streams\"`*"] #[cfg(all(feature = "Foundation", feature = "Storage_Streams"))] @@ -1488,14 +1482,11 @@ impl DeviceInformationCollection { } #[doc = "*Required features: `\"Foundation_Collections\"`*"] #[cfg(feature = "Foundation_Collections")] - pub fn IndexOf<'a, P0>(&self, value: P0, index: &mut u32) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, DeviceInformation>>, - { + pub fn IndexOf(&self, value: &DeviceInformation, index: &mut u32) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).IndexOf)(::windows::core::Vtable::as_raw(this), value.into().abi(), index, result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).IndexOf)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value), index, result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation_Collections\"`*"] @@ -1685,14 +1676,11 @@ impl DeviceInformationCustomPairing { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn PairingRequested<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn PairingRequested(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).PairingRequested)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).PairingRequested)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -2061,12 +2049,9 @@ impl DevicePairingRequestedEventArgs { } #[doc = "*Required features: `\"Security_Credentials\"`*"] #[cfg(feature = "Security_Credentials")] - pub fn AcceptWithPasswordCredential<'a, P0>(&self, passwordcredential: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Security::Credentials::PasswordCredential>>, - { + pub fn AcceptWithPasswordCredential(&self, passwordcredential: &super::super::Security::Credentials::PasswordCredential) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).AcceptWithPasswordCredential)(::windows::core::Vtable::as_raw(this), passwordcredential.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).AcceptWithPasswordCredential)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(passwordcredential)).ok() } } } impl ::core::clone::Clone for DevicePairingRequestedEventArgs { @@ -2252,14 +2237,11 @@ impl DevicePicker { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn DeviceSelected<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn DeviceSelected(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).DeviceSelected)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).DeviceSelected)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -2270,14 +2252,11 @@ impl DevicePicker { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn DisconnectButtonClicked<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn DisconnectButtonClicked(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).DisconnectButtonClicked)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).DisconnectButtonClicked)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -2288,14 +2267,11 @@ impl DevicePicker { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn DevicePickerDismissed<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn DevicePickerDismissed(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).DevicePickerDismissed)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).DevicePickerDismissed)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -2338,12 +2314,9 @@ impl DevicePicker { let this = self; unsafe { (::windows::core::Vtable::vtable(this).Hide)(::windows::core::Vtable::as_raw(this)).ok() } } - pub fn SetDisplayStatus<'a, P0>(&self, device: P0, status: &::windows::core::HSTRING, options: DevicePickerDisplayStatusOptions) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, DeviceInformation>>, - { + pub fn SetDisplayStatus(&self, device: &DeviceInformation, status: &::windows::core::HSTRING, options: DevicePickerDisplayStatusOptions) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).SetDisplayStatus)(::windows::core::Vtable::as_raw(this), device.into().abi(), ::core::mem::transmute_copy(status), options).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetDisplayStatus)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(device), ::core::mem::transmute_copy(status), options).ok() } } } impl ::core::clone::Clone for DevicePicker { @@ -3169,14 +3142,11 @@ pub struct DeviceWatcher(::windows::core::IUnknown); impl DeviceWatcher { #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn Added<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn Added(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).Added)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).Added)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -3187,14 +3157,11 @@ impl DeviceWatcher { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn Updated<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn Updated(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).Updated)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).Updated)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -3205,14 +3172,11 @@ impl DeviceWatcher { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn Removed<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn Removed(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).Removed)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).Removed)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -3223,14 +3187,11 @@ impl DeviceWatcher { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn EnumerationCompleted<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn EnumerationCompleted(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).EnumerationCompleted)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).EnumerationCompleted)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -3241,14 +3202,11 @@ impl DeviceWatcher { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn Stopped<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn Stopped(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).Stopped)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).Stopped)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] diff --git a/crates/libs/windows/src/Windows/Devices/Geolocation/Geofencing/mod.rs b/crates/libs/windows/src/Windows/Devices/Geolocation/Geofencing/mod.rs index fd5bd8e813..c4a586881e 100644 --- a/crates/libs/windows/src/Windows/Devices/Geolocation/Geofencing/mod.rs +++ b/crates/libs/windows/src/Windows/Devices/Geolocation/Geofencing/mod.rs @@ -327,14 +327,11 @@ impl GeofenceMonitor { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn GeofenceStateChanged<'a, P0>(&self, eventhandler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Foundation::TypedEventHandler>>, - { + pub fn GeofenceStateChanged(&self, eventhandler: &super::super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).GeofenceStateChanged)(::windows::core::Vtable::as_raw(this), eventhandler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).GeofenceStateChanged)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(eventhandler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -354,14 +351,11 @@ impl GeofenceMonitor { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn StatusChanged<'a, P0>(&self, eventhandler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Foundation::TypedEventHandler>>, - { + pub fn StatusChanged(&self, eventhandler: &super::super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).StatusChanged)(::windows::core::Vtable::as_raw(this), eventhandler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).StatusChanged)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(eventhandler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] diff --git a/crates/libs/windows/src/Windows/Devices/Geolocation/mod.rs b/crates/libs/windows/src/Windows/Devices/Geolocation/mod.rs index 995f125066..3f2f900fc4 100644 --- a/crates/libs/windows/src/Windows/Devices/Geolocation/mod.rs +++ b/crates/libs/windows/src/Windows/Devices/Geolocation/mod.rs @@ -1566,14 +1566,11 @@ impl Geolocator { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn PositionChanged<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn PositionChanged(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).PositionChanged)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).PositionChanged)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -1584,14 +1581,11 @@ impl Geolocator { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn StatusChanged<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn StatusChanged(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).StatusChanged)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).StatusChanged)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -2253,14 +2247,11 @@ impl GeovisitMonitor { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn VisitStateChanged<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn VisitStateChanged(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).VisitStateChanged)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).VisitStateChanged)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] diff --git a/crates/libs/windows/src/Windows/Devices/Gpio/Provider/mod.rs b/crates/libs/windows/src/Windows/Devices/Gpio/Provider/mod.rs index 3b75dfc556..4d8b43d6ec 100644 --- a/crates/libs/windows/src/Windows/Devices/Gpio/Provider/mod.rs +++ b/crates/libs/windows/src/Windows/Devices/Gpio/Provider/mod.rs @@ -89,14 +89,11 @@ pub struct IGpioPinProvider(::windows::core::IUnknown); impl IGpioPinProvider { #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn ValueChanged<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Foundation::TypedEventHandler>>, - { + pub fn ValueChanged(&self, handler: &super::super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).ValueChanged)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).ValueChanged)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] diff --git a/crates/libs/windows/src/Windows/Devices/Gpio/mod.rs b/crates/libs/windows/src/Windows/Devices/Gpio/mod.rs index 998fcdbe40..7f9572a7c2 100644 --- a/crates/libs/windows/src/Windows/Devices/Gpio/mod.rs +++ b/crates/libs/windows/src/Windows/Devices/Gpio/mod.rs @@ -259,13 +259,10 @@ impl GpioChangeCounter { (::windows::core::Vtable::vtable(this).Reset)(::windows::core::Vtable::as_raw(this), result__.as_mut_ptr()).from_abi::(result__) } } - pub fn Create<'a, P0>(pin: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, GpioPin>>, - { + pub fn Create(pin: &GpioPin) -> ::windows::core::Result { Self::IGpioChangeCounterFactory(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).Create)(::windows::core::Vtable::as_raw(this), pin.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).Create)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(pin), result__.as_mut_ptr()).from_abi::(result__) }) } #[doc(hidden)] @@ -464,22 +461,16 @@ impl GpioChangeReader { (::windows::core::Vtable::vtable(this).WaitForItemsAsync)(::windows::core::Vtable::as_raw(this), count, result__.as_mut_ptr()).from_abi::(result__) } } - pub fn Create<'a, P0>(pin: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, GpioPin>>, - { + pub fn Create(pin: &GpioPin) -> ::windows::core::Result { Self::IGpioChangeReaderFactory(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).Create)(::windows::core::Vtable::as_raw(this), pin.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).Create)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(pin), result__.as_mut_ptr()).from_abi::(result__) }) } - pub fn CreateWithCapacity<'a, P0>(pin: P0, mincapacity: i32) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, GpioPin>>, - { + pub fn CreateWithCapacity(pin: &GpioPin, mincapacity: i32) -> ::windows::core::Result { Self::IGpioChangeReaderFactory(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).CreateWithCapacity)(::windows::core::Vtable::as_raw(this), pin.into().abi(), mincapacity, result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).CreateWithCapacity)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(pin), mincapacity, result__.as_mut_ptr()).from_abi::(result__) }) } #[doc(hidden)] @@ -719,14 +710,11 @@ impl GpioPin { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn ValueChanged<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn ValueChanged(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).ValueChanged)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).ValueChanged)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] diff --git a/crates/libs/windows/src/Windows/Devices/Haptics/mod.rs b/crates/libs/windows/src/Windows/Devices/Haptics/mod.rs index dbb4fb06e5..f76c6f3211 100644 --- a/crates/libs/windows/src/Windows/Devices/Haptics/mod.rs +++ b/crates/libs/windows/src/Windows/Devices/Haptics/mod.rs @@ -300,37 +300,25 @@ impl SimpleHapticsController { let this = self; unsafe { (::windows::core::Vtable::vtable(this).StopFeedback)(::windows::core::Vtable::as_raw(this)).ok() } } - pub fn SendHapticFeedback<'a, P0>(&self, feedback: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, SimpleHapticsControllerFeedback>>, - { + pub fn SendHapticFeedback(&self, feedback: &SimpleHapticsControllerFeedback) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).SendHapticFeedback)(::windows::core::Vtable::as_raw(this), feedback.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SendHapticFeedback)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(feedback)).ok() } } - pub fn SendHapticFeedbackWithIntensity<'a, P0>(&self, feedback: P0, intensity: f64) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, SimpleHapticsControllerFeedback>>, - { + pub fn SendHapticFeedbackWithIntensity(&self, feedback: &SimpleHapticsControllerFeedback, intensity: f64) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).SendHapticFeedbackWithIntensity)(::windows::core::Vtable::as_raw(this), feedback.into().abi(), intensity).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SendHapticFeedbackWithIntensity)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(feedback), intensity).ok() } } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn SendHapticFeedbackForDuration<'a, P0>(&self, feedback: P0, intensity: f64, playduration: super::super::Foundation::TimeSpan) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, SimpleHapticsControllerFeedback>>, - { + pub fn SendHapticFeedbackForDuration(&self, feedback: &SimpleHapticsControllerFeedback, intensity: f64, playduration: super::super::Foundation::TimeSpan) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).SendHapticFeedbackForDuration)(::windows::core::Vtable::as_raw(this), feedback.into().abi(), intensity, playduration).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SendHapticFeedbackForDuration)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(feedback), intensity, playduration).ok() } } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn SendHapticFeedbackForPlayCount<'a, P0>(&self, feedback: P0, intensity: f64, playcount: i32, replaypauseinterval: super::super::Foundation::TimeSpan) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, SimpleHapticsControllerFeedback>>, - { + pub fn SendHapticFeedbackForPlayCount(&self, feedback: &SimpleHapticsControllerFeedback, intensity: f64, playcount: i32, replaypauseinterval: super::super::Foundation::TimeSpan) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).SendHapticFeedbackForPlayCount)(::windows::core::Vtable::as_raw(this), feedback.into().abi(), intensity, playcount, replaypauseinterval).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SendHapticFeedbackForPlayCount)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(feedback), intensity, playcount, replaypauseinterval).ok() } } } impl ::core::clone::Clone for SimpleHapticsController { diff --git a/crates/libs/windows/src/Windows/Devices/HumanInterfaceDevice/mod.rs b/crates/libs/windows/src/Windows/Devices/HumanInterfaceDevice/mod.rs index c8c3752fc1..d91194f1d9 100644 --- a/crates/libs/windows/src/Windows/Devices/HumanInterfaceDevice/mod.rs +++ b/crates/libs/windows/src/Windows/Devices/HumanInterfaceDevice/mod.rs @@ -749,26 +749,20 @@ impl HidDevice { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn SendOutputReportAsync<'a, P0>(&self, outputreport: P0) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, HidOutputReport>>, - { + pub fn SendOutputReportAsync(&self, outputreport: &HidOutputReport) -> ::windows::core::Result> { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).SendOutputReportAsync)(::windows::core::Vtable::as_raw(this), outputreport.into().abi(), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).SendOutputReportAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(outputreport), result__.as_mut_ptr()).from_abi::>(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn SendFeatureReportAsync<'a, P0>(&self, featurereport: P0) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, HidFeatureReport>>, - { + pub fn SendFeatureReportAsync(&self, featurereport: &HidFeatureReport) -> ::windows::core::Result> { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).SendFeatureReportAsync)(::windows::core::Vtable::as_raw(this), featurereport.into().abi(), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).SendFeatureReportAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(featurereport), result__.as_mut_ptr()).from_abi::>(result__) } } #[doc = "*Required features: `\"Foundation_Collections\"`*"] @@ -791,14 +785,11 @@ impl HidDevice { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn InputReportReceived<'a, P0>(&self, reporthandler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn InputReportReceived(&self, reporthandler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).InputReportReceived)(::windows::core::Vtable::as_raw(this), reporthandler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).InputReportReceived)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(reporthandler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -956,14 +947,11 @@ impl HidFeatureReport { (::windows::core::Vtable::vtable(this).GetBooleanControl)(::windows::core::Vtable::as_raw(this), usagepage, usageid, result__.as_mut_ptr()).from_abi::(result__) } } - pub fn GetBooleanControlByDescription<'a, P0>(&self, controldescription: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, HidBooleanControlDescription>>, - { + pub fn GetBooleanControlByDescription(&self, controldescription: &HidBooleanControlDescription) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).GetBooleanControlByDescription)(::windows::core::Vtable::as_raw(this), controldescription.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).GetBooleanControlByDescription)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(controldescription), result__.as_mut_ptr()).from_abi::(result__) } } pub fn GetNumericControl(&self, usagepage: u16, usageid: u16) -> ::windows::core::Result { @@ -973,14 +961,11 @@ impl HidFeatureReport { (::windows::core::Vtable::vtable(this).GetNumericControl)(::windows::core::Vtable::as_raw(this), usagepage, usageid, result__.as_mut_ptr()).from_abi::(result__) } } - pub fn GetNumericControlByDescription<'a, P0>(&self, controldescription: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, HidNumericControlDescription>>, - { + pub fn GetNumericControlByDescription(&self, controldescription: &HidNumericControlDescription) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).GetNumericControlByDescription)(::windows::core::Vtable::as_raw(this), controldescription.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).GetNumericControlByDescription)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(controldescription), result__.as_mut_ptr()).from_abi::(result__) } } } @@ -1093,14 +1078,11 @@ impl HidInputReport { (::windows::core::Vtable::vtable(this).GetBooleanControl)(::windows::core::Vtable::as_raw(this), usagepage, usageid, result__.as_mut_ptr()).from_abi::(result__) } } - pub fn GetBooleanControlByDescription<'a, P0>(&self, controldescription: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, HidBooleanControlDescription>>, - { + pub fn GetBooleanControlByDescription(&self, controldescription: &HidBooleanControlDescription) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).GetBooleanControlByDescription)(::windows::core::Vtable::as_raw(this), controldescription.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).GetBooleanControlByDescription)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(controldescription), result__.as_mut_ptr()).from_abi::(result__) } } pub fn GetNumericControl(&self, usagepage: u16, usageid: u16) -> ::windows::core::Result { @@ -1110,14 +1092,11 @@ impl HidInputReport { (::windows::core::Vtable::vtable(this).GetNumericControl)(::windows::core::Vtable::as_raw(this), usagepage, usageid, result__.as_mut_ptr()).from_abi::(result__) } } - pub fn GetNumericControlByDescription<'a, P0>(&self, controldescription: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, HidNumericControlDescription>>, - { + pub fn GetNumericControlByDescription(&self, controldescription: &HidNumericControlDescription) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).GetNumericControlByDescription)(::windows::core::Vtable::as_raw(this), controldescription.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).GetNumericControlByDescription)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(controldescription), result__.as_mut_ptr()).from_abi::(result__) } } } @@ -1607,14 +1586,11 @@ impl HidOutputReport { (::windows::core::Vtable::vtable(this).GetBooleanControl)(::windows::core::Vtable::as_raw(this), usagepage, usageid, result__.as_mut_ptr()).from_abi::(result__) } } - pub fn GetBooleanControlByDescription<'a, P0>(&self, controldescription: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, HidBooleanControlDescription>>, - { + pub fn GetBooleanControlByDescription(&self, controldescription: &HidBooleanControlDescription) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).GetBooleanControlByDescription)(::windows::core::Vtable::as_raw(this), controldescription.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).GetBooleanControlByDescription)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(controldescription), result__.as_mut_ptr()).from_abi::(result__) } } pub fn GetNumericControl(&self, usagepage: u16, usageid: u16) -> ::windows::core::Result { @@ -1624,14 +1600,11 @@ impl HidOutputReport { (::windows::core::Vtable::vtable(this).GetNumericControl)(::windows::core::Vtable::as_raw(this), usagepage, usageid, result__.as_mut_ptr()).from_abi::(result__) } } - pub fn GetNumericControlByDescription<'a, P0>(&self, controldescription: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, HidNumericControlDescription>>, - { + pub fn GetNumericControlByDescription(&self, controldescription: &HidNumericControlDescription) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).GetNumericControlByDescription)(::windows::core::Vtable::as_raw(this), controldescription.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).GetNumericControlByDescription)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(controldescription), result__.as_mut_ptr()).from_abi::(result__) } } } diff --git a/crates/libs/windows/src/Windows/Devices/I2c/Provider/mod.rs b/crates/libs/windows/src/Windows/Devices/I2c/Provider/mod.rs index 98aeb9e6f8..3410cf6038 100644 --- a/crates/libs/windows/src/Windows/Devices/I2c/Provider/mod.rs +++ b/crates/libs/windows/src/Windows/Devices/I2c/Provider/mod.rs @@ -2,14 +2,11 @@ #[repr(transparent)] pub struct II2cControllerProvider(::windows::core::IUnknown); impl II2cControllerProvider { - pub fn GetDeviceProvider<'a, P0>(&self, settings: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, ProviderI2cConnectionSettings>>, - { + pub fn GetDeviceProvider(&self, settings: &ProviderI2cConnectionSettings) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).GetDeviceProvider)(::windows::core::Vtable::as_raw(this), settings.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).GetDeviceProvider)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(settings), result__.as_mut_ptr()).from_abi::(result__) } } } diff --git a/crates/libs/windows/src/Windows/Devices/I2c/mod.rs b/crates/libs/windows/src/Windows/Devices/I2c/mod.rs index a28fb30771..5ad372c8f6 100644 --- a/crates/libs/windows/src/Windows/Devices/I2c/mod.rs +++ b/crates/libs/windows/src/Windows/Devices/I2c/mod.rs @@ -114,14 +114,11 @@ impl II2cDeviceStatics { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn FromIdAsync<'a, P0>(&self, deviceid: &::windows::core::HSTRING, settings: P0) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, I2cConnectionSettings>>, - { + pub fn FromIdAsync(&self, deviceid: &::windows::core::HSTRING, settings: &I2cConnectionSettings) -> ::windows::core::Result> { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).FromIdAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(deviceid), settings.into().abi(), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).FromIdAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(deviceid), ::core::mem::transmute_copy(settings), result__.as_mut_ptr()).from_abi::>(result__) } } } @@ -312,14 +309,11 @@ unsafe impl ::core::marker::Sync for I2cConnectionSettings {} #[repr(transparent)] pub struct I2cController(::windows::core::IUnknown); impl I2cController { - pub fn GetDevice<'a, P0>(&self, settings: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, I2cConnectionSettings>>, - { + pub fn GetDevice(&self, settings: &I2cConnectionSettings) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).GetDevice)(::windows::core::Vtable::as_raw(this), settings.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).GetDevice)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(settings), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Devices_I2c_Provider\"`, `\"Foundation_Collections\"`*"] @@ -483,13 +477,10 @@ impl I2cDevice { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn FromIdAsync<'a, P0>(deviceid: &::windows::core::HSTRING, settings: P0) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, I2cConnectionSettings>>, - { + pub fn FromIdAsync(deviceid: &::windows::core::HSTRING, settings: &I2cConnectionSettings) -> ::windows::core::Result> { Self::II2cDeviceStatics(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).FromIdAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(deviceid), settings.into().abi(), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).FromIdAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(deviceid), ::core::mem::transmute_copy(settings), result__.as_mut_ptr()).from_abi::>(result__) }) } #[doc(hidden)] diff --git a/crates/libs/windows/src/Windows/Devices/Input/Preview/mod.rs b/crates/libs/windows/src/Windows/Devices/Input/Preview/mod.rs index aa2aa1a9b0..822b309dd6 100644 --- a/crates/libs/windows/src/Windows/Devices/Input/Preview/mod.rs +++ b/crates/libs/windows/src/Windows/Devices/Input/Preview/mod.rs @@ -464,14 +464,11 @@ pub struct GazeDeviceWatcherPreview(::windows::core::IUnknown); impl GazeDeviceWatcherPreview { #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn Added<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Foundation::TypedEventHandler>>, - { + pub fn Added(&self, handler: &super::super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).Added)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).Added)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -482,14 +479,11 @@ impl GazeDeviceWatcherPreview { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn Removed<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Foundation::TypedEventHandler>>, - { + pub fn Removed(&self, handler: &super::super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).Removed)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).Removed)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -500,14 +494,11 @@ impl GazeDeviceWatcherPreview { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn Updated<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Foundation::TypedEventHandler>>, - { + pub fn Updated(&self, handler: &super::super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).Updated)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).Updated)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -518,14 +509,11 @@ impl GazeDeviceWatcherPreview { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn EnumerationCompleted<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Foundation::TypedEventHandler>>, - { + pub fn EnumerationCompleted(&self, handler: &super::super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).EnumerationCompleted)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).EnumerationCompleted)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -939,14 +927,11 @@ pub struct GazeInputSourcePreview(::windows::core::IUnknown); impl GazeInputSourcePreview { #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn GazeMoved<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Foundation::TypedEventHandler>>, - { + pub fn GazeMoved(&self, handler: &super::super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).GazeMoved)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).GazeMoved)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -957,14 +942,11 @@ impl GazeInputSourcePreview { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn GazeEntered<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Foundation::TypedEventHandler>>, - { + pub fn GazeEntered(&self, handler: &super::super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).GazeEntered)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).GazeEntered)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -975,14 +957,11 @@ impl GazeInputSourcePreview { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn GazeExited<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Foundation::TypedEventHandler>>, - { + pub fn GazeExited(&self, handler: &super::super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).GazeExited)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).GazeExited)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] diff --git a/crates/libs/windows/src/Windows/Devices/Input/mod.rs b/crates/libs/windows/src/Windows/Devices/Input/mod.rs index 764fc8c64b..3424b4672b 100644 --- a/crates/libs/windows/src/Windows/Devices/Input/mod.rs +++ b/crates/libs/windows/src/Windows/Devices/Input/mod.rs @@ -599,14 +599,11 @@ pub struct MouseDevice(::windows::core::IUnknown); impl MouseDevice { #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn MouseMoved<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn MouseMoved(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).MouseMoved)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).MouseMoved)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -776,14 +773,11 @@ impl PenButtonListener { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn IsSupportedChanged<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn IsSupportedChanged(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).IsSupportedChanged)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).IsSupportedChanged)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -794,14 +788,11 @@ impl PenButtonListener { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn TailButtonClicked<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn TailButtonClicked(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).TailButtonClicked)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).TailButtonClicked)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -812,14 +803,11 @@ impl PenButtonListener { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn TailButtonDoubleClicked<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn TailButtonDoubleClicked(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).TailButtonDoubleClicked)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).TailButtonDoubleClicked)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -830,14 +818,11 @@ impl PenButtonListener { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn TailButtonLongPressed<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn TailButtonLongPressed(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).TailButtonLongPressed)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).TailButtonLongPressed)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -1031,14 +1016,11 @@ impl PenDockListener { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn IsSupportedChanged<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn IsSupportedChanged(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).IsSupportedChanged)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).IsSupportedChanged)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -1049,14 +1031,11 @@ impl PenDockListener { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn Docked<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn Docked(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).Docked)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).Docked)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -1067,14 +1046,11 @@ impl PenDockListener { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn Undocked<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn Undocked(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).Undocked)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).Undocked)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] diff --git a/crates/libs/windows/src/Windows/Devices/Lights/Effects/mod.rs b/crates/libs/windows/src/Windows/Devices/Lights/Effects/mod.rs index b56347030a..0d03343fbb 100644 --- a/crates/libs/windows/src/Windows/Devices/Lights/Effects/mod.rs +++ b/crates/libs/windows/src/Windows/Devices/Lights/Effects/mod.rs @@ -556,14 +556,11 @@ impl LampArrayBitmapEffect { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn BitmapRequested<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Foundation::TypedEventHandler>>, - { + pub fn BitmapRequested(&self, handler: &super::super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).BitmapRequested)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).BitmapRequested)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -572,13 +569,10 @@ impl LampArrayBitmapEffect { let this = self; unsafe { (::windows::core::Vtable::vtable(this).RemoveBitmapRequested)(::windows::core::Vtable::as_raw(this), token).ok() } } - pub fn CreateInstance<'a, P0>(lamparray: P0, lampindexes: &[i32]) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::LampArray>>, - { + pub fn CreateInstance(lamparray: &super::LampArray, lampindexes: &[i32]) -> ::windows::core::Result { Self::ILampArrayBitmapEffectFactory(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).CreateInstance)(::windows::core::Vtable::as_raw(this), lamparray.into().abi(), lampindexes.len() as u32, lampindexes.as_ptr(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).CreateInstance)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(lamparray), lampindexes.len() as u32, lampindexes.as_ptr(), result__.as_mut_ptr()).from_abi::(result__) }) } pub fn ZIndex(&self) -> ::windows::core::Result { @@ -696,12 +690,9 @@ impl LampArrayBitmapRequestedEventArgs { } #[doc = "*Required features: `\"Graphics_Imaging\"`*"] #[cfg(feature = "Graphics_Imaging")] - pub fn UpdateBitmap<'a, P0>(&self, bitmap: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Graphics::Imaging::SoftwareBitmap>>, - { + pub fn UpdateBitmap(&self, bitmap: &super::super::super::Graphics::Imaging::SoftwareBitmap) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).UpdateBitmap)(::windows::core::Vtable::as_raw(this), bitmap.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).UpdateBitmap)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(bitmap)).ok() } } } impl ::core::clone::Clone for LampArrayBitmapRequestedEventArgs { @@ -884,13 +875,10 @@ impl LampArrayBlinkEffect { let this = self; unsafe { (::windows::core::Vtable::vtable(this).SetRepetitionMode)(::windows::core::Vtable::as_raw(this), value).ok() } } - pub fn CreateInstance<'a, P0>(lamparray: P0, lampindexes: &[i32]) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::LampArray>>, - { + pub fn CreateInstance(lamparray: &super::LampArray, lampindexes: &[i32]) -> ::windows::core::Result { Self::ILampArrayBlinkEffectFactory(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).CreateInstance)(::windows::core::Vtable::as_raw(this), lamparray.into().abi(), lampindexes.len() as u32, lampindexes.as_ptr(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).CreateInstance)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(lamparray), lampindexes.len() as u32, lampindexes.as_ptr(), result__.as_mut_ptr()).from_abi::(result__) }) } pub fn ZIndex(&self) -> ::windows::core::Result { @@ -1053,13 +1041,10 @@ impl LampArrayColorRampEffect { let this = self; unsafe { (::windows::core::Vtable::vtable(this).SetCompletionBehavior)(::windows::core::Vtable::as_raw(this), value).ok() } } - pub fn CreateInstance<'a, P0>(lamparray: P0, lampindexes: &[i32]) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::LampArray>>, - { + pub fn CreateInstance(lamparray: &super::LampArray, lampindexes: &[i32]) -> ::windows::core::Result { Self::ILampArrayColorRampEffectFactory(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).CreateInstance)(::windows::core::Vtable::as_raw(this), lamparray.into().abi(), lampindexes.len() as u32, lampindexes.as_ptr(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).CreateInstance)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(lamparray), lampindexes.len() as u32, lampindexes.as_ptr(), result__.as_mut_ptr()).from_abi::(result__) }) } pub fn ZIndex(&self) -> ::windows::core::Result { @@ -1198,14 +1183,11 @@ impl LampArrayCustomEffect { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn UpdateRequested<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Foundation::TypedEventHandler>>, - { + pub fn UpdateRequested(&self, handler: &super::super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).UpdateRequested)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).UpdateRequested)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -1214,13 +1196,10 @@ impl LampArrayCustomEffect { let this = self; unsafe { (::windows::core::Vtable::vtable(this).RemoveUpdateRequested)(::windows::core::Vtable::as_raw(this), token).ok() } } - pub fn CreateInstance<'a, P0>(lamparray: P0, lampindexes: &[i32]) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::LampArray>>, - { + pub fn CreateInstance(lamparray: &super::LampArray, lampindexes: &[i32]) -> ::windows::core::Result { Self::ILampArrayCustomEffectFactory(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).CreateInstance)(::windows::core::Vtable::as_raw(this), lamparray.into().abi(), lampindexes.len() as u32, lampindexes.as_ptr(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).CreateInstance)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(lamparray), lampindexes.len() as u32, lampindexes.as_ptr(), result__.as_mut_ptr()).from_abi::(result__) }) } pub fn ZIndex(&self) -> ::windows::core::Result { @@ -1668,13 +1647,10 @@ impl LampArraySolidEffect { let this = self; unsafe { (::windows::core::Vtable::vtable(this).SetCompletionBehavior)(::windows::core::Vtable::as_raw(this), value).ok() } } - pub fn CreateInstance<'a, P0>(lamparray: P0, lampindexes: &[i32]) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::LampArray>>, - { + pub fn CreateInstance(lamparray: &super::LampArray, lampindexes: &[i32]) -> ::windows::core::Result { Self::ILampArraySolidEffectFactory(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).CreateInstance)(::windows::core::Vtable::as_raw(this), lamparray.into().abi(), lampindexes.len() as u32, lampindexes.as_ptr(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).CreateInstance)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(lamparray), lampindexes.len() as u32, lampindexes.as_ptr(), result__.as_mut_ptr()).from_abi::(result__) }) } #[doc(hidden)] diff --git a/crates/libs/windows/src/Windows/Devices/Lights/mod.rs b/crates/libs/windows/src/Windows/Devices/Lights/mod.rs index 0dda1aef0e..82f3eb72f2 100644 --- a/crates/libs/windows/src/Windows/Devices/Lights/mod.rs +++ b/crates/libs/windows/src/Windows/Devices/Lights/mod.rs @@ -268,14 +268,11 @@ impl Lamp { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn AvailabilityChanged<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn AvailabilityChanged(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).AvailabilityChanged)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).AvailabilityChanged)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] diff --git a/crates/libs/windows/src/Windows/Devices/Midi/mod.rs b/crates/libs/windows/src/Windows/Devices/Midi/mod.rs index 34ec205005..df0d0fbb76 100644 --- a/crates/libs/windows/src/Windows/Devices/Midi/mod.rs +++ b/crates/libs/windows/src/Windows/Devices/Midi/mod.rs @@ -1216,14 +1216,11 @@ impl MidiInPort { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn MessageReceived<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn MessageReceived(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).MessageReceived)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).MessageReceived)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -2859,24 +2856,18 @@ impl MidiSynthesizer { } #[doc = "*Required features: `\"Devices_Enumeration\"`, `\"Foundation\"`*"] #[cfg(all(feature = "Devices_Enumeration", feature = "Foundation"))] - pub fn CreateFromAudioDeviceAsync<'a, P0>(audiodevice: P0) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::Enumeration::DeviceInformation>>, - { + pub fn CreateFromAudioDeviceAsync(audiodevice: &super::Enumeration::DeviceInformation) -> ::windows::core::Result> { Self::IMidiSynthesizerStatics(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).CreateFromAudioDeviceAsync)(::windows::core::Vtable::as_raw(this), audiodevice.into().abi(), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).CreateFromAudioDeviceAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(audiodevice), result__.as_mut_ptr()).from_abi::>(result__) }) } #[doc = "*Required features: `\"Devices_Enumeration\"`*"] #[cfg(feature = "Devices_Enumeration")] - pub fn IsSynthesizer<'a, P0>(mididevice: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::Enumeration::DeviceInformation>>, - { + pub fn IsSynthesizer(mididevice: &super::Enumeration::DeviceInformation) -> ::windows::core::Result { Self::IMidiSynthesizerStatics(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).IsSynthesizer)(::windows::core::Vtable::as_raw(this), mididevice.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).IsSynthesizer)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(mididevice), result__.as_mut_ptr()).from_abi::(result__) }) } #[doc(hidden)] diff --git a/crates/libs/windows/src/Windows/Devices/Perception/Provider/mod.rs b/crates/libs/windows/src/Windows/Devices/Perception/Provider/mod.rs index ff8189b6cc..92f6014a3b 100644 --- a/crates/libs/windows/src/Windows/Devices/Perception/Provider/mod.rs +++ b/crates/libs/windows/src/Windows/Devices/Perception/Provider/mod.rs @@ -293,12 +293,9 @@ impl IPerceptionFrameProvider { } #[doc = "*Required features: `\"deprecated\"`*"] #[cfg(feature = "deprecated")] - pub fn SetProperty<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, PerceptionPropertyChangeRequest>>, - { + pub fn SetProperty(&self, value: &PerceptionPropertyChangeRequest) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).SetProperty)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetProperty)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] @@ -497,14 +494,11 @@ pub struct IPerceptionFrameProviderManager(::windows::core::IUnknown); impl IPerceptionFrameProviderManager { #[doc = "*Required features: `\"deprecated\"`*"] #[cfg(feature = "deprecated")] - pub fn GetFrameProvider<'a, P0>(&self, frameproviderinfo: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, PerceptionFrameProviderInfo>>, - { + pub fn GetFrameProvider(&self, frameproviderinfo: &PerceptionFrameProviderInfo) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).GetFrameProvider)(::windows::core::Vtable::as_raw(this), frameproviderinfo.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).GetFrameProvider)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(frameproviderinfo), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -1175,16 +1169,14 @@ impl PerceptionFaceAuthenticationGroup { } #[doc = "*Required features: `\"Foundation_Collections\"`, `\"deprecated\"`*"] #[cfg(all(feature = "Foundation_Collections", feature = "deprecated"))] - pub fn Create<'a, P0, E0, P1, P2>(ids: P0, starthandler: P1, stophandler: P2) -> ::windows::core::Result + pub fn Create<'a, P0, E0>(ids: P0, starthandler: &PerceptionStartFaceAuthenticationHandler, stophandler: &PerceptionStopFaceAuthenticationHandler) -> ::windows::core::Result where P0: ::std::convert::TryInto<::windows::core::InParam<'a, super::super::super::Foundation::Collections::IIterable<::windows::core::HSTRING>>, Error = E0>, E0: ::std::convert::Into<::windows::core::Error>, - P1: ::std::convert::Into<::windows::core::InParam<'a, PerceptionStartFaceAuthenticationHandler>>, - P2: ::std::convert::Into<::windows::core::InParam<'a, PerceptionStopFaceAuthenticationHandler>>, { Self::IPerceptionFaceAuthenticationGroupFactory(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).Create)(::windows::core::Vtable::as_raw(this), ids.try_into().map_err(|e| e.into())?.abi(), starthandler.into().abi(), stophandler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).Create)(::windows::core::Vtable::as_raw(this), ids.try_into().map_err(|e| e.into())?.abi(), ::core::mem::transmute_copy(starthandler), ::core::mem::transmute_copy(stophandler), result__.as_mut_ptr()).from_abi::(result__) }) } #[doc(hidden)] @@ -1570,83 +1562,75 @@ pub struct PerceptionFrameProviderManagerService; impl PerceptionFrameProviderManagerService { #[doc = "*Required features: `\"deprecated\"`*"] #[cfg(feature = "deprecated")] - pub fn RegisterFrameProviderInfo<'a, P0, E0, P1>(manager: P0, frameproviderinfo: P1) -> ::windows::core::Result<()> + pub fn RegisterFrameProviderInfo<'a, P0, E0>(manager: P0, frameproviderinfo: &PerceptionFrameProviderInfo) -> ::windows::core::Result<()> where P0: ::std::convert::TryInto<::windows::core::InParam<'a, IPerceptionFrameProviderManager>, Error = E0>, E0: ::std::convert::Into<::windows::core::Error>, - P1: ::std::convert::Into<::windows::core::InParam<'a, PerceptionFrameProviderInfo>>, { - Self::IPerceptionFrameProviderManagerServiceStatics(|this| unsafe { (::windows::core::Vtable::vtable(this).RegisterFrameProviderInfo)(::windows::core::Vtable::as_raw(this), manager.try_into().map_err(|e| e.into())?.abi(), frameproviderinfo.into().abi()).ok() }) + Self::IPerceptionFrameProviderManagerServiceStatics(|this| unsafe { (::windows::core::Vtable::vtable(this).RegisterFrameProviderInfo)(::windows::core::Vtable::as_raw(this), manager.try_into().map_err(|e| e.into())?.abi(), ::core::mem::transmute_copy(frameproviderinfo)).ok() }) } #[doc = "*Required features: `\"deprecated\"`*"] #[cfg(feature = "deprecated")] - pub fn UnregisterFrameProviderInfo<'a, P0, E0, P1>(manager: P0, frameproviderinfo: P1) -> ::windows::core::Result<()> + pub fn UnregisterFrameProviderInfo<'a, P0, E0>(manager: P0, frameproviderinfo: &PerceptionFrameProviderInfo) -> ::windows::core::Result<()> where P0: ::std::convert::TryInto<::windows::core::InParam<'a, IPerceptionFrameProviderManager>, Error = E0>, E0: ::std::convert::Into<::windows::core::Error>, - P1: ::std::convert::Into<::windows::core::InParam<'a, PerceptionFrameProviderInfo>>, { - Self::IPerceptionFrameProviderManagerServiceStatics(|this| unsafe { (::windows::core::Vtable::vtable(this).UnregisterFrameProviderInfo)(::windows::core::Vtable::as_raw(this), manager.try_into().map_err(|e| e.into())?.abi(), frameproviderinfo.into().abi()).ok() }) + Self::IPerceptionFrameProviderManagerServiceStatics(|this| unsafe { (::windows::core::Vtable::vtable(this).UnregisterFrameProviderInfo)(::windows::core::Vtable::as_raw(this), manager.try_into().map_err(|e| e.into())?.abi(), ::core::mem::transmute_copy(frameproviderinfo)).ok() }) } #[doc = "*Required features: `\"deprecated\"`*"] #[cfg(feature = "deprecated")] - pub fn RegisterFaceAuthenticationGroup<'a, P0, E0, P1>(manager: P0, faceauthenticationgroup: P1) -> ::windows::core::Result<()> + pub fn RegisterFaceAuthenticationGroup<'a, P0, E0>(manager: P0, faceauthenticationgroup: &PerceptionFaceAuthenticationGroup) -> ::windows::core::Result<()> where P0: ::std::convert::TryInto<::windows::core::InParam<'a, IPerceptionFrameProviderManager>, Error = E0>, E0: ::std::convert::Into<::windows::core::Error>, - P1: ::std::convert::Into<::windows::core::InParam<'a, PerceptionFaceAuthenticationGroup>>, { - Self::IPerceptionFrameProviderManagerServiceStatics(|this| unsafe { (::windows::core::Vtable::vtable(this).RegisterFaceAuthenticationGroup)(::windows::core::Vtable::as_raw(this), manager.try_into().map_err(|e| e.into())?.abi(), faceauthenticationgroup.into().abi()).ok() }) + Self::IPerceptionFrameProviderManagerServiceStatics(|this| unsafe { (::windows::core::Vtable::vtable(this).RegisterFaceAuthenticationGroup)(::windows::core::Vtable::as_raw(this), manager.try_into().map_err(|e| e.into())?.abi(), ::core::mem::transmute_copy(faceauthenticationgroup)).ok() }) } #[doc = "*Required features: `\"deprecated\"`*"] #[cfg(feature = "deprecated")] - pub fn UnregisterFaceAuthenticationGroup<'a, P0, E0, P1>(manager: P0, faceauthenticationgroup: P1) -> ::windows::core::Result<()> + pub fn UnregisterFaceAuthenticationGroup<'a, P0, E0>(manager: P0, faceauthenticationgroup: &PerceptionFaceAuthenticationGroup) -> ::windows::core::Result<()> where P0: ::std::convert::TryInto<::windows::core::InParam<'a, IPerceptionFrameProviderManager>, Error = E0>, E0: ::std::convert::Into<::windows::core::Error>, - P1: ::std::convert::Into<::windows::core::InParam<'a, PerceptionFaceAuthenticationGroup>>, { - Self::IPerceptionFrameProviderManagerServiceStatics(|this| unsafe { (::windows::core::Vtable::vtable(this).UnregisterFaceAuthenticationGroup)(::windows::core::Vtable::as_raw(this), manager.try_into().map_err(|e| e.into())?.abi(), faceauthenticationgroup.into().abi()).ok() }) + Self::IPerceptionFrameProviderManagerServiceStatics(|this| unsafe { (::windows::core::Vtable::vtable(this).UnregisterFaceAuthenticationGroup)(::windows::core::Vtable::as_raw(this), manager.try_into().map_err(|e| e.into())?.abi(), ::core::mem::transmute_copy(faceauthenticationgroup)).ok() }) } #[doc = "*Required features: `\"deprecated\"`*"] #[cfg(feature = "deprecated")] - pub fn RegisterControlGroup<'a, P0, E0, P1>(manager: P0, controlgroup: P1) -> ::windows::core::Result<()> + pub fn RegisterControlGroup<'a, P0, E0>(manager: P0, controlgroup: &PerceptionControlGroup) -> ::windows::core::Result<()> where P0: ::std::convert::TryInto<::windows::core::InParam<'a, IPerceptionFrameProviderManager>, Error = E0>, E0: ::std::convert::Into<::windows::core::Error>, - P1: ::std::convert::Into<::windows::core::InParam<'a, PerceptionControlGroup>>, { - Self::IPerceptionFrameProviderManagerServiceStatics(|this| unsafe { (::windows::core::Vtable::vtable(this).RegisterControlGroup)(::windows::core::Vtable::as_raw(this), manager.try_into().map_err(|e| e.into())?.abi(), controlgroup.into().abi()).ok() }) + Self::IPerceptionFrameProviderManagerServiceStatics(|this| unsafe { (::windows::core::Vtable::vtable(this).RegisterControlGroup)(::windows::core::Vtable::as_raw(this), manager.try_into().map_err(|e| e.into())?.abi(), ::core::mem::transmute_copy(controlgroup)).ok() }) } #[doc = "*Required features: `\"deprecated\"`*"] #[cfg(feature = "deprecated")] - pub fn UnregisterControlGroup<'a, P0, E0, P1>(manager: P0, controlgroup: P1) -> ::windows::core::Result<()> + pub fn UnregisterControlGroup<'a, P0, E0>(manager: P0, controlgroup: &PerceptionControlGroup) -> ::windows::core::Result<()> where P0: ::std::convert::TryInto<::windows::core::InParam<'a, IPerceptionFrameProviderManager>, Error = E0>, E0: ::std::convert::Into<::windows::core::Error>, - P1: ::std::convert::Into<::windows::core::InParam<'a, PerceptionControlGroup>>, { - Self::IPerceptionFrameProviderManagerServiceStatics(|this| unsafe { (::windows::core::Vtable::vtable(this).UnregisterControlGroup)(::windows::core::Vtable::as_raw(this), manager.try_into().map_err(|e| e.into())?.abi(), controlgroup.into().abi()).ok() }) + Self::IPerceptionFrameProviderManagerServiceStatics(|this| unsafe { (::windows::core::Vtable::vtable(this).UnregisterControlGroup)(::windows::core::Vtable::as_raw(this), manager.try_into().map_err(|e| e.into())?.abi(), ::core::mem::transmute_copy(controlgroup)).ok() }) } #[doc = "*Required features: `\"deprecated\"`*"] #[cfg(feature = "deprecated")] - pub fn RegisterCorrelationGroup<'a, P0, E0, P1>(manager: P0, correlationgroup: P1) -> ::windows::core::Result<()> + pub fn RegisterCorrelationGroup<'a, P0, E0>(manager: P0, correlationgroup: &PerceptionCorrelationGroup) -> ::windows::core::Result<()> where P0: ::std::convert::TryInto<::windows::core::InParam<'a, IPerceptionFrameProviderManager>, Error = E0>, E0: ::std::convert::Into<::windows::core::Error>, - P1: ::std::convert::Into<::windows::core::InParam<'a, PerceptionCorrelationGroup>>, { - Self::IPerceptionFrameProviderManagerServiceStatics(|this| unsafe { (::windows::core::Vtable::vtable(this).RegisterCorrelationGroup)(::windows::core::Vtable::as_raw(this), manager.try_into().map_err(|e| e.into())?.abi(), correlationgroup.into().abi()).ok() }) + Self::IPerceptionFrameProviderManagerServiceStatics(|this| unsafe { (::windows::core::Vtable::vtable(this).RegisterCorrelationGroup)(::windows::core::Vtable::as_raw(this), manager.try_into().map_err(|e| e.into())?.abi(), ::core::mem::transmute_copy(correlationgroup)).ok() }) } #[doc = "*Required features: `\"deprecated\"`*"] #[cfg(feature = "deprecated")] - pub fn UnregisterCorrelationGroup<'a, P0, E0, P1>(manager: P0, correlationgroup: P1) -> ::windows::core::Result<()> + pub fn UnregisterCorrelationGroup<'a, P0, E0>(manager: P0, correlationgroup: &PerceptionCorrelationGroup) -> ::windows::core::Result<()> where P0: ::std::convert::TryInto<::windows::core::InParam<'a, IPerceptionFrameProviderManager>, Error = E0>, E0: ::std::convert::Into<::windows::core::Error>, - P1: ::std::convert::Into<::windows::core::InParam<'a, PerceptionCorrelationGroup>>, { - Self::IPerceptionFrameProviderManagerServiceStatics(|this| unsafe { (::windows::core::Vtable::vtable(this).UnregisterCorrelationGroup)(::windows::core::Vtable::as_raw(this), manager.try_into().map_err(|e| e.into())?.abi(), correlationgroup.into().abi()).ok() }) + Self::IPerceptionFrameProviderManagerServiceStatics(|this| unsafe { (::windows::core::Vtable::vtable(this).UnregisterCorrelationGroup)(::windows::core::Vtable::as_raw(this), manager.try_into().map_err(|e| e.into())?.abi(), ::core::mem::transmute_copy(correlationgroup)).ok() }) } #[doc = "*Required features: `\"deprecated\"`*"] #[cfg(feature = "deprecated")] @@ -1659,13 +1643,12 @@ impl PerceptionFrameProviderManagerService { } #[doc = "*Required features: `\"deprecated\"`*"] #[cfg(feature = "deprecated")] - pub fn PublishFrameForProvider<'a, P0, E0, P1>(provider: P0, frame: P1) -> ::windows::core::Result<()> + pub fn PublishFrameForProvider<'a, P0, E0>(provider: P0, frame: &PerceptionFrame) -> ::windows::core::Result<()> where P0: ::std::convert::TryInto<::windows::core::InParam<'a, IPerceptionFrameProvider>, Error = E0>, E0: ::std::convert::Into<::windows::core::Error>, - P1: ::std::convert::Into<::windows::core::InParam<'a, PerceptionFrame>>, { - Self::IPerceptionFrameProviderManagerServiceStatics(|this| unsafe { (::windows::core::Vtable::vtable(this).PublishFrameForProvider)(::windows::core::Vtable::as_raw(this), provider.try_into().map_err(|e| e.into())?.abi(), frame.into().abi()).ok() }) + Self::IPerceptionFrameProviderManagerServiceStatics(|this| unsafe { (::windows::core::Vtable::vtable(this).PublishFrameForProvider)(::windows::core::Vtable::as_raw(this), provider.try_into().map_err(|e| e.into())?.abi(), ::core::mem::transmute_copy(frame)).ok() }) } #[doc(hidden)] #[cfg(feature = "deprecated")] @@ -1830,14 +1813,11 @@ impl PerceptionVideoFrameAllocator { } #[doc = "*Required features: `\"Media\"`, `\"deprecated\"`*"] #[cfg(all(feature = "Media", feature = "deprecated"))] - pub fn CopyFromVideoFrame<'a, P0>(&self, frame: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Media::VideoFrame>>, - { + pub fn CopyFromVideoFrame(&self, frame: &super::super::super::Media::VideoFrame) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).CopyFromVideoFrame)(::windows::core::Vtable::as_raw(this), frame.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).CopyFromVideoFrame)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(frame), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`, `\"Graphics_Imaging\"`, `\"deprecated\"`*"] @@ -1969,14 +1949,11 @@ impl PerceptionStartFaceAuthenticationHandler { } #[doc = "*Required features: `\"deprecated\"`*"] #[cfg(feature = "deprecated")] - pub fn Invoke<'a, P0>(&self, sender: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, PerceptionFaceAuthenticationGroup>>, - { + pub fn Invoke(&self, sender: &PerceptionFaceAuthenticationGroup) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).Invoke)(::windows::core::Vtable::as_raw(this), sender.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).Invoke)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(sender), result__.as_mut_ptr()).from_abi::(result__) } } } @@ -2085,12 +2062,9 @@ impl PerceptionStopFaceAuthenticationHandler { } #[doc = "*Required features: `\"deprecated\"`*"] #[cfg(feature = "deprecated")] - pub fn Invoke<'a, P0>(&self, sender: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, PerceptionFaceAuthenticationGroup>>, - { + pub fn Invoke(&self, sender: &PerceptionFaceAuthenticationGroup) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).Invoke)(::windows::core::Vtable::as_raw(this), sender.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).Invoke)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(sender)).ok() } } } #[cfg(feature = "deprecated")] diff --git a/crates/libs/windows/src/Windows/Devices/Perception/mod.rs b/crates/libs/windows/src/Windows/Devices/Perception/mod.rs index 324c7d1b47..9a4251455e 100644 --- a/crates/libs/windows/src/Windows/Devices/Perception/mod.rs +++ b/crates/libs/windows/src/Windows/Devices/Perception/mod.rs @@ -2239,14 +2239,11 @@ impl PerceptionColorFrameReader { } #[doc = "*Required features: `\"Foundation\"`, `\"deprecated\"`*"] #[cfg(all(feature = "Foundation", feature = "deprecated"))] - pub fn FrameArrived<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn FrameArrived(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).FrameArrived)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).FrameArrived)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`, `\"deprecated\"`*"] @@ -2399,14 +2396,11 @@ pub struct PerceptionColorFrameSource(::windows::core::IUnknown); impl PerceptionColorFrameSource { #[doc = "*Required features: `\"Foundation\"`, `\"deprecated\"`*"] #[cfg(all(feature = "Foundation", feature = "deprecated"))] - pub fn AvailableChanged<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn AvailableChanged(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).AvailableChanged)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).AvailableChanged)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`, `\"deprecated\"`*"] @@ -2417,14 +2411,11 @@ impl PerceptionColorFrameSource { } #[doc = "*Required features: `\"Foundation\"`, `\"deprecated\"`*"] #[cfg(all(feature = "Foundation", feature = "deprecated"))] - pub fn ActiveChanged<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn ActiveChanged(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).ActiveChanged)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).ActiveChanged)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`, `\"deprecated\"`*"] @@ -2435,14 +2426,11 @@ impl PerceptionColorFrameSource { } #[doc = "*Required features: `\"Foundation\"`, `\"deprecated\"`*"] #[cfg(all(feature = "Foundation", feature = "deprecated"))] - pub fn PropertiesChanged<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn PropertiesChanged(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).PropertiesChanged)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).PropertiesChanged)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`, `\"deprecated\"`*"] @@ -2453,14 +2441,11 @@ impl PerceptionColorFrameSource { } #[doc = "*Required features: `\"Foundation\"`, `\"deprecated\"`*"] #[cfg(all(feature = "Foundation", feature = "deprecated"))] - pub fn VideoProfileChanged<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn VideoProfileChanged(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).VideoProfileChanged)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).VideoProfileChanged)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`, `\"deprecated\"`*"] @@ -2471,14 +2456,11 @@ impl PerceptionColorFrameSource { } #[doc = "*Required features: `\"Foundation\"`, `\"deprecated\"`*"] #[cfg(all(feature = "Foundation", feature = "deprecated"))] - pub fn CameraIntrinsicsChanged<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn CameraIntrinsicsChanged(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).CameraIntrinsicsChanged)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).CameraIntrinsicsChanged)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`, `\"deprecated\"`*"] @@ -2624,39 +2606,29 @@ impl PerceptionColorFrameSource { } #[doc = "*Required features: `\"Foundation\"`, `\"deprecated\"`*"] #[cfg(all(feature = "Foundation", feature = "deprecated"))] - pub fn TryGetDepthCorrelatedCameraIntrinsicsAsync<'a, P0>(&self, correlateddepthframesource: P0) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, PerceptionDepthFrameSource>>, - { + pub fn TryGetDepthCorrelatedCameraIntrinsicsAsync(&self, correlateddepthframesource: &PerceptionDepthFrameSource) -> ::windows::core::Result> { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).TryGetDepthCorrelatedCameraIntrinsicsAsync)(::windows::core::Vtable::as_raw(this), correlateddepthframesource.into().abi(), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).TryGetDepthCorrelatedCameraIntrinsicsAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(correlateddepthframesource), result__.as_mut_ptr()).from_abi::>(result__) } } #[doc = "*Required features: `\"Foundation\"`, `\"deprecated\"`*"] #[cfg(all(feature = "Foundation", feature = "deprecated"))] - pub fn TryGetDepthCorrelatedCoordinateMapperAsync<'a, P0>(&self, targetsourceid: &::windows::core::HSTRING, correlateddepthframesource: P0) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, PerceptionDepthFrameSource>>, - { + pub fn TryGetDepthCorrelatedCoordinateMapperAsync(&self, targetsourceid: &::windows::core::HSTRING, correlateddepthframesource: &PerceptionDepthFrameSource) -> ::windows::core::Result> { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).TryGetDepthCorrelatedCoordinateMapperAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(targetsourceid), correlateddepthframesource.into().abi(), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).TryGetDepthCorrelatedCoordinateMapperAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(targetsourceid), ::core::mem::transmute_copy(correlateddepthframesource), result__.as_mut_ptr()).from_abi::>(result__) } } #[doc = "*Required features: `\"Foundation\"`, `\"deprecated\"`*"] #[cfg(all(feature = "Foundation", feature = "deprecated"))] - pub fn TrySetVideoProfileAsync<'a, P0, P1>(&self, controlsession: P0, profile: P1) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, PerceptionControlSession>>, - P1: ::std::convert::Into<::windows::core::InParam<'a, PerceptionVideoProfile>>, - { + pub fn TrySetVideoProfileAsync(&self, controlsession: &PerceptionControlSession, profile: &PerceptionVideoProfile) -> ::windows::core::Result> { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).TrySetVideoProfileAsync)(::windows::core::Vtable::as_raw(this), controlsession.into().abi(), profile.into().abi(), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).TrySetVideoProfileAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(controlsession), ::core::mem::transmute_copy(profile), result__.as_mut_ptr()).from_abi::>(result__) } } #[doc = "*Required features: `\"deprecated\"`*"] @@ -2996,14 +2968,11 @@ pub struct PerceptionColorFrameSourceWatcher(::windows::core::IUnknown); impl PerceptionColorFrameSourceWatcher { #[doc = "*Required features: `\"Foundation\"`, `\"deprecated\"`*"] #[cfg(all(feature = "Foundation", feature = "deprecated"))] - pub fn SourceAdded<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn SourceAdded(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).SourceAdded)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).SourceAdded)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`, `\"deprecated\"`*"] @@ -3014,14 +2983,11 @@ impl PerceptionColorFrameSourceWatcher { } #[doc = "*Required features: `\"Foundation\"`, `\"deprecated\"`*"] #[cfg(all(feature = "Foundation", feature = "deprecated"))] - pub fn SourceRemoved<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn SourceRemoved(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).SourceRemoved)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).SourceRemoved)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`, `\"deprecated\"`*"] @@ -3032,14 +2998,11 @@ impl PerceptionColorFrameSourceWatcher { } #[doc = "*Required features: `\"Foundation\"`, `\"deprecated\"`*"] #[cfg(all(feature = "Foundation", feature = "deprecated"))] - pub fn Stopped<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn Stopped(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).Stopped)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).Stopped)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`, `\"deprecated\"`*"] @@ -3050,14 +3013,11 @@ impl PerceptionColorFrameSourceWatcher { } #[doc = "*Required features: `\"Foundation\"`, `\"deprecated\"`*"] #[cfg(all(feature = "Foundation", feature = "deprecated"))] - pub fn EnumerationCompleted<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn EnumerationCompleted(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).EnumerationCompleted)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).EnumerationCompleted)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`, `\"deprecated\"`*"] @@ -3182,14 +3142,11 @@ impl PerceptionControlSession { } #[doc = "*Required features: `\"Foundation\"`, `\"deprecated\"`*"] #[cfg(all(feature = "Foundation", feature = "deprecated"))] - pub fn ControlLost<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn ControlLost(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).ControlLost)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).ControlLost)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`, `\"deprecated\"`*"] @@ -3321,47 +3278,35 @@ pub struct PerceptionDepthCorrelatedCameraIntrinsics(::windows::core::IUnknown); impl PerceptionDepthCorrelatedCameraIntrinsics { #[doc = "*Required features: `\"Foundation_Numerics\"`, `\"deprecated\"`*"] #[cfg(all(feature = "Foundation_Numerics", feature = "deprecated"))] - pub fn UnprojectPixelAtCorrelatedDepth<'a, P0>(&self, pixelcoordinate: super::super::Foundation::Point, depthframe: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, PerceptionDepthFrame>>, - { + pub fn UnprojectPixelAtCorrelatedDepth(&self, pixelcoordinate: super::super::Foundation::Point, depthframe: &PerceptionDepthFrame) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).UnprojectPixelAtCorrelatedDepth)(::windows::core::Vtable::as_raw(this), pixelcoordinate, depthframe.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).UnprojectPixelAtCorrelatedDepth)(::windows::core::Vtable::as_raw(this), pixelcoordinate, ::core::mem::transmute_copy(depthframe), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation_Numerics\"`, `\"deprecated\"`*"] #[cfg(all(feature = "Foundation_Numerics", feature = "deprecated"))] - pub fn UnprojectPixelsAtCorrelatedDepth<'a, P0>(&self, sourcecoordinates: &[super::super::Foundation::Point], depthframe: P0, results: &mut [super::super::Foundation::Numerics::Vector3]) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, PerceptionDepthFrame>>, - { + pub fn UnprojectPixelsAtCorrelatedDepth(&self, sourcecoordinates: &[super::super::Foundation::Point], depthframe: &PerceptionDepthFrame, results: &mut [super::super::Foundation::Numerics::Vector3]) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).UnprojectPixelsAtCorrelatedDepth)(::windows::core::Vtable::as_raw(this), sourcecoordinates.len() as u32, sourcecoordinates.as_ptr(), depthframe.into().abi(), results.len() as u32, results.as_mut_ptr()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).UnprojectPixelsAtCorrelatedDepth)(::windows::core::Vtable::as_raw(this), sourcecoordinates.len() as u32, sourcecoordinates.as_ptr(), ::core::mem::transmute_copy(depthframe), results.len() as u32, results.as_mut_ptr()).ok() } } #[doc = "*Required features: `\"Foundation_Numerics\"`, `\"deprecated\"`*"] #[cfg(all(feature = "Foundation_Numerics", feature = "deprecated"))] - pub fn UnprojectRegionPixelsAtCorrelatedDepthAsync<'a, P0>(&self, region: super::super::Foundation::Rect, depthframe: P0, results: &mut [super::super::Foundation::Numerics::Vector3]) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, PerceptionDepthFrame>>, - { + pub fn UnprojectRegionPixelsAtCorrelatedDepthAsync(&self, region: super::super::Foundation::Rect, depthframe: &PerceptionDepthFrame, results: &mut [super::super::Foundation::Numerics::Vector3]) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).UnprojectRegionPixelsAtCorrelatedDepthAsync)(::windows::core::Vtable::as_raw(this), region, depthframe.into().abi(), results.len() as u32, results.as_mut_ptr(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).UnprojectRegionPixelsAtCorrelatedDepthAsync)(::windows::core::Vtable::as_raw(this), region, ::core::mem::transmute_copy(depthframe), results.len() as u32, results.as_mut_ptr(), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation_Numerics\"`, `\"deprecated\"`*"] #[cfg(all(feature = "Foundation_Numerics", feature = "deprecated"))] - pub fn UnprojectAllPixelsAtCorrelatedDepthAsync<'a, P0>(&self, depthframe: P0, results: &mut [super::super::Foundation::Numerics::Vector3]) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, PerceptionDepthFrame>>, - { + pub fn UnprojectAllPixelsAtCorrelatedDepthAsync(&self, depthframe: &PerceptionDepthFrame, results: &mut [super::super::Foundation::Numerics::Vector3]) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).UnprojectAllPixelsAtCorrelatedDepthAsync)(::windows::core::Vtable::as_raw(this), depthframe.into().abi(), results.len() as u32, results.as_mut_ptr(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).UnprojectAllPixelsAtCorrelatedDepthAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(depthframe), results.len() as u32, results.as_mut_ptr(), result__.as_mut_ptr()).from_abi::(result__) } } } @@ -3453,47 +3398,35 @@ pub struct PerceptionDepthCorrelatedCoordinateMapper(::windows::core::IUnknown); impl PerceptionDepthCorrelatedCoordinateMapper { #[doc = "*Required features: `\"Foundation\"`, `\"deprecated\"`*"] #[cfg(all(feature = "Foundation", feature = "deprecated"))] - pub fn MapPixelToTarget<'a, P0>(&self, sourcepixelcoordinate: super::super::Foundation::Point, depthframe: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, PerceptionDepthFrame>>, - { + pub fn MapPixelToTarget(&self, sourcepixelcoordinate: super::super::Foundation::Point, depthframe: &PerceptionDepthFrame) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).MapPixelToTarget)(::windows::core::Vtable::as_raw(this), sourcepixelcoordinate, depthframe.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).MapPixelToTarget)(::windows::core::Vtable::as_raw(this), sourcepixelcoordinate, ::core::mem::transmute_copy(depthframe), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`, `\"deprecated\"`*"] #[cfg(all(feature = "Foundation", feature = "deprecated"))] - pub fn MapPixelsToTarget<'a, P0>(&self, sourcecoordinates: &[super::super::Foundation::Point], depthframe: P0, results: &mut [super::super::Foundation::Point]) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, PerceptionDepthFrame>>, - { + pub fn MapPixelsToTarget(&self, sourcecoordinates: &[super::super::Foundation::Point], depthframe: &PerceptionDepthFrame, results: &mut [super::super::Foundation::Point]) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).MapPixelsToTarget)(::windows::core::Vtable::as_raw(this), sourcecoordinates.len() as u32, sourcecoordinates.as_ptr(), depthframe.into().abi(), results.len() as u32, results.as_mut_ptr()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).MapPixelsToTarget)(::windows::core::Vtable::as_raw(this), sourcecoordinates.len() as u32, sourcecoordinates.as_ptr(), ::core::mem::transmute_copy(depthframe), results.len() as u32, results.as_mut_ptr()).ok() } } #[doc = "*Required features: `\"Foundation\"`, `\"deprecated\"`*"] #[cfg(all(feature = "Foundation", feature = "deprecated"))] - pub fn MapRegionOfPixelsToTargetAsync<'a, P0>(&self, region: super::super::Foundation::Rect, depthframe: P0, targetcoordinates: &mut [super::super::Foundation::Point]) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, PerceptionDepthFrame>>, - { + pub fn MapRegionOfPixelsToTargetAsync(&self, region: super::super::Foundation::Rect, depthframe: &PerceptionDepthFrame, targetcoordinates: &mut [super::super::Foundation::Point]) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).MapRegionOfPixelsToTargetAsync)(::windows::core::Vtable::as_raw(this), region, depthframe.into().abi(), targetcoordinates.len() as u32, targetcoordinates.as_mut_ptr(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).MapRegionOfPixelsToTargetAsync)(::windows::core::Vtable::as_raw(this), region, ::core::mem::transmute_copy(depthframe), targetcoordinates.len() as u32, targetcoordinates.as_mut_ptr(), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`, `\"deprecated\"`*"] #[cfg(all(feature = "Foundation", feature = "deprecated"))] - pub fn MapAllPixelsToTargetAsync<'a, P0>(&self, depthframe: P0, targetcoordinates: &mut [super::super::Foundation::Point]) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, PerceptionDepthFrame>>, - { + pub fn MapAllPixelsToTargetAsync(&self, depthframe: &PerceptionDepthFrame, targetcoordinates: &mut [super::super::Foundation::Point]) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).MapAllPixelsToTargetAsync)(::windows::core::Vtable::as_raw(this), depthframe.into().abi(), targetcoordinates.len() as u32, targetcoordinates.as_mut_ptr(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).MapAllPixelsToTargetAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(depthframe), targetcoordinates.len() as u32, targetcoordinates.as_mut_ptr(), result__.as_mut_ptr()).from_abi::(result__) } } } @@ -3820,14 +3753,11 @@ impl PerceptionDepthFrameReader { } #[doc = "*Required features: `\"Foundation\"`, `\"deprecated\"`*"] #[cfg(all(feature = "Foundation", feature = "deprecated"))] - pub fn FrameArrived<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn FrameArrived(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).FrameArrived)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).FrameArrived)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`, `\"deprecated\"`*"] @@ -3980,14 +3910,11 @@ pub struct PerceptionDepthFrameSource(::windows::core::IUnknown); impl PerceptionDepthFrameSource { #[doc = "*Required features: `\"Foundation\"`, `\"deprecated\"`*"] #[cfg(all(feature = "Foundation", feature = "deprecated"))] - pub fn AvailableChanged<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn AvailableChanged(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).AvailableChanged)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).AvailableChanged)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`, `\"deprecated\"`*"] @@ -3998,14 +3925,11 @@ impl PerceptionDepthFrameSource { } #[doc = "*Required features: `\"Foundation\"`, `\"deprecated\"`*"] #[cfg(all(feature = "Foundation", feature = "deprecated"))] - pub fn ActiveChanged<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn ActiveChanged(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).ActiveChanged)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).ActiveChanged)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`, `\"deprecated\"`*"] @@ -4016,14 +3940,11 @@ impl PerceptionDepthFrameSource { } #[doc = "*Required features: `\"Foundation\"`, `\"deprecated\"`*"] #[cfg(all(feature = "Foundation", feature = "deprecated"))] - pub fn PropertiesChanged<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn PropertiesChanged(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).PropertiesChanged)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).PropertiesChanged)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`, `\"deprecated\"`*"] @@ -4034,14 +3955,11 @@ impl PerceptionDepthFrameSource { } #[doc = "*Required features: `\"Foundation\"`, `\"deprecated\"`*"] #[cfg(all(feature = "Foundation", feature = "deprecated"))] - pub fn VideoProfileChanged<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn VideoProfileChanged(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).VideoProfileChanged)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).VideoProfileChanged)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`, `\"deprecated\"`*"] @@ -4052,14 +3970,11 @@ impl PerceptionDepthFrameSource { } #[doc = "*Required features: `\"Foundation\"`, `\"deprecated\"`*"] #[cfg(all(feature = "Foundation", feature = "deprecated"))] - pub fn CameraIntrinsicsChanged<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn CameraIntrinsicsChanged(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).CameraIntrinsicsChanged)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).CameraIntrinsicsChanged)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`, `\"deprecated\"`*"] @@ -4205,39 +4120,29 @@ impl PerceptionDepthFrameSource { } #[doc = "*Required features: `\"Foundation\"`, `\"deprecated\"`*"] #[cfg(all(feature = "Foundation", feature = "deprecated"))] - pub fn TryGetDepthCorrelatedCameraIntrinsicsAsync<'a, P0>(&self, target: P0) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, PerceptionDepthFrameSource>>, - { + pub fn TryGetDepthCorrelatedCameraIntrinsicsAsync(&self, target: &PerceptionDepthFrameSource) -> ::windows::core::Result> { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).TryGetDepthCorrelatedCameraIntrinsicsAsync)(::windows::core::Vtable::as_raw(this), target.into().abi(), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).TryGetDepthCorrelatedCameraIntrinsicsAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(target), result__.as_mut_ptr()).from_abi::>(result__) } } #[doc = "*Required features: `\"Foundation\"`, `\"deprecated\"`*"] #[cfg(all(feature = "Foundation", feature = "deprecated"))] - pub fn TryGetDepthCorrelatedCoordinateMapperAsync<'a, P0>(&self, targetid: &::windows::core::HSTRING, depthframesourcetomapwith: P0) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, PerceptionDepthFrameSource>>, - { + pub fn TryGetDepthCorrelatedCoordinateMapperAsync(&self, targetid: &::windows::core::HSTRING, depthframesourcetomapwith: &PerceptionDepthFrameSource) -> ::windows::core::Result> { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).TryGetDepthCorrelatedCoordinateMapperAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(targetid), depthframesourcetomapwith.into().abi(), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).TryGetDepthCorrelatedCoordinateMapperAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(targetid), ::core::mem::transmute_copy(depthframesourcetomapwith), result__.as_mut_ptr()).from_abi::>(result__) } } #[doc = "*Required features: `\"Foundation\"`, `\"deprecated\"`*"] #[cfg(all(feature = "Foundation", feature = "deprecated"))] - pub fn TrySetVideoProfileAsync<'a, P0, P1>(&self, controlsession: P0, profile: P1) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, PerceptionControlSession>>, - P1: ::std::convert::Into<::windows::core::InParam<'a, PerceptionVideoProfile>>, - { + pub fn TrySetVideoProfileAsync(&self, controlsession: &PerceptionControlSession, profile: &PerceptionVideoProfile) -> ::windows::core::Result> { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).TrySetVideoProfileAsync)(::windows::core::Vtable::as_raw(this), controlsession.into().abi(), profile.into().abi(), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).TrySetVideoProfileAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(controlsession), ::core::mem::transmute_copy(profile), result__.as_mut_ptr()).from_abi::>(result__) } } #[doc = "*Required features: `\"deprecated\"`*"] @@ -4577,14 +4482,11 @@ pub struct PerceptionDepthFrameSourceWatcher(::windows::core::IUnknown); impl PerceptionDepthFrameSourceWatcher { #[doc = "*Required features: `\"Foundation\"`, `\"deprecated\"`*"] #[cfg(all(feature = "Foundation", feature = "deprecated"))] - pub fn SourceAdded<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn SourceAdded(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).SourceAdded)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).SourceAdded)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`, `\"deprecated\"`*"] @@ -4595,14 +4497,11 @@ impl PerceptionDepthFrameSourceWatcher { } #[doc = "*Required features: `\"Foundation\"`, `\"deprecated\"`*"] #[cfg(all(feature = "Foundation", feature = "deprecated"))] - pub fn SourceRemoved<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn SourceRemoved(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).SourceRemoved)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).SourceRemoved)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`, `\"deprecated\"`*"] @@ -4613,14 +4512,11 @@ impl PerceptionDepthFrameSourceWatcher { } #[doc = "*Required features: `\"Foundation\"`, `\"deprecated\"`*"] #[cfg(all(feature = "Foundation", feature = "deprecated"))] - pub fn Stopped<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn Stopped(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).Stopped)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).Stopped)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`, `\"deprecated\"`*"] @@ -4631,14 +4527,11 @@ impl PerceptionDepthFrameSourceWatcher { } #[doc = "*Required features: `\"Foundation\"`, `\"deprecated\"`*"] #[cfg(all(feature = "Foundation", feature = "deprecated"))] - pub fn EnumerationCompleted<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn EnumerationCompleted(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).EnumerationCompleted)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).EnumerationCompleted)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`, `\"deprecated\"`*"] @@ -5202,14 +5095,11 @@ impl PerceptionInfraredFrameReader { } #[doc = "*Required features: `\"Foundation\"`, `\"deprecated\"`*"] #[cfg(all(feature = "Foundation", feature = "deprecated"))] - pub fn FrameArrived<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn FrameArrived(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).FrameArrived)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).FrameArrived)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`, `\"deprecated\"`*"] @@ -5362,14 +5252,11 @@ pub struct PerceptionInfraredFrameSource(::windows::core::IUnknown); impl PerceptionInfraredFrameSource { #[doc = "*Required features: `\"Foundation\"`, `\"deprecated\"`*"] #[cfg(all(feature = "Foundation", feature = "deprecated"))] - pub fn AvailableChanged<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn AvailableChanged(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).AvailableChanged)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).AvailableChanged)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`, `\"deprecated\"`*"] @@ -5380,14 +5267,11 @@ impl PerceptionInfraredFrameSource { } #[doc = "*Required features: `\"Foundation\"`, `\"deprecated\"`*"] #[cfg(all(feature = "Foundation", feature = "deprecated"))] - pub fn ActiveChanged<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn ActiveChanged(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).ActiveChanged)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).ActiveChanged)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`, `\"deprecated\"`*"] @@ -5398,14 +5282,11 @@ impl PerceptionInfraredFrameSource { } #[doc = "*Required features: `\"Foundation\"`, `\"deprecated\"`*"] #[cfg(all(feature = "Foundation", feature = "deprecated"))] - pub fn PropertiesChanged<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn PropertiesChanged(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).PropertiesChanged)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).PropertiesChanged)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`, `\"deprecated\"`*"] @@ -5416,14 +5297,11 @@ impl PerceptionInfraredFrameSource { } #[doc = "*Required features: `\"Foundation\"`, `\"deprecated\"`*"] #[cfg(all(feature = "Foundation", feature = "deprecated"))] - pub fn VideoProfileChanged<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn VideoProfileChanged(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).VideoProfileChanged)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).VideoProfileChanged)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`, `\"deprecated\"`*"] @@ -5434,14 +5312,11 @@ impl PerceptionInfraredFrameSource { } #[doc = "*Required features: `\"Foundation\"`, `\"deprecated\"`*"] #[cfg(all(feature = "Foundation", feature = "deprecated"))] - pub fn CameraIntrinsicsChanged<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn CameraIntrinsicsChanged(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).CameraIntrinsicsChanged)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).CameraIntrinsicsChanged)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`, `\"deprecated\"`*"] @@ -5587,39 +5462,29 @@ impl PerceptionInfraredFrameSource { } #[doc = "*Required features: `\"Foundation\"`, `\"deprecated\"`*"] #[cfg(all(feature = "Foundation", feature = "deprecated"))] - pub fn TryGetDepthCorrelatedCameraIntrinsicsAsync<'a, P0>(&self, target: P0) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, PerceptionDepthFrameSource>>, - { + pub fn TryGetDepthCorrelatedCameraIntrinsicsAsync(&self, target: &PerceptionDepthFrameSource) -> ::windows::core::Result> { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).TryGetDepthCorrelatedCameraIntrinsicsAsync)(::windows::core::Vtable::as_raw(this), target.into().abi(), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).TryGetDepthCorrelatedCameraIntrinsicsAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(target), result__.as_mut_ptr()).from_abi::>(result__) } } #[doc = "*Required features: `\"Foundation\"`, `\"deprecated\"`*"] #[cfg(all(feature = "Foundation", feature = "deprecated"))] - pub fn TryGetDepthCorrelatedCoordinateMapperAsync<'a, P0>(&self, targetid: &::windows::core::HSTRING, depthframesourcetomapwith: P0) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, PerceptionDepthFrameSource>>, - { + pub fn TryGetDepthCorrelatedCoordinateMapperAsync(&self, targetid: &::windows::core::HSTRING, depthframesourcetomapwith: &PerceptionDepthFrameSource) -> ::windows::core::Result> { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).TryGetDepthCorrelatedCoordinateMapperAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(targetid), depthframesourcetomapwith.into().abi(), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).TryGetDepthCorrelatedCoordinateMapperAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(targetid), ::core::mem::transmute_copy(depthframesourcetomapwith), result__.as_mut_ptr()).from_abi::>(result__) } } #[doc = "*Required features: `\"Foundation\"`, `\"deprecated\"`*"] #[cfg(all(feature = "Foundation", feature = "deprecated"))] - pub fn TrySetVideoProfileAsync<'a, P0, P1>(&self, controlsession: P0, profile: P1) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, PerceptionControlSession>>, - P1: ::std::convert::Into<::windows::core::InParam<'a, PerceptionVideoProfile>>, - { + pub fn TrySetVideoProfileAsync(&self, controlsession: &PerceptionControlSession, profile: &PerceptionVideoProfile) -> ::windows::core::Result> { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).TrySetVideoProfileAsync)(::windows::core::Vtable::as_raw(this), controlsession.into().abi(), profile.into().abi(), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).TrySetVideoProfileAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(controlsession), ::core::mem::transmute_copy(profile), result__.as_mut_ptr()).from_abi::>(result__) } } #[doc = "*Required features: `\"deprecated\"`*"] @@ -5959,14 +5824,11 @@ pub struct PerceptionInfraredFrameSourceWatcher(::windows::core::IUnknown); impl PerceptionInfraredFrameSourceWatcher { #[doc = "*Required features: `\"Foundation\"`, `\"deprecated\"`*"] #[cfg(all(feature = "Foundation", feature = "deprecated"))] - pub fn SourceAdded<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn SourceAdded(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).SourceAdded)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).SourceAdded)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`, `\"deprecated\"`*"] @@ -5977,14 +5839,11 @@ impl PerceptionInfraredFrameSourceWatcher { } #[doc = "*Required features: `\"Foundation\"`, `\"deprecated\"`*"] #[cfg(all(feature = "Foundation", feature = "deprecated"))] - pub fn SourceRemoved<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn SourceRemoved(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).SourceRemoved)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).SourceRemoved)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`, `\"deprecated\"`*"] @@ -5995,14 +5854,11 @@ impl PerceptionInfraredFrameSourceWatcher { } #[doc = "*Required features: `\"Foundation\"`, `\"deprecated\"`*"] #[cfg(all(feature = "Foundation", feature = "deprecated"))] - pub fn Stopped<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn Stopped(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).Stopped)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).Stopped)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`, `\"deprecated\"`*"] @@ -6013,14 +5869,11 @@ impl PerceptionInfraredFrameSourceWatcher { } #[doc = "*Required features: `\"Foundation\"`, `\"deprecated\"`*"] #[cfg(all(feature = "Foundation", feature = "deprecated"))] - pub fn EnumerationCompleted<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn EnumerationCompleted(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).EnumerationCompleted)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).EnumerationCompleted)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`, `\"deprecated\"`*"] @@ -6184,14 +6037,11 @@ impl PerceptionVideoProfile { } #[doc = "*Required features: `\"deprecated\"`*"] #[cfg(feature = "deprecated")] - pub fn IsEqual<'a, P0>(&self, other: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, PerceptionVideoProfile>>, - { + pub fn IsEqual(&self, other: &PerceptionVideoProfile) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).IsEqual)(::windows::core::Vtable::as_raw(this), other.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).IsEqual)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(other), result__.as_mut_ptr()).from_abi::(result__) } } } diff --git a/crates/libs/windows/src/Windows/Devices/PointOfService/Provider/mod.rs b/crates/libs/windows/src/Windows/Devices/PointOfService/Provider/mod.rs index ae593d4512..11a8ade7f6 100644 --- a/crates/libs/windows/src/Windows/Devices/PointOfService/Provider/mod.rs +++ b/crates/libs/windows/src/Windows/Devices/PointOfService/Provider/mod.rs @@ -1175,14 +1175,11 @@ impl BarcodeScannerFrameReader { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn FrameArrived<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Foundation::TypedEventHandler>>, - { + pub fn FrameArrived(&self, handler: &super::super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).FrameArrived)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).FrameArrived)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -1375,14 +1372,11 @@ impl BarcodeScannerGetSymbologyAttributesRequest { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn ReportCompletedAsync<'a, P0>(&self, attributes: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::BarcodeSymbologyAttributes>>, - { + pub fn ReportCompletedAsync(&self, attributes: &super::BarcodeSymbologyAttributes) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).ReportCompletedAsync)(::windows::core::Vtable::as_raw(this), attributes.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).ReportCompletedAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(attributes), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -1818,14 +1812,11 @@ impl BarcodeScannerProviderConnection { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn ReportScannedDataAsync<'a, P0>(&self, report: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::BarcodeScannerReport>>, - { + pub fn ReportScannedDataAsync(&self, report: &super::BarcodeScannerReport) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).ReportScannedDataAsync)(::windows::core::Vtable::as_raw(this), report.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).ReportScannedDataAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(report), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -1839,39 +1830,29 @@ impl BarcodeScannerProviderConnection { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn ReportErrorAsync<'a, P0>(&self, errordata: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::UnifiedPosErrorData>>, - { + pub fn ReportErrorAsync(&self, errordata: &super::UnifiedPosErrorData) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).ReportErrorAsync)(::windows::core::Vtable::as_raw(this), errordata.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).ReportErrorAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(errordata), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn ReportErrorAsyncWithScanReport<'a, P0, P1>(&self, errordata: P0, isretriable: bool, scanreport: P1) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::UnifiedPosErrorData>>, - P1: ::std::convert::Into<::windows::core::InParam<'a, super::BarcodeScannerReport>>, - { + pub fn ReportErrorAsyncWithScanReport(&self, errordata: &super::UnifiedPosErrorData, isretriable: bool, scanreport: &super::BarcodeScannerReport) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).ReportErrorAsyncWithScanReport)(::windows::core::Vtable::as_raw(this), errordata.into().abi(), isretriable, scanreport.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).ReportErrorAsyncWithScanReport)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(errordata), isretriable, ::core::mem::transmute_copy(scanreport), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn EnableScannerRequested<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Foundation::TypedEventHandler>>, - { + pub fn EnableScannerRequested(&self, handler: &super::super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).EnableScannerRequested)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).EnableScannerRequested)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -1882,14 +1863,11 @@ impl BarcodeScannerProviderConnection { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn DisableScannerRequested<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Foundation::TypedEventHandler>>, - { + pub fn DisableScannerRequested(&self, handler: &super::super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).DisableScannerRequested)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).DisableScannerRequested)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -1900,14 +1878,11 @@ impl BarcodeScannerProviderConnection { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn SetActiveSymbologiesRequested<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Foundation::TypedEventHandler>>, - { + pub fn SetActiveSymbologiesRequested(&self, handler: &super::super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).SetActiveSymbologiesRequested)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).SetActiveSymbologiesRequested)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -1918,14 +1893,11 @@ impl BarcodeScannerProviderConnection { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn StartSoftwareTriggerRequested<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Foundation::TypedEventHandler>>, - { + pub fn StartSoftwareTriggerRequested(&self, handler: &super::super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).StartSoftwareTriggerRequested)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).StartSoftwareTriggerRequested)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -1936,14 +1908,11 @@ impl BarcodeScannerProviderConnection { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn StopSoftwareTriggerRequested<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Foundation::TypedEventHandler>>, - { + pub fn StopSoftwareTriggerRequested(&self, handler: &super::super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).StopSoftwareTriggerRequested)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).StopSoftwareTriggerRequested)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -1954,14 +1923,11 @@ impl BarcodeScannerProviderConnection { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn GetBarcodeSymbologyAttributesRequested<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Foundation::TypedEventHandler>>, - { + pub fn GetBarcodeSymbologyAttributesRequested(&self, handler: &super::super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).GetBarcodeSymbologyAttributesRequested)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).GetBarcodeSymbologyAttributesRequested)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -1972,14 +1938,11 @@ impl BarcodeScannerProviderConnection { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn SetBarcodeSymbologyAttributesRequested<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Foundation::TypedEventHandler>>, - { + pub fn SetBarcodeSymbologyAttributesRequested(&self, handler: &super::super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).SetBarcodeSymbologyAttributesRequested)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).SetBarcodeSymbologyAttributesRequested)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -1990,14 +1953,11 @@ impl BarcodeScannerProviderConnection { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn HideVideoPreviewRequested<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Foundation::TypedEventHandler>>, - { + pub fn HideVideoPreviewRequested(&self, handler: &super::super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).HideVideoPreviewRequested)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).HideVideoPreviewRequested)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] diff --git a/crates/libs/windows/src/Windows/Devices/PointOfService/mod.rs b/crates/libs/windows/src/Windows/Devices/PointOfService/mod.rs index b080e0b4da..b55a9c1cd5 100644 --- a/crates/libs/windows/src/Windows/Devices/PointOfService/mod.rs +++ b/crates/libs/windows/src/Windows/Devices/PointOfService/mod.rs @@ -3228,39 +3228,27 @@ impl IReceiptOrSlipJob { } #[doc = "*Required features: `\"Graphics_Imaging\"`*"] #[cfg(feature = "Graphics_Imaging")] - pub fn SetBitmap<'a, P0>(&self, bitmapnumber: u32, bitmap: P0, alignment: PosPrinterAlignment) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Graphics::Imaging::BitmapFrame>>, - { + pub fn SetBitmap(&self, bitmapnumber: u32, bitmap: &super::super::Graphics::Imaging::BitmapFrame, alignment: PosPrinterAlignment) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).SetBitmap)(::windows::core::Vtable::as_raw(this), bitmapnumber, bitmap.into().abi(), alignment).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetBitmap)(::windows::core::Vtable::as_raw(this), bitmapnumber, ::core::mem::transmute_copy(bitmap), alignment).ok() } } #[doc = "*Required features: `\"Graphics_Imaging\"`*"] #[cfg(feature = "Graphics_Imaging")] - pub fn SetBitmapCustomWidthStandardAlign<'a, P0>(&self, bitmapnumber: u32, bitmap: P0, alignment: PosPrinterAlignment, width: u32) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Graphics::Imaging::BitmapFrame>>, - { + pub fn SetBitmapCustomWidthStandardAlign(&self, bitmapnumber: u32, bitmap: &super::super::Graphics::Imaging::BitmapFrame, alignment: PosPrinterAlignment, width: u32) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).SetBitmapCustomWidthStandardAlign)(::windows::core::Vtable::as_raw(this), bitmapnumber, bitmap.into().abi(), alignment, width).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetBitmapCustomWidthStandardAlign)(::windows::core::Vtable::as_raw(this), bitmapnumber, ::core::mem::transmute_copy(bitmap), alignment, width).ok() } } #[doc = "*Required features: `\"Graphics_Imaging\"`*"] #[cfg(feature = "Graphics_Imaging")] - pub fn SetCustomAlignedBitmap<'a, P0>(&self, bitmapnumber: u32, bitmap: P0, alignmentdistance: u32) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Graphics::Imaging::BitmapFrame>>, - { + pub fn SetCustomAlignedBitmap(&self, bitmapnumber: u32, bitmap: &super::super::Graphics::Imaging::BitmapFrame, alignmentdistance: u32) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).SetCustomAlignedBitmap)(::windows::core::Vtable::as_raw(this), bitmapnumber, bitmap.into().abi(), alignmentdistance).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetCustomAlignedBitmap)(::windows::core::Vtable::as_raw(this), bitmapnumber, ::core::mem::transmute_copy(bitmap), alignmentdistance).ok() } } #[doc = "*Required features: `\"Graphics_Imaging\"`*"] #[cfg(feature = "Graphics_Imaging")] - pub fn SetBitmapCustomWidthCustomAlign<'a, P0>(&self, bitmapnumber: u32, bitmap: P0, alignmentdistance: u32, width: u32) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Graphics::Imaging::BitmapFrame>>, - { + pub fn SetBitmapCustomWidthCustomAlign(&self, bitmapnumber: u32, bitmap: &super::super::Graphics::Imaging::BitmapFrame, alignmentdistance: u32, width: u32) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).SetBitmapCustomWidthCustomAlign)(::windows::core::Vtable::as_raw(this), bitmapnumber, bitmap.into().abi(), alignmentdistance, width).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetBitmapCustomWidthCustomAlign)(::windows::core::Vtable::as_raw(this), bitmapnumber, ::core::mem::transmute_copy(bitmap), alignmentdistance, width).ok() } } pub fn PrintSavedBitmap(&self, bitmapnumber: u32) -> ::windows::core::Result<()> { let this = self; @@ -3280,39 +3268,27 @@ impl IReceiptOrSlipJob { } #[doc = "*Required features: `\"Graphics_Imaging\"`*"] #[cfg(feature = "Graphics_Imaging")] - pub fn PrintBitmap<'a, P0>(&self, bitmap: P0, alignment: PosPrinterAlignment) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Graphics::Imaging::BitmapFrame>>, - { + pub fn PrintBitmap(&self, bitmap: &super::super::Graphics::Imaging::BitmapFrame, alignment: PosPrinterAlignment) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).PrintBitmap)(::windows::core::Vtable::as_raw(this), bitmap.into().abi(), alignment).ok() } + unsafe { (::windows::core::Vtable::vtable(this).PrintBitmap)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(bitmap), alignment).ok() } } #[doc = "*Required features: `\"Graphics_Imaging\"`*"] #[cfg(feature = "Graphics_Imaging")] - pub fn PrintBitmapCustomWidthStandardAlign<'a, P0>(&self, bitmap: P0, alignment: PosPrinterAlignment, width: u32) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Graphics::Imaging::BitmapFrame>>, - { + pub fn PrintBitmapCustomWidthStandardAlign(&self, bitmap: &super::super::Graphics::Imaging::BitmapFrame, alignment: PosPrinterAlignment, width: u32) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).PrintBitmapCustomWidthStandardAlign)(::windows::core::Vtable::as_raw(this), bitmap.into().abi(), alignment, width).ok() } + unsafe { (::windows::core::Vtable::vtable(this).PrintBitmapCustomWidthStandardAlign)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(bitmap), alignment, width).ok() } } #[doc = "*Required features: `\"Graphics_Imaging\"`*"] #[cfg(feature = "Graphics_Imaging")] - pub fn PrintCustomAlignedBitmap<'a, P0>(&self, bitmap: P0, alignmentdistance: u32) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Graphics::Imaging::BitmapFrame>>, - { + pub fn PrintCustomAlignedBitmap(&self, bitmap: &super::super::Graphics::Imaging::BitmapFrame, alignmentdistance: u32) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).PrintCustomAlignedBitmap)(::windows::core::Vtable::as_raw(this), bitmap.into().abi(), alignmentdistance).ok() } + unsafe { (::windows::core::Vtable::vtable(this).PrintCustomAlignedBitmap)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(bitmap), alignmentdistance).ok() } } #[doc = "*Required features: `\"Graphics_Imaging\"`*"] #[cfg(feature = "Graphics_Imaging")] - pub fn PrintBitmapCustomWidthCustomAlign<'a, P0>(&self, bitmap: P0, alignmentdistance: u32, width: u32) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Graphics::Imaging::BitmapFrame>>, - { + pub fn PrintBitmapCustomWidthCustomAlign(&self, bitmap: &super::super::Graphics::Imaging::BitmapFrame, alignmentdistance: u32, width: u32) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).PrintBitmapCustomWidthCustomAlign)(::windows::core::Vtable::as_raw(this), bitmap.into().abi(), alignmentdistance, width).ok() } + unsafe { (::windows::core::Vtable::vtable(this).PrintBitmapCustomWidthCustomAlign)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(bitmap), alignmentdistance, width).ok() } } pub fn Print(&self, data: &::windows::core::HSTRING) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; @@ -3704,14 +3680,11 @@ impl BarcodeScanner { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn StatusUpdated<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn StatusUpdated(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).StatusUpdated)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).StatusUpdated)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -5213,14 +5186,11 @@ impl CashDrawer { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn StatusUpdated<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn StatusUpdated(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).StatusUpdated)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).StatusUpdated)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -5533,14 +5503,11 @@ impl CashDrawerCloseAlarm { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn AlarmTimeoutExpired<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn AlarmTimeoutExpired(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).AlarmTimeoutExpired)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).AlarmTimeoutExpired)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -5724,14 +5691,11 @@ pub struct CashDrawerEventSource(::windows::core::IUnknown); impl CashDrawerEventSource { #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn DrawerClosed<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn DrawerClosed(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).DrawerClosed)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).DrawerClosed)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -5742,14 +5706,11 @@ impl CashDrawerEventSource { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn DrawerOpened<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn DrawerOpened(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).DrawerOpened)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).DrawerOpened)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -6189,14 +6150,11 @@ impl ClaimedBarcodeScanner { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn DataReceived<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn DataReceived(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).DataReceived)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).DataReceived)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -6207,14 +6165,11 @@ impl ClaimedBarcodeScanner { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn TriggerPressed<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::EventHandler>>, - { + pub fn TriggerPressed(&self, handler: &super::super::Foundation::EventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).TriggerPressed)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).TriggerPressed)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -6225,14 +6180,11 @@ impl ClaimedBarcodeScanner { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn TriggerReleased<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::EventHandler>>, - { + pub fn TriggerReleased(&self, handler: &super::super::Foundation::EventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).TriggerReleased)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).TriggerReleased)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -6243,14 +6195,11 @@ impl ClaimedBarcodeScanner { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn ReleaseDeviceRequested<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::EventHandler>>, - { + pub fn ReleaseDeviceRequested(&self, handler: &super::super::Foundation::EventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).ReleaseDeviceRequested)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).ReleaseDeviceRequested)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -6261,14 +6210,11 @@ impl ClaimedBarcodeScanner { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn ImagePreviewReceived<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn ImagePreviewReceived(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).ImagePreviewReceived)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).ImagePreviewReceived)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -6279,14 +6225,11 @@ impl ClaimedBarcodeScanner { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn ErrorOccurred<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn ErrorOccurred(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).ErrorOccurred)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).ErrorOccurred)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -6324,14 +6267,11 @@ impl ClaimedBarcodeScanner { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn SetSymbologyAttributesAsync<'a, P0>(&self, barcodesymbology: u32, attributes: P0) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, BarcodeSymbologyAttributes>>, - { + pub fn SetSymbologyAttributesAsync(&self, barcodesymbology: u32, attributes: &BarcodeSymbologyAttributes) -> ::windows::core::Result> { let this = &::windows::core::Interface::cast::(self)?; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).SetSymbologyAttributesAsync)(::windows::core::Vtable::as_raw(this), barcodesymbology, attributes.into().abi(), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).SetSymbologyAttributesAsync)(::windows::core::Vtable::as_raw(this), barcodesymbology, ::core::mem::transmute_copy(attributes), result__.as_mut_ptr()).from_abi::>(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -6360,14 +6300,11 @@ impl ClaimedBarcodeScanner { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn Closed<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn Closed(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = &::windows::core::Interface::cast::(self)?; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).Closed)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).Closed)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -6633,14 +6570,11 @@ impl ClaimedCashDrawer { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn ReleaseDeviceRequested<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn ReleaseDeviceRequested(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).ReleaseDeviceRequested)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).ReleaseDeviceRequested)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -6651,14 +6585,11 @@ impl ClaimedCashDrawer { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn Closed<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn Closed(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = &::windows::core::Interface::cast::(self)?; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).Closed)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).Closed)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -7107,14 +7038,11 @@ impl ClaimedLineDisplay { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn ReleaseDeviceRequested<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn ReleaseDeviceRequested(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).ReleaseDeviceRequested)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).ReleaseDeviceRequested)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -7156,14 +7084,11 @@ impl ClaimedLineDisplay { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn StatusUpdated<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn StatusUpdated(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = &::windows::core::Interface::cast::(self)?; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).StatusUpdated)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).StatusUpdated)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -7215,14 +7140,11 @@ impl ClaimedLineDisplay { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn TryUpdateAttributesAsync<'a, P0>(&self, attributes: P0) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, LineDisplayAttributes>>, - { + pub fn TryUpdateAttributesAsync(&self, attributes: &LineDisplayAttributes) -> ::windows::core::Result> { let this = &::windows::core::Interface::cast::(self)?; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).TryUpdateAttributesAsync)(::windows::core::Vtable::as_raw(this), attributes.into().abi(), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).TryUpdateAttributesAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(attributes), result__.as_mut_ptr()).from_abi::>(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -7254,50 +7176,38 @@ impl ClaimedLineDisplay { } #[doc = "*Required features: `\"Foundation\"`, `\"Storage\"`*"] #[cfg(all(feature = "Foundation", feature = "Storage"))] - pub fn TryStoreStorageFileBitmapAsync<'a, P0>(&self, bitmap: P0) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Storage::StorageFile>>, - { + pub fn TryStoreStorageFileBitmapAsync(&self, bitmap: &super::super::Storage::StorageFile) -> ::windows::core::Result> { let this = &::windows::core::Interface::cast::(self)?; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).TryStoreStorageFileBitmapAsync)(::windows::core::Vtable::as_raw(this), bitmap.into().abi(), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).TryStoreStorageFileBitmapAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(bitmap), result__.as_mut_ptr()).from_abi::>(result__) } } #[doc = "*Required features: `\"Foundation\"`, `\"Storage\"`*"] #[cfg(all(feature = "Foundation", feature = "Storage"))] - pub fn TryStoreStorageFileBitmapWithAlignmentAsync<'a, P0>(&self, bitmap: P0, horizontalalignment: LineDisplayHorizontalAlignment, verticalalignment: LineDisplayVerticalAlignment) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Storage::StorageFile>>, - { + pub fn TryStoreStorageFileBitmapWithAlignmentAsync(&self, bitmap: &super::super::Storage::StorageFile, horizontalalignment: LineDisplayHorizontalAlignment, verticalalignment: LineDisplayVerticalAlignment) -> ::windows::core::Result> { let this = &::windows::core::Interface::cast::(self)?; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).TryStoreStorageFileBitmapWithAlignmentAsync)(::windows::core::Vtable::as_raw(this), bitmap.into().abi(), horizontalalignment, verticalalignment, result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).TryStoreStorageFileBitmapWithAlignmentAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(bitmap), horizontalalignment, verticalalignment, result__.as_mut_ptr()).from_abi::>(result__) } } #[doc = "*Required features: `\"Foundation\"`, `\"Storage\"`*"] #[cfg(all(feature = "Foundation", feature = "Storage"))] - pub fn TryStoreStorageFileBitmapWithAlignmentAndWidthAsync<'a, P0>(&self, bitmap: P0, horizontalalignment: LineDisplayHorizontalAlignment, verticalalignment: LineDisplayVerticalAlignment, widthinpixels: i32) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Storage::StorageFile>>, - { + pub fn TryStoreStorageFileBitmapWithAlignmentAndWidthAsync(&self, bitmap: &super::super::Storage::StorageFile, horizontalalignment: LineDisplayHorizontalAlignment, verticalalignment: LineDisplayVerticalAlignment, widthinpixels: i32) -> ::windows::core::Result> { let this = &::windows::core::Interface::cast::(self)?; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).TryStoreStorageFileBitmapWithAlignmentAndWidthAsync)(::windows::core::Vtable::as_raw(this), bitmap.into().abi(), horizontalalignment, verticalalignment, widthinpixels, result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).TryStoreStorageFileBitmapWithAlignmentAndWidthAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(bitmap), horizontalalignment, verticalalignment, widthinpixels, result__.as_mut_ptr()).from_abi::>(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn Closed<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn Closed(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = &::windows::core::Interface::cast::(self)?; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).Closed)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).Closed)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -7662,14 +7572,11 @@ impl ClaimedMagneticStripeReader { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn BankCardDataReceived<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn BankCardDataReceived(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).BankCardDataReceived)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).BankCardDataReceived)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -7680,14 +7587,11 @@ impl ClaimedMagneticStripeReader { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn AamvaCardDataReceived<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn AamvaCardDataReceived(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).AamvaCardDataReceived)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).AamvaCardDataReceived)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -7698,14 +7602,11 @@ impl ClaimedMagneticStripeReader { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn VendorSpecificDataReceived<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn VendorSpecificDataReceived(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).VendorSpecificDataReceived)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).VendorSpecificDataReceived)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -7716,14 +7617,11 @@ impl ClaimedMagneticStripeReader { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn ReleaseDeviceRequested<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::EventHandler>>, - { + pub fn ReleaseDeviceRequested(&self, handler: &super::super::Foundation::EventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).ReleaseDeviceRequested)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).ReleaseDeviceRequested)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -7734,14 +7632,11 @@ impl ClaimedMagneticStripeReader { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn ErrorOccurred<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn ErrorOccurred(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).ErrorOccurred)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).ErrorOccurred)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -7752,14 +7647,11 @@ impl ClaimedMagneticStripeReader { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn Closed<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn Closed(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = &::windows::core::Interface::cast::(self)?; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).Closed)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).Closed)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -8063,14 +7955,11 @@ impl ClaimedPosPrinter { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn ReleaseDeviceRequested<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn ReleaseDeviceRequested(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).ReleaseDeviceRequested)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).ReleaseDeviceRequested)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -8081,14 +7970,11 @@ impl ClaimedPosPrinter { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn Closed<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn Closed(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = &::windows::core::Interface::cast::(self)?; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).Closed)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).Closed)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -8810,12 +8696,9 @@ unsafe impl ::core::marker::Sync for ClaimedSlipPrinter {} #[repr(transparent)] pub struct JournalPrintJob(::windows::core::IUnknown); impl JournalPrintJob { - pub fn Print<'a, P0>(&self, data: &::windows::core::HSTRING, printoptions: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, PosPrinterPrintOptions>>, - { + pub fn Print(&self, data: &::windows::core::HSTRING, printoptions: &PosPrinterPrintOptions) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).Print)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(data), printoptions.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).Print)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(data), ::core::mem::transmute_copy(printoptions)).ok() } } pub fn FeedPaperByLine(&self, linecount: i32) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; @@ -9446,12 +9329,9 @@ impl LineDisplayAttributes { (::windows::core::Vtable::vtable(this).CurrentWindow)(::windows::core::Vtable::as_raw(this), result__.as_mut_ptr()).from_abi::(result__) } } - pub fn SetCurrentWindow<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, LineDisplayWindow>>, - { + pub fn SetCurrentWindow(&self, value: &LineDisplayWindow) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).SetCurrentWindow)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetCurrentWindow)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } } impl ::core::clone::Clone for LineDisplayAttributes { @@ -9775,14 +9655,11 @@ impl LineDisplayCursor { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn TryUpdateAttributesAsync<'a, P0>(&self, attributes: P0) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, LineDisplayCursorAttributes>>, - { + pub fn TryUpdateAttributesAsync(&self, attributes: &LineDisplayCursorAttributes) -> ::windows::core::Result> { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).TryUpdateAttributesAsync)(::windows::core::Vtable::as_raw(this), attributes.into().abi(), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).TryUpdateAttributesAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(attributes), result__.as_mut_ptr()).from_abi::>(result__) } } } @@ -10559,74 +10436,56 @@ impl LineDisplayWindow { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn TryDisplayStoredBitmapAtCursorAsync<'a, P0>(&self, bitmap: P0) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, LineDisplayStoredBitmap>>, - { + pub fn TryDisplayStoredBitmapAtCursorAsync(&self, bitmap: &LineDisplayStoredBitmap) -> ::windows::core::Result> { let this = &::windows::core::Interface::cast::(self)?; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).TryDisplayStoredBitmapAtCursorAsync)(::windows::core::Vtable::as_raw(this), bitmap.into().abi(), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).TryDisplayStoredBitmapAtCursorAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(bitmap), result__.as_mut_ptr()).from_abi::>(result__) } } #[doc = "*Required features: `\"Foundation\"`, `\"Storage\"`*"] #[cfg(all(feature = "Foundation", feature = "Storage"))] - pub fn TryDisplayStorageFileBitmapAtCursorAsync<'a, P0>(&self, bitmap: P0) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Storage::StorageFile>>, - { + pub fn TryDisplayStorageFileBitmapAtCursorAsync(&self, bitmap: &super::super::Storage::StorageFile) -> ::windows::core::Result> { let this = &::windows::core::Interface::cast::(self)?; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).TryDisplayStorageFileBitmapAtCursorAsync)(::windows::core::Vtable::as_raw(this), bitmap.into().abi(), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).TryDisplayStorageFileBitmapAtCursorAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(bitmap), result__.as_mut_ptr()).from_abi::>(result__) } } #[doc = "*Required features: `\"Foundation\"`, `\"Storage\"`*"] #[cfg(all(feature = "Foundation", feature = "Storage"))] - pub fn TryDisplayStorageFileBitmapAtCursorWithAlignmentAsync<'a, P0>(&self, bitmap: P0, horizontalalignment: LineDisplayHorizontalAlignment, verticalalignment: LineDisplayVerticalAlignment) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Storage::StorageFile>>, - { + pub fn TryDisplayStorageFileBitmapAtCursorWithAlignmentAsync(&self, bitmap: &super::super::Storage::StorageFile, horizontalalignment: LineDisplayHorizontalAlignment, verticalalignment: LineDisplayVerticalAlignment) -> ::windows::core::Result> { let this = &::windows::core::Interface::cast::(self)?; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).TryDisplayStorageFileBitmapAtCursorWithAlignmentAsync)(::windows::core::Vtable::as_raw(this), bitmap.into().abi(), horizontalalignment, verticalalignment, result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).TryDisplayStorageFileBitmapAtCursorWithAlignmentAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(bitmap), horizontalalignment, verticalalignment, result__.as_mut_ptr()).from_abi::>(result__) } } #[doc = "*Required features: `\"Foundation\"`, `\"Storage\"`*"] #[cfg(all(feature = "Foundation", feature = "Storage"))] - pub fn TryDisplayStorageFileBitmapAtCursorWithAlignmentAndWidthAsync<'a, P0>(&self, bitmap: P0, horizontalalignment: LineDisplayHorizontalAlignment, verticalalignment: LineDisplayVerticalAlignment, widthinpixels: i32) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Storage::StorageFile>>, - { + pub fn TryDisplayStorageFileBitmapAtCursorWithAlignmentAndWidthAsync(&self, bitmap: &super::super::Storage::StorageFile, horizontalalignment: LineDisplayHorizontalAlignment, verticalalignment: LineDisplayVerticalAlignment, widthinpixels: i32) -> ::windows::core::Result> { let this = &::windows::core::Interface::cast::(self)?; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).TryDisplayStorageFileBitmapAtCursorWithAlignmentAndWidthAsync)(::windows::core::Vtable::as_raw(this), bitmap.into().abi(), horizontalalignment, verticalalignment, widthinpixels, result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).TryDisplayStorageFileBitmapAtCursorWithAlignmentAndWidthAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(bitmap), horizontalalignment, verticalalignment, widthinpixels, result__.as_mut_ptr()).from_abi::>(result__) } } #[doc = "*Required features: `\"Foundation\"`, `\"Storage\"`*"] #[cfg(all(feature = "Foundation", feature = "Storage"))] - pub fn TryDisplayStorageFileBitmapAtPointAsync<'a, P0>(&self, bitmap: P0, offsetinpixels: super::super::Foundation::Point) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Storage::StorageFile>>, - { + pub fn TryDisplayStorageFileBitmapAtPointAsync(&self, bitmap: &super::super::Storage::StorageFile, offsetinpixels: super::super::Foundation::Point) -> ::windows::core::Result> { let this = &::windows::core::Interface::cast::(self)?; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).TryDisplayStorageFileBitmapAtPointAsync)(::windows::core::Vtable::as_raw(this), bitmap.into().abi(), offsetinpixels, result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).TryDisplayStorageFileBitmapAtPointAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(bitmap), offsetinpixels, result__.as_mut_ptr()).from_abi::>(result__) } } #[doc = "*Required features: `\"Foundation\"`, `\"Storage\"`*"] #[cfg(all(feature = "Foundation", feature = "Storage"))] - pub fn TryDisplayStorageFileBitmapAtPointWithWidthAsync<'a, P0>(&self, bitmap: P0, offsetinpixels: super::super::Foundation::Point, widthinpixels: i32) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Storage::StorageFile>>, - { + pub fn TryDisplayStorageFileBitmapAtPointWithWidthAsync(&self, bitmap: &super::super::Storage::StorageFile, offsetinpixels: super::super::Foundation::Point, widthinpixels: i32) -> ::windows::core::Result> { let this = &::windows::core::Interface::cast::(self)?; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).TryDisplayStorageFileBitmapAtPointWithWidthAsync)(::windows::core::Vtable::as_raw(this), bitmap.into().abi(), offsetinpixels, widthinpixels, result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).TryDisplayStorageFileBitmapAtPointWithWidthAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(bitmap), offsetinpixels, widthinpixels, result__.as_mut_ptr()).from_abi::>(result__) } } } @@ -10794,14 +10653,11 @@ impl MagneticStripeReader { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn StatusUpdated<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn StatusUpdated(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).StatusUpdated)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).StatusUpdated)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -12067,14 +11923,11 @@ impl PosPrinter { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn StatusUpdated<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn StatusUpdated(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).StatusUpdated)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).StatusUpdated)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -12972,39 +12825,27 @@ impl ReceiptPrintJob { } #[doc = "*Required features: `\"Graphics_Imaging\"`*"] #[cfg(feature = "Graphics_Imaging")] - pub fn SetBitmap<'a, P0>(&self, bitmapnumber: u32, bitmap: P0, alignment: PosPrinterAlignment) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Graphics::Imaging::BitmapFrame>>, - { + pub fn SetBitmap(&self, bitmapnumber: u32, bitmap: &super::super::Graphics::Imaging::BitmapFrame, alignment: PosPrinterAlignment) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).SetBitmap)(::windows::core::Vtable::as_raw(this), bitmapnumber, bitmap.into().abi(), alignment).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetBitmap)(::windows::core::Vtable::as_raw(this), bitmapnumber, ::core::mem::transmute_copy(bitmap), alignment).ok() } } #[doc = "*Required features: `\"Graphics_Imaging\"`*"] #[cfg(feature = "Graphics_Imaging")] - pub fn SetBitmapCustomWidthStandardAlign<'a, P0>(&self, bitmapnumber: u32, bitmap: P0, alignment: PosPrinterAlignment, width: u32) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Graphics::Imaging::BitmapFrame>>, - { + pub fn SetBitmapCustomWidthStandardAlign(&self, bitmapnumber: u32, bitmap: &super::super::Graphics::Imaging::BitmapFrame, alignment: PosPrinterAlignment, width: u32) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).SetBitmapCustomWidthStandardAlign)(::windows::core::Vtable::as_raw(this), bitmapnumber, bitmap.into().abi(), alignment, width).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetBitmapCustomWidthStandardAlign)(::windows::core::Vtable::as_raw(this), bitmapnumber, ::core::mem::transmute_copy(bitmap), alignment, width).ok() } } #[doc = "*Required features: `\"Graphics_Imaging\"`*"] #[cfg(feature = "Graphics_Imaging")] - pub fn SetCustomAlignedBitmap<'a, P0>(&self, bitmapnumber: u32, bitmap: P0, alignmentdistance: u32) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Graphics::Imaging::BitmapFrame>>, - { + pub fn SetCustomAlignedBitmap(&self, bitmapnumber: u32, bitmap: &super::super::Graphics::Imaging::BitmapFrame, alignmentdistance: u32) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).SetCustomAlignedBitmap)(::windows::core::Vtable::as_raw(this), bitmapnumber, bitmap.into().abi(), alignmentdistance).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetCustomAlignedBitmap)(::windows::core::Vtable::as_raw(this), bitmapnumber, ::core::mem::transmute_copy(bitmap), alignmentdistance).ok() } } #[doc = "*Required features: `\"Graphics_Imaging\"`*"] #[cfg(feature = "Graphics_Imaging")] - pub fn SetBitmapCustomWidthCustomAlign<'a, P0>(&self, bitmapnumber: u32, bitmap: P0, alignmentdistance: u32, width: u32) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Graphics::Imaging::BitmapFrame>>, - { + pub fn SetBitmapCustomWidthCustomAlign(&self, bitmapnumber: u32, bitmap: &super::super::Graphics::Imaging::BitmapFrame, alignmentdistance: u32, width: u32) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).SetBitmapCustomWidthCustomAlign)(::windows::core::Vtable::as_raw(this), bitmapnumber, bitmap.into().abi(), alignmentdistance, width).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetBitmapCustomWidthCustomAlign)(::windows::core::Vtable::as_raw(this), bitmapnumber, ::core::mem::transmute_copy(bitmap), alignmentdistance, width).ok() } } pub fn PrintSavedBitmap(&self, bitmapnumber: u32) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; @@ -13024,39 +12865,27 @@ impl ReceiptPrintJob { } #[doc = "*Required features: `\"Graphics_Imaging\"`*"] #[cfg(feature = "Graphics_Imaging")] - pub fn PrintBitmap<'a, P0>(&self, bitmap: P0, alignment: PosPrinterAlignment) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Graphics::Imaging::BitmapFrame>>, - { + pub fn PrintBitmap(&self, bitmap: &super::super::Graphics::Imaging::BitmapFrame, alignment: PosPrinterAlignment) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).PrintBitmap)(::windows::core::Vtable::as_raw(this), bitmap.into().abi(), alignment).ok() } + unsafe { (::windows::core::Vtable::vtable(this).PrintBitmap)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(bitmap), alignment).ok() } } #[doc = "*Required features: `\"Graphics_Imaging\"`*"] #[cfg(feature = "Graphics_Imaging")] - pub fn PrintBitmapCustomWidthStandardAlign<'a, P0>(&self, bitmap: P0, alignment: PosPrinterAlignment, width: u32) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Graphics::Imaging::BitmapFrame>>, - { + pub fn PrintBitmapCustomWidthStandardAlign(&self, bitmap: &super::super::Graphics::Imaging::BitmapFrame, alignment: PosPrinterAlignment, width: u32) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).PrintBitmapCustomWidthStandardAlign)(::windows::core::Vtable::as_raw(this), bitmap.into().abi(), alignment, width).ok() } + unsafe { (::windows::core::Vtable::vtable(this).PrintBitmapCustomWidthStandardAlign)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(bitmap), alignment, width).ok() } } #[doc = "*Required features: `\"Graphics_Imaging\"`*"] #[cfg(feature = "Graphics_Imaging")] - pub fn PrintCustomAlignedBitmap<'a, P0>(&self, bitmap: P0, alignmentdistance: u32) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Graphics::Imaging::BitmapFrame>>, - { + pub fn PrintCustomAlignedBitmap(&self, bitmap: &super::super::Graphics::Imaging::BitmapFrame, alignmentdistance: u32) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).PrintCustomAlignedBitmap)(::windows::core::Vtable::as_raw(this), bitmap.into().abi(), alignmentdistance).ok() } + unsafe { (::windows::core::Vtable::vtable(this).PrintCustomAlignedBitmap)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(bitmap), alignmentdistance).ok() } } #[doc = "*Required features: `\"Graphics_Imaging\"`*"] #[cfg(feature = "Graphics_Imaging")] - pub fn PrintBitmapCustomWidthCustomAlign<'a, P0>(&self, bitmap: P0, alignmentdistance: u32, width: u32) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Graphics::Imaging::BitmapFrame>>, - { + pub fn PrintBitmapCustomWidthCustomAlign(&self, bitmap: &super::super::Graphics::Imaging::BitmapFrame, alignmentdistance: u32, width: u32) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).PrintBitmapCustomWidthCustomAlign)(::windows::core::Vtable::as_raw(this), bitmap.into().abi(), alignmentdistance, width).ok() } + unsafe { (::windows::core::Vtable::vtable(this).PrintBitmapCustomWidthCustomAlign)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(bitmap), alignmentdistance, width).ok() } } pub fn MarkFeed(&self, kind: PosPrinterMarkFeedKind) -> ::windows::core::Result<()> { let this = self; @@ -13074,12 +12903,9 @@ impl ReceiptPrintJob { let this = &::windows::core::Interface::cast::(self)?; unsafe { (::windows::core::Vtable::vtable(this).StampPaper)(::windows::core::Vtable::as_raw(this)).ok() } } - pub fn Print2<'a, P0>(&self, data: &::windows::core::HSTRING, printoptions: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, PosPrinterPrintOptions>>, - { + pub fn Print2(&self, data: &::windows::core::HSTRING, printoptions: &PosPrinterPrintOptions) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).Print)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(data), printoptions.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).Print)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(data), ::core::mem::transmute_copy(printoptions)).ok() } } pub fn FeedPaperByLine(&self, linecount: i32) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; @@ -13563,39 +13389,27 @@ impl SlipPrintJob { } #[doc = "*Required features: `\"Graphics_Imaging\"`*"] #[cfg(feature = "Graphics_Imaging")] - pub fn SetBitmap<'a, P0>(&self, bitmapnumber: u32, bitmap: P0, alignment: PosPrinterAlignment) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Graphics::Imaging::BitmapFrame>>, - { + pub fn SetBitmap(&self, bitmapnumber: u32, bitmap: &super::super::Graphics::Imaging::BitmapFrame, alignment: PosPrinterAlignment) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).SetBitmap)(::windows::core::Vtable::as_raw(this), bitmapnumber, bitmap.into().abi(), alignment).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetBitmap)(::windows::core::Vtable::as_raw(this), bitmapnumber, ::core::mem::transmute_copy(bitmap), alignment).ok() } } #[doc = "*Required features: `\"Graphics_Imaging\"`*"] #[cfg(feature = "Graphics_Imaging")] - pub fn SetBitmapCustomWidthStandardAlign<'a, P0>(&self, bitmapnumber: u32, bitmap: P0, alignment: PosPrinterAlignment, width: u32) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Graphics::Imaging::BitmapFrame>>, - { + pub fn SetBitmapCustomWidthStandardAlign(&self, bitmapnumber: u32, bitmap: &super::super::Graphics::Imaging::BitmapFrame, alignment: PosPrinterAlignment, width: u32) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).SetBitmapCustomWidthStandardAlign)(::windows::core::Vtable::as_raw(this), bitmapnumber, bitmap.into().abi(), alignment, width).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetBitmapCustomWidthStandardAlign)(::windows::core::Vtable::as_raw(this), bitmapnumber, ::core::mem::transmute_copy(bitmap), alignment, width).ok() } } #[doc = "*Required features: `\"Graphics_Imaging\"`*"] #[cfg(feature = "Graphics_Imaging")] - pub fn SetCustomAlignedBitmap<'a, P0>(&self, bitmapnumber: u32, bitmap: P0, alignmentdistance: u32) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Graphics::Imaging::BitmapFrame>>, - { + pub fn SetCustomAlignedBitmap(&self, bitmapnumber: u32, bitmap: &super::super::Graphics::Imaging::BitmapFrame, alignmentdistance: u32) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).SetCustomAlignedBitmap)(::windows::core::Vtable::as_raw(this), bitmapnumber, bitmap.into().abi(), alignmentdistance).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetCustomAlignedBitmap)(::windows::core::Vtable::as_raw(this), bitmapnumber, ::core::mem::transmute_copy(bitmap), alignmentdistance).ok() } } #[doc = "*Required features: `\"Graphics_Imaging\"`*"] #[cfg(feature = "Graphics_Imaging")] - pub fn SetBitmapCustomWidthCustomAlign<'a, P0>(&self, bitmapnumber: u32, bitmap: P0, alignmentdistance: u32, width: u32) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Graphics::Imaging::BitmapFrame>>, - { + pub fn SetBitmapCustomWidthCustomAlign(&self, bitmapnumber: u32, bitmap: &super::super::Graphics::Imaging::BitmapFrame, alignmentdistance: u32, width: u32) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).SetBitmapCustomWidthCustomAlign)(::windows::core::Vtable::as_raw(this), bitmapnumber, bitmap.into().abi(), alignmentdistance, width).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetBitmapCustomWidthCustomAlign)(::windows::core::Vtable::as_raw(this), bitmapnumber, ::core::mem::transmute_copy(bitmap), alignmentdistance, width).ok() } } pub fn PrintSavedBitmap(&self, bitmapnumber: u32) -> ::windows::core::Result<()> { let this = self; @@ -13615,46 +13429,31 @@ impl SlipPrintJob { } #[doc = "*Required features: `\"Graphics_Imaging\"`*"] #[cfg(feature = "Graphics_Imaging")] - pub fn PrintBitmap<'a, P0>(&self, bitmap: P0, alignment: PosPrinterAlignment) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Graphics::Imaging::BitmapFrame>>, - { + pub fn PrintBitmap(&self, bitmap: &super::super::Graphics::Imaging::BitmapFrame, alignment: PosPrinterAlignment) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).PrintBitmap)(::windows::core::Vtable::as_raw(this), bitmap.into().abi(), alignment).ok() } + unsafe { (::windows::core::Vtable::vtable(this).PrintBitmap)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(bitmap), alignment).ok() } } #[doc = "*Required features: `\"Graphics_Imaging\"`*"] #[cfg(feature = "Graphics_Imaging")] - pub fn PrintBitmapCustomWidthStandardAlign<'a, P0>(&self, bitmap: P0, alignment: PosPrinterAlignment, width: u32) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Graphics::Imaging::BitmapFrame>>, - { + pub fn PrintBitmapCustomWidthStandardAlign(&self, bitmap: &super::super::Graphics::Imaging::BitmapFrame, alignment: PosPrinterAlignment, width: u32) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).PrintBitmapCustomWidthStandardAlign)(::windows::core::Vtable::as_raw(this), bitmap.into().abi(), alignment, width).ok() } + unsafe { (::windows::core::Vtable::vtable(this).PrintBitmapCustomWidthStandardAlign)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(bitmap), alignment, width).ok() } } #[doc = "*Required features: `\"Graphics_Imaging\"`*"] #[cfg(feature = "Graphics_Imaging")] - pub fn PrintCustomAlignedBitmap<'a, P0>(&self, bitmap: P0, alignmentdistance: u32) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Graphics::Imaging::BitmapFrame>>, - { + pub fn PrintCustomAlignedBitmap(&self, bitmap: &super::super::Graphics::Imaging::BitmapFrame, alignmentdistance: u32) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).PrintCustomAlignedBitmap)(::windows::core::Vtable::as_raw(this), bitmap.into().abi(), alignmentdistance).ok() } + unsafe { (::windows::core::Vtable::vtable(this).PrintCustomAlignedBitmap)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(bitmap), alignmentdistance).ok() } } #[doc = "*Required features: `\"Graphics_Imaging\"`*"] #[cfg(feature = "Graphics_Imaging")] - pub fn PrintBitmapCustomWidthCustomAlign<'a, P0>(&self, bitmap: P0, alignmentdistance: u32, width: u32) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Graphics::Imaging::BitmapFrame>>, - { + pub fn PrintBitmapCustomWidthCustomAlign(&self, bitmap: &super::super::Graphics::Imaging::BitmapFrame, alignmentdistance: u32, width: u32) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).PrintBitmapCustomWidthCustomAlign)(::windows::core::Vtable::as_raw(this), bitmap.into().abi(), alignmentdistance, width).ok() } + unsafe { (::windows::core::Vtable::vtable(this).PrintBitmapCustomWidthCustomAlign)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(bitmap), alignmentdistance, width).ok() } } - pub fn Print2<'a, P0>(&self, data: &::windows::core::HSTRING, printoptions: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, PosPrinterPrintOptions>>, - { + pub fn Print2(&self, data: &::windows::core::HSTRING, printoptions: &PosPrinterPrintOptions) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).Print)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(data), printoptions.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).Print)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(data), ::core::mem::transmute_copy(printoptions)).ok() } } pub fn FeedPaperByLine(&self, linecount: i32) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; diff --git a/crates/libs/windows/src/Windows/Devices/Power/mod.rs b/crates/libs/windows/src/Windows/Devices/Power/mod.rs index 7f99f11603..09a9092fd5 100644 --- a/crates/libs/windows/src/Windows/Devices/Power/mod.rs +++ b/crates/libs/windows/src/Windows/Devices/Power/mod.rs @@ -96,14 +96,11 @@ impl Battery { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn ReportUpdated<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn ReportUpdated(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).ReportUpdated)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).ReportUpdated)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] diff --git a/crates/libs/windows/src/Windows/Devices/Printers/Extensions/mod.rs b/crates/libs/windows/src/Windows/Devices/Printers/Extensions/mod.rs index 60f51672b3..5a65ac1217 100644 --- a/crates/libs/windows/src/Windows/Devices/Printers/Extensions/mod.rs +++ b/crates/libs/windows/src/Windows/Devices/Printers/Extensions/mod.rs @@ -216,14 +216,11 @@ impl Print3DWorkflow { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn PrintRequested<'a, P0>(&self, eventhandler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Foundation::TypedEventHandler>>, - { + pub fn PrintRequested(&self, eventhandler: &super::super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).PrintRequested)(::windows::core::Vtable::as_raw(this), eventhandler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).PrintRequested)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(eventhandler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -234,14 +231,11 @@ impl Print3DWorkflow { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn PrinterChanged<'a, P0>(&self, eventhandler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Foundation::TypedEventHandler>>, - { + pub fn PrinterChanged(&self, eventhandler: &super::super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = &::windows::core::Interface::cast::(self)?; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).PrinterChanged)(::windows::core::Vtable::as_raw(this), eventhandler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).PrinterChanged)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(eventhandler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -600,14 +594,11 @@ impl PrintTaskConfiguration { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn SaveRequested<'a, P0>(&self, eventhandler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Foundation::TypedEventHandler>>, - { + pub fn SaveRequested(&self, eventhandler: &super::super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).SaveRequested)(::windows::core::Vtable::as_raw(this), eventhandler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).SaveRequested)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(eventhandler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] diff --git a/crates/libs/windows/src/Windows/Devices/Printers/mod.rs b/crates/libs/windows/src/Windows/Devices/Printers/mod.rs index c433e1b82a..ba91a32561 100644 --- a/crates/libs/windows/src/Windows/Devices/Printers/mod.rs +++ b/crates/libs/windows/src/Windows/Devices/Printers/mod.rs @@ -815,13 +815,10 @@ impl IppAttributeValue { (::windows::core::Vtable::vtable(this).CreateDateTimeArray)(::windows::core::Vtable::as_raw(this), values.try_into().map_err(|e| e.into())?.abi(), result__.as_mut_ptr()).from_abi::(result__) }) } - pub fn CreateResolution<'a, P0>(value: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, IppResolution>>, - { + pub fn CreateResolution(value: &IppResolution) -> ::windows::core::Result { Self::IIppAttributeValueStatics(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).CreateResolution)(::windows::core::Vtable::as_raw(this), value.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).CreateResolution)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value), result__.as_mut_ptr()).from_abi::(result__) }) } #[doc = "*Required features: `\"Foundation_Collections\"`*"] @@ -836,13 +833,10 @@ impl IppAttributeValue { (::windows::core::Vtable::vtable(this).CreateResolutionArray)(::windows::core::Vtable::as_raw(this), values.try_into().map_err(|e| e.into())?.abi(), result__.as_mut_ptr()).from_abi::(result__) }) } - pub fn CreateRangeOfInteger<'a, P0>(value: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, IppIntegerRange>>, - { + pub fn CreateRangeOfInteger(value: &IppIntegerRange) -> ::windows::core::Result { Self::IIppAttributeValueStatics(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).CreateRangeOfInteger)(::windows::core::Vtable::as_raw(this), value.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).CreateRangeOfInteger)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value), result__.as_mut_ptr()).from_abi::(result__) }) } #[doc = "*Required features: `\"Foundation_Collections\"`*"] @@ -881,13 +875,10 @@ impl IppAttributeValue { (::windows::core::Vtable::vtable(this).CreateCollectionArray)(::windows::core::Vtable::as_raw(this), memberattributesarray.try_into().map_err(|e| e.into())?.abi(), result__.as_mut_ptr()).from_abi::(result__) }) } - pub fn CreateTextWithLanguage<'a, P0>(value: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, IppTextWithLanguage>>, - { + pub fn CreateTextWithLanguage(value: &IppTextWithLanguage) -> ::windows::core::Result { Self::IIppAttributeValueStatics(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).CreateTextWithLanguage)(::windows::core::Vtable::as_raw(this), value.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).CreateTextWithLanguage)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value), result__.as_mut_ptr()).from_abi::(result__) }) } #[doc = "*Required features: `\"Foundation_Collections\"`*"] @@ -902,13 +893,10 @@ impl IppAttributeValue { (::windows::core::Vtable::vtable(this).CreateTextWithLanguageArray)(::windows::core::Vtable::as_raw(this), values.try_into().map_err(|e| e.into())?.abi(), result__.as_mut_ptr()).from_abi::(result__) }) } - pub fn CreateNameWithLanguage<'a, P0>(value: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, IppTextWithLanguage>>, - { + pub fn CreateNameWithLanguage(value: &IppTextWithLanguage) -> ::windows::core::Result { Self::IIppAttributeValueStatics(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).CreateNameWithLanguage)(::windows::core::Vtable::as_raw(this), value.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).CreateNameWithLanguage)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value), result__.as_mut_ptr()).from_abi::(result__) }) } #[doc = "*Required features: `\"Foundation_Collections\"`*"] @@ -979,13 +967,10 @@ impl IppAttributeValue { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn CreateUri<'a, P0>(value: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::Uri>>, - { + pub fn CreateUri(value: &super::super::Foundation::Uri) -> ::windows::core::Result { Self::IIppAttributeValueStatics(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).CreateUri)(::windows::core::Vtable::as_raw(this), value.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).CreateUri)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value), result__.as_mut_ptr()).from_abi::(result__) }) } #[doc = "*Required features: `\"Foundation_Collections\"`*"] diff --git a/crates/libs/windows/src/Windows/Devices/Radios/mod.rs b/crates/libs/windows/src/Windows/Devices/Radios/mod.rs index 579e966172..2dcc7e8e8d 100644 --- a/crates/libs/windows/src/Windows/Devices/Radios/mod.rs +++ b/crates/libs/windows/src/Windows/Devices/Radios/mod.rs @@ -69,14 +69,11 @@ impl Radio { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn StateChanged<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn StateChanged(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).StateChanged)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).StateChanged)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] diff --git a/crates/libs/windows/src/Windows/Devices/Scanners/mod.rs b/crates/libs/windows/src/Windows/Devices/Scanners/mod.rs index 3d85d4ac89..5f7b26d5e6 100644 --- a/crates/libs/windows/src/Windows/Devices/Scanners/mod.rs +++ b/crates/libs/windows/src/Windows/Devices/Scanners/mod.rs @@ -642,14 +642,11 @@ impl ImageScanner { } #[doc = "*Required features: `\"Foundation\"`, `\"Storage\"`*"] #[cfg(all(feature = "Foundation", feature = "Storage"))] - pub fn ScanFilesToFolderAsync<'a, P0>(&self, scansource: ImageScannerScanSource, storagefolder: P0) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Storage::StorageFolder>>, - { + pub fn ScanFilesToFolderAsync(&self, scansource: ImageScannerScanSource, storagefolder: &super::super::Storage::StorageFolder) -> ::windows::core::Result> { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).ScanFilesToFolderAsync)(::windows::core::Vtable::as_raw(this), scansource, storagefolder.into().abi(), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).ScanFilesToFolderAsync)(::windows::core::Vtable::as_raw(this), scansource, ::core::mem::transmute_copy(storagefolder), result__.as_mut_ptr()).from_abi::>(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] diff --git a/crates/libs/windows/src/Windows/Devices/Sensors/Custom/mod.rs b/crates/libs/windows/src/Windows/Devices/Sensors/Custom/mod.rs index 78ad3b32b0..504fc2de89 100644 --- a/crates/libs/windows/src/Windows/Devices/Sensors/Custom/mod.rs +++ b/crates/libs/windows/src/Windows/Devices/Sensors/Custom/mod.rs @@ -154,14 +154,11 @@ impl CustomSensor { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn ReadingChanged<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Foundation::TypedEventHandler>>, - { + pub fn ReadingChanged(&self, handler: &super::super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).ReadingChanged)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).ReadingChanged)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] diff --git a/crates/libs/windows/src/Windows/Devices/Sensors/mod.rs b/crates/libs/windows/src/Windows/Devices/Sensors/mod.rs index ed8d255972..35a0fb46a8 100644 --- a/crates/libs/windows/src/Windows/Devices/Sensors/mod.rs +++ b/crates/libs/windows/src/Windows/Devices/Sensors/mod.rs @@ -2602,14 +2602,11 @@ impl Accelerometer { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn ReadingChanged<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn ReadingChanged(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).ReadingChanged)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).ReadingChanged)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -2620,14 +2617,11 @@ impl Accelerometer { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn Shaken<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn Shaken(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).Shaken)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).Shaken)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -3223,14 +3217,11 @@ impl ActivitySensor { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn ReadingChanged<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn ReadingChanged(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).ReadingChanged)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).ReadingChanged)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -3707,14 +3698,11 @@ impl Altimeter { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn ReadingChanged<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn ReadingChanged(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).ReadingChanged)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).ReadingChanged)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -4034,14 +4022,11 @@ impl Barometer { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn ReadingChanged<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn ReadingChanged(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).ReadingChanged)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).ReadingChanged)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -4460,14 +4445,11 @@ impl Compass { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn ReadingChanged<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn ReadingChanged(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).ReadingChanged)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).ReadingChanged)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -4924,14 +4906,11 @@ impl Gyrometer { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn ReadingChanged<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn ReadingChanged(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).ReadingChanged)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).ReadingChanged)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -5511,14 +5490,11 @@ impl HingeAngleSensor { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn ReadingChanged<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn ReadingChanged(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).ReadingChanged)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).ReadingChanged)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -5734,14 +5710,11 @@ impl Inclinometer { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn ReadingChanged<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn ReadingChanged(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).ReadingChanged)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).ReadingChanged)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -6254,14 +6227,11 @@ impl LightSensor { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn ReadingChanged<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn ReadingChanged(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).ReadingChanged)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).ReadingChanged)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -6698,14 +6668,11 @@ impl Magnetometer { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn ReadingChanged<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn ReadingChanged(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).ReadingChanged)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).ReadingChanged)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -7189,14 +7156,11 @@ impl OrientationSensor { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn ReadingChanged<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn ReadingChanged(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).ReadingChanged)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).ReadingChanged)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -7612,14 +7576,11 @@ impl Pedometer { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn ReadingChanged<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn ReadingChanged(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).ReadingChanged)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).ReadingChanged)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -7677,13 +7638,10 @@ impl Pedometer { } #[doc = "*Required features: `\"Foundation_Collections\"`*"] #[cfg(feature = "Foundation_Collections")] - pub fn GetReadingsFromTriggerDetails<'a, P0>(triggerdetails: P0) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, SensorDataThresholdTriggerDetails>>, - { + pub fn GetReadingsFromTriggerDetails(triggerdetails: &SensorDataThresholdTriggerDetails) -> ::windows::core::Result> { Self::IPedometerStatics2(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).GetReadingsFromTriggerDetails)(::windows::core::Vtable::as_raw(this), triggerdetails.into().abi(), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).GetReadingsFromTriggerDetails)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(triggerdetails), result__.as_mut_ptr()).from_abi::>(result__) }) } #[doc(hidden)] @@ -7765,13 +7723,10 @@ unsafe impl ::core::marker::Sync for Pedometer {} #[repr(transparent)] pub struct PedometerDataThreshold(::windows::core::IUnknown); impl PedometerDataThreshold { - pub fn Create<'a, P0>(sensor: P0, stepgoal: i32) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, Pedometer>>, - { + pub fn Create(sensor: &Pedometer, stepgoal: i32) -> ::windows::core::Result { Self::IPedometerDataThresholdFactory(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).Create)(::windows::core::Vtable::as_raw(this), sensor.into().abi(), stepgoal, result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).Create)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(sensor), stepgoal, result__.as_mut_ptr()).from_abi::(result__) }) } #[doc(hidden)] @@ -8078,14 +8033,11 @@ impl ProximitySensor { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn ReadingChanged<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn ReadingChanged(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).ReadingChanged)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).ReadingChanged)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -8117,13 +8069,10 @@ impl ProximitySensor { } #[doc = "*Required features: `\"Foundation_Collections\"`*"] #[cfg(feature = "Foundation_Collections")] - pub fn GetReadingsFromTriggerDetails<'a, P0>(triggerdetails: P0) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, SensorDataThresholdTriggerDetails>>, - { + pub fn GetReadingsFromTriggerDetails(triggerdetails: &SensorDataThresholdTriggerDetails) -> ::windows::core::Result> { Self::IProximitySensorStatics2(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).GetReadingsFromTriggerDetails)(::windows::core::Vtable::as_raw(this), triggerdetails.into().abi(), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).GetReadingsFromTriggerDetails)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(triggerdetails), result__.as_mut_ptr()).from_abi::>(result__) }) } #[doc(hidden)] @@ -8205,13 +8154,10 @@ unsafe impl ::core::marker::Sync for ProximitySensor {} #[repr(transparent)] pub struct ProximitySensorDataThreshold(::windows::core::IUnknown); impl ProximitySensorDataThreshold { - pub fn Create<'a, P0>(sensor: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, ProximitySensor>>, - { + pub fn Create(sensor: &ProximitySensor) -> ::windows::core::Result { Self::IProximitySensorDataThresholdFactory(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).Create)(::windows::core::Vtable::as_raw(this), sensor.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).Create)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(sensor), result__.as_mut_ptr()).from_abi::(result__) }) } #[doc(hidden)] @@ -8913,14 +8859,11 @@ impl SimpleOrientationSensor { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn OrientationChanged<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn OrientationChanged(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).OrientationChanged)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).OrientationChanged)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] diff --git a/crates/libs/windows/src/Windows/Devices/SerialCommunication/mod.rs b/crates/libs/windows/src/Windows/Devices/SerialCommunication/mod.rs index 6dee519ab1..7107edf7b4 100644 --- a/crates/libs/windows/src/Windows/Devices/SerialCommunication/mod.rs +++ b/crates/libs/windows/src/Windows/Devices/SerialCommunication/mod.rs @@ -475,14 +475,11 @@ impl SerialDevice { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn ErrorReceived<'a, P0>(&self, reporthandler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn ErrorReceived(&self, reporthandler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).ErrorReceived)(::windows::core::Vtable::as_raw(this), reporthandler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).ErrorReceived)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(reporthandler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -493,14 +490,11 @@ impl SerialDevice { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn PinChanged<'a, P0>(&self, reporthandler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn PinChanged(&self, reporthandler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).PinChanged)(::windows::core::Vtable::as_raw(this), reporthandler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).PinChanged)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(reporthandler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] diff --git a/crates/libs/windows/src/Windows/Devices/SmartCards/mod.rs b/crates/libs/windows/src/Windows/Devices/SmartCards/mod.rs index f6feb7b017..0af2ad46e5 100644 --- a/crates/libs/windows/src/Windows/Devices/SmartCards/mod.rs +++ b/crates/libs/windows/src/Windows/Devices/SmartCards/mod.rs @@ -1797,14 +1797,11 @@ impl SmartCardAppletIdGroupRegistration { } #[doc = "*Required features: `\"Foundation_Collections\"`*"] #[cfg(feature = "Foundation_Collections")] - pub fn SetPropertiesAsync<'a, P0>(&self, props: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::Collections::ValueSet>>, - { + pub fn SetPropertiesAsync(&self, props: &super::super::Foundation::Collections::ValueSet) -> ::windows::core::Result { let this = &::windows::core::Interface::cast::(self)?; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).SetPropertiesAsync)(::windows::core::Vtable::as_raw(this), props.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).SetPropertiesAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(props), result__.as_mut_ptr()).from_abi::(result__) } } } @@ -3345,12 +3342,9 @@ impl SmartCardCryptogramPlacementStep { (::windows::core::Vtable::vtable(this).ChainedOutputStep)(::windows::core::Vtable::as_raw(this), result__.as_mut_ptr()).from_abi::(result__) } } - pub fn SetChainedOutputStep<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, SmartCardCryptogramPlacementStep>>, - { + pub fn SetChainedOutputStep(&self, value: &SmartCardCryptogramPlacementStep) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).SetChainedOutputStep)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetChainedOutputStep)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } } impl ::core::clone::Clone for SmartCardCryptogramPlacementStep { @@ -3669,14 +3663,11 @@ impl SmartCardEmulator { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn ApduReceived<'a, P0>(&self, value: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn ApduReceived(&self, value: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = &::windows::core::Interface::cast::(self)?; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).ApduReceived)(::windows::core::Vtable::as_raw(this), value.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).ApduReceived)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -3687,14 +3678,11 @@ impl SmartCardEmulator { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn ConnectionDeactivated<'a, P0>(&self, value: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn ConnectionDeactivated(&self, value: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = &::windows::core::Interface::cast::(self)?; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).ConnectionDeactivated)(::windows::core::Vtable::as_raw(this), value.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).ConnectionDeactivated)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -3732,24 +3720,18 @@ impl SmartCardEmulator { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn RegisterAppletIdGroupAsync<'a, P0>(appletidgroup: P0) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, SmartCardAppletIdGroup>>, - { + pub fn RegisterAppletIdGroupAsync(appletidgroup: &SmartCardAppletIdGroup) -> ::windows::core::Result> { Self::ISmartCardEmulatorStatics2(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).RegisterAppletIdGroupAsync)(::windows::core::Vtable::as_raw(this), appletidgroup.into().abi(), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).RegisterAppletIdGroupAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(appletidgroup), result__.as_mut_ptr()).from_abi::>(result__) }) } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn UnregisterAppletIdGroupAsync<'a, P0>(registration: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, SmartCardAppletIdGroupRegistration>>, - { + pub fn UnregisterAppletIdGroupAsync(registration: &SmartCardAppletIdGroupRegistration) -> ::windows::core::Result { Self::ISmartCardEmulatorStatics2(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).UnregisterAppletIdGroupAsync)(::windows::core::Vtable::as_raw(this), registration.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).UnregisterAppletIdGroupAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(registration), result__.as_mut_ptr()).from_abi::(result__) }) } pub fn MaxAppletIdGroupRegistrations() -> ::windows::core::Result { @@ -4537,14 +4519,11 @@ impl SmartCardProvisioning { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn RequestPinResetAsync<'a, P0>(&self, handler: P0) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, SmartCardPinResetHandler>>, - { + pub fn RequestPinResetAsync(&self, handler: &SmartCardPinResetHandler) -> ::windows::core::Result> { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).RequestPinResetAsync)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).RequestPinResetAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::>(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -4558,76 +4537,66 @@ impl SmartCardProvisioning { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn FromSmartCardAsync<'a, P0>(card: P0) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, SmartCard>>, - { + pub fn FromSmartCardAsync(card: &SmartCard) -> ::windows::core::Result> { Self::ISmartCardProvisioningStatics(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).FromSmartCardAsync)(::windows::core::Vtable::as_raw(this), card.into().abi(), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).FromSmartCardAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(card), result__.as_mut_ptr()).from_abi::>(result__) }) } #[doc = "*Required features: `\"Foundation\"`, `\"Storage_Streams\"`*"] #[cfg(all(feature = "Foundation", feature = "Storage_Streams"))] - pub fn RequestVirtualSmartCardCreationAsync<'a, P0, E0, P1>(friendlyname: &::windows::core::HSTRING, administrativekey: P0, pinpolicy: P1) -> ::windows::core::Result> + pub fn RequestVirtualSmartCardCreationAsync<'a, P0, E0>(friendlyname: &::windows::core::HSTRING, administrativekey: P0, pinpolicy: &SmartCardPinPolicy) -> ::windows::core::Result> where P0: ::std::convert::TryInto<::windows::core::InParam<'a, super::super::Storage::Streams::IBuffer>, Error = E0>, E0: ::std::convert::Into<::windows::core::Error>, - P1: ::std::convert::Into<::windows::core::InParam<'a, SmartCardPinPolicy>>, { Self::ISmartCardProvisioningStatics(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).RequestVirtualSmartCardCreationAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(friendlyname), administrativekey.try_into().map_err(|e| e.into())?.abi(), pinpolicy.into().abi(), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).RequestVirtualSmartCardCreationAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(friendlyname), administrativekey.try_into().map_err(|e| e.into())?.abi(), ::core::mem::transmute_copy(pinpolicy), result__.as_mut_ptr()).from_abi::>(result__) }) } #[doc = "*Required features: `\"Foundation\"`, `\"Storage_Streams\"`*"] #[cfg(all(feature = "Foundation", feature = "Storage_Streams"))] - pub fn RequestVirtualSmartCardCreationAsyncWithCardId<'a, P0, E0, P1>(friendlyname: &::windows::core::HSTRING, administrativekey: P0, pinpolicy: P1, cardid: ::windows::core::GUID) -> ::windows::core::Result> + pub fn RequestVirtualSmartCardCreationAsyncWithCardId<'a, P0, E0>(friendlyname: &::windows::core::HSTRING, administrativekey: P0, pinpolicy: &SmartCardPinPolicy, cardid: ::windows::core::GUID) -> ::windows::core::Result> where P0: ::std::convert::TryInto<::windows::core::InParam<'a, super::super::Storage::Streams::IBuffer>, Error = E0>, E0: ::std::convert::Into<::windows::core::Error>, - P1: ::std::convert::Into<::windows::core::InParam<'a, SmartCardPinPolicy>>, { Self::ISmartCardProvisioningStatics(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).RequestVirtualSmartCardCreationAsyncWithCardId)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(friendlyname), administrativekey.try_into().map_err(|e| e.into())?.abi(), pinpolicy.into().abi(), cardid, result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).RequestVirtualSmartCardCreationAsyncWithCardId)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(friendlyname), administrativekey.try_into().map_err(|e| e.into())?.abi(), ::core::mem::transmute_copy(pinpolicy), cardid, result__.as_mut_ptr()).from_abi::>(result__) }) } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn RequestVirtualSmartCardDeletionAsync<'a, P0>(card: P0) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, SmartCard>>, - { + pub fn RequestVirtualSmartCardDeletionAsync(card: &SmartCard) -> ::windows::core::Result> { Self::ISmartCardProvisioningStatics(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).RequestVirtualSmartCardDeletionAsync)(::windows::core::Vtable::as_raw(this), card.into().abi(), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).RequestVirtualSmartCardDeletionAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(card), result__.as_mut_ptr()).from_abi::>(result__) }) } #[doc = "*Required features: `\"Foundation\"`, `\"Storage_Streams\"`*"] #[cfg(all(feature = "Foundation", feature = "Storage_Streams"))] - pub fn RequestAttestedVirtualSmartCardCreationAsync<'a, P0, E0, P1>(friendlyname: &::windows::core::HSTRING, administrativekey: P0, pinpolicy: P1) -> ::windows::core::Result> + pub fn RequestAttestedVirtualSmartCardCreationAsync<'a, P0, E0>(friendlyname: &::windows::core::HSTRING, administrativekey: P0, pinpolicy: &SmartCardPinPolicy) -> ::windows::core::Result> where P0: ::std::convert::TryInto<::windows::core::InParam<'a, super::super::Storage::Streams::IBuffer>, Error = E0>, E0: ::std::convert::Into<::windows::core::Error>, - P1: ::std::convert::Into<::windows::core::InParam<'a, SmartCardPinPolicy>>, { Self::ISmartCardProvisioningStatics2(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).RequestAttestedVirtualSmartCardCreationAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(friendlyname), administrativekey.try_into().map_err(|e| e.into())?.abi(), pinpolicy.into().abi(), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).RequestAttestedVirtualSmartCardCreationAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(friendlyname), administrativekey.try_into().map_err(|e| e.into())?.abi(), ::core::mem::transmute_copy(pinpolicy), result__.as_mut_ptr()).from_abi::>(result__) }) } #[doc = "*Required features: `\"Foundation\"`, `\"Storage_Streams\"`*"] #[cfg(all(feature = "Foundation", feature = "Storage_Streams"))] - pub fn RequestAttestedVirtualSmartCardCreationAsyncWithCardId<'a, P0, E0, P1>(friendlyname: &::windows::core::HSTRING, administrativekey: P0, pinpolicy: P1, cardid: ::windows::core::GUID) -> ::windows::core::Result> + pub fn RequestAttestedVirtualSmartCardCreationAsyncWithCardId<'a, P0, E0>(friendlyname: &::windows::core::HSTRING, administrativekey: P0, pinpolicy: &SmartCardPinPolicy, cardid: ::windows::core::GUID) -> ::windows::core::Result> where P0: ::std::convert::TryInto<::windows::core::InParam<'a, super::super::Storage::Streams::IBuffer>, Error = E0>, E0: ::std::convert::Into<::windows::core::Error>, - P1: ::std::convert::Into<::windows::core::InParam<'a, SmartCardPinPolicy>>, { Self::ISmartCardProvisioningStatics2(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).RequestAttestedVirtualSmartCardCreationAsyncWithCardId)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(friendlyname), administrativekey.try_into().map_err(|e| e.into())?.abi(), pinpolicy.into().abi(), cardid, result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).RequestAttestedVirtualSmartCardCreationAsyncWithCardId)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(friendlyname), administrativekey.try_into().map_err(|e| e.into())?.abi(), ::core::mem::transmute_copy(pinpolicy), cardid, result__.as_mut_ptr()).from_abi::>(result__) }) } #[doc(hidden)] @@ -4750,14 +4719,11 @@ impl SmartCardReader { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn CardAdded<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn CardAdded(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).CardAdded)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).CardAdded)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -4768,14 +4734,11 @@ impl SmartCardReader { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn CardRemoved<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn CardRemoved(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).CardRemoved)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).CardRemoved)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -5963,13 +5926,9 @@ impl SmartCardPinResetHandler { let com = SmartCardPinResetHandlerBox:: { vtable: &SmartCardPinResetHandlerBox::::VTABLE, count: ::windows::core::RefCount::new(1), invoke }; unsafe { ::core::mem::transmute(::windows::core::alloc::boxed::Box::new(com)) } } - pub fn Invoke<'a, P0, P1>(&self, sender: P0, request: P1) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, SmartCardProvisioning>>, - P1: ::std::convert::Into<::windows::core::InParam<'a, SmartCardPinResetRequest>>, - { + pub fn Invoke(&self, sender: &SmartCardProvisioning, request: &SmartCardPinResetRequest) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).Invoke)(::windows::core::Vtable::as_raw(this), sender.into().abi(), request.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).Invoke)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(sender), ::core::mem::transmute_copy(request)).ok() } } } #[repr(C)] diff --git a/crates/libs/windows/src/Windows/Devices/Sms/mod.rs b/crates/libs/windows/src/Windows/Devices/Sms/mod.rs index 43c4a4c8c4..3999847d07 100644 --- a/crates/libs/windows/src/Windows/Devices/Sms/mod.rs +++ b/crates/libs/windows/src/Windows/Devices/Sms/mod.rs @@ -258,14 +258,11 @@ impl ISmsDevice { } #[doc = "*Required features: `\"deprecated\"`*"] #[cfg(feature = "deprecated")] - pub fn CalculateLength<'a, P0>(&self, message: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, SmsTextMessage>>, - { + pub fn CalculateLength(&self, message: &SmsTextMessage) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).CalculateLength)(::windows::core::Vtable::as_raw(this), message.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).CalculateLength)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(message), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"deprecated\"`*"] @@ -306,14 +303,11 @@ impl ISmsDevice { } #[doc = "*Required features: `\"Foundation\"`, `\"deprecated\"`*"] #[cfg(all(feature = "Foundation", feature = "deprecated"))] - pub fn SmsMessageReceived<'a, P0>(&self, eventhandler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, SmsMessageReceivedEventHandler>>, - { + pub fn SmsMessageReceived(&self, eventhandler: &SmsMessageReceivedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).SmsMessageReceived)(::windows::core::Vtable::as_raw(this), eventhandler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).SmsMessageReceived)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(eventhandler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`, `\"deprecated\"`*"] @@ -324,14 +318,11 @@ impl ISmsDevice { } #[doc = "*Required features: `\"Foundation\"`, `\"deprecated\"`*"] #[cfg(all(feature = "Foundation", feature = "deprecated"))] - pub fn SmsDeviceStatusChanged<'a, P0>(&self, eventhandler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, SmsDeviceStatusChangedEventHandler>>, - { + pub fn SmsDeviceStatusChanged(&self, eventhandler: &SmsDeviceStatusChangedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).SmsDeviceStatusChanged)(::windows::core::Vtable::as_raw(this), eventhandler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).SmsDeviceStatusChanged)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(eventhandler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`, `\"deprecated\"`*"] @@ -1499,12 +1490,9 @@ pub struct DeleteSmsMessageOperation(::windows::core::IUnknown); impl DeleteSmsMessageOperation { #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn SetCompleted<'a, P0>(&self, handler: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::AsyncActionCompletedHandler>>, - { + pub fn SetCompleted(&self, handler: &super::super::Foundation::AsyncActionCompletedHandler) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).SetCompleted)(::windows::core::Vtable::as_raw(this), handler.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetCompleted)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler)).ok() } } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] @@ -1720,12 +1708,9 @@ pub struct DeleteSmsMessagesOperation(::windows::core::IUnknown); impl DeleteSmsMessagesOperation { #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn SetCompleted<'a, P0>(&self, handler: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::AsyncActionCompletedHandler>>, - { + pub fn SetCompleted(&self, handler: &super::super::Foundation::AsyncActionCompletedHandler) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).SetCompleted)(::windows::core::Vtable::as_raw(this), handler.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetCompleted)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler)).ok() } } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] @@ -1980,12 +1965,9 @@ impl GetSmsDeviceOperation { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn SetCompleted<'a, P0>(&self, handler: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::AsyncOperationCompletedHandler>>, - { + pub fn SetCompleted(&self, handler: &super::super::Foundation::AsyncOperationCompletedHandler) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).SetCompleted)(::windows::core::Vtable::as_raw(this), handler.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetCompleted)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler)).ok() } } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] @@ -2204,12 +2186,9 @@ impl GetSmsMessageOperation { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn SetCompleted<'a, P0>(&self, handler: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::AsyncOperationCompletedHandler>>, - { + pub fn SetCompleted(&self, handler: &super::super::Foundation::AsyncOperationCompletedHandler) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).SetCompleted)(::windows::core::Vtable::as_raw(this), handler.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetCompleted)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler)).ok() } } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] @@ -2428,12 +2407,9 @@ impl GetSmsMessagesOperation { } #[doc = "*Required features: `\"Foundation_Collections\"`*"] #[cfg(feature = "Foundation_Collections")] - pub fn SetProgress<'a, P0>(&self, handler: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::AsyncOperationProgressHandler, i32>>>, - { + pub fn SetProgress(&self, handler: &super::super::Foundation::AsyncOperationProgressHandler, i32>) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).SetProgress)(::windows::core::Vtable::as_raw(this), handler.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetProgress)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler)).ok() } } #[doc = "*Required features: `\"Foundation_Collections\"`*"] #[cfg(feature = "Foundation_Collections")] @@ -2446,12 +2422,9 @@ impl GetSmsMessagesOperation { } #[doc = "*Required features: `\"Foundation_Collections\"`*"] #[cfg(feature = "Foundation_Collections")] - pub fn SetCompleted<'a, P0>(&self, handler: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::AsyncOperationWithProgressCompletedHandler, i32>>>, - { + pub fn SetCompleted(&self, handler: &super::super::Foundation::AsyncOperationWithProgressCompletedHandler, i32>) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).SetCompleted)(::windows::core::Vtable::as_raw(this), handler.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetCompleted)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler)).ok() } } #[doc = "*Required features: `\"Foundation_Collections\"`*"] #[cfg(feature = "Foundation_Collections")] @@ -2631,12 +2604,9 @@ pub struct SendSmsMessageOperation(::windows::core::IUnknown); impl SendSmsMessageOperation { #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn SetCompleted<'a, P0>(&self, handler: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::AsyncActionCompletedHandler>>, - { + pub fn SetCompleted(&self, handler: &super::super::Foundation::AsyncActionCompletedHandler) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).SetCompleted)(::windows::core::Vtable::as_raw(this), handler.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetCompleted)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler)).ok() } } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] @@ -3506,14 +3476,11 @@ impl SmsDevice { } #[doc = "*Required features: `\"deprecated\"`*"] #[cfg(feature = "deprecated")] - pub fn CalculateLength<'a, P0>(&self, message: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, SmsTextMessage>>, - { + pub fn CalculateLength(&self, message: &SmsTextMessage) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).CalculateLength)(::windows::core::Vtable::as_raw(this), message.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).CalculateLength)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(message), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"deprecated\"`*"] @@ -3554,14 +3521,11 @@ impl SmsDevice { } #[doc = "*Required features: `\"Foundation\"`, `\"deprecated\"`*"] #[cfg(all(feature = "Foundation", feature = "deprecated"))] - pub fn SmsMessageReceived<'a, P0>(&self, eventhandler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, SmsMessageReceivedEventHandler>>, - { + pub fn SmsMessageReceived(&self, eventhandler: &SmsMessageReceivedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).SmsMessageReceived)(::windows::core::Vtable::as_raw(this), eventhandler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).SmsMessageReceived)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(eventhandler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`, `\"deprecated\"`*"] @@ -3572,14 +3536,11 @@ impl SmsDevice { } #[doc = "*Required features: `\"Foundation\"`, `\"deprecated\"`*"] #[cfg(all(feature = "Foundation", feature = "deprecated"))] - pub fn SmsDeviceStatusChanged<'a, P0>(&self, eventhandler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, SmsDeviceStatusChangedEventHandler>>, - { + pub fn SmsDeviceStatusChanged(&self, eventhandler: &SmsDeviceStatusChangedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).SmsDeviceStatusChanged)(::windows::core::Vtable::as_raw(this), eventhandler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).SmsDeviceStatusChanged)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(eventhandler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`, `\"deprecated\"`*"] @@ -3807,14 +3768,11 @@ impl SmsDevice2 { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn DeviceStatusChanged<'a, P0>(&self, eventhandler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn DeviceStatusChanged(&self, eventhandler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).DeviceStatusChanged)(::windows::core::Vtable::as_raw(this), eventhandler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).DeviceStatusChanged)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(eventhandler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -4580,14 +4538,11 @@ impl SmsMessageRegistration { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn MessageReceived<'a, P0>(&self, eventhandler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn MessageReceived(&self, eventhandler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).MessageReceived)(::windows::core::Vtable::as_raw(this), eventhandler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).MessageReceived)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(eventhandler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -4604,13 +4559,10 @@ impl SmsMessageRegistration { (::windows::core::Vtable::vtable(this).AllRegistrations)(::windows::core::Vtable::as_raw(this), result__.as_mut_ptr()).from_abi::>(result__) }) } - pub fn Register<'a, P0>(id: &::windows::core::HSTRING, filterrules: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, SmsFilterRules>>, - { + pub fn Register(id: &::windows::core::HSTRING, filterrules: &SmsFilterRules) -> ::windows::core::Result { Self::ISmsMessageRegistrationStatics(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).Register)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(id), filterrules.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).Register)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(id), ::core::mem::transmute_copy(filterrules), result__.as_mut_ptr()).from_abi::(result__) }) } #[doc(hidden)] @@ -5234,13 +5186,10 @@ impl SmsTextMessage { } #[doc = "*Required features: `\"deprecated\"`*"] #[cfg(feature = "deprecated")] - pub fn FromBinaryMessage<'a, P0>(binarymessage: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, SmsBinaryMessage>>, - { + pub fn FromBinaryMessage(binarymessage: &SmsBinaryMessage) -> ::windows::core::Result { Self::ISmsTextMessageStatics(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).FromBinaryMessage)(::windows::core::Vtable::as_raw(this), binarymessage.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).FromBinaryMessage)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(binarymessage), result__.as_mut_ptr()).from_abi::(result__) }) } #[doc = "*Required features: `\"deprecated\"`*"] @@ -6434,12 +6383,9 @@ impl SmsDeviceStatusChangedEventHandler { } #[doc = "*Required features: `\"deprecated\"`*"] #[cfg(feature = "deprecated")] - pub fn Invoke<'a, P0>(&self, sender: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, SmsDevice>>, - { + pub fn Invoke(&self, sender: &SmsDevice) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).Invoke)(::windows::core::Vtable::as_raw(this), sender.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).Invoke)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(sender)).ok() } } } #[cfg(feature = "deprecated")] @@ -6540,13 +6486,9 @@ impl SmsMessageReceivedEventHandler { } #[doc = "*Required features: `\"deprecated\"`*"] #[cfg(feature = "deprecated")] - pub fn Invoke<'a, P0, P1>(&self, sender: P0, e: P1) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, SmsDevice>>, - P1: ::std::convert::Into<::windows::core::InParam<'a, SmsMessageReceivedEventArgs>>, - { + pub fn Invoke(&self, sender: &SmsDevice, e: &SmsMessageReceivedEventArgs) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).Invoke)(::windows::core::Vtable::as_raw(this), sender.into().abi(), e.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).Invoke)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(sender), ::core::mem::transmute_copy(e)).ok() } } } #[cfg(feature = "deprecated")] diff --git a/crates/libs/windows/src/Windows/Devices/Spi/Provider/mod.rs b/crates/libs/windows/src/Windows/Devices/Spi/Provider/mod.rs index 39ddbb746b..b01f489bba 100644 --- a/crates/libs/windows/src/Windows/Devices/Spi/Provider/mod.rs +++ b/crates/libs/windows/src/Windows/Devices/Spi/Provider/mod.rs @@ -41,14 +41,11 @@ pub struct IProviderSpiConnectionSettingsFactory_Vtbl { #[repr(transparent)] pub struct ISpiControllerProvider(::windows::core::IUnknown); impl ISpiControllerProvider { - pub fn GetDeviceProvider<'a, P0>(&self, settings: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, ProviderSpiConnectionSettings>>, - { + pub fn GetDeviceProvider(&self, settings: &ProviderSpiConnectionSettings) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).GetDeviceProvider)(::windows::core::Vtable::as_raw(this), settings.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).GetDeviceProvider)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(settings), result__.as_mut_ptr()).from_abi::(result__) } } } diff --git a/crates/libs/windows/src/Windows/Devices/Spi/mod.rs b/crates/libs/windows/src/Windows/Devices/Spi/mod.rs index 79cf896f82..f7a7c70874 100644 --- a/crates/libs/windows/src/Windows/Devices/Spi/mod.rs +++ b/crates/libs/windows/src/Windows/Devices/Spi/mod.rs @@ -144,14 +144,11 @@ impl ISpiDeviceStatics { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn FromIdAsync<'a, P0>(&self, busid: &::windows::core::HSTRING, settings: P0) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, SpiConnectionSettings>>, - { + pub fn FromIdAsync(&self, busid: &::windows::core::HSTRING, settings: &SpiConnectionSettings) -> ::windows::core::Result> { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).FromIdAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(busid), settings.into().abi(), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).FromIdAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(busid), ::core::mem::transmute_copy(settings), result__.as_mut_ptr()).from_abi::>(result__) } } } @@ -464,14 +461,11 @@ unsafe impl ::core::marker::Sync for SpiConnectionSettings {} #[repr(transparent)] pub struct SpiController(::windows::core::IUnknown); impl SpiController { - pub fn GetDevice<'a, P0>(&self, settings: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, SpiConnectionSettings>>, - { + pub fn GetDevice(&self, settings: &SpiConnectionSettings) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).GetDevice)(::windows::core::Vtable::as_raw(this), settings.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).GetDevice)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(settings), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -624,13 +618,10 @@ impl SpiDevice { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn FromIdAsync<'a, P0>(busid: &::windows::core::HSTRING, settings: P0) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, SpiConnectionSettings>>, - { + pub fn FromIdAsync(busid: &::windows::core::HSTRING, settings: &SpiConnectionSettings) -> ::windows::core::Result> { Self::ISpiDeviceStatics(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).FromIdAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(busid), settings.into().abi(), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).FromIdAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(busid), ::core::mem::transmute_copy(settings), result__.as_mut_ptr()).from_abi::>(result__) }) } #[doc(hidden)] diff --git a/crates/libs/windows/src/Windows/Devices/Usb/mod.rs b/crates/libs/windows/src/Windows/Devices/Usb/mod.rs index f884108f67..a862b4686a 100644 --- a/crates/libs/windows/src/Windows/Devices/Usb/mod.rs +++ b/crates/libs/windows/src/Windows/Devices/Usb/mod.rs @@ -1159,22 +1159,16 @@ impl UsbConfigurationDescriptor { (::windows::core::Vtable::vtable(this).RemoteWakeup)(::windows::core::Vtable::as_raw(this), result__.as_mut_ptr()).from_abi::(result__) } } - pub fn TryParse<'a, P0>(descriptor: P0, parsed: &mut ::core::option::Option) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, UsbDescriptor>>, - { + pub fn TryParse(descriptor: &UsbDescriptor, parsed: &mut ::core::option::Option) -> ::windows::core::Result { Self::IUsbConfigurationDescriptorStatics(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).TryParse)(::windows::core::Vtable::as_raw(this), descriptor.into().abi(), parsed as *mut _ as _, result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).TryParse)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(descriptor), parsed as *mut _ as _, result__.as_mut_ptr()).from_abi::(result__) }) } - pub fn Parse<'a, P0>(descriptor: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, UsbDescriptor>>, - { + pub fn Parse(descriptor: &UsbDescriptor) -> ::windows::core::Result { Self::IUsbConfigurationDescriptorStatics(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).Parse)(::windows::core::Vtable::as_raw(this), descriptor.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).Parse)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(descriptor), result__.as_mut_ptr()).from_abi::(result__) }) } #[doc(hidden)] @@ -1472,54 +1466,46 @@ impl UsbDevice { } #[doc = "*Required features: `\"Foundation\"`, `\"Storage_Streams\"`*"] #[cfg(all(feature = "Foundation", feature = "Storage_Streams"))] - pub fn SendControlOutTransferAsync<'a, P0, P1, E1>(&self, setuppacket: P0, buffer: P1) -> ::windows::core::Result> + pub fn SendControlOutTransferAsync<'a, P0, E0>(&self, setuppacket: &UsbSetupPacket, buffer: P0) -> ::windows::core::Result> where - P0: ::std::convert::Into<::windows::core::InParam<'a, UsbSetupPacket>>, - P1: ::std::convert::TryInto<::windows::core::InParam<'a, super::super::Storage::Streams::IBuffer>, Error = E1>, - E1: ::std::convert::Into<::windows::core::Error>, + P0: ::std::convert::TryInto<::windows::core::InParam<'a, super::super::Storage::Streams::IBuffer>, Error = E0>, + E0: ::std::convert::Into<::windows::core::Error>, { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).SendControlOutTransferAsync)(::windows::core::Vtable::as_raw(this), setuppacket.into().abi(), buffer.try_into().map_err(|e| e.into())?.abi(), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).SendControlOutTransferAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(setuppacket), buffer.try_into().map_err(|e| e.into())?.abi(), result__.as_mut_ptr()).from_abi::>(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn SendControlOutTransferAsyncNoBuffer<'a, P0>(&self, setuppacket: P0) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, UsbSetupPacket>>, - { + pub fn SendControlOutTransferAsyncNoBuffer(&self, setuppacket: &UsbSetupPacket) -> ::windows::core::Result> { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).SendControlOutTransferAsyncNoBuffer)(::windows::core::Vtable::as_raw(this), setuppacket.into().abi(), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).SendControlOutTransferAsyncNoBuffer)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(setuppacket), result__.as_mut_ptr()).from_abi::>(result__) } } #[doc = "*Required features: `\"Foundation\"`, `\"Storage_Streams\"`*"] #[cfg(all(feature = "Foundation", feature = "Storage_Streams"))] - pub fn SendControlInTransferAsync<'a, P0, P1, E1>(&self, setuppacket: P0, buffer: P1) -> ::windows::core::Result> + pub fn SendControlInTransferAsync<'a, P0, E0>(&self, setuppacket: &UsbSetupPacket, buffer: P0) -> ::windows::core::Result> where - P0: ::std::convert::Into<::windows::core::InParam<'a, UsbSetupPacket>>, - P1: ::std::convert::TryInto<::windows::core::InParam<'a, super::super::Storage::Streams::IBuffer>, Error = E1>, - E1: ::std::convert::Into<::windows::core::Error>, + P0: ::std::convert::TryInto<::windows::core::InParam<'a, super::super::Storage::Streams::IBuffer>, Error = E0>, + E0: ::std::convert::Into<::windows::core::Error>, { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).SendControlInTransferAsync)(::windows::core::Vtable::as_raw(this), setuppacket.into().abi(), buffer.try_into().map_err(|e| e.into())?.abi(), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).SendControlInTransferAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(setuppacket), buffer.try_into().map_err(|e| e.into())?.abi(), result__.as_mut_ptr()).from_abi::>(result__) } } #[doc = "*Required features: `\"Foundation\"`, `\"Storage_Streams\"`*"] #[cfg(all(feature = "Foundation", feature = "Storage_Streams"))] - pub fn SendControlInTransferAsyncNoBuffer<'a, P0>(&self, setuppacket: P0) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, UsbSetupPacket>>, - { + pub fn SendControlInTransferAsyncNoBuffer(&self, setuppacket: &UsbSetupPacket) -> ::windows::core::Result> { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).SendControlInTransferAsyncNoBuffer)(::windows::core::Vtable::as_raw(this), setuppacket.into().abi(), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).SendControlInTransferAsyncNoBuffer)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(setuppacket), result__.as_mut_ptr()).from_abi::>(result__) } } pub fn DefaultInterface(&self) -> ::windows::core::Result { @@ -1561,13 +1547,10 @@ impl UsbDevice { (::windows::core::Vtable::vtable(this).GetDeviceSelectorVidPidOnly)(::windows::core::Vtable::as_raw(this), vendorid, productid, result__.as_mut_ptr()).from_abi::<::windows::core::HSTRING>(result__) }) } - pub fn GetDeviceClassSelector<'a, P0>(usbclass: P0) -> ::windows::core::Result<::windows::core::HSTRING> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, UsbDeviceClass>>, - { + pub fn GetDeviceClassSelector(usbclass: &UsbDeviceClass) -> ::windows::core::Result<::windows::core::HSTRING> { Self::IUsbDeviceStatics(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).GetDeviceClassSelector)(::windows::core::Vtable::as_raw(this), usbclass.into().abi(), result__.as_mut_ptr()).from_abi::<::windows::core::HSTRING>(result__) + (::windows::core::Vtable::vtable(this).GetDeviceClassSelector)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(usbclass), result__.as_mut_ptr()).from_abi::<::windows::core::HSTRING>(result__) }) } #[doc = "*Required features: `\"Foundation\"`*"] @@ -2087,22 +2070,16 @@ impl UsbEndpointDescriptor { (::windows::core::Vtable::vtable(this).AsInterruptOutEndpointDescriptor)(::windows::core::Vtable::as_raw(this), result__.as_mut_ptr()).from_abi::(result__) } } - pub fn TryParse<'a, P0>(descriptor: P0, parsed: &mut ::core::option::Option) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, UsbDescriptor>>, - { + pub fn TryParse(descriptor: &UsbDescriptor, parsed: &mut ::core::option::Option) -> ::windows::core::Result { Self::IUsbEndpointDescriptorStatics(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).TryParse)(::windows::core::Vtable::as_raw(this), descriptor.into().abi(), parsed as *mut _ as _, result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).TryParse)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(descriptor), parsed as *mut _ as _, result__.as_mut_ptr()).from_abi::(result__) }) } - pub fn Parse<'a, P0>(descriptor: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, UsbDescriptor>>, - { + pub fn Parse(descriptor: &UsbDescriptor) -> ::windows::core::Result { Self::IUsbEndpointDescriptorStatics(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).Parse)(::windows::core::Vtable::as_raw(this), descriptor.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).Parse)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(descriptor), result__.as_mut_ptr()).from_abi::(result__) }) } #[doc(hidden)] @@ -2344,22 +2321,16 @@ impl UsbInterfaceDescriptor { (::windows::core::Vtable::vtable(this).InterfaceNumber)(::windows::core::Vtable::as_raw(this), result__.as_mut_ptr()).from_abi::(result__) } } - pub fn TryParse<'a, P0>(descriptor: P0, parsed: &mut ::core::option::Option) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, UsbDescriptor>>, - { + pub fn TryParse(descriptor: &UsbDescriptor, parsed: &mut ::core::option::Option) -> ::windows::core::Result { Self::IUsbInterfaceDescriptorStatics(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).TryParse)(::windows::core::Vtable::as_raw(this), descriptor.into().abi(), parsed as *mut _ as _, result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).TryParse)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(descriptor), parsed as *mut _ as _, result__.as_mut_ptr()).from_abi::(result__) }) } - pub fn Parse<'a, P0>(descriptor: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, UsbDescriptor>>, - { + pub fn Parse(descriptor: &UsbDescriptor) -> ::windows::core::Result { Self::IUsbInterfaceDescriptorStatics(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).Parse)(::windows::core::Vtable::as_raw(this), descriptor.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).Parse)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(descriptor), result__.as_mut_ptr()).from_abi::(result__) }) } #[doc(hidden)] @@ -2768,14 +2739,11 @@ impl UsbInterruptInPipe { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn DataReceived<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn DataReceived(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).DataReceived)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).DataReceived)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -3071,12 +3039,9 @@ impl UsbSetupPacket { (::windows::core::Vtable::vtable(this).RequestType)(::windows::core::Vtable::as_raw(this), result__.as_mut_ptr()).from_abi::(result__) } } - pub fn SetRequestType<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, UsbControlRequestType>>, - { + pub fn SetRequestType(&self, value: &UsbControlRequestType) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).SetRequestType)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetRequestType)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } pub fn Request(&self) -> ::windows::core::Result { let this = self; diff --git a/crates/libs/windows/src/Windows/Devices/WiFi/mod.rs b/crates/libs/windows/src/Windows/Devices/WiFi/mod.rs index 4ea676757b..26265bbd7d 100644 --- a/crates/libs/windows/src/Windows/Devices/WiFi/mod.rs +++ b/crates/libs/windows/src/Windows/Devices/WiFi/mod.rs @@ -212,14 +212,11 @@ impl WiFiAdapter { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn AvailableNetworksChanged<'a, P0>(&self, args: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn AvailableNetworksChanged(&self, args: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).AvailableNetworksChanged)(::windows::core::Vtable::as_raw(this), args.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).AvailableNetworksChanged)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(args), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -230,40 +227,29 @@ impl WiFiAdapter { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn ConnectAsync<'a, P0>(&self, availablenetwork: P0, reconnectionkind: WiFiReconnectionKind) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, WiFiAvailableNetwork>>, - { + pub fn ConnectAsync(&self, availablenetwork: &WiFiAvailableNetwork, reconnectionkind: WiFiReconnectionKind) -> ::windows::core::Result> { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).ConnectAsync)(::windows::core::Vtable::as_raw(this), availablenetwork.into().abi(), reconnectionkind, result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).ConnectAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(availablenetwork), reconnectionkind, result__.as_mut_ptr()).from_abi::>(result__) } } #[doc = "*Required features: `\"Foundation\"`, `\"Security_Credentials\"`*"] #[cfg(all(feature = "Foundation", feature = "Security_Credentials"))] - pub fn ConnectWithPasswordCredentialAsync<'a, P0, P1>(&self, availablenetwork: P0, reconnectionkind: WiFiReconnectionKind, passwordcredential: P1) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, WiFiAvailableNetwork>>, - P1: ::std::convert::Into<::windows::core::InParam<'a, super::super::Security::Credentials::PasswordCredential>>, - { + pub fn ConnectWithPasswordCredentialAsync(&self, availablenetwork: &WiFiAvailableNetwork, reconnectionkind: WiFiReconnectionKind, passwordcredential: &super::super::Security::Credentials::PasswordCredential) -> ::windows::core::Result> { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).ConnectWithPasswordCredentialAsync)(::windows::core::Vtable::as_raw(this), availablenetwork.into().abi(), reconnectionkind, passwordcredential.into().abi(), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).ConnectWithPasswordCredentialAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(availablenetwork), reconnectionkind, ::core::mem::transmute_copy(passwordcredential), result__.as_mut_ptr()).from_abi::>(result__) } } #[doc = "*Required features: `\"Foundation\"`, `\"Security_Credentials\"`*"] #[cfg(all(feature = "Foundation", feature = "Security_Credentials"))] - pub fn ConnectWithPasswordCredentialAndSsidAsync<'a, P0, P1>(&self, availablenetwork: P0, reconnectionkind: WiFiReconnectionKind, passwordcredential: P1, ssid: &::windows::core::HSTRING) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, WiFiAvailableNetwork>>, - P1: ::std::convert::Into<::windows::core::InParam<'a, super::super::Security::Credentials::PasswordCredential>>, - { + pub fn ConnectWithPasswordCredentialAndSsidAsync(&self, availablenetwork: &WiFiAvailableNetwork, reconnectionkind: WiFiReconnectionKind, passwordcredential: &super::super::Security::Credentials::PasswordCredential, ssid: &::windows::core::HSTRING) -> ::windows::core::Result> { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).ConnectWithPasswordCredentialAndSsidAsync)(::windows::core::Vtable::as_raw(this), availablenetwork.into().abi(), reconnectionkind, passwordcredential.into().abi(), ::core::mem::transmute_copy(ssid), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).ConnectWithPasswordCredentialAndSsidAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(availablenetwork), reconnectionkind, ::core::mem::transmute_copy(passwordcredential), ::core::mem::transmute_copy(ssid), result__.as_mut_ptr()).from_abi::>(result__) } } pub fn Disconnect(&self) -> ::windows::core::Result<()> { @@ -272,27 +258,20 @@ impl WiFiAdapter { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn GetWpsConfigurationAsync<'a, P0>(&self, availablenetwork: P0) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, WiFiAvailableNetwork>>, - { + pub fn GetWpsConfigurationAsync(&self, availablenetwork: &WiFiAvailableNetwork) -> ::windows::core::Result> { let this = &::windows::core::Interface::cast::(self)?; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).GetWpsConfigurationAsync)(::windows::core::Vtable::as_raw(this), availablenetwork.into().abi(), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).GetWpsConfigurationAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(availablenetwork), result__.as_mut_ptr()).from_abi::>(result__) } } #[doc = "*Required features: `\"Foundation\"`, `\"Security_Credentials\"`*"] #[cfg(all(feature = "Foundation", feature = "Security_Credentials"))] - pub fn ConnectWithPasswordCredentialAndSsidAndConnectionMethodAsync<'a, P0, P1>(&self, availablenetwork: P0, reconnectionkind: WiFiReconnectionKind, passwordcredential: P1, ssid: &::windows::core::HSTRING, connectionmethod: WiFiConnectionMethod) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, WiFiAvailableNetwork>>, - P1: ::std::convert::Into<::windows::core::InParam<'a, super::super::Security::Credentials::PasswordCredential>>, - { + pub fn ConnectWithPasswordCredentialAndSsidAndConnectionMethodAsync(&self, availablenetwork: &WiFiAvailableNetwork, reconnectionkind: WiFiReconnectionKind, passwordcredential: &super::super::Security::Credentials::PasswordCredential, ssid: &::windows::core::HSTRING, connectionmethod: WiFiConnectionMethod) -> ::windows::core::Result> { let this = &::windows::core::Interface::cast::(self)?; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).ConnectWithPasswordCredentialAndSsidAndConnectionMethodAsync)(::windows::core::Vtable::as_raw(this), availablenetwork.into().abi(), reconnectionkind, passwordcredential.into().abi(), ::core::mem::transmute_copy(ssid), connectionmethod, result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).ConnectWithPasswordCredentialAndSsidAndConnectionMethodAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(availablenetwork), reconnectionkind, ::core::mem::transmute_copy(passwordcredential), ::core::mem::transmute_copy(ssid), connectionmethod, result__.as_mut_ptr()).from_abi::>(result__) } } #[doc = "*Required features: `\"Foundation_Collections\"`*"] diff --git a/crates/libs/windows/src/Windows/Devices/WiFiDirect/Services/mod.rs b/crates/libs/windows/src/Windows/Devices/WiFiDirect/Services/mod.rs index 507e36c3ea..49b75c0bf5 100644 --- a/crates/libs/windows/src/Windows/Devices/WiFiDirect/Services/mod.rs +++ b/crates/libs/windows/src/Windows/Devices/WiFiDirect/Services/mod.rs @@ -392,14 +392,11 @@ impl WiFiDirectService { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn SessionDeferred<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Foundation::TypedEventHandler>>, - { + pub fn SessionDeferred(&self, handler: &super::super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).SessionDeferred)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).SessionDeferred)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -658,14 +655,11 @@ impl WiFiDirectServiceAdvertiser { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn SessionRequested<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Foundation::TypedEventHandler>>, - { + pub fn SessionRequested(&self, handler: &super::super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).SessionRequested)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).SessionRequested)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -676,14 +670,11 @@ impl WiFiDirectServiceAdvertiser { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn AutoAcceptSessionConnected<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Foundation::TypedEventHandler>>, - { + pub fn AutoAcceptSessionConnected(&self, handler: &super::super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).AutoAcceptSessionConnected)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).AutoAcceptSessionConnected)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -694,14 +685,11 @@ impl WiFiDirectServiceAdvertiser { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn AdvertisementStatusChanged<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Foundation::TypedEventHandler>>, - { + pub fn AdvertisementStatusChanged(&self, handler: &super::super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).AdvertisementStatusChanged)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).AdvertisementStatusChanged)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -712,26 +700,20 @@ impl WiFiDirectServiceAdvertiser { } #[doc = "*Required features: `\"Devices_Enumeration\"`, `\"Foundation\"`*"] #[cfg(all(feature = "Devices_Enumeration", feature = "Foundation"))] - pub fn ConnectAsync<'a, P0>(&self, deviceinfo: P0) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Enumeration::DeviceInformation>>, - { + pub fn ConnectAsync(&self, deviceinfo: &super::super::Enumeration::DeviceInformation) -> ::windows::core::Result> { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).ConnectAsync)(::windows::core::Vtable::as_raw(this), deviceinfo.into().abi(), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).ConnectAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(deviceinfo), result__.as_mut_ptr()).from_abi::>(result__) } } #[doc = "*Required features: `\"Devices_Enumeration\"`, `\"Foundation\"`*"] #[cfg(all(feature = "Devices_Enumeration", feature = "Foundation"))] - pub fn ConnectAsyncWithPin<'a, P0>(&self, deviceinfo: P0, pin: &::windows::core::HSTRING) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Enumeration::DeviceInformation>>, - { + pub fn ConnectAsyncWithPin(&self, deviceinfo: &super::super::Enumeration::DeviceInformation, pin: &::windows::core::HSTRING) -> ::windows::core::Result> { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).ConnectAsyncWithPin)(::windows::core::Vtable::as_raw(this), deviceinfo.into().abi(), ::core::mem::transmute_copy(pin), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).ConnectAsyncWithPin)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(deviceinfo), ::core::mem::transmute_copy(pin), result__.as_mut_ptr()).from_abi::>(result__) } } pub fn Start(&self) -> ::windows::core::Result<()> { @@ -1141,14 +1123,11 @@ impl WiFiDirectServiceSession { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn SessionStatusChanged<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Foundation::TypedEventHandler>>, - { + pub fn SessionStatusChanged(&self, handler: &super::super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).SessionStatusChanged)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).SessionStatusChanged)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -1159,38 +1138,29 @@ impl WiFiDirectServiceSession { } #[doc = "*Required features: `\"Foundation\"`, `\"Networking_Sockets\"`*"] #[cfg(all(feature = "Foundation", feature = "Networking_Sockets"))] - pub fn AddStreamSocketListenerAsync<'a, P0>(&self, value: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Networking::Sockets::StreamSocketListener>>, - { + pub fn AddStreamSocketListenerAsync(&self, value: &super::super::super::Networking::Sockets::StreamSocketListener) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).AddStreamSocketListenerAsync)(::windows::core::Vtable::as_raw(this), value.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).AddStreamSocketListenerAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`, `\"Networking_Sockets\"`*"] #[cfg(all(feature = "Foundation", feature = "Networking_Sockets"))] - pub fn AddDatagramSocketAsync<'a, P0>(&self, value: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Networking::Sockets::DatagramSocket>>, - { + pub fn AddDatagramSocketAsync(&self, value: &super::super::super::Networking::Sockets::DatagramSocket) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).AddDatagramSocketAsync)(::windows::core::Vtable::as_raw(this), value.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).AddDatagramSocketAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn RemotePortAdded<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Foundation::TypedEventHandler>>, - { + pub fn RemotePortAdded(&self, handler: &super::super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).RemotePortAdded)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).RemotePortAdded)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] diff --git a/crates/libs/windows/src/Windows/Devices/WiFiDirect/mod.rs b/crates/libs/windows/src/Windows/Devices/WiFiDirect/mod.rs index d92ffcaa59..a19d552ef7 100644 --- a/crates/libs/windows/src/Windows/Devices/WiFiDirect/mod.rs +++ b/crates/libs/windows/src/Windows/Devices/WiFiDirect/mod.rs @@ -495,14 +495,11 @@ impl WiFiDirectAdvertisementPublisher { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn StatusChanged<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn StatusChanged(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).StatusChanged)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).StatusChanged)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -680,14 +677,11 @@ impl WiFiDirectConnectionListener { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn ConnectionRequested<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn ConnectionRequested(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).ConnectionRequested)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).ConnectionRequested)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -1111,14 +1105,11 @@ impl WiFiDirectDevice { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn ConnectionStatusChanged<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn ConnectionStatusChanged(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).ConnectionStatusChanged)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).ConnectionStatusChanged)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -1158,13 +1149,10 @@ impl WiFiDirectDevice { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn FromIdAsync2<'a, P0>(deviceid: &::windows::core::HSTRING, connectionparameters: P0) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, WiFiDirectConnectionParameters>>, - { + pub fn FromIdAsync2(deviceid: &::windows::core::HSTRING, connectionparameters: &WiFiDirectConnectionParameters) -> ::windows::core::Result> { Self::IWiFiDirectDeviceStatics2(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).FromIdAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(deviceid), connectionparameters.into().abi(), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).FromIdAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(deviceid), ::core::mem::transmute_copy(connectionparameters), result__.as_mut_ptr()).from_abi::>(result__) }) } #[doc(hidden)] @@ -1338,13 +1326,10 @@ impl WiFiDirectInformationElement { } #[doc = "*Required features: `\"Devices_Enumeration\"`, `\"Foundation_Collections\"`*"] #[cfg(all(feature = "Devices_Enumeration", feature = "Foundation_Collections"))] - pub fn CreateFromDeviceInformation<'a, P0>(deviceinformation: P0) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::Enumeration::DeviceInformation>>, - { + pub fn CreateFromDeviceInformation(deviceinformation: &super::Enumeration::DeviceInformation) -> ::windows::core::Result> { Self::IWiFiDirectInformationElementStatics(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).CreateFromDeviceInformation)(::windows::core::Vtable::as_raw(this), deviceinformation.into().abi(), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).CreateFromDeviceInformation)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(deviceinformation), result__.as_mut_ptr()).from_abi::>(result__) }) } #[doc(hidden)] @@ -1454,12 +1439,9 @@ impl WiFiDirectLegacySettings { } #[doc = "*Required features: `\"Security_Credentials\"`*"] #[cfg(feature = "Security_Credentials")] - pub fn SetPassphrase<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Security::Credentials::PasswordCredential>>, - { + pub fn SetPassphrase(&self, value: &super::super::Security::Credentials::PasswordCredential) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).SetPassphrase)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetPassphrase)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } } impl ::core::clone::Clone for WiFiDirectLegacySettings { diff --git a/crates/libs/windows/src/Windows/Foundation/Collections/mod.rs b/crates/libs/windows/src/Windows/Foundation/Collections/mod.rs index 245f0027fb..96ef959ed2 100644 --- a/crates/libs/windows/src/Windows/Foundation/Collections/mod.rs +++ b/crates/libs/windows/src/Windows/Foundation/Collections/mod.rs @@ -738,14 +738,11 @@ where K: ::windows::core::RuntimeType + 'static, V: ::windows::core::RuntimeType + 'static; impl IObservableMap { - pub fn MapChanged<'a, P0>(&self, vhnd: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, MapChangedEventHandler>>, - { + pub fn MapChanged(&self, vhnd: &MapChangedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).MapChanged)(::windows::core::Vtable::as_raw(this), vhnd.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).MapChanged)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(vhnd), result__.as_mut_ptr()).from_abi::(result__) } } pub fn RemoveMapChanged(&self, token: super::EventRegistrationToken) -> ::windows::core::Result<()> { @@ -946,14 +943,11 @@ pub struct IObservableVector(::windows::core::IUnknown, ::core::marker::Phant where T: ::windows::core::RuntimeType + 'static; impl IObservableVector { - pub fn VectorChanged<'a, P0>(&self, vhnd: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, VectorChangedEventHandler>>, - { + pub fn VectorChanged(&self, vhnd: &VectorChangedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).VectorChanged)(::windows::core::Vtable::as_raw(this), vhnd.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).VectorChanged)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(vhnd), result__.as_mut_ptr()).from_abi::(result__) } } pub fn RemoveVectorChanged(&self, token: super::EventRegistrationToken) -> ::windows::core::Result<()> { @@ -1222,14 +1216,11 @@ impl IPropertySet { let this = &::windows::core::Interface::cast::>(self)?; unsafe { (::windows::core::Vtable::vtable(this).Clear)(::windows::core::Vtable::as_raw(this)).ok() } } - pub fn MapChanged<'a, P0>(&self, vhnd: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, MapChangedEventHandler<::windows::core::HSTRING, ::windows::core::IInspectable>>>, - { + pub fn MapChanged(&self, vhnd: &MapChangedEventHandler<::windows::core::HSTRING, ::windows::core::IInspectable>) -> ::windows::core::Result { let this = &::windows::core::Interface::cast::>(self)?; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).MapChanged)(::windows::core::Vtable::as_raw(this), vhnd.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).MapChanged)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(vhnd), result__.as_mut_ptr()).from_abi::(result__) } } pub fn RemoveMapChanged(&self, token: super::EventRegistrationToken) -> ::windows::core::Result<()> { @@ -1909,14 +1900,11 @@ impl PropertySet { let this = &::windows::core::Interface::cast::>(self)?; unsafe { (::windows::core::Vtable::vtable(this).Clear)(::windows::core::Vtable::as_raw(this)).ok() } } - pub fn MapChanged<'a, P0>(&self, vhnd: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, MapChangedEventHandler<::windows::core::HSTRING, ::windows::core::IInspectable>>>, - { + pub fn MapChanged(&self, vhnd: &MapChangedEventHandler<::windows::core::HSTRING, ::windows::core::IInspectable>) -> ::windows::core::Result { let this = &::windows::core::Interface::cast::>(self)?; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).MapChanged)(::windows::core::Vtable::as_raw(this), vhnd.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).MapChanged)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(vhnd), result__.as_mut_ptr()).from_abi::(result__) } } pub fn RemoveMapChanged(&self, token: super::EventRegistrationToken) -> ::windows::core::Result<()> { @@ -2139,14 +2127,11 @@ impl StringMap { let this = self; unsafe { (::windows::core::Vtable::vtable(this).Clear)(::windows::core::Vtable::as_raw(this)).ok() } } - pub fn MapChanged<'a, P0>(&self, vhnd: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, MapChangedEventHandler<::windows::core::HSTRING, ::windows::core::HSTRING>>>, - { + pub fn MapChanged(&self, vhnd: &MapChangedEventHandler<::windows::core::HSTRING, ::windows::core::HSTRING>) -> ::windows::core::Result { let this = &::windows::core::Interface::cast::>(self)?; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).MapChanged)(::windows::core::Vtable::as_raw(this), vhnd.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).MapChanged)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(vhnd), result__.as_mut_ptr()).from_abi::(result__) } } pub fn RemoveMapChanged(&self, token: super::EventRegistrationToken) -> ::windows::core::Result<()> { @@ -2353,14 +2338,11 @@ impl ValueSet { let this = &::windows::core::Interface::cast::>(self)?; unsafe { (::windows::core::Vtable::vtable(this).Clear)(::windows::core::Vtable::as_raw(this)).ok() } } - pub fn MapChanged<'a, P0>(&self, vhnd: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, MapChangedEventHandler<::windows::core::HSTRING, ::windows::core::IInspectable>>>, - { + pub fn MapChanged(&self, vhnd: &MapChangedEventHandler<::windows::core::HSTRING, ::windows::core::IInspectable>) -> ::windows::core::Result { let this = &::windows::core::Interface::cast::>(self)?; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).MapChanged)(::windows::core::Vtable::as_raw(this), vhnd.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).MapChanged)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(vhnd), result__.as_mut_ptr()).from_abi::(result__) } } pub fn RemoveMapChanged(&self, token: super::EventRegistrationToken) -> ::windows::core::Result<()> { diff --git a/crates/libs/windows/src/Windows/Foundation/Diagnostics/mod.rs b/crates/libs/windows/src/Windows/Foundation/Diagnostics/mod.rs index 7b70f6bfbe..206553102e 100644 --- a/crates/libs/windows/src/Windows/Foundation/Diagnostics/mod.rs +++ b/crates/libs/windows/src/Windows/Foundation/Diagnostics/mod.rs @@ -177,14 +177,11 @@ impl IFileLoggingSession { (::windows::core::Vtable::vtable(this).CloseAndSaveToFileAsync)(::windows::core::Vtable::as_raw(this), result__.as_mut_ptr()).from_abi::>(result__) } } - pub fn LogFileGenerated<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::TypedEventHandler>>, - { + pub fn LogFileGenerated(&self, handler: &super::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).LogFileGenerated)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).LogFileGenerated)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } pub fn RemoveLogFileGenerated(&self, token: super::EventRegistrationToken) -> ::windows::core::Result<()> { @@ -413,14 +410,11 @@ impl ILoggingChannel { let this = self; unsafe { (::windows::core::Vtable::vtable(this).LogValuePairWithLevel)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value1), value2, level).ok() } } - pub fn LoggingEnabled<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::TypedEventHandler>>, - { + pub fn LoggingEnabled(&self, handler: &super::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).LoggingEnabled)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).LoggingEnabled)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } pub fn RemoveLoggingEnabled(&self, token: super::EventRegistrationToken) -> ::windows::core::Result<()> { @@ -962,27 +956,17 @@ impl ILoggingTarget { let this = self; unsafe { (::windows::core::Vtable::vtable(this).LogEvent)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(eventname)).ok() } } - pub fn LogEventWithFields<'a, P0>(&self, eventname: &::windows::core::HSTRING, fields: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, LoggingFields>>, - { + pub fn LogEventWithFields(&self, eventname: &::windows::core::HSTRING, fields: &LoggingFields) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).LogEventWithFields)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(eventname), fields.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).LogEventWithFields)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(eventname), ::core::mem::transmute_copy(fields)).ok() } } - pub fn LogEventWithFieldsAndLevel<'a, P0>(&self, eventname: &::windows::core::HSTRING, fields: P0, level: LoggingLevel) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, LoggingFields>>, - { + pub fn LogEventWithFieldsAndLevel(&self, eventname: &::windows::core::HSTRING, fields: &LoggingFields, level: LoggingLevel) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).LogEventWithFieldsAndLevel)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(eventname), fields.into().abi(), level).ok() } + unsafe { (::windows::core::Vtable::vtable(this).LogEventWithFieldsAndLevel)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(eventname), ::core::mem::transmute_copy(fields), level).ok() } } - pub fn LogEventWithFieldsAndOptions<'a, P0, P1>(&self, eventname: &::windows::core::HSTRING, fields: P0, level: LoggingLevel, options: P1) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, LoggingFields>>, - P1: ::std::convert::Into<::windows::core::InParam<'a, LoggingOptions>>, - { + pub fn LogEventWithFieldsAndOptions(&self, eventname: &::windows::core::HSTRING, fields: &LoggingFields, level: LoggingLevel, options: &LoggingOptions) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).LogEventWithFieldsAndOptions)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(eventname), fields.into().abi(), level, options.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).LogEventWithFieldsAndOptions)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(eventname), ::core::mem::transmute_copy(fields), level, ::core::mem::transmute_copy(options)).ok() } } pub fn StartActivity(&self, starteventname: &::windows::core::HSTRING) -> ::windows::core::Result { let this = self; @@ -991,35 +975,25 @@ impl ILoggingTarget { (::windows::core::Vtable::vtable(this).StartActivity)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(starteventname), result__.as_mut_ptr()).from_abi::(result__) } } - pub fn StartActivityWithFields<'a, P0>(&self, starteventname: &::windows::core::HSTRING, fields: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, LoggingFields>>, - { + pub fn StartActivityWithFields(&self, starteventname: &::windows::core::HSTRING, fields: &LoggingFields) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).StartActivityWithFields)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(starteventname), fields.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).StartActivityWithFields)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(starteventname), ::core::mem::transmute_copy(fields), result__.as_mut_ptr()).from_abi::(result__) } } - pub fn StartActivityWithFieldsAndLevel<'a, P0>(&self, starteventname: &::windows::core::HSTRING, fields: P0, level: LoggingLevel) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, LoggingFields>>, - { + pub fn StartActivityWithFieldsAndLevel(&self, starteventname: &::windows::core::HSTRING, fields: &LoggingFields, level: LoggingLevel) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).StartActivityWithFieldsAndLevel)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(starteventname), fields.into().abi(), level, result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).StartActivityWithFieldsAndLevel)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(starteventname), ::core::mem::transmute_copy(fields), level, result__.as_mut_ptr()).from_abi::(result__) } } - pub fn StartActivityWithFieldsAndOptions<'a, P0, P1>(&self, starteventname: &::windows::core::HSTRING, fields: P0, level: LoggingLevel, options: P1) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, LoggingFields>>, - P1: ::std::convert::Into<::windows::core::InParam<'a, LoggingOptions>>, - { + pub fn StartActivityWithFieldsAndOptions(&self, starteventname: &::windows::core::HSTRING, fields: &LoggingFields, level: LoggingLevel, options: &LoggingOptions) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).StartActivityWithFieldsAndOptions)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(starteventname), fields.into().abi(), level, options.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).StartActivityWithFieldsAndOptions)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(starteventname), ::core::mem::transmute_copy(fields), level, ::core::mem::transmute_copy(options), result__.as_mut_ptr()).from_abi::(result__) } } } @@ -1132,13 +1106,10 @@ impl AsyncCausalityTracer { pub fn TraceSynchronousWorkCompletion(tracelevel: CausalityTraceLevel, source: CausalitySource, work: CausalitySynchronousWork) -> ::windows::core::Result<()> { Self::IAsyncCausalityTracerStatics(|this| unsafe { (::windows::core::Vtable::vtable(this).TraceSynchronousWorkCompletion)(::windows::core::Vtable::as_raw(this), tracelevel, source, work).ok() }) } - pub fn TracingStatusChanged<'a, P0>(handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::EventHandler>>, - { + pub fn TracingStatusChanged(handler: &super::EventHandler) -> ::windows::core::Result { Self::IAsyncCausalityTracerStatics(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).TracingStatusChanged)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).TracingStatusChanged)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) }) } pub fn RemoveTracingStatusChanged(cookie: super::EventRegistrationToken) -> ::windows::core::Result<()> { @@ -1302,14 +1273,11 @@ impl FileLoggingSession { (::windows::core::Vtable::vtable(this).CloseAndSaveToFileAsync)(::windows::core::Vtable::as_raw(this), result__.as_mut_ptr()).from_abi::>(result__) } } - pub fn LogFileGenerated<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::TypedEventHandler>>, - { + pub fn LogFileGenerated(&self, handler: &super::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).LogFileGenerated)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).LogFileGenerated)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } pub fn RemoveLogFileGenerated(&self, token: super::EventRegistrationToken) -> ::windows::core::Result<()> { @@ -1541,20 +1509,13 @@ impl LoggingActivity { let this = &::windows::core::Interface::cast::(self)?; unsafe { (::windows::core::Vtable::vtable(this).StopActivity)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(stopeventname)).ok() } } - pub fn StopActivityWithFields<'a, P0>(&self, stopeventname: &::windows::core::HSTRING, fields: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, LoggingFields>>, - { + pub fn StopActivityWithFields(&self, stopeventname: &::windows::core::HSTRING, fields: &LoggingFields) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).StopActivityWithFields)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(stopeventname), fields.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).StopActivityWithFields)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(stopeventname), ::core::mem::transmute_copy(fields)).ok() } } - pub fn StopActivityWithFieldsAndOptions<'a, P0, P1>(&self, stopeventname: &::windows::core::HSTRING, fields: P0, options: P1) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, LoggingFields>>, - P1: ::std::convert::Into<::windows::core::InParam<'a, LoggingOptions>>, - { + pub fn StopActivityWithFieldsAndOptions(&self, stopeventname: &::windows::core::HSTRING, fields: &LoggingFields, options: &LoggingOptions) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).StopActivityWithFieldsAndOptions)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(stopeventname), fields.into().abi(), options.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).StopActivityWithFieldsAndOptions)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(stopeventname), ::core::mem::transmute_copy(fields), ::core::mem::transmute_copy(options)).ok() } } pub fn CreateLoggingActivity<'a, P0, E0>(activityname: &::windows::core::HSTRING, loggingchannel: P0) -> ::windows::core::Result where @@ -1601,27 +1562,17 @@ impl LoggingActivity { let this = &::windows::core::Interface::cast::(self)?; unsafe { (::windows::core::Vtable::vtable(this).LogEvent)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(eventname)).ok() } } - pub fn LogEventWithFields<'a, P0>(&self, eventname: &::windows::core::HSTRING, fields: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, LoggingFields>>, - { + pub fn LogEventWithFields(&self, eventname: &::windows::core::HSTRING, fields: &LoggingFields) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).LogEventWithFields)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(eventname), fields.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).LogEventWithFields)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(eventname), ::core::mem::transmute_copy(fields)).ok() } } - pub fn LogEventWithFieldsAndLevel<'a, P0>(&self, eventname: &::windows::core::HSTRING, fields: P0, level: LoggingLevel) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, LoggingFields>>, - { + pub fn LogEventWithFieldsAndLevel(&self, eventname: &::windows::core::HSTRING, fields: &LoggingFields, level: LoggingLevel) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).LogEventWithFieldsAndLevel)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(eventname), fields.into().abi(), level).ok() } + unsafe { (::windows::core::Vtable::vtable(this).LogEventWithFieldsAndLevel)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(eventname), ::core::mem::transmute_copy(fields), level).ok() } } - pub fn LogEventWithFieldsAndOptions<'a, P0, P1>(&self, eventname: &::windows::core::HSTRING, fields: P0, level: LoggingLevel, options: P1) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, LoggingFields>>, - P1: ::std::convert::Into<::windows::core::InParam<'a, LoggingOptions>>, - { + pub fn LogEventWithFieldsAndOptions(&self, eventname: &::windows::core::HSTRING, fields: &LoggingFields, level: LoggingLevel, options: &LoggingOptions) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).LogEventWithFieldsAndOptions)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(eventname), fields.into().abi(), level, options.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).LogEventWithFieldsAndOptions)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(eventname), ::core::mem::transmute_copy(fields), level, ::core::mem::transmute_copy(options)).ok() } } pub fn StartActivity(&self, starteventname: &::windows::core::HSTRING) -> ::windows::core::Result { let this = &::windows::core::Interface::cast::(self)?; @@ -1630,35 +1581,25 @@ impl LoggingActivity { (::windows::core::Vtable::vtable(this).StartActivity)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(starteventname), result__.as_mut_ptr()).from_abi::(result__) } } - pub fn StartActivityWithFields<'a, P0>(&self, starteventname: &::windows::core::HSTRING, fields: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, LoggingFields>>, - { + pub fn StartActivityWithFields(&self, starteventname: &::windows::core::HSTRING, fields: &LoggingFields) -> ::windows::core::Result { let this = &::windows::core::Interface::cast::(self)?; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).StartActivityWithFields)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(starteventname), fields.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).StartActivityWithFields)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(starteventname), ::core::mem::transmute_copy(fields), result__.as_mut_ptr()).from_abi::(result__) } } - pub fn StartActivityWithFieldsAndLevel<'a, P0>(&self, starteventname: &::windows::core::HSTRING, fields: P0, level: LoggingLevel) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, LoggingFields>>, - { + pub fn StartActivityWithFieldsAndLevel(&self, starteventname: &::windows::core::HSTRING, fields: &LoggingFields, level: LoggingLevel) -> ::windows::core::Result { let this = &::windows::core::Interface::cast::(self)?; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).StartActivityWithFieldsAndLevel)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(starteventname), fields.into().abi(), level, result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).StartActivityWithFieldsAndLevel)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(starteventname), ::core::mem::transmute_copy(fields), level, result__.as_mut_ptr()).from_abi::(result__) } } - pub fn StartActivityWithFieldsAndOptions<'a, P0, P1>(&self, starteventname: &::windows::core::HSTRING, fields: P0, level: LoggingLevel, options: P1) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, LoggingFields>>, - P1: ::std::convert::Into<::windows::core::InParam<'a, LoggingOptions>>, - { + pub fn StartActivityWithFieldsAndOptions(&self, starteventname: &::windows::core::HSTRING, fields: &LoggingFields, level: LoggingLevel, options: &LoggingOptions) -> ::windows::core::Result { let this = &::windows::core::Interface::cast::(self)?; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).StartActivityWithFieldsAndOptions)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(starteventname), fields.into().abi(), level, options.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).StartActivityWithFieldsAndOptions)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(starteventname), ::core::mem::transmute_copy(fields), level, ::core::mem::transmute_copy(options), result__.as_mut_ptr()).from_abi::(result__) } } #[doc(hidden)] @@ -1814,14 +1755,11 @@ impl LoggingChannel { let this = self; unsafe { (::windows::core::Vtable::vtable(this).LogValuePairWithLevel)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value1), value2, level).ok() } } - pub fn LoggingEnabled<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::TypedEventHandler>>, - { + pub fn LoggingEnabled(&self, handler: &super::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).LoggingEnabled)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).LoggingEnabled)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } pub fn RemoveLoggingEnabled(&self, token: super::EventRegistrationToken) -> ::windows::core::Result<()> { @@ -1843,22 +1781,16 @@ impl LoggingChannel { (::windows::core::Vtable::vtable(this).Create)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(name), result__.as_mut_ptr()).from_abi::(result__) }) } - pub fn CreateWithOptions<'a, P0>(name: &::windows::core::HSTRING, options: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, LoggingChannelOptions>>, - { + pub fn CreateWithOptions(name: &::windows::core::HSTRING, options: &LoggingChannelOptions) -> ::windows::core::Result { Self::ILoggingChannelFactory2(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).CreateWithOptions)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(name), options.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).CreateWithOptions)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(name), ::core::mem::transmute_copy(options), result__.as_mut_ptr()).from_abi::(result__) }) } - pub fn CreateWithOptionsAndId<'a, P0>(name: &::windows::core::HSTRING, options: P0, id: ::windows::core::GUID) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, LoggingChannelOptions>>, - { + pub fn CreateWithOptionsAndId(name: &::windows::core::HSTRING, options: &LoggingChannelOptions, id: ::windows::core::GUID) -> ::windows::core::Result { Self::ILoggingChannelFactory2(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).CreateWithOptionsAndId)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(name), options.into().abi(), id, result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).CreateWithOptionsAndId)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(name), ::core::mem::transmute_copy(options), id, result__.as_mut_ptr()).from_abi::(result__) }) } pub fn IsEnabled(&self) -> ::windows::core::Result { @@ -1886,27 +1818,17 @@ impl LoggingChannel { let this = &::windows::core::Interface::cast::(self)?; unsafe { (::windows::core::Vtable::vtable(this).LogEvent)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(eventname)).ok() } } - pub fn LogEventWithFields<'a, P0>(&self, eventname: &::windows::core::HSTRING, fields: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, LoggingFields>>, - { + pub fn LogEventWithFields(&self, eventname: &::windows::core::HSTRING, fields: &LoggingFields) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).LogEventWithFields)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(eventname), fields.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).LogEventWithFields)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(eventname), ::core::mem::transmute_copy(fields)).ok() } } - pub fn LogEventWithFieldsAndLevel<'a, P0>(&self, eventname: &::windows::core::HSTRING, fields: P0, level: LoggingLevel) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, LoggingFields>>, - { + pub fn LogEventWithFieldsAndLevel(&self, eventname: &::windows::core::HSTRING, fields: &LoggingFields, level: LoggingLevel) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).LogEventWithFieldsAndLevel)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(eventname), fields.into().abi(), level).ok() } + unsafe { (::windows::core::Vtable::vtable(this).LogEventWithFieldsAndLevel)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(eventname), ::core::mem::transmute_copy(fields), level).ok() } } - pub fn LogEventWithFieldsAndOptions<'a, P0, P1>(&self, eventname: &::windows::core::HSTRING, fields: P0, level: LoggingLevel, options: P1) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, LoggingFields>>, - P1: ::std::convert::Into<::windows::core::InParam<'a, LoggingOptions>>, - { + pub fn LogEventWithFieldsAndOptions(&self, eventname: &::windows::core::HSTRING, fields: &LoggingFields, level: LoggingLevel, options: &LoggingOptions) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).LogEventWithFieldsAndOptions)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(eventname), fields.into().abi(), level, options.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).LogEventWithFieldsAndOptions)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(eventname), ::core::mem::transmute_copy(fields), level, ::core::mem::transmute_copy(options)).ok() } } pub fn StartActivity(&self, starteventname: &::windows::core::HSTRING) -> ::windows::core::Result { let this = &::windows::core::Interface::cast::(self)?; @@ -1915,35 +1837,25 @@ impl LoggingChannel { (::windows::core::Vtable::vtable(this).StartActivity)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(starteventname), result__.as_mut_ptr()).from_abi::(result__) } } - pub fn StartActivityWithFields<'a, P0>(&self, starteventname: &::windows::core::HSTRING, fields: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, LoggingFields>>, - { + pub fn StartActivityWithFields(&self, starteventname: &::windows::core::HSTRING, fields: &LoggingFields) -> ::windows::core::Result { let this = &::windows::core::Interface::cast::(self)?; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).StartActivityWithFields)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(starteventname), fields.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).StartActivityWithFields)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(starteventname), ::core::mem::transmute_copy(fields), result__.as_mut_ptr()).from_abi::(result__) } } - pub fn StartActivityWithFieldsAndLevel<'a, P0>(&self, starteventname: &::windows::core::HSTRING, fields: P0, level: LoggingLevel) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, LoggingFields>>, - { + pub fn StartActivityWithFieldsAndLevel(&self, starteventname: &::windows::core::HSTRING, fields: &LoggingFields, level: LoggingLevel) -> ::windows::core::Result { let this = &::windows::core::Interface::cast::(self)?; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).StartActivityWithFieldsAndLevel)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(starteventname), fields.into().abi(), level, result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).StartActivityWithFieldsAndLevel)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(starteventname), ::core::mem::transmute_copy(fields), level, result__.as_mut_ptr()).from_abi::(result__) } } - pub fn StartActivityWithFieldsAndOptions<'a, P0, P1>(&self, starteventname: &::windows::core::HSTRING, fields: P0, level: LoggingLevel, options: P1) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, LoggingFields>>, - P1: ::std::convert::Into<::windows::core::InParam<'a, LoggingOptions>>, - { + pub fn StartActivityWithFieldsAndOptions(&self, starteventname: &::windows::core::HSTRING, fields: &LoggingFields, level: LoggingLevel, options: &LoggingOptions) -> ::windows::core::Result { let this = &::windows::core::Interface::cast::(self)?; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).StartActivityWithFieldsAndOptions)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(starteventname), fields.into().abi(), level, options.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).StartActivityWithFieldsAndOptions)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(starteventname), ::core::mem::transmute_copy(fields), level, ::core::mem::transmute_copy(options), result__.as_mut_ptr()).from_abi::(result__) } } #[doc(hidden)] diff --git a/crates/libs/windows/src/Windows/Foundation/mod.rs b/crates/libs/windows/src/Windows/Foundation/mod.rs index d23b90720a..d5aa59b45b 100644 --- a/crates/libs/windows/src/Windows/Foundation/mod.rs +++ b/crates/libs/windows/src/Windows/Foundation/mod.rs @@ -10,12 +10,9 @@ pub mod Numerics; #[repr(transparent)] pub struct IAsyncAction(::windows::core::IUnknown); impl IAsyncAction { - pub fn SetCompleted<'a, P0>(&self, handler: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, AsyncActionCompletedHandler>>, - { + pub fn SetCompleted(&self, handler: &AsyncActionCompletedHandler) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).SetCompleted)(::windows::core::Vtable::as_raw(this), handler.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetCompleted)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler)).ok() } } pub fn Completed(&self) -> ::windows::core::Result { let this = self; @@ -181,12 +178,9 @@ pub struct IAsyncActionWithProgress(::windows::core::IUnknown, ::core where TProgress: ::windows::core::RuntimeType + 'static; impl IAsyncActionWithProgress { - pub fn SetProgress<'a, P0>(&self, handler: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, AsyncActionProgressHandler>>, - { + pub fn SetProgress(&self, handler: &AsyncActionProgressHandler) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).SetProgress)(::windows::core::Vtable::as_raw(this), handler.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetProgress)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler)).ok() } } pub fn Progress(&self) -> ::windows::core::Result> { let this = self; @@ -195,12 +189,9 @@ impl IAsyncActionWithProgress (::windows::core::Vtable::vtable(this).Progress)(::windows::core::Vtable::as_raw(this), result__.as_mut_ptr()).from_abi::>(result__) } } - pub fn SetCompleted<'a, P0>(&self, handler: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, AsyncActionWithProgressCompletedHandler>>, - { + pub fn SetCompleted(&self, handler: &AsyncActionWithProgressCompletedHandler) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).SetCompleted)(::windows::core::Vtable::as_raw(this), handler.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetCompleted)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler)).ok() } } pub fn Completed(&self) -> ::windows::core::Result> { let this = self; @@ -475,12 +466,9 @@ pub struct IAsyncOperation(::windows::core::IUnknown, ::core::marker::P where TResult: ::windows::core::RuntimeType + 'static; impl IAsyncOperation { - pub fn SetCompleted<'a, P0>(&self, handler: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, AsyncOperationCompletedHandler>>, - { + pub fn SetCompleted(&self, handler: &AsyncOperationCompletedHandler) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).SetCompleted)(::windows::core::Vtable::as_raw(this), handler.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetCompleted)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler)).ok() } } pub fn Completed(&self) -> ::windows::core::Result> { let this = self; @@ -654,12 +642,9 @@ where TResult: ::windows::core::RuntimeType + 'static, TProgress: ::windows::core::RuntimeType + 'static; impl IAsyncOperationWithProgress { - pub fn SetProgress<'a, P0>(&self, handler: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, AsyncOperationProgressHandler>>, - { + pub fn SetProgress(&self, handler: &AsyncOperationProgressHandler) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).SetProgress)(::windows::core::Vtable::as_raw(this), handler.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetProgress)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler)).ok() } } pub fn Progress(&self) -> ::windows::core::Result> { let this = self; @@ -668,12 +653,9 @@ impl>(result__) } } - pub fn SetCompleted<'a, P0>(&self, handler: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, AsyncOperationWithProgressCompletedHandler>>, - { + pub fn SetCompleted(&self, handler: &AsyncOperationWithProgressCompletedHandler) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).SetCompleted)(::windows::core::Vtable::as_raw(this), handler.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetCompleted)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler)).ok() } } pub fn Completed(&self) -> ::windows::core::Result> { let this = self; @@ -1168,14 +1150,11 @@ impl IMemoryBufferReference { (::windows::core::Vtable::vtable(this).Capacity)(::windows::core::Vtable::as_raw(this), result__.as_mut_ptr()).from_abi::(result__) } } - pub fn Closed<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, TypedEventHandler>>, - { + pub fn Closed(&self, handler: &TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).Closed)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).Closed)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } pub fn RemoveClosed(&self, cookie: EventRegistrationToken) -> ::windows::core::Result<()> { @@ -2569,13 +2548,10 @@ impl Deferral { let this = self; unsafe { (::windows::core::Vtable::vtable(this).Complete)(::windows::core::Vtable::as_raw(this)).ok() } } - pub fn Create<'a, P0>(handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, DeferralCompletedHandler>>, - { + pub fn Create(handler: &DeferralCompletedHandler) -> ::windows::core::Result { Self::IDeferralFactory(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).Create)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).Create)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) }) } #[doc(hidden)] @@ -3203,14 +3179,11 @@ impl Uri { (::windows::core::Vtable::vtable(this).Suspicious)(::windows::core::Vtable::as_raw(this), result__.as_mut_ptr()).from_abi::(result__) } } - pub fn Equals<'a, P0>(&self, puri: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, Uri>>, - { + pub fn Equals(&self, puri: &Uri) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).Equals)(::windows::core::Vtable::as_raw(this), puri.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).Equals)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(puri), result__.as_mut_ptr()).from_abi::(result__) } } pub fn CombineUri(&self, relativeuri: &::windows::core::HSTRING) -> ::windows::core::Result { diff --git a/crates/libs/windows/src/Windows/Gaming/Input/mod.rs b/crates/libs/windows/src/Windows/Gaming/Input/mod.rs index 62c4e02bb4..0cef450d73 100644 --- a/crates/libs/windows/src/Windows/Gaming/Input/mod.rs +++ b/crates/libs/windows/src/Windows/Gaming/Input/mod.rs @@ -127,14 +127,11 @@ pub struct IGameController(::windows::core::IUnknown); impl IGameController { #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn HeadsetConnected<'a, P0>(&self, value: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn HeadsetConnected(&self, value: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).HeadsetConnected)(::windows::core::Vtable::as_raw(this), value.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).HeadsetConnected)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -145,14 +142,11 @@ impl IGameController { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn HeadsetDisconnected<'a, P0>(&self, value: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn HeadsetDisconnected(&self, value: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).HeadsetDisconnected)(::windows::core::Vtable::as_raw(this), value.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).HeadsetDisconnected)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -163,14 +157,11 @@ impl IGameController { } #[doc = "*Required features: `\"Foundation\"`, `\"System\"`*"] #[cfg(all(feature = "Foundation", feature = "System"))] - pub fn UserChanged<'a, P0>(&self, value: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn UserChanged(&self, value: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).UserChanged)(::windows::core::Vtable::as_raw(this), value.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).UserChanged)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -717,13 +708,10 @@ impl ArcadeStick { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn ArcadeStickAdded<'a, P0>(value: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::EventHandler>>, - { + pub fn ArcadeStickAdded(value: &super::super::Foundation::EventHandler) -> ::windows::core::Result { Self::IArcadeStickStatics(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).ArcadeStickAdded)(::windows::core::Vtable::as_raw(this), value.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).ArcadeStickAdded)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value), result__.as_mut_ptr()).from_abi::(result__) }) } #[doc = "*Required features: `\"Foundation\"`*"] @@ -733,13 +721,10 @@ impl ArcadeStick { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn ArcadeStickRemoved<'a, P0>(value: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::EventHandler>>, - { + pub fn ArcadeStickRemoved(value: &super::super::Foundation::EventHandler) -> ::windows::core::Result { Self::IArcadeStickStatics(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).ArcadeStickRemoved)(::windows::core::Vtable::as_raw(this), value.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).ArcadeStickRemoved)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value), result__.as_mut_ptr()).from_abi::(result__) }) } #[doc = "*Required features: `\"Foundation\"`*"] @@ -767,14 +752,11 @@ impl ArcadeStick { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn HeadsetConnected<'a, P0>(&self, value: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn HeadsetConnected(&self, value: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = &::windows::core::Interface::cast::(self)?; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).HeadsetConnected)(::windows::core::Vtable::as_raw(this), value.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).HeadsetConnected)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -785,14 +767,11 @@ impl ArcadeStick { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn HeadsetDisconnected<'a, P0>(&self, value: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn HeadsetDisconnected(&self, value: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = &::windows::core::Interface::cast::(self)?; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).HeadsetDisconnected)(::windows::core::Vtable::as_raw(this), value.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).HeadsetDisconnected)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -803,14 +782,11 @@ impl ArcadeStick { } #[doc = "*Required features: `\"Foundation\"`, `\"System\"`*"] #[cfg(all(feature = "Foundation", feature = "System"))] - pub fn UserChanged<'a, P0>(&self, value: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn UserChanged(&self, value: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = &::windows::core::Interface::cast::(self)?; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).UserChanged)(::windows::core::Vtable::as_raw(this), value.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).UserChanged)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -991,13 +967,10 @@ impl FlightStick { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn FlightStickAdded<'a, P0>(value: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::EventHandler>>, - { + pub fn FlightStickAdded(value: &super::super::Foundation::EventHandler) -> ::windows::core::Result { Self::IFlightStickStatics(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).FlightStickAdded)(::windows::core::Vtable::as_raw(this), value.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).FlightStickAdded)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value), result__.as_mut_ptr()).from_abi::(result__) }) } #[doc = "*Required features: `\"Foundation\"`*"] @@ -1007,13 +980,10 @@ impl FlightStick { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn FlightStickRemoved<'a, P0>(value: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::EventHandler>>, - { + pub fn FlightStickRemoved(value: &super::super::Foundation::EventHandler) -> ::windows::core::Result { Self::IFlightStickStatics(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).FlightStickRemoved)(::windows::core::Vtable::as_raw(this), value.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).FlightStickRemoved)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value), result__.as_mut_ptr()).from_abi::(result__) }) } #[doc = "*Required features: `\"Foundation\"`*"] @@ -1041,14 +1011,11 @@ impl FlightStick { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn HeadsetConnected<'a, P0>(&self, value: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn HeadsetConnected(&self, value: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = &::windows::core::Interface::cast::(self)?; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).HeadsetConnected)(::windows::core::Vtable::as_raw(this), value.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).HeadsetConnected)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -1059,14 +1026,11 @@ impl FlightStick { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn HeadsetDisconnected<'a, P0>(&self, value: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn HeadsetDisconnected(&self, value: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = &::windows::core::Interface::cast::(self)?; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).HeadsetDisconnected)(::windows::core::Vtable::as_raw(this), value.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).HeadsetDisconnected)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -1077,14 +1041,11 @@ impl FlightStick { } #[doc = "*Required features: `\"Foundation\"`, `\"System\"`*"] #[cfg(all(feature = "Foundation", feature = "System"))] - pub fn UserChanged<'a, P0>(&self, value: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn UserChanged(&self, value: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = &::windows::core::Interface::cast::(self)?; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).UserChanged)(::windows::core::Vtable::as_raw(this), value.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).UserChanged)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -1239,14 +1200,11 @@ pub struct Gamepad(::windows::core::IUnknown); impl Gamepad { #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn HeadsetConnected<'a, P0>(&self, value: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn HeadsetConnected(&self, value: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = &::windows::core::Interface::cast::(self)?; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).HeadsetConnected)(::windows::core::Vtable::as_raw(this), value.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).HeadsetConnected)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -1257,14 +1215,11 @@ impl Gamepad { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn HeadsetDisconnected<'a, P0>(&self, value: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn HeadsetDisconnected(&self, value: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = &::windows::core::Interface::cast::(self)?; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).HeadsetDisconnected)(::windows::core::Vtable::as_raw(this), value.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).HeadsetDisconnected)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -1275,14 +1230,11 @@ impl Gamepad { } #[doc = "*Required features: `\"Foundation\"`, `\"System\"`*"] #[cfg(all(feature = "Foundation", feature = "System"))] - pub fn UserChanged<'a, P0>(&self, value: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn UserChanged(&self, value: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = &::windows::core::Interface::cast::(self)?; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).UserChanged)(::windows::core::Vtable::as_raw(this), value.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).UserChanged)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -1350,13 +1302,10 @@ impl Gamepad { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn GamepadAdded<'a, P0>(value: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::EventHandler>>, - { + pub fn GamepadAdded(value: &super::super::Foundation::EventHandler) -> ::windows::core::Result { Self::IGamepadStatics(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).GamepadAdded)(::windows::core::Vtable::as_raw(this), value.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).GamepadAdded)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value), result__.as_mut_ptr()).from_abi::(result__) }) } #[doc = "*Required features: `\"Foundation\"`*"] @@ -1366,13 +1315,10 @@ impl Gamepad { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn GamepadRemoved<'a, P0>(value: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::EventHandler>>, - { + pub fn GamepadRemoved(value: &super::super::Foundation::EventHandler) -> ::windows::core::Result { Self::IGamepadStatics(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).GamepadRemoved)(::windows::core::Vtable::as_raw(this), value.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).GamepadRemoved)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value), result__.as_mut_ptr()).from_abi::(result__) }) } #[doc = "*Required features: `\"Foundation\"`*"] @@ -1628,14 +1574,11 @@ pub struct RacingWheel(::windows::core::IUnknown); impl RacingWheel { #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn HeadsetConnected<'a, P0>(&self, value: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn HeadsetConnected(&self, value: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = &::windows::core::Interface::cast::(self)?; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).HeadsetConnected)(::windows::core::Vtable::as_raw(this), value.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).HeadsetConnected)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -1646,14 +1589,11 @@ impl RacingWheel { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn HeadsetDisconnected<'a, P0>(&self, value: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn HeadsetDisconnected(&self, value: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = &::windows::core::Interface::cast::(self)?; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).HeadsetDisconnected)(::windows::core::Vtable::as_raw(this), value.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).HeadsetDisconnected)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -1664,14 +1604,11 @@ impl RacingWheel { } #[doc = "*Required features: `\"Foundation\"`, `\"System\"`*"] #[cfg(all(feature = "Foundation", feature = "System"))] - pub fn UserChanged<'a, P0>(&self, value: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn UserChanged(&self, value: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = &::windows::core::Interface::cast::(self)?; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).UserChanged)(::windows::core::Vtable::as_raw(this), value.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).UserChanged)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -1772,13 +1709,10 @@ impl RacingWheel { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn RacingWheelAdded<'a, P0>(value: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::EventHandler>>, - { + pub fn RacingWheelAdded(value: &super::super::Foundation::EventHandler) -> ::windows::core::Result { Self::IRacingWheelStatics(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).RacingWheelAdded)(::windows::core::Vtable::as_raw(this), value.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).RacingWheelAdded)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value), result__.as_mut_ptr()).from_abi::(result__) }) } #[doc = "*Required features: `\"Foundation\"`*"] @@ -1788,13 +1722,10 @@ impl RacingWheel { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn RacingWheelRemoved<'a, P0>(value: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::EventHandler>>, - { + pub fn RacingWheelRemoved(value: &super::super::Foundation::EventHandler) -> ::windows::core::Result { Self::IRacingWheelStatics(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).RacingWheelRemoved)(::windows::core::Vtable::as_raw(this), value.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).RacingWheelRemoved)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value), result__.as_mut_ptr()).from_abi::(result__) }) } #[doc = "*Required features: `\"Foundation\"`*"] @@ -1939,14 +1870,11 @@ pub struct RawGameController(::windows::core::IUnknown); impl RawGameController { #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn HeadsetConnected<'a, P0>(&self, value: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn HeadsetConnected(&self, value: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = &::windows::core::Interface::cast::(self)?; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).HeadsetConnected)(::windows::core::Vtable::as_raw(this), value.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).HeadsetConnected)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -1957,14 +1885,11 @@ impl RawGameController { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn HeadsetDisconnected<'a, P0>(&self, value: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn HeadsetDisconnected(&self, value: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = &::windows::core::Interface::cast::(self)?; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).HeadsetDisconnected)(::windows::core::Vtable::as_raw(this), value.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).HeadsetDisconnected)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -1975,14 +1900,11 @@ impl RawGameController { } #[doc = "*Required features: `\"Foundation\"`, `\"System\"`*"] #[cfg(all(feature = "Foundation", feature = "System"))] - pub fn UserChanged<'a, P0>(&self, value: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn UserChanged(&self, value: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = &::windows::core::Interface::cast::(self)?; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).UserChanged)(::windows::core::Vtable::as_raw(this), value.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).UserChanged)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -2113,13 +2035,10 @@ impl RawGameController { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn RawGameControllerAdded<'a, P0>(value: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::EventHandler>>, - { + pub fn RawGameControllerAdded(value: &super::super::Foundation::EventHandler) -> ::windows::core::Result { Self::IRawGameControllerStatics(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).RawGameControllerAdded)(::windows::core::Vtable::as_raw(this), value.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).RawGameControllerAdded)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value), result__.as_mut_ptr()).from_abi::(result__) }) } #[doc = "*Required features: `\"Foundation\"`*"] @@ -2129,13 +2048,10 @@ impl RawGameController { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn RawGameControllerRemoved<'a, P0>(value: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::EventHandler>>, - { + pub fn RawGameControllerRemoved(value: &super::super::Foundation::EventHandler) -> ::windows::core::Result { Self::IRawGameControllerStatics(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).RawGameControllerRemoved)(::windows::core::Vtable::as_raw(this), value.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).RawGameControllerRemoved)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value), result__.as_mut_ptr()).from_abi::(result__) }) } #[doc = "*Required features: `\"Foundation\"`*"] @@ -2275,14 +2191,11 @@ pub struct UINavigationController(::windows::core::IUnknown); impl UINavigationController { #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn HeadsetConnected<'a, P0>(&self, value: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn HeadsetConnected(&self, value: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = &::windows::core::Interface::cast::(self)?; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).HeadsetConnected)(::windows::core::Vtable::as_raw(this), value.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).HeadsetConnected)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -2293,14 +2206,11 @@ impl UINavigationController { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn HeadsetDisconnected<'a, P0>(&self, value: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn HeadsetDisconnected(&self, value: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = &::windows::core::Interface::cast::(self)?; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).HeadsetDisconnected)(::windows::core::Vtable::as_raw(this), value.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).HeadsetDisconnected)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -2311,14 +2221,11 @@ impl UINavigationController { } #[doc = "*Required features: `\"Foundation\"`, `\"System\"`*"] #[cfg(all(feature = "Foundation", feature = "System"))] - pub fn UserChanged<'a, P0>(&self, value: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn UserChanged(&self, value: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = &::windows::core::Interface::cast::(self)?; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).UserChanged)(::windows::core::Vtable::as_raw(this), value.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).UserChanged)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -2382,13 +2289,10 @@ impl UINavigationController { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn UINavigationControllerAdded<'a, P0>(value: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::EventHandler>>, - { + pub fn UINavigationControllerAdded(value: &super::super::Foundation::EventHandler) -> ::windows::core::Result { Self::IUINavigationControllerStatics(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).UINavigationControllerAdded)(::windows::core::Vtable::as_raw(this), value.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).UINavigationControllerAdded)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value), result__.as_mut_ptr()).from_abi::(result__) }) } #[doc = "*Required features: `\"Foundation\"`*"] @@ -2398,13 +2302,10 @@ impl UINavigationController { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn UINavigationControllerRemoved<'a, P0>(value: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::EventHandler>>, - { + pub fn UINavigationControllerRemoved(value: &super::super::Foundation::EventHandler) -> ::windows::core::Result { Self::IUINavigationControllerStatics(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).UINavigationControllerRemoved)(::windows::core::Vtable::as_raw(this), value.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).UINavigationControllerRemoved)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value), result__.as_mut_ptr()).from_abi::(result__) }) } #[doc = "*Required features: `\"Foundation\"`*"] diff --git a/crates/libs/windows/src/Windows/Gaming/Preview/GamesEnumeration/mod.rs b/crates/libs/windows/src/Windows/Gaming/Preview/GamesEnumeration/mod.rs index d8660fcacd..1d049400b6 100644 --- a/crates/libs/windows/src/Windows/Gaming/Preview/GamesEnumeration/mod.rs +++ b/crates/libs/windows/src/Windows/Gaming/Preview/GamesEnumeration/mod.rs @@ -361,13 +361,10 @@ impl GameList { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn GameAdded<'a, P0>(handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, GameListChangedEventHandler>>, - { + pub fn GameAdded(handler: &GameListChangedEventHandler) -> ::windows::core::Result { Self::IGameListStatics(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).GameAdded)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).GameAdded)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) }) } #[doc = "*Required features: `\"Foundation\"`*"] @@ -377,13 +374,10 @@ impl GameList { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn GameRemoved<'a, P0>(handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, GameListRemovedEventHandler>>, - { + pub fn GameRemoved(handler: &GameListRemovedEventHandler) -> ::windows::core::Result { Self::IGameListStatics(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).GameRemoved)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).GameRemoved)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) }) } #[doc = "*Required features: `\"Foundation\"`*"] @@ -393,13 +387,10 @@ impl GameList { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn GameUpdated<'a, P0>(handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, GameListChangedEventHandler>>, - { + pub fn GameUpdated(handler: &GameListChangedEventHandler) -> ::windows::core::Result { Self::IGameListStatics(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).GameUpdated)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).GameUpdated)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) }) } #[doc = "*Required features: `\"Foundation\"`*"] @@ -409,25 +400,18 @@ impl GameList { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn MergeEntriesAsync<'a, P0, P1>(left: P0, right: P1) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, GameListEntry>>, - P1: ::std::convert::Into<::windows::core::InParam<'a, GameListEntry>>, - { + pub fn MergeEntriesAsync(left: &GameListEntry, right: &GameListEntry) -> ::windows::core::Result> { Self::IGameListStatics2(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).MergeEntriesAsync)(::windows::core::Vtable::as_raw(this), left.into().abi(), right.into().abi(), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).MergeEntriesAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(left), ::core::mem::transmute_copy(right), result__.as_mut_ptr()).from_abi::>(result__) }) } #[doc = "*Required features: `\"Foundation_Collections\"`*"] #[cfg(feature = "Foundation_Collections")] - pub fn UnmergeEntryAsync<'a, P0>(mergedentry: P0) -> ::windows::core::Result>> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, GameListEntry>>, - { + pub fn UnmergeEntryAsync(mergedentry: &GameListEntry) -> ::windows::core::Result>> { Self::IGameListStatics2(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).UnmergeEntryAsync)(::windows::core::Vtable::as_raw(this), mergedentry.into().abi(), result__.as_mut_ptr()).from_abi::>>(result__) + (::windows::core::Vtable::vtable(this).UnmergeEntryAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(mergedentry), result__.as_mut_ptr()).from_abi::>>(result__) }) } #[doc(hidden)] @@ -1047,12 +1031,9 @@ impl GameListChangedEventHandler { let com = GameListChangedEventHandlerBox:: { vtable: &GameListChangedEventHandlerBox::::VTABLE, count: ::windows::core::RefCount::new(1), invoke }; unsafe { ::core::mem::transmute(::windows::core::alloc::boxed::Box::new(com)) } } - pub fn Invoke<'a, P0>(&self, game: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, GameListEntry>>, - { + pub fn Invoke(&self, game: &GameListEntry) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).Invoke)(::windows::core::Vtable::as_raw(this), game.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).Invoke)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(game)).ok() } } } #[repr(C)] diff --git a/crates/libs/windows/src/Windows/Gaming/UI/mod.rs b/crates/libs/windows/src/Windows/Gaming/UI/mod.rs index 14347a4c2b..c45dcb20be 100644 --- a/crates/libs/windows/src/Windows/Gaming/UI/mod.rs +++ b/crates/libs/windows/src/Windows/Gaming/UI/mod.rs @@ -134,13 +134,10 @@ pub struct GameBar; impl GameBar { #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn VisibilityChanged<'a, P0>(handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::EventHandler<::windows::core::IInspectable>>>, - { + pub fn VisibilityChanged(handler: &super::super::Foundation::EventHandler<::windows::core::IInspectable>) -> ::windows::core::Result { Self::IGameBarStatics(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).VisibilityChanged)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).VisibilityChanged)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) }) } #[doc = "*Required features: `\"Foundation\"`*"] @@ -150,13 +147,10 @@ impl GameBar { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn IsInputRedirectedChanged<'a, P0>(handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::EventHandler<::windows::core::IInspectable>>>, - { + pub fn IsInputRedirectedChanged(handler: &super::super::Foundation::EventHandler<::windows::core::IInspectable>) -> ::windows::core::Result { Self::IGameBarStatics(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).IsInputRedirectedChanged)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).IsInputRedirectedChanged)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) }) } #[doc = "*Required features: `\"Foundation\"`*"] @@ -397,14 +391,11 @@ impl GameChatOverlayMessageSource { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn MessageReceived<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn MessageReceived(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).MessageReceived)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).MessageReceived)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -526,12 +517,9 @@ impl GameUIProviderActivatedEventArgs { } #[doc = "*Required features: `\"Foundation_Collections\"`*"] #[cfg(feature = "Foundation_Collections")] - pub fn ReportCompleted<'a, P0>(&self, results: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::Collections::ValueSet>>, - { + pub fn ReportCompleted(&self, results: &super::super::Foundation::Collections::ValueSet) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).ReportCompleted)(::windows::core::Vtable::as_raw(this), results.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).ReportCompleted)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(results)).ok() } } } impl ::core::clone::Clone for GameUIProviderActivatedEventArgs { diff --git a/crates/libs/windows/src/Windows/Gaming/XboxLive/Storage/mod.rs b/crates/libs/windows/src/Windows/Gaming/XboxLive/Storage/mod.rs index 5cbda9988b..873debe2b8 100644 --- a/crates/libs/windows/src/Windows/Gaming/XboxLive/Storage/mod.rs +++ b/crates/libs/windows/src/Windows/Gaming/XboxLive/Storage/mod.rs @@ -1185,24 +1185,18 @@ impl GameSaveProvider { } #[doc = "*Required features: `\"Foundation\"`, `\"System\"`*"] #[cfg(all(feature = "Foundation", feature = "System"))] - pub fn GetForUserAsync<'a, P0>(user: P0, serviceconfigid: &::windows::core::HSTRING) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::System::User>>, - { + pub fn GetForUserAsync(user: &super::super::super::System::User, serviceconfigid: &::windows::core::HSTRING) -> ::windows::core::Result> { Self::IGameSaveProviderStatics(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).GetForUserAsync)(::windows::core::Vtable::as_raw(this), user.into().abi(), ::core::mem::transmute_copy(serviceconfigid), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).GetForUserAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(user), ::core::mem::transmute_copy(serviceconfigid), result__.as_mut_ptr()).from_abi::>(result__) }) } #[doc = "*Required features: `\"Foundation\"`, `\"System\"`*"] #[cfg(all(feature = "Foundation", feature = "System"))] - pub fn GetSyncOnDemandForUserAsync<'a, P0>(user: P0, serviceconfigid: &::windows::core::HSTRING) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::System::User>>, - { + pub fn GetSyncOnDemandForUserAsync(user: &super::super::super::System::User, serviceconfigid: &::windows::core::HSTRING) -> ::windows::core::Result> { Self::IGameSaveProviderStatics(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).GetSyncOnDemandForUserAsync)(::windows::core::Vtable::as_raw(this), user.into().abi(), ::core::mem::transmute_copy(serviceconfigid), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).GetSyncOnDemandForUserAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(user), ::core::mem::transmute_copy(serviceconfigid), result__.as_mut_ptr()).from_abi::>(result__) }) } #[doc(hidden)] diff --git a/crates/libs/windows/src/Windows/Globalization/Collation/mod.rs b/crates/libs/windows/src/Windows/Globalization/Collation/mod.rs index 5f219e4219..817c81179b 100644 --- a/crates/libs/windows/src/Windows/Globalization/Collation/mod.rs +++ b/crates/libs/windows/src/Windows/Globalization/Collation/mod.rs @@ -180,14 +180,11 @@ impl CharacterGroupings { } #[doc = "*Required features: `\"Foundation_Collections\"`*"] #[cfg(feature = "Foundation_Collections")] - pub fn IndexOf<'a, P0>(&self, value: P0, index: &mut u32) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, CharacterGrouping>>, - { + pub fn IndexOf(&self, value: &CharacterGrouping, index: &mut u32) -> ::windows::core::Result { let this = &::windows::core::Interface::cast::>(self)?; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).IndexOf)(::windows::core::Vtable::as_raw(this), value.into().abi(), index, result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).IndexOf)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value), index, result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation_Collections\"`*"] diff --git a/crates/libs/windows/src/Windows/Globalization/PhoneNumberFormatting/mod.rs b/crates/libs/windows/src/Windows/Globalization/PhoneNumberFormatting/mod.rs index c090b6f09c..51b569d9d7 100644 --- a/crates/libs/windows/src/Windows/Globalization/PhoneNumberFormatting/mod.rs +++ b/crates/libs/windows/src/Windows/Globalization/PhoneNumberFormatting/mod.rs @@ -99,24 +99,18 @@ impl PhoneNumberFormatter { static SHARED: ::windows::core::FactoryCache = ::windows::core::FactoryCache::new(); SHARED.call(callback) } - pub fn Format<'a, P0>(&self, number: P0) -> ::windows::core::Result<::windows::core::HSTRING> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, PhoneNumberInfo>>, - { + pub fn Format(&self, number: &PhoneNumberInfo) -> ::windows::core::Result<::windows::core::HSTRING> { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).Format)(::windows::core::Vtable::as_raw(this), number.into().abi(), result__.as_mut_ptr()).from_abi::<::windows::core::HSTRING>(result__) + (::windows::core::Vtable::vtable(this).Format)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(number), result__.as_mut_ptr()).from_abi::<::windows::core::HSTRING>(result__) } } - pub fn FormatWithOutputFormat<'a, P0>(&self, number: P0, numberformat: PhoneNumberFormat) -> ::windows::core::Result<::windows::core::HSTRING> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, PhoneNumberInfo>>, - { + pub fn FormatWithOutputFormat(&self, number: &PhoneNumberInfo, numberformat: PhoneNumberFormat) -> ::windows::core::Result<::windows::core::HSTRING> { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).FormatWithOutputFormat)(::windows::core::Vtable::as_raw(this), number.into().abi(), numberformat, result__.as_mut_ptr()).from_abi::<::windows::core::HSTRING>(result__) + (::windows::core::Vtable::vtable(this).FormatWithOutputFormat)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(number), numberformat, result__.as_mut_ptr()).from_abi::<::windows::core::HSTRING>(result__) } } pub fn FormatPartialString(&self, number: &::windows::core::HSTRING) -> ::windows::core::Result<::windows::core::HSTRING> { @@ -284,14 +278,11 @@ impl PhoneNumberInfo { (::windows::core::Vtable::vtable(this).GetGeographicRegionCode)(::windows::core::Vtable::as_raw(this), result__.as_mut_ptr()).from_abi::<::windows::core::HSTRING>(result__) } } - pub fn CheckNumberMatch<'a, P0>(&self, othernumber: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, PhoneNumberInfo>>, - { + pub fn CheckNumberMatch(&self, othernumber: &PhoneNumberInfo) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).CheckNumberMatch)(::windows::core::Vtable::as_raw(this), othernumber.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).CheckNumberMatch)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(othernumber), result__.as_mut_ptr()).from_abi::(result__) } } pub fn Create(number: &::windows::core::HSTRING) -> ::windows::core::Result { diff --git a/crates/libs/windows/src/Windows/Globalization/mod.rs b/crates/libs/windows/src/Windows/Globalization/mod.rs index 8a357bec80..f507714881 100644 --- a/crates/libs/windows/src/Windows/Globalization/mod.rs +++ b/crates/libs/windows/src/Windows/Globalization/mod.rs @@ -869,13 +869,10 @@ impl ApplicationLanguages { } #[doc = "*Required features: `\"Foundation_Collections\"`, `\"System\"`*"] #[cfg(all(feature = "Foundation_Collections", feature = "System"))] - pub fn GetLanguagesForUser<'a, P0>(user: P0) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::System::User>>, - { + pub fn GetLanguagesForUser(user: &super::System::User) -> ::windows::core::Result> { Self::IApplicationLanguagesStatics2(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).GetLanguagesForUser)(::windows::core::Vtable::as_raw(this), user.into().abi(), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).GetLanguagesForUser)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(user), result__.as_mut_ptr()).from_abi::>(result__) }) } #[doc(hidden)] @@ -1440,14 +1437,11 @@ impl Calendar { (::windows::core::Vtable::vtable(this).NanosecondAsPaddedString)(::windows::core::Vtable::as_raw(this), mindigits, result__.as_mut_ptr()).from_abi::<::windows::core::HSTRING>(result__) } } - pub fn Compare<'a, P0>(&self, other: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, Calendar>>, - { + pub fn Compare(&self, other: &Calendar) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).Compare)(::windows::core::Vtable::as_raw(this), other.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).Compare)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(other), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -1459,12 +1453,9 @@ impl Calendar { (::windows::core::Vtable::vtable(this).CompareDateTime)(::windows::core::Vtable::as_raw(this), other, result__.as_mut_ptr()).from_abi::(result__) } } - pub fn CopyTo<'a, P0>(&self, other: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, Calendar>>, - { + pub fn CopyTo(&self, other: &Calendar) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).CopyTo)(::windows::core::Vtable::as_raw(this), other.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).CopyTo)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(other)).ok() } } pub fn FirstMinuteInThisHour(&self) -> ::windows::core::Result { let this = self; diff --git a/crates/libs/windows/src/Windows/Graphics/Capture/mod.rs b/crates/libs/windows/src/Windows/Graphics/Capture/mod.rs index 67801e7651..bac321aadf 100644 --- a/crates/libs/windows/src/Windows/Graphics/Capture/mod.rs +++ b/crates/libs/windows/src/Windows/Graphics/Capture/mod.rs @@ -399,14 +399,11 @@ impl Direct3D11CaptureFramePool { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn FrameArrived<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn FrameArrived(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).FrameArrived)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).FrameArrived)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -415,14 +412,11 @@ impl Direct3D11CaptureFramePool { let this = self; unsafe { (::windows::core::Vtable::vtable(this).RemoveFrameArrived)(::windows::core::Vtable::as_raw(this), token).ok() } } - pub fn CreateCaptureSession<'a, P0>(&self, item: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, GraphicsCaptureItem>>, - { + pub fn CreateCaptureSession(&self, item: &GraphicsCaptureItem) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).CreateCaptureSession)(::windows::core::Vtable::as_raw(this), item.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).CreateCaptureSession)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(item), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"System\"`*"] @@ -595,14 +589,11 @@ impl GraphicsCaptureItem { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn Closed<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn Closed(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).Closed)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).Closed)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] diff --git a/crates/libs/windows/src/Windows/Graphics/Display/Core/mod.rs b/crates/libs/windows/src/Windows/Graphics/Display/Core/mod.rs index b321a6dffa..eab70e1e93 100644 --- a/crates/libs/windows/src/Windows/Graphics/Display/Core/mod.rs +++ b/crates/libs/windows/src/Windows/Graphics/Display/Core/mod.rs @@ -127,50 +127,38 @@ impl HdmiDisplayInformation { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn RequestSetCurrentDisplayModeAsync<'a, P0>(&self, mode: P0) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, HdmiDisplayMode>>, - { + pub fn RequestSetCurrentDisplayModeAsync(&self, mode: &HdmiDisplayMode) -> ::windows::core::Result> { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).RequestSetCurrentDisplayModeAsync)(::windows::core::Vtable::as_raw(this), mode.into().abi(), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).RequestSetCurrentDisplayModeAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(mode), result__.as_mut_ptr()).from_abi::>(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn RequestSetCurrentDisplayModeWithHdrAsync<'a, P0>(&self, mode: P0, hdroption: HdmiDisplayHdrOption) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, HdmiDisplayMode>>, - { + pub fn RequestSetCurrentDisplayModeWithHdrAsync(&self, mode: &HdmiDisplayMode, hdroption: HdmiDisplayHdrOption) -> ::windows::core::Result> { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).RequestSetCurrentDisplayModeWithHdrAsync)(::windows::core::Vtable::as_raw(this), mode.into().abi(), hdroption, result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).RequestSetCurrentDisplayModeWithHdrAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(mode), hdroption, result__.as_mut_ptr()).from_abi::>(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn RequestSetCurrentDisplayModeWithHdrAndMetadataAsync<'a, P0>(&self, mode: P0, hdroption: HdmiDisplayHdrOption, hdrmetadata: HdmiDisplayHdr2086Metadata) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, HdmiDisplayMode>>, - { + pub fn RequestSetCurrentDisplayModeWithHdrAndMetadataAsync(&self, mode: &HdmiDisplayMode, hdroption: HdmiDisplayHdrOption, hdrmetadata: HdmiDisplayHdr2086Metadata) -> ::windows::core::Result> { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).RequestSetCurrentDisplayModeWithHdrAndMetadataAsync)(::windows::core::Vtable::as_raw(this), mode.into().abi(), hdroption, hdrmetadata, result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).RequestSetCurrentDisplayModeWithHdrAndMetadataAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(mode), hdroption, hdrmetadata, result__.as_mut_ptr()).from_abi::>(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn DisplayModesChanged<'a, P0>(&self, value: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Foundation::TypedEventHandler>>, - { + pub fn DisplayModesChanged(&self, value: &super::super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).DisplayModesChanged)(::windows::core::Vtable::as_raw(this), value.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).DisplayModesChanged)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -294,14 +282,11 @@ impl HdmiDisplayMode { (::windows::core::Vtable::vtable(this).BitsPerPixel)(::windows::core::Vtable::as_raw(this), result__.as_mut_ptr()).from_abi::(result__) } } - pub fn IsEqual<'a, P0>(&self, mode: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, HdmiDisplayMode>>, - { + pub fn IsEqual(&self, mode: &HdmiDisplayMode) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).IsEqual)(::windows::core::Vtable::as_raw(this), mode.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).IsEqual)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(mode), result__.as_mut_ptr()).from_abi::(result__) } } pub fn ColorSpace(&self) -> ::windows::core::Result { diff --git a/crates/libs/windows/src/Windows/Graphics/Display/mod.rs b/crates/libs/windows/src/Windows/Graphics/Display/mod.rs index 5e458917eb..e4e1a3cf57 100644 --- a/crates/libs/windows/src/Windows/Graphics/Display/mod.rs +++ b/crates/libs/windows/src/Windows/Graphics/Display/mod.rs @@ -740,14 +740,11 @@ impl BrightnessOverride { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn IsSupportedChanged<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn IsSupportedChanged(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).IsSupportedChanged)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).IsSupportedChanged)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -758,14 +755,11 @@ impl BrightnessOverride { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn IsOverrideActiveChanged<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn IsOverrideActiveChanged(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).IsOverrideActiveChanged)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).IsOverrideActiveChanged)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -776,14 +770,11 @@ impl BrightnessOverride { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn BrightnessLevelChanged<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn BrightnessLevelChanged(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).BrightnessLevelChanged)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).BrightnessLevelChanged)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -806,13 +797,10 @@ impl BrightnessOverride { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn SaveForSystemAsync<'a, P0>(value: P0) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, BrightnessOverride>>, - { + pub fn SaveForSystemAsync(value: &BrightnessOverride) -> ::windows::core::Result> { Self::IBrightnessOverrideStatics(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).SaveForSystemAsync)(::windows::core::Vtable::as_raw(this), value.into().abi(), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).SaveForSystemAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value), result__.as_mut_ptr()).from_abi::>(result__) }) } #[doc(hidden)] @@ -1089,12 +1077,9 @@ impl DisplayEnhancementOverride { (::windows::core::Vtable::vtable(this).ColorOverrideSettings)(::windows::core::Vtable::as_raw(this), result__.as_mut_ptr()).from_abi::(result__) } } - pub fn SetColorOverrideSettings<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, ColorOverrideSettings>>, - { + pub fn SetColorOverrideSettings(&self, value: &ColorOverrideSettings) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).SetColorOverrideSettings)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetColorOverrideSettings)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } pub fn BrightnessOverrideSettings(&self) -> ::windows::core::Result { let this = self; @@ -1103,12 +1088,9 @@ impl DisplayEnhancementOverride { (::windows::core::Vtable::vtable(this).BrightnessOverrideSettings)(::windows::core::Vtable::as_raw(this), result__.as_mut_ptr()).from_abi::(result__) } } - pub fn SetBrightnessOverrideSettings<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, BrightnessOverrideSettings>>, - { + pub fn SetBrightnessOverrideSettings(&self, value: &BrightnessOverrideSettings) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).SetBrightnessOverrideSettings)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetBrightnessOverrideSettings)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } pub fn CanOverride(&self) -> ::windows::core::Result { let this = self; @@ -1141,14 +1123,11 @@ impl DisplayEnhancementOverride { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn CanOverrideChanged<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn CanOverrideChanged(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).CanOverrideChanged)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).CanOverrideChanged)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -1159,14 +1138,11 @@ impl DisplayEnhancementOverride { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn IsOverrideActiveChanged<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn IsOverrideActiveChanged(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).IsOverrideActiveChanged)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).IsOverrideActiveChanged)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -1177,14 +1153,11 @@ impl DisplayEnhancementOverride { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn DisplayEnhancementOverrideCapabilitiesChanged<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn DisplayEnhancementOverrideCapabilitiesChanged(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).DisplayEnhancementOverrideCapabilitiesChanged)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).DisplayEnhancementOverrideCapabilitiesChanged)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -1457,14 +1430,11 @@ impl DisplayInformation { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn OrientationChanged<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn OrientationChanged(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).OrientationChanged)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).OrientationChanged)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -1503,14 +1473,11 @@ impl DisplayInformation { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn DpiChanged<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn DpiChanged(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).DpiChanged)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).DpiChanged)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -1528,14 +1495,11 @@ impl DisplayInformation { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn StereoEnabledChanged<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn StereoEnabledChanged(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).StereoEnabledChanged)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).StereoEnabledChanged)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -1555,14 +1519,11 @@ impl DisplayInformation { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn ColorProfileChanged<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn ColorProfileChanged(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).ColorProfileChanged)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).ColorProfileChanged)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -1610,14 +1571,11 @@ impl DisplayInformation { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn AdvancedColorInfoChanged<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn AdvancedColorInfoChanged(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = &::windows::core::Interface::cast::(self)?; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).AdvancedColorInfoChanged)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).AdvancedColorInfoChanged)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -1643,13 +1601,10 @@ impl DisplayInformation { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn DisplayContentsInvalidated<'a, P0>(handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn DisplayContentsInvalidated(handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { Self::IDisplayInformationStatics(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).DisplayContentsInvalidated)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).DisplayContentsInvalidated)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) }) } #[doc = "*Required features: `\"Foundation\"`*"] @@ -1763,13 +1718,10 @@ impl DisplayProperties { } #[doc = "*Required features: `\"Foundation\"`, `\"deprecated\"`*"] #[cfg(all(feature = "Foundation", feature = "deprecated"))] - pub fn OrientationChanged<'a, P0>(handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, DisplayPropertiesEventHandler>>, - { + pub fn OrientationChanged(handler: &DisplayPropertiesEventHandler) -> ::windows::core::Result { Self::IDisplayPropertiesStatics(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).OrientationChanged)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).OrientationChanged)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) }) } #[doc = "*Required features: `\"Foundation\"`, `\"deprecated\"`*"] @@ -1795,13 +1747,10 @@ impl DisplayProperties { } #[doc = "*Required features: `\"Foundation\"`, `\"deprecated\"`*"] #[cfg(all(feature = "Foundation", feature = "deprecated"))] - pub fn LogicalDpiChanged<'a, P0>(handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, DisplayPropertiesEventHandler>>, - { + pub fn LogicalDpiChanged(handler: &DisplayPropertiesEventHandler) -> ::windows::core::Result { Self::IDisplayPropertiesStatics(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).LogicalDpiChanged)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).LogicalDpiChanged)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) }) } #[doc = "*Required features: `\"Foundation\"`, `\"deprecated\"`*"] @@ -1819,13 +1768,10 @@ impl DisplayProperties { } #[doc = "*Required features: `\"Foundation\"`, `\"deprecated\"`*"] #[cfg(all(feature = "Foundation", feature = "deprecated"))] - pub fn StereoEnabledChanged<'a, P0>(handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, DisplayPropertiesEventHandler>>, - { + pub fn StereoEnabledChanged(handler: &DisplayPropertiesEventHandler) -> ::windows::core::Result { Self::IDisplayPropertiesStatics(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).StereoEnabledChanged)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).StereoEnabledChanged)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) }) } #[doc = "*Required features: `\"Foundation\"`, `\"deprecated\"`*"] @@ -1843,13 +1789,10 @@ impl DisplayProperties { } #[doc = "*Required features: `\"Foundation\"`, `\"deprecated\"`*"] #[cfg(all(feature = "Foundation", feature = "deprecated"))] - pub fn ColorProfileChanged<'a, P0>(handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, DisplayPropertiesEventHandler>>, - { + pub fn ColorProfileChanged(handler: &DisplayPropertiesEventHandler) -> ::windows::core::Result { Self::IDisplayPropertiesStatics(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).ColorProfileChanged)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).ColorProfileChanged)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) }) } #[doc = "*Required features: `\"Foundation\"`, `\"deprecated\"`*"] @@ -1859,13 +1802,10 @@ impl DisplayProperties { } #[doc = "*Required features: `\"Foundation\"`, `\"deprecated\"`*"] #[cfg(all(feature = "Foundation", feature = "deprecated"))] - pub fn DisplayContentsInvalidated<'a, P0>(handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, DisplayPropertiesEventHandler>>, - { + pub fn DisplayContentsInvalidated(handler: &DisplayPropertiesEventHandler) -> ::windows::core::Result { Self::IDisplayPropertiesStatics(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).DisplayContentsInvalidated)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).DisplayContentsInvalidated)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) }) } #[doc = "*Required features: `\"Foundation\"`, `\"deprecated\"`*"] diff --git a/crates/libs/windows/src/Windows/Graphics/Holographic/mod.rs b/crates/libs/windows/src/Windows/Graphics/Holographic/mod.rs index ad1154eb87..17c11ee2a7 100644 --- a/crates/libs/windows/src/Windows/Graphics/Holographic/mod.rs +++ b/crates/libs/windows/src/Windows/Graphics/Holographic/mod.rs @@ -1114,14 +1114,11 @@ impl HolographicCameraPose { } #[doc = "*Required features: `\"Foundation_Numerics\"`, `\"Perception_Spatial\"`*"] #[cfg(all(feature = "Foundation_Numerics", feature = "Perception_Spatial"))] - pub fn TryGetViewTransform<'a, P0>(&self, coordinatesystem: P0) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Perception::Spatial::SpatialCoordinateSystem>>, - { + pub fn TryGetViewTransform(&self, coordinatesystem: &super::super::Perception::Spatial::SpatialCoordinateSystem) -> ::windows::core::Result> { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).TryGetViewTransform)(::windows::core::Vtable::as_raw(this), coordinatesystem.into().abi(), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).TryGetViewTransform)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(coordinatesystem), result__.as_mut_ptr()).from_abi::>(result__) } } #[doc = "*Required features: `\"Foundation_Numerics\"`*"] @@ -1135,26 +1132,20 @@ impl HolographicCameraPose { } #[doc = "*Required features: `\"Foundation_Numerics\"`, `\"Perception_Spatial\"`*"] #[cfg(all(feature = "Foundation_Numerics", feature = "Perception_Spatial"))] - pub fn TryGetCullingFrustum<'a, P0>(&self, coordinatesystem: P0) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Perception::Spatial::SpatialCoordinateSystem>>, - { + pub fn TryGetCullingFrustum(&self, coordinatesystem: &super::super::Perception::Spatial::SpatialCoordinateSystem) -> ::windows::core::Result> { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).TryGetCullingFrustum)(::windows::core::Vtable::as_raw(this), coordinatesystem.into().abi(), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).TryGetCullingFrustum)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(coordinatesystem), result__.as_mut_ptr()).from_abi::>(result__) } } #[doc = "*Required features: `\"Foundation_Numerics\"`, `\"Perception_Spatial\"`*"] #[cfg(all(feature = "Foundation_Numerics", feature = "Perception_Spatial"))] - pub fn TryGetVisibleFrustum<'a, P0>(&self, coordinatesystem: P0) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Perception::Spatial::SpatialCoordinateSystem>>, - { + pub fn TryGetVisibleFrustum(&self, coordinatesystem: &super::super::Perception::Spatial::SpatialCoordinateSystem) -> ::windows::core::Result> { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).TryGetVisibleFrustum)(::windows::core::Vtable::as_raw(this), coordinatesystem.into().abi(), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).TryGetVisibleFrustum)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(coordinatesystem), result__.as_mut_ptr()).from_abi::>(result__) } } pub fn NearPlaneDistance(&self) -> ::windows::core::Result { @@ -1173,12 +1164,9 @@ impl HolographicCameraPose { } #[doc = "*Required features: `\"Foundation_Numerics\"`, `\"Perception_Spatial\"`*"] #[cfg(all(feature = "Foundation_Numerics", feature = "Perception_Spatial"))] - pub fn OverrideViewTransform<'a, P0>(&self, coordinatesystem: P0, coordinatesystemtoviewtransform: HolographicStereoTransform) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Perception::Spatial::SpatialCoordinateSystem>>, - { + pub fn OverrideViewTransform(&self, coordinatesystem: &super::super::Perception::Spatial::SpatialCoordinateSystem, coordinatesystemtoviewtransform: HolographicStereoTransform) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).OverrideViewTransform)(::windows::core::Vtable::as_raw(this), coordinatesystem.into().abi(), coordinatesystemtoviewtransform).ok() } + unsafe { (::windows::core::Vtable::vtable(this).OverrideViewTransform)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(coordinatesystem), coordinatesystemtoviewtransform).ok() } } #[doc = "*Required features: `\"Foundation_Numerics\"`*"] #[cfg(feature = "Foundation_Numerics")] @@ -1263,30 +1251,21 @@ pub struct HolographicCameraRenderingParameters(::windows::core::IUnknown); impl HolographicCameraRenderingParameters { #[doc = "*Required features: `\"Foundation_Numerics\"`, `\"Perception_Spatial\"`*"] #[cfg(all(feature = "Foundation_Numerics", feature = "Perception_Spatial"))] - pub fn SetFocusPoint<'a, P0>(&self, coordinatesystem: P0, position: super::super::Foundation::Numerics::Vector3) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Perception::Spatial::SpatialCoordinateSystem>>, - { + pub fn SetFocusPoint(&self, coordinatesystem: &super::super::Perception::Spatial::SpatialCoordinateSystem, position: super::super::Foundation::Numerics::Vector3) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).SetFocusPoint)(::windows::core::Vtable::as_raw(this), coordinatesystem.into().abi(), position).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetFocusPoint)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(coordinatesystem), position).ok() } } #[doc = "*Required features: `\"Foundation_Numerics\"`, `\"Perception_Spatial\"`*"] #[cfg(all(feature = "Foundation_Numerics", feature = "Perception_Spatial"))] - pub fn SetFocusPointWithNormal<'a, P0>(&self, coordinatesystem: P0, position: super::super::Foundation::Numerics::Vector3, normal: super::super::Foundation::Numerics::Vector3) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Perception::Spatial::SpatialCoordinateSystem>>, - { + pub fn SetFocusPointWithNormal(&self, coordinatesystem: &super::super::Perception::Spatial::SpatialCoordinateSystem, position: super::super::Foundation::Numerics::Vector3, normal: super::super::Foundation::Numerics::Vector3) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).SetFocusPointWithNormal)(::windows::core::Vtable::as_raw(this), coordinatesystem.into().abi(), position, normal).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetFocusPointWithNormal)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(coordinatesystem), position, normal).ok() } } #[doc = "*Required features: `\"Foundation_Numerics\"`, `\"Perception_Spatial\"`*"] #[cfg(all(feature = "Foundation_Numerics", feature = "Perception_Spatial"))] - pub fn SetFocusPointWithNormalLinearVelocity<'a, P0>(&self, coordinatesystem: P0, position: super::super::Foundation::Numerics::Vector3, normal: super::super::Foundation::Numerics::Vector3, linearvelocity: super::super::Foundation::Numerics::Vector3) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Perception::Spatial::SpatialCoordinateSystem>>, - { + pub fn SetFocusPointWithNormalLinearVelocity(&self, coordinatesystem: &super::super::Perception::Spatial::SpatialCoordinateSystem, position: super::super::Foundation::Numerics::Vector3, normal: super::super::Foundation::Numerics::Vector3, linearvelocity: super::super::Foundation::Numerics::Vector3) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).SetFocusPointWithNormalLinearVelocity)(::windows::core::Vtable::as_raw(this), coordinatesystem.into().abi(), position, normal, linearvelocity).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetFocusPointWithNormalLinearVelocity)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(coordinatesystem), position, normal, linearvelocity).ok() } } #[doc = "*Required features: `\"Graphics_DirectX_Direct3D11\"`*"] #[cfg(feature = "Graphics_DirectX_Direct3D11")] @@ -1663,14 +1642,11 @@ impl HolographicFrame { (::windows::core::Vtable::vtable(this).RemovedCameras)(::windows::core::Vtable::as_raw(this), result__.as_mut_ptr()).from_abi::>(result__) } } - pub fn GetRenderingParameters<'a, P0>(&self, camerapose: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, HolographicCameraPose>>, - { + pub fn GetRenderingParameters(&self, camerapose: &HolographicCameraPose) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).GetRenderingParameters)(::windows::core::Vtable::as_raw(this), camerapose.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).GetRenderingParameters)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(camerapose), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -1711,14 +1687,11 @@ impl HolographicFrame { let this = self; unsafe { (::windows::core::Vtable::vtable(this).WaitForFrameToFinish)(::windows::core::Vtable::as_raw(this)).ok() } } - pub fn GetQuadLayerUpdateParameters<'a, P0>(&self, layer: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, HolographicQuadLayer>>, - { + pub fn GetQuadLayerUpdateParameters(&self, layer: &HolographicQuadLayer) -> ::windows::core::Result { let this = &::windows::core::Interface::cast::(self)?; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).GetQuadLayerUpdateParameters)(::windows::core::Vtable::as_raw(this), layer.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).GetQuadLayerUpdateParameters)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(layer), result__.as_mut_ptr()).from_abi::(result__) } } pub fn Id(&self) -> ::windows::core::Result { @@ -2629,12 +2602,9 @@ impl HolographicQuadLayerUpdateParameters { } #[doc = "*Required features: `\"Foundation_Numerics\"`, `\"Perception_Spatial\"`*"] #[cfg(all(feature = "Foundation_Numerics", feature = "Perception_Spatial"))] - pub fn UpdateLocationWithStationaryMode<'a, P0>(&self, coordinatesystem: P0, position: super::super::Foundation::Numerics::Vector3, orientation: super::super::Foundation::Numerics::Quaternion) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Perception::Spatial::SpatialCoordinateSystem>>, - { + pub fn UpdateLocationWithStationaryMode(&self, coordinatesystem: &super::super::Perception::Spatial::SpatialCoordinateSystem, position: super::super::Foundation::Numerics::Vector3, orientation: super::super::Foundation::Numerics::Quaternion) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).UpdateLocationWithStationaryMode)(::windows::core::Vtable::as_raw(this), coordinatesystem.into().abi(), position, orientation).ok() } + unsafe { (::windows::core::Vtable::vtable(this).UpdateLocationWithStationaryMode)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(coordinatesystem), position, orientation).ok() } } #[doc = "*Required features: `\"Foundation_Numerics\"`*"] #[cfg(feature = "Foundation_Numerics")] @@ -2746,14 +2716,11 @@ impl HolographicSpace { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn CameraAdded<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn CameraAdded(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).CameraAdded)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).CameraAdded)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -2764,14 +2731,11 @@ impl HolographicSpace { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn CameraRemoved<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn CameraRemoved(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).CameraRemoved)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).CameraRemoved)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -2796,14 +2760,11 @@ impl HolographicSpace { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn UserPresenceChanged<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn UserPresenceChanged(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = &::windows::core::Interface::cast::(self)?; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).UserPresenceChanged)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).UserPresenceChanged)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -2840,13 +2801,10 @@ impl HolographicSpace { } #[doc = "*Required features: `\"UI_Core\"`*"] #[cfg(feature = "UI_Core")] - pub fn CreateForCoreWindow<'a, P0>(window: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::UI::Core::CoreWindow>>, - { + pub fn CreateForCoreWindow(window: &super::super::UI::Core::CoreWindow) -> ::windows::core::Result { Self::IHolographicSpaceStatics(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).CreateForCoreWindow)(::windows::core::Vtable::as_raw(this), window.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).CreateForCoreWindow)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(window), result__.as_mut_ptr()).from_abi::(result__) }) } pub fn IsSupported() -> ::windows::core::Result { @@ -2863,13 +2821,10 @@ impl HolographicSpace { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn IsAvailableChanged<'a, P0>(handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::EventHandler<::windows::core::IInspectable>>>, - { + pub fn IsAvailableChanged(handler: &super::super::Foundation::EventHandler<::windows::core::IInspectable>) -> ::windows::core::Result { Self::IHolographicSpaceStatics2(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).IsAvailableChanged)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).IsAvailableChanged)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) }) } #[doc = "*Required features: `\"Foundation\"`*"] diff --git a/crates/libs/windows/src/Windows/Graphics/Imaging/mod.rs b/crates/libs/windows/src/Windows/Graphics/Imaging/mod.rs index 2e558d9aed..0fef6b05f8 100644 --- a/crates/libs/windows/src/Windows/Graphics/Imaging/mod.rs +++ b/crates/libs/windows/src/Windows/Graphics/Imaging/mod.rs @@ -306,14 +306,11 @@ impl IBitmapFrame { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn GetPixelDataTransformedAsync<'a, P0>(&self, pixelformat: BitmapPixelFormat, alphamode: BitmapAlphaMode, transform: P0, exiforientationmode: ExifOrientationMode, colormanagementmode: ColorManagementMode) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, BitmapTransform>>, - { + pub fn GetPixelDataTransformedAsync(&self, pixelformat: BitmapPixelFormat, alphamode: BitmapAlphaMode, transform: &BitmapTransform, exiforientationmode: ExifOrientationMode, colormanagementmode: ColorManagementMode) -> ::windows::core::Result> { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).GetPixelDataTransformedAsync)(::windows::core::Vtable::as_raw(this), pixelformat, alphamode, transform.into().abi(), exiforientationmode, colormanagementmode, result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).GetPixelDataTransformedAsync)(::windows::core::Vtable::as_raw(this), pixelformat, alphamode, ::core::mem::transmute_copy(transform), exiforientationmode, colormanagementmode, result__.as_mut_ptr()).from_abi::>(result__) } } } @@ -426,14 +423,11 @@ impl IBitmapFrameWithSoftwareBitmap { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn GetSoftwareBitmapTransformedAsync<'a, P0>(&self, pixelformat: BitmapPixelFormat, alphamode: BitmapAlphaMode, transform: P0, exiforientationmode: ExifOrientationMode, colormanagementmode: ColorManagementMode) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, BitmapTransform>>, - { + pub fn GetSoftwareBitmapTransformedAsync(&self, pixelformat: BitmapPixelFormat, alphamode: BitmapAlphaMode, transform: &BitmapTransform, exiforientationmode: ExifOrientationMode, colormanagementmode: ColorManagementMode) -> ::windows::core::Result> { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).GetSoftwareBitmapTransformedAsync)(::windows::core::Vtable::as_raw(this), pixelformat, alphamode, transform.into().abi(), exiforientationmode, colormanagementmode, result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).GetSoftwareBitmapTransformedAsync)(::windows::core::Vtable::as_raw(this), pixelformat, alphamode, ::core::mem::transmute_copy(transform), exiforientationmode, colormanagementmode, result__.as_mut_ptr()).from_abi::>(result__) } } #[doc = "*Required features: `\"Foundation\"`, `\"Storage_Streams\"`*"] @@ -519,14 +513,11 @@ impl IBitmapFrameWithSoftwareBitmap { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn GetPixelDataTransformedAsync<'a, P0>(&self, pixelformat: BitmapPixelFormat, alphamode: BitmapAlphaMode, transform: P0, exiforientationmode: ExifOrientationMode, colormanagementmode: ColorManagementMode) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, BitmapTransform>>, - { + pub fn GetPixelDataTransformedAsync(&self, pixelformat: BitmapPixelFormat, alphamode: BitmapAlphaMode, transform: &BitmapTransform, exiforientationmode: ExifOrientationMode, colormanagementmode: ColorManagementMode) -> ::windows::core::Result> { let this = &::windows::core::Interface::cast::(self)?; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).GetPixelDataTransformedAsync)(::windows::core::Vtable::as_raw(this), pixelformat, alphamode, transform.into().abi(), exiforientationmode, colormanagementmode, result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).GetPixelDataTransformedAsync)(::windows::core::Vtable::as_raw(this), pixelformat, alphamode, ::core::mem::transmute_copy(transform), exiforientationmode, colormanagementmode, result__.as_mut_ptr()).from_abi::>(result__) } } } @@ -1345,14 +1336,11 @@ impl BitmapDecoder { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn GetPixelDataTransformedAsync<'a, P0>(&self, pixelformat: BitmapPixelFormat, alphamode: BitmapAlphaMode, transform: P0, exiforientationmode: ExifOrientationMode, colormanagementmode: ColorManagementMode) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, BitmapTransform>>, - { + pub fn GetPixelDataTransformedAsync(&self, pixelformat: BitmapPixelFormat, alphamode: BitmapAlphaMode, transform: &BitmapTransform, exiforientationmode: ExifOrientationMode, colormanagementmode: ColorManagementMode) -> ::windows::core::Result> { let this = &::windows::core::Interface::cast::(self)?; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).GetPixelDataTransformedAsync)(::windows::core::Vtable::as_raw(this), pixelformat, alphamode, transform.into().abi(), exiforientationmode, colormanagementmode, result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).GetPixelDataTransformedAsync)(::windows::core::Vtable::as_raw(this), pixelformat, alphamode, ::core::mem::transmute_copy(transform), exiforientationmode, colormanagementmode, result__.as_mut_ptr()).from_abi::>(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -1375,14 +1363,11 @@ impl BitmapDecoder { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn GetSoftwareBitmapTransformedAsync<'a, P0>(&self, pixelformat: BitmapPixelFormat, alphamode: BitmapAlphaMode, transform: P0, exiforientationmode: ExifOrientationMode, colormanagementmode: ColorManagementMode) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, BitmapTransform>>, - { + pub fn GetSoftwareBitmapTransformedAsync(&self, pixelformat: BitmapPixelFormat, alphamode: BitmapAlphaMode, transform: &BitmapTransform, exiforientationmode: ExifOrientationMode, colormanagementmode: ColorManagementMode) -> ::windows::core::Result> { let this = &::windows::core::Interface::cast::(self)?; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).GetSoftwareBitmapTransformedAsync)(::windows::core::Vtable::as_raw(this), pixelformat, alphamode, transform.into().abi(), exiforientationmode, colormanagementmode, result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).GetSoftwareBitmapTransformedAsync)(::windows::core::Vtable::as_raw(this), pixelformat, alphamode, ::core::mem::transmute_copy(transform), exiforientationmode, colormanagementmode, result__.as_mut_ptr()).from_abi::>(result__) } } #[doc(hidden)] @@ -1670,26 +1655,22 @@ impl BitmapEncoder { } #[doc = "*Required features: `\"Foundation\"`, `\"Storage_Streams\"`*"] #[cfg(all(feature = "Foundation", feature = "Storage_Streams"))] - pub fn CreateForTranscodingAsync<'a, P0, E0, P1>(stream: P0, bitmapdecoder: P1) -> ::windows::core::Result> + pub fn CreateForTranscodingAsync<'a, P0, E0>(stream: P0, bitmapdecoder: &BitmapDecoder) -> ::windows::core::Result> where P0: ::std::convert::TryInto<::windows::core::InParam<'a, super::super::Storage::Streams::IRandomAccessStream>, Error = E0>, E0: ::std::convert::Into<::windows::core::Error>, - P1: ::std::convert::Into<::windows::core::InParam<'a, BitmapDecoder>>, { Self::IBitmapEncoderStatics(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).CreateForTranscodingAsync)(::windows::core::Vtable::as_raw(this), stream.try_into().map_err(|e| e.into())?.abi(), bitmapdecoder.into().abi(), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).CreateForTranscodingAsync)(::windows::core::Vtable::as_raw(this), stream.try_into().map_err(|e| e.into())?.abi(), ::core::mem::transmute_copy(bitmapdecoder), result__.as_mut_ptr()).from_abi::>(result__) }) } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn CreateForInPlacePropertyEncodingAsync<'a, P0>(bitmapdecoder: P0) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, BitmapDecoder>>, - { + pub fn CreateForInPlacePropertyEncodingAsync(bitmapdecoder: &BitmapDecoder) -> ::windows::core::Result> { Self::IBitmapEncoderStatics(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).CreateForInPlacePropertyEncodingAsync)(::windows::core::Vtable::as_raw(this), bitmapdecoder.into().abi(), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).CreateForInPlacePropertyEncodingAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(bitmapdecoder), result__.as_mut_ptr()).from_abi::>(result__) }) } pub fn HeifEncoderId() -> ::windows::core::Result<::windows::core::GUID> { @@ -1698,12 +1679,9 @@ impl BitmapEncoder { (::windows::core::Vtable::vtable(this).HeifEncoderId)(::windows::core::Vtable::as_raw(this), result__.as_mut_ptr()).from_abi::<::windows::core::GUID>(result__) }) } - pub fn SetSoftwareBitmap<'a, P0>(&self, bitmap: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, SoftwareBitmap>>, - { + pub fn SetSoftwareBitmap(&self, bitmap: &SoftwareBitmap) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).SetSoftwareBitmap)(::windows::core::Vtable::as_raw(this), bitmap.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetSoftwareBitmap)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(bitmap)).ok() } } #[doc(hidden)] pub fn IBitmapEncoderStatics ::windows::core::Result>(callback: F) -> ::windows::core::Result { @@ -1867,14 +1845,11 @@ impl BitmapFrame { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn GetPixelDataTransformedAsync<'a, P0>(&self, pixelformat: BitmapPixelFormat, alphamode: BitmapAlphaMode, transform: P0, exiforientationmode: ExifOrientationMode, colormanagementmode: ColorManagementMode) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, BitmapTransform>>, - { + pub fn GetPixelDataTransformedAsync(&self, pixelformat: BitmapPixelFormat, alphamode: BitmapAlphaMode, transform: &BitmapTransform, exiforientationmode: ExifOrientationMode, colormanagementmode: ColorManagementMode) -> ::windows::core::Result> { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).GetPixelDataTransformedAsync)(::windows::core::Vtable::as_raw(this), pixelformat, alphamode, transform.into().abi(), exiforientationmode, colormanagementmode, result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).GetPixelDataTransformedAsync)(::windows::core::Vtable::as_raw(this), pixelformat, alphamode, ::core::mem::transmute_copy(transform), exiforientationmode, colormanagementmode, result__.as_mut_ptr()).from_abi::>(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -1897,14 +1872,11 @@ impl BitmapFrame { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn GetSoftwareBitmapTransformedAsync<'a, P0>(&self, pixelformat: BitmapPixelFormat, alphamode: BitmapAlphaMode, transform: P0, exiforientationmode: ExifOrientationMode, colormanagementmode: ColorManagementMode) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, BitmapTransform>>, - { + pub fn GetSoftwareBitmapTransformedAsync(&self, pixelformat: BitmapPixelFormat, alphamode: BitmapAlphaMode, transform: &BitmapTransform, exiforientationmode: ExifOrientationMode, colormanagementmode: ColorManagementMode) -> ::windows::core::Result> { let this = &::windows::core::Interface::cast::(self)?; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).GetSoftwareBitmapTransformedAsync)(::windows::core::Vtable::as_raw(this), pixelformat, alphamode, transform.into().abi(), exiforientationmode, colormanagementmode, result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).GetSoftwareBitmapTransformedAsync)(::windows::core::Vtable::as_raw(this), pixelformat, alphamode, ::core::mem::transmute_copy(transform), exiforientationmode, colormanagementmode, result__.as_mut_ptr()).from_abi::>(result__) } } } @@ -2285,14 +2257,11 @@ impl BitmapPropertySet { } #[doc = "*Required features: `\"Foundation_Collections\"`*"] #[cfg(feature = "Foundation_Collections")] - pub fn Insert<'a, P0>(&self, key: &::windows::core::HSTRING, value: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, BitmapTypedValue>>, - { + pub fn Insert(&self, key: &::windows::core::HSTRING, value: &BitmapTypedValue) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).Insert)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(key), value.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).Insert)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(key), ::core::mem::transmute_copy(value), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation_Collections\"`*"] @@ -3185,12 +3154,9 @@ impl SoftwareBitmap { (::windows::core::Vtable::vtable(this).LockBuffer)(::windows::core::Vtable::as_raw(this), mode, result__.as_mut_ptr()).from_abi::(result__) } } - pub fn CopyTo<'a, P0>(&self, bitmap: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, SoftwareBitmap>>, - { + pub fn CopyTo(&self, bitmap: &SoftwareBitmap) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).CopyTo)(::windows::core::Vtable::as_raw(this), bitmap.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).CopyTo)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(bitmap)).ok() } } #[doc = "*Required features: `\"Storage_Streams\"`*"] #[cfg(feature = "Storage_Streams")] @@ -3231,31 +3197,22 @@ impl SoftwareBitmap { (::windows::core::Vtable::vtable(this).CreateWithAlpha)(::windows::core::Vtable::as_raw(this), format, width, height, alpha, result__.as_mut_ptr()).from_abi::(result__) }) } - pub fn Copy<'a, P0>(source: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, SoftwareBitmap>>, - { + pub fn Copy(source: &SoftwareBitmap) -> ::windows::core::Result { Self::ISoftwareBitmapStatics(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).Copy)(::windows::core::Vtable::as_raw(this), source.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).Copy)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(source), result__.as_mut_ptr()).from_abi::(result__) }) } - pub fn Convert<'a, P0>(source: P0, format: BitmapPixelFormat) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, SoftwareBitmap>>, - { + pub fn Convert(source: &SoftwareBitmap, format: BitmapPixelFormat) -> ::windows::core::Result { Self::ISoftwareBitmapStatics(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).Convert)(::windows::core::Vtable::as_raw(this), source.into().abi(), format, result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).Convert)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(source), format, result__.as_mut_ptr()).from_abi::(result__) }) } - pub fn ConvertWithAlpha<'a, P0>(source: P0, format: BitmapPixelFormat, alpha: BitmapAlphaMode) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, SoftwareBitmap>>, - { + pub fn ConvertWithAlpha(source: &SoftwareBitmap, format: BitmapPixelFormat, alpha: BitmapAlphaMode) -> ::windows::core::Result { Self::ISoftwareBitmapStatics(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).ConvertWithAlpha)(::windows::core::Vtable::as_raw(this), source.into().abi(), format, alpha, result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).ConvertWithAlpha)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(source), format, alpha, result__.as_mut_ptr()).from_abi::(result__) }) } #[doc = "*Required features: `\"Storage_Streams\"`*"] diff --git a/crates/libs/windows/src/Windows/Graphics/Printing/OptionDetails/mod.rs b/crates/libs/windows/src/Windows/Graphics/Printing/OptionDetails/mod.rs index 6001b19b34..fcb19eee0b 100644 --- a/crates/libs/windows/src/Windows/Graphics/Printing/OptionDetails/mod.rs +++ b/crates/libs/windows/src/Windows/Graphics/Printing/OptionDetails/mod.rs @@ -4461,14 +4461,11 @@ impl PrintTaskOptionDetails { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn OptionChanged<'a, P0>(&self, eventhandler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Foundation::TypedEventHandler>>, - { + pub fn OptionChanged(&self, eventhandler: &super::super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).OptionChanged)(::windows::core::Vtable::as_raw(this), eventhandler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).OptionChanged)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(eventhandler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -4479,14 +4476,11 @@ impl PrintTaskOptionDetails { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn BeginValidation<'a, P0>(&self, eventhandler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Foundation::TypedEventHandler>>, - { + pub fn BeginValidation(&self, eventhandler: &super::super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).BeginValidation)(::windows::core::Vtable::as_raw(this), eventhandler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).BeginValidation)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(eventhandler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -4502,13 +4496,10 @@ impl PrintTaskOptionDetails { (::windows::core::Vtable::vtable(this).CreateToggleOption)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(optionid), ::core::mem::transmute_copy(displayname), result__.as_mut_ptr()).from_abi::(result__) } } - pub fn GetFromPrintTaskOptions<'a, P0>(printtaskoptions: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::PrintTaskOptions>>, - { + pub fn GetFromPrintTaskOptions(printtaskoptions: &super::PrintTaskOptions) -> ::windows::core::Result { Self::IPrintTaskOptionDetailsStatic(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).GetFromPrintTaskOptions)(::windows::core::Vtable::as_raw(this), printtaskoptions.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).GetFromPrintTaskOptions)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(printtaskoptions), result__.as_mut_ptr()).from_abi::(result__) }) } #[doc = "*Required features: `\"Foundation\"`*"] diff --git a/crates/libs/windows/src/Windows/Graphics/Printing/PrintSupport/mod.rs b/crates/libs/windows/src/Windows/Graphics/Printing/PrintSupport/mod.rs index 9c6146428d..6325897a14 100644 --- a/crates/libs/windows/src/Windows/Graphics/Printing/PrintSupport/mod.rs +++ b/crates/libs/windows/src/Windows/Graphics/Printing/PrintSupport/mod.rs @@ -178,14 +178,11 @@ impl PrintSupportExtensionSession { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn PrintTicketValidationRequested<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Foundation::TypedEventHandler>>, - { + pub fn PrintTicketValidationRequested(&self, handler: &super::super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).PrintTicketValidationRequested)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).PrintTicketValidationRequested)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -196,14 +193,11 @@ impl PrintSupportExtensionSession { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn PrintDeviceCapabilitiesChanged<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Foundation::TypedEventHandler>>, - { + pub fn PrintDeviceCapabilitiesChanged(&self, handler: &super::super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).PrintDeviceCapabilitiesChanged)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).PrintDeviceCapabilitiesChanged)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -372,12 +366,9 @@ impl PrintSupportPrintDeviceCapabilitiesChangedEventArgs { } #[doc = "*Required features: `\"Data_Xml_Dom\"`*"] #[cfg(feature = "Data_Xml_Dom")] - pub fn UpdatePrintDeviceCapabilities<'a, P0>(&self, updatedpdc: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Data::Xml::Dom::XmlDocument>>, - { + pub fn UpdatePrintDeviceCapabilities(&self, updatedpdc: &super::super::super::Data::Xml::Dom::XmlDocument) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).UpdatePrintDeviceCapabilities)(::windows::core::Vtable::as_raw(this), updatedpdc.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).UpdatePrintDeviceCapabilities)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(updatedpdc)).ok() } } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] @@ -825,12 +816,9 @@ impl PrintSupportSettingsUISession { } #[doc = "*Required features: `\"Graphics_Printing_PrintTicket\"`*"] #[cfg(feature = "Graphics_Printing_PrintTicket")] - pub fn UpdatePrintTicket<'a, P0>(&self, printticket: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::PrintTicket::WorkflowPrintTicket>>, - { + pub fn UpdatePrintTicket(&self, printticket: &super::PrintTicket::WorkflowPrintTicket) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).UpdatePrintTicket)(::windows::core::Vtable::as_raw(this), printticket.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).UpdatePrintTicket)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(printticket)).ok() } } pub fn SessionInfo(&self) -> ::windows::core::Result { let this = self; diff --git a/crates/libs/windows/src/Windows/Graphics/Printing/PrintTicket/mod.rs b/crates/libs/windows/src/Windows/Graphics/Printing/PrintTicket/mod.rs index 54e7e509ba..a7bfbe05d3 100644 --- a/crates/libs/windows/src/Windows/Graphics/Printing/PrintTicket/mod.rs +++ b/crates/libs/windows/src/Windows/Graphics/Printing/PrintTicket/mod.rs @@ -491,12 +491,9 @@ impl PrintTicketFeature { (::windows::core::Vtable::vtable(this).GetSelectedOption)(::windows::core::Vtable::as_raw(this), result__.as_mut_ptr()).from_abi::(result__) } } - pub fn SetSelectedOption<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, PrintTicketOption>>, - { + pub fn SetSelectedOption(&self, value: &PrintTicketOption) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).SetSelectedOption)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetSelectedOption)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } pub fn SelectionType(&self) -> ::windows::core::Result { let this = self; @@ -848,12 +845,9 @@ impl PrintTicketParameterInitializer { (::windows::core::Vtable::vtable(this).XmlNode)(::windows::core::Vtable::as_raw(this), result__.as_mut_ptr()).from_abi::(result__) } } - pub fn SetValue<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, PrintTicketValue>>, - { + pub fn SetValue(&self, value: &PrintTicketValue) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).SetValue)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetValue)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } pub fn Value(&self) -> ::windows::core::Result { let this = self; @@ -1202,14 +1196,11 @@ impl WorkflowPrintTicket { (::windows::core::Vtable::vtable(this).SetParameterInitializerAsString)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(name), ::core::mem::transmute_copy(xmlnamespace), ::core::mem::transmute_copy(stringvalue), result__.as_mut_ptr()).from_abi::(result__) } } - pub fn MergeAndValidateTicket<'a, P0>(&self, deltashematicket: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, WorkflowPrintTicket>>, - { + pub fn MergeAndValidateTicket(&self, deltashematicket: &WorkflowPrintTicket) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).MergeAndValidateTicket)(::windows::core::Vtable::as_raw(this), deltashematicket.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).MergeAndValidateTicket)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(deltashematicket), result__.as_mut_ptr()).from_abi::(result__) } } } diff --git a/crates/libs/windows/src/Windows/Graphics/Printing/Workflow/mod.rs b/crates/libs/windows/src/Windows/Graphics/Printing/Workflow/mod.rs index fa050e8c9f..775dc4b01d 100644 --- a/crates/libs/windows/src/Windows/Graphics/Printing/Workflow/mod.rs +++ b/crates/libs/windows/src/Windows/Graphics/Printing/Workflow/mod.rs @@ -664,14 +664,11 @@ pub struct PrintWorkflowBackgroundSession(::windows::core::IUnknown); impl PrintWorkflowBackgroundSession { #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn SetupRequested<'a, P0>(&self, setupeventhandler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Foundation::TypedEventHandler>>, - { + pub fn SetupRequested(&self, setupeventhandler: &super::super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).SetupRequested)(::windows::core::Vtable::as_raw(this), setupeventhandler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).SetupRequested)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(setupeventhandler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -682,14 +679,11 @@ impl PrintWorkflowBackgroundSession { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn Submitted<'a, P0>(&self, submittedeventhandler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Foundation::TypedEventHandler>>, - { + pub fn Submitted(&self, submittedeventhandler: &super::super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).Submitted)(::windows::core::Vtable::as_raw(this), submittedeventhandler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).Submitted)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(submittedeventhandler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -972,14 +966,11 @@ pub struct PrintWorkflowForegroundSession(::windows::core::IUnknown); impl PrintWorkflowForegroundSession { #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn SetupRequested<'a, P0>(&self, setupeventhandler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Foundation::TypedEventHandler>>, - { + pub fn SetupRequested(&self, setupeventhandler: &super::super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).SetupRequested)(::windows::core::Vtable::as_raw(this), setupeventhandler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).SetupRequested)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(setupeventhandler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -990,14 +981,11 @@ impl PrintWorkflowForegroundSession { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn XpsDataAvailable<'a, P0>(&self, xpsdataavailableeventhandler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Foundation::TypedEventHandler>>, - { + pub fn XpsDataAvailable(&self, xpsdataavailableeventhandler: &super::super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).XpsDataAvailable)(::windows::core::Vtable::as_raw(this), xpsdataavailableeventhandler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).XpsDataAvailable)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(xpsdataavailableeventhandler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -1345,14 +1333,11 @@ impl PrintWorkflowJobBackgroundSession { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn JobStarting<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Foundation::TypedEventHandler>>, - { + pub fn JobStarting(&self, handler: &super::super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).JobStarting)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).JobStarting)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -1363,14 +1348,11 @@ impl PrintWorkflowJobBackgroundSession { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn PdlModificationRequested<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Foundation::TypedEventHandler>>, - { + pub fn PdlModificationRequested(&self, handler: &super::super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).PdlModificationRequested)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).PdlModificationRequested)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -1727,14 +1709,11 @@ impl PrintWorkflowJobUISession { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn PdlDataAvailable<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Foundation::TypedEventHandler>>, - { + pub fn PdlDataAvailable(&self, handler: &super::super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).PdlDataAvailable)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).PdlDataAvailable)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -1745,14 +1724,11 @@ impl PrintWorkflowJobUISession { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn JobNotification<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Foundation::TypedEventHandler>>, - { + pub fn JobNotification(&self, handler: &super::super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).JobNotification)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).JobNotification)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -1990,18 +1966,17 @@ pub struct PrintWorkflowPdlConverter(::windows::core::IUnknown); impl PrintWorkflowPdlConverter { #[doc = "*Required features: `\"Foundation\"`, `\"Graphics_Printing_PrintTicket\"`, `\"Storage_Streams\"`*"] #[cfg(all(feature = "Foundation", feature = "Graphics_Printing_PrintTicket", feature = "Storage_Streams"))] - pub fn ConvertPdlAsync<'a, P0, P1, E1, P2, E2>(&self, printticket: P0, inputstream: P1, outputstream: P2) -> ::windows::core::Result + pub fn ConvertPdlAsync<'a, P0, E0, P1, E1>(&self, printticket: &super::PrintTicket::WorkflowPrintTicket, inputstream: P0, outputstream: P1) -> ::windows::core::Result where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::PrintTicket::WorkflowPrintTicket>>, - P1: ::std::convert::TryInto<::windows::core::InParam<'a, super::super::super::Storage::Streams::IInputStream>, Error = E1>, + P0: ::std::convert::TryInto<::windows::core::InParam<'a, super::super::super::Storage::Streams::IInputStream>, Error = E0>, + E0: ::std::convert::Into<::windows::core::Error>, + P1: ::std::convert::TryInto<::windows::core::InParam<'a, super::super::super::Storage::Streams::IOutputStream>, Error = E1>, E1: ::std::convert::Into<::windows::core::Error>, - P2: ::std::convert::TryInto<::windows::core::InParam<'a, super::super::super::Storage::Streams::IOutputStream>, Error = E2>, - E2: ::std::convert::Into<::windows::core::Error>, { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).ConvertPdlAsync)(::windows::core::Vtable::as_raw(this), printticket.into().abi(), inputstream.try_into().map_err(|e| e.into())?.abi(), outputstream.try_into().map_err(|e| e.into())?.abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).ConvertPdlAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(printticket), inputstream.try_into().map_err(|e| e.into())?.abi(), outputstream.try_into().map_err(|e| e.into())?.abi(), result__.as_mut_ptr()).from_abi::(result__) } } } @@ -2904,14 +2879,11 @@ impl PrintWorkflowSubmittedEventArgs { } #[doc = "*Required features: `\"Graphics_Printing_PrintTicket\"`*"] #[cfg(feature = "Graphics_Printing_PrintTicket")] - pub fn GetTarget<'a, P0>(&self, jobprintticket: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::PrintTicket::WorkflowPrintTicket>>, - { + pub fn GetTarget(&self, jobprintticket: &super::PrintTicket::WorkflowPrintTicket) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).GetTarget)(::windows::core::Vtable::as_raw(this), jobprintticket.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).GetTarget)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(jobprintticket), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] diff --git a/crates/libs/windows/src/Windows/Graphics/Printing/mod.rs b/crates/libs/windows/src/Windows/Graphics/Printing/mod.rs index 7f4c92b4ea..adfa221dd3 100644 --- a/crates/libs/windows/src/Windows/Graphics/Printing/mod.rs +++ b/crates/libs/windows/src/Windows/Graphics/Printing/mod.rs @@ -907,14 +907,11 @@ pub struct PrintManager(::windows::core::IUnknown); impl PrintManager { #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn PrintTaskRequested<'a, P0>(&self, eventhandler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn PrintTaskRequested(&self, eventhandler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).PrintTaskRequested)(::windows::core::Vtable::as_raw(this), eventhandler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).PrintTaskRequested)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(eventhandler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -1384,14 +1381,11 @@ impl PrintTask { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn Previewing<'a, P0>(&self, eventhandler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn Previewing(&self, eventhandler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).Previewing)(::windows::core::Vtable::as_raw(this), eventhandler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).Previewing)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(eventhandler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -1402,14 +1396,11 @@ impl PrintTask { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn Submitting<'a, P0>(&self, eventhandler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn Submitting(&self, eventhandler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).Submitting)(::windows::core::Vtable::as_raw(this), eventhandler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).Submitting)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(eventhandler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -1420,14 +1411,11 @@ impl PrintTask { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn Progressing<'a, P0>(&self, eventhandler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn Progressing(&self, eventhandler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).Progressing)(::windows::core::Vtable::as_raw(this), eventhandler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).Progressing)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(eventhandler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -1438,14 +1426,11 @@ impl PrintTask { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn Completed<'a, P0>(&self, eventhandler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn Completed(&self, eventhandler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).Completed)(::windows::core::Vtable::as_raw(this), eventhandler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).Completed)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(eventhandler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -1645,14 +1630,11 @@ impl PrintTaskOptions { } #[doc = "*Required features: `\"Storage_Streams\"`*"] #[cfg(feature = "Storage_Streams")] - pub fn GetPagePrintTicket<'a, P0>(&self, printpageinfo: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, PrintPageInfo>>, - { + pub fn GetPagePrintTicket(&self, printpageinfo: &PrintPageInfo) -> ::windows::core::Result { let this = &::windows::core::Interface::cast::(self)?; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).GetPagePrintTicket)(::windows::core::Vtable::as_raw(this), printpageinfo.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).GetPagePrintTicket)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(printpageinfo), result__.as_mut_ptr()).from_abi::(result__) } } pub fn PageRangeOptions(&self) -> ::windows::core::Result { @@ -2035,14 +2017,11 @@ impl PrintTaskRequest { (::windows::core::Vtable::vtable(this).Deadline)(::windows::core::Vtable::as_raw(this), result__.as_mut_ptr()).from_abi::(result__) } } - pub fn CreatePrintTask<'a, P0>(&self, title: &::windows::core::HSTRING, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, PrintTaskSourceRequestedHandler>>, - { + pub fn CreatePrintTask(&self, title: &::windows::core::HSTRING, handler: &PrintTaskSourceRequestedHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).CreatePrintTask)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(title), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).CreatePrintTask)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(title), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } pub fn GetDeferral(&self) -> ::windows::core::Result { @@ -3271,12 +3250,9 @@ impl PrintTaskSourceRequestedHandler { let com = PrintTaskSourceRequestedHandlerBox:: { vtable: &PrintTaskSourceRequestedHandlerBox::::VTABLE, count: ::windows::core::RefCount::new(1), invoke }; unsafe { ::core::mem::transmute(::windows::core::alloc::boxed::Box::new(com)) } } - pub fn Invoke<'a, P0>(&self, args: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, PrintTaskSourceRequestedArgs>>, - { + pub fn Invoke(&self, args: &PrintTaskSourceRequestedArgs) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).Invoke)(::windows::core::Vtable::as_raw(this), args.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).Invoke)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(args)).ok() } } } #[repr(C)] diff --git a/crates/libs/windows/src/Windows/Graphics/Printing3D/mod.rs b/crates/libs/windows/src/Windows/Graphics/Printing3D/mod.rs index ab30eb7a8c..4d6ed73019 100644 --- a/crates/libs/windows/src/Windows/Graphics/Printing3D/mod.rs +++ b/crates/libs/windows/src/Windows/Graphics/Printing3D/mod.rs @@ -896,14 +896,11 @@ pub struct Print3DManager(::windows::core::IUnknown); impl Print3DManager { #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn TaskRequested<'a, P0>(&self, eventhandler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn TaskRequested(&self, eventhandler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).TaskRequested)(::windows::core::Vtable::as_raw(this), eventhandler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).TaskRequested)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(eventhandler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -1009,14 +1006,11 @@ impl Print3DTask { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn Submitting<'a, P0>(&self, eventhandler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn Submitting(&self, eventhandler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).Submitting)(::windows::core::Vtable::as_raw(this), eventhandler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).Submitting)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(eventhandler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -1027,14 +1021,11 @@ impl Print3DTask { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn Completed<'a, P0>(&self, eventhandler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn Completed(&self, eventhandler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).Completed)(::windows::core::Vtable::as_raw(this), eventhandler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).Completed)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(eventhandler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -1045,14 +1036,11 @@ impl Print3DTask { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn SourceChanged<'a, P0>(&self, eventhandler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn SourceChanged(&self, eventhandler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).SourceChanged)(::windows::core::Vtable::as_raw(this), eventhandler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).SourceChanged)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(eventhandler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -1213,14 +1201,11 @@ unsafe impl ::core::marker::Sync for Print3DTaskCompletedEventArgs {} #[repr(transparent)] pub struct Print3DTaskRequest(::windows::core::IUnknown); impl Print3DTaskRequest { - pub fn CreateTask<'a, P0>(&self, title: &::windows::core::HSTRING, printerid: &::windows::core::HSTRING, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, Print3DTaskSourceRequestedHandler>>, - { + pub fn CreateTask(&self, title: &::windows::core::HSTRING, printerid: &::windows::core::HSTRING, handler: &Print3DTaskSourceRequestedHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).CreateTask)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(title), ::core::mem::transmute_copy(printerid), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).CreateTask)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(title), ::core::mem::transmute_copy(printerid), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } } @@ -1444,12 +1429,9 @@ unsafe impl ::core::marker::Sync for Print3DTaskSourceChangedEventArgs {} #[repr(transparent)] pub struct Print3DTaskSourceRequestedArgs(::windows::core::IUnknown); impl Print3DTaskSourceRequestedArgs { - pub fn SetSource<'a, P0>(&self, source: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, Printing3D3MFPackage>>, - { + pub fn SetSource(&self, source: &Printing3D3MFPackage) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).SetSource)(::windows::core::Vtable::as_raw(this), source.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetSource)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(source)).ok() } } } impl ::core::clone::Clone for Print3DTaskSourceRequestedArgs { @@ -1581,12 +1563,9 @@ impl Printing3D3MFPackage { (::windows::core::Vtable::vtable(this).Thumbnail)(::windows::core::Vtable::as_raw(this), result__.as_mut_ptr()).from_abi::(result__) } } - pub fn SetThumbnail<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, Printing3DTextureResource>>, - { + pub fn SetThumbnail(&self, value: &Printing3DTextureResource) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).SetThumbnail)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetThumbnail)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } #[doc = "*Required features: `\"Foundation_Collections\"`*"] #[cfg(feature = "Foundation_Collections")] @@ -1612,14 +1591,11 @@ impl Printing3D3MFPackage { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn SaveModelToPackageAsync<'a, P0>(&self, value: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, Printing3DModel>>, - { + pub fn SaveModelToPackageAsync(&self, value: &Printing3DModel) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).SaveModelToPackageAsync)(::windows::core::Vtable::as_raw(this), value.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).SaveModelToPackageAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value), result__.as_mut_ptr()).from_abi::(result__) } } pub fn Compression(&self) -> ::windows::core::Result { @@ -1744,12 +1720,9 @@ impl Printing3DBaseMaterial { (::windows::core::Vtable::vtable(this).Color)(::windows::core::Vtable::as_raw(this), result__.as_mut_ptr()).from_abi::(result__) } } - pub fn SetColor<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, Printing3DColorMaterial>>, - { + pub fn SetColor(&self, value: &Printing3DColorMaterial) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).SetColor)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetColor)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } pub fn Abs() -> ::windows::core::Result<::windows::core::HSTRING> { Self::IPrinting3DBaseMaterialStatics(|this| unsafe { @@ -2145,12 +2118,9 @@ impl Printing3DComponent { (::windows::core::Vtable::vtable(this).Mesh)(::windows::core::Vtable::as_raw(this), result__.as_mut_ptr()).from_abi::(result__) } } - pub fn SetMesh<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, Printing3DMesh>>, - { + pub fn SetMesh(&self, value: &Printing3DMesh) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).SetMesh)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetMesh)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } #[doc = "*Required features: `\"Foundation_Collections\"`*"] #[cfg(feature = "Foundation_Collections")] @@ -2168,12 +2138,9 @@ impl Printing3DComponent { (::windows::core::Vtable::vtable(this).Thumbnail)(::windows::core::Vtable::as_raw(this), result__.as_mut_ptr()).from_abi::(result__) } } - pub fn SetThumbnail<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, Printing3DTextureResource>>, - { + pub fn SetThumbnail(&self, value: &Printing3DTextureResource) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).SetThumbnail)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetThumbnail)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } pub fn Type(&self) -> ::windows::core::Result { let this = self; @@ -2291,12 +2258,9 @@ impl Printing3DComponentWithMatrix { (::windows::core::Vtable::vtable(this).Component)(::windows::core::Vtable::as_raw(this), result__.as_mut_ptr()).from_abi::(result__) } } - pub fn SetComponent<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, Printing3DComponent>>, - { + pub fn SetComponent(&self, value: &Printing3DComponent) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).SetComponent)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetComponent)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } #[doc = "*Required features: `\"Foundation_Numerics\"`*"] #[cfg(feature = "Foundation_Numerics")] @@ -2499,12 +2463,9 @@ impl Printing3DCompositeMaterialGroup { (::windows::core::Vtable::vtable(this).BaseMaterialGroup)(::windows::core::Vtable::as_raw(this), result__.as_mut_ptr()).from_abi::(result__) } } - pub fn SetBaseMaterialGroup<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, Printing3DBaseMaterialGroup>>, - { + pub fn SetBaseMaterialGroup(&self, value: &Printing3DBaseMaterialGroup) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).SetBaseMaterialGroup)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetBaseMaterialGroup)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } pub fn Create(materialgroupid: u32) -> ::windows::core::Result { Self::IPrinting3DCompositeMaterialGroupFactory(|this| unsafe { @@ -3183,12 +3144,9 @@ impl Printing3DModel { (::windows::core::Vtable::vtable(this).Material)(::windows::core::Vtable::as_raw(this), result__.as_mut_ptr()).from_abi::(result__) } } - pub fn SetMaterial<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, Printing3DMaterial>>, - { + pub fn SetMaterial(&self, value: &Printing3DMaterial) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).SetMaterial)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetMaterial)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } pub fn Build(&self) -> ::windows::core::Result { let this = self; @@ -3197,12 +3155,9 @@ impl Printing3DModel { (::windows::core::Vtable::vtable(this).Build)(::windows::core::Vtable::as_raw(this), result__.as_mut_ptr()).from_abi::(result__) } } - pub fn SetBuild<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, Printing3DComponent>>, - { + pub fn SetBuild(&self, value: &Printing3DComponent) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).SetBuild)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetBuild)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } pub fn Version(&self) -> ::windows::core::Result<::windows::core::HSTRING> { let this = self; @@ -3278,26 +3233,20 @@ impl Printing3DModel { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn TryReduceFacesWithOptionsAsync<'a, P0>(&self, printing3dfacereductionoptions: P0) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, Printing3DFaceReductionOptions>>, - { + pub fn TryReduceFacesWithOptionsAsync(&self, printing3dfacereductionoptions: &Printing3DFaceReductionOptions) -> ::windows::core::Result> { let this = &::windows::core::Interface::cast::(self)?; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).TryReduceFacesWithOptionsAsync)(::windows::core::Vtable::as_raw(this), printing3dfacereductionoptions.into().abi(), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).TryReduceFacesWithOptionsAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(printing3dfacereductionoptions), result__.as_mut_ptr()).from_abi::>(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn TryReduceFacesWithOptionsAndTimeAsync<'a, P0>(&self, printing3dfacereductionoptions: P0, maxwait: super::super::Foundation::TimeSpan) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, Printing3DFaceReductionOptions>>, - { + pub fn TryReduceFacesWithOptionsAndTimeAsync(&self, printing3dfacereductionoptions: &Printing3DFaceReductionOptions, maxwait: super::super::Foundation::TimeSpan) -> ::windows::core::Result> { let this = &::windows::core::Interface::cast::(self)?; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).TryReduceFacesWithOptionsAndTimeAsync)(::windows::core::Vtable::as_raw(this), printing3dfacereductionoptions.into().abi(), maxwait, result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).TryReduceFacesWithOptionsAndTimeAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(printing3dfacereductionoptions), maxwait, result__.as_mut_ptr()).from_abi::>(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -3392,12 +3341,9 @@ impl Printing3DModelTexture { (::windows::core::Vtable::vtable(this).TextureResource)(::windows::core::Vtable::as_raw(this), result__.as_mut_ptr()).from_abi::(result__) } } - pub fn SetTextureResource<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, Printing3DTextureResource>>, - { + pub fn SetTextureResource(&self, value: &Printing3DTextureResource) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).SetTextureResource)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetTextureResource)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } pub fn TileStyleU(&self) -> ::windows::core::Result { let this = self; @@ -3694,12 +3640,9 @@ impl Printing3DTexture2CoordMaterial { (::windows::core::Vtable::vtable(this).Texture)(::windows::core::Vtable::as_raw(this), result__.as_mut_ptr()).from_abi::(result__) } } - pub fn SetTexture<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, Printing3DModelTexture>>, - { + pub fn SetTexture(&self, value: &Printing3DModelTexture) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).SetTexture)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetTexture)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } pub fn U(&self) -> ::windows::core::Result { let this = self; @@ -3815,12 +3758,9 @@ impl Printing3DTexture2CoordMaterialGroup { (::windows::core::Vtable::vtable(this).Texture)(::windows::core::Vtable::as_raw(this), result__.as_mut_ptr()).from_abi::(result__) } } - pub fn SetTexture<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, Printing3DModelTexture>>, - { + pub fn SetTexture(&self, value: &Printing3DModelTexture) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).SetTexture)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetTexture)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } pub fn Create(materialgroupid: u32) -> ::windows::core::Result { Self::IPrinting3DTexture2CoordMaterialGroupFactory(|this| unsafe { @@ -4343,12 +4283,9 @@ impl Print3DTaskSourceRequestedHandler { let com = Print3DTaskSourceRequestedHandlerBox:: { vtable: &Print3DTaskSourceRequestedHandlerBox::::VTABLE, count: ::windows::core::RefCount::new(1), invoke }; unsafe { ::core::mem::transmute(::windows::core::alloc::boxed::Box::new(com)) } } - pub fn Invoke<'a, P0>(&self, args: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, Print3DTaskSourceRequestedArgs>>, - { + pub fn Invoke(&self, args: &Print3DTaskSourceRequestedArgs) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).Invoke)(::windows::core::Vtable::as_raw(this), args.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).Invoke)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(args)).ok() } } } #[repr(C)] diff --git a/crates/libs/windows/src/Windows/Management/Deployment/mod.rs b/crates/libs/windows/src/Windows/Management/Deployment/mod.rs index 29c72aee6c..988c61cd6b 100644 --- a/crates/libs/windows/src/Windows/Management/Deployment/mod.rs +++ b/crates/libs/windows/src/Windows/Management/Deployment/mod.rs @@ -1073,12 +1073,9 @@ impl AddPackageOptions { (::windows::core::Vtable::vtable(this).TargetVolume)(::windows::core::Vtable::as_raw(this), result__.as_mut_ptr()).from_abi::(result__) } } - pub fn SetTargetVolume<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, PackageVolume>>, - { + pub fn SetTargetVolume(&self, value: &PackageVolume) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).SetTargetVolume)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetTargetVolume)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } #[doc = "*Required features: `\"Foundation_Collections\"`*"] #[cfg(feature = "Foundation_Collections")] @@ -1118,12 +1115,9 @@ impl AddPackageOptions { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn SetExternalLocationUri<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::Uri>>, - { + pub fn SetExternalLocationUri(&self, value: &super::super::Foundation::Uri) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).SetExternalLocationUri)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetExternalLocationUri)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } pub fn StubPackageOption(&self) -> ::windows::core::Result { let this = self; @@ -1315,12 +1309,9 @@ unsafe impl ::core::marker::Sync for AddPackageOptions {} #[repr(transparent)] pub struct AppInstallerManager(::windows::core::IUnknown); impl AppInstallerManager { - pub fn SetAutoUpdateSettings<'a, P0>(&self, packagefamilyname: &::windows::core::HSTRING, appinstallerinfo: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, AutoUpdateSettingsOptions>>, - { + pub fn SetAutoUpdateSettings(&self, packagefamilyname: &::windows::core::HSTRING, appinstallerinfo: &AutoUpdateSettingsOptions) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).SetAutoUpdateSettings)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(packagefamilyname), appinstallerinfo.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetAutoUpdateSettings)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(packagefamilyname), ::core::mem::transmute_copy(appinstallerinfo)).ok() } } pub fn ClearAutoUpdateSettings(&self, packagefamilyname: &::windows::core::HSTRING) -> ::windows::core::Result<()> { let this = self; @@ -1451,12 +1442,9 @@ impl AutoUpdateSettingsOptions { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn SetAppInstallerUri<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::Uri>>, - { + pub fn SetAppInstallerUri(&self, value: &super::super::Foundation::Uri) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).SetAppInstallerUri)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetAppInstallerUri)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } pub fn OnLaunch(&self) -> ::windows::core::Result { let this = self; @@ -1573,13 +1561,10 @@ impl AutoUpdateSettingsOptions { } #[doc = "*Required features: `\"ApplicationModel\"`*"] #[cfg(feature = "ApplicationModel")] - pub fn CreateFromAppInstallerInfo<'a, P0>(appinstallerinfo: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::ApplicationModel::AppInstallerInfo>>, - { + pub fn CreateFromAppInstallerInfo(appinstallerinfo: &super::super::ApplicationModel::AppInstallerInfo) -> ::windows::core::Result { Self::IAutoUpdateSettingsOptionsStatics(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).CreateFromAppInstallerInfo)(::windows::core::Vtable::as_raw(this), appinstallerinfo.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).CreateFromAppInstallerInfo)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(appinstallerinfo), result__.as_mut_ptr()).from_abi::(result__) }) } #[doc(hidden)] @@ -2332,30 +2317,28 @@ impl PackageManager { } #[doc = "*Required features: `\"Foundation_Collections\"`*"] #[cfg(feature = "Foundation_Collections")] - pub fn AddPackageAsync<'a, P0, P1, E1>(&self, packageuri: P0, dependencypackageuris: P1, deploymentoptions: DeploymentOptions) -> ::windows::core::Result> + pub fn AddPackageAsync<'a, P0, E0>(&self, packageuri: &super::super::Foundation::Uri, dependencypackageuris: P0, deploymentoptions: DeploymentOptions) -> ::windows::core::Result> where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::Uri>>, - P1: ::std::convert::TryInto<::windows::core::InParam<'a, super::super::Foundation::Collections::IIterable>, Error = E1>, - E1: ::std::convert::Into<::windows::core::Error>, + P0: ::std::convert::TryInto<::windows::core::InParam<'a, super::super::Foundation::Collections::IIterable>, Error = E0>, + E0: ::std::convert::Into<::windows::core::Error>, { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).AddPackageAsync)(::windows::core::Vtable::as_raw(this), packageuri.into().abi(), dependencypackageuris.try_into().map_err(|e| e.into())?.abi(), deploymentoptions, result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).AddPackageAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(packageuri), dependencypackageuris.try_into().map_err(|e| e.into())?.abi(), deploymentoptions, result__.as_mut_ptr()).from_abi::>(result__) } } #[doc = "*Required features: `\"Foundation_Collections\"`*"] #[cfg(feature = "Foundation_Collections")] - pub fn UpdatePackageAsync<'a, P0, P1, E1>(&self, packageuri: P0, dependencypackageuris: P1, deploymentoptions: DeploymentOptions) -> ::windows::core::Result> + pub fn UpdatePackageAsync<'a, P0, E0>(&self, packageuri: &super::super::Foundation::Uri, dependencypackageuris: P0, deploymentoptions: DeploymentOptions) -> ::windows::core::Result> where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::Uri>>, - P1: ::std::convert::TryInto<::windows::core::InParam<'a, super::super::Foundation::Collections::IIterable>, Error = E1>, - E1: ::std::convert::Into<::windows::core::Error>, + P0: ::std::convert::TryInto<::windows::core::InParam<'a, super::super::Foundation::Collections::IIterable>, Error = E0>, + E0: ::std::convert::Into<::windows::core::Error>, { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).UpdatePackageAsync)(::windows::core::Vtable::as_raw(this), packageuri.into().abi(), dependencypackageuris.try_into().map_err(|e| e.into())?.abi(), deploymentoptions, result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).UpdatePackageAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(packageuri), dependencypackageuris.try_into().map_err(|e| e.into())?.abi(), deploymentoptions, result__.as_mut_ptr()).from_abi::>(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -2369,30 +2352,28 @@ impl PackageManager { } #[doc = "*Required features: `\"Foundation_Collections\"`*"] #[cfg(feature = "Foundation_Collections")] - pub fn StagePackageAsync<'a, P0, P1, E1>(&self, packageuri: P0, dependencypackageuris: P1) -> ::windows::core::Result> + pub fn StagePackageAsync<'a, P0, E0>(&self, packageuri: &super::super::Foundation::Uri, dependencypackageuris: P0) -> ::windows::core::Result> where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::Uri>>, - P1: ::std::convert::TryInto<::windows::core::InParam<'a, super::super::Foundation::Collections::IIterable>, Error = E1>, - E1: ::std::convert::Into<::windows::core::Error>, + P0: ::std::convert::TryInto<::windows::core::InParam<'a, super::super::Foundation::Collections::IIterable>, Error = E0>, + E0: ::std::convert::Into<::windows::core::Error>, { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).StagePackageAsync)(::windows::core::Vtable::as_raw(this), packageuri.into().abi(), dependencypackageuris.try_into().map_err(|e| e.into())?.abi(), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).StagePackageAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(packageuri), dependencypackageuris.try_into().map_err(|e| e.into())?.abi(), result__.as_mut_ptr()).from_abi::>(result__) } } #[doc = "*Required features: `\"Foundation_Collections\"`*"] #[cfg(feature = "Foundation_Collections")] - pub fn RegisterPackageAsync<'a, P0, P1, E1>(&self, manifesturi: P0, dependencypackageuris: P1, deploymentoptions: DeploymentOptions) -> ::windows::core::Result> + pub fn RegisterPackageAsync<'a, P0, E0>(&self, manifesturi: &super::super::Foundation::Uri, dependencypackageuris: P0, deploymentoptions: DeploymentOptions) -> ::windows::core::Result> where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::Uri>>, - P1: ::std::convert::TryInto<::windows::core::InParam<'a, super::super::Foundation::Collections::IIterable>, Error = E1>, - E1: ::std::convert::Into<::windows::core::Error>, + P0: ::std::convert::TryInto<::windows::core::InParam<'a, super::super::Foundation::Collections::IIterable>, Error = E0>, + E0: ::std::convert::Into<::windows::core::Error>, { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).RegisterPackageAsync)(::windows::core::Vtable::as_raw(this), manifesturi.into().abi(), dependencypackageuris.try_into().map_err(|e| e.into())?.abi(), deploymentoptions, result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).RegisterPackageAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(manifesturi), dependencypackageuris.try_into().map_err(|e| e.into())?.abi(), deploymentoptions, result__.as_mut_ptr()).from_abi::>(result__) } } #[doc = "*Required features: `\"ApplicationModel\"`, `\"Foundation_Collections\"`*"] @@ -2491,14 +2472,11 @@ impl PackageManager { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn ProvisionPackageForAllUsersWithOptionsAsync<'a, P0>(&self, mainpackagefamilyname: &::windows::core::HSTRING, options: P0) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, PackageAllUserProvisioningOptions>>, - { + pub fn ProvisionPackageForAllUsersWithOptionsAsync(&self, mainpackagefamilyname: &::windows::core::HSTRING, options: &PackageAllUserProvisioningOptions) -> ::windows::core::Result> { let this = &::windows::core::Interface::cast::(self)?; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).ProvisionPackageForAllUsersWithOptionsAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(mainpackagefamilyname), options.into().abi(), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).ProvisionPackageForAllUsersWithOptionsAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(mainpackagefamilyname), ::core::mem::transmute_copy(options), result__.as_mut_ptr()).from_abi::>(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -2512,16 +2490,15 @@ impl PackageManager { } #[doc = "*Required features: `\"Foundation_Collections\"`*"] #[cfg(feature = "Foundation_Collections")] - pub fn StagePackageWithOptionsAsync<'a, P0, P1, E1>(&self, packageuri: P0, dependencypackageuris: P1, deploymentoptions: DeploymentOptions) -> ::windows::core::Result> + pub fn StagePackageWithOptionsAsync<'a, P0, E0>(&self, packageuri: &super::super::Foundation::Uri, dependencypackageuris: P0, deploymentoptions: DeploymentOptions) -> ::windows::core::Result> where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::Uri>>, - P1: ::std::convert::TryInto<::windows::core::InParam<'a, super::super::Foundation::Collections::IIterable>, Error = E1>, - E1: ::std::convert::Into<::windows::core::Error>, + P0: ::std::convert::TryInto<::windows::core::InParam<'a, super::super::Foundation::Collections::IIterable>, Error = E0>, + E0: ::std::convert::Into<::windows::core::Error>, { let this = &::windows::core::Interface::cast::(self)?; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).StagePackageWithOptionsAsync)(::windows::core::Vtable::as_raw(this), packageuri.into().abi(), dependencypackageuris.try_into().map_err(|e| e.into())?.abi(), deploymentoptions, result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).StagePackageWithOptionsAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(packageuri), dependencypackageuris.try_into().map_err(|e| e.into())?.abi(), deploymentoptions, result__.as_mut_ptr()).from_abi::>(result__) } } #[doc = "*Required features: `\"Foundation_Collections\"`*"] @@ -2611,17 +2588,15 @@ impl PackageManager { } #[doc = "*Required features: `\"Foundation_Collections\"`*"] #[cfg(feature = "Foundation_Collections")] - pub fn AddPackageToVolumeAsync<'a, P0, P1, E1, P2>(&self, packageuri: P0, dependencypackageuris: P1, deploymentoptions: DeploymentOptions, targetvolume: P2) -> ::windows::core::Result> + pub fn AddPackageToVolumeAsync<'a, P0, E0>(&self, packageuri: &super::super::Foundation::Uri, dependencypackageuris: P0, deploymentoptions: DeploymentOptions, targetvolume: &PackageVolume) -> ::windows::core::Result> where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::Uri>>, - P1: ::std::convert::TryInto<::windows::core::InParam<'a, super::super::Foundation::Collections::IIterable>, Error = E1>, - E1: ::std::convert::Into<::windows::core::Error>, - P2: ::std::convert::Into<::windows::core::InParam<'a, PackageVolume>>, + P0: ::std::convert::TryInto<::windows::core::InParam<'a, super::super::Foundation::Collections::IIterable>, Error = E0>, + E0: ::std::convert::Into<::windows::core::Error>, { let this = &::windows::core::Interface::cast::(self)?; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).AddPackageToVolumeAsync)(::windows::core::Vtable::as_raw(this), packageuri.into().abi(), dependencypackageuris.try_into().map_err(|e| e.into())?.abi(), deploymentoptions, targetvolume.into().abi(), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).AddPackageToVolumeAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(packageuri), dependencypackageuris.try_into().map_err(|e| e.into())?.abi(), deploymentoptions, ::core::mem::transmute_copy(targetvolume), result__.as_mut_ptr()).from_abi::>(result__) } } pub fn ClearPackageStatus(&self, packagefullname: &::windows::core::HSTRING, status: PackageStatus) -> ::windows::core::Result<()> { @@ -2630,17 +2605,15 @@ impl PackageManager { } #[doc = "*Required features: `\"Foundation_Collections\"`*"] #[cfg(feature = "Foundation_Collections")] - pub fn RegisterPackageWithAppDataVolumeAsync<'a, P0, P1, E1, P2>(&self, manifesturi: P0, dependencypackageuris: P1, deploymentoptions: DeploymentOptions, appdatavolume: P2) -> ::windows::core::Result> + pub fn RegisterPackageWithAppDataVolumeAsync<'a, P0, E0>(&self, manifesturi: &super::super::Foundation::Uri, dependencypackageuris: P0, deploymentoptions: DeploymentOptions, appdatavolume: &PackageVolume) -> ::windows::core::Result> where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::Uri>>, - P1: ::std::convert::TryInto<::windows::core::InParam<'a, super::super::Foundation::Collections::IIterable>, Error = E1>, - E1: ::std::convert::Into<::windows::core::Error>, - P2: ::std::convert::Into<::windows::core::InParam<'a, PackageVolume>>, + P0: ::std::convert::TryInto<::windows::core::InParam<'a, super::super::Foundation::Collections::IIterable>, Error = E0>, + E0: ::std::convert::Into<::windows::core::Error>, { let this = &::windows::core::Interface::cast::(self)?; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).RegisterPackageWithAppDataVolumeAsync)(::windows::core::Vtable::as_raw(this), manifesturi.into().abi(), dependencypackageuris.try_into().map_err(|e| e.into())?.abi(), deploymentoptions, appdatavolume.into().abi(), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).RegisterPackageWithAppDataVolumeAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(manifesturi), dependencypackageuris.try_into().map_err(|e| e.into())?.abi(), deploymentoptions, ::core::mem::transmute_copy(appdatavolume), result__.as_mut_ptr()).from_abi::>(result__) } } pub fn FindPackageVolumeByName(&self, volumename: &::windows::core::HSTRING) -> ::windows::core::Result { @@ -2668,34 +2641,25 @@ impl PackageManager { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn MovePackageToVolumeAsync<'a, P0>(&self, packagefullname: &::windows::core::HSTRING, deploymentoptions: DeploymentOptions, targetvolume: P0) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, PackageVolume>>, - { + pub fn MovePackageToVolumeAsync(&self, packagefullname: &::windows::core::HSTRING, deploymentoptions: DeploymentOptions, targetvolume: &PackageVolume) -> ::windows::core::Result> { let this = &::windows::core::Interface::cast::(self)?; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).MovePackageToVolumeAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(packagefullname), deploymentoptions, targetvolume.into().abi(), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).MovePackageToVolumeAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(packagefullname), deploymentoptions, ::core::mem::transmute_copy(targetvolume), result__.as_mut_ptr()).from_abi::>(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn RemovePackageVolumeAsync<'a, P0>(&self, volume: P0) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, PackageVolume>>, - { + pub fn RemovePackageVolumeAsync(&self, volume: &PackageVolume) -> ::windows::core::Result> { let this = &::windows::core::Interface::cast::(self)?; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).RemovePackageVolumeAsync)(::windows::core::Vtable::as_raw(this), volume.into().abi(), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).RemovePackageVolumeAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(volume), result__.as_mut_ptr()).from_abi::>(result__) } } - pub fn SetDefaultPackageVolume<'a, P0>(&self, volume: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, PackageVolume>>, - { + pub fn SetDefaultPackageVolume(&self, volume: &PackageVolume) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).SetDefaultPackageVolume)(::windows::core::Vtable::as_raw(this), volume.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetDefaultPackageVolume)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(volume)).ok() } } pub fn SetPackageStatus(&self, packagefullname: &::windows::core::HSTRING, status: PackageStatus) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; @@ -2703,41 +2667,33 @@ impl PackageManager { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn SetPackageVolumeOfflineAsync<'a, P0>(&self, packagevolume: P0) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, PackageVolume>>, - { + pub fn SetPackageVolumeOfflineAsync(&self, packagevolume: &PackageVolume) -> ::windows::core::Result> { let this = &::windows::core::Interface::cast::(self)?; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).SetPackageVolumeOfflineAsync)(::windows::core::Vtable::as_raw(this), packagevolume.into().abi(), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).SetPackageVolumeOfflineAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(packagevolume), result__.as_mut_ptr()).from_abi::>(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn SetPackageVolumeOnlineAsync<'a, P0>(&self, packagevolume: P0) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, PackageVolume>>, - { + pub fn SetPackageVolumeOnlineAsync(&self, packagevolume: &PackageVolume) -> ::windows::core::Result> { let this = &::windows::core::Interface::cast::(self)?; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).SetPackageVolumeOnlineAsync)(::windows::core::Vtable::as_raw(this), packagevolume.into().abi(), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).SetPackageVolumeOnlineAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(packagevolume), result__.as_mut_ptr()).from_abi::>(result__) } } #[doc = "*Required features: `\"Foundation_Collections\"`*"] #[cfg(feature = "Foundation_Collections")] - pub fn StagePackageToVolumeAsync<'a, P0, P1, E1, P2>(&self, packageuri: P0, dependencypackageuris: P1, deploymentoptions: DeploymentOptions, targetvolume: P2) -> ::windows::core::Result> + pub fn StagePackageToVolumeAsync<'a, P0, E0>(&self, packageuri: &super::super::Foundation::Uri, dependencypackageuris: P0, deploymentoptions: DeploymentOptions, targetvolume: &PackageVolume) -> ::windows::core::Result> where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::Uri>>, - P1: ::std::convert::TryInto<::windows::core::InParam<'a, super::super::Foundation::Collections::IIterable>, Error = E1>, - E1: ::std::convert::Into<::windows::core::Error>, - P2: ::std::convert::Into<::windows::core::InParam<'a, PackageVolume>>, + P0: ::std::convert::TryInto<::windows::core::InParam<'a, super::super::Foundation::Collections::IIterable>, Error = E0>, + E0: ::std::convert::Into<::windows::core::Error>, { let this = &::windows::core::Interface::cast::(self)?; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).StagePackageToVolumeAsync)(::windows::core::Vtable::as_raw(this), packageuri.into().abi(), dependencypackageuris.try_into().map_err(|e| e.into())?.abi(), deploymentoptions, targetvolume.into().abi(), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).StagePackageToVolumeAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(packageuri), dependencypackageuris.try_into().map_err(|e| e.into())?.abi(), deploymentoptions, ::core::mem::transmute_copy(targetvolume), result__.as_mut_ptr()).from_abi::>(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -2760,56 +2716,51 @@ impl PackageManager { } #[doc = "*Required features: `\"Foundation_Collections\"`*"] #[cfg(feature = "Foundation_Collections")] - pub fn AddPackageToVolumeAndOptionalPackagesAsync<'a, P0, P1, E1, P2, P3, E3, P4, E4>(&self, packageuri: P0, dependencypackageuris: P1, deploymentoptions: DeploymentOptions, targetvolume: P2, optionalpackagefamilynames: P3, externalpackageuris: P4) -> ::windows::core::Result> + pub fn AddPackageToVolumeAndOptionalPackagesAsync<'a, P0, E0, P1, E1, P2, E2>(&self, packageuri: &super::super::Foundation::Uri, dependencypackageuris: P0, deploymentoptions: DeploymentOptions, targetvolume: &PackageVolume, optionalpackagefamilynames: P1, externalpackageuris: P2) -> ::windows::core::Result> where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::Uri>>, - P1: ::std::convert::TryInto<::windows::core::InParam<'a, super::super::Foundation::Collections::IIterable>, Error = E1>, + P0: ::std::convert::TryInto<::windows::core::InParam<'a, super::super::Foundation::Collections::IIterable>, Error = E0>, + E0: ::std::convert::Into<::windows::core::Error>, + P1: ::std::convert::TryInto<::windows::core::InParam<'a, super::super::Foundation::Collections::IIterable<::windows::core::HSTRING>>, Error = E1>, E1: ::std::convert::Into<::windows::core::Error>, - P2: ::std::convert::Into<::windows::core::InParam<'a, PackageVolume>>, - P3: ::std::convert::TryInto<::windows::core::InParam<'a, super::super::Foundation::Collections::IIterable<::windows::core::HSTRING>>, Error = E3>, - E3: ::std::convert::Into<::windows::core::Error>, - P4: ::std::convert::TryInto<::windows::core::InParam<'a, super::super::Foundation::Collections::IIterable>, Error = E4>, - E4: ::std::convert::Into<::windows::core::Error>, + P2: ::std::convert::TryInto<::windows::core::InParam<'a, super::super::Foundation::Collections::IIterable>, Error = E2>, + E2: ::std::convert::Into<::windows::core::Error>, { let this = &::windows::core::Interface::cast::(self)?; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).AddPackageToVolumeAndOptionalPackagesAsync)(::windows::core::Vtable::as_raw(this), packageuri.into().abi(), dependencypackageuris.try_into().map_err(|e| e.into())?.abi(), deploymentoptions, targetvolume.into().abi(), optionalpackagefamilynames.try_into().map_err(|e| e.into())?.abi(), externalpackageuris.try_into().map_err(|e| e.into())?.abi(), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).AddPackageToVolumeAndOptionalPackagesAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(packageuri), dependencypackageuris.try_into().map_err(|e| e.into())?.abi(), deploymentoptions, ::core::mem::transmute_copy(targetvolume), optionalpackagefamilynames.try_into().map_err(|e| e.into())?.abi(), externalpackageuris.try_into().map_err(|e| e.into())?.abi(), result__.as_mut_ptr()).from_abi::>(result__) } } #[doc = "*Required features: `\"Foundation_Collections\"`*"] #[cfg(feature = "Foundation_Collections")] - pub fn StagePackageToVolumeAndOptionalPackagesAsync<'a, P0, P1, E1, P2, P3, E3, P4, E4>(&self, packageuri: P0, dependencypackageuris: P1, deploymentoptions: DeploymentOptions, targetvolume: P2, optionalpackagefamilynames: P3, externalpackageuris: P4) -> ::windows::core::Result> + pub fn StagePackageToVolumeAndOptionalPackagesAsync<'a, P0, E0, P1, E1, P2, E2>(&self, packageuri: &super::super::Foundation::Uri, dependencypackageuris: P0, deploymentoptions: DeploymentOptions, targetvolume: &PackageVolume, optionalpackagefamilynames: P1, externalpackageuris: P2) -> ::windows::core::Result> where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::Uri>>, - P1: ::std::convert::TryInto<::windows::core::InParam<'a, super::super::Foundation::Collections::IIterable>, Error = E1>, + P0: ::std::convert::TryInto<::windows::core::InParam<'a, super::super::Foundation::Collections::IIterable>, Error = E0>, + E0: ::std::convert::Into<::windows::core::Error>, + P1: ::std::convert::TryInto<::windows::core::InParam<'a, super::super::Foundation::Collections::IIterable<::windows::core::HSTRING>>, Error = E1>, E1: ::std::convert::Into<::windows::core::Error>, - P2: ::std::convert::Into<::windows::core::InParam<'a, PackageVolume>>, - P3: ::std::convert::TryInto<::windows::core::InParam<'a, super::super::Foundation::Collections::IIterable<::windows::core::HSTRING>>, Error = E3>, - E3: ::std::convert::Into<::windows::core::Error>, - P4: ::std::convert::TryInto<::windows::core::InParam<'a, super::super::Foundation::Collections::IIterable>, Error = E4>, - E4: ::std::convert::Into<::windows::core::Error>, + P2: ::std::convert::TryInto<::windows::core::InParam<'a, super::super::Foundation::Collections::IIterable>, Error = E2>, + E2: ::std::convert::Into<::windows::core::Error>, { let this = &::windows::core::Interface::cast::(self)?; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).StagePackageToVolumeAndOptionalPackagesAsync)(::windows::core::Vtable::as_raw(this), packageuri.into().abi(), dependencypackageuris.try_into().map_err(|e| e.into())?.abi(), deploymentoptions, targetvolume.into().abi(), optionalpackagefamilynames.try_into().map_err(|e| e.into())?.abi(), externalpackageuris.try_into().map_err(|e| e.into())?.abi(), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).StagePackageToVolumeAndOptionalPackagesAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(packageuri), dependencypackageuris.try_into().map_err(|e| e.into())?.abi(), deploymentoptions, ::core::mem::transmute_copy(targetvolume), optionalpackagefamilynames.try_into().map_err(|e| e.into())?.abi(), externalpackageuris.try_into().map_err(|e| e.into())?.abi(), result__.as_mut_ptr()).from_abi::>(result__) } } #[doc = "*Required features: `\"Foundation_Collections\"`*"] #[cfg(feature = "Foundation_Collections")] - pub fn RegisterPackageByFamilyNameAndOptionalPackagesAsync<'a, P0, E0, P1, P2, E2>(&self, mainpackagefamilyname: &::windows::core::HSTRING, dependencypackagefamilynames: P0, deploymentoptions: DeploymentOptions, appdatavolume: P1, optionalpackagefamilynames: P2) -> ::windows::core::Result> + pub fn RegisterPackageByFamilyNameAndOptionalPackagesAsync<'a, P0, E0, P1, E1>(&self, mainpackagefamilyname: &::windows::core::HSTRING, dependencypackagefamilynames: P0, deploymentoptions: DeploymentOptions, appdatavolume: &PackageVolume, optionalpackagefamilynames: P1) -> ::windows::core::Result> where P0: ::std::convert::TryInto<::windows::core::InParam<'a, super::super::Foundation::Collections::IIterable<::windows::core::HSTRING>>, Error = E0>, E0: ::std::convert::Into<::windows::core::Error>, - P1: ::std::convert::Into<::windows::core::InParam<'a, PackageVolume>>, - P2: ::std::convert::TryInto<::windows::core::InParam<'a, super::super::Foundation::Collections::IIterable<::windows::core::HSTRING>>, Error = E2>, - E2: ::std::convert::Into<::windows::core::Error>, + P1: ::std::convert::TryInto<::windows::core::InParam<'a, super::super::Foundation::Collections::IIterable<::windows::core::HSTRING>>, Error = E1>, + E1: ::std::convert::Into<::windows::core::Error>, { let this = &::windows::core::Interface::cast::(self)?; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).RegisterPackageByFamilyNameAndOptionalPackagesAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(mainpackagefamilyname), dependencypackagefamilynames.try_into().map_err(|e| e.into())?.abi(), deploymentoptions, appdatavolume.into().abi(), optionalpackagefamilynames.try_into().map_err(|e| e.into())?.abi(), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).RegisterPackageByFamilyNameAndOptionalPackagesAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(mainpackagefamilyname), dependencypackagefamilynames.try_into().map_err(|e| e.into())?.abi(), deploymentoptions, ::core::mem::transmute_copy(appdatavolume), optionalpackagefamilynames.try_into().map_err(|e| e.into())?.abi(), result__.as_mut_ptr()).from_abi::>(result__) } } pub fn DebugSettings(&self) -> ::windows::core::Result { @@ -2830,110 +2781,94 @@ impl PackageManager { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn AddPackageByAppInstallerFileAsync<'a, P0, P1>(&self, appinstallerfileuri: P0, options: AddPackageByAppInstallerOptions, targetvolume: P1) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::Uri>>, - P1: ::std::convert::Into<::windows::core::InParam<'a, PackageVolume>>, - { + pub fn AddPackageByAppInstallerFileAsync(&self, appinstallerfileuri: &super::super::Foundation::Uri, options: AddPackageByAppInstallerOptions, targetvolume: &PackageVolume) -> ::windows::core::Result> { let this = &::windows::core::Interface::cast::(self)?; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).AddPackageByAppInstallerFileAsync)(::windows::core::Vtable::as_raw(this), appinstallerfileuri.into().abi(), options, targetvolume.into().abi(), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).AddPackageByAppInstallerFileAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(appinstallerfileuri), options, ::core::mem::transmute_copy(targetvolume), result__.as_mut_ptr()).from_abi::>(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn RequestAddPackageByAppInstallerFileAsync<'a, P0, P1>(&self, appinstallerfileuri: P0, options: AddPackageByAppInstallerOptions, targetvolume: P1) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::Uri>>, - P1: ::std::convert::Into<::windows::core::InParam<'a, PackageVolume>>, - { + pub fn RequestAddPackageByAppInstallerFileAsync(&self, appinstallerfileuri: &super::super::Foundation::Uri, options: AddPackageByAppInstallerOptions, targetvolume: &PackageVolume) -> ::windows::core::Result> { let this = &::windows::core::Interface::cast::(self)?; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).RequestAddPackageByAppInstallerFileAsync)(::windows::core::Vtable::as_raw(this), appinstallerfileuri.into().abi(), options, targetvolume.into().abi(), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).RequestAddPackageByAppInstallerFileAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(appinstallerfileuri), options, ::core::mem::transmute_copy(targetvolume), result__.as_mut_ptr()).from_abi::>(result__) } } #[doc = "*Required features: `\"Foundation_Collections\"`*"] #[cfg(feature = "Foundation_Collections")] - pub fn AddPackageToVolumeAndRelatedSetAsync<'a, P0, P1, E1, P2, P3, E3, P4, E4, P5, E5>(&self, packageuri: P0, dependencypackageuris: P1, options: DeploymentOptions, targetvolume: P2, optionalpackagefamilynames: P3, packageuristoinstall: P4, relatedpackageuris: P5) -> ::windows::core::Result> + pub fn AddPackageToVolumeAndRelatedSetAsync<'a, P0, E0, P1, E1, P2, E2, P3, E3>(&self, packageuri: &super::super::Foundation::Uri, dependencypackageuris: P0, options: DeploymentOptions, targetvolume: &PackageVolume, optionalpackagefamilynames: P1, packageuristoinstall: P2, relatedpackageuris: P3) -> ::windows::core::Result> where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::Uri>>, - P1: ::std::convert::TryInto<::windows::core::InParam<'a, super::super::Foundation::Collections::IIterable>, Error = E1>, + P0: ::std::convert::TryInto<::windows::core::InParam<'a, super::super::Foundation::Collections::IIterable>, Error = E0>, + E0: ::std::convert::Into<::windows::core::Error>, + P1: ::std::convert::TryInto<::windows::core::InParam<'a, super::super::Foundation::Collections::IIterable<::windows::core::HSTRING>>, Error = E1>, E1: ::std::convert::Into<::windows::core::Error>, - P2: ::std::convert::Into<::windows::core::InParam<'a, PackageVolume>>, - P3: ::std::convert::TryInto<::windows::core::InParam<'a, super::super::Foundation::Collections::IIterable<::windows::core::HSTRING>>, Error = E3>, + P2: ::std::convert::TryInto<::windows::core::InParam<'a, super::super::Foundation::Collections::IIterable>, Error = E2>, + E2: ::std::convert::Into<::windows::core::Error>, + P3: ::std::convert::TryInto<::windows::core::InParam<'a, super::super::Foundation::Collections::IIterable>, Error = E3>, E3: ::std::convert::Into<::windows::core::Error>, - P4: ::std::convert::TryInto<::windows::core::InParam<'a, super::super::Foundation::Collections::IIterable>, Error = E4>, - E4: ::std::convert::Into<::windows::core::Error>, - P5: ::std::convert::TryInto<::windows::core::InParam<'a, super::super::Foundation::Collections::IIterable>, Error = E5>, - E5: ::std::convert::Into<::windows::core::Error>, { let this = &::windows::core::Interface::cast::(self)?; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).AddPackageToVolumeAndRelatedSetAsync)(::windows::core::Vtable::as_raw(this), packageuri.into().abi(), dependencypackageuris.try_into().map_err(|e| e.into())?.abi(), options, targetvolume.into().abi(), optionalpackagefamilynames.try_into().map_err(|e| e.into())?.abi(), packageuristoinstall.try_into().map_err(|e| e.into())?.abi(), relatedpackageuris.try_into().map_err(|e| e.into())?.abi(), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).AddPackageToVolumeAndRelatedSetAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(packageuri), dependencypackageuris.try_into().map_err(|e| e.into())?.abi(), options, ::core::mem::transmute_copy(targetvolume), optionalpackagefamilynames.try_into().map_err(|e| e.into())?.abi(), packageuristoinstall.try_into().map_err(|e| e.into())?.abi(), relatedpackageuris.try_into().map_err(|e| e.into())?.abi(), result__.as_mut_ptr()).from_abi::>(result__) } } #[doc = "*Required features: `\"Foundation_Collections\"`*"] #[cfg(feature = "Foundation_Collections")] - pub fn StagePackageToVolumeAndRelatedSetAsync<'a, P0, P1, E1, P2, P3, E3, P4, E4, P5, E5>(&self, packageuri: P0, dependencypackageuris: P1, options: DeploymentOptions, targetvolume: P2, optionalpackagefamilynames: P3, packageuristoinstall: P4, relatedpackageuris: P5) -> ::windows::core::Result> + pub fn StagePackageToVolumeAndRelatedSetAsync<'a, P0, E0, P1, E1, P2, E2, P3, E3>(&self, packageuri: &super::super::Foundation::Uri, dependencypackageuris: P0, options: DeploymentOptions, targetvolume: &PackageVolume, optionalpackagefamilynames: P1, packageuristoinstall: P2, relatedpackageuris: P3) -> ::windows::core::Result> where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::Uri>>, - P1: ::std::convert::TryInto<::windows::core::InParam<'a, super::super::Foundation::Collections::IIterable>, Error = E1>, + P0: ::std::convert::TryInto<::windows::core::InParam<'a, super::super::Foundation::Collections::IIterable>, Error = E0>, + E0: ::std::convert::Into<::windows::core::Error>, + P1: ::std::convert::TryInto<::windows::core::InParam<'a, super::super::Foundation::Collections::IIterable<::windows::core::HSTRING>>, Error = E1>, E1: ::std::convert::Into<::windows::core::Error>, - P2: ::std::convert::Into<::windows::core::InParam<'a, PackageVolume>>, - P3: ::std::convert::TryInto<::windows::core::InParam<'a, super::super::Foundation::Collections::IIterable<::windows::core::HSTRING>>, Error = E3>, + P2: ::std::convert::TryInto<::windows::core::InParam<'a, super::super::Foundation::Collections::IIterable>, Error = E2>, + E2: ::std::convert::Into<::windows::core::Error>, + P3: ::std::convert::TryInto<::windows::core::InParam<'a, super::super::Foundation::Collections::IIterable>, Error = E3>, E3: ::std::convert::Into<::windows::core::Error>, - P4: ::std::convert::TryInto<::windows::core::InParam<'a, super::super::Foundation::Collections::IIterable>, Error = E4>, - E4: ::std::convert::Into<::windows::core::Error>, - P5: ::std::convert::TryInto<::windows::core::InParam<'a, super::super::Foundation::Collections::IIterable>, Error = E5>, - E5: ::std::convert::Into<::windows::core::Error>, { let this = &::windows::core::Interface::cast::(self)?; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).StagePackageToVolumeAndRelatedSetAsync)(::windows::core::Vtable::as_raw(this), packageuri.into().abi(), dependencypackageuris.try_into().map_err(|e| e.into())?.abi(), options, targetvolume.into().abi(), optionalpackagefamilynames.try_into().map_err(|e| e.into())?.abi(), packageuristoinstall.try_into().map_err(|e| e.into())?.abi(), relatedpackageuris.try_into().map_err(|e| e.into())?.abi(), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).StagePackageToVolumeAndRelatedSetAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(packageuri), dependencypackageuris.try_into().map_err(|e| e.into())?.abi(), options, ::core::mem::transmute_copy(targetvolume), optionalpackagefamilynames.try_into().map_err(|e| e.into())?.abi(), packageuristoinstall.try_into().map_err(|e| e.into())?.abi(), relatedpackageuris.try_into().map_err(|e| e.into())?.abi(), result__.as_mut_ptr()).from_abi::>(result__) } } #[doc = "*Required features: `\"Foundation_Collections\"`*"] #[cfg(feature = "Foundation_Collections")] - pub fn RequestAddPackageAsync<'a, P0, P1, E1, P2, P3, E3, P4, E4>(&self, packageuri: P0, dependencypackageuris: P1, deploymentoptions: DeploymentOptions, targetvolume: P2, optionalpackagefamilynames: P3, relatedpackageuris: P4) -> ::windows::core::Result> + pub fn RequestAddPackageAsync<'a, P0, E0, P1, E1, P2, E2>(&self, packageuri: &super::super::Foundation::Uri, dependencypackageuris: P0, deploymentoptions: DeploymentOptions, targetvolume: &PackageVolume, optionalpackagefamilynames: P1, relatedpackageuris: P2) -> ::windows::core::Result> where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::Uri>>, - P1: ::std::convert::TryInto<::windows::core::InParam<'a, super::super::Foundation::Collections::IIterable>, Error = E1>, + P0: ::std::convert::TryInto<::windows::core::InParam<'a, super::super::Foundation::Collections::IIterable>, Error = E0>, + E0: ::std::convert::Into<::windows::core::Error>, + P1: ::std::convert::TryInto<::windows::core::InParam<'a, super::super::Foundation::Collections::IIterable<::windows::core::HSTRING>>, Error = E1>, E1: ::std::convert::Into<::windows::core::Error>, - P2: ::std::convert::Into<::windows::core::InParam<'a, PackageVolume>>, - P3: ::std::convert::TryInto<::windows::core::InParam<'a, super::super::Foundation::Collections::IIterable<::windows::core::HSTRING>>, Error = E3>, - E3: ::std::convert::Into<::windows::core::Error>, - P4: ::std::convert::TryInto<::windows::core::InParam<'a, super::super::Foundation::Collections::IIterable>, Error = E4>, - E4: ::std::convert::Into<::windows::core::Error>, + P2: ::std::convert::TryInto<::windows::core::InParam<'a, super::super::Foundation::Collections::IIterable>, Error = E2>, + E2: ::std::convert::Into<::windows::core::Error>, { let this = &::windows::core::Interface::cast::(self)?; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).RequestAddPackageAsync)(::windows::core::Vtable::as_raw(this), packageuri.into().abi(), dependencypackageuris.try_into().map_err(|e| e.into())?.abi(), deploymentoptions, targetvolume.into().abi(), optionalpackagefamilynames.try_into().map_err(|e| e.into())?.abi(), relatedpackageuris.try_into().map_err(|e| e.into())?.abi(), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).RequestAddPackageAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(packageuri), dependencypackageuris.try_into().map_err(|e| e.into())?.abi(), deploymentoptions, ::core::mem::transmute_copy(targetvolume), optionalpackagefamilynames.try_into().map_err(|e| e.into())?.abi(), relatedpackageuris.try_into().map_err(|e| e.into())?.abi(), result__.as_mut_ptr()).from_abi::>(result__) } } #[doc = "*Required features: `\"Foundation_Collections\"`*"] #[cfg(feature = "Foundation_Collections")] - pub fn RequestAddPackageAndRelatedSetAsync<'a, P0, P1, E1, P2, P3, E3, P4, E4, P5, E5>(&self, packageuri: P0, dependencypackageuris: P1, deploymentoptions: DeploymentOptions, targetvolume: P2, optionalpackagefamilynames: P3, relatedpackageuris: P4, packageuristoinstall: P5) -> ::windows::core::Result> + pub fn RequestAddPackageAndRelatedSetAsync<'a, P0, E0, P1, E1, P2, E2, P3, E3>(&self, packageuri: &super::super::Foundation::Uri, dependencypackageuris: P0, deploymentoptions: DeploymentOptions, targetvolume: &PackageVolume, optionalpackagefamilynames: P1, relatedpackageuris: P2, packageuristoinstall: P3) -> ::windows::core::Result> where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::Uri>>, - P1: ::std::convert::TryInto<::windows::core::InParam<'a, super::super::Foundation::Collections::IIterable>, Error = E1>, + P0: ::std::convert::TryInto<::windows::core::InParam<'a, super::super::Foundation::Collections::IIterable>, Error = E0>, + E0: ::std::convert::Into<::windows::core::Error>, + P1: ::std::convert::TryInto<::windows::core::InParam<'a, super::super::Foundation::Collections::IIterable<::windows::core::HSTRING>>, Error = E1>, E1: ::std::convert::Into<::windows::core::Error>, - P2: ::std::convert::Into<::windows::core::InParam<'a, PackageVolume>>, - P3: ::std::convert::TryInto<::windows::core::InParam<'a, super::super::Foundation::Collections::IIterable<::windows::core::HSTRING>>, Error = E3>, + P2: ::std::convert::TryInto<::windows::core::InParam<'a, super::super::Foundation::Collections::IIterable>, Error = E2>, + E2: ::std::convert::Into<::windows::core::Error>, + P3: ::std::convert::TryInto<::windows::core::InParam<'a, super::super::Foundation::Collections::IIterable>, Error = E3>, E3: ::std::convert::Into<::windows::core::Error>, - P4: ::std::convert::TryInto<::windows::core::InParam<'a, super::super::Foundation::Collections::IIterable>, Error = E4>, - E4: ::std::convert::Into<::windows::core::Error>, - P5: ::std::convert::TryInto<::windows::core::InParam<'a, super::super::Foundation::Collections::IIterable>, Error = E5>, - E5: ::std::convert::Into<::windows::core::Error>, { let this = &::windows::core::Interface::cast::(self)?; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).RequestAddPackageAndRelatedSetAsync)(::windows::core::Vtable::as_raw(this), packageuri.into().abi(), dependencypackageuris.try_into().map_err(|e| e.into())?.abi(), deploymentoptions, targetvolume.into().abi(), optionalpackagefamilynames.try_into().map_err(|e| e.into())?.abi(), relatedpackageuris.try_into().map_err(|e| e.into())?.abi(), packageuristoinstall.try_into().map_err(|e| e.into())?.abi(), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).RequestAddPackageAndRelatedSetAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(packageuri), dependencypackageuris.try_into().map_err(|e| e.into())?.abi(), deploymentoptions, ::core::mem::transmute_copy(targetvolume), optionalpackagefamilynames.try_into().map_err(|e| e.into())?.abi(), relatedpackageuris.try_into().map_err(|e| e.into())?.abi(), packageuristoinstall.try_into().map_err(|e| e.into())?.abi(), result__.as_mut_ptr()).from_abi::>(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -2956,55 +2891,42 @@ impl PackageManager { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn AddPackageByUriAsync<'a, P0, P1>(&self, packageuri: P0, options: P1) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::Uri>>, - P1: ::std::convert::Into<::windows::core::InParam<'a, AddPackageOptions>>, - { + pub fn AddPackageByUriAsync(&self, packageuri: &super::super::Foundation::Uri, options: &AddPackageOptions) -> ::windows::core::Result> { let this = &::windows::core::Interface::cast::(self)?; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).AddPackageByUriAsync)(::windows::core::Vtable::as_raw(this), packageuri.into().abi(), options.into().abi(), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).AddPackageByUriAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(packageuri), ::core::mem::transmute_copy(options), result__.as_mut_ptr()).from_abi::>(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn StagePackageByUriAsync<'a, P0, P1>(&self, packageuri: P0, options: P1) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::Uri>>, - P1: ::std::convert::Into<::windows::core::InParam<'a, StagePackageOptions>>, - { + pub fn StagePackageByUriAsync(&self, packageuri: &super::super::Foundation::Uri, options: &StagePackageOptions) -> ::windows::core::Result> { let this = &::windows::core::Interface::cast::(self)?; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).StagePackageByUriAsync)(::windows::core::Vtable::as_raw(this), packageuri.into().abi(), options.into().abi(), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).StagePackageByUriAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(packageuri), ::core::mem::transmute_copy(options), result__.as_mut_ptr()).from_abi::>(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn RegisterPackageByUriAsync<'a, P0, P1>(&self, manifesturi: P0, options: P1) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::Uri>>, - P1: ::std::convert::Into<::windows::core::InParam<'a, RegisterPackageOptions>>, - { + pub fn RegisterPackageByUriAsync(&self, manifesturi: &super::super::Foundation::Uri, options: &RegisterPackageOptions) -> ::windows::core::Result> { let this = &::windows::core::Interface::cast::(self)?; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).RegisterPackageByUriAsync)(::windows::core::Vtable::as_raw(this), manifesturi.into().abi(), options.into().abi(), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).RegisterPackageByUriAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(manifesturi), ::core::mem::transmute_copy(options), result__.as_mut_ptr()).from_abi::>(result__) } } #[doc = "*Required features: `\"Foundation_Collections\"`*"] #[cfg(feature = "Foundation_Collections")] - pub fn RegisterPackagesByFullNameAsync<'a, P0, E0, P1>(&self, packagefullnames: P0, options: P1) -> ::windows::core::Result> + pub fn RegisterPackagesByFullNameAsync<'a, P0, E0>(&self, packagefullnames: P0, options: &RegisterPackageOptions) -> ::windows::core::Result> where P0: ::std::convert::TryInto<::windows::core::InParam<'a, super::super::Foundation::Collections::IIterable<::windows::core::HSTRING>>, Error = E0>, E0: ::std::convert::Into<::windows::core::Error>, - P1: ::std::convert::Into<::windows::core::InParam<'a, RegisterPackageOptions>>, { let this = &::windows::core::Interface::cast::(self)?; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).RegisterPackagesByFullNameAsync)(::windows::core::Vtable::as_raw(this), packagefullnames.try_into().map_err(|e| e.into())?.abi(), options.into().abi(), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).RegisterPackagesByFullNameAsync)(::windows::core::Vtable::as_raw(this), packagefullnames.try_into().map_err(|e| e.into())?.abi(), ::core::mem::transmute_copy(options), result__.as_mut_ptr()).from_abi::>(result__) } } pub fn SetPackageStubPreference(&self, packagefamilyname: &::windows::core::HSTRING, usestub: PackageStubPreference) -> ::windows::core::Result<()> { @@ -3089,26 +3011,20 @@ pub struct PackageManagerDebugSettings(::windows::core::IUnknown); impl PackageManagerDebugSettings { #[doc = "*Required features: `\"ApplicationModel\"`, `\"Foundation\"`*"] #[cfg(all(feature = "ApplicationModel", feature = "Foundation"))] - pub fn SetContentGroupStateAsync<'a, P0>(&self, package: P0, contentgroupname: &::windows::core::HSTRING, state: super::super::ApplicationModel::PackageContentGroupState) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::ApplicationModel::Package>>, - { + pub fn SetContentGroupStateAsync(&self, package: &super::super::ApplicationModel::Package, contentgroupname: &::windows::core::HSTRING, state: super::super::ApplicationModel::PackageContentGroupState) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).SetContentGroupStateAsync)(::windows::core::Vtable::as_raw(this), package.into().abi(), ::core::mem::transmute_copy(contentgroupname), state, result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).SetContentGroupStateAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(package), ::core::mem::transmute_copy(contentgroupname), state, result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"ApplicationModel\"`, `\"Foundation\"`*"] #[cfg(all(feature = "ApplicationModel", feature = "Foundation"))] - pub fn SetContentGroupStateWithPercentageAsync<'a, P0>(&self, package: P0, contentgroupname: &::windows::core::HSTRING, state: super::super::ApplicationModel::PackageContentGroupState, completionpercentage: f64) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::ApplicationModel::Package>>, - { + pub fn SetContentGroupStateWithPercentageAsync(&self, package: &super::super::ApplicationModel::Package, contentgroupname: &::windows::core::HSTRING, state: super::super::ApplicationModel::PackageContentGroupState, completionpercentage: f64) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).SetContentGroupStateWithPercentageAsync)(::windows::core::Vtable::as_raw(this), package.into().abi(), ::core::mem::transmute_copy(contentgroupname), state, completionpercentage, result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).SetContentGroupStateWithPercentageAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(package), ::core::mem::transmute_copy(contentgroupname), state, completionpercentage, result__.as_mut_ptr()).from_abi::(result__) } } } @@ -3546,12 +3462,9 @@ impl RegisterPackageOptions { (::windows::core::Vtable::vtable(this).AppDataVolume)(::windows::core::Vtable::as_raw(this), result__.as_mut_ptr()).from_abi::(result__) } } - pub fn SetAppDataVolume<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, PackageVolume>>, - { + pub fn SetAppDataVolume(&self, value: &PackageVolume) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).SetAppDataVolume)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetAppDataVolume)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } #[doc = "*Required features: `\"Foundation_Collections\"`*"] #[cfg(feature = "Foundation_Collections")] @@ -3573,12 +3486,9 @@ impl RegisterPackageOptions { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn SetExternalLocationUri<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::Uri>>, - { + pub fn SetExternalLocationUri(&self, value: &super::super::Foundation::Uri) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).SetExternalLocationUri)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetExternalLocationUri)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } pub fn DeveloperMode(&self) -> ::windows::core::Result { let this = self; @@ -3760,14 +3670,11 @@ impl SharedPackageContainer { (::windows::core::Vtable::vtable(this).GetMembers)(::windows::core::Vtable::as_raw(this), result__.as_mut_ptr()).from_abi::>(result__) } } - pub fn RemovePackageFamily<'a, P0>(&self, packagefamilyname: &::windows::core::HSTRING, options: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, UpdateSharedPackageContainerOptions>>, - { + pub fn RemovePackageFamily(&self, packagefamilyname: &::windows::core::HSTRING, options: &UpdateSharedPackageContainerOptions) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).RemovePackageFamily)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(packagefamilyname), options.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).RemovePackageFamily)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(packagefamilyname), ::core::mem::transmute_copy(options), result__.as_mut_ptr()).from_abi::(result__) } } pub fn ResetData(&self) -> ::windows::core::Result { @@ -3846,24 +3753,18 @@ unsafe impl ::core::marker::Sync for SharedPackageContainer {} #[repr(transparent)] pub struct SharedPackageContainerManager(::windows::core::IUnknown); impl SharedPackageContainerManager { - pub fn CreateContainer<'a, P0>(&self, name: &::windows::core::HSTRING, options: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, CreateSharedPackageContainerOptions>>, - { + pub fn CreateContainer(&self, name: &::windows::core::HSTRING, options: &CreateSharedPackageContainerOptions) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).CreateContainer)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(name), options.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).CreateContainer)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(name), ::core::mem::transmute_copy(options), result__.as_mut_ptr()).from_abi::(result__) } } - pub fn DeleteContainer<'a, P0>(&self, id: &::windows::core::HSTRING, options: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, DeleteSharedPackageContainerOptions>>, - { + pub fn DeleteContainer(&self, id: &::windows::core::HSTRING, options: &DeleteSharedPackageContainerOptions) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).DeleteContainer)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(id), options.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).DeleteContainer)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(id), ::core::mem::transmute_copy(options), result__.as_mut_ptr()).from_abi::(result__) } } pub fn GetContainer(&self, id: &::windows::core::HSTRING) -> ::windows::core::Result { @@ -3884,14 +3785,11 @@ impl SharedPackageContainerManager { } #[doc = "*Required features: `\"Foundation_Collections\"`*"] #[cfg(feature = "Foundation_Collections")] - pub fn FindContainersWithOptions<'a, P0>(&self, options: P0) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, FindSharedPackageContainerOptions>>, - { + pub fn FindContainersWithOptions(&self, options: &FindSharedPackageContainerOptions) -> ::windows::core::Result> { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).FindContainersWithOptions)(::windows::core::Vtable::as_raw(this), options.into().abi(), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).FindContainersWithOptions)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(options), result__.as_mut_ptr()).from_abi::>(result__) } } pub fn GetDefault() -> ::windows::core::Result { @@ -4096,12 +3994,9 @@ impl StagePackageOptions { (::windows::core::Vtable::vtable(this).TargetVolume)(::windows::core::Vtable::as_raw(this), result__.as_mut_ptr()).from_abi::(result__) } } - pub fn SetTargetVolume<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, PackageVolume>>, - { + pub fn SetTargetVolume(&self, value: &PackageVolume) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).SetTargetVolume)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetTargetVolume)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } #[doc = "*Required features: `\"Foundation_Collections\"`*"] #[cfg(feature = "Foundation_Collections")] @@ -4141,12 +4036,9 @@ impl StagePackageOptions { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn SetExternalLocationUri<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::Uri>>, - { + pub fn SetExternalLocationUri(&self, value: &super::super::Foundation::Uri) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).SetExternalLocationUri)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetExternalLocationUri)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } pub fn StubPackageOption(&self) -> ::windows::core::Result { let this = self; diff --git a/crates/libs/windows/src/Windows/Management/Policies/mod.rs b/crates/libs/windows/src/Windows/Management/Policies/mod.rs index f6c60cb0ad..f091cbf46c 100644 --- a/crates/libs/windows/src/Windows/Management/Policies/mod.rs +++ b/crates/libs/windows/src/Windows/Management/Policies/mod.rs @@ -67,13 +67,10 @@ impl NamedPolicy { } #[doc = "*Required features: `\"System\"`*"] #[cfg(feature = "System")] - pub fn GetPolicyFromPathForUser<'a, P0>(user: P0, area: &::windows::core::HSTRING, name: &::windows::core::HSTRING) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::System::User>>, - { + pub fn GetPolicyFromPathForUser(user: &super::super::System::User, area: &::windows::core::HSTRING, name: &::windows::core::HSTRING) -> ::windows::core::Result { Self::INamedPolicyStatics(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).GetPolicyFromPathForUser)(::windows::core::Vtable::as_raw(this), user.into().abi(), ::core::mem::transmute_copy(area), ::core::mem::transmute_copy(name), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).GetPolicyFromPathForUser)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(user), ::core::mem::transmute_copy(area), ::core::mem::transmute_copy(name), result__.as_mut_ptr()).from_abi::(result__) }) } #[doc(hidden)] @@ -172,14 +169,11 @@ impl NamedPolicyData { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn Changed<'a, P0>(&self, changedhandler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn Changed(&self, changedhandler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).Changed)(::windows::core::Vtable::as_raw(this), changedhandler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).Changed)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(changedhandler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] diff --git a/crates/libs/windows/src/Windows/Media/AppBroadcasting/mod.rs b/crates/libs/windows/src/Windows/Media/AppBroadcasting/mod.rs index 1f37759665..5611378704 100644 --- a/crates/libs/windows/src/Windows/Media/AppBroadcasting/mod.rs +++ b/crates/libs/windows/src/Windows/Media/AppBroadcasting/mod.rs @@ -114,14 +114,11 @@ impl AppBroadcastingMonitor { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn IsCurrentAppBroadcastingChanged<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn IsCurrentAppBroadcastingChanged(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).IsCurrentAppBroadcastingChanged)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).IsCurrentAppBroadcastingChanged)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -426,13 +423,10 @@ impl AppBroadcastingUI { } #[doc = "*Required features: `\"System\"`*"] #[cfg(feature = "System")] - pub fn GetForUser<'a, P0>(user: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::System::User>>, - { + pub fn GetForUser(user: &super::super::System::User) -> ::windows::core::Result { Self::IAppBroadcastingUIStatics(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).GetForUser)(::windows::core::Vtable::as_raw(this), user.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).GetForUser)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(user), result__.as_mut_ptr()).from_abi::(result__) }) } #[doc(hidden)] diff --git a/crates/libs/windows/src/Windows/Media/AppRecording/mod.rs b/crates/libs/windows/src/Windows/Media/AppRecording/mod.rs index 7e599dba8e..2582a50b39 100644 --- a/crates/libs/windows/src/Windows/Media/AppRecording/mod.rs +++ b/crates/libs/windows/src/Windows/Media/AppRecording/mod.rs @@ -161,26 +161,20 @@ impl AppRecordingManager { } #[doc = "*Required features: `\"Foundation\"`, `\"Storage\"`*"] #[cfg(all(feature = "Foundation", feature = "Storage"))] - pub fn StartRecordingToFileAsync<'a, P0>(&self, file: P0) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Storage::StorageFile>>, - { + pub fn StartRecordingToFileAsync(&self, file: &super::super::Storage::StorageFile) -> ::windows::core::Result> { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).StartRecordingToFileAsync)(::windows::core::Vtable::as_raw(this), file.into().abi(), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).StartRecordingToFileAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(file), result__.as_mut_ptr()).from_abi::>(result__) } } #[doc = "*Required features: `\"Foundation\"`, `\"Storage\"`*"] #[cfg(all(feature = "Foundation", feature = "Storage"))] - pub fn RecordTimeSpanToFileAsync<'a, P0>(&self, starttime: super::super::Foundation::DateTime, duration: super::super::Foundation::TimeSpan, file: P0) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Storage::StorageFile>>, - { + pub fn RecordTimeSpanToFileAsync(&self, starttime: super::super::Foundation::DateTime, duration: super::super::Foundation::TimeSpan, file: &super::super::Storage::StorageFile) -> ::windows::core::Result> { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).RecordTimeSpanToFileAsync)(::windows::core::Vtable::as_raw(this), starttime, duration, file.into().abi(), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).RecordTimeSpanToFileAsync)(::windows::core::Vtable::as_raw(this), starttime, duration, ::core::mem::transmute_copy(file), result__.as_mut_ptr()).from_abi::>(result__) } } #[doc = "*Required features: `\"Foundation_Collections\"`*"] @@ -194,16 +188,15 @@ impl AppRecordingManager { } #[doc = "*Required features: `\"Foundation_Collections\"`, `\"Storage\"`*"] #[cfg(all(feature = "Foundation_Collections", feature = "Storage"))] - pub fn SaveScreenshotToFilesAsync<'a, P0, P1, E1>(&self, folder: P0, filenameprefix: &::windows::core::HSTRING, option: AppRecordingSaveScreenshotOption, requestedformats: P1) -> ::windows::core::Result> + pub fn SaveScreenshotToFilesAsync<'a, P0, E0>(&self, folder: &super::super::Storage::StorageFolder, filenameprefix: &::windows::core::HSTRING, option: AppRecordingSaveScreenshotOption, requestedformats: P0) -> ::windows::core::Result> where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Storage::StorageFolder>>, - P1: ::std::convert::TryInto<::windows::core::InParam<'a, super::super::Foundation::Collections::IIterable<::windows::core::HSTRING>>, Error = E1>, - E1: ::std::convert::Into<::windows::core::Error>, + P0: ::std::convert::TryInto<::windows::core::InParam<'a, super::super::Foundation::Collections::IIterable<::windows::core::HSTRING>>, Error = E0>, + E0: ::std::convert::Into<::windows::core::Error>, { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).SaveScreenshotToFilesAsync)(::windows::core::Vtable::as_raw(this), folder.into().abi(), ::core::mem::transmute_copy(filenameprefix), option, requestedformats.try_into().map_err(|e| e.into())?.abi(), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).SaveScreenshotToFilesAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(folder), ::core::mem::transmute_copy(filenameprefix), option, requestedformats.try_into().map_err(|e| e.into())?.abi(), result__.as_mut_ptr()).from_abi::>(result__) } } pub fn GetDefault() -> ::windows::core::Result { diff --git a/crates/libs/windows/src/Windows/Media/Audio/mod.rs b/crates/libs/windows/src/Windows/Media/Audio/mod.rs index c126f6f77f..f24b3616a0 100644 --- a/crates/libs/windows/src/Windows/Media/Audio/mod.rs +++ b/crates/libs/windows/src/Windows/Media/Audio/mod.rs @@ -1358,12 +1358,9 @@ pub struct IAudioNodeListener_Vtbl { #[repr(transparent)] pub struct IAudioNodeWithListener(::windows::core::IUnknown); impl IAudioNodeWithListener { - pub fn SetListener<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, AudioNodeListener>>, - { + pub fn SetListener(&self, value: &AudioNodeListener) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).SetListener)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetListener)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } pub fn Listener(&self) -> ::windows::core::Result { let this = self; @@ -2643,12 +2640,9 @@ impl AudioDeviceOutputNode { let this = &::windows::core::Interface::cast::(self)?; unsafe { (::windows::core::Vtable::vtable(this).EnableEffectsByDefinition)(::windows::core::Vtable::as_raw(this), definition.try_into().map_err(|e| e.into())?.abi()).ok() } } - pub fn SetListener<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, AudioNodeListener>>, - { + pub fn SetListener(&self, value: &AudioNodeListener) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).SetListener)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetListener)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } pub fn Listener(&self) -> ::windows::core::Result { let this = &::windows::core::Interface::cast::(self)?; @@ -2895,14 +2889,11 @@ impl AudioFileInputNode { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn FileCompleted<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn FileCompleted(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).FileCompleted)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).FileCompleted)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -3479,12 +3470,9 @@ impl AudioFrameInputNode { (::windows::core::Vtable::vtable(this).PlaybackSpeedFactor)(::windows::core::Vtable::as_raw(this), result__.as_mut_ptr()).from_abi::(result__) } } - pub fn AddFrame<'a, P0>(&self, frame: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::AudioFrame>>, - { + pub fn AddFrame(&self, frame: &super::AudioFrame) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).AddFrame)(::windows::core::Vtable::as_raw(this), frame.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).AddFrame)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(frame)).ok() } } pub fn DiscardQueuedFrames(&self) -> ::windows::core::Result<()> { let this = self; @@ -3499,14 +3487,11 @@ impl AudioFrameInputNode { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn AudioFrameCompleted<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn AudioFrameCompleted(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).AudioFrameCompleted)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).AudioFrameCompleted)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -3517,14 +3502,11 @@ impl AudioFrameInputNode { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn QuantumStarted<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn QuantumStarted(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).QuantumStarted)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).QuantumStarted)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -4003,14 +3985,11 @@ impl AudioGraph { } #[doc = "*Required features: `\"Media_MediaProperties\"`*"] #[cfg(feature = "Media_MediaProperties")] - pub fn CreateFrameInputNodeWithFormat<'a, P0>(&self, encodingproperties: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::MediaProperties::AudioEncodingProperties>>, - { + pub fn CreateFrameInputNodeWithFormat(&self, encodingproperties: &super::MediaProperties::AudioEncodingProperties) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).CreateFrameInputNodeWithFormat)(::windows::core::Vtable::as_raw(this), encodingproperties.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).CreateFrameInputNodeWithFormat)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(encodingproperties), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`, `\"Media_Capture\"`*"] @@ -4024,27 +4003,20 @@ impl AudioGraph { } #[doc = "*Required features: `\"Foundation\"`, `\"Media_Capture\"`, `\"Media_MediaProperties\"`*"] #[cfg(all(feature = "Foundation", feature = "Media_Capture", feature = "Media_MediaProperties"))] - pub fn CreateDeviceInputNodeWithFormatAsync<'a, P0>(&self, category: super::Capture::MediaCategory, encodingproperties: P0) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::MediaProperties::AudioEncodingProperties>>, - { + pub fn CreateDeviceInputNodeWithFormatAsync(&self, category: super::Capture::MediaCategory, encodingproperties: &super::MediaProperties::AudioEncodingProperties) -> ::windows::core::Result> { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).CreateDeviceInputNodeWithFormatAsync)(::windows::core::Vtable::as_raw(this), category, encodingproperties.into().abi(), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).CreateDeviceInputNodeWithFormatAsync)(::windows::core::Vtable::as_raw(this), category, ::core::mem::transmute_copy(encodingproperties), result__.as_mut_ptr()).from_abi::>(result__) } } #[doc = "*Required features: `\"Devices_Enumeration\"`, `\"Foundation\"`, `\"Media_Capture\"`, `\"Media_MediaProperties\"`*"] #[cfg(all(feature = "Devices_Enumeration", feature = "Foundation", feature = "Media_Capture", feature = "Media_MediaProperties"))] - pub fn CreateDeviceInputNodeWithFormatOnDeviceAsync<'a, P0, P1>(&self, category: super::Capture::MediaCategory, encodingproperties: P0, device: P1) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::MediaProperties::AudioEncodingProperties>>, - P1: ::std::convert::Into<::windows::core::InParam<'a, super::super::Devices::Enumeration::DeviceInformation>>, - { + pub fn CreateDeviceInputNodeWithFormatOnDeviceAsync(&self, category: super::Capture::MediaCategory, encodingproperties: &super::MediaProperties::AudioEncodingProperties, device: &super::super::Devices::Enumeration::DeviceInformation) -> ::windows::core::Result> { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).CreateDeviceInputNodeWithFormatOnDeviceAsync)(::windows::core::Vtable::as_raw(this), category, encodingproperties.into().abi(), device.into().abi(), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).CreateDeviceInputNodeWithFormatOnDeviceAsync)(::windows::core::Vtable::as_raw(this), category, ::core::mem::transmute_copy(encodingproperties), ::core::mem::transmute_copy(device), result__.as_mut_ptr()).from_abi::>(result__) } } pub fn CreateFrameOutputNode(&self) -> ::windows::core::Result { @@ -4056,14 +4028,11 @@ impl AudioGraph { } #[doc = "*Required features: `\"Media_MediaProperties\"`*"] #[cfg(feature = "Media_MediaProperties")] - pub fn CreateFrameOutputNodeWithFormat<'a, P0>(&self, encodingproperties: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::MediaProperties::AudioEncodingProperties>>, - { + pub fn CreateFrameOutputNodeWithFormat(&self, encodingproperties: &super::MediaProperties::AudioEncodingProperties) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).CreateFrameOutputNodeWithFormat)(::windows::core::Vtable::as_raw(this), encodingproperties.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).CreateFrameOutputNodeWithFormat)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(encodingproperties), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -4103,16 +4072,15 @@ impl AudioGraph { } #[doc = "*Required features: `\"Foundation\"`, `\"Media_MediaProperties\"`, `\"Storage\"`*"] #[cfg(all(feature = "Foundation", feature = "Media_MediaProperties", feature = "Storage"))] - pub fn CreateFileOutputNodeWithFileProfileAsync<'a, P0, E0, P1>(&self, file: P0, fileencodingprofile: P1) -> ::windows::core::Result> + pub fn CreateFileOutputNodeWithFileProfileAsync<'a, P0, E0>(&self, file: P0, fileencodingprofile: &super::MediaProperties::MediaEncodingProfile) -> ::windows::core::Result> where P0: ::std::convert::TryInto<::windows::core::InParam<'a, super::super::Storage::IStorageFile>, Error = E0>, E0: ::std::convert::Into<::windows::core::Error>, - P1: ::std::convert::Into<::windows::core::InParam<'a, super::MediaProperties::MediaEncodingProfile>>, { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).CreateFileOutputNodeWithFileProfileAsync)(::windows::core::Vtable::as_raw(this), file.try_into().map_err(|e| e.into())?.abi(), fileencodingprofile.into().abi(), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).CreateFileOutputNodeWithFileProfileAsync)(::windows::core::Vtable::as_raw(this), file.try_into().map_err(|e| e.into())?.abi(), ::core::mem::transmute_copy(fileencodingprofile), result__.as_mut_ptr()).from_abi::>(result__) } } pub fn CreateSubmixNode(&self) -> ::windows::core::Result { @@ -4124,14 +4092,11 @@ impl AudioGraph { } #[doc = "*Required features: `\"Media_MediaProperties\"`*"] #[cfg(feature = "Media_MediaProperties")] - pub fn CreateSubmixNodeWithFormat<'a, P0>(&self, encodingproperties: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::MediaProperties::AudioEncodingProperties>>, - { + pub fn CreateSubmixNodeWithFormat(&self, encodingproperties: &super::MediaProperties::AudioEncodingProperties) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).CreateSubmixNodeWithFormat)(::windows::core::Vtable::as_raw(this), encodingproperties.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).CreateSubmixNodeWithFormat)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(encodingproperties), result__.as_mut_ptr()).from_abi::(result__) } } pub fn Start(&self) -> ::windows::core::Result<()> { @@ -4148,14 +4113,11 @@ impl AudioGraph { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn QuantumStarted<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn QuantumStarted(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).QuantumStarted)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).QuantumStarted)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -4166,14 +4128,11 @@ impl AudioGraph { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn QuantumProcessed<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn QuantumProcessed(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).QuantumProcessed)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).QuantumProcessed)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -4184,14 +4143,11 @@ impl AudioGraph { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn UnrecoverableErrorOccurred<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn UnrecoverableErrorOccurred(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).UnrecoverableErrorOccurred)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).UnrecoverableErrorOccurred)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -4248,56 +4204,42 @@ impl AudioGraph { } #[doc = "*Required features: `\"Media_MediaProperties\"`*"] #[cfg(feature = "Media_MediaProperties")] - pub fn CreateFrameInputNodeWithFormatAndEmitter<'a, P0, P1>(&self, encodingproperties: P0, emitter: P1) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::MediaProperties::AudioEncodingProperties>>, - P1: ::std::convert::Into<::windows::core::InParam<'a, AudioNodeEmitter>>, - { + pub fn CreateFrameInputNodeWithFormatAndEmitter(&self, encodingproperties: &super::MediaProperties::AudioEncodingProperties, emitter: &AudioNodeEmitter) -> ::windows::core::Result { let this = &::windows::core::Interface::cast::(self)?; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).CreateFrameInputNodeWithFormatAndEmitter)(::windows::core::Vtable::as_raw(this), encodingproperties.into().abi(), emitter.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).CreateFrameInputNodeWithFormatAndEmitter)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(encodingproperties), ::core::mem::transmute_copy(emitter), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Devices_Enumeration\"`, `\"Foundation\"`, `\"Media_Capture\"`, `\"Media_MediaProperties\"`*"] #[cfg(all(feature = "Devices_Enumeration", feature = "Foundation", feature = "Media_Capture", feature = "Media_MediaProperties"))] - pub fn CreateDeviceInputNodeWithFormatAndEmitterOnDeviceAsync<'a, P0, P1, P2>(&self, category: super::Capture::MediaCategory, encodingproperties: P0, device: P1, emitter: P2) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::MediaProperties::AudioEncodingProperties>>, - P1: ::std::convert::Into<::windows::core::InParam<'a, super::super::Devices::Enumeration::DeviceInformation>>, - P2: ::std::convert::Into<::windows::core::InParam<'a, AudioNodeEmitter>>, - { + pub fn CreateDeviceInputNodeWithFormatAndEmitterOnDeviceAsync(&self, category: super::Capture::MediaCategory, encodingproperties: &super::MediaProperties::AudioEncodingProperties, device: &super::super::Devices::Enumeration::DeviceInformation, emitter: &AudioNodeEmitter) -> ::windows::core::Result> { let this = &::windows::core::Interface::cast::(self)?; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).CreateDeviceInputNodeWithFormatAndEmitterOnDeviceAsync)(::windows::core::Vtable::as_raw(this), category, encodingproperties.into().abi(), device.into().abi(), emitter.into().abi(), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).CreateDeviceInputNodeWithFormatAndEmitterOnDeviceAsync)(::windows::core::Vtable::as_raw(this), category, ::core::mem::transmute_copy(encodingproperties), ::core::mem::transmute_copy(device), ::core::mem::transmute_copy(emitter), result__.as_mut_ptr()).from_abi::>(result__) } } #[doc = "*Required features: `\"Foundation\"`, `\"Storage\"`*"] #[cfg(all(feature = "Foundation", feature = "Storage"))] - pub fn CreateFileInputNodeWithEmitterAsync<'a, P0, E0, P1>(&self, file: P0, emitter: P1) -> ::windows::core::Result> + pub fn CreateFileInputNodeWithEmitterAsync<'a, P0, E0>(&self, file: P0, emitter: &AudioNodeEmitter) -> ::windows::core::Result> where P0: ::std::convert::TryInto<::windows::core::InParam<'a, super::super::Storage::IStorageFile>, Error = E0>, E0: ::std::convert::Into<::windows::core::Error>, - P1: ::std::convert::Into<::windows::core::InParam<'a, AudioNodeEmitter>>, { let this = &::windows::core::Interface::cast::(self)?; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).CreateFileInputNodeWithEmitterAsync)(::windows::core::Vtable::as_raw(this), file.try_into().map_err(|e| e.into())?.abi(), emitter.into().abi(), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).CreateFileInputNodeWithEmitterAsync)(::windows::core::Vtable::as_raw(this), file.try_into().map_err(|e| e.into())?.abi(), ::core::mem::transmute_copy(emitter), result__.as_mut_ptr()).from_abi::>(result__) } } #[doc = "*Required features: `\"Media_MediaProperties\"`*"] #[cfg(feature = "Media_MediaProperties")] - pub fn CreateSubmixNodeWithFormatAndEmitter<'a, P0, P1>(&self, encodingproperties: P0, emitter: P1) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::MediaProperties::AudioEncodingProperties>>, - P1: ::std::convert::Into<::windows::core::InParam<'a, AudioNodeEmitter>>, - { + pub fn CreateSubmixNodeWithFormatAndEmitter(&self, encodingproperties: &super::MediaProperties::AudioEncodingProperties, emitter: &AudioNodeEmitter) -> ::windows::core::Result { let this = &::windows::core::Interface::cast::(self)?; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).CreateSubmixNodeWithFormatAndEmitter)(::windows::core::Vtable::as_raw(this), encodingproperties.into().abi(), emitter.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).CreateSubmixNodeWithFormatAndEmitter)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(encodingproperties), ::core::mem::transmute_copy(emitter), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -4311,38 +4253,28 @@ impl AudioGraph { } #[doc = "*Required features: `\"Foundation\"`, `\"Media_Core\"`*"] #[cfg(all(feature = "Foundation", feature = "Media_Core"))] - pub fn CreateMediaSourceAudioInputNodeAsync<'a, P0>(&self, mediasource: P0) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::Core::MediaSource>>, - { + pub fn CreateMediaSourceAudioInputNodeAsync(&self, mediasource: &super::Core::MediaSource) -> ::windows::core::Result> { let this = &::windows::core::Interface::cast::(self)?; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).CreateMediaSourceAudioInputNodeAsync)(::windows::core::Vtable::as_raw(this), mediasource.into().abi(), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).CreateMediaSourceAudioInputNodeAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(mediasource), result__.as_mut_ptr()).from_abi::>(result__) } } #[doc = "*Required features: `\"Foundation\"`, `\"Media_Core\"`*"] #[cfg(all(feature = "Foundation", feature = "Media_Core"))] - pub fn CreateMediaSourceAudioInputNodeWithEmitterAsync<'a, P0, P1>(&self, mediasource: P0, emitter: P1) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::Core::MediaSource>>, - P1: ::std::convert::Into<::windows::core::InParam<'a, AudioNodeEmitter>>, - { + pub fn CreateMediaSourceAudioInputNodeWithEmitterAsync(&self, mediasource: &super::Core::MediaSource, emitter: &AudioNodeEmitter) -> ::windows::core::Result> { let this = &::windows::core::Interface::cast::(self)?; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).CreateMediaSourceAudioInputNodeWithEmitterAsync)(::windows::core::Vtable::as_raw(this), mediasource.into().abi(), emitter.into().abi(), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).CreateMediaSourceAudioInputNodeWithEmitterAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(mediasource), ::core::mem::transmute_copy(emitter), result__.as_mut_ptr()).from_abi::>(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn CreateAsync<'a, P0>(settings: P0) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, AudioGraphSettings>>, - { + pub fn CreateAsync(settings: &AudioGraphSettings) -> ::windows::core::Result> { Self::IAudioGraphStatics(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).CreateAsync)(::windows::core::Vtable::as_raw(this), settings.into().abi(), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).CreateAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(settings), result__.as_mut_ptr()).from_abi::>(result__) }) } #[doc = "*Required features: `\"Foundation\"`*"] @@ -4660,12 +4592,9 @@ impl AudioGraphSettings { } #[doc = "*Required features: `\"Media_MediaProperties\"`*"] #[cfg(feature = "Media_MediaProperties")] - pub fn SetEncodingProperties<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::MediaProperties::AudioEncodingProperties>>, - { + pub fn SetEncodingProperties(&self, value: &super::MediaProperties::AudioEncodingProperties) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).SetEncodingProperties)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetEncodingProperties)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } #[doc = "*Required features: `\"Devices_Enumeration\"`*"] #[cfg(feature = "Devices_Enumeration")] @@ -4678,12 +4607,9 @@ impl AudioGraphSettings { } #[doc = "*Required features: `\"Devices_Enumeration\"`*"] #[cfg(feature = "Devices_Enumeration")] - pub fn SetPrimaryRenderDevice<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Devices::Enumeration::DeviceInformation>>, - { + pub fn SetPrimaryRenderDevice(&self, value: &super::super::Devices::Enumeration::DeviceInformation) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).SetPrimaryRenderDevice)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetPrimaryRenderDevice)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } pub fn QuantumSizeSelectionMode(&self) -> ::windows::core::Result { let this = self; @@ -5019,14 +4945,10 @@ impl AudioNodeEmitter { let this = &::windows::core::Interface::cast::(self)?; unsafe { (::windows::core::Vtable::vtable(this).SetSpatialAudioModel)(::windows::core::Vtable::as_raw(this), value).ok() } } - pub fn CreateAudioNodeEmitter<'a, P0, P1>(shape: P0, decaymodel: P1, settings: AudioNodeEmitterSettings) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, AudioNodeEmitterShape>>, - P1: ::std::convert::Into<::windows::core::InParam<'a, AudioNodeEmitterDecayModel>>, - { + pub fn CreateAudioNodeEmitter(shape: &AudioNodeEmitterShape, decaymodel: &AudioNodeEmitterDecayModel, settings: AudioNodeEmitterSettings) -> ::windows::core::Result { Self::IAudioNodeEmitterFactory(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).CreateAudioNodeEmitter)(::windows::core::Vtable::as_raw(this), shape.into().abi(), decaymodel.into().abi(), settings, result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).CreateAudioNodeEmitter)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(shape), ::core::mem::transmute_copy(decaymodel), settings, result__.as_mut_ptr()).from_abi::(result__) }) } #[doc(hidden)] @@ -5667,14 +5589,11 @@ impl AudioPlaybackConnection { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn StateChanged<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn StateChanged(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).StateChanged)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).StateChanged)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -5882,14 +5801,11 @@ pub struct AudioStateMonitor(::windows::core::IUnknown); impl AudioStateMonitor { #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn SoundLevelChanged<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn SoundLevelChanged(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).SoundLevelChanged)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).SoundLevelChanged)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -6896,13 +6812,10 @@ impl EchoEffectDefinition { (::windows::core::Vtable::vtable(this).Delay)(::windows::core::Vtable::as_raw(this), result__.as_mut_ptr()).from_abi::(result__) } } - pub fn Create<'a, P0>(audiograph: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, AudioGraph>>, - { + pub fn Create(audiograph: &AudioGraph) -> ::windows::core::Result { Self::IEchoEffectDefinitionFactory(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).Create)(::windows::core::Vtable::as_raw(this), audiograph.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).Create)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(audiograph), result__.as_mut_ptr()).from_abi::(result__) }) } #[doc(hidden)] @@ -7130,13 +7043,10 @@ impl EqualizerEffectDefinition { (::windows::core::Vtable::vtable(this).Bands)(::windows::core::Vtable::as_raw(this), result__.as_mut_ptr()).from_abi::>(result__) } } - pub fn Create<'a, P0>(audiograph: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, AudioGraph>>, - { + pub fn Create(audiograph: &AudioGraph) -> ::windows::core::Result { Self::IEqualizerEffectDefinitionFactory(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).Create)(::windows::core::Vtable::as_raw(this), audiograph.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).Create)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(audiograph), result__.as_mut_ptr()).from_abi::(result__) }) } #[doc(hidden)] @@ -7351,13 +7261,10 @@ impl LimiterEffectDefinition { (::windows::core::Vtable::vtable(this).Loudness)(::windows::core::Vtable::as_raw(this), result__.as_mut_ptr()).from_abi::(result__) } } - pub fn Create<'a, P0>(audiograph: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, AudioGraph>>, - { + pub fn Create(audiograph: &AudioGraph) -> ::windows::core::Result { Self::ILimiterEffectDefinitionFactory(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).Create)(::windows::core::Vtable::as_raw(this), audiograph.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).Create)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(audiograph), result__.as_mut_ptr()).from_abi::(result__) }) } #[doc(hidden)] @@ -7677,14 +7584,11 @@ impl MediaSourceAudioInputNode { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn MediaSourceCompleted<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn MediaSourceCompleted(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).MediaSourceCompleted)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).MediaSourceCompleted)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -8112,13 +8016,10 @@ impl ReverbEffectDefinition { (::windows::core::Vtable::vtable(this).DisableLateField)(::windows::core::Vtable::as_raw(this), result__.as_mut_ptr()).from_abi::(result__) } } - pub fn Create<'a, P0>(audiograph: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, AudioGraph>>, - { + pub fn Create(audiograph: &AudioGraph) -> ::windows::core::Result { Self::IReverbEffectDefinitionFactory(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).Create)(::windows::core::Vtable::as_raw(this), audiograph.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).Create)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(audiograph), result__.as_mut_ptr()).from_abi::(result__) }) } #[doc(hidden)] @@ -8339,14 +8240,11 @@ impl SpatialAudioDeviceConfiguration { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn ConfigurationChanged<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn ConfigurationChanged(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).ConfigurationChanged)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).ConfigurationChanged)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] diff --git a/crates/libs/windows/src/Windows/Media/Capture/Core/mod.rs b/crates/libs/windows/src/Windows/Media/Capture/Core/mod.rs index 51afb1d900..2540aa419a 100644 --- a/crates/libs/windows/src/Windows/Media/Capture/Core/mod.rs +++ b/crates/libs/windows/src/Windows/Media/Capture/Core/mod.rs @@ -216,14 +216,11 @@ impl VariablePhotoSequenceCapture { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn PhotoCaptured<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Foundation::TypedEventHandler>>, - { + pub fn PhotoCaptured(&self, handler: &super::super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).PhotoCaptured)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).PhotoCaptured)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -234,14 +231,11 @@ impl VariablePhotoSequenceCapture { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn Stopped<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Foundation::TypedEventHandler>>, - { + pub fn Stopped(&self, handler: &super::super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).Stopped)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).Stopped)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] diff --git a/crates/libs/windows/src/Windows/Media/Capture/Frames/mod.rs b/crates/libs/windows/src/Windows/Media/Capture/Frames/mod.rs index a50660c2c2..e9a057e555 100644 --- a/crates/libs/windows/src/Windows/Media/Capture/Frames/mod.rs +++ b/crates/libs/windows/src/Windows/Media/Capture/Frames/mod.rs @@ -818,15 +818,11 @@ impl DepthMediaFrame { } #[doc = "*Required features: `\"Media_Devices_Core\"`, `\"Perception_Spatial\"`*"] #[cfg(all(feature = "Media_Devices_Core", feature = "Perception_Spatial"))] - pub fn TryCreateCoordinateMapper<'a, P0, P1>(&self, cameraintrinsics: P0, coordinatesystem: P1) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Devices::Core::CameraIntrinsics>>, - P1: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Perception::Spatial::SpatialCoordinateSystem>>, - { + pub fn TryCreateCoordinateMapper(&self, cameraintrinsics: &super::super::Devices::Core::CameraIntrinsics, coordinatesystem: &super::super::super::Perception::Spatial::SpatialCoordinateSystem) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).TryCreateCoordinateMapper)(::windows::core::Vtable::as_raw(this), cameraintrinsics.into().abi(), coordinatesystem.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).TryCreateCoordinateMapper)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(cameraintrinsics), ::core::mem::transmute_copy(coordinatesystem), result__.as_mut_ptr()).from_abi::(result__) } } pub fn MaxReliableDepth(&self) -> ::windows::core::Result { @@ -1278,14 +1274,11 @@ impl MediaFrameReader { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn FrameArrived<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Foundation::TypedEventHandler>>, - { + pub fn FrameArrived(&self, handler: &super::super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).FrameArrived)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).FrameArrived)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -1621,26 +1614,20 @@ impl MediaFrameSource { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn SetFormatAsync<'a, P0>(&self, format: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, MediaFrameFormat>>, - { + pub fn SetFormatAsync(&self, format: &MediaFrameFormat) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).SetFormatAsync)(::windows::core::Vtable::as_raw(this), format.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).SetFormatAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(format), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn FormatChanged<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Foundation::TypedEventHandler>>, - { + pub fn FormatChanged(&self, handler: &super::super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).FormatChanged)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).FormatChanged)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -1651,14 +1638,11 @@ impl MediaFrameSource { } #[doc = "*Required features: `\"Media_Devices_Core\"`*"] #[cfg(feature = "Media_Devices_Core")] - pub fn TryGetCameraIntrinsics<'a, P0>(&self, format: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, MediaFrameFormat>>, - { + pub fn TryGetCameraIntrinsics(&self, format: &MediaFrameFormat) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).TryGetCameraIntrinsics)(::windows::core::Vtable::as_raw(this), format.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).TryGetCameraIntrinsics)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(format), result__.as_mut_ptr()).from_abi::(result__) } } } @@ -2135,14 +2119,11 @@ impl MediaFrameSourceInfo { } #[doc = "*Required features: `\"Devices_Enumeration\"`, `\"UI_WindowManagement\"`*"] #[cfg(all(feature = "Devices_Enumeration", feature = "UI_WindowManagement"))] - pub fn GetRelativePanel<'a, P0>(&self, displayregion: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::UI::WindowManagement::DisplayRegion>>, - { + pub fn GetRelativePanel(&self, displayregion: &super::super::super::UI::WindowManagement::DisplayRegion) -> ::windows::core::Result { let this = &::windows::core::Interface::cast::(self)?; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).GetRelativePanel)(::windows::core::Vtable::as_raw(this), displayregion.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).GetRelativePanel)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(displayregion), result__.as_mut_ptr()).from_abi::(result__) } } } @@ -2290,14 +2271,11 @@ impl MultiSourceMediaFrameReader { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn FrameArrived<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Foundation::TypedEventHandler>>, - { + pub fn FrameArrived(&self, handler: &super::super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).FrameArrived)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).FrameArrived)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] diff --git a/crates/libs/windows/src/Windows/Media/Capture/mod.rs b/crates/libs/windows/src/Windows/Media/Capture/mod.rs index d7b1dada85..35c18f92f1 100644 --- a/crates/libs/windows/src/Windows/Media/Capture/mod.rs +++ b/crates/libs/windows/src/Windows/Media/Capture/mod.rs @@ -3123,14 +3123,11 @@ impl AdvancedPhotoCapture { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn OptionalReferencePhotoCaptured<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn OptionalReferencePhotoCaptured(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).OptionalReferencePhotoCaptured)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).OptionalReferencePhotoCaptured)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -3141,14 +3138,11 @@ impl AdvancedPhotoCapture { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn AllPhotosCaptured<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn AllPhotosCaptured(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).AllPhotosCaptured)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).AllPhotosCaptured)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -3246,12 +3240,9 @@ impl AppBroadcastBackgroundService { (::windows::core::Vtable::vtable(this).PlugInState)(::windows::core::Vtable::as_raw(this), result__.as_mut_ptr()).from_abi::(result__) } } - pub fn SetSignInInfo<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, AppBroadcastBackgroundServiceSignInInfo>>, - { + pub fn SetSignInInfo(&self, value: &AppBroadcastBackgroundServiceSignInInfo) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).SetSignInInfo)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetSignInInfo)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } pub fn SignInInfo(&self) -> ::windows::core::Result { let this = self; @@ -3260,12 +3251,9 @@ impl AppBroadcastBackgroundService { (::windows::core::Vtable::vtable(this).SignInInfo)(::windows::core::Vtable::as_raw(this), result__.as_mut_ptr()).from_abi::(result__) } } - pub fn SetStreamInfo<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, AppBroadcastBackgroundServiceStreamInfo>>, - { + pub fn SetStreamInfo(&self, value: &AppBroadcastBackgroundServiceStreamInfo) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).SetStreamInfo)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetStreamInfo)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } pub fn StreamInfo(&self) -> ::windows::core::Result { let this = self; @@ -3305,14 +3293,11 @@ impl AppBroadcastBackgroundService { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn HeartbeatRequested<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn HeartbeatRequested(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).HeartbeatRequested)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).HeartbeatRequested)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -3356,14 +3341,11 @@ impl AppBroadcastBackgroundService { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn BroadcastTitleChanged<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn BroadcastTitleChanged(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = &::windows::core::Interface::cast::(self)?; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).BroadcastTitleChanged)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).BroadcastTitleChanged)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -3374,14 +3356,11 @@ impl AppBroadcastBackgroundService { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn BroadcastLanguageChanged<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn BroadcastLanguageChanged(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = &::windows::core::Interface::cast::(self)?; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).BroadcastLanguageChanged)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).BroadcastLanguageChanged)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -3392,14 +3371,11 @@ impl AppBroadcastBackgroundService { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn BroadcastChannelChanged<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn BroadcastChannelChanged(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = &::windows::core::Interface::cast::(self)?; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).BroadcastChannelChanged)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).BroadcastChannelChanged)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -3484,12 +3460,9 @@ impl AppBroadcastBackgroundServiceSignInInfo { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn SetOAuthRequestUri<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::Uri>>, - { + pub fn SetOAuthRequestUri(&self, value: &super::super::Foundation::Uri) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).SetOAuthRequestUri)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetOAuthRequestUri)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] @@ -3502,12 +3475,9 @@ impl AppBroadcastBackgroundServiceSignInInfo { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn SetOAuthCallbackUri<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::Uri>>, - { + pub fn SetOAuthCallbackUri(&self, value: &super::super::Foundation::Uri) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).SetOAuthCallbackUri)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetOAuthCallbackUri)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] @@ -3540,14 +3510,11 @@ impl AppBroadcastBackgroundServiceSignInInfo { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn SignInStateChanged<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn SignInStateChanged(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).SignInStateChanged)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).SignInStateChanged)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -3558,14 +3525,11 @@ impl AppBroadcastBackgroundServiceSignInInfo { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn UserNameChanged<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn UserNameChanged(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = &::windows::core::Interface::cast::(self)?; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).UserNameChanged)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).UserNameChanged)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -3690,14 +3654,11 @@ impl AppBroadcastBackgroundServiceStreamInfo { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn StreamStateChanged<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn StreamStateChanged(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).StreamStateChanged)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).StreamStateChanged)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -3708,14 +3669,11 @@ impl AppBroadcastBackgroundServiceStreamInfo { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn VideoEncodingResolutionChanged<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn VideoEncodingResolutionChanged(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).VideoEncodingResolutionChanged)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).VideoEncodingResolutionChanged)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -3726,14 +3684,11 @@ impl AppBroadcastBackgroundServiceStreamInfo { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn VideoEncodingBitrateChanged<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn VideoEncodingBitrateChanged(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).VideoEncodingBitrateChanged)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).VideoEncodingBitrateChanged)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -4184,11 +4139,8 @@ impl AppBroadcastManager { (::windows::core::Vtable::vtable(this).GetGlobalSettings)(::windows::core::Vtable::as_raw(this), result__.as_mut_ptr()).from_abi::(result__) }) } - pub fn ApplyGlobalSettings<'a, P0>(value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, AppBroadcastGlobalSettings>>, - { - Self::IAppBroadcastManagerStatics(|this| unsafe { (::windows::core::Vtable::vtable(this).ApplyGlobalSettings)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() }) + pub fn ApplyGlobalSettings(value: &AppBroadcastGlobalSettings) -> ::windows::core::Result<()> { + Self::IAppBroadcastManagerStatics(|this| unsafe { (::windows::core::Vtable::vtable(this).ApplyGlobalSettings)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() }) } pub fn GetProviderSettings() -> ::windows::core::Result { Self::IAppBroadcastManagerStatics(|this| unsafe { @@ -4196,11 +4148,8 @@ impl AppBroadcastManager { (::windows::core::Vtable::vtable(this).GetProviderSettings)(::windows::core::Vtable::as_raw(this), result__.as_mut_ptr()).from_abi::(result__) }) } - pub fn ApplyProviderSettings<'a, P0>(value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, AppBroadcastProviderSettings>>, - { - Self::IAppBroadcastManagerStatics(|this| unsafe { (::windows::core::Vtable::vtable(this).ApplyProviderSettings)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() }) + pub fn ApplyProviderSettings(value: &AppBroadcastProviderSettings) -> ::windows::core::Result<()> { + Self::IAppBroadcastManagerStatics(|this| unsafe { (::windows::core::Vtable::vtable(this).ApplyProviderSettings)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() }) } #[doc(hidden)] pub fn IAppBroadcastManagerStatics ::windows::core::Result>(callback: F) -> ::windows::core::Result { @@ -4420,12 +4369,9 @@ impl AppBroadcastPlugInManager { (::windows::core::Vtable::vtable(this).DefaultPlugIn)(::windows::core::Vtable::as_raw(this), result__.as_mut_ptr()).from_abi::(result__) } } - pub fn SetDefaultPlugIn<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, AppBroadcastPlugIn>>, - { + pub fn SetDefaultPlugIn(&self, value: &AppBroadcastPlugIn) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).SetDefaultPlugIn)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetDefaultPlugIn)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } pub fn GetDefault() -> ::windows::core::Result { Self::IAppBroadcastPlugInManagerStatics(|this| unsafe { @@ -4435,13 +4381,10 @@ impl AppBroadcastPlugInManager { } #[doc = "*Required features: `\"System\"`*"] #[cfg(feature = "System")] - pub fn GetForUser<'a, P0>(user: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::System::User>>, - { + pub fn GetForUser(user: &super::super::System::User) -> ::windows::core::Result { Self::IAppBroadcastPlugInManagerStatics(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).GetForUser)(::windows::core::Vtable::as_raw(this), user.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).GetForUser)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(user), result__.as_mut_ptr()).from_abi::(result__) }) } #[doc(hidden)] @@ -4616,14 +4559,11 @@ impl AppBroadcastPreview { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn PreviewStateChanged<'a, P0>(&self, value: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn PreviewStateChanged(&self, value: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).PreviewStateChanged)(::windows::core::Vtable::as_raw(this), value.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).PreviewStateChanged)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -4839,14 +4779,11 @@ impl AppBroadcastPreviewStreamReader { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn VideoFrameArrived<'a, P0>(&self, value: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn VideoFrameArrived(&self, value: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).VideoFrameArrived)(::windows::core::Vtable::as_raw(this), value.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).VideoFrameArrived)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -5305,14 +5242,11 @@ impl AppBroadcastServices { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn EnterBroadcastModeAsync<'a, P0>(&self, plugin: P0) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, AppBroadcastPlugIn>>, - { + pub fn EnterBroadcastModeAsync(&self, plugin: &AppBroadcastPlugIn) -> ::windows::core::Result> { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).EnterBroadcastModeAsync)(::windows::core::Vtable::as_raw(this), plugin.into().abi(), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).EnterBroadcastModeAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(plugin), result__.as_mut_ptr()).from_abi::>(result__) } } pub fn ExitBroadcastMode(&self, reason: AppBroadcastExitBroadcastModeReason) -> ::windows::core::Result<()> { @@ -5621,12 +5555,9 @@ impl AppBroadcastState { } #[doc = "*Required features: `\"Security_Authentication_Web\"`*"] #[cfg(feature = "Security_Authentication_Web")] - pub fn SetAuthenticationResult<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Security::Authentication::Web::WebAuthenticationResult>>, - { + pub fn SetAuthenticationResult(&self, value: &super::super::Security::Authentication::Web::WebAuthenticationResult) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).SetAuthenticationResult)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetAuthenticationResult)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } pub fn SetSignInState(&self, value: AppBroadcastSignInState) -> ::windows::core::Result<()> { let this = self; @@ -5655,14 +5586,11 @@ impl AppBroadcastState { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn ViewerCountChanged<'a, P0>(&self, value: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn ViewerCountChanged(&self, value: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).ViewerCountChanged)(::windows::core::Vtable::as_raw(this), value.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).ViewerCountChanged)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -5673,14 +5601,11 @@ impl AppBroadcastState { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn MicrophoneCaptureStateChanged<'a, P0>(&self, value: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn MicrophoneCaptureStateChanged(&self, value: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).MicrophoneCaptureStateChanged)(::windows::core::Vtable::as_raw(this), value.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).MicrophoneCaptureStateChanged)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -5691,14 +5616,11 @@ impl AppBroadcastState { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn CameraCaptureStateChanged<'a, P0>(&self, value: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn CameraCaptureStateChanged(&self, value: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).CameraCaptureStateChanged)(::windows::core::Vtable::as_raw(this), value.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).CameraCaptureStateChanged)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -5709,14 +5631,11 @@ impl AppBroadcastState { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn PlugInStateChanged<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn PlugInStateChanged(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).PlugInStateChanged)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).PlugInStateChanged)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -5727,14 +5646,11 @@ impl AppBroadcastState { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn StreamStateChanged<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn StreamStateChanged(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).StreamStateChanged)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).StreamStateChanged)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -5745,14 +5661,11 @@ impl AppBroadcastState { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn CaptureTargetClosed<'a, P0>(&self, value: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn CaptureTargetClosed(&self, value: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).CaptureTargetClosed)(::windows::core::Vtable::as_raw(this), value.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).CaptureTargetClosed)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -6088,14 +6001,11 @@ impl AppBroadcastStreamReader { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn AudioFrameArrived<'a, P0>(&self, value: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn AudioFrameArrived(&self, value: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).AudioFrameArrived)(::windows::core::Vtable::as_raw(this), value.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).AudioFrameArrived)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -6106,14 +6016,11 @@ impl AppBroadcastStreamReader { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn VideoFrameArrived<'a, P0>(&self, value: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn VideoFrameArrived(&self, value: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).VideoFrameArrived)(::windows::core::Vtable::as_raw(this), value.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).VideoFrameArrived)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -6627,14 +6534,11 @@ impl AppCapture { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn CapturingChanged<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn CapturingChanged(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).CapturingChanged)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).CapturingChanged)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -7202,11 +7106,8 @@ impl AppCaptureManager { (::windows::core::Vtable::vtable(this).GetCurrentSettings)(::windows::core::Vtable::as_raw(this), result__.as_mut_ptr()).from_abi::(result__) }) } - pub fn ApplySettings<'a, P0>(appcapturesettings: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, AppCaptureSettings>>, - { - Self::IAppCaptureManagerStatics(|this| unsafe { (::windows::core::Vtable::vtable(this).ApplySettings)(::windows::core::Vtable::as_raw(this), appcapturesettings.into().abi()).ok() }) + pub fn ApplySettings(appcapturesettings: &AppCaptureSettings) -> ::windows::core::Result<()> { + Self::IAppCaptureManagerStatics(|this| unsafe { (::windows::core::Vtable::vtable(this).ApplySettings)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(appcapturesettings)).ok() }) } #[doc(hidden)] pub fn IAppCaptureManagerStatics ::windows::core::Result>(callback: F) -> ::windows::core::Result { @@ -7269,14 +7170,11 @@ impl AppCaptureMetadataWriter { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn MetadataPurged<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn MetadataPurged(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).MetadataPurged)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).MetadataPurged)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -7514,14 +7412,11 @@ impl AppCaptureRecordOperation { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn StateChanged<'a, P0>(&self, value: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn StateChanged(&self, value: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).StateChanged)(::windows::core::Vtable::as_raw(this), value.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).StateChanged)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -7532,14 +7427,11 @@ impl AppCaptureRecordOperation { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn DurationGenerated<'a, P0>(&self, value: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn DurationGenerated(&self, value: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).DurationGenerated)(::windows::core::Vtable::as_raw(this), value.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).DurationGenerated)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -7550,14 +7442,11 @@ impl AppCaptureRecordOperation { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn FileGenerated<'a, P0>(&self, value: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn FileGenerated(&self, value: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).FileGenerated)(::windows::core::Vtable::as_raw(this), value.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).FileGenerated)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -7819,12 +7708,9 @@ pub struct AppCaptureSettings(::windows::core::IUnknown); impl AppCaptureSettings { #[doc = "*Required features: `\"Storage\"`*"] #[cfg(feature = "Storage")] - pub fn SetAppCaptureDestinationFolder<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Storage::StorageFolder>>, - { + pub fn SetAppCaptureDestinationFolder(&self, value: &super::super::Storage::StorageFolder) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).SetAppCaptureDestinationFolder)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetAppCaptureDestinationFolder)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } #[doc = "*Required features: `\"Storage\"`*"] #[cfg(feature = "Storage")] @@ -7962,12 +7848,9 @@ impl AppCaptureSettings { } #[doc = "*Required features: `\"Storage\"`*"] #[cfg(feature = "Storage")] - pub fn SetScreenshotDestinationFolder<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Storage::StorageFolder>>, - { + pub fn SetScreenshotDestinationFolder(&self, value: &super::super::Storage::StorageFolder) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).SetScreenshotDestinationFolder)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetScreenshotDestinationFolder)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } #[doc = "*Required features: `\"Storage\"`*"] #[cfg(feature = "Storage")] @@ -8242,14 +8125,11 @@ impl AppCaptureState { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn MicrophoneCaptureStateChanged<'a, P0>(&self, value: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn MicrophoneCaptureStateChanged(&self, value: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).MicrophoneCaptureStateChanged)(::windows::core::Vtable::as_raw(this), value.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).MicrophoneCaptureStateChanged)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -8260,14 +8140,11 @@ impl AppCaptureState { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn CaptureTargetClosed<'a, P0>(&self, value: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn CaptureTargetClosed(&self, value: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).CaptureTargetClosed)(::windows::core::Vtable::as_raw(this), value.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).CaptureTargetClosed)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -8686,11 +8563,8 @@ unsafe impl ::core::marker::Sync for CameraCaptureUIVideoCaptureSettings {} #[doc = "*Required features: `\"Media_Capture\"`*"] pub struct CameraOptionsUI; impl CameraOptionsUI { - pub fn Show<'a, P0>(mediacapture: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, MediaCapture>>, - { - Self::ICameraOptionsUIStatics(|this| unsafe { (::windows::core::Vtable::vtable(this).Show)(::windows::core::Vtable::as_raw(this), mediacapture.into().abi()).ok() }) + pub fn Show(mediacapture: &MediaCapture) -> ::windows::core::Result<()> { + Self::ICameraOptionsUIStatics(|this| unsafe { (::windows::core::Vtable::vtable(this).Show)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(mediacapture)).ok() }) } #[doc(hidden)] pub fn ICameraOptionsUIStatics ::windows::core::Result>(callback: F) -> ::windows::core::Result { @@ -9393,14 +9267,11 @@ impl GameBarServices { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn CommandReceived<'a, P0>(&self, value: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn CommandReceived(&self, value: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).CommandReceived)(::windows::core::Vtable::as_raw(this), value.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).CommandReceived)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -9563,14 +9434,11 @@ pub struct GameBarServicesManager(::windows::core::IUnknown); impl GameBarServicesManager { #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn GameBarServicesCreated<'a, P0>(&self, value: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn GameBarServicesCreated(&self, value: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).GameBarServicesCreated)(::windows::core::Vtable::as_raw(this), value.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).GameBarServicesCreated)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -10076,14 +9944,11 @@ impl LowLagPhotoSequenceCapture { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn PhotoCaptured<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn PhotoCaptured(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).PhotoCaptured)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).PhotoCaptured)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -10183,70 +10048,63 @@ impl MediaCapture { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn InitializeWithSettingsAsync<'a, P0>(&self, mediacaptureinitializationsettings: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, MediaCaptureInitializationSettings>>, - { + pub fn InitializeWithSettingsAsync(&self, mediacaptureinitializationsettings: &MediaCaptureInitializationSettings) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).InitializeWithSettingsAsync)(::windows::core::Vtable::as_raw(this), mediacaptureinitializationsettings.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).InitializeWithSettingsAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(mediacaptureinitializationsettings), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`, `\"Media_MediaProperties\"`, `\"Storage\"`*"] #[cfg(all(feature = "Foundation", feature = "Media_MediaProperties", feature = "Storage"))] - pub fn StartRecordToStorageFileAsync<'a, P0, P1, E1>(&self, encodingprofile: P0, file: P1) -> ::windows::core::Result + pub fn StartRecordToStorageFileAsync<'a, P0, E0>(&self, encodingprofile: &super::MediaProperties::MediaEncodingProfile, file: P0) -> ::windows::core::Result where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::MediaProperties::MediaEncodingProfile>>, - P1: ::std::convert::TryInto<::windows::core::InParam<'a, super::super::Storage::IStorageFile>, Error = E1>, - E1: ::std::convert::Into<::windows::core::Error>, + P0: ::std::convert::TryInto<::windows::core::InParam<'a, super::super::Storage::IStorageFile>, Error = E0>, + E0: ::std::convert::Into<::windows::core::Error>, { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).StartRecordToStorageFileAsync)(::windows::core::Vtable::as_raw(this), encodingprofile.into().abi(), file.try_into().map_err(|e| e.into())?.abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).StartRecordToStorageFileAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(encodingprofile), file.try_into().map_err(|e| e.into())?.abi(), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`, `\"Media_MediaProperties\"`, `\"Storage_Streams\"`*"] #[cfg(all(feature = "Foundation", feature = "Media_MediaProperties", feature = "Storage_Streams"))] - pub fn StartRecordToStreamAsync<'a, P0, P1, E1>(&self, encodingprofile: P0, stream: P1) -> ::windows::core::Result + pub fn StartRecordToStreamAsync<'a, P0, E0>(&self, encodingprofile: &super::MediaProperties::MediaEncodingProfile, stream: P0) -> ::windows::core::Result where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::MediaProperties::MediaEncodingProfile>>, - P1: ::std::convert::TryInto<::windows::core::InParam<'a, super::super::Storage::Streams::IRandomAccessStream>, Error = E1>, - E1: ::std::convert::Into<::windows::core::Error>, + P0: ::std::convert::TryInto<::windows::core::InParam<'a, super::super::Storage::Streams::IRandomAccessStream>, Error = E0>, + E0: ::std::convert::Into<::windows::core::Error>, { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).StartRecordToStreamAsync)(::windows::core::Vtable::as_raw(this), encodingprofile.into().abi(), stream.try_into().map_err(|e| e.into())?.abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).StartRecordToStreamAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(encodingprofile), stream.try_into().map_err(|e| e.into())?.abi(), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`, `\"Media_MediaProperties\"`*"] #[cfg(all(feature = "Foundation", feature = "Media_MediaProperties"))] - pub fn StartRecordToCustomSinkAsync<'a, P0, P1, E1>(&self, encodingprofile: P0, custommediasink: P1) -> ::windows::core::Result + pub fn StartRecordToCustomSinkAsync<'a, P0, E0>(&self, encodingprofile: &super::MediaProperties::MediaEncodingProfile, custommediasink: P0) -> ::windows::core::Result where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::MediaProperties::MediaEncodingProfile>>, - P1: ::std::convert::TryInto<::windows::core::InParam<'a, super::IMediaExtension>, Error = E1>, - E1: ::std::convert::Into<::windows::core::Error>, + P0: ::std::convert::TryInto<::windows::core::InParam<'a, super::IMediaExtension>, Error = E0>, + E0: ::std::convert::Into<::windows::core::Error>, { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).StartRecordToCustomSinkAsync)(::windows::core::Vtable::as_raw(this), encodingprofile.into().abi(), custommediasink.try_into().map_err(|e| e.into())?.abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).StartRecordToCustomSinkAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(encodingprofile), custommediasink.try_into().map_err(|e| e.into())?.abi(), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation_Collections\"`, `\"Media_MediaProperties\"`*"] #[cfg(all(feature = "Foundation_Collections", feature = "Media_MediaProperties"))] - pub fn StartRecordToCustomSinkIdAsync<'a, P0, P1, E1>(&self, encodingprofile: P0, customsinkactivationid: &::windows::core::HSTRING, customsinksettings: P1) -> ::windows::core::Result + pub fn StartRecordToCustomSinkIdAsync<'a, P0, E0>(&self, encodingprofile: &super::MediaProperties::MediaEncodingProfile, customsinkactivationid: &::windows::core::HSTRING, customsinksettings: P0) -> ::windows::core::Result where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::MediaProperties::MediaEncodingProfile>>, - P1: ::std::convert::TryInto<::windows::core::InParam<'a, super::super::Foundation::Collections::IPropertySet>, Error = E1>, - E1: ::std::convert::Into<::windows::core::Error>, + P0: ::std::convert::TryInto<::windows::core::InParam<'a, super::super::Foundation::Collections::IPropertySet>, Error = E0>, + E0: ::std::convert::Into<::windows::core::Error>, { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).StartRecordToCustomSinkIdAsync)(::windows::core::Vtable::as_raw(this), encodingprofile.into().abi(), ::core::mem::transmute_copy(customsinkactivationid), customsinksettings.try_into().map_err(|e| e.into())?.abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).StartRecordToCustomSinkIdAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(encodingprofile), ::core::mem::transmute_copy(customsinkactivationid), customsinksettings.try_into().map_err(|e| e.into())?.abi(), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -10260,30 +10118,28 @@ impl MediaCapture { } #[doc = "*Required features: `\"Foundation\"`, `\"Media_MediaProperties\"`, `\"Storage\"`*"] #[cfg(all(feature = "Foundation", feature = "Media_MediaProperties", feature = "Storage"))] - pub fn CapturePhotoToStorageFileAsync<'a, P0, P1, E1>(&self, r#type: P0, file: P1) -> ::windows::core::Result + pub fn CapturePhotoToStorageFileAsync<'a, P0, E0>(&self, r#type: &super::MediaProperties::ImageEncodingProperties, file: P0) -> ::windows::core::Result where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::MediaProperties::ImageEncodingProperties>>, - P1: ::std::convert::TryInto<::windows::core::InParam<'a, super::super::Storage::IStorageFile>, Error = E1>, - E1: ::std::convert::Into<::windows::core::Error>, + P0: ::std::convert::TryInto<::windows::core::InParam<'a, super::super::Storage::IStorageFile>, Error = E0>, + E0: ::std::convert::Into<::windows::core::Error>, { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).CapturePhotoToStorageFileAsync)(::windows::core::Vtable::as_raw(this), r#type.into().abi(), file.try_into().map_err(|e| e.into())?.abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).CapturePhotoToStorageFileAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(r#type), file.try_into().map_err(|e| e.into())?.abi(), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`, `\"Media_MediaProperties\"`, `\"Storage_Streams\"`*"] #[cfg(all(feature = "Foundation", feature = "Media_MediaProperties", feature = "Storage_Streams"))] - pub fn CapturePhotoToStreamAsync<'a, P0, P1, E1>(&self, r#type: P0, stream: P1) -> ::windows::core::Result + pub fn CapturePhotoToStreamAsync<'a, P0, E0>(&self, r#type: &super::MediaProperties::ImageEncodingProperties, stream: P0) -> ::windows::core::Result where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::MediaProperties::ImageEncodingProperties>>, - P1: ::std::convert::TryInto<::windows::core::InParam<'a, super::super::Storage::Streams::IRandomAccessStream>, Error = E1>, - E1: ::std::convert::Into<::windows::core::Error>, + P0: ::std::convert::TryInto<::windows::core::InParam<'a, super::super::Storage::Streams::IRandomAccessStream>, Error = E0>, + E0: ::std::convert::Into<::windows::core::Error>, { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).CapturePhotoToStreamAsync)(::windows::core::Vtable::as_raw(this), r#type.into().abi(), stream.try_into().map_err(|e| e.into())?.abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).CapturePhotoToStreamAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(r#type), stream.try_into().map_err(|e| e.into())?.abi(), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation_Collections\"`, `\"deprecated\"`*"] @@ -10324,14 +10180,11 @@ impl MediaCapture { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn Failed<'a, P0>(&self, erroreventhandler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, MediaCaptureFailedEventHandler>>, - { + pub fn Failed(&self, erroreventhandler: &MediaCaptureFailedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).Failed)(::windows::core::Vtable::as_raw(this), erroreventhandler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).Failed)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(erroreventhandler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -10342,14 +10195,11 @@ impl MediaCapture { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn RecordLimitationExceeded<'a, P0>(&self, recordlimitationexceededeventhandler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, RecordLimitationExceededEventHandler>>, - { + pub fn RecordLimitationExceeded(&self, recordlimitationexceededeventhandler: &RecordLimitationExceededEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).RecordLimitationExceeded)(::windows::core::Vtable::as_raw(this), recordlimitationexceededeventhandler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).RecordLimitationExceeded)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(recordlimitationexceededeventhandler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -10418,120 +10268,103 @@ impl MediaCapture { } #[doc = "*Required features: `\"Foundation\"`, `\"Media_MediaProperties\"`, `\"Storage\"`*"] #[cfg(all(feature = "Foundation", feature = "Media_MediaProperties", feature = "Storage"))] - pub fn PrepareLowLagRecordToStorageFileAsync<'a, P0, P1, E1>(&self, encodingprofile: P0, file: P1) -> ::windows::core::Result> + pub fn PrepareLowLagRecordToStorageFileAsync<'a, P0, E0>(&self, encodingprofile: &super::MediaProperties::MediaEncodingProfile, file: P0) -> ::windows::core::Result> where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::MediaProperties::MediaEncodingProfile>>, - P1: ::std::convert::TryInto<::windows::core::InParam<'a, super::super::Storage::IStorageFile>, Error = E1>, - E1: ::std::convert::Into<::windows::core::Error>, + P0: ::std::convert::TryInto<::windows::core::InParam<'a, super::super::Storage::IStorageFile>, Error = E0>, + E0: ::std::convert::Into<::windows::core::Error>, { let this = &::windows::core::Interface::cast::(self)?; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).PrepareLowLagRecordToStorageFileAsync)(::windows::core::Vtable::as_raw(this), encodingprofile.into().abi(), file.try_into().map_err(|e| e.into())?.abi(), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).PrepareLowLagRecordToStorageFileAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(encodingprofile), file.try_into().map_err(|e| e.into())?.abi(), result__.as_mut_ptr()).from_abi::>(result__) } } #[doc = "*Required features: `\"Foundation\"`, `\"Media_MediaProperties\"`, `\"Storage_Streams\"`*"] #[cfg(all(feature = "Foundation", feature = "Media_MediaProperties", feature = "Storage_Streams"))] - pub fn PrepareLowLagRecordToStreamAsync<'a, P0, P1, E1>(&self, encodingprofile: P0, stream: P1) -> ::windows::core::Result> + pub fn PrepareLowLagRecordToStreamAsync<'a, P0, E0>(&self, encodingprofile: &super::MediaProperties::MediaEncodingProfile, stream: P0) -> ::windows::core::Result> where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::MediaProperties::MediaEncodingProfile>>, - P1: ::std::convert::TryInto<::windows::core::InParam<'a, super::super::Storage::Streams::IRandomAccessStream>, Error = E1>, - E1: ::std::convert::Into<::windows::core::Error>, + P0: ::std::convert::TryInto<::windows::core::InParam<'a, super::super::Storage::Streams::IRandomAccessStream>, Error = E0>, + E0: ::std::convert::Into<::windows::core::Error>, { let this = &::windows::core::Interface::cast::(self)?; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).PrepareLowLagRecordToStreamAsync)(::windows::core::Vtable::as_raw(this), encodingprofile.into().abi(), stream.try_into().map_err(|e| e.into())?.abi(), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).PrepareLowLagRecordToStreamAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(encodingprofile), stream.try_into().map_err(|e| e.into())?.abi(), result__.as_mut_ptr()).from_abi::>(result__) } } #[doc = "*Required features: `\"Foundation\"`, `\"Media_MediaProperties\"`*"] #[cfg(all(feature = "Foundation", feature = "Media_MediaProperties"))] - pub fn PrepareLowLagRecordToCustomSinkAsync<'a, P0, P1, E1>(&self, encodingprofile: P0, custommediasink: P1) -> ::windows::core::Result> + pub fn PrepareLowLagRecordToCustomSinkAsync<'a, P0, E0>(&self, encodingprofile: &super::MediaProperties::MediaEncodingProfile, custommediasink: P0) -> ::windows::core::Result> where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::MediaProperties::MediaEncodingProfile>>, - P1: ::std::convert::TryInto<::windows::core::InParam<'a, super::IMediaExtension>, Error = E1>, - E1: ::std::convert::Into<::windows::core::Error>, + P0: ::std::convert::TryInto<::windows::core::InParam<'a, super::IMediaExtension>, Error = E0>, + E0: ::std::convert::Into<::windows::core::Error>, { let this = &::windows::core::Interface::cast::(self)?; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).PrepareLowLagRecordToCustomSinkAsync)(::windows::core::Vtable::as_raw(this), encodingprofile.into().abi(), custommediasink.try_into().map_err(|e| e.into())?.abi(), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).PrepareLowLagRecordToCustomSinkAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(encodingprofile), custommediasink.try_into().map_err(|e| e.into())?.abi(), result__.as_mut_ptr()).from_abi::>(result__) } } #[doc = "*Required features: `\"Foundation_Collections\"`, `\"Media_MediaProperties\"`*"] #[cfg(all(feature = "Foundation_Collections", feature = "Media_MediaProperties"))] - pub fn PrepareLowLagRecordToCustomSinkIdAsync<'a, P0, P1, E1>(&self, encodingprofile: P0, customsinkactivationid: &::windows::core::HSTRING, customsinksettings: P1) -> ::windows::core::Result> + pub fn PrepareLowLagRecordToCustomSinkIdAsync<'a, P0, E0>(&self, encodingprofile: &super::MediaProperties::MediaEncodingProfile, customsinkactivationid: &::windows::core::HSTRING, customsinksettings: P0) -> ::windows::core::Result> where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::MediaProperties::MediaEncodingProfile>>, - P1: ::std::convert::TryInto<::windows::core::InParam<'a, super::super::Foundation::Collections::IPropertySet>, Error = E1>, - E1: ::std::convert::Into<::windows::core::Error>, + P0: ::std::convert::TryInto<::windows::core::InParam<'a, super::super::Foundation::Collections::IPropertySet>, Error = E0>, + E0: ::std::convert::Into<::windows::core::Error>, { let this = &::windows::core::Interface::cast::(self)?; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).PrepareLowLagRecordToCustomSinkIdAsync)(::windows::core::Vtable::as_raw(this), encodingprofile.into().abi(), ::core::mem::transmute_copy(customsinkactivationid), customsinksettings.try_into().map_err(|e| e.into())?.abi(), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).PrepareLowLagRecordToCustomSinkIdAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(encodingprofile), ::core::mem::transmute_copy(customsinkactivationid), customsinksettings.try_into().map_err(|e| e.into())?.abi(), result__.as_mut_ptr()).from_abi::>(result__) } } #[doc = "*Required features: `\"Foundation\"`, `\"Media_MediaProperties\"`*"] #[cfg(all(feature = "Foundation", feature = "Media_MediaProperties"))] - pub fn PrepareLowLagPhotoCaptureAsync<'a, P0>(&self, r#type: P0) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::MediaProperties::ImageEncodingProperties>>, - { + pub fn PrepareLowLagPhotoCaptureAsync(&self, r#type: &super::MediaProperties::ImageEncodingProperties) -> ::windows::core::Result> { let this = &::windows::core::Interface::cast::(self)?; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).PrepareLowLagPhotoCaptureAsync)(::windows::core::Vtable::as_raw(this), r#type.into().abi(), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).PrepareLowLagPhotoCaptureAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(r#type), result__.as_mut_ptr()).from_abi::>(result__) } } #[doc = "*Required features: `\"Foundation\"`, `\"Media_MediaProperties\"`*"] #[cfg(all(feature = "Foundation", feature = "Media_MediaProperties"))] - pub fn PrepareLowLagPhotoSequenceCaptureAsync<'a, P0>(&self, r#type: P0) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::MediaProperties::ImageEncodingProperties>>, - { + pub fn PrepareLowLagPhotoSequenceCaptureAsync(&self, r#type: &super::MediaProperties::ImageEncodingProperties) -> ::windows::core::Result> { let this = &::windows::core::Interface::cast::(self)?; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).PrepareLowLagPhotoSequenceCaptureAsync)(::windows::core::Vtable::as_raw(this), r#type.into().abi(), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).PrepareLowLagPhotoSequenceCaptureAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(r#type), result__.as_mut_ptr()).from_abi::>(result__) } } #[doc = "*Required features: `\"Foundation_Collections\"`, `\"Media_MediaProperties\"`*"] #[cfg(all(feature = "Foundation_Collections", feature = "Media_MediaProperties"))] - pub fn SetEncodingPropertiesAsync<'a, P0, E0, P1>(&self, mediastreamtype: MediaStreamType, mediaencodingproperties: P0, encoderproperties: P1) -> ::windows::core::Result + pub fn SetEncodingPropertiesAsync<'a, P0, E0>(&self, mediastreamtype: MediaStreamType, mediaencodingproperties: P0, encoderproperties: &super::MediaProperties::MediaPropertySet) -> ::windows::core::Result where P0: ::std::convert::TryInto<::windows::core::InParam<'a, super::MediaProperties::IMediaEncodingProperties>, Error = E0>, E0: ::std::convert::Into<::windows::core::Error>, - P1: ::std::convert::Into<::windows::core::InParam<'a, super::MediaProperties::MediaPropertySet>>, { let this = &::windows::core::Interface::cast::(self)?; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).SetEncodingPropertiesAsync)(::windows::core::Vtable::as_raw(this), mediastreamtype, mediaencodingproperties.try_into().map_err(|e| e.into())?.abi(), encoderproperties.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).SetEncodingPropertiesAsync)(::windows::core::Vtable::as_raw(this), mediastreamtype, mediaencodingproperties.try_into().map_err(|e| e.into())?.abi(), ::core::mem::transmute_copy(encoderproperties), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`, `\"Media_Capture_Core\"`, `\"Media_MediaProperties\"`*"] #[cfg(all(feature = "Foundation", feature = "Media_Capture_Core", feature = "Media_MediaProperties"))] - pub fn PrepareVariablePhotoSequenceCaptureAsync<'a, P0>(&self, r#type: P0) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::MediaProperties::ImageEncodingProperties>>, - { + pub fn PrepareVariablePhotoSequenceCaptureAsync(&self, r#type: &super::MediaProperties::ImageEncodingProperties) -> ::windows::core::Result> { let this = &::windows::core::Interface::cast::(self)?; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).PrepareVariablePhotoSequenceCaptureAsync)(::windows::core::Vtable::as_raw(this), r#type.into().abi(), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).PrepareVariablePhotoSequenceCaptureAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(r#type), result__.as_mut_ptr()).from_abi::>(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn FocusChanged<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn FocusChanged(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = &::windows::core::Interface::cast::(self)?; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).FocusChanged)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).FocusChanged)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -10542,14 +10375,11 @@ impl MediaCapture { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn PhotoConfirmationCaptured<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn PhotoConfirmationCaptured(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = &::windows::core::Interface::cast::(self)?; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).PhotoConfirmationCaptured)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).PhotoConfirmationCaptured)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -10604,14 +10434,11 @@ impl MediaCapture { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn CameraStreamStateChanged<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn CameraStreamStateChanged(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = &::windows::core::Interface::cast::(self)?; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).CameraStreamStateChanged)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).CameraStreamStateChanged)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -10640,26 +10467,20 @@ impl MediaCapture { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn GetPreviewFrameCopyAsync<'a, P0>(&self, destination: P0) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::VideoFrame>>, - { + pub fn GetPreviewFrameCopyAsync(&self, destination: &super::VideoFrame) -> ::windows::core::Result> { let this = &::windows::core::Interface::cast::(self)?; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).GetPreviewFrameCopyAsync)(::windows::core::Vtable::as_raw(this), destination.into().abi(), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).GetPreviewFrameCopyAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(destination), result__.as_mut_ptr()).from_abi::>(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn ThermalStatusChanged<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn ThermalStatusChanged(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = &::windows::core::Interface::cast::(self)?; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).ThermalStatusChanged)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).ThermalStatusChanged)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -10677,14 +10498,11 @@ impl MediaCapture { } #[doc = "*Required features: `\"Foundation\"`, `\"Media_MediaProperties\"`*"] #[cfg(all(feature = "Foundation", feature = "Media_MediaProperties"))] - pub fn PrepareAdvancedPhotoCaptureAsync<'a, P0>(&self, encodingproperties: P0) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::MediaProperties::ImageEncodingProperties>>, - { + pub fn PrepareAdvancedPhotoCaptureAsync(&self, encodingproperties: &super::MediaProperties::ImageEncodingProperties) -> ::windows::core::Result> { let this = &::windows::core::Interface::cast::(self)?; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).PrepareAdvancedPhotoCaptureAsync)(::windows::core::Vtable::as_raw(this), encodingproperties.into().abi(), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).PrepareAdvancedPhotoCaptureAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(encodingproperties), result__.as_mut_ptr()).from_abi::>(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -10729,50 +10547,38 @@ impl MediaCapture { } #[doc = "*Required features: `\"Foundation\"`, `\"Media_Capture_Frames\"`*"] #[cfg(all(feature = "Foundation", feature = "Media_Capture_Frames"))] - pub fn CreateFrameReaderAsync<'a, P0>(&self, inputsource: P0) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, Frames::MediaFrameSource>>, - { + pub fn CreateFrameReaderAsync(&self, inputsource: &Frames::MediaFrameSource) -> ::windows::core::Result> { let this = &::windows::core::Interface::cast::(self)?; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).CreateFrameReaderAsync)(::windows::core::Vtable::as_raw(this), inputsource.into().abi(), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).CreateFrameReaderAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(inputsource), result__.as_mut_ptr()).from_abi::>(result__) } } #[doc = "*Required features: `\"Foundation\"`, `\"Media_Capture_Frames\"`*"] #[cfg(all(feature = "Foundation", feature = "Media_Capture_Frames"))] - pub fn CreateFrameReaderWithSubtypeAsync<'a, P0>(&self, inputsource: P0, outputsubtype: &::windows::core::HSTRING) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, Frames::MediaFrameSource>>, - { + pub fn CreateFrameReaderWithSubtypeAsync(&self, inputsource: &Frames::MediaFrameSource, outputsubtype: &::windows::core::HSTRING) -> ::windows::core::Result> { let this = &::windows::core::Interface::cast::(self)?; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).CreateFrameReaderWithSubtypeAsync)(::windows::core::Vtable::as_raw(this), inputsource.into().abi(), ::core::mem::transmute_copy(outputsubtype), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).CreateFrameReaderWithSubtypeAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(inputsource), ::core::mem::transmute_copy(outputsubtype), result__.as_mut_ptr()).from_abi::>(result__) } } #[doc = "*Required features: `\"Foundation\"`, `\"Graphics_Imaging\"`, `\"Media_Capture_Frames\"`*"] #[cfg(all(feature = "Foundation", feature = "Graphics_Imaging", feature = "Media_Capture_Frames"))] - pub fn CreateFrameReaderWithSubtypeAndSizeAsync<'a, P0>(&self, inputsource: P0, outputsubtype: &::windows::core::HSTRING, outputsize: super::super::Graphics::Imaging::BitmapSize) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, Frames::MediaFrameSource>>, - { + pub fn CreateFrameReaderWithSubtypeAndSizeAsync(&self, inputsource: &Frames::MediaFrameSource, outputsubtype: &::windows::core::HSTRING, outputsize: super::super::Graphics::Imaging::BitmapSize) -> ::windows::core::Result> { let this = &::windows::core::Interface::cast::(self)?; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).CreateFrameReaderWithSubtypeAndSizeAsync)(::windows::core::Vtable::as_raw(this), inputsource.into().abi(), ::core::mem::transmute_copy(outputsubtype), outputsize, result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).CreateFrameReaderWithSubtypeAndSizeAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(inputsource), ::core::mem::transmute_copy(outputsubtype), outputsize, result__.as_mut_ptr()).from_abi::>(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn CaptureDeviceExclusiveControlStatusChanged<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn CaptureDeviceExclusiveControlStatusChanged(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = &::windows::core::Interface::cast::(self)?; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).CaptureDeviceExclusiveControlStatusChanged)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).CaptureDeviceExclusiveControlStatusChanged)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -10796,14 +10602,11 @@ impl MediaCapture { } #[doc = "*Required features: `\"UI_WindowManagement\"`*"] #[cfg(feature = "UI_WindowManagement")] - pub fn CreateRelativePanelWatcher<'a, P0>(&self, capturemode: StreamingCaptureMode, displayregion: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::UI::WindowManagement::DisplayRegion>>, - { + pub fn CreateRelativePanelWatcher(&self, capturemode: StreamingCaptureMode, displayregion: &super::super::UI::WindowManagement::DisplayRegion) -> ::windows::core::Result { let this = &::windows::core::Interface::cast::(self)?; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).CreateRelativePanelWatcher)(::windows::core::Vtable::as_raw(this), capturemode, displayregion.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).CreateRelativePanelWatcher)(::windows::core::Vtable::as_raw(this), capturemode, ::core::mem::transmute_copy(displayregion), result__.as_mut_ptr()).from_abi::(result__) } } pub fn IsVideoProfileSupported(videodeviceid: &::windows::core::HSTRING) -> ::windows::core::Result { @@ -10847,30 +10650,28 @@ impl MediaCapture { } #[doc = "*Required features: `\"Foundation\"`, `\"Media_MediaProperties\"`*"] #[cfg(all(feature = "Foundation", feature = "Media_MediaProperties"))] - pub fn StartPreviewToCustomSinkAsync<'a, P0, P1, E1>(&self, encodingprofile: P0, custommediasink: P1) -> ::windows::core::Result + pub fn StartPreviewToCustomSinkAsync<'a, P0, E0>(&self, encodingprofile: &super::MediaProperties::MediaEncodingProfile, custommediasink: P0) -> ::windows::core::Result where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::MediaProperties::MediaEncodingProfile>>, - P1: ::std::convert::TryInto<::windows::core::InParam<'a, super::IMediaExtension>, Error = E1>, - E1: ::std::convert::Into<::windows::core::Error>, + P0: ::std::convert::TryInto<::windows::core::InParam<'a, super::IMediaExtension>, Error = E0>, + E0: ::std::convert::Into<::windows::core::Error>, { let this = &::windows::core::Interface::cast::(self)?; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).StartPreviewToCustomSinkAsync)(::windows::core::Vtable::as_raw(this), encodingprofile.into().abi(), custommediasink.try_into().map_err(|e| e.into())?.abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).StartPreviewToCustomSinkAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(encodingprofile), custommediasink.try_into().map_err(|e| e.into())?.abi(), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation_Collections\"`, `\"Media_MediaProperties\"`*"] #[cfg(all(feature = "Foundation_Collections", feature = "Media_MediaProperties"))] - pub fn StartPreviewToCustomSinkIdAsync<'a, P0, P1, E1>(&self, encodingprofile: P0, customsinkactivationid: &::windows::core::HSTRING, customsinksettings: P1) -> ::windows::core::Result + pub fn StartPreviewToCustomSinkIdAsync<'a, P0, E0>(&self, encodingprofile: &super::MediaProperties::MediaEncodingProfile, customsinkactivationid: &::windows::core::HSTRING, customsinksettings: P0) -> ::windows::core::Result where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::MediaProperties::MediaEncodingProfile>>, - P1: ::std::convert::TryInto<::windows::core::InParam<'a, super::super::Foundation::Collections::IPropertySet>, Error = E1>, - E1: ::std::convert::Into<::windows::core::Error>, + P0: ::std::convert::TryInto<::windows::core::InParam<'a, super::super::Foundation::Collections::IPropertySet>, Error = E0>, + E0: ::std::convert::Into<::windows::core::Error>, { let this = &::windows::core::Interface::cast::(self)?; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).StartPreviewToCustomSinkIdAsync)(::windows::core::Vtable::as_raw(this), encodingprofile.into().abi(), ::core::mem::transmute_copy(customsinkactivationid), customsinksettings.try_into().map_err(|e| e.into())?.abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).StartPreviewToCustomSinkIdAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(encodingprofile), ::core::mem::transmute_copy(customsinkactivationid), customsinksettings.try_into().map_err(|e| e.into())?.abi(), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -11336,12 +11137,9 @@ impl MediaCaptureInitializationSettings { (::windows::core::Vtable::vtable(this).VideoProfile)(::windows::core::Vtable::as_raw(this), result__.as_mut_ptr()).from_abi::(result__) } } - pub fn SetVideoProfile<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, MediaCaptureVideoProfile>>, - { + pub fn SetVideoProfile(&self, value: &MediaCaptureVideoProfile) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).SetVideoProfile)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetVideoProfile)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } pub fn PreviewMediaDescription(&self) -> ::windows::core::Result { let this = &::windows::core::Interface::cast::(self)?; @@ -11350,12 +11148,9 @@ impl MediaCaptureInitializationSettings { (::windows::core::Vtable::vtable(this).PreviewMediaDescription)(::windows::core::Vtable::as_raw(this), result__.as_mut_ptr()).from_abi::(result__) } } - pub fn SetPreviewMediaDescription<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, MediaCaptureVideoProfileMediaDescription>>, - { + pub fn SetPreviewMediaDescription(&self, value: &MediaCaptureVideoProfileMediaDescription) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).SetPreviewMediaDescription)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetPreviewMediaDescription)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } pub fn RecordMediaDescription(&self) -> ::windows::core::Result { let this = &::windows::core::Interface::cast::(self)?; @@ -11364,12 +11159,9 @@ impl MediaCaptureInitializationSettings { (::windows::core::Vtable::vtable(this).RecordMediaDescription)(::windows::core::Vtable::as_raw(this), result__.as_mut_ptr()).from_abi::(result__) } } - pub fn SetRecordMediaDescription<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, MediaCaptureVideoProfileMediaDescription>>, - { + pub fn SetRecordMediaDescription(&self, value: &MediaCaptureVideoProfileMediaDescription) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).SetRecordMediaDescription)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetRecordMediaDescription)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } pub fn PhotoMediaDescription(&self) -> ::windows::core::Result { let this = &::windows::core::Interface::cast::(self)?; @@ -11378,12 +11170,9 @@ impl MediaCaptureInitializationSettings { (::windows::core::Vtable::vtable(this).PhotoMediaDescription)(::windows::core::Vtable::as_raw(this), result__.as_mut_ptr()).from_abi::(result__) } } - pub fn SetPhotoMediaDescription<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, MediaCaptureVideoProfileMediaDescription>>, - { + pub fn SetPhotoMediaDescription(&self, value: &MediaCaptureVideoProfileMediaDescription) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).SetPhotoMediaDescription)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetPhotoMediaDescription)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } #[doc = "*Required features: `\"Media_Capture_Frames\"`*"] #[cfg(feature = "Media_Capture_Frames")] @@ -11396,12 +11185,9 @@ impl MediaCaptureInitializationSettings { } #[doc = "*Required features: `\"Media_Capture_Frames\"`*"] #[cfg(feature = "Media_Capture_Frames")] - pub fn SetSourceGroup<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, Frames::MediaFrameSourceGroup>>, - { + pub fn SetSourceGroup(&self, value: &Frames::MediaFrameSourceGroup) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).SetSourceGroup)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetSourceGroup)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } pub fn SharingMode(&self) -> ::windows::core::Result { let this = &::windows::core::Interface::cast::(self)?; @@ -11447,12 +11233,9 @@ impl MediaCaptureInitializationSettings { } #[doc = "*Required features: `\"Security_Credentials\"`*"] #[cfg(feature = "Security_Credentials")] - pub fn SetDeviceUriPasswordCredential<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Security::Credentials::PasswordCredential>>, - { + pub fn SetDeviceUriPasswordCredential(&self, value: &super::super::Security::Credentials::PasswordCredential) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).SetDeviceUriPasswordCredential)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetDeviceUriPasswordCredential)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] @@ -11465,12 +11248,9 @@ impl MediaCaptureInitializationSettings { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn SetDeviceUri<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::Uri>>, - { + pub fn SetDeviceUri(&self, value: &super::super::Foundation::Uri) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).SetDeviceUri)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetDeviceUri)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } } impl ::core::clone::Clone for MediaCaptureInitializationSettings { @@ -11669,14 +11449,11 @@ impl MediaCaptureRelativePanelWatcher { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn Changed<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn Changed(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).Changed)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).Changed)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -12623,14 +12400,11 @@ impl ScreenCapture { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn SourceSuspensionChanged<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn SourceSuspensionChanged(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).SourceSuspensionChanged)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).SourceSuspensionChanged)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -14484,13 +14258,9 @@ impl MediaCaptureFailedEventHandler { let com = MediaCaptureFailedEventHandlerBox:: { vtable: &MediaCaptureFailedEventHandlerBox::::VTABLE, count: ::windows::core::RefCount::new(1), invoke }; unsafe { ::core::mem::transmute(::windows::core::alloc::boxed::Box::new(com)) } } - pub fn Invoke<'a, P0, P1>(&self, sender: P0, erroreventargs: P1) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, MediaCapture>>, - P1: ::std::convert::Into<::windows::core::InParam<'a, MediaCaptureFailedEventArgs>>, - { + pub fn Invoke(&self, sender: &MediaCapture, erroreventargs: &MediaCaptureFailedEventArgs) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).Invoke)(::windows::core::Vtable::as_raw(this), sender.into().abi(), erroreventargs.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).Invoke)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(sender), ::core::mem::transmute_copy(erroreventargs)).ok() } } } #[repr(C)] @@ -14574,12 +14344,9 @@ impl RecordLimitationExceededEventHandler { let com = RecordLimitationExceededEventHandlerBox:: { vtable: &RecordLimitationExceededEventHandlerBox::::VTABLE, count: ::windows::core::RefCount::new(1), invoke }; unsafe { ::core::mem::transmute(::windows::core::alloc::boxed::Box::new(com)) } } - pub fn Invoke<'a, P0>(&self, sender: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, MediaCapture>>, - { + pub fn Invoke(&self, sender: &MediaCapture) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).Invoke)(::windows::core::Vtable::as_raw(this), sender.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).Invoke)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(sender)).ok() } } } #[repr(C)] diff --git a/crates/libs/windows/src/Windows/Media/Casting/mod.rs b/crates/libs/windows/src/Windows/Media/Casting/mod.rs index 4d5460e681..6f9b6df3f5 100644 --- a/crates/libs/windows/src/Windows/Media/Casting/mod.rs +++ b/crates/libs/windows/src/Windows/Media/Casting/mod.rs @@ -238,23 +238,17 @@ impl CastingConnection { (::windows::core::Vtable::vtable(this).Source)(::windows::core::Vtable::as_raw(this), result__.as_mut_ptr()).from_abi::(result__) } } - pub fn SetSource<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, CastingSource>>, - { + pub fn SetSource(&self, value: &CastingSource) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).SetSource)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetSource)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn StateChanged<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn StateChanged(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).StateChanged)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).StateChanged)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -265,14 +259,11 @@ impl CastingConnection { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn ErrorOccurred<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn ErrorOccurred(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).ErrorOccurred)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).ErrorOccurred)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -283,14 +274,11 @@ impl CastingConnection { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn RequestStartCastingAsync<'a, P0>(&self, value: P0) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, CastingSource>>, - { + pub fn RequestStartCastingAsync(&self, value: &CastingSource) -> ::windows::core::Result> { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).RequestStartCastingAsync)(::windows::core::Vtable::as_raw(this), value.into().abi(), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).RequestStartCastingAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value), result__.as_mut_ptr()).from_abi::>(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -529,13 +517,10 @@ impl CastingDevice { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn GetDeviceSelectorFromCastingSourceAsync<'a, P0>(castingsource: P0) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, CastingSource>>, - { + pub fn GetDeviceSelectorFromCastingSourceAsync(castingsource: &CastingSource) -> ::windows::core::Result> { Self::ICastingDeviceStatics(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).GetDeviceSelectorFromCastingSourceAsync)(::windows::core::Vtable::as_raw(this), castingsource.into().abi(), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).GetDeviceSelectorFromCastingSourceAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(castingsource), result__.as_mut_ptr()).from_abi::>(result__) }) } #[doc = "*Required features: `\"Foundation\"`*"] @@ -548,13 +533,10 @@ impl CastingDevice { } #[doc = "*Required features: `\"Devices_Enumeration\"`, `\"Foundation\"`*"] #[cfg(all(feature = "Devices_Enumeration", feature = "Foundation"))] - pub fn DeviceInfoSupportsCastingAsync<'a, P0>(device: P0) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Devices::Enumeration::DeviceInformation>>, - { + pub fn DeviceInfoSupportsCastingAsync(device: &super::super::Devices::Enumeration::DeviceInformation) -> ::windows::core::Result> { Self::ICastingDeviceStatics(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).DeviceInfoSupportsCastingAsync)(::windows::core::Vtable::as_raw(this), device.into().abi(), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).DeviceInfoSupportsCastingAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(device), result__.as_mut_ptr()).from_abi::>(result__) }) } #[doc(hidden)] @@ -656,14 +638,11 @@ impl CastingDevicePicker { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn CastingDeviceSelected<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn CastingDeviceSelected(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).CastingDeviceSelected)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).CastingDeviceSelected)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -674,14 +653,11 @@ impl CastingDevicePicker { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn CastingDevicePickerDismissed<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn CastingDevicePickerDismissed(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).CastingDevicePickerDismissed)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).CastingDevicePickerDismissed)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -973,12 +949,9 @@ impl CastingSource { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn SetPreferredSourceUri<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::Uri>>, - { + pub fn SetPreferredSourceUri(&self, value: &super::super::Foundation::Uri) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).SetPreferredSourceUri)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetPreferredSourceUri)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } } impl ::core::clone::Clone for CastingSource { diff --git a/crates/libs/windows/src/Windows/Media/ContentRestrictions/mod.rs b/crates/libs/windows/src/Windows/Media/ContentRestrictions/mod.rs index a5b77b1a04..45f1176732 100644 --- a/crates/libs/windows/src/Windows/Media/ContentRestrictions/mod.rs +++ b/crates/libs/windows/src/Windows/Media/ContentRestrictions/mod.rs @@ -388,38 +388,29 @@ impl RatedContentRestrictions { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn GetRestrictionLevelAsync<'a, P0>(&self, ratedcontentdescription: P0) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, RatedContentDescription>>, - { + pub fn GetRestrictionLevelAsync(&self, ratedcontentdescription: &RatedContentDescription) -> ::windows::core::Result> { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).GetRestrictionLevelAsync)(::windows::core::Vtable::as_raw(this), ratedcontentdescription.into().abi(), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).GetRestrictionLevelAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(ratedcontentdescription), result__.as_mut_ptr()).from_abi::>(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn RequestContentAccessAsync<'a, P0>(&self, ratedcontentdescription: P0) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, RatedContentDescription>>, - { + pub fn RequestContentAccessAsync(&self, ratedcontentdescription: &RatedContentDescription) -> ::windows::core::Result> { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).RequestContentAccessAsync)(::windows::core::Vtable::as_raw(this), ratedcontentdescription.into().abi(), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).RequestContentAccessAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(ratedcontentdescription), result__.as_mut_ptr()).from_abi::>(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn RestrictionsChanged<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::EventHandler<::windows::core::IInspectable>>>, - { + pub fn RestrictionsChanged(&self, handler: &super::super::Foundation::EventHandler<::windows::core::IInspectable>) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).RestrictionsChanged)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).RestrictionsChanged)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] diff --git a/crates/libs/windows/src/Windows/Media/Control/mod.rs b/crates/libs/windows/src/Windows/Media/Control/mod.rs index 2e47c93c27..c0fdf1e15c 100644 --- a/crates/libs/windows/src/Windows/Media/Control/mod.rs +++ b/crates/libs/windows/src/Windows/Media/Control/mod.rs @@ -597,14 +597,11 @@ impl GlobalSystemMediaTransportControlsSession { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn TimelinePropertiesChanged<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn TimelinePropertiesChanged(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).TimelinePropertiesChanged)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).TimelinePropertiesChanged)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -615,14 +612,11 @@ impl GlobalSystemMediaTransportControlsSession { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn PlaybackInfoChanged<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn PlaybackInfoChanged(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).PlaybackInfoChanged)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).PlaybackInfoChanged)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -633,14 +627,11 @@ impl GlobalSystemMediaTransportControlsSession { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn MediaPropertiesChanged<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn MediaPropertiesChanged(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).MediaPropertiesChanged)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).MediaPropertiesChanged)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -736,14 +727,11 @@ impl GlobalSystemMediaTransportControlsSessionManager { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn CurrentSessionChanged<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn CurrentSessionChanged(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).CurrentSessionChanged)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).CurrentSessionChanged)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -754,14 +742,11 @@ impl GlobalSystemMediaTransportControlsSessionManager { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn SessionsChanged<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn SessionsChanged(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).SessionsChanged)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).SessionsChanged)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] diff --git a/crates/libs/windows/src/Windows/Media/Core/Preview/mod.rs b/crates/libs/windows/src/Windows/Media/Core/Preview/mod.rs index ea7bdda377..0f4b45b48d 100644 --- a/crates/libs/windows/src/Windows/Media/Core/Preview/mod.rs +++ b/crates/libs/windows/src/Windows/Media/Core/Preview/mod.rs @@ -32,13 +32,10 @@ impl SoundLevelBroker { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn SoundLevelChanged<'a, P0>(handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Foundation::EventHandler<::windows::core::IInspectable>>>, - { + pub fn SoundLevelChanged(handler: &super::super::super::Foundation::EventHandler<::windows::core::IInspectable>) -> ::windows::core::Result { Self::ISoundLevelBrokerStatics(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).SoundLevelChanged)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).SoundLevelChanged)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) }) } #[doc = "*Required features: `\"Foundation\"`*"] diff --git a/crates/libs/windows/src/Windows/Media/Core/mod.rs b/crates/libs/windows/src/Windows/Media/Core/mod.rs index 566b6f9aed..b47e502f62 100644 --- a/crates/libs/windows/src/Windows/Media/Core/mod.rs +++ b/crates/libs/windows/src/Windows/Media/Core/mod.rs @@ -2273,14 +2273,11 @@ pub struct ISingleSelectMediaTrackList(::windows::core::IUnknown); impl ISingleSelectMediaTrackList { #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn SelectedIndexChanged<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn SelectedIndexChanged(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).SelectedIndexChanged)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).SelectedIndexChanged)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -3211,13 +3208,10 @@ impl AudioStreamDescriptor { } #[doc = "*Required features: `\"Media_MediaProperties\"`*"] #[cfg(feature = "Media_MediaProperties")] - pub fn Create<'a, P0>(encodingproperties: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::MediaProperties::AudioEncodingProperties>>, - { + pub fn Create(encodingproperties: &super::MediaProperties::AudioEncodingProperties) -> ::windows::core::Result { Self::IAudioStreamDescriptorFactory(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).Create)(::windows::core::Vtable::as_raw(this), encodingproperties.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).Create)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(encodingproperties), result__.as_mut_ptr()).from_abi::(result__) }) } pub fn IsSelected(&self) -> ::windows::core::Result { @@ -3374,14 +3368,11 @@ pub struct AudioTrack(::windows::core::IUnknown); impl AudioTrack { #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn OpenFailed<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn OpenFailed(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = &::windows::core::Interface::cast::(self)?; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).OpenFailed)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).OpenFailed)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -4639,14 +4630,11 @@ impl FaceDetectionEffect { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn FaceDetected<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn FaceDetected(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).FaceDetected)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).FaceDetected)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -5321,12 +5309,9 @@ impl ImageCue { } #[doc = "*Required features: `\"Graphics_Imaging\"`*"] #[cfg(feature = "Graphics_Imaging")] - pub fn SetSoftwareBitmap<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Graphics::Imaging::SoftwareBitmap>>, - { + pub fn SetSoftwareBitmap(&self, value: &super::super::Graphics::Imaging::SoftwareBitmap) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).SetSoftwareBitmap)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetSoftwareBitmap)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } #[doc = "*Required features: `\"Graphics_Imaging\"`*"] #[cfg(feature = "Graphics_Imaging")] @@ -5713,14 +5698,11 @@ impl MediaBinder { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn Binding<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn Binding(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).Binding)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).Binding)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -5818,14 +5800,11 @@ pub struct MediaBindingEventArgs(::windows::core::IUnknown); impl MediaBindingEventArgs { #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn Canceled<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn Canceled(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).Canceled)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).Canceled)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -5852,12 +5831,9 @@ impl MediaBindingEventArgs { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn SetUri<'a, P0>(&self, uri: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::Uri>>, - { + pub fn SetUri(&self, uri: &super::super::Foundation::Uri) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).SetUri)(::windows::core::Vtable::as_raw(this), uri.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetUri)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(uri)).ok() } } #[doc = "*Required features: `\"Storage_Streams\"`*"] #[cfg(feature = "Storage_Streams")] @@ -5881,12 +5857,9 @@ impl MediaBindingEventArgs { } #[doc = "*Required features: `\"Media_Streaming_Adaptive\"`*"] #[cfg(feature = "Media_Streaming_Adaptive")] - pub fn SetAdaptiveMediaSource<'a, P0>(&self, mediasource: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::Streaming::Adaptive::AdaptiveMediaSource>>, - { + pub fn SetAdaptiveMediaSource(&self, mediasource: &super::Streaming::Adaptive::AdaptiveMediaSource) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).SetAdaptiveMediaSource)(::windows::core::Vtable::as_raw(this), mediasource.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetAdaptiveMediaSource)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(mediasource)).ok() } } #[doc = "*Required features: `\"Storage\"`*"] #[cfg(feature = "Storage")] @@ -5900,12 +5873,9 @@ impl MediaBindingEventArgs { } #[doc = "*Required features: `\"Networking_BackgroundTransfer\"`*"] #[cfg(feature = "Networking_BackgroundTransfer")] - pub fn SetDownloadOperation<'a, P0>(&self, downloadoperation: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Networking::BackgroundTransfer::DownloadOperation>>, - { + pub fn SetDownloadOperation(&self, downloadoperation: &super::super::Networking::BackgroundTransfer::DownloadOperation) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).SetDownloadOperation)(::windows::core::Vtable::as_raw(this), downloadoperation.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetDownloadOperation)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(downloadoperation)).ok() } } } impl ::core::clone::Clone for MediaBindingEventArgs { @@ -6060,14 +6030,11 @@ impl MediaSource { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn OpenOperationCompleted<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn OpenOperationCompleted(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).OpenOperationCompleted)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).OpenOperationCompleted)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -6121,14 +6088,11 @@ impl MediaSource { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn StateChanged<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn StateChanged(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = &::windows::core::Interface::cast::(self)?; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).StateChanged)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).StateChanged)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -6200,31 +6164,22 @@ impl MediaSource { } #[doc = "*Required features: `\"Media_Streaming_Adaptive\"`*"] #[cfg(feature = "Media_Streaming_Adaptive")] - pub fn CreateFromAdaptiveMediaSource<'a, P0>(mediasource: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::Streaming::Adaptive::AdaptiveMediaSource>>, - { + pub fn CreateFromAdaptiveMediaSource(mediasource: &super::Streaming::Adaptive::AdaptiveMediaSource) -> ::windows::core::Result { Self::IMediaSourceStatics(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).CreateFromAdaptiveMediaSource)(::windows::core::Vtable::as_raw(this), mediasource.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).CreateFromAdaptiveMediaSource)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(mediasource), result__.as_mut_ptr()).from_abi::(result__) }) } - pub fn CreateFromMediaStreamSource<'a, P0>(mediasource: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, MediaStreamSource>>, - { + pub fn CreateFromMediaStreamSource(mediasource: &MediaStreamSource) -> ::windows::core::Result { Self::IMediaSourceStatics(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).CreateFromMediaStreamSource)(::windows::core::Vtable::as_raw(this), mediasource.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).CreateFromMediaStreamSource)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(mediasource), result__.as_mut_ptr()).from_abi::(result__) }) } - pub fn CreateFromMseStreamSource<'a, P0>(mediasource: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, MseStreamSource>>, - { + pub fn CreateFromMseStreamSource(mediasource: &MseStreamSource) -> ::windows::core::Result { Self::IMediaSourceStatics(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).CreateFromMseStreamSource)(::windows::core::Vtable::as_raw(this), mediasource.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).CreateFromMseStreamSource)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(mediasource), result__.as_mut_ptr()).from_abi::(result__) }) } pub fn CreateFromIMediaSource<'a, P0, E0>(mediasource: P0) -> ::windows::core::Result @@ -6275,44 +6230,32 @@ impl MediaSource { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn CreateFromUri<'a, P0>(uri: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::Uri>>, - { + pub fn CreateFromUri(uri: &super::super::Foundation::Uri) -> ::windows::core::Result { Self::IMediaSourceStatics(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).CreateFromUri)(::windows::core::Vtable::as_raw(this), uri.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).CreateFromUri)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(uri), result__.as_mut_ptr()).from_abi::(result__) }) } - pub fn CreateFromMediaBinder<'a, P0>(binder: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, MediaBinder>>, - { + pub fn CreateFromMediaBinder(binder: &MediaBinder) -> ::windows::core::Result { Self::IMediaSourceStatics2(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).CreateFromMediaBinder)(::windows::core::Vtable::as_raw(this), binder.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).CreateFromMediaBinder)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(binder), result__.as_mut_ptr()).from_abi::(result__) }) } #[doc = "*Required features: `\"Media_Capture_Frames\"`*"] #[cfg(feature = "Media_Capture_Frames")] - pub fn CreateFromMediaFrameSource<'a, P0>(framesource: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::Capture::Frames::MediaFrameSource>>, - { + pub fn CreateFromMediaFrameSource(framesource: &super::Capture::Frames::MediaFrameSource) -> ::windows::core::Result { Self::IMediaSourceStatics3(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).CreateFromMediaFrameSource)(::windows::core::Vtable::as_raw(this), framesource.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).CreateFromMediaFrameSource)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(framesource), result__.as_mut_ptr()).from_abi::(result__) }) } #[doc = "*Required features: `\"Networking_BackgroundTransfer\"`*"] #[cfg(feature = "Networking_BackgroundTransfer")] - pub fn CreateFromDownloadOperation<'a, P0>(downloadoperation: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Networking::BackgroundTransfer::DownloadOperation>>, - { + pub fn CreateFromDownloadOperation(downloadoperation: &super::super::Networking::BackgroundTransfer::DownloadOperation) -> ::windows::core::Result { Self::IMediaSourceStatics4(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).CreateFromDownloadOperation)(::windows::core::Vtable::as_raw(this), downloadoperation.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).CreateFromDownloadOperation)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(downloadoperation), result__.as_mut_ptr()).from_abi::(result__) }) } #[doc(hidden)] @@ -6450,14 +6393,11 @@ pub struct MediaSourceAppServiceConnection(::windows::core::IUnknown); impl MediaSourceAppServiceConnection { #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn InitializeMediaStreamSourceRequested<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn InitializeMediaStreamSourceRequested(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).InitializeMediaStreamSourceRequested)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).InitializeMediaStreamSourceRequested)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -6472,13 +6412,10 @@ impl MediaSourceAppServiceConnection { } #[doc = "*Required features: `\"ApplicationModel_AppService\"`*"] #[cfg(feature = "ApplicationModel_AppService")] - pub fn Create<'a, P0>(appserviceconnection: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::ApplicationModel::AppService::AppServiceConnection>>, - { + pub fn Create(appserviceconnection: &super::super::ApplicationModel::AppService::AppServiceConnection) -> ::windows::core::Result { Self::IMediaSourceAppServiceConnectionFactory(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).Create)(::windows::core::Vtable::as_raw(this), appserviceconnection.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).Create)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(appserviceconnection), result__.as_mut_ptr()).from_abi::(result__) }) } #[doc(hidden)] @@ -6790,14 +6727,11 @@ pub struct MediaStreamSample(::windows::core::IUnknown); impl MediaStreamSample { #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn Processed<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn Processed(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).Processed)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).Processed)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -7327,14 +7261,11 @@ pub struct MediaStreamSource(::windows::core::IUnknown); impl MediaStreamSource { #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn Closed<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn Closed(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).Closed)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).Closed)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -7345,14 +7276,11 @@ impl MediaStreamSource { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn Starting<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn Starting(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).Starting)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).Starting)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -7363,14 +7291,11 @@ impl MediaStreamSource { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn Paused<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn Paused(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).Paused)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).Paused)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -7381,14 +7306,11 @@ impl MediaStreamSource { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn SampleRequested<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn SampleRequested(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).SampleRequested)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).SampleRequested)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -7399,14 +7321,11 @@ impl MediaStreamSource { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn SwitchStreamsRequested<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn SwitchStreamsRequested(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).SwitchStreamsRequested)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).SwitchStreamsRequested)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -7429,12 +7348,9 @@ impl MediaStreamSource { } #[doc = "*Required features: `\"Media_Protection\"`*"] #[cfg(feature = "Media_Protection")] - pub fn SetMediaProtectionManager<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::Protection::MediaProtectionManager>>, - { + pub fn SetMediaProtectionManager(&self, value: &super::Protection::MediaProtectionManager) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).SetMediaProtectionManager)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetMediaProtectionManager)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } #[doc = "*Required features: `\"Media_Protection\"`*"] #[cfg(feature = "Media_Protection")] @@ -7539,14 +7455,11 @@ impl MediaStreamSource { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn SampleRendered<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn SampleRendered(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = &::windows::core::Interface::cast::(self)?; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).SampleRendered)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).SampleRendered)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -7944,12 +7857,9 @@ impl MediaStreamSourceSampleRequest { (::windows::core::Vtable::vtable(this).GetDeferral)(::windows::core::Vtable::as_raw(this), result__.as_mut_ptr()).from_abi::(result__) } } - pub fn SetSample<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, MediaStreamSample>>, - { + pub fn SetSample(&self, value: &MediaStreamSample) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).SetSample)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetSample)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } pub fn Sample(&self) -> ::windows::core::Result { let this = self; @@ -8661,14 +8571,11 @@ pub struct MseSourceBuffer(::windows::core::IUnknown); impl MseSourceBuffer { #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn UpdateStarting<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn UpdateStarting(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).UpdateStarting)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).UpdateStarting)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -8679,14 +8586,11 @@ impl MseSourceBuffer { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn Updated<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn Updated(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).Updated)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).Updated)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -8697,14 +8601,11 @@ impl MseSourceBuffer { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn UpdateEnded<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn UpdateEnded(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).UpdateEnded)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).UpdateEnded)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -8715,14 +8616,11 @@ impl MseSourceBuffer { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn ErrorOccurred<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn ErrorOccurred(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).ErrorOccurred)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).ErrorOccurred)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -8733,14 +8631,11 @@ impl MseSourceBuffer { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn Aborted<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn Aborted(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).Aborted)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).Aborted)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -8940,14 +8835,11 @@ pub struct MseSourceBufferList(::windows::core::IUnknown); impl MseSourceBufferList { #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn SourceBufferAdded<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn SourceBufferAdded(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).SourceBufferAdded)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).SourceBufferAdded)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -8958,14 +8850,11 @@ impl MseSourceBufferList { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn SourceBufferRemoved<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn SourceBufferRemoved(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).SourceBufferRemoved)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).SourceBufferRemoved)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -9061,14 +8950,11 @@ impl MseStreamSource { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn Opened<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn Opened(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).Opened)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).Opened)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -9079,14 +8965,11 @@ impl MseStreamSource { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn Ended<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn Ended(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).Ended)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).Ended)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -9097,14 +8980,11 @@ impl MseStreamSource { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn Closed<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn Closed(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).Closed)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).Closed)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -9160,12 +9040,9 @@ impl MseStreamSource { (::windows::core::Vtable::vtable(this).AddSourceBuffer)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(mimetype), result__.as_mut_ptr()).from_abi::(result__) } } - pub fn RemoveSourceBuffer<'a, P0>(&self, buffer: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, MseSourceBuffer>>, - { + pub fn RemoveSourceBuffer(&self, buffer: &MseSourceBuffer) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).RemoveSourceBuffer)(::windows::core::Vtable::as_raw(this), buffer.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).RemoveSourceBuffer)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(buffer)).ok() } } pub fn EndOfStream(&self, status: MseEndOfStreamStatus) -> ::windows::core::Result<()> { let this = self; @@ -9323,14 +9200,11 @@ impl SceneAnalysisEffect { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn SceneAnalyzed<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn SceneAnalyzed(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).SceneAnalyzed)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).SceneAnalyzed)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -10110,13 +9984,10 @@ impl TimedMetadataStreamDescriptor { } #[doc = "*Required features: `\"Media_MediaProperties\"`*"] #[cfg(feature = "Media_MediaProperties")] - pub fn Create<'a, P0>(encodingproperties: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::MediaProperties::TimedMetadataEncodingProperties>>, - { + pub fn Create(encodingproperties: &super::MediaProperties::TimedMetadataEncodingProperties) -> ::windows::core::Result { Self::ITimedMetadataStreamDescriptorFactory(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).Create)(::windows::core::Vtable::as_raw(this), encodingproperties.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).Create)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(encodingproperties), result__.as_mut_ptr()).from_abi::(result__) }) } #[doc(hidden)] @@ -10265,14 +10136,11 @@ impl TimedMetadataTrack { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn CueEntered<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn CueEntered(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).CueEntered)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).CueEntered)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -10283,14 +10151,11 @@ impl TimedMetadataTrack { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn CueExited<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn CueExited(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).CueExited)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).CueExited)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -10301,14 +10166,11 @@ impl TimedMetadataTrack { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn TrackFailed<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn TrackFailed(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).TrackFailed)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).TrackFailed)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -10800,12 +10662,9 @@ impl TimedTextCue { (::windows::core::Vtable::vtable(this).CueRegion)(::windows::core::Vtable::as_raw(this), result__.as_mut_ptr()).from_abi::(result__) } } - pub fn SetCueRegion<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, TimedTextRegion>>, - { + pub fn SetCueRegion(&self, value: &TimedTextRegion) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).SetCueRegion)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetCueRegion)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } pub fn CueStyle(&self) -> ::windows::core::Result { let this = self; @@ -10814,12 +10673,9 @@ impl TimedTextCue { (::windows::core::Vtable::vtable(this).CueStyle)(::windows::core::Vtable::as_raw(this), result__.as_mut_ptr()).from_abi::(result__) } } - pub fn SetCueStyle<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, TimedTextStyle>>, - { + pub fn SetCueStyle(&self, value: &TimedTextStyle) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).SetCueStyle)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetCueStyle)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } #[doc = "*Required features: `\"Foundation_Collections\"`*"] #[cfg(feature = "Foundation_Collections")] @@ -11341,14 +11197,11 @@ pub struct TimedTextSource(::windows::core::IUnknown); impl TimedTextSource { #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn Resolved<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn Resolved(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).Resolved)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).Resolved)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -11371,13 +11224,10 @@ impl TimedTextSource { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn CreateFromUri<'a, P0>(uri: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::Uri>>, - { + pub fn CreateFromUri(uri: &super::super::Foundation::Uri) -> ::windows::core::Result { Self::ITimedTextSourceStatics(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).CreateFromUri)(::windows::core::Vtable::as_raw(this), uri.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).CreateFromUri)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(uri), result__.as_mut_ptr()).from_abi::(result__) }) } #[doc = "*Required features: `\"Storage_Streams\"`*"] @@ -11394,13 +11244,10 @@ impl TimedTextSource { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn CreateFromUriWithLanguage<'a, P0>(uri: P0, defaultlanguage: &::windows::core::HSTRING) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::Uri>>, - { + pub fn CreateFromUriWithLanguage(uri: &super::super::Foundation::Uri, defaultlanguage: &::windows::core::HSTRING) -> ::windows::core::Result { Self::ITimedTextSourceStatics(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).CreateFromUriWithLanguage)(::windows::core::Vtable::as_raw(this), uri.into().abi(), ::core::mem::transmute_copy(defaultlanguage), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).CreateFromUriWithLanguage)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(uri), ::core::mem::transmute_copy(defaultlanguage), result__.as_mut_ptr()).from_abi::(result__) }) } #[doc = "*Required features: `\"Storage_Streams\"`*"] @@ -11419,14 +11266,10 @@ impl TimedTextSource { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn CreateFromUriWithIndex<'a, P0, P1>(uri: P0, indexuri: P1) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::Uri>>, - P1: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::Uri>>, - { + pub fn CreateFromUriWithIndex(uri: &super::super::Foundation::Uri, indexuri: &super::super::Foundation::Uri) -> ::windows::core::Result { Self::ITimedTextSourceStatics2(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).CreateFromUriWithIndex)(::windows::core::Vtable::as_raw(this), uri.into().abi(), indexuri.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).CreateFromUriWithIndex)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(uri), ::core::mem::transmute_copy(indexuri), result__.as_mut_ptr()).from_abi::(result__) }) } #[doc = "*Required features: `\"Storage_Streams\"`*"] @@ -11445,14 +11288,10 @@ impl TimedTextSource { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn CreateFromUriWithIndexAndLanguage<'a, P0, P1>(uri: P0, indexuri: P1, defaultlanguage: &::windows::core::HSTRING) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::Uri>>, - P1: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::Uri>>, - { + pub fn CreateFromUriWithIndexAndLanguage(uri: &super::super::Foundation::Uri, indexuri: &super::super::Foundation::Uri, defaultlanguage: &::windows::core::HSTRING) -> ::windows::core::Result { Self::ITimedTextSourceStatics2(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).CreateFromUriWithIndexAndLanguage)(::windows::core::Vtable::as_raw(this), uri.into().abi(), indexuri.into().abi(), ::core::mem::transmute_copy(defaultlanguage), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).CreateFromUriWithIndexAndLanguage)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(uri), ::core::mem::transmute_copy(indexuri), ::core::mem::transmute_copy(defaultlanguage), result__.as_mut_ptr()).from_abi::(result__) }) } #[doc(hidden)] @@ -11955,12 +11794,9 @@ impl TimedTextSubformat { (::windows::core::Vtable::vtable(this).SubformatStyle)(::windows::core::Vtable::as_raw(this), result__.as_mut_ptr()).from_abi::(result__) } } - pub fn SetSubformatStyle<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, TimedTextStyle>>, - { + pub fn SetSubformatStyle(&self, value: &TimedTextStyle) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).SetSubformatStyle)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetSubformatStyle)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } } impl ::core::clone::Clone for TimedTextSubformat { @@ -12054,14 +11890,11 @@ impl VideoStabilizationEffect { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn EnabledChanged<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn EnabledChanged(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).EnabledChanged)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).EnabledChanged)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -12072,15 +11905,11 @@ impl VideoStabilizationEffect { } #[doc = "*Required features: `\"Media_Capture\"`, `\"Media_Devices\"`, `\"Media_MediaProperties\"`*"] #[cfg(all(feature = "Media_Capture", feature = "Media_Devices", feature = "Media_MediaProperties"))] - pub fn GetRecommendedStreamConfiguration<'a, P0, P1>(&self, controller: P0, desiredproperties: P1) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::Devices::VideoDeviceController>>, - P1: ::std::convert::Into<::windows::core::InParam<'a, super::MediaProperties::VideoEncodingProperties>>, - { + pub fn GetRecommendedStreamConfiguration(&self, controller: &super::Devices::VideoDeviceController, desiredproperties: &super::MediaProperties::VideoEncodingProperties) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).GetRecommendedStreamConfiguration)(::windows::core::Vtable::as_raw(this), controller.into().abi(), desiredproperties.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).GetRecommendedStreamConfiguration)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(controller), ::core::mem::transmute_copy(desiredproperties), result__.as_mut_ptr()).from_abi::(result__) } } } @@ -12439,13 +12268,10 @@ impl VideoStreamDescriptor { } #[doc = "*Required features: `\"Media_MediaProperties\"`*"] #[cfg(feature = "Media_MediaProperties")] - pub fn Create<'a, P0>(encodingproperties: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::MediaProperties::VideoEncodingProperties>>, - { + pub fn Create(encodingproperties: &super::MediaProperties::VideoEncodingProperties) -> ::windows::core::Result { Self::IVideoStreamDescriptorFactory(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).Create)(::windows::core::Vtable::as_raw(this), encodingproperties.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).Create)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(encodingproperties), result__.as_mut_ptr()).from_abi::(result__) }) } #[doc(hidden)] @@ -12594,14 +12420,11 @@ impl VideoTrack { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn OpenFailed<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn OpenFailed(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = &::windows::core::Interface::cast::(self)?; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).OpenFailed)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).OpenFailed)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] diff --git a/crates/libs/windows/src/Windows/Media/Devices/Core/mod.rs b/crates/libs/windows/src/Windows/Media/Devices/Core/mod.rs index 9a05eee2c8..f7176db802 100644 --- a/crates/libs/windows/src/Windows/Media/Devices/Core/mod.rs +++ b/crates/libs/windows/src/Windows/Media/Devices/Core/mod.rs @@ -659,47 +659,33 @@ impl DepthCorrelatedCoordinateMapper { } #[doc = "*Required features: `\"Foundation_Numerics\"`, `\"Perception_Spatial\"`*"] #[cfg(all(feature = "Foundation_Numerics", feature = "Perception_Spatial"))] - pub fn UnprojectPoint<'a, P0>(&self, sourcepoint: super::super::super::Foundation::Point, targetcoordinatesystem: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Perception::Spatial::SpatialCoordinateSystem>>, - { + pub fn UnprojectPoint(&self, sourcepoint: super::super::super::Foundation::Point, targetcoordinatesystem: &super::super::super::Perception::Spatial::SpatialCoordinateSystem) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).UnprojectPoint)(::windows::core::Vtable::as_raw(this), sourcepoint, targetcoordinatesystem.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).UnprojectPoint)(::windows::core::Vtable::as_raw(this), sourcepoint, ::core::mem::transmute_copy(targetcoordinatesystem), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation_Numerics\"`, `\"Perception_Spatial\"`*"] #[cfg(all(feature = "Foundation_Numerics", feature = "Perception_Spatial"))] - pub fn UnprojectPoints<'a, P0>(&self, sourcepoints: &[super::super::super::Foundation::Point], targetcoordinatesystem: P0, results: &mut [super::super::super::Foundation::Numerics::Vector3]) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Perception::Spatial::SpatialCoordinateSystem>>, - { + pub fn UnprojectPoints(&self, sourcepoints: &[super::super::super::Foundation::Point], targetcoordinatesystem: &super::super::super::Perception::Spatial::SpatialCoordinateSystem, results: &mut [super::super::super::Foundation::Numerics::Vector3]) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).UnprojectPoints)(::windows::core::Vtable::as_raw(this), sourcepoints.len() as u32, sourcepoints.as_ptr(), targetcoordinatesystem.into().abi(), results.len() as u32, results.as_mut_ptr()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).UnprojectPoints)(::windows::core::Vtable::as_raw(this), sourcepoints.len() as u32, sourcepoints.as_ptr(), ::core::mem::transmute_copy(targetcoordinatesystem), results.len() as u32, results.as_mut_ptr()).ok() } } #[doc = "*Required features: `\"Foundation\"`, `\"Perception_Spatial\"`*"] #[cfg(all(feature = "Foundation", feature = "Perception_Spatial"))] - pub fn MapPoint<'a, P0, P1>(&self, sourcepoint: super::super::super::Foundation::Point, targetcoordinatesystem: P0, targetcameraintrinsics: P1) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Perception::Spatial::SpatialCoordinateSystem>>, - P1: ::std::convert::Into<::windows::core::InParam<'a, CameraIntrinsics>>, - { + pub fn MapPoint(&self, sourcepoint: super::super::super::Foundation::Point, targetcoordinatesystem: &super::super::super::Perception::Spatial::SpatialCoordinateSystem, targetcameraintrinsics: &CameraIntrinsics) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).MapPoint)(::windows::core::Vtable::as_raw(this), sourcepoint, targetcoordinatesystem.into().abi(), targetcameraintrinsics.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).MapPoint)(::windows::core::Vtable::as_raw(this), sourcepoint, ::core::mem::transmute_copy(targetcoordinatesystem), ::core::mem::transmute_copy(targetcameraintrinsics), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`, `\"Perception_Spatial\"`*"] #[cfg(all(feature = "Foundation", feature = "Perception_Spatial"))] - pub fn MapPoints<'a, P0, P1>(&self, sourcepoints: &[super::super::super::Foundation::Point], targetcoordinatesystem: P0, targetcameraintrinsics: P1, results: &mut [super::super::super::Foundation::Point]) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Perception::Spatial::SpatialCoordinateSystem>>, - P1: ::std::convert::Into<::windows::core::InParam<'a, CameraIntrinsics>>, - { + pub fn MapPoints(&self, sourcepoints: &[super::super::super::Foundation::Point], targetcoordinatesystem: &super::super::super::Perception::Spatial::SpatialCoordinateSystem, targetcameraintrinsics: &CameraIntrinsics, results: &mut [super::super::super::Foundation::Point]) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).MapPoints)(::windows::core::Vtable::as_raw(this), sourcepoints.len() as u32, sourcepoints.as_ptr(), targetcoordinatesystem.into().abi(), targetcameraintrinsics.into().abi(), results.len() as u32, results.as_mut_ptr()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).MapPoints)(::windows::core::Vtable::as_raw(this), sourcepoints.len() as u32, sourcepoints.as_ptr(), ::core::mem::transmute_copy(targetcoordinatesystem), ::core::mem::transmute_copy(targetcameraintrinsics), results.len() as u32, results.as_mut_ptr()).ok() } } } impl ::core::clone::Clone for DepthCorrelatedCoordinateMapper { diff --git a/crates/libs/windows/src/Windows/Media/Devices/mod.rs b/crates/libs/windows/src/Windows/Media/Devices/mod.rs index d18957e2d5..aab506b9b3 100644 --- a/crates/libs/windows/src/Windows/Media/Devices/mod.rs +++ b/crates/libs/windows/src/Windows/Media/Devices/mod.rs @@ -1744,12 +1744,9 @@ impl AdvancedPhotoControl { (::windows::core::Vtable::vtable(this).Mode)(::windows::core::Vtable::as_raw(this), result__.as_mut_ptr()).from_abi::(result__) } } - pub fn Configure<'a, P0>(&self, settings: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, AdvancedPhotoCaptureSettings>>, - { + pub fn Configure(&self, settings: &AdvancedPhotoCaptureSettings) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).Configure)(::windows::core::Vtable::as_raw(this), settings.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).Configure)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(settings)).ok() } } } impl ::core::clone::Clone for AdvancedPhotoControl { @@ -2161,14 +2158,11 @@ pub struct AudioDeviceModulesManager(::windows::core::IUnknown); impl AudioDeviceModulesManager { #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn ModuleNotificationReceived<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn ModuleNotificationReceived(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).ModuleNotificationReceived)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).ModuleNotificationReceived)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -2306,14 +2300,11 @@ impl CallControl { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn AnswerRequested<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, CallControlEventHandler>>, - { + pub fn AnswerRequested(&self, handler: &CallControlEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).AnswerRequested)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).AnswerRequested)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -2324,14 +2315,11 @@ impl CallControl { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn HangUpRequested<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, CallControlEventHandler>>, - { + pub fn HangUpRequested(&self, handler: &CallControlEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).HangUpRequested)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).HangUpRequested)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -2342,14 +2330,11 @@ impl CallControl { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn DialRequested<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, DialRequestedEventHandler>>, - { + pub fn DialRequested(&self, handler: &DialRequestedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).DialRequested)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).DialRequested)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -2360,14 +2345,11 @@ impl CallControl { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn RedialRequested<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, RedialRequestedEventHandler>>, - { + pub fn RedialRequested(&self, handler: &RedialRequestedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).RedialRequested)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).RedialRequested)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -2378,14 +2360,11 @@ impl CallControl { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn KeypadPressed<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, KeypadPressedEventHandler>>, - { + pub fn KeypadPressed(&self, handler: &KeypadPressedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).KeypadPressed)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).KeypadPressed)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -2396,14 +2375,11 @@ impl CallControl { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn AudioTransferRequested<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, CallControlEventHandler>>, - { + pub fn AudioTransferRequested(&self, handler: &CallControlEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).AudioTransferRequested)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).AudioTransferRequested)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -2514,14 +2490,11 @@ impl CameraOcclusionInfo { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn StateChanged<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn StateChanged(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).StateChanged)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).StateChanged)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -3296,12 +3269,9 @@ impl DigitalWindowControl { let this = self; unsafe { (::windows::core::Vtable::vtable(this).Configure)(::windows::core::Vtable::as_raw(this), digitalwindowmode).ok() } } - pub fn ConfigureWithBounds<'a, P0>(&self, digitalwindowmode: DigitalWindowMode, digitalwindowbounds: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, DigitalWindowBounds>>, - { + pub fn ConfigureWithBounds(&self, digitalwindowmode: DigitalWindowMode, digitalwindowbounds: &DigitalWindowBounds) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).ConfigureWithBounds)(::windows::core::Vtable::as_raw(this), digitalwindowmode, digitalwindowbounds.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).ConfigureWithBounds)(::windows::core::Vtable::as_raw(this), digitalwindowmode, ::core::mem::transmute_copy(digitalwindowbounds)).ok() } } #[doc = "*Required features: `\"Foundation_Collections\"`*"] #[cfg(feature = "Foundation_Collections")] @@ -4031,12 +4001,9 @@ impl FocusControl { (::windows::core::Vtable::vtable(this).LockAsync)(::windows::core::Vtable::as_raw(this), result__.as_mut_ptr()).from_abi::(result__) } } - pub fn Configure<'a, P0>(&self, settings: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, FocusSettings>>, - { + pub fn Configure(&self, settings: &FocusSettings) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).Configure)(::windows::core::Vtable::as_raw(this), settings.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).Configure)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(settings)).ok() } } } impl ::core::clone::Clone for FocusControl { @@ -5057,13 +5024,10 @@ impl MediaDevice { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn DefaultAudioCaptureDeviceChanged<'a, P0>(handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler<::windows::core::IInspectable, DefaultAudioCaptureDeviceChangedEventArgs>>>, - { + pub fn DefaultAudioCaptureDeviceChanged(handler: &super::super::Foundation::TypedEventHandler<::windows::core::IInspectable, DefaultAudioCaptureDeviceChangedEventArgs>) -> ::windows::core::Result { Self::IMediaDeviceStatics(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).DefaultAudioCaptureDeviceChanged)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).DefaultAudioCaptureDeviceChanged)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) }) } #[doc = "*Required features: `\"Foundation\"`*"] @@ -5073,13 +5037,10 @@ impl MediaDevice { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn DefaultAudioRenderDeviceChanged<'a, P0>(handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler<::windows::core::IInspectable, DefaultAudioRenderDeviceChangedEventArgs>>>, - { + pub fn DefaultAudioRenderDeviceChanged(handler: &super::super::Foundation::TypedEventHandler<::windows::core::IInspectable, DefaultAudioRenderDeviceChangedEventArgs>) -> ::windows::core::Result { Self::IMediaDeviceStatics(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).DefaultAudioRenderDeviceChanged)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).DefaultAudioRenderDeviceChanged)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) }) } #[doc = "*Required features: `\"Foundation\"`*"] @@ -7058,12 +7019,9 @@ impl ZoomControl { (::windows::core::Vtable::vtable(this).Mode)(::windows::core::Vtable::as_raw(this), result__.as_mut_ptr()).from_abi::(result__) } } - pub fn Configure<'a, P0>(&self, settings: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, ZoomSettings>>, - { + pub fn Configure(&self, settings: &ZoomSettings) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).Configure)(::windows::core::Vtable::as_raw(this), settings.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).Configure)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(settings)).ok() } } } impl ::core::clone::Clone for ZoomControl { @@ -8203,12 +8161,9 @@ impl CallControlEventHandler { let com = CallControlEventHandlerBox:: { vtable: &CallControlEventHandlerBox::::VTABLE, count: ::windows::core::RefCount::new(1), invoke }; unsafe { ::core::mem::transmute(::windows::core::alloc::boxed::Box::new(com)) } } - pub fn Invoke<'a, P0>(&self, sender: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, CallControl>>, - { + pub fn Invoke(&self, sender: &CallControl) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).Invoke)(::windows::core::Vtable::as_raw(this), sender.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).Invoke)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(sender)).ok() } } } #[repr(C)] @@ -8292,13 +8247,9 @@ impl DialRequestedEventHandler { let com = DialRequestedEventHandlerBox:: { vtable: &DialRequestedEventHandlerBox::::VTABLE, count: ::windows::core::RefCount::new(1), invoke }; unsafe { ::core::mem::transmute(::windows::core::alloc::boxed::Box::new(com)) } } - pub fn Invoke<'a, P0, P1>(&self, sender: P0, e: P1) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, CallControl>>, - P1: ::std::convert::Into<::windows::core::InParam<'a, DialRequestedEventArgs>>, - { + pub fn Invoke(&self, sender: &CallControl, e: &DialRequestedEventArgs) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).Invoke)(::windows::core::Vtable::as_raw(this), sender.into().abi(), e.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).Invoke)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(sender), ::core::mem::transmute_copy(e)).ok() } } } #[repr(C)] @@ -8382,13 +8333,9 @@ impl KeypadPressedEventHandler { let com = KeypadPressedEventHandlerBox:: { vtable: &KeypadPressedEventHandlerBox::::VTABLE, count: ::windows::core::RefCount::new(1), invoke }; unsafe { ::core::mem::transmute(::windows::core::alloc::boxed::Box::new(com)) } } - pub fn Invoke<'a, P0, P1>(&self, sender: P0, e: P1) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, CallControl>>, - P1: ::std::convert::Into<::windows::core::InParam<'a, KeypadPressedEventArgs>>, - { + pub fn Invoke(&self, sender: &CallControl, e: &KeypadPressedEventArgs) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).Invoke)(::windows::core::Vtable::as_raw(this), sender.into().abi(), e.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).Invoke)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(sender), ::core::mem::transmute_copy(e)).ok() } } } #[repr(C)] @@ -8472,13 +8419,9 @@ impl RedialRequestedEventHandler { let com = RedialRequestedEventHandlerBox:: { vtable: &RedialRequestedEventHandlerBox::::VTABLE, count: ::windows::core::RefCount::new(1), invoke }; unsafe { ::core::mem::transmute(::windows::core::alloc::boxed::Box::new(com)) } } - pub fn Invoke<'a, P0, P1>(&self, sender: P0, e: P1) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, CallControl>>, - P1: ::std::convert::Into<::windows::core::InParam<'a, RedialRequestedEventArgs>>, - { + pub fn Invoke(&self, sender: &CallControl, e: &RedialRequestedEventArgs) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).Invoke)(::windows::core::Vtable::as_raw(this), sender.into().abi(), e.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).Invoke)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(sender), ::core::mem::transmute_copy(e)).ok() } } } #[repr(C)] diff --git a/crates/libs/windows/src/Windows/Media/DialProtocol/mod.rs b/crates/libs/windows/src/Windows/Media/DialProtocol/mod.rs index 07ade4038f..932b25a7a9 100644 --- a/crates/libs/windows/src/Windows/Media/DialProtocol/mod.rs +++ b/crates/libs/windows/src/Windows/Media/DialProtocol/mod.rs @@ -499,13 +499,10 @@ impl DialDevice { } #[doc = "*Required features: `\"Devices_Enumeration\"`, `\"Foundation\"`*"] #[cfg(all(feature = "Devices_Enumeration", feature = "Foundation"))] - pub fn DeviceInfoSupportsDialAsync<'a, P0>(device: P0) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Devices::Enumeration::DeviceInformation>>, - { + pub fn DeviceInfoSupportsDialAsync(device: &super::super::Devices::Enumeration::DeviceInformation) -> ::windows::core::Result> { Self::IDialDeviceStatics(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).DeviceInfoSupportsDialAsync)(::windows::core::Vtable::as_raw(this), device.into().abi(), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).DeviceInfoSupportsDialAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(device), result__.as_mut_ptr()).from_abi::>(result__) }) } #[doc(hidden)] @@ -607,14 +604,11 @@ impl DialDevicePicker { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn DialDeviceSelected<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn DialDeviceSelected(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).DialDeviceSelected)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).DialDeviceSelected)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -625,14 +619,11 @@ impl DialDevicePicker { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn DisconnectButtonClicked<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn DisconnectButtonClicked(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).DisconnectButtonClicked)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).DisconnectButtonClicked)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -643,14 +634,11 @@ impl DialDevicePicker { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn DialDevicePickerDismissed<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn DialDevicePickerDismissed(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).DialDevicePickerDismissed)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).DialDevicePickerDismissed)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -693,12 +681,9 @@ impl DialDevicePicker { let this = self; unsafe { (::windows::core::Vtable::vtable(this).Hide)(::windows::core::Vtable::as_raw(this)).ok() } } - pub fn SetDisplayStatus<'a, P0>(&self, device: P0, status: DialDeviceDisplayStatus) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, DialDevice>>, - { + pub fn SetDisplayStatus(&self, device: &DialDevice, status: DialDeviceDisplayStatus) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).SetDisplayStatus)(::windows::core::Vtable::as_raw(this), device.into().abi(), status).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetDisplayStatus)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(device), status).ok() } } } impl ::core::clone::Clone for DialDevicePicker { diff --git a/crates/libs/windows/src/Windows/Media/Editing/mod.rs b/crates/libs/windows/src/Windows/Media/Editing/mod.rs index 637d574e54..c787972cc8 100644 --- a/crates/libs/windows/src/Windows/Media/Editing/mod.rs +++ b/crates/libs/windows/src/Windows/Media/Editing/mod.rs @@ -526,13 +526,10 @@ impl BackgroundAudioTrack { (::windows::core::Vtable::vtable(this).AudioEffectDefinitions)(::windows::core::Vtable::as_raw(this), result__.as_mut_ptr()).from_abi::>(result__) } } - pub fn CreateFromEmbeddedAudioTrack<'a, P0>(embeddedaudiotrack: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, EmbeddedAudioTrack>>, - { + pub fn CreateFromEmbeddedAudioTrack(embeddedaudiotrack: &EmbeddedAudioTrack) -> ::windows::core::Result { Self::IBackgroundAudioTrackStatics(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).CreateFromEmbeddedAudioTrack)(::windows::core::Vtable::as_raw(this), embeddedaudiotrack.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).CreateFromEmbeddedAudioTrack)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(embeddedaudiotrack), result__.as_mut_ptr()).from_abi::(result__) }) } #[doc = "*Required features: `\"Foundation\"`, `\"Storage\"`*"] @@ -1075,16 +1072,15 @@ impl MediaComposition { } #[doc = "*Required features: `\"Foundation\"`, `\"Media_MediaProperties\"`, `\"Media_Transcoding\"`, `\"Storage\"`*"] #[cfg(all(feature = "Foundation", feature = "Media_MediaProperties", feature = "Media_Transcoding", feature = "Storage"))] - pub fn RenderToFileWithProfileAsync<'a, P0, E0, P1>(&self, destination: P0, trimmingpreference: MediaTrimmingPreference, encodingprofile: P1) -> ::windows::core::Result> + pub fn RenderToFileWithProfileAsync<'a, P0, E0>(&self, destination: P0, trimmingpreference: MediaTrimmingPreference, encodingprofile: &super::MediaProperties::MediaEncodingProfile) -> ::windows::core::Result> where P0: ::std::convert::TryInto<::windows::core::InParam<'a, super::super::Storage::IStorageFile>, Error = E0>, E0: ::std::convert::Into<::windows::core::Error>, - P1: ::std::convert::Into<::windows::core::InParam<'a, super::MediaProperties::MediaEncodingProfile>>, { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).RenderToFileWithProfileAsync)(::windows::core::Vtable::as_raw(this), destination.try_into().map_err(|e| e.into())?.abi(), trimmingpreference, encodingprofile.into().abi(), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).RenderToFileWithProfileAsync)(::windows::core::Vtable::as_raw(this), destination.try_into().map_err(|e| e.into())?.abi(), trimmingpreference, ::core::mem::transmute_copy(encodingprofile), result__.as_mut_ptr()).from_abi::>(result__) } } #[doc = "*Required features: `\"Media_MediaProperties\"`*"] @@ -1107,14 +1103,11 @@ impl MediaComposition { } #[doc = "*Required features: `\"Media_Core\"`, `\"Media_MediaProperties\"`*"] #[cfg(all(feature = "Media_Core", feature = "Media_MediaProperties"))] - pub fn GenerateMediaStreamSourceWithProfile<'a, P0>(&self, encodingprofile: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::MediaProperties::MediaEncodingProfile>>, - { + pub fn GenerateMediaStreamSourceWithProfile(&self, encodingprofile: &super::MediaProperties::MediaEncodingProfile) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).GenerateMediaStreamSourceWithProfile)(::windows::core::Vtable::as_raw(this), encodingprofile.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).GenerateMediaStreamSourceWithProfile)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(encodingprofile), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Media_Core\"`*"] @@ -1137,13 +1130,10 @@ impl MediaComposition { } #[doc = "*Required features: `\"Foundation\"`, `\"Storage\"`*"] #[cfg(all(feature = "Foundation", feature = "Storage"))] - pub fn LoadAsync<'a, P0>(file: P0) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Storage::StorageFile>>, - { + pub fn LoadAsync(file: &super::super::Storage::StorageFile) -> ::windows::core::Result> { Self::IMediaCompositionStatics(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).LoadAsync)(::windows::core::Vtable::as_raw(this), file.into().abi(), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).LoadAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(file), result__.as_mut_ptr()).from_abi::>(result__) }) } #[doc(hidden)] @@ -1286,24 +1276,18 @@ impl MediaOverlay { let this = self; unsafe { (::windows::core::Vtable::vtable(this).SetAudioEnabled)(::windows::core::Vtable::as_raw(this), value).ok() } } - pub fn Create<'a, P0>(clip: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, MediaClip>>, - { + pub fn Create(clip: &MediaClip) -> ::windows::core::Result { Self::IMediaOverlayFactory(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).Create)(::windows::core::Vtable::as_raw(this), clip.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).Create)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(clip), result__.as_mut_ptr()).from_abi::(result__) }) } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn CreateWithPositionAndOpacity<'a, P0>(clip: P0, position: super::super::Foundation::Rect, opacity: f64) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, MediaClip>>, - { + pub fn CreateWithPositionAndOpacity(clip: &MediaClip, position: super::super::Foundation::Rect, opacity: f64) -> ::windows::core::Result { Self::IMediaOverlayFactory(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).CreateWithPositionAndOpacity)(::windows::core::Vtable::as_raw(this), clip.into().abi(), position, opacity, result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).CreateWithPositionAndOpacity)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(clip), position, opacity, result__.as_mut_ptr()).from_abi::(result__) }) } #[doc(hidden)] diff --git a/crates/libs/windows/src/Windows/Media/Effects/mod.rs b/crates/libs/windows/src/Windows/Media/Effects/mod.rs index 1b59dbccd7..d49340c95e 100644 --- a/crates/libs/windows/src/Windows/Media/Effects/mod.rs +++ b/crates/libs/windows/src/Windows/Media/Effects/mod.rs @@ -256,19 +256,13 @@ impl IBasicAudioEffect { } #[doc = "*Required features: `\"Media_MediaProperties\"`*"] #[cfg(feature = "Media_MediaProperties")] - pub fn SetEncodingProperties<'a, P0>(&self, encodingproperties: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::MediaProperties::AudioEncodingProperties>>, - { + pub fn SetEncodingProperties(&self, encodingproperties: &super::MediaProperties::AudioEncodingProperties) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).SetEncodingProperties)(::windows::core::Vtable::as_raw(this), encodingproperties.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetEncodingProperties)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(encodingproperties)).ok() } } - pub fn ProcessFrame<'a, P0>(&self, context: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, ProcessAudioFrameContext>>, - { + pub fn ProcessFrame(&self, context: &ProcessAudioFrameContext) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).ProcessFrame)(::windows::core::Vtable::as_raw(this), context.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).ProcessFrame)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(context)).ok() } } pub fn Close(&self, reason: MediaEffectClosedReason) -> ::windows::core::Result<()> { let this = self; @@ -420,21 +414,17 @@ impl IBasicVideoEffect { } #[doc = "*Required features: `\"Graphics_DirectX_Direct3D11\"`, `\"Media_MediaProperties\"`*"] #[cfg(all(feature = "Graphics_DirectX_Direct3D11", feature = "Media_MediaProperties"))] - pub fn SetEncodingProperties<'a, P0, P1, E1>(&self, encodingproperties: P0, device: P1) -> ::windows::core::Result<()> + pub fn SetEncodingProperties<'a, P0, E0>(&self, encodingproperties: &super::MediaProperties::VideoEncodingProperties, device: P0) -> ::windows::core::Result<()> where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::MediaProperties::VideoEncodingProperties>>, - P1: ::std::convert::TryInto<::windows::core::InParam<'a, super::super::Graphics::DirectX::Direct3D11::IDirect3DDevice>, Error = E1>, - E1: ::std::convert::Into<::windows::core::Error>, + P0: ::std::convert::TryInto<::windows::core::InParam<'a, super::super::Graphics::DirectX::Direct3D11::IDirect3DDevice>, Error = E0>, + E0: ::std::convert::Into<::windows::core::Error>, { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).SetEncodingProperties)(::windows::core::Vtable::as_raw(this), encodingproperties.into().abi(), device.try_into().map_err(|e| e.into())?.abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetEncodingProperties)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(encodingproperties), device.try_into().map_err(|e| e.into())?.abi()).ok() } } - pub fn ProcessFrame<'a, P0>(&self, context: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, ProcessVideoFrameContext>>, - { + pub fn ProcessFrame(&self, context: &ProcessVideoFrameContext) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).ProcessFrame)(::windows::core::Vtable::as_raw(this), context.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).ProcessFrame)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(context)).ok() } } pub fn Close(&self, reason: MediaEffectClosedReason) -> ::windows::core::Result<()> { let this = self; @@ -637,21 +627,17 @@ impl IVideoCompositor { } #[doc = "*Required features: `\"Graphics_DirectX_Direct3D11\"`, `\"Media_MediaProperties\"`*"] #[cfg(all(feature = "Graphics_DirectX_Direct3D11", feature = "Media_MediaProperties"))] - pub fn SetEncodingProperties<'a, P0, P1, E1>(&self, backgroundproperties: P0, device: P1) -> ::windows::core::Result<()> + pub fn SetEncodingProperties<'a, P0, E0>(&self, backgroundproperties: &super::MediaProperties::VideoEncodingProperties, device: P0) -> ::windows::core::Result<()> where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::MediaProperties::VideoEncodingProperties>>, - P1: ::std::convert::TryInto<::windows::core::InParam<'a, super::super::Graphics::DirectX::Direct3D11::IDirect3DDevice>, Error = E1>, - E1: ::std::convert::Into<::windows::core::Error>, + P0: ::std::convert::TryInto<::windows::core::InParam<'a, super::super::Graphics::DirectX::Direct3D11::IDirect3DDevice>, Error = E0>, + E0: ::std::convert::Into<::windows::core::Error>, { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).SetEncodingProperties)(::windows::core::Vtable::as_raw(this), backgroundproperties.into().abi(), device.try_into().map_err(|e| e.into())?.abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetEncodingProperties)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(backgroundproperties), device.try_into().map_err(|e| e.into())?.abi()).ok() } } - pub fn CompositeFrame<'a, P0>(&self, context: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, CompositeVideoFrameContext>>, - { + pub fn CompositeFrame(&self, context: &CompositeVideoFrameContext) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).CompositeFrame)(::windows::core::Vtable::as_raw(this), context.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).CompositeFrame)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(context)).ok() } } pub fn Close(&self, reason: MediaEffectClosedReason) -> ::windows::core::Result<()> { let this = self; @@ -1106,14 +1092,11 @@ pub struct AudioCaptureEffectsManager(::windows::core::IUnknown); impl AudioCaptureEffectsManager { #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn AudioCaptureEffectsChanged<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn AudioCaptureEffectsChanged(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).AudioCaptureEffectsChanged)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).AudioCaptureEffectsChanged)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -1449,14 +1432,11 @@ pub struct AudioRenderEffectsManager(::windows::core::IUnknown); impl AudioRenderEffectsManager { #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn AudioRenderEffectsChanged<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn AudioRenderEffectsChanged(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).AudioRenderEffectsChanged)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).AudioRenderEffectsChanged)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] diff --git a/crates/libs/windows/src/Windows/Media/FaceAnalysis/mod.rs b/crates/libs/windows/src/Windows/Media/FaceAnalysis/mod.rs index 6a0eab7b73..5d2778046c 100644 --- a/crates/libs/windows/src/Windows/Media/FaceAnalysis/mod.rs +++ b/crates/libs/windows/src/Windows/Media/FaceAnalysis/mod.rs @@ -226,26 +226,20 @@ pub struct FaceDetector(::windows::core::IUnknown); impl FaceDetector { #[doc = "*Required features: `\"Foundation_Collections\"`, `\"Graphics_Imaging\"`*"] #[cfg(all(feature = "Foundation_Collections", feature = "Graphics_Imaging"))] - pub fn DetectFacesAsync<'a, P0>(&self, image: P0) -> ::windows::core::Result>> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Graphics::Imaging::SoftwareBitmap>>, - { + pub fn DetectFacesAsync(&self, image: &super::super::Graphics::Imaging::SoftwareBitmap) -> ::windows::core::Result>> { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).DetectFacesAsync)(::windows::core::Vtable::as_raw(this), image.into().abi(), result__.as_mut_ptr()).from_abi::>>(result__) + (::windows::core::Vtable::vtable(this).DetectFacesAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(image), result__.as_mut_ptr()).from_abi::>>(result__) } } #[doc = "*Required features: `\"Foundation_Collections\"`, `\"Graphics_Imaging\"`*"] #[cfg(all(feature = "Foundation_Collections", feature = "Graphics_Imaging"))] - pub fn DetectFacesWithSearchAreaAsync<'a, P0>(&self, image: P0, searcharea: super::super::Graphics::Imaging::BitmapBounds) -> ::windows::core::Result>> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Graphics::Imaging::SoftwareBitmap>>, - { + pub fn DetectFacesWithSearchAreaAsync(&self, image: &super::super::Graphics::Imaging::SoftwareBitmap, searcharea: super::super::Graphics::Imaging::BitmapBounds) -> ::windows::core::Result>> { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).DetectFacesWithSearchAreaAsync)(::windows::core::Vtable::as_raw(this), image.into().abi(), searcharea, result__.as_mut_ptr()).from_abi::>>(result__) + (::windows::core::Vtable::vtable(this).DetectFacesWithSearchAreaAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(image), searcharea, result__.as_mut_ptr()).from_abi::>>(result__) } } #[doc = "*Required features: `\"Graphics_Imaging\"`*"] @@ -384,14 +378,11 @@ pub struct FaceTracker(::windows::core::IUnknown); impl FaceTracker { #[doc = "*Required features: `\"Foundation_Collections\"`*"] #[cfg(feature = "Foundation_Collections")] - pub fn ProcessNextFrameAsync<'a, P0>(&self, videoframe: P0) -> ::windows::core::Result>> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::VideoFrame>>, - { + pub fn ProcessNextFrameAsync(&self, videoframe: &super::VideoFrame) -> ::windows::core::Result>> { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).ProcessNextFrameAsync)(::windows::core::Vtable::as_raw(this), videoframe.into().abi(), result__.as_mut_ptr()).from_abi::>>(result__) + (::windows::core::Vtable::vtable(this).ProcessNextFrameAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(videoframe), result__.as_mut_ptr()).from_abi::>>(result__) } } #[doc = "*Required features: `\"Graphics_Imaging\"`*"] diff --git a/crates/libs/windows/src/Windows/Media/Import/mod.rs b/crates/libs/windows/src/Windows/Media/Import/mod.rs index a58e09dde4..a12999a7f8 100644 --- a/crates/libs/windows/src/Windows/Media/Import/mod.rs +++ b/crates/libs/windows/src/Windows/Media/Import/mod.rs @@ -838,14 +838,11 @@ impl PhotoImportFindItemsResult { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn SelectionChanged<'a, P0>(&self, value: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn SelectionChanged(&self, value: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).SelectionChanged)(::windows::core::Vtable::as_raw(this), value.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).SelectionChanged)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -865,14 +862,11 @@ impl PhotoImportFindItemsResult { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn ItemImported<'a, P0>(&self, value: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn ItemImported(&self, value: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).ItemImported)(::windows::core::Vtable::as_raw(this), value.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).ItemImported)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] diff --git a/crates/libs/windows/src/Windows/Media/MediaProperties/mod.rs b/crates/libs/windows/src/Windows/Media/MediaProperties/mod.rs index ad716bcf9b..69a55359ed 100644 --- a/crates/libs/windows/src/Windows/Media/MediaProperties/mod.rs +++ b/crates/libs/windows/src/Windows/Media/MediaProperties/mod.rs @@ -1449,12 +1449,9 @@ impl MediaEncodingProfile { static SHARED: ::windows::core::FactoryCache = ::windows::core::FactoryCache::new(); SHARED.call(callback) } - pub fn SetAudio<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, AudioEncodingProperties>>, - { + pub fn SetAudio(&self, value: &AudioEncodingProperties) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).SetAudio)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetAudio)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } pub fn Audio(&self) -> ::windows::core::Result { let this = self; @@ -1463,12 +1460,9 @@ impl MediaEncodingProfile { (::windows::core::Vtable::vtable(this).Audio)(::windows::core::Vtable::as_raw(this), result__.as_mut_ptr()).from_abi::(result__) } } - pub fn SetVideo<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, VideoEncodingProperties>>, - { + pub fn SetVideo(&self, value: &VideoEncodingProperties) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).SetVideo)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetVideo)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } pub fn Video(&self) -> ::windows::core::Result { let this = self; @@ -1477,12 +1471,9 @@ impl MediaEncodingProfile { (::windows::core::Vtable::vtable(this).Video)(::windows::core::Vtable::as_raw(this), result__.as_mut_ptr()).from_abi::(result__) } } - pub fn SetContainer<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, ContainerEncodingProperties>>, - { + pub fn SetContainer(&self, value: &ContainerEncodingProperties) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).SetContainer)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetContainer)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } pub fn Container(&self) -> ::windows::core::Result { let this = self; diff --git a/crates/libs/windows/src/Windows/Media/Miracast/mod.rs b/crates/libs/windows/src/Windows/Media/Miracast/mod.rs index 8a4fccd74b..bb69d0f24b 100644 --- a/crates/libs/windows/src/Windows/Media/Miracast/mod.rs +++ b/crates/libs/windows/src/Windows/Media/Miracast/mod.rs @@ -508,26 +508,20 @@ impl MiracastReceiver { (::windows::core::Vtable::vtable(this).GetCurrentSettingsAsync)(::windows::core::Vtable::as_raw(this), result__.as_mut_ptr()).from_abi::>(result__) } } - pub fn DisconnectAllAndApplySettings<'a, P0>(&self, settings: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, MiracastReceiverSettings>>, - { + pub fn DisconnectAllAndApplySettings(&self, settings: &MiracastReceiverSettings) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).DisconnectAllAndApplySettings)(::windows::core::Vtable::as_raw(this), settings.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).DisconnectAllAndApplySettings)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(settings), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn DisconnectAllAndApplySettingsAsync<'a, P0>(&self, settings: P0) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, MiracastReceiverSettings>>, - { + pub fn DisconnectAllAndApplySettingsAsync(&self, settings: &MiracastReceiverSettings) -> ::windows::core::Result> { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).DisconnectAllAndApplySettingsAsync)(::windows::core::Vtable::as_raw(this), settings.into().abi(), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).DisconnectAllAndApplySettingsAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(settings), result__.as_mut_ptr()).from_abi::>(result__) } } pub fn GetStatus(&self) -> ::windows::core::Result { @@ -548,14 +542,11 @@ impl MiracastReceiver { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn StatusChanged<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn StatusChanged(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).StatusChanged)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).StatusChanged)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -566,38 +557,29 @@ impl MiracastReceiver { } #[doc = "*Required features: `\"ApplicationModel_Core\"`*"] #[cfg(feature = "ApplicationModel_Core")] - pub fn CreateSession<'a, P0>(&self, view: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::ApplicationModel::Core::CoreApplicationView>>, - { + pub fn CreateSession(&self, view: &super::super::ApplicationModel::Core::CoreApplicationView) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).CreateSession)(::windows::core::Vtable::as_raw(this), view.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).CreateSession)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(view), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"ApplicationModel_Core\"`, `\"Foundation\"`*"] #[cfg(all(feature = "ApplicationModel_Core", feature = "Foundation"))] - pub fn CreateSessionAsync<'a, P0>(&self, view: P0) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::ApplicationModel::Core::CoreApplicationView>>, - { + pub fn CreateSessionAsync(&self, view: &super::super::ApplicationModel::Core::CoreApplicationView) -> ::windows::core::Result> { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).CreateSessionAsync)(::windows::core::Vtable::as_raw(this), view.into().abi(), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).CreateSessionAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(view), result__.as_mut_ptr()).from_abi::>(result__) } } pub fn ClearKnownTransmitters(&self) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Vtable::vtable(this).ClearKnownTransmitters)(::windows::core::Vtable::as_raw(this)).ok() } } - pub fn RemoveKnownTransmitter<'a, P0>(&self, transmitter: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, MiracastTransmitter>>, - { + pub fn RemoveKnownTransmitter(&self, transmitter: &MiracastTransmitter) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).RemoveKnownTransmitter)(::windows::core::Vtable::as_raw(this), transmitter.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).RemoveKnownTransmitter)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(transmitter)).ok() } } } impl ::core::clone::Clone for MiracastReceiver { @@ -1038,14 +1020,11 @@ impl MiracastReceiverCursorImageChannel { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn ImageStreamChanged<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn ImageStreamChanged(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).ImageStreamChanged)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).ImageStreamChanged)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -1056,14 +1035,11 @@ impl MiracastReceiverCursorImageChannel { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn PositionChanged<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn PositionChanged(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).PositionChanged)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).PositionChanged)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -1350,14 +1326,11 @@ impl MiracastReceiverGameControllerDevice { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn Changed<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn Changed(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).Changed)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).Changed)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -1545,14 +1518,11 @@ impl MiracastReceiverKeyboardDevice { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn Changed<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn Changed(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).Changed)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).Changed)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -1739,14 +1709,11 @@ impl MiracastReceiverSession { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn ConnectionCreated<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn ConnectionCreated(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).ConnectionCreated)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).ConnectionCreated)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -1757,14 +1724,11 @@ impl MiracastReceiverSession { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn MediaSourceCreated<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn MediaSourceCreated(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).MediaSourceCreated)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).MediaSourceCreated)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -1775,14 +1739,11 @@ impl MiracastReceiverSession { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn Disconnected<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn Disconnected(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).Disconnected)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).Disconnected)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -2249,23 +2210,17 @@ impl MiracastReceiverStreamControl { (::windows::core::Vtable::vtable(this).GetVideoStreamSettingsAsync)(::windows::core::Vtable::as_raw(this), result__.as_mut_ptr()).from_abi::>(result__) } } - pub fn SuggestVideoStreamSettings<'a, P0>(&self, settings: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, MiracastReceiverVideoStreamSettings>>, - { + pub fn SuggestVideoStreamSettings(&self, settings: &MiracastReceiverVideoStreamSettings) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).SuggestVideoStreamSettings)(::windows::core::Vtable::as_raw(this), settings.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SuggestVideoStreamSettings)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(settings)).ok() } } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn SuggestVideoStreamSettingsAsync<'a, P0>(&self, settings: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, MiracastReceiverVideoStreamSettings>>, - { + pub fn SuggestVideoStreamSettingsAsync(&self, settings: &MiracastReceiverVideoStreamSettings) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).SuggestVideoStreamSettingsAsync)(::windows::core::Vtable::as_raw(this), settings.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).SuggestVideoStreamSettingsAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(settings), result__.as_mut_ptr()).from_abi::(result__) } } pub fn MuteAudio(&self) -> ::windows::core::Result { diff --git a/crates/libs/windows/src/Windows/Media/Ocr/mod.rs b/crates/libs/windows/src/Windows/Media/Ocr/mod.rs index 663eccdc6d..7934c884c7 100644 --- a/crates/libs/windows/src/Windows/Media/Ocr/mod.rs +++ b/crates/libs/windows/src/Windows/Media/Ocr/mod.rs @@ -115,14 +115,11 @@ pub struct OcrEngine(::windows::core::IUnknown); impl OcrEngine { #[doc = "*Required features: `\"Foundation\"`, `\"Graphics_Imaging\"`*"] #[cfg(all(feature = "Foundation", feature = "Graphics_Imaging"))] - pub fn RecognizeAsync<'a, P0>(&self, bitmap: P0) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Graphics::Imaging::SoftwareBitmap>>, - { + pub fn RecognizeAsync(&self, bitmap: &super::super::Graphics::Imaging::SoftwareBitmap) -> ::windows::core::Result> { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).RecognizeAsync)(::windows::core::Vtable::as_raw(this), bitmap.into().abi(), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).RecognizeAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(bitmap), result__.as_mut_ptr()).from_abi::>(result__) } } #[doc = "*Required features: `\"Globalization\"`*"] @@ -150,24 +147,18 @@ impl OcrEngine { } #[doc = "*Required features: `\"Globalization\"`*"] #[cfg(feature = "Globalization")] - pub fn IsLanguageSupported<'a, P0>(language: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Globalization::Language>>, - { + pub fn IsLanguageSupported(language: &super::super::Globalization::Language) -> ::windows::core::Result { Self::IOcrEngineStatics(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).IsLanguageSupported)(::windows::core::Vtable::as_raw(this), language.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).IsLanguageSupported)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(language), result__.as_mut_ptr()).from_abi::(result__) }) } #[doc = "*Required features: `\"Globalization\"`*"] #[cfg(feature = "Globalization")] - pub fn TryCreateFromLanguage<'a, P0>(language: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Globalization::Language>>, - { + pub fn TryCreateFromLanguage(language: &super::super::Globalization::Language) -> ::windows::core::Result { Self::IOcrEngineStatics(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).TryCreateFromLanguage)(::windows::core::Vtable::as_raw(this), language.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).TryCreateFromLanguage)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(language), result__.as_mut_ptr()).from_abi::(result__) }) } pub fn TryCreateFromUserProfileLanguages() -> ::windows::core::Result { diff --git a/crates/libs/windows/src/Windows/Media/PlayTo/mod.rs b/crates/libs/windows/src/Windows/Media/PlayTo/mod.rs index 71591112d6..45f366b63c 100644 --- a/crates/libs/windows/src/Windows/Media/PlayTo/mod.rs +++ b/crates/libs/windows/src/Windows/Media/PlayTo/mod.rs @@ -759,14 +759,11 @@ impl PlayToConnection { } #[doc = "*Required features: `\"Foundation\"`, `\"deprecated\"`*"] #[cfg(all(feature = "Foundation", feature = "deprecated"))] - pub fn StateChanged<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn StateChanged(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).StateChanged)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).StateChanged)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`, `\"deprecated\"`*"] @@ -777,14 +774,11 @@ impl PlayToConnection { } #[doc = "*Required features: `\"Foundation\"`, `\"deprecated\"`*"] #[cfg(all(feature = "Foundation", feature = "deprecated"))] - pub fn Transferred<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn Transferred(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).Transferred)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).Transferred)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`, `\"deprecated\"`*"] @@ -795,14 +789,11 @@ impl PlayToConnection { } #[doc = "*Required features: `\"Foundation\"`, `\"deprecated\"`*"] #[cfg(all(feature = "Foundation", feature = "deprecated"))] - pub fn Error<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn Error(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).Error)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).Error)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`, `\"deprecated\"`*"] @@ -1215,14 +1206,11 @@ pub struct PlayToManager(::windows::core::IUnknown); impl PlayToManager { #[doc = "*Required features: `\"Foundation\"`, `\"deprecated\"`*"] #[cfg(all(feature = "Foundation", feature = "deprecated"))] - pub fn SourceRequested<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn SourceRequested(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).SourceRequested)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).SourceRequested)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`, `\"deprecated\"`*"] @@ -1233,14 +1221,11 @@ impl PlayToManager { } #[doc = "*Required features: `\"Foundation\"`, `\"deprecated\"`*"] #[cfg(all(feature = "Foundation", feature = "deprecated"))] - pub fn SourceSelected<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn SourceSelected(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).SourceSelected)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).SourceSelected)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`, `\"deprecated\"`*"] @@ -1377,14 +1362,11 @@ impl PlayToReceiver { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn PlayRequested<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn PlayRequested(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).PlayRequested)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).PlayRequested)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -1395,14 +1377,11 @@ impl PlayToReceiver { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn PauseRequested<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn PauseRequested(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).PauseRequested)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).PauseRequested)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -1413,14 +1392,11 @@ impl PlayToReceiver { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn SourceChangeRequested<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn SourceChangeRequested(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).SourceChangeRequested)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).SourceChangeRequested)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -1431,14 +1407,11 @@ impl PlayToReceiver { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn PlaybackRateChangeRequested<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn PlaybackRateChangeRequested(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).PlaybackRateChangeRequested)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).PlaybackRateChangeRequested)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -1449,14 +1422,11 @@ impl PlayToReceiver { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn CurrentTimeChangeRequested<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn CurrentTimeChangeRequested(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).CurrentTimeChangeRequested)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).CurrentTimeChangeRequested)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -1467,14 +1437,11 @@ impl PlayToReceiver { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn MuteChangeRequested<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn MuteChangeRequested(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).MuteChangeRequested)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).MuteChangeRequested)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -1485,14 +1452,11 @@ impl PlayToReceiver { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn VolumeChangeRequested<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn VolumeChangeRequested(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).VolumeChangeRequested)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).VolumeChangeRequested)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -1503,14 +1467,11 @@ impl PlayToReceiver { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn TimeUpdateRequested<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn TimeUpdateRequested(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).TimeUpdateRequested)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).TimeUpdateRequested)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -1521,14 +1482,11 @@ impl PlayToReceiver { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn StopRequested<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn StopRequested(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).StopRequested)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).StopRequested)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -1749,12 +1707,9 @@ impl PlayToSource { } #[doc = "*Required features: `\"deprecated\"`*"] #[cfg(feature = "deprecated")] - pub fn SetNext<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, PlayToSource>>, - { + pub fn SetNext(&self, value: &PlayToSource) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).SetNext)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetNext)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } #[doc = "*Required features: `\"deprecated\"`*"] #[cfg(feature = "deprecated")] @@ -1773,12 +1728,9 @@ impl PlayToSource { } #[doc = "*Required features: `\"Foundation\"`, `\"deprecated\"`*"] #[cfg(all(feature = "Foundation", feature = "deprecated"))] - pub fn SetPreferredSourceUri<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::Uri>>, - { + pub fn SetPreferredSourceUri(&self, value: &super::super::Foundation::Uri) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).SetPreferredSourceUri)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetPreferredSourceUri)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } } #[cfg(feature = "deprecated")] @@ -1986,12 +1938,9 @@ impl PlayToSourceRequest { } #[doc = "*Required features: `\"deprecated\"`*"] #[cfg(feature = "deprecated")] - pub fn SetSource<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, PlayToSource>>, - { + pub fn SetSource(&self, value: &PlayToSource) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).SetSource)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetSource)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } } #[cfg(feature = "deprecated")] diff --git a/crates/libs/windows/src/Windows/Media/Playback/mod.rs b/crates/libs/windows/src/Windows/Media/Playback/mod.rs index fd0b75998d..6dcecf318b 100644 --- a/crates/libs/windows/src/Windows/Media/Playback/mod.rs +++ b/crates/libs/windows/src/Windows/Media/Playback/mod.rs @@ -2056,13 +2056,10 @@ impl BackgroundMediaPlayer { } #[doc = "*Required features: `\"Foundation\"`, `\"deprecated\"`*"] #[cfg(all(feature = "Foundation", feature = "deprecated"))] - pub fn MessageReceivedFromBackground<'a, P0>(value: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::EventHandler>>, - { + pub fn MessageReceivedFromBackground(value: &super::super::Foundation::EventHandler) -> ::windows::core::Result { Self::IBackgroundMediaPlayerStatics(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).MessageReceivedFromBackground)(::windows::core::Vtable::as_raw(this), value.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).MessageReceivedFromBackground)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value), result__.as_mut_ptr()).from_abi::(result__) }) } #[doc = "*Required features: `\"Foundation\"`, `\"deprecated\"`*"] @@ -2072,13 +2069,10 @@ impl BackgroundMediaPlayer { } #[doc = "*Required features: `\"Foundation\"`, `\"deprecated\"`*"] #[cfg(all(feature = "Foundation", feature = "deprecated"))] - pub fn MessageReceivedFromForeground<'a, P0>(value: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::EventHandler>>, - { + pub fn MessageReceivedFromForeground(value: &super::super::Foundation::EventHandler) -> ::windows::core::Result { Self::IBackgroundMediaPlayerStatics(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).MessageReceivedFromForeground)(::windows::core::Vtable::as_raw(this), value.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).MessageReceivedFromForeground)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value), result__.as_mut_ptr()).from_abi::(result__) }) } #[doc = "*Required features: `\"Foundation\"`, `\"deprecated\"`*"] @@ -2088,19 +2082,13 @@ impl BackgroundMediaPlayer { } #[doc = "*Required features: `\"Foundation_Collections\"`, `\"deprecated\"`*"] #[cfg(all(feature = "Foundation_Collections", feature = "deprecated"))] - pub fn SendMessageToBackground<'a, P0>(value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::Collections::ValueSet>>, - { - Self::IBackgroundMediaPlayerStatics(|this| unsafe { (::windows::core::Vtable::vtable(this).SendMessageToBackground)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() }) + pub fn SendMessageToBackground(value: &super::super::Foundation::Collections::ValueSet) -> ::windows::core::Result<()> { + Self::IBackgroundMediaPlayerStatics(|this| unsafe { (::windows::core::Vtable::vtable(this).SendMessageToBackground)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() }) } #[doc = "*Required features: `\"Foundation_Collections\"`, `\"deprecated\"`*"] #[cfg(all(feature = "Foundation_Collections", feature = "deprecated"))] - pub fn SendMessageToForeground<'a, P0>(value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::Collections::ValueSet>>, - { - Self::IBackgroundMediaPlayerStatics(|this| unsafe { (::windows::core::Vtable::vtable(this).SendMessageToForeground)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() }) + pub fn SendMessageToForeground(value: &super::super::Foundation::Collections::ValueSet) -> ::windows::core::Result<()> { + Self::IBackgroundMediaPlayerStatics(|this| unsafe { (::windows::core::Vtable::vtable(this).SendMessageToForeground)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() }) } #[doc = "*Required features: `\"deprecated\"`*"] #[cfg(feature = "deprecated")] @@ -2429,14 +2417,11 @@ pub struct MediaBreakManager(::windows::core::IUnknown); impl MediaBreakManager { #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn BreaksSeekedOver<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn BreaksSeekedOver(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).BreaksSeekedOver)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).BreaksSeekedOver)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -2447,14 +2432,11 @@ impl MediaBreakManager { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn BreakStarted<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn BreakStarted(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).BreakStarted)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).BreakStarted)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -2465,14 +2447,11 @@ impl MediaBreakManager { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn BreakEnded<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn BreakEnded(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).BreakEnded)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).BreakEnded)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -2483,14 +2462,11 @@ impl MediaBreakManager { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn BreakSkipped<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn BreakSkipped(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).BreakSkipped)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).BreakSkipped)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -2513,12 +2489,9 @@ impl MediaBreakManager { (::windows::core::Vtable::vtable(this).PlaybackSession)(::windows::core::Vtable::as_raw(this), result__.as_mut_ptr()).from_abi::(result__) } } - pub fn PlayBreak<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, MediaBreak>>, - { + pub fn PlayBreak(&self, value: &MediaBreak) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).PlayBreak)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).PlayBreak)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } pub fn SkipCurrentBreak(&self) -> ::windows::core::Result<()> { let this = self; @@ -2595,14 +2568,11 @@ pub struct MediaBreakSchedule(::windows::core::IUnknown); impl MediaBreakSchedule { #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn ScheduleChanged<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn ScheduleChanged(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).ScheduleChanged)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).ScheduleChanged)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -2611,19 +2581,13 @@ impl MediaBreakSchedule { let this = self; unsafe { (::windows::core::Vtable::vtable(this).RemoveScheduleChanged)(::windows::core::Vtable::as_raw(this), token).ok() } } - pub fn InsertMidrollBreak<'a, P0>(&self, mediabreak: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, MediaBreak>>, - { + pub fn InsertMidrollBreak(&self, mediabreak: &MediaBreak) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).InsertMidrollBreak)(::windows::core::Vtable::as_raw(this), mediabreak.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).InsertMidrollBreak)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(mediabreak)).ok() } } - pub fn RemoveMidrollBreak<'a, P0>(&self, mediabreak: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, MediaBreak>>, - { + pub fn RemoveMidrollBreak(&self, mediabreak: &MediaBreak) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).RemoveMidrollBreak)(::windows::core::Vtable::as_raw(this), mediabreak.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).RemoveMidrollBreak)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(mediabreak)).ok() } } #[doc = "*Required features: `\"Foundation_Collections\"`*"] #[cfg(feature = "Foundation_Collections")] @@ -2634,12 +2598,9 @@ impl MediaBreakSchedule { (::windows::core::Vtable::vtable(this).MidrollBreaks)(::windows::core::Vtable::as_raw(this), result__.as_mut_ptr()).from_abi::>(result__) } } - pub fn SetPrerollBreak<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, MediaBreak>>, - { + pub fn SetPrerollBreak(&self, value: &MediaBreak) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).SetPrerollBreak)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetPrerollBreak)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } pub fn PrerollBreak(&self) -> ::windows::core::Result { let this = self; @@ -2648,12 +2609,9 @@ impl MediaBreakSchedule { (::windows::core::Vtable::vtable(this).PrerollBreak)(::windows::core::Vtable::as_raw(this), result__.as_mut_ptr()).from_abi::(result__) } } - pub fn SetPostrollBreak<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, MediaBreak>>, - { + pub fn SetPostrollBreak(&self, value: &MediaBreak) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).SetPostrollBreak)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetPostrollBreak)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } pub fn PostrollBreak(&self) -> ::windows::core::Result { let this = self; @@ -3022,12 +2980,9 @@ impl MediaItemDisplayProperties { } #[doc = "*Required features: `\"Storage_Streams\"`*"] #[cfg(feature = "Storage_Streams")] - pub fn SetThumbnail<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Storage::Streams::RandomAccessStreamReference>>, - { + pub fn SetThumbnail(&self, value: &super::super::Storage::Streams::RandomAccessStreamReference) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).SetThumbnail)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetThumbnail)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } pub fn ClearAll(&self) -> ::windows::core::Result<()> { let this = self; @@ -3115,14 +3070,11 @@ impl MediaPlaybackAudioTrackList { } #[doc = "*Required features: `\"Foundation\"`, `\"Media_Core\"`*"] #[cfg(all(feature = "Foundation", feature = "Media_Core"))] - pub fn SelectedIndexChanged<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn SelectedIndexChanged(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = &::windows::core::Interface::cast::(self)?; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).SelectedIndexChanged)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).SelectedIndexChanged)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`, `\"Media_Core\"`*"] @@ -3166,14 +3118,11 @@ impl MediaPlaybackAudioTrackList { } #[doc = "*Required features: `\"Foundation_Collections\"`, `\"Media_Core\"`*"] #[cfg(all(feature = "Foundation_Collections", feature = "Media_Core"))] - pub fn IndexOf<'a, P0>(&self, value: P0, index: &mut u32) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::Core::AudioTrack>>, - { + pub fn IndexOf(&self, value: &super::Core::AudioTrack, index: &mut u32) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).IndexOf)(::windows::core::Vtable::as_raw(this), value.into().abi(), index, result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).IndexOf)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value), index, result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation_Collections\"`, `\"Media_Core\"`*"] @@ -3442,14 +3391,11 @@ impl MediaPlaybackCommandManager { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn PlayReceived<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn PlayReceived(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).PlayReceived)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).PlayReceived)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -3460,14 +3406,11 @@ impl MediaPlaybackCommandManager { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn PauseReceived<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn PauseReceived(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).PauseReceived)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).PauseReceived)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -3478,14 +3421,11 @@ impl MediaPlaybackCommandManager { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn NextReceived<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn NextReceived(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).NextReceived)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).NextReceived)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -3496,14 +3436,11 @@ impl MediaPlaybackCommandManager { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn PreviousReceived<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn PreviousReceived(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).PreviousReceived)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).PreviousReceived)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -3514,14 +3451,11 @@ impl MediaPlaybackCommandManager { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn FastForwardReceived<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn FastForwardReceived(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).FastForwardReceived)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).FastForwardReceived)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -3532,14 +3466,11 @@ impl MediaPlaybackCommandManager { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn RewindReceived<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn RewindReceived(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).RewindReceived)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).RewindReceived)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -3550,14 +3481,11 @@ impl MediaPlaybackCommandManager { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn ShuffleReceived<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn ShuffleReceived(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).ShuffleReceived)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).ShuffleReceived)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -3568,14 +3496,11 @@ impl MediaPlaybackCommandManager { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn AutoRepeatModeReceived<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn AutoRepeatModeReceived(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).AutoRepeatModeReceived)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).AutoRepeatModeReceived)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -3586,14 +3511,11 @@ impl MediaPlaybackCommandManager { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn PositionReceived<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn PositionReceived(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).PositionReceived)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).PositionReceived)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -3604,14 +3526,11 @@ impl MediaPlaybackCommandManager { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn RateReceived<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn RateReceived(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).RateReceived)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).RateReceived)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -3812,14 +3731,11 @@ impl MediaPlaybackCommandManagerCommandBehavior { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn IsEnabledChanged<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn IsEnabledChanged(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).IsEnabledChanged)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).IsEnabledChanged)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -4723,14 +4639,11 @@ pub struct MediaPlaybackItem(::windows::core::IUnknown); impl MediaPlaybackItem { #[doc = "*Required features: `\"Foundation_Collections\"`*"] #[cfg(feature = "Foundation_Collections")] - pub fn AudioTracksChanged<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn AudioTracksChanged(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).AudioTracksChanged)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).AudioTracksChanged)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -4741,14 +4654,11 @@ impl MediaPlaybackItem { } #[doc = "*Required features: `\"Foundation_Collections\"`*"] #[cfg(feature = "Foundation_Collections")] - pub fn VideoTracksChanged<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn VideoTracksChanged(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).VideoTracksChanged)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).VideoTracksChanged)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -4759,14 +4669,11 @@ impl MediaPlaybackItem { } #[doc = "*Required features: `\"Foundation_Collections\"`*"] #[cfg(feature = "Foundation_Collections")] - pub fn TimedMetadataTracksChanged<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn TimedMetadataTracksChanged(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).TimedMetadataTracksChanged)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).TimedMetadataTracksChanged)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -4854,12 +4761,9 @@ impl MediaPlaybackItem { (::windows::core::Vtable::vtable(this).GetDisplayProperties)(::windows::core::Vtable::as_raw(this), result__.as_mut_ptr()).from_abi::(result__) } } - pub fn ApplyDisplayProperties<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, MediaItemDisplayProperties>>, - { + pub fn ApplyDisplayProperties(&self, value: &MediaItemDisplayProperties) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).ApplyDisplayProperties)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).ApplyDisplayProperties)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } pub fn IsDisabledInPlaybackList(&self) -> ::windows::core::Result { let this = &::windows::core::Interface::cast::(self)?; @@ -4892,46 +4796,34 @@ impl MediaPlaybackItem { } #[doc = "*Required features: `\"Media_Core\"`*"] #[cfg(feature = "Media_Core")] - pub fn Create<'a, P0>(source: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::Core::MediaSource>>, - { + pub fn Create(source: &super::Core::MediaSource) -> ::windows::core::Result { Self::IMediaPlaybackItemFactory(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).Create)(::windows::core::Vtable::as_raw(this), source.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).Create)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(source), result__.as_mut_ptr()).from_abi::(result__) }) } #[doc = "*Required features: `\"Foundation\"`, `\"Media_Core\"`*"] #[cfg(all(feature = "Foundation", feature = "Media_Core"))] - pub fn CreateWithStartTime<'a, P0>(source: P0, starttime: super::super::Foundation::TimeSpan) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::Core::MediaSource>>, - { + pub fn CreateWithStartTime(source: &super::Core::MediaSource, starttime: super::super::Foundation::TimeSpan) -> ::windows::core::Result { Self::IMediaPlaybackItemFactory2(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).CreateWithStartTime)(::windows::core::Vtable::as_raw(this), source.into().abi(), starttime, result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).CreateWithStartTime)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(source), starttime, result__.as_mut_ptr()).from_abi::(result__) }) } #[doc = "*Required features: `\"Foundation\"`, `\"Media_Core\"`*"] #[cfg(all(feature = "Foundation", feature = "Media_Core"))] - pub fn CreateWithStartTimeAndDurationLimit<'a, P0>(source: P0, starttime: super::super::Foundation::TimeSpan, durationlimit: super::super::Foundation::TimeSpan) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::Core::MediaSource>>, - { + pub fn CreateWithStartTimeAndDurationLimit(source: &super::Core::MediaSource, starttime: super::super::Foundation::TimeSpan, durationlimit: super::super::Foundation::TimeSpan) -> ::windows::core::Result { Self::IMediaPlaybackItemFactory2(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).CreateWithStartTimeAndDurationLimit)(::windows::core::Vtable::as_raw(this), source.into().abi(), starttime, durationlimit, result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).CreateWithStartTimeAndDurationLimit)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(source), starttime, durationlimit, result__.as_mut_ptr()).from_abi::(result__) }) } #[doc = "*Required features: `\"Media_Core\"`*"] #[cfg(feature = "Media_Core")] - pub fn FindFromMediaSource<'a, P0>(source: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::Core::MediaSource>>, - { + pub fn FindFromMediaSource(source: &super::Core::MediaSource) -> ::windows::core::Result { Self::IMediaPlaybackItemStatics(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).FindFromMediaSource)(::windows::core::Vtable::as_raw(this), source.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).FindFromMediaSource)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(source), result__.as_mut_ptr()).from_abi::(result__) }) } #[doc(hidden)] @@ -5288,14 +5180,11 @@ impl MediaPlaybackList { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn ItemFailed<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn ItemFailed(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).ItemFailed)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).ItemFailed)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -5306,14 +5195,11 @@ impl MediaPlaybackList { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn CurrentItemChanged<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn CurrentItemChanged(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).CurrentItemChanged)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).CurrentItemChanged)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -5324,14 +5210,11 @@ impl MediaPlaybackList { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn ItemOpened<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn ItemOpened(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).ItemOpened)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).ItemOpened)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -5432,12 +5315,9 @@ impl MediaPlaybackList { (::windows::core::Vtable::vtable(this).StartingItem)(::windows::core::Vtable::as_raw(this), result__.as_mut_ptr()).from_abi::(result__) } } - pub fn SetStartingItem<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, MediaPlaybackItem>>, - { + pub fn SetStartingItem(&self, value: &MediaPlaybackItem) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).SetStartingItem)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetStartingItem)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } #[doc = "*Required features: `\"Foundation_Collections\"`*"] #[cfg(feature = "Foundation_Collections")] @@ -5567,14 +5447,11 @@ pub struct MediaPlaybackSession(::windows::core::IUnknown); impl MediaPlaybackSession { #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn PlaybackStateChanged<'a, P0>(&self, value: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn PlaybackStateChanged(&self, value: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).PlaybackStateChanged)(::windows::core::Vtable::as_raw(this), value.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).PlaybackStateChanged)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -5585,14 +5462,11 @@ impl MediaPlaybackSession { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn PlaybackRateChanged<'a, P0>(&self, value: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn PlaybackRateChanged(&self, value: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).PlaybackRateChanged)(::windows::core::Vtable::as_raw(this), value.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).PlaybackRateChanged)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -5603,14 +5477,11 @@ impl MediaPlaybackSession { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn SeekCompleted<'a, P0>(&self, value: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn SeekCompleted(&self, value: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).SeekCompleted)(::windows::core::Vtable::as_raw(this), value.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).SeekCompleted)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -5621,14 +5492,11 @@ impl MediaPlaybackSession { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn BufferingStarted<'a, P0>(&self, value: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn BufferingStarted(&self, value: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).BufferingStarted)(::windows::core::Vtable::as_raw(this), value.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).BufferingStarted)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -5639,14 +5507,11 @@ impl MediaPlaybackSession { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn BufferingEnded<'a, P0>(&self, value: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn BufferingEnded(&self, value: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).BufferingEnded)(::windows::core::Vtable::as_raw(this), value.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).BufferingEnded)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -5657,14 +5522,11 @@ impl MediaPlaybackSession { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn BufferingProgressChanged<'a, P0>(&self, value: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn BufferingProgressChanged(&self, value: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).BufferingProgressChanged)(::windows::core::Vtable::as_raw(this), value.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).BufferingProgressChanged)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -5675,14 +5537,11 @@ impl MediaPlaybackSession { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn DownloadProgressChanged<'a, P0>(&self, value: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn DownloadProgressChanged(&self, value: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).DownloadProgressChanged)(::windows::core::Vtable::as_raw(this), value.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).DownloadProgressChanged)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -5693,14 +5552,11 @@ impl MediaPlaybackSession { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn NaturalDurationChanged<'a, P0>(&self, value: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn NaturalDurationChanged(&self, value: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).NaturalDurationChanged)(::windows::core::Vtable::as_raw(this), value.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).NaturalDurationChanged)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -5711,14 +5567,11 @@ impl MediaPlaybackSession { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn PositionChanged<'a, P0>(&self, value: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn PositionChanged(&self, value: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).PositionChanged)(::windows::core::Vtable::as_raw(this), value.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).PositionChanged)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -5729,14 +5582,11 @@ impl MediaPlaybackSession { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn NaturalVideoSizeChanged<'a, P0>(&self, value: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn NaturalVideoSizeChanged(&self, value: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).NaturalVideoSizeChanged)(::windows::core::Vtable::as_raw(this), value.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).NaturalVideoSizeChanged)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -5875,14 +5725,11 @@ impl MediaPlaybackSession { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn BufferedRangesChanged<'a, P0>(&self, value: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn BufferedRangesChanged(&self, value: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = &::windows::core::Interface::cast::(self)?; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).BufferedRangesChanged)(::windows::core::Vtable::as_raw(this), value.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).BufferedRangesChanged)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -5893,14 +5740,11 @@ impl MediaPlaybackSession { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn PlayedRangesChanged<'a, P0>(&self, value: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn PlayedRangesChanged(&self, value: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = &::windows::core::Interface::cast::(self)?; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).PlayedRangesChanged)(::windows::core::Vtable::as_raw(this), value.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).PlayedRangesChanged)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -5911,14 +5755,11 @@ impl MediaPlaybackSession { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn SeekableRangesChanged<'a, P0>(&self, value: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn SeekableRangesChanged(&self, value: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = &::windows::core::Interface::cast::(self)?; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).SeekableRangesChanged)(::windows::core::Vtable::as_raw(this), value.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).SeekableRangesChanged)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -5929,14 +5770,11 @@ impl MediaPlaybackSession { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn SupportedPlaybackRatesChanged<'a, P0>(&self, value: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn SupportedPlaybackRatesChanged(&self, value: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = &::windows::core::Interface::cast::(self)?; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).SupportedPlaybackRatesChanged)(::windows::core::Vtable::as_raw(this), value.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).SupportedPlaybackRatesChanged)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -6385,14 +6223,11 @@ impl MediaPlaybackTimedMetadataTrackList { } #[doc = "*Required features: `\"Foundation_Collections\"`, `\"Media_Core\"`*"] #[cfg(all(feature = "Foundation_Collections", feature = "Media_Core"))] - pub fn PresentationModeChanged<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn PresentationModeChanged(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = &::windows::core::Interface::cast::(self)?; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).PresentationModeChanged)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).PresentationModeChanged)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -6432,14 +6267,11 @@ impl MediaPlaybackTimedMetadataTrackList { } #[doc = "*Required features: `\"Foundation_Collections\"`, `\"Media_Core\"`*"] #[cfg(all(feature = "Foundation_Collections", feature = "Media_Core"))] - pub fn IndexOf<'a, P0>(&self, value: P0, index: &mut u32) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::Core::TimedMetadataTrack>>, - { + pub fn IndexOf(&self, value: &super::Core::TimedMetadataTrack, index: &mut u32) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).IndexOf)(::windows::core::Vtable::as_raw(this), value.into().abi(), index, result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).IndexOf)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value), index, result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation_Collections\"`, `\"Media_Core\"`*"] @@ -6609,14 +6441,11 @@ impl MediaPlaybackVideoTrackList { } #[doc = "*Required features: `\"Foundation\"`, `\"Media_Core\"`*"] #[cfg(all(feature = "Foundation", feature = "Media_Core"))] - pub fn SelectedIndexChanged<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn SelectedIndexChanged(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = &::windows::core::Interface::cast::(self)?; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).SelectedIndexChanged)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).SelectedIndexChanged)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`, `\"Media_Core\"`*"] @@ -6660,14 +6489,11 @@ impl MediaPlaybackVideoTrackList { } #[doc = "*Required features: `\"Foundation_Collections\"`, `\"Media_Core\"`*"] #[cfg(all(feature = "Foundation_Collections", feature = "Media_Core"))] - pub fn IndexOf<'a, P0>(&self, value: P0, index: &mut u32) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::Core::VideoTrack>>, - { + pub fn IndexOf(&self, value: &super::Core::VideoTrack, index: &mut u32) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).IndexOf)(::windows::core::Vtable::as_raw(this), value.into().abi(), index, result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).IndexOf)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value), index, result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation_Collections\"`, `\"Media_Core\"`*"] @@ -6998,14 +6824,11 @@ impl MediaPlayer { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn MediaOpened<'a, P0>(&self, value: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn MediaOpened(&self, value: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).MediaOpened)(::windows::core::Vtable::as_raw(this), value.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).MediaOpened)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -7016,14 +6839,11 @@ impl MediaPlayer { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn MediaEnded<'a, P0>(&self, value: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn MediaEnded(&self, value: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).MediaEnded)(::windows::core::Vtable::as_raw(this), value.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).MediaEnded)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -7034,14 +6854,11 @@ impl MediaPlayer { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn MediaFailed<'a, P0>(&self, value: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn MediaFailed(&self, value: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).MediaFailed)(::windows::core::Vtable::as_raw(this), value.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).MediaFailed)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -7052,14 +6869,11 @@ impl MediaPlayer { } #[doc = "*Required features: `\"Foundation\"`, `\"deprecated\"`*"] #[cfg(all(feature = "Foundation", feature = "deprecated"))] - pub fn CurrentStateChanged<'a, P0>(&self, value: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn CurrentStateChanged(&self, value: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).CurrentStateChanged)(::windows::core::Vtable::as_raw(this), value.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).CurrentStateChanged)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`, `\"deprecated\"`*"] @@ -7070,14 +6884,11 @@ impl MediaPlayer { } #[doc = "*Required features: `\"Foundation\"`, `\"deprecated\"`*"] #[cfg(all(feature = "Foundation", feature = "deprecated"))] - pub fn PlaybackMediaMarkerReached<'a, P0>(&self, value: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn PlaybackMediaMarkerReached(&self, value: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).PlaybackMediaMarkerReached)(::windows::core::Vtable::as_raw(this), value.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).PlaybackMediaMarkerReached)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`, `\"deprecated\"`*"] @@ -7088,14 +6899,11 @@ impl MediaPlayer { } #[doc = "*Required features: `\"Foundation\"`, `\"deprecated\"`*"] #[cfg(all(feature = "Foundation", feature = "deprecated"))] - pub fn MediaPlayerRateChanged<'a, P0>(&self, value: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn MediaPlayerRateChanged(&self, value: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).MediaPlayerRateChanged)(::windows::core::Vtable::as_raw(this), value.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).MediaPlayerRateChanged)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`, `\"deprecated\"`*"] @@ -7106,14 +6914,11 @@ impl MediaPlayer { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn VolumeChanged<'a, P0>(&self, value: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn VolumeChanged(&self, value: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).VolumeChanged)(::windows::core::Vtable::as_raw(this), value.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).VolumeChanged)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -7124,14 +6929,11 @@ impl MediaPlayer { } #[doc = "*Required features: `\"Foundation\"`, `\"deprecated\"`*"] #[cfg(all(feature = "Foundation", feature = "deprecated"))] - pub fn SeekCompleted<'a, P0>(&self, value: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn SeekCompleted(&self, value: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).SeekCompleted)(::windows::core::Vtable::as_raw(this), value.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).SeekCompleted)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`, `\"deprecated\"`*"] @@ -7142,14 +6944,11 @@ impl MediaPlayer { } #[doc = "*Required features: `\"Foundation\"`, `\"deprecated\"`*"] #[cfg(all(feature = "Foundation", feature = "deprecated"))] - pub fn BufferingStarted<'a, P0>(&self, value: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn BufferingStarted(&self, value: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).BufferingStarted)(::windows::core::Vtable::as_raw(this), value.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).BufferingStarted)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`, `\"deprecated\"`*"] @@ -7160,14 +6959,11 @@ impl MediaPlayer { } #[doc = "*Required features: `\"Foundation\"`, `\"deprecated\"`*"] #[cfg(all(feature = "Foundation", feature = "deprecated"))] - pub fn BufferingEnded<'a, P0>(&self, value: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn BufferingEnded(&self, value: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).BufferingEnded)(::windows::core::Vtable::as_raw(this), value.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).BufferingEnded)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`, `\"deprecated\"`*"] @@ -7186,12 +6982,9 @@ impl MediaPlayer { } #[doc = "*Required features: `\"Foundation\"`, `\"deprecated\"`*"] #[cfg(all(feature = "Foundation", feature = "deprecated"))] - pub fn SetUriSource<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::Uri>>, - { + pub fn SetUriSource(&self, value: &super::super::Foundation::Uri) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).SetUriSource)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetUriSource)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } pub fn SystemMediaTransportControls(&self) -> ::windows::core::Result { let this = &::windows::core::Interface::cast::(self)?; @@ -7224,14 +7017,11 @@ impl MediaPlayer { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn IsMutedChanged<'a, P0>(&self, value: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn IsMutedChanged(&self, value: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = &::windows::core::Interface::cast::(self)?; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).IsMutedChanged)(::windows::core::Vtable::as_raw(this), value.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).IsMutedChanged)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -7242,14 +7032,11 @@ impl MediaPlayer { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn SourceChanged<'a, P0>(&self, value: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn SourceChanged(&self, value: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = &::windows::core::Interface::cast::(self)?; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).SourceChanged)(::windows::core::Vtable::as_raw(this), value.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).SourceChanged)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -7316,12 +7103,9 @@ impl MediaPlayer { } #[doc = "*Required features: `\"Devices_Enumeration\"`*"] #[cfg(feature = "Devices_Enumeration")] - pub fn SetAudioDevice<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Devices::Enumeration::DeviceInformation>>, - { + pub fn SetAudioDevice(&self, value: &super::super::Devices::Enumeration::DeviceInformation) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).SetAudioDevice)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetAudioDevice)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } pub fn TimelineController(&self) -> ::windows::core::Result { let this = &::windows::core::Interface::cast::(self)?; @@ -7330,12 +7114,9 @@ impl MediaPlayer { (::windows::core::Vtable::vtable(this).TimelineController)(::windows::core::Vtable::as_raw(this), result__.as_mut_ptr()).from_abi::(result__) } } - pub fn SetTimelineController<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::MediaTimelineController>>, - { + pub fn SetTimelineController(&self, value: &super::MediaTimelineController) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).SetTimelineController)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetTimelineController)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] @@ -7384,26 +7165,20 @@ impl MediaPlayer { } #[doc = "*Required features: `\"UI_Composition\"`*"] #[cfg(feature = "UI_Composition")] - pub fn GetSurface<'a, P0>(&self, compositor: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::UI::Composition::Compositor>>, - { + pub fn GetSurface(&self, compositor: &super::super::UI::Composition::Compositor) -> ::windows::core::Result { let this = &::windows::core::Interface::cast::(self)?; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).GetSurface)(::windows::core::Vtable::as_raw(this), compositor.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).GetSurface)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(compositor), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn VideoFrameAvailable<'a, P0>(&self, value: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn VideoFrameAvailable(&self, value: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = &::windows::core::Interface::cast::(self)?; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).VideoFrameAvailable)(::windows::core::Vtable::as_raw(this), value.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).VideoFrameAvailable)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -7457,14 +7232,11 @@ impl MediaPlayer { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn SubtitleFrameChanged<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn SubtitleFrameChanged(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = &::windows::core::Interface::cast::(self)?; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).SubtitleFrameChanged)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).SubtitleFrameChanged)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -7543,12 +7315,9 @@ impl MediaPlayer { } #[doc = "*Required features: `\"Media_Protection\"`*"] #[cfg(feature = "Media_Protection")] - pub fn SetProtectionManager<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::Protection::MediaProtectionManager>>, - { + pub fn SetProtectionManager(&self, value: &super::Protection::MediaProtectionManager) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).SetProtectionManager)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetProtectionManager)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } #[doc = "*Required features: `\"Storage\"`, `\"deprecated\"`*"] #[cfg(all(feature = "Storage", feature = "deprecated"))] @@ -8257,12 +8026,9 @@ impl PlaybackMediaMarkerSequence { (::windows::core::Vtable::vtable(this).Size)(::windows::core::Vtable::as_raw(this), result__.as_mut_ptr()).from_abi::(result__) } } - pub fn Insert<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, PlaybackMediaMarker>>, - { + pub fn Insert(&self, value: &PlaybackMediaMarker) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).Insert)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).Insert)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } pub fn Clear(&self) -> ::windows::core::Result<()> { let this = self; diff --git a/crates/libs/windows/src/Windows/Media/Protection/PlayReady/mod.rs b/crates/libs/windows/src/Windows/Media/Protection/PlayReady/mod.rs index 7f5b974399..c8f5767b42 100644 --- a/crates/libs/windows/src/Windows/Media/Protection/PlayReady/mod.rs +++ b/crates/libs/windows/src/Windows/Media/Protection/PlayReady/mod.rs @@ -359,12 +359,9 @@ pub struct INDDownloadEngine(::windows::core::IUnknown); impl INDDownloadEngine { #[doc = "*Required features: `\"Foundation\"`, `\"deprecated\"`*"] #[cfg(all(feature = "Foundation", feature = "deprecated"))] - pub fn Open<'a, P0>(&self, uri: P0, sessionidbytes: &[u8]) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Foundation::Uri>>, - { + pub fn Open(&self, uri: &super::super::super::Foundation::Uri, sessionidbytes: &[u8]) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).Open)(::windows::core::Vtable::as_raw(this), uri.into().abi(), sessionidbytes.len() as u32, sessionidbytes.as_ptr()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).Open)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(uri), sessionidbytes.len() as u32, sessionidbytes.as_ptr()).ok() } } #[doc = "*Required features: `\"deprecated\"`*"] #[cfg(feature = "deprecated")] @@ -1888,12 +1885,9 @@ impl INDStreamParserNotifier { } #[doc = "*Required features: `\"Media_Core\"`, `\"deprecated\"`*"] #[cfg(all(feature = "Media_Core", feature = "deprecated"))] - pub fn OnSampleParsed<'a, P0>(&self, streamid: u32, streamtype: NDMediaStreamType, streamsample: P0, pts: i64, ccformat: NDClosedCaptionFormat, ccdatabytes: &[u8]) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Core::MediaStreamSample>>, - { + pub fn OnSampleParsed(&self, streamid: u32, streamtype: NDMediaStreamType, streamsample: &super::super::Core::MediaStreamSample, pts: i64, ccformat: NDClosedCaptionFormat, ccdatabytes: &[u8]) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).OnSampleParsed)(::windows::core::Vtable::as_raw(this), streamid, streamtype, streamsample.into().abi(), pts, ccformat, ccdatabytes.len() as u32, ccdatabytes.as_ptr()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).OnSampleParsed)(::windows::core::Vtable::as_raw(this), streamid, streamtype, ::core::mem::transmute_copy(streamsample), pts, ccformat, ccdatabytes.len() as u32, ccdatabytes.as_ptr()).ok() } } #[doc = "*Required features: `\"Media_Core\"`, `\"deprecated\"`*"] #[cfg(all(feature = "Media_Core", feature = "deprecated"))] @@ -2713,12 +2707,9 @@ impl IPlayReadyLicenseAcquisitionServiceRequest { (::windows::core::Vtable::vtable(this).ContentHeader)(::windows::core::Vtable::as_raw(this), result__.as_mut_ptr()).from_abi::(result__) } } - pub fn SetContentHeader<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, PlayReadyContentHeader>>, - { + pub fn SetContentHeader(&self, value: &PlayReadyContentHeader) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).SetContentHeader)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetContentHeader)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } pub fn DomainServiceId(&self) -> ::windows::core::Result<::windows::core::GUID> { let this = self; @@ -2756,12 +2747,9 @@ impl IPlayReadyLicenseAcquisitionServiceRequest { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn SetUri<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Foundation::Uri>>, - { + pub fn SetUri(&self, value: &super::super::super::Foundation::Uri) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).SetUri)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetUri)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } pub fn ResponseCustomData(&self) -> ::windows::core::Result<::windows::core::HSTRING> { let this = &::windows::core::Interface::cast::(self)?; @@ -2998,12 +2986,9 @@ impl IPlayReadyLicenseSession { (::windows::core::Vtable::vtable(this).CreateLAServiceRequest)(::windows::core::Vtable::as_raw(this), result__.as_mut_ptr()).from_abi::(result__) } } - pub fn ConfigureMediaProtectionManager<'a, P0>(&self, mpm: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::MediaProtectionManager>>, - { + pub fn ConfigureMediaProtectionManager(&self, mpm: &super::MediaProtectionManager) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).ConfigureMediaProtectionManager)(::windows::core::Vtable::as_raw(this), mpm.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).ConfigureMediaProtectionManager)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(mpm)).ok() } } } impl ::core::convert::From for ::windows::core::IUnknown { @@ -3078,14 +3063,11 @@ pub struct IPlayReadyLicenseSession2(::windows::core::IUnknown); impl IPlayReadyLicenseSession2 { #[doc = "*Required features: `\"Foundation_Collections\"`*"] #[cfg(feature = "Foundation_Collections")] - pub fn CreateLicenseIterable<'a, P0>(&self, contentheader: P0, fullyevaluated: bool) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, PlayReadyContentHeader>>, - { + pub fn CreateLicenseIterable(&self, contentheader: &PlayReadyContentHeader, fullyevaluated: bool) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).CreateLicenseIterable)(::windows::core::Vtable::as_raw(this), contentheader.into().abi(), fullyevaluated, result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).CreateLicenseIterable)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(contentheader), fullyevaluated, result__.as_mut_ptr()).from_abi::(result__) } } pub fn CreateLAServiceRequest(&self) -> ::windows::core::Result { @@ -3095,12 +3077,9 @@ impl IPlayReadyLicenseSession2 { (::windows::core::Vtable::vtable(this).CreateLAServiceRequest)(::windows::core::Vtable::as_raw(this), result__.as_mut_ptr()).from_abi::(result__) } } - pub fn ConfigureMediaProtectionManager<'a, P0>(&self, mpm: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::MediaProtectionManager>>, - { + pub fn ConfigureMediaProtectionManager(&self, mpm: &super::MediaProtectionManager) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).ConfigureMediaProtectionManager)(::windows::core::Vtable::as_raw(this), mpm.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).ConfigureMediaProtectionManager)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(mpm)).ok() } } } impl ::core::convert::From for ::windows::core::IUnknown { @@ -3324,12 +3303,9 @@ impl IPlayReadySecureStopServiceRequest { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn SetUri<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Foundation::Uri>>, - { + pub fn SetUri(&self, value: &super::super::super::Foundation::Uri) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).SetUri)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetUri)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } pub fn ResponseCustomData(&self) -> ::windows::core::Result<::windows::core::HSTRING> { let this = &::windows::core::Interface::cast::(self)?; @@ -3524,12 +3500,9 @@ impl IPlayReadyServiceRequest { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn SetUri<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Foundation::Uri>>, - { + pub fn SetUri(&self, value: &super::super::super::Foundation::Uri) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).SetUri)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetUri)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } pub fn ResponseCustomData(&self) -> ::windows::core::Result<::windows::core::HSTRING> { let this = self; @@ -3818,14 +3791,11 @@ pub struct NDClient(::windows::core::IUnknown); impl NDClient { #[doc = "*Required features: `\"Foundation\"`, `\"deprecated\"`*"] #[cfg(all(feature = "Foundation", feature = "deprecated"))] - pub fn RegistrationCompleted<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Foundation::TypedEventHandler>>, - { + pub fn RegistrationCompleted(&self, handler: &super::super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).RegistrationCompleted)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).RegistrationCompleted)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`, `\"deprecated\"`*"] @@ -3836,14 +3806,11 @@ impl NDClient { } #[doc = "*Required features: `\"Foundation\"`, `\"deprecated\"`*"] #[cfg(all(feature = "Foundation", feature = "deprecated"))] - pub fn ProximityDetectionCompleted<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Foundation::TypedEventHandler>>, - { + pub fn ProximityDetectionCompleted(&self, handler: &super::super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).ProximityDetectionCompleted)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).ProximityDetectionCompleted)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`, `\"deprecated\"`*"] @@ -3854,14 +3821,11 @@ impl NDClient { } #[doc = "*Required features: `\"Foundation\"`, `\"deprecated\"`*"] #[cfg(all(feature = "Foundation", feature = "deprecated"))] - pub fn LicenseFetchCompleted<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Foundation::TypedEventHandler>>, - { + pub fn LicenseFetchCompleted(&self, handler: &super::super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).LicenseFetchCompleted)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).LicenseFetchCompleted)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`, `\"deprecated\"`*"] @@ -3872,14 +3836,11 @@ impl NDClient { } #[doc = "*Required features: `\"Foundation\"`, `\"deprecated\"`*"] #[cfg(all(feature = "Foundation", feature = "deprecated"))] - pub fn ReRegistrationNeeded<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Foundation::TypedEventHandler>>, - { + pub fn ReRegistrationNeeded(&self, handler: &super::super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).ReRegistrationNeeded)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).ReRegistrationNeeded)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`, `\"deprecated\"`*"] @@ -3890,14 +3851,11 @@ impl NDClient { } #[doc = "*Required features: `\"Foundation\"`, `\"deprecated\"`*"] #[cfg(all(feature = "Foundation", feature = "deprecated"))] - pub fn ClosedCaptionDataReceived<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Foundation::TypedEventHandler>>, - { + pub fn ClosedCaptionDataReceived(&self, handler: &super::super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).ClosedCaptionDataReceived)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).ClosedCaptionDataReceived)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`, `\"deprecated\"`*"] @@ -3908,18 +3866,17 @@ impl NDClient { } #[doc = "*Required features: `\"Foundation\"`, `\"deprecated\"`*"] #[cfg(all(feature = "Foundation", feature = "deprecated"))] - pub fn StartAsync<'a, P0, P1, E1, P2, E2>(&self, contenturl: P0, startasyncoptions: u32, registrationcustomdata: P1, licensefetchdescriptor: P2) -> ::windows::core::Result> + pub fn StartAsync<'a, P0, E0, P1, E1>(&self, contenturl: &super::super::super::Foundation::Uri, startasyncoptions: u32, registrationcustomdata: P0, licensefetchdescriptor: P1) -> ::windows::core::Result> where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Foundation::Uri>>, - P1: ::std::convert::TryInto<::windows::core::InParam<'a, INDCustomData>, Error = E1>, + P0: ::std::convert::TryInto<::windows::core::InParam<'a, INDCustomData>, Error = E0>, + E0: ::std::convert::Into<::windows::core::Error>, + P1: ::std::convert::TryInto<::windows::core::InParam<'a, INDLicenseFetchDescriptor>, Error = E1>, E1: ::std::convert::Into<::windows::core::Error>, - P2: ::std::convert::TryInto<::windows::core::InParam<'a, INDLicenseFetchDescriptor>, Error = E2>, - E2: ::std::convert::Into<::windows::core::Error>, { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).StartAsync)(::windows::core::Vtable::as_raw(this), contenturl.into().abi(), startasyncoptions, registrationcustomdata.try_into().map_err(|e| e.into())?.abi(), licensefetchdescriptor.try_into().map_err(|e| e.into())?.abi(), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).StartAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(contenturl), startasyncoptions, registrationcustomdata.try_into().map_err(|e| e.into())?.abi(), licensefetchdescriptor.try_into().map_err(|e| e.into())?.abi(), result__.as_mut_ptr()).from_abi::>(result__) } } #[doc = "*Required features: `\"Foundation\"`, `\"deprecated\"`*"] @@ -4664,12 +4621,9 @@ impl NDStreamParserNotifier { } #[doc = "*Required features: `\"Media_Core\"`, `\"deprecated\"`*"] #[cfg(all(feature = "Media_Core", feature = "deprecated"))] - pub fn OnSampleParsed<'a, P0>(&self, streamid: u32, streamtype: NDMediaStreamType, streamsample: P0, pts: i64, ccformat: NDClosedCaptionFormat, ccdatabytes: &[u8]) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Core::MediaStreamSample>>, - { + pub fn OnSampleParsed(&self, streamid: u32, streamtype: NDMediaStreamType, streamsample: &super::super::Core::MediaStreamSample, pts: i64, ccformat: NDClosedCaptionFormat, ccdatabytes: &[u8]) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).OnSampleParsed)(::windows::core::Vtable::as_raw(this), streamid, streamtype, streamsample.into().abi(), pts, ccformat, ccdatabytes.len() as u32, ccdatabytes.as_ptr()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).OnSampleParsed)(::windows::core::Vtable::as_raw(this), streamid, streamtype, ::core::mem::transmute_copy(streamsample), pts, ccformat, ccdatabytes.len() as u32, ccdatabytes.as_ptr()).ok() } } #[doc = "*Required features: `\"Media_Core\"`, `\"deprecated\"`*"] #[cfg(all(feature = "Media_Core", feature = "deprecated"))] @@ -5029,26 +4983,18 @@ impl PlayReadyContentHeader { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn CreateInstanceFromWindowsMediaDrmHeader<'a, P0, P1>(headerbytes: &[u8], licenseacquisitionurl: P0, licenseacquisitionuserinterfaceurl: P1, customattributes: &::windows::core::HSTRING, domainserviceid: ::windows::core::GUID) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Foundation::Uri>>, - P1: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Foundation::Uri>>, - { + pub fn CreateInstanceFromWindowsMediaDrmHeader(headerbytes: &[u8], licenseacquisitionurl: &super::super::super::Foundation::Uri, licenseacquisitionuserinterfaceurl: &super::super::super::Foundation::Uri, customattributes: &::windows::core::HSTRING, domainserviceid: ::windows::core::GUID) -> ::windows::core::Result { Self::IPlayReadyContentHeaderFactory(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).CreateInstanceFromWindowsMediaDrmHeader)(::windows::core::Vtable::as_raw(this), headerbytes.len() as u32, headerbytes.as_ptr(), licenseacquisitionurl.into().abi(), licenseacquisitionuserinterfaceurl.into().abi(), ::core::mem::transmute_copy(customattributes), domainserviceid, result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).CreateInstanceFromWindowsMediaDrmHeader)(::windows::core::Vtable::as_raw(this), headerbytes.len() as u32, headerbytes.as_ptr(), ::core::mem::transmute_copy(licenseacquisitionurl), ::core::mem::transmute_copy(licenseacquisitionuserinterfaceurl), ::core::mem::transmute_copy(customattributes), domainserviceid, result__.as_mut_ptr()).from_abi::(result__) }) } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn CreateInstanceFromComponents<'a, P0, P1>(contentkeyid: ::windows::core::GUID, contentkeyidstring: &::windows::core::HSTRING, contentencryptionalgorithm: PlayReadyEncryptionAlgorithm, licenseacquisitionurl: P0, licenseacquisitionuserinterfaceurl: P1, customattributes: &::windows::core::HSTRING, domainserviceid: ::windows::core::GUID) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Foundation::Uri>>, - P1: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Foundation::Uri>>, - { + pub fn CreateInstanceFromComponents(contentkeyid: ::windows::core::GUID, contentkeyidstring: &::windows::core::HSTRING, contentencryptionalgorithm: PlayReadyEncryptionAlgorithm, licenseacquisitionurl: &super::super::super::Foundation::Uri, licenseacquisitionuserinterfaceurl: &super::super::super::Foundation::Uri, customattributes: &::windows::core::HSTRING, domainserviceid: ::windows::core::GUID) -> ::windows::core::Result { Self::IPlayReadyContentHeaderFactory(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).CreateInstanceFromComponents)(::windows::core::Vtable::as_raw(this), contentkeyid, ::core::mem::transmute_copy(contentkeyidstring), contentencryptionalgorithm, licenseacquisitionurl.into().abi(), licenseacquisitionuserinterfaceurl.into().abi(), ::core::mem::transmute_copy(customattributes), domainserviceid, result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).CreateInstanceFromComponents)(::windows::core::Vtable::as_raw(this), contentkeyid, ::core::mem::transmute_copy(contentkeyidstring), contentencryptionalgorithm, ::core::mem::transmute_copy(licenseacquisitionurl), ::core::mem::transmute_copy(licenseacquisitionuserinterfaceurl), ::core::mem::transmute_copy(customattributes), domainserviceid, result__.as_mut_ptr()).from_abi::(result__) }) } pub fn CreateInstanceFromPlayReadyHeader(headerbytes: &[u8]) -> ::windows::core::Result { @@ -5059,14 +5005,10 @@ impl PlayReadyContentHeader { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn CreateInstanceFromComponents2<'a, P0, P1>(dwflags: u32, contentkeyids: &[::windows::core::GUID], contentkeyidstrings: &[::windows::core::HSTRING], contentencryptionalgorithm: PlayReadyEncryptionAlgorithm, licenseacquisitionurl: P0, licenseacquisitionuserinterfaceurl: P1, customattributes: &::windows::core::HSTRING, domainserviceid: ::windows::core::GUID) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Foundation::Uri>>, - P1: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Foundation::Uri>>, - { + pub fn CreateInstanceFromComponents2(dwflags: u32, contentkeyids: &[::windows::core::GUID], contentkeyidstrings: &[::windows::core::HSTRING], contentencryptionalgorithm: PlayReadyEncryptionAlgorithm, licenseacquisitionurl: &super::super::super::Foundation::Uri, licenseacquisitionuserinterfaceurl: &super::super::super::Foundation::Uri, customattributes: &::windows::core::HSTRING, domainserviceid: ::windows::core::GUID) -> ::windows::core::Result { Self::IPlayReadyContentHeaderFactory2(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).CreateInstanceFromComponents2)(::windows::core::Vtable::as_raw(this), dwflags, contentkeyids.len() as u32, contentkeyids.as_ptr(), contentkeyidstrings.len() as u32, ::core::mem::transmute(contentkeyidstrings.as_ptr()), contentencryptionalgorithm, licenseacquisitionurl.into().abi(), licenseacquisitionuserinterfaceurl.into().abi(), ::core::mem::transmute_copy(customattributes), domainserviceid, result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).CreateInstanceFromComponents2)(::windows::core::Vtable::as_raw(this), dwflags, contentkeyids.len() as u32, contentkeyids.as_ptr(), contentkeyidstrings.len() as u32, ::core::mem::transmute(contentkeyidstrings.as_ptr()), contentencryptionalgorithm, ::core::mem::transmute_copy(licenseacquisitionurl), ::core::mem::transmute_copy(licenseacquisitionuserinterfaceurl), ::core::mem::transmute_copy(customattributes), domainserviceid, result__.as_mut_ptr()).from_abi::(result__) }) } #[doc(hidden)] @@ -5145,13 +5087,10 @@ impl ::core::convert::From<&PlayReadyContentHeader> for &::windows::core::IInspe #[doc = "*Required features: `\"Media_Protection_PlayReady\"`*"] pub struct PlayReadyContentResolver; impl PlayReadyContentResolver { - pub fn ServiceRequest<'a, P0>(contentheader: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, PlayReadyContentHeader>>, - { + pub fn ServiceRequest(contentheader: &PlayReadyContentHeader) -> ::windows::core::Result { Self::IPlayReadyContentResolver(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).ServiceRequest)(::windows::core::Vtable::as_raw(this), contentheader.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).ServiceRequest)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(contentheader), result__.as_mut_ptr()).from_abi::(result__) }) } #[doc(hidden)] @@ -5639,12 +5578,9 @@ impl PlayReadyDomainJoinServiceRequest { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn SetUri<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Foundation::Uri>>, - { + pub fn SetUri(&self, value: &super::super::super::Foundation::Uri) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).SetUri)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetUri)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } pub fn ResponseCustomData(&self) -> ::windows::core::Result<::windows::core::HSTRING> { let this = &::windows::core::Interface::cast::(self)?; @@ -5853,12 +5789,9 @@ impl PlayReadyDomainLeaveServiceRequest { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn SetUri<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Foundation::Uri>>, - { + pub fn SetUri(&self, value: &super::super::super::Foundation::Uri) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).SetUri)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetUri)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } pub fn ResponseCustomData(&self) -> ::windows::core::Result<::windows::core::HSTRING> { let this = &::windows::core::Interface::cast::(self)?; @@ -6132,12 +6065,9 @@ impl PlayReadyIndividualizationServiceRequest { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn SetUri<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Foundation::Uri>>, - { + pub fn SetUri(&self, value: &super::super::super::Foundation::Uri) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).SetUri)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetUri)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } pub fn ResponseCustomData(&self) -> ::windows::core::Result<::windows::core::HSTRING> { let this = &::windows::core::Interface::cast::(self)?; @@ -6485,12 +6415,9 @@ impl PlayReadyLicenseAcquisitionServiceRequest { (::windows::core::Vtable::vtable(this).ContentHeader)(::windows::core::Vtable::as_raw(this), result__.as_mut_ptr()).from_abi::(result__) } } - pub fn SetContentHeader<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, PlayReadyContentHeader>>, - { + pub fn SetContentHeader(&self, value: &PlayReadyContentHeader) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).SetContentHeader)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetContentHeader)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } pub fn DomainServiceId(&self) -> ::windows::core::Result<::windows::core::GUID> { let this = self; @@ -6512,14 +6439,11 @@ impl PlayReadyLicenseAcquisitionServiceRequest { } #[doc = "*Required features: `\"Foundation_Collections\"`*"] #[cfg(feature = "Foundation_Collections")] - pub fn CreateLicenseIterable<'a, P0>(&self, contentheader: P0, fullyevaluated: bool) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, PlayReadyContentHeader>>, - { + pub fn CreateLicenseIterable(&self, contentheader: &PlayReadyContentHeader, fullyevaluated: bool) -> ::windows::core::Result { let this = &::windows::core::Interface::cast::(self)?; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).CreateLicenseIterable)(::windows::core::Vtable::as_raw(this), contentheader.into().abi(), fullyevaluated, result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).CreateLicenseIterable)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(contentheader), fullyevaluated, result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -6533,12 +6457,9 @@ impl PlayReadyLicenseAcquisitionServiceRequest { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn SetUri<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Foundation::Uri>>, - { + pub fn SetUri(&self, value: &super::super::super::Foundation::Uri) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).SetUri)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetUri)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } pub fn ResponseCustomData(&self) -> ::windows::core::Result<::windows::core::HSTRING> { let this = &::windows::core::Interface::cast::(self)?; @@ -6732,13 +6653,10 @@ impl PlayReadyLicenseIterable { } #[doc = "*Required features: `\"Foundation_Collections\"`*"] #[cfg(feature = "Foundation_Collections")] - pub fn CreateInstance<'a, P0>(contentheader: P0, fullyevaluated: bool) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, PlayReadyContentHeader>>, - { + pub fn CreateInstance(contentheader: &PlayReadyContentHeader, fullyevaluated: bool) -> ::windows::core::Result { Self::IPlayReadyLicenseIterableFactory(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).CreateInstance)(::windows::core::Vtable::as_raw(this), contentheader.into().abi(), fullyevaluated, result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).CreateInstance)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(contentheader), fullyevaluated, result__.as_mut_ptr()).from_abi::(result__) }) } #[doc(hidden)] @@ -7007,13 +6925,10 @@ pub struct PlayReadyLicenseManagement; impl PlayReadyLicenseManagement { #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn DeleteLicenses<'a, P0>(contentheader: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, PlayReadyContentHeader>>, - { + pub fn DeleteLicenses(contentheader: &PlayReadyContentHeader) -> ::windows::core::Result { Self::IPlayReadyLicenseManagement(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).DeleteLicenses)(::windows::core::Vtable::as_raw(this), contentheader.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).DeleteLicenses)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(contentheader), result__.as_mut_ptr()).from_abi::(result__) }) } #[doc(hidden)] @@ -7036,23 +6951,17 @@ impl PlayReadyLicenseSession { (::windows::core::Vtable::vtable(this).CreateLAServiceRequest)(::windows::core::Vtable::as_raw(this), result__.as_mut_ptr()).from_abi::(result__) } } - pub fn ConfigureMediaProtectionManager<'a, P0>(&self, mpm: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::MediaProtectionManager>>, - { + pub fn ConfigureMediaProtectionManager(&self, mpm: &super::MediaProtectionManager) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).ConfigureMediaProtectionManager)(::windows::core::Vtable::as_raw(this), mpm.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).ConfigureMediaProtectionManager)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(mpm)).ok() } } #[doc = "*Required features: `\"Foundation_Collections\"`*"] #[cfg(feature = "Foundation_Collections")] - pub fn CreateLicenseIterable<'a, P0>(&self, contentheader: P0, fullyevaluated: bool) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, PlayReadyContentHeader>>, - { + pub fn CreateLicenseIterable(&self, contentheader: &PlayReadyContentHeader, fullyevaluated: bool) -> ::windows::core::Result { let this = &::windows::core::Interface::cast::(self)?; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).CreateLicenseIterable)(::windows::core::Vtable::as_raw(this), contentheader.into().abi(), fullyevaluated, result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).CreateLicenseIterable)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(contentheader), fullyevaluated, result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation_Collections\"`*"] @@ -7220,12 +7129,9 @@ impl PlayReadyMeteringReportServiceRequest { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn SetUri<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Foundation::Uri>>, - { + pub fn SetUri(&self, value: &super::super::super::Foundation::Uri) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).SetUri)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetUri)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } pub fn ResponseCustomData(&self) -> ::windows::core::Result<::windows::core::HSTRING> { let this = &::windows::core::Interface::cast::(self)?; @@ -7412,12 +7318,9 @@ impl PlayReadyRevocationServiceRequest { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn SetUri<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Foundation::Uri>>, - { + pub fn SetUri(&self, value: &super::super::super::Foundation::Uri) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).SetUri)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetUri)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } pub fn ResponseCustomData(&self) -> ::windows::core::Result<::windows::core::HSTRING> { let this = &::windows::core::Interface::cast::(self)?; @@ -7932,12 +7835,9 @@ impl PlayReadySecureStopServiceRequest { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn SetUri<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Foundation::Uri>>, - { + pub fn SetUri(&self, value: &super::super::super::Foundation::Uri) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).SetUri)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetUri)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } pub fn ResponseCustomData(&self) -> ::windows::core::Result<::windows::core::HSTRING> { let this = &::windows::core::Interface::cast::(self)?; diff --git a/crates/libs/windows/src/Windows/Media/Protection/mod.rs b/crates/libs/windows/src/Windows/Media/Protection/mod.rs index d883dadd66..bf65a5720b 100644 --- a/crates/libs/windows/src/Windows/Media/Protection/mod.rs +++ b/crates/libs/windows/src/Windows/Media/Protection/mod.rs @@ -417,13 +417,10 @@ pub struct ComponentRenewal; impl ComponentRenewal { #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn RenewSystemComponentsAsync<'a, P0>(information: P0) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, RevocationAndRenewalInformation>>, - { + pub fn RenewSystemComponentsAsync(information: &RevocationAndRenewalInformation) -> ::windows::core::Result> { Self::IComponentRenewalStatics(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).RenewSystemComponentsAsync)(::windows::core::Vtable::as_raw(this), information.into().abi(), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).RenewSystemComponentsAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(information), result__.as_mut_ptr()).from_abi::>(result__) }) } #[doc(hidden)] @@ -479,14 +476,11 @@ impl HdcpSession { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn ProtectionChanged<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn ProtectionChanged(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).ProtectionChanged)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).ProtectionChanged)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -595,14 +589,11 @@ impl MediaProtectionManager { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn ServiceRequested<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, ServiceRequestedEventHandler>>, - { + pub fn ServiceRequested(&self, handler: &ServiceRequestedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).ServiceRequested)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).ServiceRequested)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -613,14 +604,11 @@ impl MediaProtectionManager { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn RebootNeeded<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, RebootNeededEventHandler>>, - { + pub fn RebootNeeded(&self, handler: &RebootNeededEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).RebootNeeded)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).RebootNeeded)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -631,14 +619,11 @@ impl MediaProtectionManager { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn ComponentLoadFailed<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, ComponentLoadFailedEventHandler>>, - { + pub fn ComponentLoadFailed(&self, handler: &ComponentLoadFailedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).ComponentLoadFailed)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).ComponentLoadFailed)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -1510,13 +1495,9 @@ impl ComponentLoadFailedEventHandler { let com = ComponentLoadFailedEventHandlerBox:: { vtable: &ComponentLoadFailedEventHandlerBox::::VTABLE, count: ::windows::core::RefCount::new(1), invoke }; unsafe { ::core::mem::transmute(::windows::core::alloc::boxed::Box::new(com)) } } - pub fn Invoke<'a, P0, P1>(&self, sender: P0, e: P1) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, MediaProtectionManager>>, - P1: ::std::convert::Into<::windows::core::InParam<'a, ComponentLoadFailedEventArgs>>, - { + pub fn Invoke(&self, sender: &MediaProtectionManager, e: &ComponentLoadFailedEventArgs) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).Invoke)(::windows::core::Vtable::as_raw(this), sender.into().abi(), e.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).Invoke)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(sender), ::core::mem::transmute_copy(e)).ok() } } } #[repr(C)] @@ -1600,12 +1581,9 @@ impl RebootNeededEventHandler { let com = RebootNeededEventHandlerBox:: { vtable: &RebootNeededEventHandlerBox::::VTABLE, count: ::windows::core::RefCount::new(1), invoke }; unsafe { ::core::mem::transmute(::windows::core::alloc::boxed::Box::new(com)) } } - pub fn Invoke<'a, P0>(&self, sender: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, MediaProtectionManager>>, - { + pub fn Invoke(&self, sender: &MediaProtectionManager) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).Invoke)(::windows::core::Vtable::as_raw(this), sender.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).Invoke)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(sender)).ok() } } } #[repr(C)] @@ -1689,13 +1667,9 @@ impl ServiceRequestedEventHandler { let com = ServiceRequestedEventHandlerBox:: { vtable: &ServiceRequestedEventHandlerBox::::VTABLE, count: ::windows::core::RefCount::new(1), invoke }; unsafe { ::core::mem::transmute(::windows::core::alloc::boxed::Box::new(com)) } } - pub fn Invoke<'a, P0, P1>(&self, sender: P0, e: P1) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, MediaProtectionManager>>, - P1: ::std::convert::Into<::windows::core::InParam<'a, ServiceRequestedEventArgs>>, - { + pub fn Invoke(&self, sender: &MediaProtectionManager, e: &ServiceRequestedEventArgs) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).Invoke)(::windows::core::Vtable::as_raw(this), sender.into().abi(), e.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).Invoke)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(sender), ::core::mem::transmute_copy(e)).ok() } } } #[repr(C)] diff --git a/crates/libs/windows/src/Windows/Media/SpeechRecognition/mod.rs b/crates/libs/windows/src/Windows/Media/SpeechRecognition/mod.rs index 7f0cb22169..fa94dc7ddc 100644 --- a/crates/libs/windows/src/Windows/Media/SpeechRecognition/mod.rs +++ b/crates/libs/windows/src/Windows/Media/SpeechRecognition/mod.rs @@ -938,14 +938,11 @@ impl SpeechContinuousRecognitionSession { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn Completed<'a, P0>(&self, value: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn Completed(&self, value: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).Completed)(::windows::core::Vtable::as_raw(this), value.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).Completed)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -956,14 +953,11 @@ impl SpeechContinuousRecognitionSession { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn ResultGenerated<'a, P0>(&self, value: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn ResultGenerated(&self, value: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).ResultGenerated)(::windows::core::Vtable::as_raw(this), value.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).ResultGenerated)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -1168,24 +1162,18 @@ impl SpeechRecognitionGrammarFileConstraint { } #[doc = "*Required features: `\"Storage\"`*"] #[cfg(feature = "Storage")] - pub fn Create<'a, P0>(file: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Storage::StorageFile>>, - { + pub fn Create(file: &super::super::Storage::StorageFile) -> ::windows::core::Result { Self::ISpeechRecognitionGrammarFileConstraintFactory(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).Create)(::windows::core::Vtable::as_raw(this), file.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).Create)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(file), result__.as_mut_ptr()).from_abi::(result__) }) } #[doc = "*Required features: `\"Storage\"`*"] #[cfg(feature = "Storage")] - pub fn CreateWithTag<'a, P0>(file: P0, tag: &::windows::core::HSTRING) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Storage::StorageFile>>, - { + pub fn CreateWithTag(file: &super::super::Storage::StorageFile, tag: &::windows::core::HSTRING) -> ::windows::core::Result { Self::ISpeechRecognitionGrammarFileConstraintFactory(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).CreateWithTag)(::windows::core::Vtable::as_raw(this), file.into().abi(), ::core::mem::transmute_copy(tag), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).CreateWithTag)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(file), ::core::mem::transmute_copy(tag), result__.as_mut_ptr()).from_abi::(result__) }) } #[doc(hidden)] @@ -2261,14 +2249,11 @@ impl SpeechRecognizer { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn RecognitionQualityDegrading<'a, P0>(&self, speechrecognitionqualitydegradinghandler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn RecognitionQualityDegrading(&self, speechrecognitionqualitydegradinghandler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).RecognitionQualityDegrading)(::windows::core::Vtable::as_raw(this), speechrecognitionqualitydegradinghandler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).RecognitionQualityDegrading)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(speechrecognitionqualitydegradinghandler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -2279,14 +2264,11 @@ impl SpeechRecognizer { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn StateChanged<'a, P0>(&self, statechangedhandler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn StateChanged(&self, statechangedhandler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).StateChanged)(::windows::core::Vtable::as_raw(this), statechangedhandler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).StateChanged)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(statechangedhandler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -2320,14 +2302,11 @@ impl SpeechRecognizer { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn HypothesisGenerated<'a, P0>(&self, value: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn HypothesisGenerated(&self, value: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = &::windows::core::Interface::cast::(self)?; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).HypothesisGenerated)(::windows::core::Vtable::as_raw(this), value.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).HypothesisGenerated)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -2338,13 +2317,10 @@ impl SpeechRecognizer { } #[doc = "*Required features: `\"Globalization\"`*"] #[cfg(feature = "Globalization")] - pub fn Create<'a, P0>(language: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Globalization::Language>>, - { + pub fn Create(language: &super::super::Globalization::Language) -> ::windows::core::Result { Self::ISpeechRecognizerFactory(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).Create)(::windows::core::Vtable::as_raw(this), language.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).Create)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(language), result__.as_mut_ptr()).from_abi::(result__) }) } #[doc = "*Required features: `\"Globalization\"`*"] @@ -2373,13 +2349,10 @@ impl SpeechRecognizer { } #[doc = "*Required features: `\"Foundation\"`, `\"Globalization\"`*"] #[cfg(all(feature = "Foundation", feature = "Globalization"))] - pub fn TrySetSystemSpeechLanguageAsync<'a, P0>(speechlanguage: P0) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Globalization::Language>>, - { + pub fn TrySetSystemSpeechLanguageAsync(speechlanguage: &super::super::Globalization::Language) -> ::windows::core::Result> { Self::ISpeechRecognizerStatics2(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).TrySetSystemSpeechLanguageAsync)(::windows::core::Vtable::as_raw(this), speechlanguage.into().abi(), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).TrySetSystemSpeechLanguageAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(speechlanguage), result__.as_mut_ptr()).from_abi::>(result__) }) } #[doc(hidden)] @@ -2792,13 +2765,10 @@ pub struct VoiceCommandManager; impl VoiceCommandManager { #[doc = "*Required features: `\"Foundation\"`, `\"Storage\"`*"] #[cfg(all(feature = "Foundation", feature = "Storage"))] - pub fn InstallCommandSetsFromStorageFileAsync<'a, P0>(file: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Storage::StorageFile>>, - { + pub fn InstallCommandSetsFromStorageFileAsync(file: &super::super::Storage::StorageFile) -> ::windows::core::Result { Self::IVoiceCommandManager(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).InstallCommandSetsFromStorageFileAsync)(::windows::core::Vtable::as_raw(this), file.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).InstallCommandSetsFromStorageFileAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(file), result__.as_mut_ptr()).from_abi::(result__) }) } #[doc = "*Required features: `\"Foundation_Collections\"`*"] diff --git a/crates/libs/windows/src/Windows/Media/SpeechSynthesis/mod.rs b/crates/libs/windows/src/Windows/Media/SpeechSynthesis/mod.rs index 0597ec2f4f..30d1515e67 100644 --- a/crates/libs/windows/src/Windows/Media/SpeechSynthesis/mod.rs +++ b/crates/libs/windows/src/Windows/Media/SpeechSynthesis/mod.rs @@ -566,13 +566,10 @@ impl SpeechSynthesizer { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn TrySetDefaultVoiceAsync<'a, P0>(voice: P0) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, VoiceInformation>>, - { + pub fn TrySetDefaultVoiceAsync(voice: &VoiceInformation) -> ::windows::core::Result> { Self::IInstalledVoicesStatic2(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).TrySetDefaultVoiceAsync)(::windows::core::Vtable::as_raw(this), voice.into().abi(), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).TrySetDefaultVoiceAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(voice), result__.as_mut_ptr()).from_abi::>(result__) }) } #[doc = "*Required features: `\"Foundation\"`*"] @@ -593,12 +590,9 @@ impl SpeechSynthesizer { (::windows::core::Vtable::vtable(this).SynthesizeSsmlToStreamAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(ssml), result__.as_mut_ptr()).from_abi::>(result__) } } - pub fn SetVoice<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, VoiceInformation>>, - { + pub fn SetVoice(&self, value: &VoiceInformation) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).SetVoice)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetVoice)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } pub fn Voice(&self) -> ::windows::core::Result { let this = self; diff --git a/crates/libs/windows/src/Windows/Media/Streaming/Adaptive/mod.rs b/crates/libs/windows/src/Windows/Media/Streaming/Adaptive/mod.rs index 8e5a5cd859..9f79a103ce 100644 --- a/crates/libs/windows/src/Windows/Media/Streaming/Adaptive/mod.rs +++ b/crates/libs/windows/src/Windows/Media/Streaming/Adaptive/mod.rs @@ -868,14 +868,11 @@ impl AdaptiveMediaSource { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn DownloadBitrateChanged<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Foundation::TypedEventHandler>>, - { + pub fn DownloadBitrateChanged(&self, handler: &super::super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).DownloadBitrateChanged)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).DownloadBitrateChanged)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -886,14 +883,11 @@ impl AdaptiveMediaSource { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn PlaybackBitrateChanged<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Foundation::TypedEventHandler>>, - { + pub fn PlaybackBitrateChanged(&self, handler: &super::super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).PlaybackBitrateChanged)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).PlaybackBitrateChanged)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -904,14 +898,11 @@ impl AdaptiveMediaSource { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn DownloadRequested<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Foundation::TypedEventHandler>>, - { + pub fn DownloadRequested(&self, handler: &super::super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).DownloadRequested)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).DownloadRequested)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -922,14 +913,11 @@ impl AdaptiveMediaSource { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn DownloadCompleted<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Foundation::TypedEventHandler>>, - { + pub fn DownloadCompleted(&self, handler: &super::super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).DownloadCompleted)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).DownloadCompleted)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -940,14 +928,11 @@ impl AdaptiveMediaSource { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn DownloadFailed<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Foundation::TypedEventHandler>>, - { + pub fn DownloadFailed(&self, handler: &super::super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).DownloadFailed)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).DownloadFailed)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -1022,52 +1007,42 @@ impl AdaptiveMediaSource { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn CreateFromUriAsync<'a, P0>(uri: P0) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Foundation::Uri>>, - { + pub fn CreateFromUriAsync(uri: &super::super::super::Foundation::Uri) -> ::windows::core::Result> { Self::IAdaptiveMediaSourceStatics(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).CreateFromUriAsync)(::windows::core::Vtable::as_raw(this), uri.into().abi(), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).CreateFromUriAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(uri), result__.as_mut_ptr()).from_abi::>(result__) }) } #[doc = "*Required features: `\"Foundation\"`, `\"Web_Http\"`*"] #[cfg(all(feature = "Foundation", feature = "Web_Http"))] - pub fn CreateFromUriWithDownloaderAsync<'a, P0, P1>(uri: P0, httpclient: P1) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Foundation::Uri>>, - P1: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Web::Http::HttpClient>>, - { + pub fn CreateFromUriWithDownloaderAsync(uri: &super::super::super::Foundation::Uri, httpclient: &super::super::super::Web::Http::HttpClient) -> ::windows::core::Result> { Self::IAdaptiveMediaSourceStatics(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).CreateFromUriWithDownloaderAsync)(::windows::core::Vtable::as_raw(this), uri.into().abi(), httpclient.into().abi(), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).CreateFromUriWithDownloaderAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(uri), ::core::mem::transmute_copy(httpclient), result__.as_mut_ptr()).from_abi::>(result__) }) } #[doc = "*Required features: `\"Foundation\"`, `\"Storage_Streams\"`*"] #[cfg(all(feature = "Foundation", feature = "Storage_Streams"))] - pub fn CreateFromStreamAsync<'a, P0, E0, P1>(stream: P0, uri: P1, contenttype: &::windows::core::HSTRING) -> ::windows::core::Result> + pub fn CreateFromStreamAsync<'a, P0, E0>(stream: P0, uri: &super::super::super::Foundation::Uri, contenttype: &::windows::core::HSTRING) -> ::windows::core::Result> where P0: ::std::convert::TryInto<::windows::core::InParam<'a, super::super::super::Storage::Streams::IInputStream>, Error = E0>, E0: ::std::convert::Into<::windows::core::Error>, - P1: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Foundation::Uri>>, { Self::IAdaptiveMediaSourceStatics(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).CreateFromStreamAsync)(::windows::core::Vtable::as_raw(this), stream.try_into().map_err(|e| e.into())?.abi(), uri.into().abi(), ::core::mem::transmute_copy(contenttype), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).CreateFromStreamAsync)(::windows::core::Vtable::as_raw(this), stream.try_into().map_err(|e| e.into())?.abi(), ::core::mem::transmute_copy(uri), ::core::mem::transmute_copy(contenttype), result__.as_mut_ptr()).from_abi::>(result__) }) } #[doc = "*Required features: `\"Foundation\"`, `\"Storage_Streams\"`, `\"Web_Http\"`*"] #[cfg(all(feature = "Foundation", feature = "Storage_Streams", feature = "Web_Http"))] - pub fn CreateFromStreamWithDownloaderAsync<'a, P0, E0, P1, P2>(stream: P0, uri: P1, contenttype: &::windows::core::HSTRING, httpclient: P2) -> ::windows::core::Result> + pub fn CreateFromStreamWithDownloaderAsync<'a, P0, E0>(stream: P0, uri: &super::super::super::Foundation::Uri, contenttype: &::windows::core::HSTRING, httpclient: &super::super::super::Web::Http::HttpClient) -> ::windows::core::Result> where P0: ::std::convert::TryInto<::windows::core::InParam<'a, super::super::super::Storage::Streams::IInputStream>, Error = E0>, E0: ::std::convert::Into<::windows::core::Error>, - P1: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Foundation::Uri>>, - P2: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Web::Http::HttpClient>>, { Self::IAdaptiveMediaSourceStatics(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).CreateFromStreamWithDownloaderAsync)(::windows::core::Vtable::as_raw(this), stream.try_into().map_err(|e| e.into())?.abi(), uri.into().abi(), ::core::mem::transmute_copy(contenttype), httpclient.into().abi(), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).CreateFromStreamWithDownloaderAsync)(::windows::core::Vtable::as_raw(this), stream.try_into().map_err(|e| e.into())?.abi(), ::core::mem::transmute_copy(uri), ::core::mem::transmute_copy(contenttype), ::core::mem::transmute_copy(httpclient), result__.as_mut_ptr()).from_abi::>(result__) }) } #[doc = "*Required features: `\"Foundation\"`*"] @@ -1680,14 +1655,11 @@ pub struct AdaptiveMediaSourceDiagnostics(::windows::core::IUnknown); impl AdaptiveMediaSourceDiagnostics { #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn DiagnosticAvailable<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Foundation::TypedEventHandler>>, - { + pub fn DiagnosticAvailable(&self, handler: &super::super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).DiagnosticAvailable)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).DiagnosticAvailable)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -2397,12 +2369,9 @@ impl AdaptiveMediaSourceDownloadResult { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn SetResourceUri<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Foundation::Uri>>, - { + pub fn SetResourceUri(&self, value: &super::super::super::Foundation::Uri) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).SetResourceUri)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetResourceUri)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } #[doc = "*Required features: `\"Storage_Streams\"`*"] #[cfg(feature = "Storage_Streams")] diff --git a/crates/libs/windows/src/Windows/Media/Transcoding/mod.rs b/crates/libs/windows/src/Windows/Media/Transcoding/mod.rs index 8ae5d1b9e1..8f9720ab9e 100644 --- a/crates/libs/windows/src/Windows/Media/Transcoding/mod.rs +++ b/crates/libs/windows/src/Windows/Media/Transcoding/mod.rs @@ -188,50 +188,47 @@ impl MediaTranscoder { } #[doc = "*Required features: `\"Foundation\"`, `\"Media_MediaProperties\"`, `\"Storage\"`*"] #[cfg(all(feature = "Foundation", feature = "Media_MediaProperties", feature = "Storage"))] - pub fn PrepareFileTranscodeAsync<'a, P0, E0, P1, E1, P2>(&self, source: P0, destination: P1, profile: P2) -> ::windows::core::Result> + pub fn PrepareFileTranscodeAsync<'a, P0, E0, P1, E1>(&self, source: P0, destination: P1, profile: &super::MediaProperties::MediaEncodingProfile) -> ::windows::core::Result> where P0: ::std::convert::TryInto<::windows::core::InParam<'a, super::super::Storage::IStorageFile>, Error = E0>, E0: ::std::convert::Into<::windows::core::Error>, P1: ::std::convert::TryInto<::windows::core::InParam<'a, super::super::Storage::IStorageFile>, Error = E1>, E1: ::std::convert::Into<::windows::core::Error>, - P2: ::std::convert::Into<::windows::core::InParam<'a, super::MediaProperties::MediaEncodingProfile>>, { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).PrepareFileTranscodeAsync)(::windows::core::Vtable::as_raw(this), source.try_into().map_err(|e| e.into())?.abi(), destination.try_into().map_err(|e| e.into())?.abi(), profile.into().abi(), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).PrepareFileTranscodeAsync)(::windows::core::Vtable::as_raw(this), source.try_into().map_err(|e| e.into())?.abi(), destination.try_into().map_err(|e| e.into())?.abi(), ::core::mem::transmute_copy(profile), result__.as_mut_ptr()).from_abi::>(result__) } } #[doc = "*Required features: `\"Foundation\"`, `\"Media_MediaProperties\"`, `\"Storage_Streams\"`*"] #[cfg(all(feature = "Foundation", feature = "Media_MediaProperties", feature = "Storage_Streams"))] - pub fn PrepareStreamTranscodeAsync<'a, P0, E0, P1, E1, P2>(&self, source: P0, destination: P1, profile: P2) -> ::windows::core::Result> + pub fn PrepareStreamTranscodeAsync<'a, P0, E0, P1, E1>(&self, source: P0, destination: P1, profile: &super::MediaProperties::MediaEncodingProfile) -> ::windows::core::Result> where P0: ::std::convert::TryInto<::windows::core::InParam<'a, super::super::Storage::Streams::IRandomAccessStream>, Error = E0>, E0: ::std::convert::Into<::windows::core::Error>, P1: ::std::convert::TryInto<::windows::core::InParam<'a, super::super::Storage::Streams::IRandomAccessStream>, Error = E1>, E1: ::std::convert::Into<::windows::core::Error>, - P2: ::std::convert::Into<::windows::core::InParam<'a, super::MediaProperties::MediaEncodingProfile>>, { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).PrepareStreamTranscodeAsync)(::windows::core::Vtable::as_raw(this), source.try_into().map_err(|e| e.into())?.abi(), destination.try_into().map_err(|e| e.into())?.abi(), profile.into().abi(), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).PrepareStreamTranscodeAsync)(::windows::core::Vtable::as_raw(this), source.try_into().map_err(|e| e.into())?.abi(), destination.try_into().map_err(|e| e.into())?.abi(), ::core::mem::transmute_copy(profile), result__.as_mut_ptr()).from_abi::>(result__) } } #[doc = "*Required features: `\"Foundation\"`, `\"Media_Core\"`, `\"Media_MediaProperties\"`, `\"Storage_Streams\"`*"] #[cfg(all(feature = "Foundation", feature = "Media_Core", feature = "Media_MediaProperties", feature = "Storage_Streams"))] - pub fn PrepareMediaStreamSourceTranscodeAsync<'a, P0, E0, P1, E1, P2>(&self, source: P0, destination: P1, profile: P2) -> ::windows::core::Result> + pub fn PrepareMediaStreamSourceTranscodeAsync<'a, P0, E0, P1, E1>(&self, source: P0, destination: P1, profile: &super::MediaProperties::MediaEncodingProfile) -> ::windows::core::Result> where P0: ::std::convert::TryInto<::windows::core::InParam<'a, super::Core::IMediaSource>, Error = E0>, E0: ::std::convert::Into<::windows::core::Error>, P1: ::std::convert::TryInto<::windows::core::InParam<'a, super::super::Storage::Streams::IRandomAccessStream>, Error = E1>, E1: ::std::convert::Into<::windows::core::Error>, - P2: ::std::convert::Into<::windows::core::InParam<'a, super::MediaProperties::MediaEncodingProfile>>, { let this = &::windows::core::Interface::cast::(self)?; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).PrepareMediaStreamSourceTranscodeAsync)(::windows::core::Vtable::as_raw(this), source.try_into().map_err(|e| e.into())?.abi(), destination.try_into().map_err(|e| e.into())?.abi(), profile.into().abi(), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).PrepareMediaStreamSourceTranscodeAsync)(::windows::core::Vtable::as_raw(this), source.try_into().map_err(|e| e.into())?.abi(), destination.try_into().map_err(|e| e.into())?.abi(), ::core::mem::transmute_copy(profile), result__.as_mut_ptr()).from_abi::>(result__) } } pub fn SetVideoProcessingAlgorithm(&self, value: MediaVideoProcessingAlgorithm) -> ::windows::core::Result<()> { diff --git a/crates/libs/windows/src/Windows/Media/mod.rs b/crates/libs/windows/src/Windows/Media/mod.rs index 215f300657..7f2c86efdd 100644 --- a/crates/libs/windows/src/Windows/Media/mod.rs +++ b/crates/libs/windows/src/Windows/Media/mod.rs @@ -2000,13 +2000,10 @@ pub struct MediaControl; impl MediaControl { #[doc = "*Required features: `\"Foundation\"`, `\"deprecated\"`*"] #[cfg(all(feature = "Foundation", feature = "deprecated"))] - pub fn SoundLevelChanged<'a, P0>(handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::Foundation::EventHandler<::windows::core::IInspectable>>>, - { + pub fn SoundLevelChanged(handler: &super::Foundation::EventHandler<::windows::core::IInspectable>) -> ::windows::core::Result { Self::IMediaControl(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).SoundLevelChanged)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).SoundLevelChanged)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) }) } #[doc = "*Required features: `\"Foundation\"`, `\"deprecated\"`*"] @@ -2016,13 +2013,10 @@ impl MediaControl { } #[doc = "*Required features: `\"Foundation\"`, `\"deprecated\"`*"] #[cfg(all(feature = "Foundation", feature = "deprecated"))] - pub fn PlayPressed<'a, P0>(handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::Foundation::EventHandler<::windows::core::IInspectable>>>, - { + pub fn PlayPressed(handler: &super::Foundation::EventHandler<::windows::core::IInspectable>) -> ::windows::core::Result { Self::IMediaControl(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).PlayPressed)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).PlayPressed)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) }) } #[doc = "*Required features: `\"Foundation\"`, `\"deprecated\"`*"] @@ -2032,13 +2026,10 @@ impl MediaControl { } #[doc = "*Required features: `\"Foundation\"`, `\"deprecated\"`*"] #[cfg(all(feature = "Foundation", feature = "deprecated"))] - pub fn PausePressed<'a, P0>(handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::Foundation::EventHandler<::windows::core::IInspectable>>>, - { + pub fn PausePressed(handler: &super::Foundation::EventHandler<::windows::core::IInspectable>) -> ::windows::core::Result { Self::IMediaControl(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).PausePressed)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).PausePressed)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) }) } #[doc = "*Required features: `\"Foundation\"`, `\"deprecated\"`*"] @@ -2048,13 +2039,10 @@ impl MediaControl { } #[doc = "*Required features: `\"Foundation\"`, `\"deprecated\"`*"] #[cfg(all(feature = "Foundation", feature = "deprecated"))] - pub fn StopPressed<'a, P0>(handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::Foundation::EventHandler<::windows::core::IInspectable>>>, - { + pub fn StopPressed(handler: &super::Foundation::EventHandler<::windows::core::IInspectable>) -> ::windows::core::Result { Self::IMediaControl(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).StopPressed)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).StopPressed)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) }) } #[doc = "*Required features: `\"Foundation\"`, `\"deprecated\"`*"] @@ -2064,13 +2052,10 @@ impl MediaControl { } #[doc = "*Required features: `\"Foundation\"`, `\"deprecated\"`*"] #[cfg(all(feature = "Foundation", feature = "deprecated"))] - pub fn PlayPauseTogglePressed<'a, P0>(handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::Foundation::EventHandler<::windows::core::IInspectable>>>, - { + pub fn PlayPauseTogglePressed(handler: &super::Foundation::EventHandler<::windows::core::IInspectable>) -> ::windows::core::Result { Self::IMediaControl(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).PlayPauseTogglePressed)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).PlayPauseTogglePressed)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) }) } #[doc = "*Required features: `\"Foundation\"`, `\"deprecated\"`*"] @@ -2080,13 +2065,10 @@ impl MediaControl { } #[doc = "*Required features: `\"Foundation\"`, `\"deprecated\"`*"] #[cfg(all(feature = "Foundation", feature = "deprecated"))] - pub fn RecordPressed<'a, P0>(handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::Foundation::EventHandler<::windows::core::IInspectable>>>, - { + pub fn RecordPressed(handler: &super::Foundation::EventHandler<::windows::core::IInspectable>) -> ::windows::core::Result { Self::IMediaControl(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).RecordPressed)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).RecordPressed)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) }) } #[doc = "*Required features: `\"Foundation\"`, `\"deprecated\"`*"] @@ -2096,13 +2078,10 @@ impl MediaControl { } #[doc = "*Required features: `\"Foundation\"`, `\"deprecated\"`*"] #[cfg(all(feature = "Foundation", feature = "deprecated"))] - pub fn NextTrackPressed<'a, P0>(handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::Foundation::EventHandler<::windows::core::IInspectable>>>, - { + pub fn NextTrackPressed(handler: &super::Foundation::EventHandler<::windows::core::IInspectable>) -> ::windows::core::Result { Self::IMediaControl(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).NextTrackPressed)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).NextTrackPressed)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) }) } #[doc = "*Required features: `\"Foundation\"`, `\"deprecated\"`*"] @@ -2112,13 +2091,10 @@ impl MediaControl { } #[doc = "*Required features: `\"Foundation\"`, `\"deprecated\"`*"] #[cfg(all(feature = "Foundation", feature = "deprecated"))] - pub fn PreviousTrackPressed<'a, P0>(handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::Foundation::EventHandler<::windows::core::IInspectable>>>, - { + pub fn PreviousTrackPressed(handler: &super::Foundation::EventHandler<::windows::core::IInspectable>) -> ::windows::core::Result { Self::IMediaControl(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).PreviousTrackPressed)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).PreviousTrackPressed)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) }) } #[doc = "*Required features: `\"Foundation\"`, `\"deprecated\"`*"] @@ -2128,13 +2104,10 @@ impl MediaControl { } #[doc = "*Required features: `\"Foundation\"`, `\"deprecated\"`*"] #[cfg(all(feature = "Foundation", feature = "deprecated"))] - pub fn FastForwardPressed<'a, P0>(handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::Foundation::EventHandler<::windows::core::IInspectable>>>, - { + pub fn FastForwardPressed(handler: &super::Foundation::EventHandler<::windows::core::IInspectable>) -> ::windows::core::Result { Self::IMediaControl(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).FastForwardPressed)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).FastForwardPressed)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) }) } #[doc = "*Required features: `\"Foundation\"`, `\"deprecated\"`*"] @@ -2144,13 +2117,10 @@ impl MediaControl { } #[doc = "*Required features: `\"Foundation\"`, `\"deprecated\"`*"] #[cfg(all(feature = "Foundation", feature = "deprecated"))] - pub fn RewindPressed<'a, P0>(handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::Foundation::EventHandler<::windows::core::IInspectable>>>, - { + pub fn RewindPressed(handler: &super::Foundation::EventHandler<::windows::core::IInspectable>) -> ::windows::core::Result { Self::IMediaControl(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).RewindPressed)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).RewindPressed)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) }) } #[doc = "*Required features: `\"Foundation\"`, `\"deprecated\"`*"] @@ -2160,13 +2130,10 @@ impl MediaControl { } #[doc = "*Required features: `\"Foundation\"`, `\"deprecated\"`*"] #[cfg(all(feature = "Foundation", feature = "deprecated"))] - pub fn ChannelUpPressed<'a, P0>(handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::Foundation::EventHandler<::windows::core::IInspectable>>>, - { + pub fn ChannelUpPressed(handler: &super::Foundation::EventHandler<::windows::core::IInspectable>) -> ::windows::core::Result { Self::IMediaControl(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).ChannelUpPressed)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).ChannelUpPressed)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) }) } #[doc = "*Required features: `\"Foundation\"`, `\"deprecated\"`*"] @@ -2176,13 +2143,10 @@ impl MediaControl { } #[doc = "*Required features: `\"Foundation\"`, `\"deprecated\"`*"] #[cfg(all(feature = "Foundation", feature = "deprecated"))] - pub fn ChannelDownPressed<'a, P0>(handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::Foundation::EventHandler<::windows::core::IInspectable>>>, - { + pub fn ChannelDownPressed(handler: &super::Foundation::EventHandler<::windows::core::IInspectable>) -> ::windows::core::Result { Self::IMediaControl(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).ChannelDownPressed)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).ChannelDownPressed)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) }) } #[doc = "*Required features: `\"Foundation\"`, `\"deprecated\"`*"] @@ -2239,11 +2203,8 @@ impl MediaControl { } #[doc = "*Required features: `\"Foundation\"`, `\"deprecated\"`*"] #[cfg(all(feature = "Foundation", feature = "deprecated"))] - pub fn SetAlbumArt<'a, P0>(value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::Foundation::Uri>>, - { - Self::IMediaControl(|this| unsafe { (::windows::core::Vtable::vtable(this).SetAlbumArt)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() }) + pub fn SetAlbumArt(value: &super::Foundation::Uri) -> ::windows::core::Result<()> { + Self::IMediaControl(|this| unsafe { (::windows::core::Vtable::vtable(this).SetAlbumArt)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() }) } #[doc = "*Required features: `\"Foundation\"`, `\"deprecated\"`*"] #[cfg(all(feature = "Foundation", feature = "deprecated"))] @@ -2361,14 +2322,13 @@ impl MediaExtensionManager { } #[doc = "*Required features: `\"ApplicationModel_AppService\"`*"] #[cfg(feature = "ApplicationModel_AppService")] - pub fn RegisterMediaExtensionForAppService<'a, P0, E0, P1>(&self, extension: P0, connection: P1) -> ::windows::core::Result<()> + pub fn RegisterMediaExtensionForAppService<'a, P0, E0>(&self, extension: P0, connection: &super::ApplicationModel::AppService::AppServiceConnection) -> ::windows::core::Result<()> where P0: ::std::convert::TryInto<::windows::core::InParam<'a, IMediaExtension>, Error = E0>, E0: ::std::convert::Into<::windows::core::Error>, - P1: ::std::convert::Into<::windows::core::InParam<'a, super::ApplicationModel::AppService::AppServiceConnection>>, { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).RegisterMediaExtensionForAppService)(::windows::core::Vtable::as_raw(this), extension.try_into().map_err(|e| e.into())?.abi(), connection.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).RegisterMediaExtensionForAppService)(::windows::core::Vtable::as_raw(this), extension.try_into().map_err(|e| e.into())?.abi(), ::core::mem::transmute_copy(connection)).ok() } } } impl ::core::clone::Clone for MediaExtensionManager { @@ -2589,14 +2549,11 @@ impl MediaTimelineController { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn PositionChanged<'a, P0>(&self, positionchangedeventhandler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::Foundation::TypedEventHandler>>, - { + pub fn PositionChanged(&self, positionchangedeventhandler: &super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).PositionChanged)(::windows::core::Vtable::as_raw(this), positionchangedeventhandler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).PositionChanged)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(positionchangedeventhandler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -2607,14 +2564,11 @@ impl MediaTimelineController { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn StateChanged<'a, P0>(&self, statechangedeventhandler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::Foundation::TypedEventHandler>>, - { + pub fn StateChanged(&self, statechangedeventhandler: &super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).StateChanged)(::windows::core::Vtable::as_raw(this), statechangedeventhandler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).StateChanged)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(statechangedeventhandler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -2655,14 +2609,11 @@ impl MediaTimelineController { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn Failed<'a, P0>(&self, eventhandler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::Foundation::TypedEventHandler>>, - { + pub fn Failed(&self, eventhandler: &super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = &::windows::core::Interface::cast::(self)?; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).Failed)(::windows::core::Vtable::as_raw(this), eventhandler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).Failed)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(eventhandler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -2673,14 +2624,11 @@ impl MediaTimelineController { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn Ended<'a, P0>(&self, eventhandler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::Foundation::TypedEventHandler>>, - { + pub fn Ended(&self, eventhandler: &super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = &::windows::core::Interface::cast::(self)?; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).Ended)(::windows::core::Vtable::as_raw(this), eventhandler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).Ended)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(eventhandler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -3356,14 +3304,11 @@ impl SystemMediaTransportControls { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn ButtonPressed<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::Foundation::TypedEventHandler>>, - { + pub fn ButtonPressed(&self, handler: &super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).ButtonPressed)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).ButtonPressed)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -3374,14 +3319,11 @@ impl SystemMediaTransportControls { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn PropertyChanged<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::Foundation::TypedEventHandler>>, - { + pub fn PropertyChanged(&self, handler: &super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).PropertyChanged)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).PropertyChanged)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -3423,23 +3365,17 @@ impl SystemMediaTransportControls { let this = &::windows::core::Interface::cast::(self)?; unsafe { (::windows::core::Vtable::vtable(this).SetPlaybackRate)(::windows::core::Vtable::as_raw(this), value).ok() } } - pub fn UpdateTimelineProperties<'a, P0>(&self, timelineproperties: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, SystemMediaTransportControlsTimelineProperties>>, - { + pub fn UpdateTimelineProperties(&self, timelineproperties: &SystemMediaTransportControlsTimelineProperties) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).UpdateTimelineProperties)(::windows::core::Vtable::as_raw(this), timelineproperties.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).UpdateTimelineProperties)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(timelineproperties)).ok() } } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn PlaybackPositionChangeRequested<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::Foundation::TypedEventHandler>>, - { + pub fn PlaybackPositionChangeRequested(&self, handler: &super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = &::windows::core::Interface::cast::(self)?; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).PlaybackPositionChangeRequested)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).PlaybackPositionChangeRequested)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -3450,14 +3386,11 @@ impl SystemMediaTransportControls { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn PlaybackRateChangeRequested<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::Foundation::TypedEventHandler>>, - { + pub fn PlaybackRateChangeRequested(&self, handler: &super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = &::windows::core::Interface::cast::(self)?; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).PlaybackRateChangeRequested)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).PlaybackRateChangeRequested)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -3468,14 +3401,11 @@ impl SystemMediaTransportControls { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn ShuffleEnabledChangeRequested<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::Foundation::TypedEventHandler>>, - { + pub fn ShuffleEnabledChangeRequested(&self, handler: &super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = &::windows::core::Interface::cast::(self)?; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).ShuffleEnabledChangeRequested)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).ShuffleEnabledChangeRequested)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -3486,14 +3416,11 @@ impl SystemMediaTransportControls { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn AutoRepeatModeChangeRequested<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::Foundation::TypedEventHandler>>, - { + pub fn AutoRepeatModeChangeRequested(&self, handler: &super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = &::windows::core::Interface::cast::(self)?; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).AutoRepeatModeChangeRequested)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).AutoRepeatModeChangeRequested)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -3691,12 +3618,9 @@ impl SystemMediaTransportControlsDisplayUpdater { } #[doc = "*Required features: `\"Storage_Streams\"`*"] #[cfg(feature = "Storage_Streams")] - pub fn SetThumbnail<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::Storage::Streams::RandomAccessStreamReference>>, - { + pub fn SetThumbnail(&self, value: &super::Storage::Streams::RandomAccessStreamReference) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).SetThumbnail)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetThumbnail)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } pub fn MusicProperties(&self) -> ::windows::core::Result { let this = self; @@ -3721,14 +3645,11 @@ impl SystemMediaTransportControlsDisplayUpdater { } #[doc = "*Required features: `\"Foundation\"`, `\"Storage\"`*"] #[cfg(all(feature = "Foundation", feature = "Storage"))] - pub fn CopyFromFileAsync<'a, P0>(&self, r#type: MediaPlaybackType, source: P0) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::Storage::StorageFile>>, - { + pub fn CopyFromFileAsync(&self, r#type: MediaPlaybackType, source: &super::Storage::StorageFile) -> ::windows::core::Result> { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).CopyFromFileAsync)(::windows::core::Vtable::as_raw(this), r#type, source.into().abi(), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).CopyFromFileAsync)(::windows::core::Vtable::as_raw(this), r#type, ::core::mem::transmute_copy(source), result__.as_mut_ptr()).from_abi::>(result__) } } pub fn ClearAll(&self) -> ::windows::core::Result<()> { @@ -4261,14 +4182,11 @@ impl VideoFrame { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn CopyToAsync<'a, P0>(&self, frame: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, VideoFrame>>, - { + pub fn CopyToAsync(&self, frame: &VideoFrame) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).CopyToAsync)(::windows::core::Vtable::as_raw(this), frame.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).CopyToAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(frame), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Graphics_DirectX_Direct3D11\"`*"] @@ -4282,18 +4200,17 @@ impl VideoFrame { } #[doc = "*Required features: `\"Foundation\"`, `\"Graphics_Imaging\"`*"] #[cfg(all(feature = "Foundation", feature = "Graphics_Imaging"))] - pub fn CopyToWithBoundsAsync<'a, P0, P1, E1, P2, E2>(&self, frame: P0, sourcebounds: P1, destinationbounds: P2) -> ::windows::core::Result + pub fn CopyToWithBoundsAsync<'a, P0, E0, P1, E1>(&self, frame: &VideoFrame, sourcebounds: P0, destinationbounds: P1) -> ::windows::core::Result where - P0: ::std::convert::Into<::windows::core::InParam<'a, VideoFrame>>, + P0: ::std::convert::TryInto<::windows::core::InParam<'a, super::Foundation::IReference>, Error = E0>, + E0: ::std::convert::Into<::windows::core::Error>, P1: ::std::convert::TryInto<::windows::core::InParam<'a, super::Foundation::IReference>, Error = E1>, E1: ::std::convert::Into<::windows::core::Error>, - P2: ::std::convert::TryInto<::windows::core::InParam<'a, super::Foundation::IReference>, Error = E2>, - E2: ::std::convert::Into<::windows::core::Error>, { let this = &::windows::core::Interface::cast::(self)?; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).CopyToWithBoundsAsync)(::windows::core::Vtable::as_raw(this), frame.into().abi(), sourcebounds.try_into().map_err(|e| e.into())?.abi(), destinationbounds.try_into().map_err(|e| e.into())?.abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).CopyToWithBoundsAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(frame), sourcebounds.try_into().map_err(|e| e.into())?.abi(), destinationbounds.try_into().map_err(|e| e.into())?.abi(), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Graphics_Imaging\"`*"] @@ -4334,13 +4251,10 @@ impl VideoFrame { } #[doc = "*Required features: `\"Graphics_Imaging\"`*"] #[cfg(feature = "Graphics_Imaging")] - pub fn CreateWithSoftwareBitmap<'a, P0>(bitmap: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::Graphics::Imaging::SoftwareBitmap>>, - { + pub fn CreateWithSoftwareBitmap(bitmap: &super::Graphics::Imaging::SoftwareBitmap) -> ::windows::core::Result { Self::IVideoFrameStatics(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).CreateWithSoftwareBitmap)(::windows::core::Vtable::as_raw(this), bitmap.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).CreateWithSoftwareBitmap)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(bitmap), result__.as_mut_ptr()).from_abi::(result__) }) } #[doc = "*Required features: `\"Graphics_DirectX_Direct3D11\"`*"] diff --git a/crates/libs/windows/src/Windows/Networking/BackgroundTransfer/mod.rs b/crates/libs/windows/src/Windows/Networking/BackgroundTransfer/mod.rs index a4b251d43d..46351544c8 100644 --- a/crates/libs/windows/src/Windows/Networking/BackgroundTransfer/mod.rs +++ b/crates/libs/windows/src/Windows/Networking/BackgroundTransfer/mod.rs @@ -183,12 +183,9 @@ impl IBackgroundTransferBase { } #[doc = "*Required features: `\"Security_Credentials\"`*"] #[cfg(feature = "Security_Credentials")] - pub fn SetServerCredential<'a, P0>(&self, credential: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Security::Credentials::PasswordCredential>>, - { + pub fn SetServerCredential(&self, credential: &super::super::Security::Credentials::PasswordCredential) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).SetServerCredential)(::windows::core::Vtable::as_raw(this), credential.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetServerCredential)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(credential)).ok() } } #[doc = "*Required features: `\"Security_Credentials\"`*"] #[cfg(feature = "Security_Credentials")] @@ -201,12 +198,9 @@ impl IBackgroundTransferBase { } #[doc = "*Required features: `\"Security_Credentials\"`*"] #[cfg(feature = "Security_Credentials")] - pub fn SetProxyCredential<'a, P0>(&self, credential: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Security::Credentials::PasswordCredential>>, - { + pub fn SetProxyCredential(&self, credential: &super::super::Security::Credentials::PasswordCredential) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).SetProxyCredential)(::windows::core::Vtable::as_raw(this), credential.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetProxyCredential)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(credential)).ok() } } pub fn Method(&self) -> ::windows::core::Result<::windows::core::HSTRING> { let this = self; @@ -1255,48 +1249,45 @@ impl BackgroundDownloader { } #[doc = "*Required features: `\"Foundation\"`, `\"Storage\"`*"] #[cfg(all(feature = "Foundation", feature = "Storage"))] - pub fn CreateDownload<'a, P0, P1, E1>(&self, uri: P0, resultfile: P1) -> ::windows::core::Result + pub fn CreateDownload<'a, P0, E0>(&self, uri: &super::super::Foundation::Uri, resultfile: P0) -> ::windows::core::Result where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::Uri>>, - P1: ::std::convert::TryInto<::windows::core::InParam<'a, super::super::Storage::IStorageFile>, Error = E1>, - E1: ::std::convert::Into<::windows::core::Error>, + P0: ::std::convert::TryInto<::windows::core::InParam<'a, super::super::Storage::IStorageFile>, Error = E0>, + E0: ::std::convert::Into<::windows::core::Error>, { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).CreateDownload)(::windows::core::Vtable::as_raw(this), uri.into().abi(), resultfile.try_into().map_err(|e| e.into())?.abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).CreateDownload)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(uri), resultfile.try_into().map_err(|e| e.into())?.abi(), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`, `\"Storage\"`*"] #[cfg(all(feature = "Foundation", feature = "Storage"))] - pub fn CreateDownloadFromFile<'a, P0, P1, E1, P2, E2>(&self, uri: P0, resultfile: P1, requestbodyfile: P2) -> ::windows::core::Result + pub fn CreateDownloadFromFile<'a, P0, E0, P1, E1>(&self, uri: &super::super::Foundation::Uri, resultfile: P0, requestbodyfile: P1) -> ::windows::core::Result where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::Uri>>, + P0: ::std::convert::TryInto<::windows::core::InParam<'a, super::super::Storage::IStorageFile>, Error = E0>, + E0: ::std::convert::Into<::windows::core::Error>, P1: ::std::convert::TryInto<::windows::core::InParam<'a, super::super::Storage::IStorageFile>, Error = E1>, E1: ::std::convert::Into<::windows::core::Error>, - P2: ::std::convert::TryInto<::windows::core::InParam<'a, super::super::Storage::IStorageFile>, Error = E2>, - E2: ::std::convert::Into<::windows::core::Error>, { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).CreateDownloadFromFile)(::windows::core::Vtable::as_raw(this), uri.into().abi(), resultfile.try_into().map_err(|e| e.into())?.abi(), requestbodyfile.try_into().map_err(|e| e.into())?.abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).CreateDownloadFromFile)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(uri), resultfile.try_into().map_err(|e| e.into())?.abi(), requestbodyfile.try_into().map_err(|e| e.into())?.abi(), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`, `\"Storage_Streams\"`*"] #[cfg(all(feature = "Foundation", feature = "Storage_Streams"))] - pub fn CreateDownloadAsync<'a, P0, P1, E1, P2, E2>(&self, uri: P0, resultfile: P1, requestbodystream: P2) -> ::windows::core::Result> + pub fn CreateDownloadAsync<'a, P0, E0, P1, E1>(&self, uri: &super::super::Foundation::Uri, resultfile: P0, requestbodystream: P1) -> ::windows::core::Result> where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::Uri>>, - P1: ::std::convert::TryInto<::windows::core::InParam<'a, super::super::Storage::IStorageFile>, Error = E1>, + P0: ::std::convert::TryInto<::windows::core::InParam<'a, super::super::Storage::IStorageFile>, Error = E0>, + E0: ::std::convert::Into<::windows::core::Error>, + P1: ::std::convert::TryInto<::windows::core::InParam<'a, super::super::Storage::Streams::IInputStream>, Error = E1>, E1: ::std::convert::Into<::windows::core::Error>, - P2: ::std::convert::TryInto<::windows::core::InParam<'a, super::super::Storage::Streams::IInputStream>, Error = E2>, - E2: ::std::convert::Into<::windows::core::Error>, { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).CreateDownloadAsync)(::windows::core::Vtable::as_raw(this), uri.into().abi(), resultfile.try_into().map_err(|e| e.into())?.abi(), requestbodystream.try_into().map_err(|e| e.into())?.abi(), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).CreateDownloadAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(uri), resultfile.try_into().map_err(|e| e.into())?.abi(), requestbodystream.try_into().map_err(|e| e.into())?.abi(), result__.as_mut_ptr()).from_abi::>(result__) } } pub fn TransferGroup(&self) -> ::windows::core::Result { @@ -1306,12 +1297,9 @@ impl BackgroundDownloader { (::windows::core::Vtable::vtable(this).TransferGroup)(::windows::core::Vtable::as_raw(this), result__.as_mut_ptr()).from_abi::(result__) } } - pub fn SetTransferGroup<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, BackgroundTransferGroup>>, - { + pub fn SetTransferGroup(&self, value: &BackgroundTransferGroup) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).SetTransferGroup)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetTransferGroup)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } #[doc = "*Required features: `\"UI_Notifications\"`*"] #[cfg(feature = "UI_Notifications")] @@ -1324,12 +1312,9 @@ impl BackgroundDownloader { } #[doc = "*Required features: `\"UI_Notifications\"`*"] #[cfg(feature = "UI_Notifications")] - pub fn SetSuccessToastNotification<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::UI::Notifications::ToastNotification>>, - { + pub fn SetSuccessToastNotification(&self, value: &super::super::UI::Notifications::ToastNotification) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).SetSuccessToastNotification)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetSuccessToastNotification)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } #[doc = "*Required features: `\"UI_Notifications\"`*"] #[cfg(feature = "UI_Notifications")] @@ -1342,12 +1327,9 @@ impl BackgroundDownloader { } #[doc = "*Required features: `\"UI_Notifications\"`*"] #[cfg(feature = "UI_Notifications")] - pub fn SetFailureToastNotification<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::UI::Notifications::ToastNotification>>, - { + pub fn SetFailureToastNotification(&self, value: &super::super::UI::Notifications::ToastNotification) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).SetFailureToastNotification)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetFailureToastNotification)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } #[doc = "*Required features: `\"UI_Notifications\"`*"] #[cfg(feature = "UI_Notifications")] @@ -1360,12 +1342,9 @@ impl BackgroundDownloader { } #[doc = "*Required features: `\"UI_Notifications\"`*"] #[cfg(feature = "UI_Notifications")] - pub fn SetSuccessTileNotification<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::UI::Notifications::TileNotification>>, - { + pub fn SetSuccessTileNotification(&self, value: &super::super::UI::Notifications::TileNotification) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).SetSuccessTileNotification)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetSuccessTileNotification)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } #[doc = "*Required features: `\"UI_Notifications\"`*"] #[cfg(feature = "UI_Notifications")] @@ -1378,12 +1357,9 @@ impl BackgroundDownloader { } #[doc = "*Required features: `\"UI_Notifications\"`*"] #[cfg(feature = "UI_Notifications")] - pub fn SetFailureTileNotification<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::UI::Notifications::TileNotification>>, - { + pub fn SetFailureTileNotification(&self, value: &super::super::UI::Notifications::TileNotification) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).SetFailureTileNotification)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetFailureTileNotification)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } pub fn CompletionGroup(&self) -> ::windows::core::Result { let this = &::windows::core::Interface::cast::(self)?; @@ -1392,13 +1368,10 @@ impl BackgroundDownloader { (::windows::core::Vtable::vtable(this).CompletionGroup)(::windows::core::Vtable::as_raw(this), result__.as_mut_ptr()).from_abi::(result__) } } - pub fn CreateWithCompletionGroup<'a, P0>(completiongroup: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, BackgroundTransferCompletionGroup>>, - { + pub fn CreateWithCompletionGroup(completiongroup: &BackgroundTransferCompletionGroup) -> ::windows::core::Result { Self::IBackgroundDownloaderFactory(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).CreateWithCompletionGroup)(::windows::core::Vtable::as_raw(this), completiongroup.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).CreateWithCompletionGroup)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(completiongroup), result__.as_mut_ptr()).from_abi::(result__) }) } #[doc = "*Required features: `\"Foundation_Collections\"`*"] @@ -1419,13 +1392,10 @@ impl BackgroundDownloader { } #[doc = "*Required features: `\"Foundation_Collections\"`*"] #[cfg(feature = "Foundation_Collections")] - pub fn GetCurrentDownloadsForTransferGroupAsync<'a, P0>(group: P0) -> ::windows::core::Result>> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, BackgroundTransferGroup>>, - { + pub fn GetCurrentDownloadsForTransferGroupAsync(group: &BackgroundTransferGroup) -> ::windows::core::Result>> { Self::IBackgroundDownloaderStaticMethods2(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).GetCurrentDownloadsForTransferGroupAsync)(::windows::core::Vtable::as_raw(this), group.into().abi(), result__.as_mut_ptr()).from_abi::>>(result__) + (::windows::core::Vtable::vtable(this).GetCurrentDownloadsForTransferGroupAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(group), result__.as_mut_ptr()).from_abi::>>(result__) }) } #[doc = "*Required features: `\"Foundation_Collections\"`, `\"deprecated\"`*"] @@ -1455,12 +1425,9 @@ impl BackgroundDownloader { } #[doc = "*Required features: `\"Security_Credentials\"`*"] #[cfg(feature = "Security_Credentials")] - pub fn SetServerCredential<'a, P0>(&self, credential: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Security::Credentials::PasswordCredential>>, - { + pub fn SetServerCredential(&self, credential: &super::super::Security::Credentials::PasswordCredential) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).SetServerCredential)(::windows::core::Vtable::as_raw(this), credential.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetServerCredential)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(credential)).ok() } } #[doc = "*Required features: `\"Security_Credentials\"`*"] #[cfg(feature = "Security_Credentials")] @@ -1473,12 +1440,9 @@ impl BackgroundDownloader { } #[doc = "*Required features: `\"Security_Credentials\"`*"] #[cfg(feature = "Security_Credentials")] - pub fn SetProxyCredential<'a, P0>(&self, credential: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Security::Credentials::PasswordCredential>>, - { + pub fn SetProxyCredential(&self, credential: &super::super::Security::Credentials::PasswordCredential) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).SetProxyCredential)(::windows::core::Vtable::as_raw(this), credential.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetProxyCredential)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(credential)).ok() } } pub fn Method(&self) -> ::windows::core::Result<::windows::core::HSTRING> { let this = &::windows::core::Interface::cast::(self)?; @@ -2154,12 +2118,9 @@ impl BackgroundUploader { } #[doc = "*Required features: `\"Security_Credentials\"`*"] #[cfg(feature = "Security_Credentials")] - pub fn SetServerCredential<'a, P0>(&self, credential: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Security::Credentials::PasswordCredential>>, - { + pub fn SetServerCredential(&self, credential: &super::super::Security::Credentials::PasswordCredential) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).SetServerCredential)(::windows::core::Vtable::as_raw(this), credential.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetServerCredential)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(credential)).ok() } } #[doc = "*Required features: `\"Security_Credentials\"`*"] #[cfg(feature = "Security_Credentials")] @@ -2172,12 +2133,9 @@ impl BackgroundUploader { } #[doc = "*Required features: `\"Security_Credentials\"`*"] #[cfg(feature = "Security_Credentials")] - pub fn SetProxyCredential<'a, P0>(&self, credential: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Security::Credentials::PasswordCredential>>, - { + pub fn SetProxyCredential(&self, credential: &super::super::Security::Credentials::PasswordCredential) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).SetProxyCredential)(::windows::core::Vtable::as_raw(this), credential.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetProxyCredential)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(credential)).ok() } } pub fn Method(&self) -> ::windows::core::Result<::windows::core::HSTRING> { let this = &::windows::core::Interface::cast::(self)?; @@ -2218,72 +2176,67 @@ impl BackgroundUploader { } #[doc = "*Required features: `\"Foundation\"`, `\"Storage\"`*"] #[cfg(all(feature = "Foundation", feature = "Storage"))] - pub fn CreateUpload<'a, P0, P1, E1>(&self, uri: P0, sourcefile: P1) -> ::windows::core::Result + pub fn CreateUpload<'a, P0, E0>(&self, uri: &super::super::Foundation::Uri, sourcefile: P0) -> ::windows::core::Result where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::Uri>>, - P1: ::std::convert::TryInto<::windows::core::InParam<'a, super::super::Storage::IStorageFile>, Error = E1>, - E1: ::std::convert::Into<::windows::core::Error>, + P0: ::std::convert::TryInto<::windows::core::InParam<'a, super::super::Storage::IStorageFile>, Error = E0>, + E0: ::std::convert::Into<::windows::core::Error>, { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).CreateUpload)(::windows::core::Vtable::as_raw(this), uri.into().abi(), sourcefile.try_into().map_err(|e| e.into())?.abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).CreateUpload)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(uri), sourcefile.try_into().map_err(|e| e.into())?.abi(), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`, `\"Storage_Streams\"`*"] #[cfg(all(feature = "Foundation", feature = "Storage_Streams"))] - pub fn CreateUploadFromStreamAsync<'a, P0, P1, E1>(&self, uri: P0, sourcestream: P1) -> ::windows::core::Result> + pub fn CreateUploadFromStreamAsync<'a, P0, E0>(&self, uri: &super::super::Foundation::Uri, sourcestream: P0) -> ::windows::core::Result> where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::Uri>>, - P1: ::std::convert::TryInto<::windows::core::InParam<'a, super::super::Storage::Streams::IInputStream>, Error = E1>, - E1: ::std::convert::Into<::windows::core::Error>, + P0: ::std::convert::TryInto<::windows::core::InParam<'a, super::super::Storage::Streams::IInputStream>, Error = E0>, + E0: ::std::convert::Into<::windows::core::Error>, { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).CreateUploadFromStreamAsync)(::windows::core::Vtable::as_raw(this), uri.into().abi(), sourcestream.try_into().map_err(|e| e.into())?.abi(), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).CreateUploadFromStreamAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(uri), sourcestream.try_into().map_err(|e| e.into())?.abi(), result__.as_mut_ptr()).from_abi::>(result__) } } #[doc = "*Required features: `\"Foundation_Collections\"`*"] #[cfg(feature = "Foundation_Collections")] - pub fn CreateUploadWithFormDataAndAutoBoundaryAsync<'a, P0, P1, E1>(&self, uri: P0, parts: P1) -> ::windows::core::Result> + pub fn CreateUploadWithFormDataAndAutoBoundaryAsync<'a, P0, E0>(&self, uri: &super::super::Foundation::Uri, parts: P0) -> ::windows::core::Result> where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::Uri>>, - P1: ::std::convert::TryInto<::windows::core::InParam<'a, super::super::Foundation::Collections::IIterable>, Error = E1>, - E1: ::std::convert::Into<::windows::core::Error>, + P0: ::std::convert::TryInto<::windows::core::InParam<'a, super::super::Foundation::Collections::IIterable>, Error = E0>, + E0: ::std::convert::Into<::windows::core::Error>, { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).CreateUploadWithFormDataAndAutoBoundaryAsync)(::windows::core::Vtable::as_raw(this), uri.into().abi(), parts.try_into().map_err(|e| e.into())?.abi(), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).CreateUploadWithFormDataAndAutoBoundaryAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(uri), parts.try_into().map_err(|e| e.into())?.abi(), result__.as_mut_ptr()).from_abi::>(result__) } } #[doc = "*Required features: `\"Foundation_Collections\"`*"] #[cfg(feature = "Foundation_Collections")] - pub fn CreateUploadWithSubTypeAsync<'a, P0, P1, E1>(&self, uri: P0, parts: P1, subtype: &::windows::core::HSTRING) -> ::windows::core::Result> + pub fn CreateUploadWithSubTypeAsync<'a, P0, E0>(&self, uri: &super::super::Foundation::Uri, parts: P0, subtype: &::windows::core::HSTRING) -> ::windows::core::Result> where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::Uri>>, - P1: ::std::convert::TryInto<::windows::core::InParam<'a, super::super::Foundation::Collections::IIterable>, Error = E1>, - E1: ::std::convert::Into<::windows::core::Error>, + P0: ::std::convert::TryInto<::windows::core::InParam<'a, super::super::Foundation::Collections::IIterable>, Error = E0>, + E0: ::std::convert::Into<::windows::core::Error>, { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).CreateUploadWithSubTypeAsync)(::windows::core::Vtable::as_raw(this), uri.into().abi(), parts.try_into().map_err(|e| e.into())?.abi(), ::core::mem::transmute_copy(subtype), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).CreateUploadWithSubTypeAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(uri), parts.try_into().map_err(|e| e.into())?.abi(), ::core::mem::transmute_copy(subtype), result__.as_mut_ptr()).from_abi::>(result__) } } #[doc = "*Required features: `\"Foundation_Collections\"`*"] #[cfg(feature = "Foundation_Collections")] - pub fn CreateUploadWithSubTypeAndBoundaryAsync<'a, P0, P1, E1>(&self, uri: P0, parts: P1, subtype: &::windows::core::HSTRING, boundary: &::windows::core::HSTRING) -> ::windows::core::Result> + pub fn CreateUploadWithSubTypeAndBoundaryAsync<'a, P0, E0>(&self, uri: &super::super::Foundation::Uri, parts: P0, subtype: &::windows::core::HSTRING, boundary: &::windows::core::HSTRING) -> ::windows::core::Result> where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::Uri>>, - P1: ::std::convert::TryInto<::windows::core::InParam<'a, super::super::Foundation::Collections::IIterable>, Error = E1>, - E1: ::std::convert::Into<::windows::core::Error>, + P0: ::std::convert::TryInto<::windows::core::InParam<'a, super::super::Foundation::Collections::IIterable>, Error = E0>, + E0: ::std::convert::Into<::windows::core::Error>, { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).CreateUploadWithSubTypeAndBoundaryAsync)(::windows::core::Vtable::as_raw(this), uri.into().abi(), parts.try_into().map_err(|e| e.into())?.abi(), ::core::mem::transmute_copy(subtype), ::core::mem::transmute_copy(boundary), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).CreateUploadWithSubTypeAndBoundaryAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(uri), parts.try_into().map_err(|e| e.into())?.abi(), ::core::mem::transmute_copy(subtype), ::core::mem::transmute_copy(boundary), result__.as_mut_ptr()).from_abi::>(result__) } } pub fn TransferGroup(&self) -> ::windows::core::Result { @@ -2293,12 +2246,9 @@ impl BackgroundUploader { (::windows::core::Vtable::vtable(this).TransferGroup)(::windows::core::Vtable::as_raw(this), result__.as_mut_ptr()).from_abi::(result__) } } - pub fn SetTransferGroup<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, BackgroundTransferGroup>>, - { + pub fn SetTransferGroup(&self, value: &BackgroundTransferGroup) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).SetTransferGroup)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetTransferGroup)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } #[doc = "*Required features: `\"UI_Notifications\"`*"] #[cfg(feature = "UI_Notifications")] @@ -2311,12 +2261,9 @@ impl BackgroundUploader { } #[doc = "*Required features: `\"UI_Notifications\"`*"] #[cfg(feature = "UI_Notifications")] - pub fn SetSuccessToastNotification<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::UI::Notifications::ToastNotification>>, - { + pub fn SetSuccessToastNotification(&self, value: &super::super::UI::Notifications::ToastNotification) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).SetSuccessToastNotification)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetSuccessToastNotification)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } #[doc = "*Required features: `\"UI_Notifications\"`*"] #[cfg(feature = "UI_Notifications")] @@ -2329,12 +2276,9 @@ impl BackgroundUploader { } #[doc = "*Required features: `\"UI_Notifications\"`*"] #[cfg(feature = "UI_Notifications")] - pub fn SetFailureToastNotification<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::UI::Notifications::ToastNotification>>, - { + pub fn SetFailureToastNotification(&self, value: &super::super::UI::Notifications::ToastNotification) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).SetFailureToastNotification)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetFailureToastNotification)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } #[doc = "*Required features: `\"UI_Notifications\"`*"] #[cfg(feature = "UI_Notifications")] @@ -2347,12 +2291,9 @@ impl BackgroundUploader { } #[doc = "*Required features: `\"UI_Notifications\"`*"] #[cfg(feature = "UI_Notifications")] - pub fn SetSuccessTileNotification<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::UI::Notifications::TileNotification>>, - { + pub fn SetSuccessTileNotification(&self, value: &super::super::UI::Notifications::TileNotification) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).SetSuccessTileNotification)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetSuccessTileNotification)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } #[doc = "*Required features: `\"UI_Notifications\"`*"] #[cfg(feature = "UI_Notifications")] @@ -2365,12 +2306,9 @@ impl BackgroundUploader { } #[doc = "*Required features: `\"UI_Notifications\"`*"] #[cfg(feature = "UI_Notifications")] - pub fn SetFailureTileNotification<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::UI::Notifications::TileNotification>>, - { + pub fn SetFailureTileNotification(&self, value: &super::super::UI::Notifications::TileNotification) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).SetFailureTileNotification)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetFailureTileNotification)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } pub fn CompletionGroup(&self) -> ::windows::core::Result { let this = &::windows::core::Interface::cast::(self)?; @@ -2379,13 +2317,10 @@ impl BackgroundUploader { (::windows::core::Vtable::vtable(this).CompletionGroup)(::windows::core::Vtable::as_raw(this), result__.as_mut_ptr()).from_abi::(result__) } } - pub fn CreateWithCompletionGroup<'a, P0>(completiongroup: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, BackgroundTransferCompletionGroup>>, - { + pub fn CreateWithCompletionGroup(completiongroup: &BackgroundTransferCompletionGroup) -> ::windows::core::Result { Self::IBackgroundUploaderFactory(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).CreateWithCompletionGroup)(::windows::core::Vtable::as_raw(this), completiongroup.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).CreateWithCompletionGroup)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(completiongroup), result__.as_mut_ptr()).from_abi::(result__) }) } #[doc = "*Required features: `\"Foundation_Collections\"`*"] @@ -2406,13 +2341,10 @@ impl BackgroundUploader { } #[doc = "*Required features: `\"Foundation_Collections\"`*"] #[cfg(feature = "Foundation_Collections")] - pub fn GetCurrentUploadsForTransferGroupAsync<'a, P0>(group: P0) -> ::windows::core::Result>> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, BackgroundTransferGroup>>, - { + pub fn GetCurrentUploadsForTransferGroupAsync(group: &BackgroundTransferGroup) -> ::windows::core::Result>> { Self::IBackgroundUploaderStaticMethods2(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).GetCurrentUploadsForTransferGroupAsync)(::windows::core::Vtable::as_raw(this), group.into().abi(), result__.as_mut_ptr()).from_abi::>>(result__) + (::windows::core::Vtable::vtable(this).GetCurrentUploadsForTransferGroupAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(group), result__.as_mut_ptr()).from_abi::>>(result__) }) } #[doc = "*Required features: `\"Foundation_Collections\"`, `\"deprecated\"`*"] @@ -2545,11 +2477,8 @@ impl ContentPrefetcher { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn SetIndirectContentUri<'a, P0>(value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::Uri>>, - { - Self::IContentPrefetcher(|this| unsafe { (::windows::core::Vtable::vtable(this).SetIndirectContentUri)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() }) + pub fn SetIndirectContentUri(value: &super::super::Foundation::Uri) -> ::windows::core::Result<()> { + Self::IContentPrefetcher(|this| unsafe { (::windows::core::Vtable::vtable(this).SetIndirectContentUri)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() }) } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] @@ -2735,14 +2664,11 @@ impl DownloadOperation { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn RangesDownloaded<'a, P0>(&self, eventhandler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn RangesDownloaded(&self, eventhandler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = &::windows::core::Interface::cast::(self)?; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).RangesDownloaded)(::windows::core::Vtable::as_raw(this), eventhandler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).RangesDownloaded)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(eventhandler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -2753,12 +2679,9 @@ impl DownloadOperation { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn SetRequestedUri<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::Uri>>, - { + pub fn SetRequestedUri(&self, value: &super::super::Foundation::Uri) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).SetRequestedUri)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetRequestedUri)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } #[doc = "*Required features: `\"Foundation_Collections\"`, `\"Web\"`*"] #[cfg(all(feature = "Foundation_Collections", feature = "Web"))] diff --git a/crates/libs/windows/src/Windows/Networking/Connectivity/mod.rs b/crates/libs/windows/src/Windows/Networking/Connectivity/mod.rs index ca8142920f..c281cb78ba 100644 --- a/crates/libs/windows/src/Windows/Networking/Connectivity/mod.rs +++ b/crates/libs/windows/src/Windows/Networking/Connectivity/mod.rs @@ -1821,26 +1821,17 @@ pub struct ConnectivityManager; impl ConnectivityManager { #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn AcquireConnectionAsync<'a, P0>(cellularapncontext: P0) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, CellularApnContext>>, - { + pub fn AcquireConnectionAsync(cellularapncontext: &CellularApnContext) -> ::windows::core::Result> { Self::IConnectivityManagerStatics(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).AcquireConnectionAsync)(::windows::core::Vtable::as_raw(this), cellularapncontext.into().abi(), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).AcquireConnectionAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(cellularapncontext), result__.as_mut_ptr()).from_abi::>(result__) }) } - pub fn AddHttpRoutePolicy<'a, P0>(routepolicy: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, RoutePolicy>>, - { - Self::IConnectivityManagerStatics(|this| unsafe { (::windows::core::Vtable::vtable(this).AddHttpRoutePolicy)(::windows::core::Vtable::as_raw(this), routepolicy.into().abi()).ok() }) + pub fn AddHttpRoutePolicy(routepolicy: &RoutePolicy) -> ::windows::core::Result<()> { + Self::IConnectivityManagerStatics(|this| unsafe { (::windows::core::Vtable::vtable(this).AddHttpRoutePolicy)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(routepolicy)).ok() }) } - pub fn RemoveHttpRoutePolicy<'a, P0>(routepolicy: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, RoutePolicy>>, - { - Self::IConnectivityManagerStatics(|this| unsafe { (::windows::core::Vtable::vtable(this).RemoveHttpRoutePolicy)(::windows::core::Vtable::as_raw(this), routepolicy.into().abi()).ok() }) + pub fn RemoveHttpRoutePolicy(routepolicy: &RoutePolicy) -> ::windows::core::Result<()> { + Self::IConnectivityManagerStatics(|this| unsafe { (::windows::core::Vtable::vtable(this).RemoveHttpRoutePolicy)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(routepolicy)).ok() }) } #[doc(hidden)] pub fn IConnectivityManagerStatics ::windows::core::Result>(callback: F) -> ::windows::core::Result { @@ -2570,13 +2561,10 @@ impl NetworkInformation { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn GetProxyConfigurationAsync<'a, P0>(uri: P0) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::Uri>>, - { + pub fn GetProxyConfigurationAsync(uri: &super::super::Foundation::Uri) -> ::windows::core::Result> { Self::INetworkInformationStatics(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).GetProxyConfigurationAsync)(::windows::core::Vtable::as_raw(this), uri.into().abi(), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).GetProxyConfigurationAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(uri), result__.as_mut_ptr()).from_abi::>(result__) }) } #[doc = "*Required features: `\"Foundation_Collections\"`*"] @@ -2593,13 +2581,10 @@ impl NetworkInformation { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn NetworkStatusChanged<'a, P0>(networkstatushandler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, NetworkStatusChangedEventHandler>>, - { + pub fn NetworkStatusChanged(networkstatushandler: &NetworkStatusChangedEventHandler) -> ::windows::core::Result { Self::INetworkInformationStatics(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).NetworkStatusChanged)(::windows::core::Vtable::as_raw(this), networkstatushandler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).NetworkStatusChanged)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(networkstatushandler), result__.as_mut_ptr()).from_abi::(result__) }) } #[doc = "*Required features: `\"Foundation\"`*"] @@ -2609,13 +2594,10 @@ impl NetworkInformation { } #[doc = "*Required features: `\"Foundation_Collections\"`*"] #[cfg(feature = "Foundation_Collections")] - pub fn FindConnectionProfilesAsync<'a, P0>(pprofilefilter: P0) -> ::windows::core::Result>> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, ConnectionProfileFilter>>, - { + pub fn FindConnectionProfilesAsync(pprofilefilter: &ConnectionProfileFilter) -> ::windows::core::Result>> { Self::INetworkInformationStatics2(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).FindConnectionProfilesAsync)(::windows::core::Vtable::as_raw(this), pprofilefilter.into().abi(), result__.as_mut_ptr()).from_abi::>>(result__) + (::windows::core::Vtable::vtable(this).FindConnectionProfilesAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(pprofilefilter), result__.as_mut_ptr()).from_abi::>>(result__) }) } #[doc(hidden)] @@ -3215,14 +3197,10 @@ impl RoutePolicy { (::windows::core::Vtable::vtable(this).HostNameType)(::windows::core::Vtable::as_raw(this), result__.as_mut_ptr()).from_abi::(result__) } } - pub fn CreateRoutePolicy<'a, P0, P1>(connectionprofile: P0, hostname: P1, r#type: super::DomainNameType) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, ConnectionProfile>>, - P1: ::std::convert::Into<::windows::core::InParam<'a, super::HostName>>, - { + pub fn CreateRoutePolicy(connectionprofile: &ConnectionProfile, hostname: &super::HostName, r#type: super::DomainNameType) -> ::windows::core::Result { Self::IRoutePolicyFactory(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).CreateRoutePolicy)(::windows::core::Vtable::as_raw(this), connectionprofile.into().abi(), hostname.into().abi(), r#type, result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).CreateRoutePolicy)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(connectionprofile), ::core::mem::transmute_copy(hostname), r#type, result__.as_mut_ptr()).from_abi::(result__) }) } #[doc(hidden)] diff --git a/crates/libs/windows/src/Windows/Networking/NetworkOperators/mod.rs b/crates/libs/windows/src/Windows/Networking/NetworkOperators/mod.rs index a7e4d2fe36..9f27ee3901 100644 --- a/crates/libs/windows/src/Windows/Networking/NetworkOperators/mod.rs +++ b/crates/libs/windows/src/Windows/Networking/NetworkOperators/mod.rs @@ -2628,14 +2628,11 @@ impl ESim { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn ProfileChanged<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn ProfileChanged(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).ProfileChanged)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).ProfileChanged)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -3099,13 +3096,10 @@ impl ESimManager { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn ServiceInfoChanged<'a, P0>(handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::EventHandler<::windows::core::IInspectable>>>, - { + pub fn ServiceInfoChanged(handler: &super::super::Foundation::EventHandler<::windows::core::IInspectable>) -> ::windows::core::Result { Self::IESimManagerStatics(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).ServiceInfoChanged)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).ServiceInfoChanged)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) }) } #[doc = "*Required features: `\"Foundation\"`*"] @@ -3521,14 +3515,11 @@ impl ESimProfileMetadata { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn StateChanged<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn StateChanged(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).StateChanged)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).StateChanged)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -3948,14 +3939,11 @@ impl ESimWatcher { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn Added<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn Added(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).Added)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).Added)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -3966,14 +3954,11 @@ impl ESimWatcher { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn EnumerationCompleted<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn EnumerationCompleted(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).EnumerationCompleted)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).EnumerationCompleted)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -3984,14 +3969,11 @@ impl ESimWatcher { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn Removed<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn Removed(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).Removed)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).Removed)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -4002,14 +3984,11 @@ impl ESimWatcher { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn Stopped<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn Stopped(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).Stopped)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).Stopped)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -4020,14 +3999,11 @@ impl ESimWatcher { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn Updated<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn Updated(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).Updated)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).Updated)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -4922,14 +4898,11 @@ impl MobileBroadbandAccountWatcher { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn AccountAdded<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn AccountAdded(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).AccountAdded)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).AccountAdded)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -4940,14 +4913,11 @@ impl MobileBroadbandAccountWatcher { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn AccountUpdated<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn AccountUpdated(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).AccountUpdated)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).AccountUpdated)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -4958,14 +4928,11 @@ impl MobileBroadbandAccountWatcher { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn AccountRemoved<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn AccountRemoved(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).AccountRemoved)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).AccountRemoved)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -4976,14 +4943,11 @@ impl MobileBroadbandAccountWatcher { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn EnumerationCompleted<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn EnumerationCompleted(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).EnumerationCompleted)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).EnumerationCompleted)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -4994,14 +4958,11 @@ impl MobileBroadbandAccountWatcher { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn Stopped<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn Stopped(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).Stopped)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).Stopped)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -6873,14 +6834,11 @@ impl MobileBroadbandDeviceServiceDataSession { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn DataReceived<'a, P0>(&self, eventhandler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn DataReceived(&self, eventhandler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).DataReceived)(::windows::core::Vtable::as_raw(this), eventhandler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).DataReceived)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(eventhandler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -7252,14 +7210,11 @@ impl MobileBroadbandModem { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn IsInEmergencyCallModeChanged<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn IsInEmergencyCallModeChanged(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = &::windows::core::Interface::cast::(self)?; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).IsInEmergencyCallModeChanged)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).IsInEmergencyCallModeChanged)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -7455,20 +7410,13 @@ impl ::core::convert::From<&MobileBroadbandModemConfiguration> for &::windows::c #[repr(transparent)] pub struct MobileBroadbandModemIsolation(::windows::core::IUnknown); impl MobileBroadbandModemIsolation { - pub fn AddAllowedHost<'a, P0>(&self, host: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::HostName>>, - { + pub fn AddAllowedHost(&self, host: &super::HostName) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).AddAllowedHost)(::windows::core::Vtable::as_raw(this), host.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).AddAllowedHost)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(host)).ok() } } - pub fn AddAllowedHostRange<'a, P0, P1>(&self, first: P0, last: P1) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::HostName>>, - P1: ::std::convert::Into<::windows::core::InParam<'a, super::HostName>>, - { + pub fn AddAllowedHostRange(&self, first: &super::HostName, last: &super::HostName) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).AddAllowedHostRange)(::windows::core::Vtable::as_raw(this), first.into().abi(), last.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).AddAllowedHostRange)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(first), ::core::mem::transmute_copy(last)).ok() } } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] @@ -8761,14 +8709,11 @@ impl MobileBroadbandSarManager { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn TransmissionStateChanged<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn TransmissionStateChanged(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).TransmissionStateChanged)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).TransmissionStateChanged)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -9105,14 +9050,11 @@ impl MobileBroadbandSlotManager { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn SlotInfoChanged<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn SlotInfoChanged(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).SlotInfoChanged)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).SlotInfoChanged)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -9123,14 +9065,11 @@ impl MobileBroadbandSlotManager { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn CurrentSlotIndexChanged<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn CurrentSlotIndexChanged(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).CurrentSlotIndexChanged)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).CurrentSlotIndexChanged)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -10203,14 +10142,11 @@ impl NetworkOperatorTetheringManager { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn ConfigureAccessPointAsync<'a, P0>(&self, configuration: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, NetworkOperatorTetheringAccessPointConfiguration>>, - { + pub fn ConfigureAccessPointAsync(&self, configuration: &NetworkOperatorTetheringAccessPointConfiguration) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).ConfigureAccessPointAsync)(::windows::core::Vtable::as_raw(this), configuration.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).ConfigureAccessPointAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(configuration), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -10245,36 +10181,26 @@ impl NetworkOperatorTetheringManager { } #[doc = "*Required features: `\"Networking_Connectivity\"`*"] #[cfg(feature = "Networking_Connectivity")] - pub fn GetTetheringCapabilityFromConnectionProfile<'a, P0>(profile: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::Connectivity::ConnectionProfile>>, - { + pub fn GetTetheringCapabilityFromConnectionProfile(profile: &super::Connectivity::ConnectionProfile) -> ::windows::core::Result { Self::INetworkOperatorTetheringManagerStatics2(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).GetTetheringCapabilityFromConnectionProfile)(::windows::core::Vtable::as_raw(this), profile.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).GetTetheringCapabilityFromConnectionProfile)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(profile), result__.as_mut_ptr()).from_abi::(result__) }) } #[doc = "*Required features: `\"Networking_Connectivity\"`*"] #[cfg(feature = "Networking_Connectivity")] - pub fn CreateFromConnectionProfile<'a, P0>(profile: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::Connectivity::ConnectionProfile>>, - { + pub fn CreateFromConnectionProfile(profile: &super::Connectivity::ConnectionProfile) -> ::windows::core::Result { Self::INetworkOperatorTetheringManagerStatics2(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).CreateFromConnectionProfile)(::windows::core::Vtable::as_raw(this), profile.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).CreateFromConnectionProfile)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(profile), result__.as_mut_ptr()).from_abi::(result__) }) } #[doc = "*Required features: `\"Networking_Connectivity\"`*"] #[cfg(feature = "Networking_Connectivity")] - pub fn CreateFromConnectionProfileWithTargetAdapter<'a, P0, P1>(profile: P0, adapter: P1) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::Connectivity::ConnectionProfile>>, - P1: ::std::convert::Into<::windows::core::InParam<'a, super::Connectivity::NetworkAdapter>>, - { + pub fn CreateFromConnectionProfileWithTargetAdapter(profile: &super::Connectivity::ConnectionProfile, adapter: &super::Connectivity::NetworkAdapter) -> ::windows::core::Result { Self::INetworkOperatorTetheringManagerStatics3(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).CreateFromConnectionProfileWithTargetAdapter)(::windows::core::Vtable::as_raw(this), profile.into().abi(), adapter.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).CreateFromConnectionProfileWithTargetAdapter)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(profile), ::core::mem::transmute_copy(adapter), result__.as_mut_ptr()).from_abi::(result__) }) } pub fn IsNoConnectionsTimeoutEnabled() -> ::windows::core::Result { @@ -11014,14 +10940,11 @@ pub struct UssdSession(::windows::core::IUnknown); impl UssdSession { #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn SendMessageAndGetReplyAsync<'a, P0>(&self, message: P0) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, UssdMessage>>, - { + pub fn SendMessageAndGetReplyAsync(&self, message: &UssdMessage) -> ::windows::core::Result> { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).SendMessageAndGetReplyAsync)(::windows::core::Vtable::as_raw(this), message.into().abi(), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).SendMessageAndGetReplyAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(message), result__.as_mut_ptr()).from_abi::>(result__) } } pub fn Close(&self) -> ::windows::core::Result<()> { diff --git a/crates/libs/windows/src/Windows/Networking/Proximity/mod.rs b/crates/libs/windows/src/Windows/Networking/Proximity/mod.rs index 4acab2e85e..948b7e0bbf 100644 --- a/crates/libs/windows/src/Windows/Networking/Proximity/mod.rs +++ b/crates/libs/windows/src/Windows/Networking/Proximity/mod.rs @@ -451,13 +451,10 @@ impl PeerFinder { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn TriggeredConnectionStateChanged<'a, P0>(handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler<::windows::core::IInspectable, TriggeredConnectionStateChangedEventArgs>>>, - { + pub fn TriggeredConnectionStateChanged(handler: &super::super::Foundation::TypedEventHandler<::windows::core::IInspectable, TriggeredConnectionStateChangedEventArgs>) -> ::windows::core::Result { Self::IPeerFinderStatics(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).TriggeredConnectionStateChanged)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).TriggeredConnectionStateChanged)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) }) } #[doc = "*Required features: `\"Foundation\"`*"] @@ -467,13 +464,10 @@ impl PeerFinder { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn ConnectionRequested<'a, P0>(handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler<::windows::core::IInspectable, ConnectionRequestedEventArgs>>>, - { + pub fn ConnectionRequested(handler: &super::super::Foundation::TypedEventHandler<::windows::core::IInspectable, ConnectionRequestedEventArgs>) -> ::windows::core::Result { Self::IPeerFinderStatics(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).ConnectionRequested)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).ConnectionRequested)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) }) } #[doc = "*Required features: `\"Foundation\"`*"] @@ -491,13 +485,10 @@ impl PeerFinder { } #[doc = "*Required features: `\"Foundation\"`, `\"Networking_Sockets\"`*"] #[cfg(all(feature = "Foundation", feature = "Networking_Sockets"))] - pub fn ConnectAsync<'a, P0>(peerinformation: P0) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, PeerInformation>>, - { + pub fn ConnectAsync(peerinformation: &PeerInformation) -> ::windows::core::Result> { Self::IPeerFinderStatics(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).ConnectAsync)(::windows::core::Vtable::as_raw(this), peerinformation.into().abi(), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).ConnectAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(peerinformation), result__.as_mut_ptr()).from_abi::>(result__) }) } pub fn Role() -> ::windows::core::Result { @@ -658,14 +649,11 @@ pub struct PeerWatcher(::windows::core::IUnknown); impl PeerWatcher { #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn Added<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn Added(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).Added)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).Added)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -676,14 +664,11 @@ impl PeerWatcher { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn Removed<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn Removed(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).Removed)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).Removed)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -694,14 +679,11 @@ impl PeerWatcher { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn Updated<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn Updated(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).Updated)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).Updated)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -712,14 +694,11 @@ impl PeerWatcher { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn EnumerationCompleted<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn EnumerationCompleted(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).EnumerationCompleted)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).EnumerationCompleted)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -730,14 +709,11 @@ impl PeerWatcher { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn Stopped<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn Stopped(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).Stopped)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).Stopped)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -830,14 +806,11 @@ unsafe impl ::core::marker::Sync for PeerWatcher {} #[repr(transparent)] pub struct ProximityDevice(::windows::core::IUnknown); impl ProximityDevice { - pub fn SubscribeForMessage<'a, P0>(&self, messagetype: &::windows::core::HSTRING, messagereceivedhandler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, MessageReceivedHandler>>, - { + pub fn SubscribeForMessage(&self, messagetype: &::windows::core::HSTRING, messagereceivedhandler: &MessageReceivedHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).SubscribeForMessage)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(messagetype), messagereceivedhandler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).SubscribeForMessage)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(messagetype), ::core::mem::transmute_copy(messagereceivedhandler), result__.as_mut_ptr()).from_abi::(result__) } } pub fn PublishMessage(&self, messagetype: &::windows::core::HSTRING, message: &::windows::core::HSTRING) -> ::windows::core::Result { @@ -847,14 +820,11 @@ impl ProximityDevice { (::windows::core::Vtable::vtable(this).PublishMessage)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(messagetype), ::core::mem::transmute_copy(message), result__.as_mut_ptr()).from_abi::(result__) } } - pub fn PublishMessageWithCallback<'a, P0>(&self, messagetype: &::windows::core::HSTRING, message: &::windows::core::HSTRING, messagetransmittedhandler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, MessageTransmittedHandler>>, - { + pub fn PublishMessageWithCallback(&self, messagetype: &::windows::core::HSTRING, message: &::windows::core::HSTRING, messagetransmittedhandler: &MessageTransmittedHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).PublishMessageWithCallback)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(messagetype), ::core::mem::transmute_copy(message), messagetransmittedhandler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).PublishMessageWithCallback)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(messagetype), ::core::mem::transmute_copy(message), ::core::mem::transmute_copy(messagetransmittedhandler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Storage_Streams\"`*"] @@ -872,41 +842,33 @@ impl ProximityDevice { } #[doc = "*Required features: `\"Storage_Streams\"`*"] #[cfg(feature = "Storage_Streams")] - pub fn PublishBinaryMessageWithCallback<'a, P0, E0, P1>(&self, messagetype: &::windows::core::HSTRING, message: P0, messagetransmittedhandler: P1) -> ::windows::core::Result + pub fn PublishBinaryMessageWithCallback<'a, P0, E0>(&self, messagetype: &::windows::core::HSTRING, message: P0, messagetransmittedhandler: &MessageTransmittedHandler) -> ::windows::core::Result where P0: ::std::convert::TryInto<::windows::core::InParam<'a, super::super::Storage::Streams::IBuffer>, Error = E0>, E0: ::std::convert::Into<::windows::core::Error>, - P1: ::std::convert::Into<::windows::core::InParam<'a, MessageTransmittedHandler>>, { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).PublishBinaryMessageWithCallback)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(messagetype), message.try_into().map_err(|e| e.into())?.abi(), messagetransmittedhandler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).PublishBinaryMessageWithCallback)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(messagetype), message.try_into().map_err(|e| e.into())?.abi(), ::core::mem::transmute_copy(messagetransmittedhandler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn PublishUriMessage<'a, P0>(&self, message: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::Uri>>, - { + pub fn PublishUriMessage(&self, message: &super::super::Foundation::Uri) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).PublishUriMessage)(::windows::core::Vtable::as_raw(this), message.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).PublishUriMessage)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(message), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn PublishUriMessageWithCallback<'a, P0, P1>(&self, message: P0, messagetransmittedhandler: P1) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::Uri>>, - P1: ::std::convert::Into<::windows::core::InParam<'a, MessageTransmittedHandler>>, - { + pub fn PublishUriMessageWithCallback(&self, message: &super::super::Foundation::Uri, messagetransmittedhandler: &MessageTransmittedHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).PublishUriMessageWithCallback)(::windows::core::Vtable::as_raw(this), message.into().abi(), messagetransmittedhandler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).PublishUriMessageWithCallback)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(message), ::core::mem::transmute_copy(messagetransmittedhandler), result__.as_mut_ptr()).from_abi::(result__) } } pub fn StopSubscribingForMessage(&self, subscriptionid: i64) -> ::windows::core::Result<()> { @@ -919,14 +881,11 @@ impl ProximityDevice { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn DeviceArrived<'a, P0>(&self, arrivedhandler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, DeviceArrivedEventHandler>>, - { + pub fn DeviceArrived(&self, arrivedhandler: &DeviceArrivedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).DeviceArrived)(::windows::core::Vtable::as_raw(this), arrivedhandler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).DeviceArrived)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(arrivedhandler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -937,14 +896,11 @@ impl ProximityDevice { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn DeviceDeparted<'a, P0>(&self, departedhandler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, DeviceDepartedEventHandler>>, - { + pub fn DeviceDeparted(&self, departedhandler: &DeviceDepartedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).DeviceDeparted)(::windows::core::Vtable::as_raw(this), departedhandler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).DeviceDeparted)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(departedhandler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -1435,12 +1391,9 @@ impl DeviceArrivedEventHandler { let com = DeviceArrivedEventHandlerBox:: { vtable: &DeviceArrivedEventHandlerBox::::VTABLE, count: ::windows::core::RefCount::new(1), invoke }; unsafe { ::core::mem::transmute(::windows::core::alloc::boxed::Box::new(com)) } } - pub fn Invoke<'a, P0>(&self, sender: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, ProximityDevice>>, - { + pub fn Invoke(&self, sender: &ProximityDevice) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).Invoke)(::windows::core::Vtable::as_raw(this), sender.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).Invoke)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(sender)).ok() } } } #[repr(C)] @@ -1524,12 +1477,9 @@ impl DeviceDepartedEventHandler { let com = DeviceDepartedEventHandlerBox:: { vtable: &DeviceDepartedEventHandlerBox::::VTABLE, count: ::windows::core::RefCount::new(1), invoke }; unsafe { ::core::mem::transmute(::windows::core::alloc::boxed::Box::new(com)) } } - pub fn Invoke<'a, P0>(&self, sender: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, ProximityDevice>>, - { + pub fn Invoke(&self, sender: &ProximityDevice) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).Invoke)(::windows::core::Vtable::as_raw(this), sender.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).Invoke)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(sender)).ok() } } } #[repr(C)] @@ -1613,13 +1563,9 @@ impl MessageReceivedHandler { let com = MessageReceivedHandlerBox:: { vtable: &MessageReceivedHandlerBox::::VTABLE, count: ::windows::core::RefCount::new(1), invoke }; unsafe { ::core::mem::transmute(::windows::core::alloc::boxed::Box::new(com)) } } - pub fn Invoke<'a, P0, P1>(&self, sender: P0, message: P1) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, ProximityDevice>>, - P1: ::std::convert::Into<::windows::core::InParam<'a, ProximityMessage>>, - { + pub fn Invoke(&self, sender: &ProximityDevice, message: &ProximityMessage) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).Invoke)(::windows::core::Vtable::as_raw(this), sender.into().abi(), message.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).Invoke)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(sender), ::core::mem::transmute_copy(message)).ok() } } } #[repr(C)] @@ -1703,12 +1649,9 @@ impl MessageTransmittedHandler { let com = MessageTransmittedHandlerBox:: { vtable: &MessageTransmittedHandlerBox::::VTABLE, count: ::windows::core::RefCount::new(1), invoke }; unsafe { ::core::mem::transmute(::windows::core::alloc::boxed::Box::new(com)) } } - pub fn Invoke<'a, P0>(&self, sender: P0, messageid: i64) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, ProximityDevice>>, - { + pub fn Invoke(&self, sender: &ProximityDevice, messageid: i64) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).Invoke)(::windows::core::Vtable::as_raw(this), sender.into().abi(), messageid).ok() } + unsafe { (::windows::core::Vtable::vtable(this).Invoke)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(sender), messageid).ok() } } } #[repr(C)] diff --git a/crates/libs/windows/src/Windows/Networking/PushNotifications/mod.rs b/crates/libs/windows/src/Windows/Networking/PushNotifications/mod.rs index a87f98ccc8..2d21850f30 100644 --- a/crates/libs/windows/src/Windows/Networking/PushNotifications/mod.rs +++ b/crates/libs/windows/src/Windows/Networking/PushNotifications/mod.rs @@ -281,14 +281,11 @@ impl PushNotificationChannel { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn PushNotificationReceived<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn PushNotificationReceived(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).PushNotificationReceived)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).PushNotificationReceived)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -391,13 +388,10 @@ impl PushNotificationChannelManager { } #[doc = "*Required features: `\"System\"`*"] #[cfg(feature = "System")] - pub fn GetForUser<'a, P0>(user: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::System::User>>, - { + pub fn GetForUser(user: &super::super::System::User) -> ::windows::core::Result { Self::IPushNotificationChannelManagerStatics2(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).GetForUser)(::windows::core::Vtable::as_raw(this), user.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).GetForUser)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(user), result__.as_mut_ptr()).from_abi::(result__) }) } pub fn GetDefault() -> ::windows::core::Result { @@ -408,13 +402,10 @@ impl PushNotificationChannelManager { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn ChannelsRevoked<'a, P0>(handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::EventHandler>>, - { + pub fn ChannelsRevoked(handler: &super::super::Foundation::EventHandler) -> ::windows::core::Result { Self::IPushNotificationChannelManagerStatics4(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).ChannelsRevoked)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).ChannelsRevoked)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) }) } #[doc = "*Required features: `\"Foundation\"`*"] diff --git a/crates/libs/windows/src/Windows/Networking/ServiceDiscovery/Dnssd/mod.rs b/crates/libs/windows/src/Windows/Networking/ServiceDiscovery/Dnssd/mod.rs index 8a052f80c7..77a8a8922c 100644 --- a/crates/libs/windows/src/Windows/Networking/ServiceDiscovery/Dnssd/mod.rs +++ b/crates/libs/windows/src/Windows/Networking/ServiceDiscovery/Dnssd/mod.rs @@ -265,12 +265,9 @@ impl DnssdServiceInstance { (::windows::core::Vtable::vtable(this).HostName)(::windows::core::Vtable::as_raw(this), result__.as_mut_ptr()).from_abi::(result__) } } - pub fn SetHostName<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::HostName>>, - { + pub fn SetHostName(&self, value: &super::super::HostName) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).SetHostName)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetHostName)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } pub fn Port(&self) -> ::windows::core::Result { let this = self; @@ -316,61 +313,44 @@ impl DnssdServiceInstance { } #[doc = "*Required features: `\"Foundation\"`, `\"Networking_Sockets\"`*"] #[cfg(all(feature = "Foundation", feature = "Networking_Sockets"))] - pub fn RegisterStreamSocketListenerAsync1<'a, P0>(&self, socket: P0) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Sockets::StreamSocketListener>>, - { + pub fn RegisterStreamSocketListenerAsync1(&self, socket: &super::super::Sockets::StreamSocketListener) -> ::windows::core::Result> { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).RegisterStreamSocketListenerAsync1)(::windows::core::Vtable::as_raw(this), socket.into().abi(), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).RegisterStreamSocketListenerAsync1)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(socket), result__.as_mut_ptr()).from_abi::>(result__) } } #[doc = "*Required features: `\"Foundation\"`, `\"Networking_Connectivity\"`, `\"Networking_Sockets\"`*"] #[cfg(all(feature = "Foundation", feature = "Networking_Connectivity", feature = "Networking_Sockets"))] - pub fn RegisterStreamSocketListenerAsync2<'a, P0, P1>(&self, socket: P0, adapter: P1) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Sockets::StreamSocketListener>>, - P1: ::std::convert::Into<::windows::core::InParam<'a, super::super::Connectivity::NetworkAdapter>>, - { + pub fn RegisterStreamSocketListenerAsync2(&self, socket: &super::super::Sockets::StreamSocketListener, adapter: &super::super::Connectivity::NetworkAdapter) -> ::windows::core::Result> { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).RegisterStreamSocketListenerAsync2)(::windows::core::Vtable::as_raw(this), socket.into().abi(), adapter.into().abi(), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).RegisterStreamSocketListenerAsync2)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(socket), ::core::mem::transmute_copy(adapter), result__.as_mut_ptr()).from_abi::>(result__) } } #[doc = "*Required features: `\"Foundation\"`, `\"Networking_Sockets\"`*"] #[cfg(all(feature = "Foundation", feature = "Networking_Sockets"))] - pub fn RegisterDatagramSocketAsync1<'a, P0>(&self, socket: P0) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Sockets::DatagramSocket>>, - { + pub fn RegisterDatagramSocketAsync1(&self, socket: &super::super::Sockets::DatagramSocket) -> ::windows::core::Result> { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).RegisterDatagramSocketAsync1)(::windows::core::Vtable::as_raw(this), socket.into().abi(), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).RegisterDatagramSocketAsync1)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(socket), result__.as_mut_ptr()).from_abi::>(result__) } } #[doc = "*Required features: `\"Foundation\"`, `\"Networking_Connectivity\"`, `\"Networking_Sockets\"`*"] #[cfg(all(feature = "Foundation", feature = "Networking_Connectivity", feature = "Networking_Sockets"))] - pub fn RegisterDatagramSocketAsync2<'a, P0, P1>(&self, socket: P0, adapter: P1) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Sockets::DatagramSocket>>, - P1: ::std::convert::Into<::windows::core::InParam<'a, super::super::Connectivity::NetworkAdapter>>, - { + pub fn RegisterDatagramSocketAsync2(&self, socket: &super::super::Sockets::DatagramSocket, adapter: &super::super::Connectivity::NetworkAdapter) -> ::windows::core::Result> { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).RegisterDatagramSocketAsync2)(::windows::core::Vtable::as_raw(this), socket.into().abi(), adapter.into().abi(), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).RegisterDatagramSocketAsync2)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(socket), ::core::mem::transmute_copy(adapter), result__.as_mut_ptr()).from_abi::>(result__) } } - pub fn Create<'a, P0>(dnssdserviceinstancename: &::windows::core::HSTRING, hostname: P0, port: u16) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::HostName>>, - { + pub fn Create(dnssdserviceinstancename: &::windows::core::HSTRING, hostname: &super::super::HostName, port: u16) -> ::windows::core::Result { Self::IDnssdServiceInstanceFactory(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).Create)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(dnssdserviceinstancename), hostname.into().abi(), port, result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).Create)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(dnssdserviceinstancename), ::core::mem::transmute_copy(hostname), port, result__.as_mut_ptr()).from_abi::(result__) }) } #[doc = "*Required features: `\"Foundation\"`*"] @@ -509,14 +489,11 @@ impl DnssdServiceInstanceCollection { } #[doc = "*Required features: `\"Foundation_Collections\"`*"] #[cfg(feature = "Foundation_Collections")] - pub fn IndexOf<'a, P0>(&self, value: P0, index: &mut u32) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, DnssdServiceInstance>>, - { + pub fn IndexOf(&self, value: &DnssdServiceInstance, index: &mut u32) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).IndexOf)(::windows::core::Vtable::as_raw(this), value.into().abi(), index, result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).IndexOf)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value), index, result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation_Collections\"`*"] @@ -675,14 +652,11 @@ pub struct DnssdServiceWatcher(::windows::core::IUnknown); impl DnssdServiceWatcher { #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn Added<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Foundation::TypedEventHandler>>, - { + pub fn Added(&self, handler: &super::super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).Added)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).Added)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -693,14 +667,11 @@ impl DnssdServiceWatcher { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn EnumerationCompleted<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Foundation::TypedEventHandler>>, - { + pub fn EnumerationCompleted(&self, handler: &super::super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).EnumerationCompleted)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).EnumerationCompleted)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -711,14 +682,11 @@ impl DnssdServiceWatcher { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn Stopped<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Foundation::TypedEventHandler>>, - { + pub fn Stopped(&self, handler: &super::super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).Stopped)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).Stopped)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] diff --git a/crates/libs/windows/src/Windows/Networking/Sockets/mod.rs b/crates/libs/windows/src/Windows/Networking/Sockets/mod.rs index 22c9dff31e..efeb01adc0 100644 --- a/crates/libs/windows/src/Windows/Networking/Sockets/mod.rs +++ b/crates/libs/windows/src/Windows/Networking/Sockets/mod.rs @@ -1326,14 +1326,11 @@ impl IWebSocket { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn ConnectAsync<'a, P0>(&self, uri: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::Uri>>, - { + pub fn ConnectAsync(&self, uri: &super::super::Foundation::Uri) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).ConnectAsync)(::windows::core::Vtable::as_raw(this), uri.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).ConnectAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(uri), result__.as_mut_ptr()).from_abi::(result__) } } pub fn SetRequestHeader(&self, headername: &::windows::core::HSTRING, headervalue: &::windows::core::HSTRING) -> ::windows::core::Result<()> { @@ -1342,14 +1339,11 @@ impl IWebSocket { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn Closed<'a, P0>(&self, eventhandler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn Closed(&self, eventhandler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).Closed)(::windows::core::Vtable::as_raw(this), eventhandler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).Closed)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(eventhandler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -1515,12 +1509,9 @@ impl IWebSocketControl { } #[doc = "*Required features: `\"Security_Credentials\"`*"] #[cfg(feature = "Security_Credentials")] - pub fn SetServerCredential<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Security::Credentials::PasswordCredential>>, - { + pub fn SetServerCredential(&self, value: &super::super::Security::Credentials::PasswordCredential) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).SetServerCredential)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetServerCredential)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } #[doc = "*Required features: `\"Security_Credentials\"`*"] #[cfg(feature = "Security_Credentials")] @@ -1533,12 +1524,9 @@ impl IWebSocketControl { } #[doc = "*Required features: `\"Security_Credentials\"`*"] #[cfg(feature = "Security_Credentials")] - pub fn SetProxyCredential<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Security::Credentials::PasswordCredential>>, - { + pub fn SetProxyCredential(&self, value: &super::super::Security::Credentials::PasswordCredential) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).SetProxyCredential)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetProxyCredential)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } #[doc = "*Required features: `\"Foundation_Collections\"`*"] #[cfg(feature = "Foundation_Collections")] @@ -1671,12 +1659,9 @@ impl IWebSocketControl2 { } #[doc = "*Required features: `\"Security_Credentials\"`*"] #[cfg(feature = "Security_Credentials")] - pub fn SetServerCredential<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Security::Credentials::PasswordCredential>>, - { + pub fn SetServerCredential(&self, value: &super::super::Security::Credentials::PasswordCredential) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).SetServerCredential)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetServerCredential)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } #[doc = "*Required features: `\"Security_Credentials\"`*"] #[cfg(feature = "Security_Credentials")] @@ -1689,12 +1674,9 @@ impl IWebSocketControl2 { } #[doc = "*Required features: `\"Security_Credentials\"`*"] #[cfg(feature = "Security_Credentials")] - pub fn SetProxyCredential<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Security::Credentials::PasswordCredential>>, - { + pub fn SetProxyCredential(&self, value: &super::super::Security::Credentials::PasswordCredential) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).SetProxyCredential)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetProxyCredential)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } #[doc = "*Required features: `\"Foundation_Collections\"`*"] #[cfg(feature = "Foundation_Collections")] @@ -2327,26 +2309,20 @@ impl DatagramSocket { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn ConnectAsync<'a, P0>(&self, remotehostname: P0, remoteservicename: &::windows::core::HSTRING) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::HostName>>, - { + pub fn ConnectAsync(&self, remotehostname: &super::HostName, remoteservicename: &::windows::core::HSTRING) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).ConnectAsync)(::windows::core::Vtable::as_raw(this), remotehostname.into().abi(), ::core::mem::transmute_copy(remoteservicename), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).ConnectAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(remotehostname), ::core::mem::transmute_copy(remoteservicename), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn ConnectWithEndpointPairAsync<'a, P0>(&self, endpointpair: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::EndpointPair>>, - { + pub fn ConnectWithEndpointPairAsync(&self, endpointpair: &super::EndpointPair) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).ConnectWithEndpointPairAsync)(::windows::core::Vtable::as_raw(this), endpointpair.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).ConnectWithEndpointPairAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(endpointpair), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -2360,57 +2336,42 @@ impl DatagramSocket { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn BindEndpointAsync<'a, P0>(&self, localhostname: P0, localservicename: &::windows::core::HSTRING) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::HostName>>, - { + pub fn BindEndpointAsync(&self, localhostname: &super::HostName, localservicename: &::windows::core::HSTRING) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).BindEndpointAsync)(::windows::core::Vtable::as_raw(this), localhostname.into().abi(), ::core::mem::transmute_copy(localservicename), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).BindEndpointAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(localhostname), ::core::mem::transmute_copy(localservicename), result__.as_mut_ptr()).from_abi::(result__) } } - pub fn JoinMulticastGroup<'a, P0>(&self, host: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::HostName>>, - { + pub fn JoinMulticastGroup(&self, host: &super::HostName) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).JoinMulticastGroup)(::windows::core::Vtable::as_raw(this), host.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).JoinMulticastGroup)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(host)).ok() } } #[doc = "*Required features: `\"Foundation\"`, `\"Storage_Streams\"`*"] #[cfg(all(feature = "Foundation", feature = "Storage_Streams"))] - pub fn GetOutputStreamAsync<'a, P0>(&self, remotehostname: P0, remoteservicename: &::windows::core::HSTRING) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::HostName>>, - { + pub fn GetOutputStreamAsync(&self, remotehostname: &super::HostName, remoteservicename: &::windows::core::HSTRING) -> ::windows::core::Result> { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).GetOutputStreamAsync)(::windows::core::Vtable::as_raw(this), remotehostname.into().abi(), ::core::mem::transmute_copy(remoteservicename), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).GetOutputStreamAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(remotehostname), ::core::mem::transmute_copy(remoteservicename), result__.as_mut_ptr()).from_abi::>(result__) } } #[doc = "*Required features: `\"Foundation\"`, `\"Storage_Streams\"`*"] #[cfg(all(feature = "Foundation", feature = "Storage_Streams"))] - pub fn GetOutputStreamWithEndpointPairAsync<'a, P0>(&self, endpointpair: P0) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::EndpointPair>>, - { + pub fn GetOutputStreamWithEndpointPairAsync(&self, endpointpair: &super::EndpointPair) -> ::windows::core::Result> { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).GetOutputStreamWithEndpointPairAsync)(::windows::core::Vtable::as_raw(this), endpointpair.into().abi(), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).GetOutputStreamWithEndpointPairAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(endpointpair), result__.as_mut_ptr()).from_abi::>(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn MessageReceived<'a, P0>(&self, eventhandler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn MessageReceived(&self, eventhandler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).MessageReceived)(::windows::core::Vtable::as_raw(this), eventhandler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).MessageReceived)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(eventhandler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -2421,14 +2382,11 @@ impl DatagramSocket { } #[doc = "*Required features: `\"Foundation\"`, `\"Networking_Connectivity\"`*"] #[cfg(all(feature = "Foundation", feature = "Networking_Connectivity"))] - pub fn BindServiceNameAndAdapterAsync<'a, P0>(&self, localservicename: &::windows::core::HSTRING, adapter: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::Connectivity::NetworkAdapter>>, - { + pub fn BindServiceNameAndAdapterAsync(&self, localservicename: &::windows::core::HSTRING, adapter: &super::Connectivity::NetworkAdapter) -> ::windows::core::Result { let this = &::windows::core::Interface::cast::(self)?; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).BindServiceNameAndAdapterAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(localservicename), adapter.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).BindServiceNameAndAdapterAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(localservicename), ::core::mem::transmute_copy(adapter), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -2452,42 +2410,30 @@ impl DatagramSocket { let this = &::windows::core::Interface::cast::(self)?; unsafe { (::windows::core::Vtable::vtable(this).TransferOwnership)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(socketid)).ok() } } - pub fn TransferOwnershipWithContext<'a, P0>(&self, socketid: &::windows::core::HSTRING, data: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, SocketActivityContext>>, - { + pub fn TransferOwnershipWithContext(&self, socketid: &::windows::core::HSTRING, data: &SocketActivityContext) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).TransferOwnershipWithContext)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(socketid), data.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).TransferOwnershipWithContext)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(socketid), ::core::mem::transmute_copy(data)).ok() } } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn TransferOwnershipWithContextAndKeepAliveTime<'a, P0>(&self, socketid: &::windows::core::HSTRING, data: P0, keepalivetime: super::super::Foundation::TimeSpan) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, SocketActivityContext>>, - { + pub fn TransferOwnershipWithContextAndKeepAliveTime(&self, socketid: &::windows::core::HSTRING, data: &SocketActivityContext, keepalivetime: super::super::Foundation::TimeSpan) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).TransferOwnershipWithContextAndKeepAliveTime)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(socketid), data.into().abi(), keepalivetime).ok() } + unsafe { (::windows::core::Vtable::vtable(this).TransferOwnershipWithContextAndKeepAliveTime)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(socketid), ::core::mem::transmute_copy(data), keepalivetime).ok() } } #[doc = "*Required features: `\"Foundation_Collections\"`*"] #[cfg(feature = "Foundation_Collections")] - pub fn GetEndpointPairsAsync<'a, P0>(remotehostname: P0, remoteservicename: &::windows::core::HSTRING) -> ::windows::core::Result>> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::HostName>>, - { + pub fn GetEndpointPairsAsync(remotehostname: &super::HostName, remoteservicename: &::windows::core::HSTRING) -> ::windows::core::Result>> { Self::IDatagramSocketStatics(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).GetEndpointPairsAsync)(::windows::core::Vtable::as_raw(this), remotehostname.into().abi(), ::core::mem::transmute_copy(remoteservicename), result__.as_mut_ptr()).from_abi::>>(result__) + (::windows::core::Vtable::vtable(this).GetEndpointPairsAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(remotehostname), ::core::mem::transmute_copy(remoteservicename), result__.as_mut_ptr()).from_abi::>>(result__) }) } #[doc = "*Required features: `\"Foundation_Collections\"`*"] #[cfg(feature = "Foundation_Collections")] - pub fn GetEndpointPairsWithSortOptionsAsync<'a, P0>(remotehostname: P0, remoteservicename: &::windows::core::HSTRING, sortoptions: super::HostNameSortOptions) -> ::windows::core::Result>> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::HostName>>, - { + pub fn GetEndpointPairsWithSortOptionsAsync(remotehostname: &super::HostName, remoteservicename: &::windows::core::HSTRING, sortoptions: super::HostNameSortOptions) -> ::windows::core::Result>> { Self::IDatagramSocketStatics(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).GetEndpointPairsWithSortOptionsAsync)(::windows::core::Vtable::as_raw(this), remotehostname.into().abi(), ::core::mem::transmute_copy(remoteservicename), sortoptions, result__.as_mut_ptr()).from_abi::>>(result__) + (::windows::core::Vtable::vtable(this).GetEndpointPairsWithSortOptionsAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(remotehostname), ::core::mem::transmute_copy(remoteservicename), sortoptions, result__.as_mut_ptr()).from_abi::>>(result__) }) } #[doc(hidden)] @@ -2944,14 +2890,11 @@ impl MessageWebSocket { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn MessageReceived<'a, P0>(&self, eventhandler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn MessageReceived(&self, eventhandler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).MessageReceived)(::windows::core::Vtable::as_raw(this), eventhandler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).MessageReceived)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(eventhandler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -2962,14 +2905,11 @@ impl MessageWebSocket { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn ServerCustomValidationRequested<'a, P0>(&self, eventhandler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn ServerCustomValidationRequested(&self, eventhandler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = &::windows::core::Interface::cast::(self)?; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).ServerCustomValidationRequested)(::windows::core::Vtable::as_raw(this), eventhandler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).ServerCustomValidationRequested)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(eventhandler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -3015,14 +2955,11 @@ impl MessageWebSocket { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn ConnectAsync<'a, P0>(&self, uri: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::Uri>>, - { + pub fn ConnectAsync(&self, uri: &super::super::Foundation::Uri) -> ::windows::core::Result { let this = &::windows::core::Interface::cast::(self)?; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).ConnectAsync)(::windows::core::Vtable::as_raw(this), uri.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).ConnectAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(uri), result__.as_mut_ptr()).from_abi::(result__) } } pub fn SetRequestHeader(&self, headername: &::windows::core::HSTRING, headervalue: &::windows::core::HSTRING) -> ::windows::core::Result<()> { @@ -3031,14 +2968,11 @@ impl MessageWebSocket { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn Closed<'a, P0>(&self, eventhandler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn Closed(&self, eventhandler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = &::windows::core::Interface::cast::(self)?; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).Closed)(::windows::core::Vtable::as_raw(this), eventhandler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).Closed)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(eventhandler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -3229,12 +3163,9 @@ impl MessageWebSocketControl { } #[doc = "*Required features: `\"Security_Cryptography_Certificates\"`*"] #[cfg(feature = "Security_Cryptography_Certificates")] - pub fn SetClientCertificate<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Security::Cryptography::Certificates::Certificate>>, - { + pub fn SetClientCertificate(&self, value: &super::super::Security::Cryptography::Certificates::Certificate) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).SetClientCertificate)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetClientCertificate)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } pub fn OutboundBufferSizeInBytes(&self) -> ::windows::core::Result { let this = &::windows::core::Interface::cast::(self)?; @@ -3258,12 +3189,9 @@ impl MessageWebSocketControl { } #[doc = "*Required features: `\"Security_Credentials\"`*"] #[cfg(feature = "Security_Credentials")] - pub fn SetServerCredential<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Security::Credentials::PasswordCredential>>, - { + pub fn SetServerCredential(&self, value: &super::super::Security::Credentials::PasswordCredential) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).SetServerCredential)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetServerCredential)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } #[doc = "*Required features: `\"Security_Credentials\"`*"] #[cfg(feature = "Security_Credentials")] @@ -3276,12 +3204,9 @@ impl MessageWebSocketControl { } #[doc = "*Required features: `\"Security_Credentials\"`*"] #[cfg(feature = "Security_Credentials")] - pub fn SetProxyCredential<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Security::Credentials::PasswordCredential>>, - { + pub fn SetProxyCredential(&self, value: &super::super::Security::Credentials::PasswordCredential) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).SetProxyCredential)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetProxyCredential)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } #[doc = "*Required features: `\"Foundation_Collections\"`*"] #[cfg(feature = "Foundation_Collections")] @@ -3679,14 +3604,11 @@ impl ServerMessageWebSocket { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn MessageReceived<'a, P0>(&self, value: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn MessageReceived(&self, value: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).MessageReceived)(::windows::core::Vtable::as_raw(this), value.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).MessageReceived)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -3720,14 +3642,11 @@ impl ServerMessageWebSocket { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn Closed<'a, P0>(&self, value: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn Closed(&self, value: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).Closed)(::windows::core::Vtable::as_raw(this), value.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).Closed)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -4034,14 +3953,11 @@ impl ServerStreamWebSocket { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn Closed<'a, P0>(&self, value: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn Closed(&self, value: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).Closed)(::windows::core::Vtable::as_raw(this), value.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).Closed)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -4609,75 +4525,56 @@ impl StreamSocket { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn ConnectWithEndpointPairAsync<'a, P0>(&self, endpointpair: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::EndpointPair>>, - { + pub fn ConnectWithEndpointPairAsync(&self, endpointpair: &super::EndpointPair) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).ConnectWithEndpointPairAsync)(::windows::core::Vtable::as_raw(this), endpointpair.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).ConnectWithEndpointPairAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(endpointpair), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn ConnectAsync<'a, P0>(&self, remotehostname: P0, remoteservicename: &::windows::core::HSTRING) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::HostName>>, - { + pub fn ConnectAsync(&self, remotehostname: &super::HostName, remoteservicename: &::windows::core::HSTRING) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).ConnectAsync)(::windows::core::Vtable::as_raw(this), remotehostname.into().abi(), ::core::mem::transmute_copy(remoteservicename), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).ConnectAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(remotehostname), ::core::mem::transmute_copy(remoteservicename), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn ConnectWithEndpointPairAndProtectionLevelAsync<'a, P0>(&self, endpointpair: P0, protectionlevel: SocketProtectionLevel) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::EndpointPair>>, - { + pub fn ConnectWithEndpointPairAndProtectionLevelAsync(&self, endpointpair: &super::EndpointPair, protectionlevel: SocketProtectionLevel) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).ConnectWithEndpointPairAndProtectionLevelAsync)(::windows::core::Vtable::as_raw(this), endpointpair.into().abi(), protectionlevel, result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).ConnectWithEndpointPairAndProtectionLevelAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(endpointpair), protectionlevel, result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn ConnectWithProtectionLevelAsync<'a, P0>(&self, remotehostname: P0, remoteservicename: &::windows::core::HSTRING, protectionlevel: SocketProtectionLevel) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::HostName>>, - { + pub fn ConnectWithProtectionLevelAsync(&self, remotehostname: &super::HostName, remoteservicename: &::windows::core::HSTRING, protectionlevel: SocketProtectionLevel) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).ConnectWithProtectionLevelAsync)(::windows::core::Vtable::as_raw(this), remotehostname.into().abi(), ::core::mem::transmute_copy(remoteservicename), protectionlevel, result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).ConnectWithProtectionLevelAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(remotehostname), ::core::mem::transmute_copy(remoteservicename), protectionlevel, result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn UpgradeToSslAsync<'a, P0>(&self, protectionlevel: SocketProtectionLevel, validationhostname: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::HostName>>, - { + pub fn UpgradeToSslAsync(&self, protectionlevel: SocketProtectionLevel, validationhostname: &super::HostName) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).UpgradeToSslAsync)(::windows::core::Vtable::as_raw(this), protectionlevel, validationhostname.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).UpgradeToSslAsync)(::windows::core::Vtable::as_raw(this), protectionlevel, ::core::mem::transmute_copy(validationhostname), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`, `\"Networking_Connectivity\"`*"] #[cfg(all(feature = "Foundation", feature = "Networking_Connectivity"))] - pub fn ConnectWithProtectionLevelAndAdapterAsync<'a, P0, P1>(&self, remotehostname: P0, remoteservicename: &::windows::core::HSTRING, protectionlevel: SocketProtectionLevel, adapter: P1) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::HostName>>, - P1: ::std::convert::Into<::windows::core::InParam<'a, super::Connectivity::NetworkAdapter>>, - { + pub fn ConnectWithProtectionLevelAndAdapterAsync(&self, remotehostname: &super::HostName, remoteservicename: &::windows::core::HSTRING, protectionlevel: SocketProtectionLevel, adapter: &super::Connectivity::NetworkAdapter) -> ::windows::core::Result { let this = &::windows::core::Interface::cast::(self)?; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).ConnectWithProtectionLevelAndAdapterAsync)(::windows::core::Vtable::as_raw(this), remotehostname.into().abi(), ::core::mem::transmute_copy(remoteservicename), protectionlevel, adapter.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).ConnectWithProtectionLevelAndAdapterAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(remotehostname), ::core::mem::transmute_copy(remoteservicename), protectionlevel, ::core::mem::transmute_copy(adapter), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -4701,42 +4598,30 @@ impl StreamSocket { let this = &::windows::core::Interface::cast::(self)?; unsafe { (::windows::core::Vtable::vtable(this).TransferOwnership)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(socketid)).ok() } } - pub fn TransferOwnershipWithContext<'a, P0>(&self, socketid: &::windows::core::HSTRING, data: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, SocketActivityContext>>, - { + pub fn TransferOwnershipWithContext(&self, socketid: &::windows::core::HSTRING, data: &SocketActivityContext) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).TransferOwnershipWithContext)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(socketid), data.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).TransferOwnershipWithContext)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(socketid), ::core::mem::transmute_copy(data)).ok() } } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn TransferOwnershipWithContextAndKeepAliveTime<'a, P0>(&self, socketid: &::windows::core::HSTRING, data: P0, keepalivetime: super::super::Foundation::TimeSpan) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, SocketActivityContext>>, - { + pub fn TransferOwnershipWithContextAndKeepAliveTime(&self, socketid: &::windows::core::HSTRING, data: &SocketActivityContext, keepalivetime: super::super::Foundation::TimeSpan) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).TransferOwnershipWithContextAndKeepAliveTime)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(socketid), data.into().abi(), keepalivetime).ok() } + unsafe { (::windows::core::Vtable::vtable(this).TransferOwnershipWithContextAndKeepAliveTime)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(socketid), ::core::mem::transmute_copy(data), keepalivetime).ok() } } #[doc = "*Required features: `\"Foundation_Collections\"`*"] #[cfg(feature = "Foundation_Collections")] - pub fn GetEndpointPairsAsync<'a, P0>(remotehostname: P0, remoteservicename: &::windows::core::HSTRING) -> ::windows::core::Result>> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::HostName>>, - { + pub fn GetEndpointPairsAsync(remotehostname: &super::HostName, remoteservicename: &::windows::core::HSTRING) -> ::windows::core::Result>> { Self::IStreamSocketStatics(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).GetEndpointPairsAsync)(::windows::core::Vtable::as_raw(this), remotehostname.into().abi(), ::core::mem::transmute_copy(remoteservicename), result__.as_mut_ptr()).from_abi::>>(result__) + (::windows::core::Vtable::vtable(this).GetEndpointPairsAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(remotehostname), ::core::mem::transmute_copy(remoteservicename), result__.as_mut_ptr()).from_abi::>>(result__) }) } #[doc = "*Required features: `\"Foundation_Collections\"`*"] #[cfg(feature = "Foundation_Collections")] - pub fn GetEndpointPairsWithSortOptionsAsync<'a, P0>(remotehostname: P0, remoteservicename: &::windows::core::HSTRING, sortoptions: super::HostNameSortOptions) -> ::windows::core::Result>> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::HostName>>, - { + pub fn GetEndpointPairsWithSortOptionsAsync(remotehostname: &super::HostName, remoteservicename: &::windows::core::HSTRING, sortoptions: super::HostNameSortOptions) -> ::windows::core::Result>> { Self::IStreamSocketStatics(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).GetEndpointPairsWithSortOptionsAsync)(::windows::core::Vtable::as_raw(this), remotehostname.into().abi(), ::core::mem::transmute_copy(remoteservicename), sortoptions, result__.as_mut_ptr()).from_abi::>>(result__) + (::windows::core::Vtable::vtable(this).GetEndpointPairsWithSortOptionsAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(remotehostname), ::core::mem::transmute_copy(remoteservicename), sortoptions, result__.as_mut_ptr()).from_abi::>>(result__) }) } #[doc(hidden)] @@ -4921,12 +4806,9 @@ impl StreamSocketControl { } #[doc = "*Required features: `\"Security_Cryptography_Certificates\"`*"] #[cfg(feature = "Security_Cryptography_Certificates")] - pub fn SetClientCertificate<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Security::Cryptography::Certificates::Certificate>>, - { + pub fn SetClientCertificate(&self, value: &super::super::Security::Cryptography::Certificates::Certificate) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).SetClientCertificate)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetClientCertificate)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } pub fn MinProtectionLevel(&self) -> ::windows::core::Result { let this = &::windows::core::Interface::cast::(self)?; @@ -5221,26 +5103,20 @@ impl StreamSocketListener { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn BindEndpointAsync<'a, P0>(&self, localhostname: P0, localservicename: &::windows::core::HSTRING) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::HostName>>, - { + pub fn BindEndpointAsync(&self, localhostname: &super::HostName, localservicename: &::windows::core::HSTRING) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).BindEndpointAsync)(::windows::core::Vtable::as_raw(this), localhostname.into().abi(), ::core::mem::transmute_copy(localservicename), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).BindEndpointAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(localhostname), ::core::mem::transmute_copy(localservicename), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn ConnectionReceived<'a, P0>(&self, eventhandler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn ConnectionReceived(&self, eventhandler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).ConnectionReceived)(::windows::core::Vtable::as_raw(this), eventhandler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).ConnectionReceived)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(eventhandler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -5260,14 +5136,11 @@ impl StreamSocketListener { } #[doc = "*Required features: `\"Foundation\"`, `\"Networking_Connectivity\"`*"] #[cfg(all(feature = "Foundation", feature = "Networking_Connectivity"))] - pub fn BindServiceNameWithProtectionLevelAndAdapterAsync<'a, P0>(&self, localservicename: &::windows::core::HSTRING, protectionlevel: SocketProtectionLevel, adapter: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::Connectivity::NetworkAdapter>>, - { + pub fn BindServiceNameWithProtectionLevelAndAdapterAsync(&self, localservicename: &::windows::core::HSTRING, protectionlevel: SocketProtectionLevel, adapter: &super::Connectivity::NetworkAdapter) -> ::windows::core::Result { let this = &::windows::core::Interface::cast::(self)?; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).BindServiceNameWithProtectionLevelAndAdapterAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(localservicename), protectionlevel, adapter.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).BindServiceNameWithProtectionLevelAndAdapterAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(localservicename), protectionlevel, ::core::mem::transmute_copy(adapter), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -5291,12 +5164,9 @@ impl StreamSocketListener { let this = &::windows::core::Interface::cast::(self)?; unsafe { (::windows::core::Vtable::vtable(this).TransferOwnership)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(socketid)).ok() } } - pub fn TransferOwnershipWithContext<'a, P0>(&self, socketid: &::windows::core::HSTRING, data: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, SocketActivityContext>>, - { + pub fn TransferOwnershipWithContext(&self, socketid: &::windows::core::HSTRING, data: &SocketActivityContext) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).TransferOwnershipWithContext)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(socketid), data.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).TransferOwnershipWithContext)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(socketid), ::core::mem::transmute_copy(data)).ok() } } } impl ::core::clone::Clone for StreamSocketListener { @@ -5703,14 +5573,11 @@ impl StreamWebSocket { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn ServerCustomValidationRequested<'a, P0>(&self, eventhandler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn ServerCustomValidationRequested(&self, eventhandler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = &::windows::core::Interface::cast::(self)?; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).ServerCustomValidationRequested)(::windows::core::Vtable::as_raw(this), eventhandler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).ServerCustomValidationRequested)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(eventhandler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -5730,14 +5597,11 @@ impl StreamWebSocket { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn ConnectAsync<'a, P0>(&self, uri: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::Uri>>, - { + pub fn ConnectAsync(&self, uri: &super::super::Foundation::Uri) -> ::windows::core::Result { let this = &::windows::core::Interface::cast::(self)?; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).ConnectAsync)(::windows::core::Vtable::as_raw(this), uri.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).ConnectAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(uri), result__.as_mut_ptr()).from_abi::(result__) } } pub fn SetRequestHeader(&self, headername: &::windows::core::HSTRING, headervalue: &::windows::core::HSTRING) -> ::windows::core::Result<()> { @@ -5746,14 +5610,11 @@ impl StreamWebSocket { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn Closed<'a, P0>(&self, eventhandler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn Closed(&self, eventhandler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = &::windows::core::Interface::cast::(self)?; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).Closed)(::windows::core::Vtable::as_raw(this), eventhandler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).Closed)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(eventhandler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -5922,12 +5783,9 @@ impl StreamWebSocketControl { } #[doc = "*Required features: `\"Security_Cryptography_Certificates\"`*"] #[cfg(feature = "Security_Cryptography_Certificates")] - pub fn SetClientCertificate<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Security::Cryptography::Certificates::Certificate>>, - { + pub fn SetClientCertificate(&self, value: &super::super::Security::Cryptography::Certificates::Certificate) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).SetClientCertificate)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetClientCertificate)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } pub fn OutboundBufferSizeInBytes(&self) -> ::windows::core::Result { let this = &::windows::core::Interface::cast::(self)?; @@ -5951,12 +5809,9 @@ impl StreamWebSocketControl { } #[doc = "*Required features: `\"Security_Credentials\"`*"] #[cfg(feature = "Security_Credentials")] - pub fn SetServerCredential<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Security::Credentials::PasswordCredential>>, - { + pub fn SetServerCredential(&self, value: &super::super::Security::Credentials::PasswordCredential) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).SetServerCredential)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetServerCredential)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } #[doc = "*Required features: `\"Security_Credentials\"`*"] #[cfg(feature = "Security_Credentials")] @@ -5969,12 +5824,9 @@ impl StreamWebSocketControl { } #[doc = "*Required features: `\"Security_Credentials\"`*"] #[cfg(feature = "Security_Credentials")] - pub fn SetProxyCredential<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Security::Credentials::PasswordCredential>>, - { + pub fn SetProxyCredential(&self, value: &super::super::Security::Credentials::PasswordCredential) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).SetProxyCredential)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetProxyCredential)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } #[doc = "*Required features: `\"Foundation_Collections\"`*"] #[cfg(feature = "Foundation_Collections")] diff --git a/crates/libs/windows/src/Windows/Networking/Vpn/mod.rs b/crates/libs/windows/src/Windows/Networking/Vpn/mod.rs index 7a40bfab8c..f0f7590987 100644 --- a/crates/libs/windows/src/Windows/Networking/Vpn/mod.rs +++ b/crates/libs/windows/src/Windows/Networking/Vpn/mod.rs @@ -1419,14 +1419,11 @@ pub struct IVpnPacketBuffer3_Vtbl { #[repr(transparent)] pub struct IVpnPacketBufferFactory(::windows::core::IUnknown); impl IVpnPacketBufferFactory { - pub fn CreateVpnPacketBuffer<'a, P0>(&self, parentbuffer: P0, offset: u32, length: u32) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, VpnPacketBuffer>>, - { + pub fn CreateVpnPacketBuffer(&self, parentbuffer: &VpnPacketBuffer, offset: u32, length: u32) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).CreateVpnPacketBuffer)(::windows::core::Vtable::as_raw(this), parentbuffer.into().abi(), offset, length, result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).CreateVpnPacketBuffer)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(parentbuffer), offset, length, result__.as_mut_ptr()).from_abi::(result__) } } } @@ -1562,45 +1559,25 @@ pub struct IVpnPickedCredential_Vtbl { #[repr(transparent)] pub struct IVpnPlugIn(::windows::core::IUnknown); impl IVpnPlugIn { - pub fn Connect<'a, P0>(&self, channel: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, VpnChannel>>, - { + pub fn Connect(&self, channel: &VpnChannel) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).Connect)(::windows::core::Vtable::as_raw(this), channel.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).Connect)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(channel)).ok() } } - pub fn Disconnect<'a, P0>(&self, channel: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, VpnChannel>>, - { + pub fn Disconnect(&self, channel: &VpnChannel) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).Disconnect)(::windows::core::Vtable::as_raw(this), channel.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).Disconnect)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(channel)).ok() } } - pub fn GetKeepAlivePayload<'a, P0>(&self, channel: P0, keepalivepacket: &mut ::core::option::Option) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, VpnChannel>>, - { + pub fn GetKeepAlivePayload(&self, channel: &VpnChannel, keepalivepacket: &mut ::core::option::Option) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).GetKeepAlivePayload)(::windows::core::Vtable::as_raw(this), channel.into().abi(), keepalivepacket as *mut _ as _).ok() } + unsafe { (::windows::core::Vtable::vtable(this).GetKeepAlivePayload)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(channel), keepalivepacket as *mut _ as _).ok() } } - pub fn Encapsulate<'a, P0, P1, P2>(&self, channel: P0, packets: P1, encapulatedpackets: P2) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, VpnChannel>>, - P1: ::std::convert::Into<::windows::core::InParam<'a, VpnPacketBufferList>>, - P2: ::std::convert::Into<::windows::core::InParam<'a, VpnPacketBufferList>>, - { + pub fn Encapsulate(&self, channel: &VpnChannel, packets: &VpnPacketBufferList, encapulatedpackets: &VpnPacketBufferList) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).Encapsulate)(::windows::core::Vtable::as_raw(this), channel.into().abi(), packets.into().abi(), encapulatedpackets.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).Encapsulate)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(channel), ::core::mem::transmute_copy(packets), ::core::mem::transmute_copy(encapulatedpackets)).ok() } } - pub fn Decapsulate<'a, P0, P1, P2, P3>(&self, channel: P0, encapbuffer: P1, decapsulatedpackets: P2, controlpacketstosend: P3) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, VpnChannel>>, - P1: ::std::convert::Into<::windows::core::InParam<'a, VpnPacketBuffer>>, - P2: ::std::convert::Into<::windows::core::InParam<'a, VpnPacketBufferList>>, - P3: ::std::convert::Into<::windows::core::InParam<'a, VpnPacketBufferList>>, - { + pub fn Decapsulate(&self, channel: &VpnChannel, encapbuffer: &VpnPacketBuffer, decapsulatedpackets: &VpnPacketBufferList, controlpacketstosend: &VpnPacketBufferList) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).Decapsulate)(::windows::core::Vtable::as_raw(this), channel.into().abi(), encapbuffer.into().abi(), decapsulatedpackets.into().abi(), controlpacketstosend.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).Decapsulate)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(channel), ::core::mem::transmute_copy(encapbuffer), ::core::mem::transmute_copy(decapsulatedpackets), ::core::mem::transmute_copy(controlpacketstosend)).ok() } } } impl ::core::convert::From for ::windows::core::IUnknown { @@ -1941,14 +1918,11 @@ pub struct IVpnRouteAssignment_Vtbl { #[repr(transparent)] pub struct IVpnRouteFactory(::windows::core::IUnknown); impl IVpnRouteFactory { - pub fn CreateVpnRoute<'a, P0>(&self, address: P0, prefixsize: u8) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::HostName>>, - { + pub fn CreateVpnRoute(&self, address: &super::HostName, prefixsize: u8) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).CreateVpnRoute)(::windows::core::Vtable::as_raw(this), address.into().abi(), prefixsize, result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).CreateVpnRoute)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(address), prefixsize, result__.as_mut_ptr()).from_abi::(result__) } } } @@ -2228,20 +2202,17 @@ impl VpnChannel { } #[doc = "*Required features: `\"Foundation_Collections\"`*"] #[cfg(feature = "Foundation_Collections")] - pub fn Start<'a, P0, E0, P1, E1, P2, P3, P4, P5, P6>(&self, assignedclientipv4list: P0, assignedclientipv6list: P1, vpninterfaceid: P2, routescope: P3, namespacescope: P4, mtusize: u32, maxframesize: u32, optimizeforlowcostnetwork: bool, mainoutertunneltransport: P5, optionaloutertunneltransport: P6) -> ::windows::core::Result<()> + pub fn Start<'a, P0, E0, P1, E1, P2, P3>(&self, assignedclientipv4list: P0, assignedclientipv6list: P1, vpninterfaceid: &VpnInterfaceId, routescope: &VpnRouteAssignment, namespacescope: &VpnNamespaceAssignment, mtusize: u32, maxframesize: u32, optimizeforlowcostnetwork: bool, mainoutertunneltransport: P2, optionaloutertunneltransport: P3) -> ::windows::core::Result<()> where P0: ::std::convert::TryInto<::windows::core::InParam<'a, super::super::Foundation::Collections::IVectorView>, Error = E0>, E0: ::std::convert::Into<::windows::core::Error>, P1: ::std::convert::TryInto<::windows::core::InParam<'a, super::super::Foundation::Collections::IVectorView>, Error = E1>, E1: ::std::convert::Into<::windows::core::Error>, - P2: ::std::convert::Into<::windows::core::InParam<'a, VpnInterfaceId>>, - P3: ::std::convert::Into<::windows::core::InParam<'a, VpnRouteAssignment>>, - P4: ::std::convert::Into<::windows::core::InParam<'a, VpnNamespaceAssignment>>, - P5: ::std::convert::Into<::windows::core::InParam<'a, ::windows::core::IInspectable>>, - P6: ::std::convert::Into<::windows::core::InParam<'a, ::windows::core::IInspectable>>, + P2: ::std::convert::Into<::windows::core::InParam<'a, ::windows::core::IInspectable>>, + P3: ::std::convert::Into<::windows::core::InParam<'a, ::windows::core::IInspectable>>, { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).Start)(::windows::core::Vtable::as_raw(this), assignedclientipv4list.try_into().map_err(|e| e.into())?.abi(), assignedclientipv6list.try_into().map_err(|e| e.into())?.abi(), vpninterfaceid.into().abi(), routescope.into().abi(), namespacescope.into().abi(), mtusize, maxframesize, optimizeforlowcostnetwork, mainoutertunneltransport.into().abi(), optionaloutertunneltransport.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).Start)(::windows::core::Vtable::as_raw(this), assignedclientipv4list.try_into().map_err(|e| e.into())?.abi(), assignedclientipv6list.try_into().map_err(|e| e.into())?.abi(), ::core::mem::transmute_copy(vpninterfaceid), ::core::mem::transmute_copy(routescope), ::core::mem::transmute_copy(namespacescope), mtusize, maxframesize, optimizeforlowcostnetwork, mainoutertunneltransport.into().abi(), optionaloutertunneltransport.into().abi()).ok() } } pub fn Stop(&self) -> ::windows::core::Result<()> { let this = self; @@ -2249,14 +2220,11 @@ impl VpnChannel { } #[doc = "*Required features: `\"Security_Cryptography_Certificates\"`*"] #[cfg(feature = "Security_Cryptography_Certificates")] - pub fn RequestCredentials<'a, P0>(&self, credtype: VpnCredentialType, isretry: bool, issinglesignoncredential: bool, certificate: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Security::Cryptography::Certificates::Certificate>>, - { + pub fn RequestCredentials(&self, credtype: VpnCredentialType, isretry: bool, issinglesignoncredential: bool, certificate: &super::super::Security::Cryptography::Certificates::Certificate) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).RequestCredentials)(::windows::core::Vtable::as_raw(this), credtype, isretry, issinglesignoncredential, certificate.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).RequestCredentials)(::windows::core::Vtable::as_raw(this), credtype, isretry, issinglesignoncredential, ::core::mem::transmute_copy(certificate), result__.as_mut_ptr()).from_abi::(result__) } } pub fn RequestVpnPacketBuffer(&self, r#type: VpnDataPathType, vpnpacketbuffer: &mut ::core::option::Option) -> ::windows::core::Result<()> { @@ -2283,14 +2251,11 @@ impl VpnChannel { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn ActivityChange<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn ActivityChange(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).ActivityChange)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).ActivityChange)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -2343,45 +2308,36 @@ impl VpnChannel { } #[doc = "*Required features: `\"Foundation_Collections\"`*"] #[cfg(feature = "Foundation_Collections")] - pub fn StartWithMainTransport<'a, P0, E0, P1, E1, P2, P3, P4, P5>(&self, assignedclientipv4list: P0, assignedclientipv6list: P1, vpninterfaceid: P2, assignedroutes: P3, assigneddomainname: P4, mtusize: u32, maxframesize: u32, reserved: bool, mainoutertunneltransport: P5) -> ::windows::core::Result<()> + pub fn StartWithMainTransport<'a, P0, E0, P1, E1, P2>(&self, assignedclientipv4list: P0, assignedclientipv6list: P1, vpninterfaceid: &VpnInterfaceId, assignedroutes: &VpnRouteAssignment, assigneddomainname: &VpnDomainNameAssignment, mtusize: u32, maxframesize: u32, reserved: bool, mainoutertunneltransport: P2) -> ::windows::core::Result<()> where P0: ::std::convert::TryInto<::windows::core::InParam<'a, super::super::Foundation::Collections::IVectorView>, Error = E0>, E0: ::std::convert::Into<::windows::core::Error>, P1: ::std::convert::TryInto<::windows::core::InParam<'a, super::super::Foundation::Collections::IVectorView>, Error = E1>, E1: ::std::convert::Into<::windows::core::Error>, - P2: ::std::convert::Into<::windows::core::InParam<'a, VpnInterfaceId>>, - P3: ::std::convert::Into<::windows::core::InParam<'a, VpnRouteAssignment>>, - P4: ::std::convert::Into<::windows::core::InParam<'a, VpnDomainNameAssignment>>, - P5: ::std::convert::Into<::windows::core::InParam<'a, ::windows::core::IInspectable>>, + P2: ::std::convert::Into<::windows::core::InParam<'a, ::windows::core::IInspectable>>, { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).StartWithMainTransport)(::windows::core::Vtable::as_raw(this), assignedclientipv4list.try_into().map_err(|e| e.into())?.abi(), assignedclientipv6list.try_into().map_err(|e| e.into())?.abi(), vpninterfaceid.into().abi(), assignedroutes.into().abi(), assigneddomainname.into().abi(), mtusize, maxframesize, reserved, mainoutertunneltransport.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).StartWithMainTransport)(::windows::core::Vtable::as_raw(this), assignedclientipv4list.try_into().map_err(|e| e.into())?.abi(), assignedclientipv6list.try_into().map_err(|e| e.into())?.abi(), ::core::mem::transmute_copy(vpninterfaceid), ::core::mem::transmute_copy(assignedroutes), ::core::mem::transmute_copy(assigneddomainname), mtusize, maxframesize, reserved, mainoutertunneltransport.into().abi()).ok() } } #[doc = "*Required features: `\"Foundation_Collections\"`*"] #[cfg(feature = "Foundation_Collections")] - pub fn StartExistingTransports<'a, P0, E0, P1, E1, P2, P3, P4>(&self, assignedclientipv4list: P0, assignedclientipv6list: P1, vpninterfaceid: P2, assignedroutes: P3, assigneddomainname: P4, mtusize: u32, maxframesize: u32, reserved: bool) -> ::windows::core::Result<()> + pub fn StartExistingTransports<'a, P0, E0, P1, E1>(&self, assignedclientipv4list: P0, assignedclientipv6list: P1, vpninterfaceid: &VpnInterfaceId, assignedroutes: &VpnRouteAssignment, assigneddomainname: &VpnDomainNameAssignment, mtusize: u32, maxframesize: u32, reserved: bool) -> ::windows::core::Result<()> where P0: ::std::convert::TryInto<::windows::core::InParam<'a, super::super::Foundation::Collections::IVectorView>, Error = E0>, E0: ::std::convert::Into<::windows::core::Error>, P1: ::std::convert::TryInto<::windows::core::InParam<'a, super::super::Foundation::Collections::IVectorView>, Error = E1>, E1: ::std::convert::Into<::windows::core::Error>, - P2: ::std::convert::Into<::windows::core::InParam<'a, VpnInterfaceId>>, - P3: ::std::convert::Into<::windows::core::InParam<'a, VpnRouteAssignment>>, - P4: ::std::convert::Into<::windows::core::InParam<'a, VpnDomainNameAssignment>>, { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).StartExistingTransports)(::windows::core::Vtable::as_raw(this), assignedclientipv4list.try_into().map_err(|e| e.into())?.abi(), assignedclientipv6list.try_into().map_err(|e| e.into())?.abi(), vpninterfaceid.into().abi(), assignedroutes.into().abi(), assigneddomainname.into().abi(), mtusize, maxframesize, reserved).ok() } + unsafe { (::windows::core::Vtable::vtable(this).StartExistingTransports)(::windows::core::Vtable::as_raw(this), assignedclientipv4list.try_into().map_err(|e| e.into())?.abi(), assignedclientipv6list.try_into().map_err(|e| e.into())?.abi(), ::core::mem::transmute_copy(vpninterfaceid), ::core::mem::transmute_copy(assignedroutes), ::core::mem::transmute_copy(assigneddomainname), mtusize, maxframesize, reserved).ok() } } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn ActivityStateChange<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn ActivityStateChange(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = &::windows::core::Interface::cast::(self)?; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).ActivityStateChange)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).ActivityStateChange)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -2419,14 +2375,11 @@ impl VpnChannel { } #[doc = "*Required features: `\"Foundation\"`, `\"Security_Cryptography_Certificates\"`*"] #[cfg(all(feature = "Foundation", feature = "Security_Cryptography_Certificates"))] - pub fn RequestCredentialsWithCertificateAsync<'a, P0>(&self, credtype: VpnCredentialType, credoptions: u32, certificate: P0) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Security::Cryptography::Certificates::Certificate>>, - { + pub fn RequestCredentialsWithCertificateAsync(&self, credtype: VpnCredentialType, credoptions: u32, certificate: &super::super::Security::Cryptography::Certificates::Certificate) -> ::windows::core::Result> { let this = &::windows::core::Interface::cast::(self)?; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).RequestCredentialsWithCertificateAsync)(::windows::core::Vtable::as_raw(this), credtype, credoptions, certificate.into().abi(), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).RequestCredentialsWithCertificateAsync)(::windows::core::Vtable::as_raw(this), credtype, credoptions, ::core::mem::transmute_copy(certificate), result__.as_mut_ptr()).from_abi::>(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -2453,21 +2406,17 @@ impl VpnChannel { } #[doc = "*Required features: `\"Foundation_Collections\"`*"] #[cfg(feature = "Foundation_Collections")] - pub fn StartWithTrafficFilter<'a, P0, E0, P1, E1, P2, P3, P4, P5, P6, P7>(&self, assignedclientipv4list: P0, assignedclientipv6list: P1, vpninterfaceid: P2, assignedroutes: P3, assignednamespace: P4, mtusize: u32, maxframesize: u32, reserved: bool, mainoutertunneltransport: P5, optionaloutertunneltransport: P6, assignedtrafficfilters: P7) -> ::windows::core::Result<()> + pub fn StartWithTrafficFilter<'a, P0, E0, P1, E1, P2, P3>(&self, assignedclientipv4list: P0, assignedclientipv6list: P1, vpninterfaceid: &VpnInterfaceId, assignedroutes: &VpnRouteAssignment, assignednamespace: &VpnDomainNameAssignment, mtusize: u32, maxframesize: u32, reserved: bool, mainoutertunneltransport: P2, optionaloutertunneltransport: P3, assignedtrafficfilters: &VpnTrafficFilterAssignment) -> ::windows::core::Result<()> where P0: ::std::convert::TryInto<::windows::core::InParam<'a, super::super::Foundation::Collections::IVectorView>, Error = E0>, E0: ::std::convert::Into<::windows::core::Error>, P1: ::std::convert::TryInto<::windows::core::InParam<'a, super::super::Foundation::Collections::IVectorView>, Error = E1>, E1: ::std::convert::Into<::windows::core::Error>, - P2: ::std::convert::Into<::windows::core::InParam<'a, VpnInterfaceId>>, - P3: ::std::convert::Into<::windows::core::InParam<'a, VpnRouteAssignment>>, - P4: ::std::convert::Into<::windows::core::InParam<'a, VpnDomainNameAssignment>>, - P5: ::std::convert::Into<::windows::core::InParam<'a, ::windows::core::IInspectable>>, - P6: ::std::convert::Into<::windows::core::InParam<'a, ::windows::core::IInspectable>>, - P7: ::std::convert::Into<::windows::core::InParam<'a, VpnTrafficFilterAssignment>>, + P2: ::std::convert::Into<::windows::core::InParam<'a, ::windows::core::IInspectable>>, + P3: ::std::convert::Into<::windows::core::InParam<'a, ::windows::core::IInspectable>>, { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).StartWithTrafficFilter)(::windows::core::Vtable::as_raw(this), assignedclientipv4list.try_into().map_err(|e| e.into())?.abi(), assignedclientipv6list.try_into().map_err(|e| e.into())?.abi(), vpninterfaceid.into().abi(), assignedroutes.into().abi(), assignednamespace.into().abi(), mtusize, maxframesize, reserved, mainoutertunneltransport.into().abi(), optionaloutertunneltransport.into().abi(), assignedtrafficfilters.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).StartWithTrafficFilter)(::windows::core::Vtable::as_raw(this), assignedclientipv4list.try_into().map_err(|e| e.into())?.abi(), assignedclientipv6list.try_into().map_err(|e| e.into())?.abi(), ::core::mem::transmute_copy(vpninterfaceid), ::core::mem::transmute_copy(assignedroutes), ::core::mem::transmute_copy(assignednamespace), mtusize, maxframesize, reserved, mainoutertunneltransport.into().abi(), optionaloutertunneltransport.into().abi(), ::core::mem::transmute_copy(assignedtrafficfilters)).ok() } } pub fn AddAndAssociateTransport<'a, P0, P1>(&self, transport: P0, context: P1) -> ::windows::core::Result<()> where @@ -2479,21 +2428,17 @@ impl VpnChannel { } #[doc = "*Required features: `\"Foundation_Collections\"`*"] #[cfg(feature = "Foundation_Collections")] - pub fn StartWithMultipleTransports<'a, P0, E0, P1, E1, P2, P3, P4, P5, E5, P6>(&self, assignedclientipv4addresses: P0, assignedclientipv6addresses: P1, vpninterfaceid: P2, assignedroutes: P3, assignednamespace: P4, mtusize: u32, maxframesize: u32, reserved: bool, transports: P5, assignedtrafficfilters: P6) -> ::windows::core::Result<()> + pub fn StartWithMultipleTransports<'a, P0, E0, P1, E1, P2, E2>(&self, assignedclientipv4addresses: P0, assignedclientipv6addresses: P1, vpninterfaceid: &VpnInterfaceId, assignedroutes: &VpnRouteAssignment, assignednamespace: &VpnDomainNameAssignment, mtusize: u32, maxframesize: u32, reserved: bool, transports: P2, assignedtrafficfilters: &VpnTrafficFilterAssignment) -> ::windows::core::Result<()> where P0: ::std::convert::TryInto<::windows::core::InParam<'a, super::super::Foundation::Collections::IIterable>, Error = E0>, E0: ::std::convert::Into<::windows::core::Error>, P1: ::std::convert::TryInto<::windows::core::InParam<'a, super::super::Foundation::Collections::IIterable>, Error = E1>, E1: ::std::convert::Into<::windows::core::Error>, - P2: ::std::convert::Into<::windows::core::InParam<'a, VpnInterfaceId>>, - P3: ::std::convert::Into<::windows::core::InParam<'a, VpnRouteAssignment>>, - P4: ::std::convert::Into<::windows::core::InParam<'a, VpnDomainNameAssignment>>, - P5: ::std::convert::TryInto<::windows::core::InParam<'a, super::super::Foundation::Collections::IIterable<::windows::core::IInspectable>>, Error = E5>, - E5: ::std::convert::Into<::windows::core::Error>, - P6: ::std::convert::Into<::windows::core::InParam<'a, VpnTrafficFilterAssignment>>, + P2: ::std::convert::TryInto<::windows::core::InParam<'a, super::super::Foundation::Collections::IIterable<::windows::core::IInspectable>>, Error = E2>, + E2: ::std::convert::Into<::windows::core::Error>, { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).StartWithMultipleTransports)(::windows::core::Vtable::as_raw(this), assignedclientipv4addresses.try_into().map_err(|e| e.into())?.abi(), assignedclientipv6addresses.try_into().map_err(|e| e.into())?.abi(), vpninterfaceid.into().abi(), assignedroutes.into().abi(), assignednamespace.into().abi(), mtusize, maxframesize, reserved, transports.try_into().map_err(|e| e.into())?.abi(), assignedtrafficfilters.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).StartWithMultipleTransports)(::windows::core::Vtable::as_raw(this), assignedclientipv4addresses.try_into().map_err(|e| e.into())?.abi(), assignedclientipv6addresses.try_into().map_err(|e| e.into())?.abi(), ::core::mem::transmute_copy(vpninterfaceid), ::core::mem::transmute_copy(assignedroutes), ::core::mem::transmute_copy(assignednamespace), mtusize, maxframesize, reserved, transports.try_into().map_err(|e| e.into())?.abi(), ::core::mem::transmute_copy(assignedtrafficfilters)).ok() } } pub fn ReplaceAndAssociateTransport<'a, P0, P1>(&self, transport: P0, context: P1) -> ::windows::core::Result<()> where @@ -2530,19 +2475,13 @@ impl VpnChannel { (::windows::core::Vtable::vtable(this).CurrentRequestTransportContext)(::windows::core::Vtable::as_raw(this), result__.as_mut_ptr()).from_abi::<::windows::core::IInspectable>(result__) } } - pub fn AppendVpnReceivePacketBuffer<'a, P0>(&self, decapsulatedpacketbuffer: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, VpnPacketBuffer>>, - { + pub fn AppendVpnReceivePacketBuffer(&self, decapsulatedpacketbuffer: &VpnPacketBuffer) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).AppendVpnReceivePacketBuffer)(::windows::core::Vtable::as_raw(this), decapsulatedpacketbuffer.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).AppendVpnReceivePacketBuffer)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(decapsulatedpacketbuffer)).ok() } } - pub fn AppendVpnSendPacketBuffer<'a, P0>(&self, encapsulatedpacketbuffer: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, VpnPacketBuffer>>, - { + pub fn AppendVpnSendPacketBuffer(&self, encapsulatedpacketbuffer: &VpnPacketBuffer) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).AppendVpnSendPacketBuffer)(::windows::core::Vtable::as_raw(this), encapsulatedpacketbuffer.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).AppendVpnSendPacketBuffer)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(encapsulatedpacketbuffer)).ok() } } pub fn FlushVpnReceivePacketBuffers(&self) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; @@ -2554,14 +2493,11 @@ impl VpnChannel { } #[doc = "*Required features: `\"Foundation_Collections\"`*"] #[cfg(feature = "Foundation_Collections")] - pub fn ActivateForeground<'a, P0>(&self, packagerelativeappid: &::windows::core::HSTRING, sharedcontext: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::Collections::ValueSet>>, - { + pub fn ActivateForeground(&self, packagerelativeappid: &::windows::core::HSTRING, sharedcontext: &super::super::Foundation::Collections::ValueSet) -> ::windows::core::Result { let this = &::windows::core::Interface::cast::(self)?; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).ActivateForeground)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(packagerelativeappid), sharedcontext.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).ActivateForeground)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(packagerelativeappid), ::core::mem::transmute_copy(sharedcontext), result__.as_mut_ptr()).from_abi::(result__) } } pub fn ProcessEventAsync<'a, P0, P1>(thirdpartyplugin: P0, event: P1) -> ::windows::core::Result<()> @@ -4348,12 +4284,9 @@ impl VpnDomainNameAssignment { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn SetProxyAutoConfigurationUri<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::Uri>>, - { + pub fn SetProxyAutoConfigurationUri(&self, value: &super::super::Foundation::Uri) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).SetProxyAutoConfigurationUri)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetProxyAutoConfigurationUri)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] @@ -4433,12 +4366,9 @@ unsafe impl ::core::marker::Sync for VpnDomainNameAssignment {} #[repr(transparent)] pub struct VpnDomainNameInfo(::windows::core::IUnknown); impl VpnDomainNameInfo { - pub fn SetDomainName<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::HostName>>, - { + pub fn SetDomainName(&self, value: &super::HostName) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).SetDomainName)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetDomainName)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } pub fn DomainName(&self) -> ::windows::core::Result { let this = self; @@ -4747,12 +4677,9 @@ pub struct VpnForegroundActivationOperation(::windows::core::IUnknown); impl VpnForegroundActivationOperation { #[doc = "*Required features: `\"Foundation_Collections\"`*"] #[cfg(feature = "Foundation_Collections")] - pub fn Complete<'a, P0>(&self, result: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::Collections::ValueSet>>, - { + pub fn Complete(&self, result: &super::super::Foundation::Collections::ValueSet) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).Complete)(::windows::core::Vtable::as_raw(this), result.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).Complete)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(result)).ok() } } } impl ::core::clone::Clone for VpnForegroundActivationOperation { @@ -4995,16 +4922,15 @@ impl VpnManagementAgent { } #[doc = "*Required features: `\"Foundation\"`, `\"Security_Credentials\"`*"] #[cfg(all(feature = "Foundation", feature = "Security_Credentials"))] - pub fn ConnectProfileWithPasswordCredentialAsync<'a, P0, E0, P1>(&self, profile: P0, passwordcredential: P1) -> ::windows::core::Result> + pub fn ConnectProfileWithPasswordCredentialAsync<'a, P0, E0>(&self, profile: P0, passwordcredential: &super::super::Security::Credentials::PasswordCredential) -> ::windows::core::Result> where P0: ::std::convert::TryInto<::windows::core::InParam<'a, IVpnProfile>, Error = E0>, E0: ::std::convert::Into<::windows::core::Error>, - P1: ::std::convert::Into<::windows::core::InParam<'a, super::super::Security::Credentials::PasswordCredential>>, { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).ConnectProfileWithPasswordCredentialAsync)(::windows::core::Vtable::as_raw(this), profile.try_into().map_err(|e| e.into())?.abi(), passwordcredential.into().abi(), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).ConnectProfileWithPasswordCredentialAsync)(::windows::core::Vtable::as_raw(this), profile.try_into().map_err(|e| e.into())?.abi(), ::core::mem::transmute_copy(passwordcredential), result__.as_mut_ptr()).from_abi::>(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -5117,12 +5043,9 @@ impl VpnNamespaceAssignment { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn SetProxyAutoConfigUri<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::Uri>>, - { + pub fn SetProxyAutoConfigUri(&self, value: &super::super::Foundation::Uri) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).SetProxyAutoConfigUri)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetProxyAutoConfigUri)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] @@ -5637,13 +5560,10 @@ impl VpnPacketBuffer { (::windows::core::Vtable::vtable(this).TransportContext)(::windows::core::Vtable::as_raw(this), result__.as_mut_ptr()).from_abi::<::windows::core::IInspectable>(result__) } } - pub fn CreateVpnPacketBuffer<'a, P0>(parentbuffer: P0, offset: u32, length: u32) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, VpnPacketBuffer>>, - { + pub fn CreateVpnPacketBuffer(parentbuffer: &VpnPacketBuffer, offset: u32, length: u32) -> ::windows::core::Result { Self::IVpnPacketBufferFactory(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).CreateVpnPacketBuffer)(::windows::core::Vtable::as_raw(this), parentbuffer.into().abi(), offset, length, result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).CreateVpnPacketBuffer)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(parentbuffer), offset, length, result__.as_mut_ptr()).from_abi::(result__) }) } #[doc(hidden)] @@ -5729,19 +5649,13 @@ impl VpnPacketBufferList { (::windows::core::Vtable::vtable(this).First)(::windows::core::Vtable::as_raw(this), result__.as_mut_ptr()).from_abi::>(result__) } } - pub fn Append<'a, P0>(&self, nextvpnpacketbuffer: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, VpnPacketBuffer>>, - { + pub fn Append(&self, nextvpnpacketbuffer: &VpnPacketBuffer) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).Append)(::windows::core::Vtable::as_raw(this), nextvpnpacketbuffer.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).Append)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(nextvpnpacketbuffer)).ok() } } - pub fn AddAtBegin<'a, P0>(&self, nextvpnpacketbuffer: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, VpnPacketBuffer>>, - { + pub fn AddAtBegin(&self, nextvpnpacketbuffer: &VpnPacketBuffer) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).AddAtBegin)(::windows::core::Vtable::as_raw(this), nextvpnpacketbuffer.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).AddAtBegin)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(nextvpnpacketbuffer)).ok() } } pub fn RemoveAtEnd(&self) -> ::windows::core::Result { let this = self; @@ -6193,12 +6107,9 @@ unsafe impl ::core::marker::Sync for VpnPlugInProfile {} #[repr(transparent)] pub struct VpnRoute(::windows::core::IUnknown); impl VpnRoute { - pub fn SetAddress<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::HostName>>, - { + pub fn SetAddress(&self, value: &super::HostName) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).SetAddress)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetAddress)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } pub fn Address(&self) -> ::windows::core::Result { let this = self; @@ -6218,13 +6129,10 @@ impl VpnRoute { (::windows::core::Vtable::vtable(this).PrefixSize)(::windows::core::Vtable::as_raw(this), result__.as_mut_ptr()).from_abi::(result__) } } - pub fn CreateVpnRoute<'a, P0>(address: P0, prefixsize: u8) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::HostName>>, - { + pub fn CreateVpnRoute(address: &super::HostName, prefixsize: u8) -> ::windows::core::Result { Self::IVpnRouteFactory(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).CreateVpnRoute)(::windows::core::Vtable::as_raw(this), address.into().abi(), prefixsize, result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).CreateVpnRoute)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(address), prefixsize, result__.as_mut_ptr()).from_abi::(result__) }) } #[doc(hidden)] @@ -6549,12 +6457,9 @@ impl VpnTrafficFilter { (::windows::core::Vtable::vtable(this).AppId)(::windows::core::Vtable::as_raw(this), result__.as_mut_ptr()).from_abi::(result__) } } - pub fn SetAppId<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, VpnAppId>>, - { + pub fn SetAppId(&self, value: &VpnAppId) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).SetAppId)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetAppId)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } #[doc = "*Required features: `\"Foundation_Collections\"`*"] #[cfg(feature = "Foundation_Collections")] @@ -6623,13 +6528,10 @@ impl VpnTrafficFilter { let this = self; unsafe { (::windows::core::Vtable::vtable(this).SetRoutingPolicyType)(::windows::core::Vtable::as_raw(this), value).ok() } } - pub fn Create<'a, P0>(appid: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, VpnAppId>>, - { + pub fn Create(appid: &VpnAppId) -> ::windows::core::Result { Self::IVpnTrafficFilterFactory(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).Create)(::windows::core::Vtable::as_raw(this), appid.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).Create)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(appid), result__.as_mut_ptr()).from_abi::(result__) }) } #[doc(hidden)] diff --git a/crates/libs/windows/src/Windows/Networking/XboxLive/mod.rs b/crates/libs/windows/src/Windows/Networking/XboxLive/mod.rs index 927ec279cb..eaf7d5595f 100644 --- a/crates/libs/windows/src/Windows/Networking/XboxLive/mod.rs +++ b/crates/libs/windows/src/Windows/Networking/XboxLive/mod.rs @@ -345,14 +345,11 @@ pub struct XboxLiveDeviceAddress(::windows::core::IUnknown); impl XboxLiveDeviceAddress { #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn SnapshotChanged<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn SnapshotChanged(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).SnapshotChanged)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).SnapshotChanged)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -381,14 +378,11 @@ impl XboxLiveDeviceAddress { let this = self; unsafe { (::windows::core::Vtable::vtable(this).GetSnapshotAsBytes)(::windows::core::Vtable::as_raw(this), buffer.len() as u32, buffer.as_mut_ptr(), byteswritten).ok() } } - pub fn Compare<'a, P0>(&self, otherdeviceaddress: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, XboxLiveDeviceAddress>>, - { + pub fn Compare(&self, otherdeviceaddress: &XboxLiveDeviceAddress) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).Compare)(::windows::core::Vtable::as_raw(this), otherdeviceaddress.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).Compare)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(otherdeviceaddress), result__.as_mut_ptr()).from_abi::(result__) } } pub fn IsValid(&self) -> ::windows::core::Result { @@ -524,14 +518,11 @@ pub struct XboxLiveEndpointPair(::windows::core::IUnknown); impl XboxLiveEndpointPair { #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn StateChanged<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn StateChanged(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).StateChanged)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).StateChanged)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -612,14 +603,10 @@ impl XboxLiveEndpointPair { (::windows::core::Vtable::vtable(this).FindEndpointPairBySocketAddressBytes)(::windows::core::Vtable::as_raw(this), localsocketaddress.len() as u32, localsocketaddress.as_ptr(), remotesocketaddress.len() as u32, remotesocketaddress.as_ptr(), result__.as_mut_ptr()).from_abi::(result__) }) } - pub fn FindEndpointPairByHostNamesAndPorts<'a, P0, P1>(localhostname: P0, localport: &::windows::core::HSTRING, remotehostname: P1, remoteport: &::windows::core::HSTRING) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::HostName>>, - P1: ::std::convert::Into<::windows::core::InParam<'a, super::HostName>>, - { + pub fn FindEndpointPairByHostNamesAndPorts(localhostname: &super::HostName, localport: &::windows::core::HSTRING, remotehostname: &super::HostName, remoteport: &::windows::core::HSTRING) -> ::windows::core::Result { Self::IXboxLiveEndpointPairStatics(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).FindEndpointPairByHostNamesAndPorts)(::windows::core::Vtable::as_raw(this), localhostname.into().abi(), ::core::mem::transmute_copy(localport), remotehostname.into().abi(), ::core::mem::transmute_copy(remoteport), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).FindEndpointPairByHostNamesAndPorts)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(localhostname), ::core::mem::transmute_copy(localport), ::core::mem::transmute_copy(remotehostname), ::core::mem::transmute_copy(remoteport), result__.as_mut_ptr()).from_abi::(result__) }) } #[doc(hidden)] @@ -878,14 +865,11 @@ pub struct XboxLiveEndpointPairTemplate(::windows::core::IUnknown); impl XboxLiveEndpointPairTemplate { #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn InboundEndpointPairCreated<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn InboundEndpointPairCreated(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).InboundEndpointPairCreated)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).InboundEndpointPairCreated)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -896,50 +880,38 @@ impl XboxLiveEndpointPairTemplate { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn CreateEndpointPairDefaultAsync<'a, P0>(&self, deviceaddress: P0) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, XboxLiveDeviceAddress>>, - { + pub fn CreateEndpointPairDefaultAsync(&self, deviceaddress: &XboxLiveDeviceAddress) -> ::windows::core::Result> { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).CreateEndpointPairDefaultAsync)(::windows::core::Vtable::as_raw(this), deviceaddress.into().abi(), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).CreateEndpointPairDefaultAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(deviceaddress), result__.as_mut_ptr()).from_abi::>(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn CreateEndpointPairWithBehaviorsAsync<'a, P0>(&self, deviceaddress: P0, behaviors: XboxLiveEndpointPairCreationBehaviors) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, XboxLiveDeviceAddress>>, - { + pub fn CreateEndpointPairWithBehaviorsAsync(&self, deviceaddress: &XboxLiveDeviceAddress, behaviors: XboxLiveEndpointPairCreationBehaviors) -> ::windows::core::Result> { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).CreateEndpointPairWithBehaviorsAsync)(::windows::core::Vtable::as_raw(this), deviceaddress.into().abi(), behaviors, result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).CreateEndpointPairWithBehaviorsAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(deviceaddress), behaviors, result__.as_mut_ptr()).from_abi::>(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn CreateEndpointPairForPortsDefaultAsync<'a, P0>(&self, deviceaddress: P0, initiatorport: &::windows::core::HSTRING, acceptorport: &::windows::core::HSTRING) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, XboxLiveDeviceAddress>>, - { + pub fn CreateEndpointPairForPortsDefaultAsync(&self, deviceaddress: &XboxLiveDeviceAddress, initiatorport: &::windows::core::HSTRING, acceptorport: &::windows::core::HSTRING) -> ::windows::core::Result> { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).CreateEndpointPairForPortsDefaultAsync)(::windows::core::Vtable::as_raw(this), deviceaddress.into().abi(), ::core::mem::transmute_copy(initiatorport), ::core::mem::transmute_copy(acceptorport), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).CreateEndpointPairForPortsDefaultAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(deviceaddress), ::core::mem::transmute_copy(initiatorport), ::core::mem::transmute_copy(acceptorport), result__.as_mut_ptr()).from_abi::>(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn CreateEndpointPairForPortsWithBehaviorsAsync<'a, P0>(&self, deviceaddress: P0, initiatorport: &::windows::core::HSTRING, acceptorport: &::windows::core::HSTRING, behaviors: XboxLiveEndpointPairCreationBehaviors) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, XboxLiveDeviceAddress>>, - { + pub fn CreateEndpointPairForPortsWithBehaviorsAsync(&self, deviceaddress: &XboxLiveDeviceAddress, initiatorport: &::windows::core::HSTRING, acceptorport: &::windows::core::HSTRING, behaviors: XboxLiveEndpointPairCreationBehaviors) -> ::windows::core::Result> { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).CreateEndpointPairForPortsWithBehaviorsAsync)(::windows::core::Vtable::as_raw(this), deviceaddress.into().abi(), ::core::mem::transmute_copy(initiatorport), ::core::mem::transmute_copy(acceptorport), behaviors, result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).CreateEndpointPairForPortsWithBehaviorsAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(deviceaddress), ::core::mem::transmute_copy(initiatorport), ::core::mem::transmute_copy(acceptorport), behaviors, result__.as_mut_ptr()).from_abi::>(result__) } } pub fn Name(&self) -> ::windows::core::Result<::windows::core::HSTRING> { @@ -1175,14 +1147,11 @@ impl XboxLiveQualityOfServiceMeasurement { } #[doc = "*Required features: `\"Foundation_Collections\"`*"] #[cfg(feature = "Foundation_Collections")] - pub fn GetMetricResultsForDevice<'a, P0>(&self, deviceaddress: P0) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, XboxLiveDeviceAddress>>, - { + pub fn GetMetricResultsForDevice(&self, deviceaddress: &XboxLiveDeviceAddress) -> ::windows::core::Result> { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).GetMetricResultsForDevice)(::windows::core::Vtable::as_raw(this), deviceaddress.into().abi(), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).GetMetricResultsForDevice)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(deviceaddress), result__.as_mut_ptr()).from_abi::>(result__) } } #[doc = "*Required features: `\"Foundation_Collections\"`*"] @@ -1194,24 +1163,18 @@ impl XboxLiveQualityOfServiceMeasurement { (::windows::core::Vtable::vtable(this).GetMetricResultsForMetric)(::windows::core::Vtable::as_raw(this), metric, result__.as_mut_ptr()).from_abi::>(result__) } } - pub fn GetMetricResult<'a, P0>(&self, deviceaddress: P0, metric: XboxLiveQualityOfServiceMetric) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, XboxLiveDeviceAddress>>, - { + pub fn GetMetricResult(&self, deviceaddress: &XboxLiveDeviceAddress, metric: XboxLiveQualityOfServiceMetric) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).GetMetricResult)(::windows::core::Vtable::as_raw(this), deviceaddress.into().abi(), metric, result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).GetMetricResult)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(deviceaddress), metric, result__.as_mut_ptr()).from_abi::(result__) } } - pub fn GetPrivatePayloadResult<'a, P0>(&self, deviceaddress: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, XboxLiveDeviceAddress>>, - { + pub fn GetPrivatePayloadResult(&self, deviceaddress: &XboxLiveDeviceAddress) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).GetPrivatePayloadResult)(::windows::core::Vtable::as_raw(this), deviceaddress.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).GetPrivatePayloadResult)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(deviceaddress), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation_Collections\"`*"] diff --git a/crates/libs/windows/src/Windows/Networking/mod.rs b/crates/libs/windows/src/Windows/Networking/mod.rs index 94f31d004f..b14b9da995 100644 --- a/crates/libs/windows/src/Windows/Networking/mod.rs +++ b/crates/libs/windows/src/Windows/Networking/mod.rs @@ -117,12 +117,9 @@ impl EndpointPair { (::windows::core::Vtable::vtable(this).LocalHostName)(::windows::core::Vtable::as_raw(this), result__.as_mut_ptr()).from_abi::(result__) } } - pub fn SetLocalHostName<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, HostName>>, - { + pub fn SetLocalHostName(&self, value: &HostName) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).SetLocalHostName)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetLocalHostName)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } pub fn LocalServiceName(&self) -> ::windows::core::Result<::windows::core::HSTRING> { let this = self; @@ -142,12 +139,9 @@ impl EndpointPair { (::windows::core::Vtable::vtable(this).RemoteHostName)(::windows::core::Vtable::as_raw(this), result__.as_mut_ptr()).from_abi::(result__) } } - pub fn SetRemoteHostName<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, HostName>>, - { + pub fn SetRemoteHostName(&self, value: &HostName) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).SetRemoteHostName)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetRemoteHostName)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } pub fn RemoteServiceName(&self) -> ::windows::core::Result<::windows::core::HSTRING> { let this = self; @@ -160,14 +154,10 @@ impl EndpointPair { let this = self; unsafe { (::windows::core::Vtable::vtable(this).SetRemoteServiceName)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } - pub fn CreateEndpointPair<'a, P0, P1>(localhostname: P0, localservicename: &::windows::core::HSTRING, remotehostname: P1, remoteservicename: &::windows::core::HSTRING) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, HostName>>, - P1: ::std::convert::Into<::windows::core::InParam<'a, HostName>>, - { + pub fn CreateEndpointPair(localhostname: &HostName, localservicename: &::windows::core::HSTRING, remotehostname: &HostName, remoteservicename: &::windows::core::HSTRING) -> ::windows::core::Result { Self::IEndpointPairFactory(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).CreateEndpointPair)(::windows::core::Vtable::as_raw(this), localhostname.into().abi(), ::core::mem::transmute_copy(localservicename), remotehostname.into().abi(), ::core::mem::transmute_copy(remoteservicename), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).CreateEndpointPair)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(localhostname), ::core::mem::transmute_copy(localservicename), ::core::mem::transmute_copy(remotehostname), ::core::mem::transmute_copy(remoteservicename), result__.as_mut_ptr()).from_abi::(result__) }) } #[doc(hidden)] @@ -281,14 +271,11 @@ impl HostName { (::windows::core::Vtable::vtable(this).Type)(::windows::core::Vtable::as_raw(this), result__.as_mut_ptr()).from_abi::(result__) } } - pub fn IsEqual<'a, P0>(&self, hostname: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, HostName>>, - { + pub fn IsEqual(&self, hostname: &HostName) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).IsEqual)(::windows::core::Vtable::as_raw(this), hostname.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).IsEqual)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(hostname), result__.as_mut_ptr()).from_abi::(result__) } } pub fn CreateHostName(hostname: &::windows::core::HSTRING) -> ::windows::core::Result { diff --git a/crates/libs/windows/src/Windows/Perception/People/mod.rs b/crates/libs/windows/src/Windows/Perception/People/mod.rs index b22295cae5..ccf3029291 100644 --- a/crates/libs/windows/src/Windows/Perception/People/mod.rs +++ b/crates/libs/windows/src/Windows/Perception/People/mod.rs @@ -283,14 +283,11 @@ impl HandMeshObserver { let this = self; unsafe { (::windows::core::Vtable::vtable(this).GetTriangleIndices)(::windows::core::Vtable::as_raw(this), indices.len() as u32, indices.as_mut_ptr()).ok() } } - pub fn GetVertexStateForPose<'a, P0>(&self, handpose: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, HandPose>>, - { + pub fn GetVertexStateForPose(&self, handpose: &HandPose) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).GetVertexStateForPose)(::windows::core::Vtable::as_raw(this), handpose.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).GetVertexStateForPose)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handpose), result__.as_mut_ptr()).from_abi::(result__) } } pub fn NeutralPose(&self) -> ::windows::core::Result { @@ -476,26 +473,20 @@ pub struct HandPose(::windows::core::IUnknown); impl HandPose { #[doc = "*Required features: `\"Foundation_Numerics\"`, `\"Perception_Spatial\"`*"] #[cfg(all(feature = "Foundation_Numerics", feature = "Perception_Spatial"))] - pub fn TryGetJoint<'a, P0>(&self, coordinatesystem: P0, joint: HandJointKind, jointpose: &mut JointPose) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::Spatial::SpatialCoordinateSystem>>, - { + pub fn TryGetJoint(&self, coordinatesystem: &super::Spatial::SpatialCoordinateSystem, joint: HandJointKind, jointpose: &mut JointPose) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).TryGetJoint)(::windows::core::Vtable::as_raw(this), coordinatesystem.into().abi(), joint, jointpose, result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).TryGetJoint)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(coordinatesystem), joint, jointpose, result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation_Numerics\"`, `\"Perception_Spatial\"`*"] #[cfg(all(feature = "Foundation_Numerics", feature = "Perception_Spatial"))] - pub fn TryGetJoints<'a, P0>(&self, coordinatesystem: P0, joints: &[HandJointKind], jointposes: &mut [JointPose]) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::Spatial::SpatialCoordinateSystem>>, - { + pub fn TryGetJoints(&self, coordinatesystem: &super::Spatial::SpatialCoordinateSystem, joints: &[HandJointKind], jointposes: &mut [JointPose]) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).TryGetJoints)(::windows::core::Vtable::as_raw(this), coordinatesystem.into().abi(), joints.len() as u32, joints.as_ptr(), jointposes.len() as u32, jointposes.as_mut_ptr(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).TryGetJoints)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(coordinatesystem), joints.len() as u32, joints.as_ptr(), jointposes.len() as u32, jointposes.as_mut_ptr(), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation_Numerics\"`*"] diff --git a/crates/libs/windows/src/Windows/Perception/Spatial/Preview/mod.rs b/crates/libs/windows/src/Windows/Perception/Spatial/Preview/mod.rs index 73c55a30e1..34ddb55b9d 100644 --- a/crates/libs/windows/src/Windows/Perception/Spatial/Preview/mod.rs +++ b/crates/libs/windows/src/Windows/Perception/Spatial/Preview/mod.rs @@ -188,35 +188,26 @@ impl SpatialGraphInteropPreview { (::windows::core::Vtable::vtable(this).CreateLocatorForNode)(::windows::core::Vtable::as_raw(this), nodeid, result__.as_mut_ptr()).from_abi::(result__) }) } - pub fn TryCreateFrameOfReference<'a, P0>(coordinatesystem: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::SpatialCoordinateSystem>>, - { + pub fn TryCreateFrameOfReference(coordinatesystem: &super::SpatialCoordinateSystem) -> ::windows::core::Result { Self::ISpatialGraphInteropPreviewStatics2(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).TryCreateFrameOfReference)(::windows::core::Vtable::as_raw(this), coordinatesystem.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).TryCreateFrameOfReference)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(coordinatesystem), result__.as_mut_ptr()).from_abi::(result__) }) } #[doc = "*Required features: `\"Foundation_Numerics\"`*"] #[cfg(feature = "Foundation_Numerics")] - pub fn TryCreateFrameOfReferenceWithPosition<'a, P0>(coordinatesystem: P0, relativeposition: super::super::super::Foundation::Numerics::Vector3) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::SpatialCoordinateSystem>>, - { + pub fn TryCreateFrameOfReferenceWithPosition(coordinatesystem: &super::SpatialCoordinateSystem, relativeposition: super::super::super::Foundation::Numerics::Vector3) -> ::windows::core::Result { Self::ISpatialGraphInteropPreviewStatics2(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).TryCreateFrameOfReferenceWithPosition)(::windows::core::Vtable::as_raw(this), coordinatesystem.into().abi(), relativeposition, result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).TryCreateFrameOfReferenceWithPosition)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(coordinatesystem), relativeposition, result__.as_mut_ptr()).from_abi::(result__) }) } #[doc = "*Required features: `\"Foundation_Numerics\"`*"] #[cfg(feature = "Foundation_Numerics")] - pub fn TryCreateFrameOfReferenceWithPositionAndOrientation<'a, P0>(coordinatesystem: P0, relativeposition: super::super::super::Foundation::Numerics::Vector3, relativeorientation: super::super::super::Foundation::Numerics::Quaternion) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::SpatialCoordinateSystem>>, - { + pub fn TryCreateFrameOfReferenceWithPositionAndOrientation(coordinatesystem: &super::SpatialCoordinateSystem, relativeposition: super::super::super::Foundation::Numerics::Vector3, relativeorientation: super::super::super::Foundation::Numerics::Quaternion) -> ::windows::core::Result { Self::ISpatialGraphInteropPreviewStatics2(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).TryCreateFrameOfReferenceWithPositionAndOrientation)(::windows::core::Vtable::as_raw(this), coordinatesystem.into().abi(), relativeposition, relativeorientation, result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).TryCreateFrameOfReferenceWithPositionAndOrientation)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(coordinatesystem), relativeposition, relativeorientation, result__.as_mut_ptr()).from_abi::(result__) }) } #[doc(hidden)] diff --git a/crates/libs/windows/src/Windows/Perception/Spatial/Surfaces/mod.rs b/crates/libs/windows/src/Windows/Perception/Spatial/Surfaces/mod.rs index 7694b2bfd3..6519d58afb 100644 --- a/crates/libs/windows/src/Windows/Perception/Spatial/Surfaces/mod.rs +++ b/crates/libs/windows/src/Windows/Perception/Spatial/Surfaces/mod.rs @@ -228,14 +228,11 @@ impl SpatialSurfaceInfo { } #[doc = "*Required features: `\"Foundation_Numerics\"`*"] #[cfg(feature = "Foundation_Numerics")] - pub fn TryGetBounds<'a, P0>(&self, coordinatesystem: P0) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::SpatialCoordinateSystem>>, - { + pub fn TryGetBounds(&self, coordinatesystem: &super::SpatialCoordinateSystem) -> ::windows::core::Result> { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).TryGetBounds)(::windows::core::Vtable::as_raw(this), coordinatesystem.into().abi(), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).TryGetBounds)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(coordinatesystem), result__.as_mut_ptr()).from_abi::>(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -249,14 +246,11 @@ impl SpatialSurfaceInfo { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn TryComputeLatestMeshWithOptionsAsync<'a, P0>(&self, maxtrianglespercubicmeter: f64, options: P0) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, SpatialSurfaceMeshOptions>>, - { + pub fn TryComputeLatestMeshWithOptionsAsync(&self, maxtrianglespercubicmeter: f64, options: &SpatialSurfaceMeshOptions) -> ::windows::core::Result> { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).TryComputeLatestMeshWithOptionsAsync)(::windows::core::Vtable::as_raw(this), maxtrianglespercubicmeter, options.into().abi(), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).TryComputeLatestMeshWithOptionsAsync)(::windows::core::Vtable::as_raw(this), maxtrianglespercubicmeter, ::core::mem::transmute_copy(options), result__.as_mut_ptr()).from_abi::>(result__) } } } @@ -719,12 +713,9 @@ impl SpatialSurfaceObserver { (::windows::core::Vtable::vtable(this).GetObservedSurfaces)(::windows::core::Vtable::as_raw(this), result__.as_mut_ptr()).from_abi::>(result__) } } - pub fn SetBoundingVolume<'a, P0>(&self, bounds: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::SpatialBoundingVolume>>, - { + pub fn SetBoundingVolume(&self, bounds: &super::SpatialBoundingVolume) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).SetBoundingVolume)(::windows::core::Vtable::as_raw(this), bounds.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetBoundingVolume)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(bounds)).ok() } } #[doc = "*Required features: `\"Foundation_Collections\"`*"] #[cfg(feature = "Foundation_Collections")] @@ -738,14 +729,11 @@ impl SpatialSurfaceObserver { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn ObservedSurfacesChanged<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Foundation::TypedEventHandler>>, - { + pub fn ObservedSurfacesChanged(&self, handler: &super::super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).ObservedSurfacesChanged)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).ObservedSurfacesChanged)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] diff --git a/crates/libs/windows/src/Windows/Perception/Spatial/mod.rs b/crates/libs/windows/src/Windows/Perception/Spatial/mod.rs index 00cfd7a859..61fdd09d15 100644 --- a/crates/libs/windows/src/Windows/Perception/Spatial/mod.rs +++ b/crates/libs/windows/src/Windows/Perception/Spatial/mod.rs @@ -715,14 +715,11 @@ impl SpatialAnchor { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn RawCoordinateSystemAdjusted<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn RawCoordinateSystemAdjusted(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).RawCoordinateSystemAdjusted)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).RawCoordinateSystemAdjusted)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -738,35 +735,26 @@ impl SpatialAnchor { (::windows::core::Vtable::vtable(this).RemovedByUser)(::windows::core::Vtable::as_raw(this), result__.as_mut_ptr()).from_abi::(result__) } } - pub fn TryCreateRelativeTo<'a, P0>(coordinatesystem: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, SpatialCoordinateSystem>>, - { + pub fn TryCreateRelativeTo(coordinatesystem: &SpatialCoordinateSystem) -> ::windows::core::Result { Self::ISpatialAnchorStatics(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).TryCreateRelativeTo)(::windows::core::Vtable::as_raw(this), coordinatesystem.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).TryCreateRelativeTo)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(coordinatesystem), result__.as_mut_ptr()).from_abi::(result__) }) } #[doc = "*Required features: `\"Foundation_Numerics\"`*"] #[cfg(feature = "Foundation_Numerics")] - pub fn TryCreateWithPositionRelativeTo<'a, P0>(coordinatesystem: P0, position: super::super::Foundation::Numerics::Vector3) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, SpatialCoordinateSystem>>, - { + pub fn TryCreateWithPositionRelativeTo(coordinatesystem: &SpatialCoordinateSystem, position: super::super::Foundation::Numerics::Vector3) -> ::windows::core::Result { Self::ISpatialAnchorStatics(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).TryCreateWithPositionRelativeTo)(::windows::core::Vtable::as_raw(this), coordinatesystem.into().abi(), position, result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).TryCreateWithPositionRelativeTo)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(coordinatesystem), position, result__.as_mut_ptr()).from_abi::(result__) }) } #[doc = "*Required features: `\"Foundation_Numerics\"`*"] #[cfg(feature = "Foundation_Numerics")] - pub fn TryCreateWithPositionAndOrientationRelativeTo<'a, P0>(coordinatesystem: P0, position: super::super::Foundation::Numerics::Vector3, orientation: super::super::Foundation::Numerics::Quaternion) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, SpatialCoordinateSystem>>, - { + pub fn TryCreateWithPositionAndOrientationRelativeTo(coordinatesystem: &SpatialCoordinateSystem, position: super::super::Foundation::Numerics::Vector3, orientation: super::super::Foundation::Numerics::Quaternion) -> ::windows::core::Result { Self::ISpatialAnchorStatics(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).TryCreateWithPositionAndOrientationRelativeTo)(::windows::core::Vtable::as_raw(this), coordinatesystem.into().abi(), position, orientation, result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).TryCreateWithPositionAndOrientationRelativeTo)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(coordinatesystem), position, orientation, result__.as_mut_ptr()).from_abi::(result__) }) } #[doc(hidden)] @@ -935,28 +923,24 @@ pub struct SpatialAnchorExporter(::windows::core::IUnknown); impl SpatialAnchorExporter { #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn GetAnchorExportSufficiencyAsync<'a, P0>(&self, anchor: P0, purpose: SpatialAnchorExportPurpose) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, SpatialAnchor>>, - { + pub fn GetAnchorExportSufficiencyAsync(&self, anchor: &SpatialAnchor, purpose: SpatialAnchorExportPurpose) -> ::windows::core::Result> { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).GetAnchorExportSufficiencyAsync)(::windows::core::Vtable::as_raw(this), anchor.into().abi(), purpose, result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).GetAnchorExportSufficiencyAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(anchor), purpose, result__.as_mut_ptr()).from_abi::>(result__) } } #[doc = "*Required features: `\"Foundation\"`, `\"Storage_Streams\"`*"] #[cfg(all(feature = "Foundation", feature = "Storage_Streams"))] - pub fn TryExportAnchorAsync<'a, P0, P1, E1>(&self, anchor: P0, purpose: SpatialAnchorExportPurpose, stream: P1) -> ::windows::core::Result> + pub fn TryExportAnchorAsync<'a, P0, E0>(&self, anchor: &SpatialAnchor, purpose: SpatialAnchorExportPurpose, stream: P0) -> ::windows::core::Result> where - P0: ::std::convert::Into<::windows::core::InParam<'a, SpatialAnchor>>, - P1: ::std::convert::TryInto<::windows::core::InParam<'a, super::super::Storage::Streams::IOutputStream>, Error = E1>, - E1: ::std::convert::Into<::windows::core::Error>, + P0: ::std::convert::TryInto<::windows::core::InParam<'a, super::super::Storage::Streams::IOutputStream>, Error = E0>, + E0: ::std::convert::Into<::windows::core::Error>, { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).TryExportAnchorAsync)(::windows::core::Vtable::as_raw(this), anchor.into().abi(), purpose, stream.try_into().map_err(|e| e.into())?.abi(), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).TryExportAnchorAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(anchor), purpose, stream.try_into().map_err(|e| e.into())?.abi(), result__.as_mut_ptr()).from_abi::>(result__) } } pub fn GetDefault() -> ::windows::core::Result { @@ -1154,14 +1138,11 @@ impl SpatialAnchorStore { (::windows::core::Vtable::vtable(this).GetAllSavedAnchors)(::windows::core::Vtable::as_raw(this), result__.as_mut_ptr()).from_abi::>(result__) } } - pub fn TrySave<'a, P0>(&self, id: &::windows::core::HSTRING, anchor: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, SpatialAnchor>>, - { + pub fn TrySave(&self, id: &::windows::core::HSTRING, anchor: &SpatialAnchor) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).TrySave)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(id), anchor.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).TrySave)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(id), ::core::mem::transmute_copy(anchor), result__.as_mut_ptr()).from_abi::(result__) } } pub fn Remove(&self, id: &::windows::core::HSTRING) -> ::windows::core::Result<()> { @@ -1293,46 +1274,34 @@ pub struct SpatialBoundingVolume(::windows::core::IUnknown); impl SpatialBoundingVolume { #[doc = "*Required features: `\"Foundation_Numerics\"`*"] #[cfg(feature = "Foundation_Numerics")] - pub fn FromBox<'a, P0>(coordinatesystem: P0, r#box: SpatialBoundingBox) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, SpatialCoordinateSystem>>, - { + pub fn FromBox(coordinatesystem: &SpatialCoordinateSystem, r#box: SpatialBoundingBox) -> ::windows::core::Result { Self::ISpatialBoundingVolumeStatics(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).FromBox)(::windows::core::Vtable::as_raw(this), coordinatesystem.into().abi(), r#box, result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).FromBox)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(coordinatesystem), r#box, result__.as_mut_ptr()).from_abi::(result__) }) } #[doc = "*Required features: `\"Foundation_Numerics\"`*"] #[cfg(feature = "Foundation_Numerics")] - pub fn FromOrientedBox<'a, P0>(coordinatesystem: P0, r#box: SpatialBoundingOrientedBox) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, SpatialCoordinateSystem>>, - { + pub fn FromOrientedBox(coordinatesystem: &SpatialCoordinateSystem, r#box: SpatialBoundingOrientedBox) -> ::windows::core::Result { Self::ISpatialBoundingVolumeStatics(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).FromOrientedBox)(::windows::core::Vtable::as_raw(this), coordinatesystem.into().abi(), r#box, result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).FromOrientedBox)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(coordinatesystem), r#box, result__.as_mut_ptr()).from_abi::(result__) }) } #[doc = "*Required features: `\"Foundation_Numerics\"`*"] #[cfg(feature = "Foundation_Numerics")] - pub fn FromSphere<'a, P0>(coordinatesystem: P0, sphere: SpatialBoundingSphere) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, SpatialCoordinateSystem>>, - { + pub fn FromSphere(coordinatesystem: &SpatialCoordinateSystem, sphere: SpatialBoundingSphere) -> ::windows::core::Result { Self::ISpatialBoundingVolumeStatics(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).FromSphere)(::windows::core::Vtable::as_raw(this), coordinatesystem.into().abi(), sphere, result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).FromSphere)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(coordinatesystem), sphere, result__.as_mut_ptr()).from_abi::(result__) }) } #[doc = "*Required features: `\"Foundation_Numerics\"`*"] #[cfg(feature = "Foundation_Numerics")] - pub fn FromFrustum<'a, P0>(coordinatesystem: P0, frustum: SpatialBoundingFrustum) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, SpatialCoordinateSystem>>, - { + pub fn FromFrustum(coordinatesystem: &SpatialCoordinateSystem, frustum: SpatialBoundingFrustum) -> ::windows::core::Result { Self::ISpatialBoundingVolumeStatics(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).FromFrustum)(::windows::core::Vtable::as_raw(this), coordinatesystem.into().abi(), frustum, result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).FromFrustum)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(coordinatesystem), frustum, result__.as_mut_ptr()).from_abi::(result__) }) } #[doc(hidden)] @@ -1411,14 +1380,11 @@ pub struct SpatialCoordinateSystem(::windows::core::IUnknown); impl SpatialCoordinateSystem { #[doc = "*Required features: `\"Foundation_Numerics\"`*"] #[cfg(feature = "Foundation_Numerics")] - pub fn TryGetTransformTo<'a, P0>(&self, target: P0) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, SpatialCoordinateSystem>>, - { + pub fn TryGetTransformTo(&self, target: &SpatialCoordinateSystem) -> ::windows::core::Result> { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).TryGetTransformTo)(::windows::core::Vtable::as_raw(this), target.into().abi(), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).TryGetTransformTo)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(target), result__.as_mut_ptr()).from_abi::>(result__) } } } @@ -1513,25 +1479,18 @@ impl SpatialEntity { (::windows::core::Vtable::vtable(this).Properties)(::windows::core::Vtable::as_raw(this), result__.as_mut_ptr()).from_abi::(result__) } } - pub fn CreateWithSpatialAnchor<'a, P0>(spatialanchor: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, SpatialAnchor>>, - { + pub fn CreateWithSpatialAnchor(spatialanchor: &SpatialAnchor) -> ::windows::core::Result { Self::ISpatialEntityFactory(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).CreateWithSpatialAnchor)(::windows::core::Vtable::as_raw(this), spatialanchor.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).CreateWithSpatialAnchor)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(spatialanchor), result__.as_mut_ptr()).from_abi::(result__) }) } #[doc = "*Required features: `\"Foundation_Collections\"`*"] #[cfg(feature = "Foundation_Collections")] - pub fn CreateWithSpatialAnchorAndProperties<'a, P0, P1>(spatialanchor: P0, propertyset: P1) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, SpatialAnchor>>, - P1: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::Collections::ValueSet>>, - { + pub fn CreateWithSpatialAnchorAndProperties(spatialanchor: &SpatialAnchor, propertyset: &super::super::Foundation::Collections::ValueSet) -> ::windows::core::Result { Self::ISpatialEntityFactory(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).CreateWithSpatialAnchorAndProperties)(::windows::core::Vtable::as_raw(this), spatialanchor.into().abi(), propertyset.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).CreateWithSpatialAnchorAndProperties)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(spatialanchor), ::core::mem::transmute_copy(propertyset), result__.as_mut_ptr()).from_abi::(result__) }) } #[doc(hidden)] @@ -1762,26 +1721,20 @@ pub struct SpatialEntityStore(::windows::core::IUnknown); impl SpatialEntityStore { #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn SaveAsync<'a, P0>(&self, entity: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, SpatialEntity>>, - { + pub fn SaveAsync(&self, entity: &SpatialEntity) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).SaveAsync)(::windows::core::Vtable::as_raw(this), entity.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).SaveAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(entity), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn RemoveAsync<'a, P0>(&self, entity: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, SpatialEntity>>, - { + pub fn RemoveAsync(&self, entity: &SpatialEntity) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).RemoveAsync)(::windows::core::Vtable::as_raw(this), entity.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).RemoveAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(entity), result__.as_mut_ptr()).from_abi::(result__) } } pub fn CreateEntityWatcher(&self) -> ::windows::core::Result { @@ -1799,13 +1752,10 @@ impl SpatialEntityStore { } #[doc = "*Required features: `\"System_RemoteSystems\"`*"] #[cfg(feature = "System_RemoteSystems")] - pub fn TryGetForRemoteSystemSession<'a, P0>(session: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::System::RemoteSystems::RemoteSystemSession>>, - { + pub fn TryGetForRemoteSystemSession(session: &super::super::System::RemoteSystems::RemoteSystemSession) -> ::windows::core::Result { Self::ISpatialEntityStoreStatics(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).TryGetForRemoteSystemSession)(::windows::core::Vtable::as_raw(this), session.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).TryGetForRemoteSystemSession)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(session), result__.as_mut_ptr()).from_abi::(result__) }) } #[doc(hidden)] @@ -1967,14 +1917,11 @@ impl SpatialEntityWatcher { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn Added<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn Added(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).Added)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).Added)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -1985,14 +1932,11 @@ impl SpatialEntityWatcher { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn Updated<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn Updated(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).Updated)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).Updated)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -2003,14 +1947,11 @@ impl SpatialEntityWatcher { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn Removed<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn Removed(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).Removed)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).Removed)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -2021,14 +1962,11 @@ impl SpatialEntityWatcher { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn EnumerationCompleted<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn EnumerationCompleted(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).EnumerationCompleted)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).EnumerationCompleted)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -2264,14 +2202,11 @@ impl SpatialLocator { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn LocatabilityChanged<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn LocatabilityChanged(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).LocatabilityChanged)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).LocatabilityChanged)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -2282,14 +2217,11 @@ impl SpatialLocator { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn PositionalTrackingDeactivating<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn PositionalTrackingDeactivating(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).PositionalTrackingDeactivating)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).PositionalTrackingDeactivating)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -2298,15 +2230,11 @@ impl SpatialLocator { let this = self; unsafe { (::windows::core::Vtable::vtable(this).RemovePositionalTrackingDeactivating)(::windows::core::Vtable::as_raw(this), cookie).ok() } } - pub fn TryLocateAtTimestamp<'a, P0, P1>(&self, timestamp: P0, coordinatesystem: P1) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::PerceptionTimestamp>>, - P1: ::std::convert::Into<::windows::core::InParam<'a, SpatialCoordinateSystem>>, - { + pub fn TryLocateAtTimestamp(&self, timestamp: &super::PerceptionTimestamp, coordinatesystem: &SpatialCoordinateSystem) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).TryLocateAtTimestamp)(::windows::core::Vtable::as_raw(this), timestamp.into().abi(), coordinatesystem.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).TryLocateAtTimestamp)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(timestamp), ::core::mem::transmute_copy(coordinatesystem), result__.as_mut_ptr()).from_abi::(result__) } } pub fn CreateAttachedFrameOfReferenceAtCurrentHeading(&self) -> ::windows::core::Result { @@ -2491,26 +2419,20 @@ impl SpatialLocatorAttachedFrameOfReference { let this = self; unsafe { (::windows::core::Vtable::vtable(this).AdjustHeading)(::windows::core::Vtable::as_raw(this), headingoffsetinradians).ok() } } - pub fn GetStationaryCoordinateSystemAtTimestamp<'a, P0>(&self, timestamp: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::PerceptionTimestamp>>, - { + pub fn GetStationaryCoordinateSystemAtTimestamp(&self, timestamp: &super::PerceptionTimestamp) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).GetStationaryCoordinateSystemAtTimestamp)(::windows::core::Vtable::as_raw(this), timestamp.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).GetStationaryCoordinateSystemAtTimestamp)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(timestamp), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn TryGetRelativeHeadingAtTimestamp<'a, P0>(&self, timestamp: P0) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::PerceptionTimestamp>>, - { + pub fn TryGetRelativeHeadingAtTimestamp(&self, timestamp: &super::PerceptionTimestamp) -> ::windows::core::Result> { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).TryGetRelativeHeadingAtTimestamp)(::windows::core::Vtable::as_raw(this), timestamp.into().abi(), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).TryGetRelativeHeadingAtTimestamp)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(timestamp), result__.as_mut_ptr()).from_abi::>(result__) } } } @@ -2683,26 +2605,20 @@ impl SpatialStageFrameOfReference { (::windows::core::Vtable::vtable(this).LookDirectionRange)(::windows::core::Vtable::as_raw(this), result__.as_mut_ptr()).from_abi::(result__) } } - pub fn GetCoordinateSystemAtCurrentLocation<'a, P0>(&self, locator: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, SpatialLocator>>, - { + pub fn GetCoordinateSystemAtCurrentLocation(&self, locator: &SpatialLocator) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).GetCoordinateSystemAtCurrentLocation)(::windows::core::Vtable::as_raw(this), locator.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).GetCoordinateSystemAtCurrentLocation)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(locator), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation_Numerics\"`*"] #[cfg(feature = "Foundation_Numerics")] - pub fn TryGetMovementBounds<'a, P0>(&self, coordinatesystem: P0) -> ::windows::core::Result<::windows::core::Array> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, SpatialCoordinateSystem>>, - { + pub fn TryGetMovementBounds(&self, coordinatesystem: &SpatialCoordinateSystem) -> ::windows::core::Result<::windows::core::Array> { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).TryGetMovementBounds)(::windows::core::Vtable::as_raw(this), coordinatesystem.into().abi(), ::windows::core::Array::::set_abi_len(result__.assume_init_mut()), result__.as_mut_ptr() as *mut _ as _).and_then(|| result__.assume_init()) + (::windows::core::Vtable::vtable(this).TryGetMovementBounds)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(coordinatesystem), ::windows::core::Array::::set_abi_len(result__.assume_init_mut()), result__.as_mut_ptr() as *mut _ as _).and_then(|| result__.assume_init()) } } pub fn Current() -> ::windows::core::Result { @@ -2713,13 +2629,10 @@ impl SpatialStageFrameOfReference { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn CurrentChanged<'a, P0>(handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::EventHandler<::windows::core::IInspectable>>>, - { + pub fn CurrentChanged(handler: &super::super::Foundation::EventHandler<::windows::core::IInspectable>) -> ::windows::core::Result { Self::ISpatialStageFrameOfReferenceStatics(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).CurrentChanged)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).CurrentChanged)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) }) } #[doc = "*Required features: `\"Foundation\"`*"] diff --git a/crates/libs/windows/src/Windows/Phone/Devices/Power/mod.rs b/crates/libs/windows/src/Windows/Phone/Devices/Power/mod.rs index a913a84075..4571490c88 100644 --- a/crates/libs/windows/src/Windows/Phone/Devices/Power/mod.rs +++ b/crates/libs/windows/src/Windows/Phone/Devices/Power/mod.rs @@ -62,14 +62,11 @@ impl Battery { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn RemainingChargePercentChanged<'a, P0>(&self, changehandler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Foundation::EventHandler<::windows::core::IInspectable>>>, - { + pub fn RemainingChargePercentChanged(&self, changehandler: &super::super::super::Foundation::EventHandler<::windows::core::IInspectable>) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).RemainingChargePercentChanged)(::windows::core::Vtable::as_raw(this), changehandler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).RemainingChargePercentChanged)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(changehandler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] diff --git a/crates/libs/windows/src/Windows/Phone/Management/Deployment/mod.rs b/crates/libs/windows/src/Windows/Phone/Management/Deployment/mod.rs index bc23b3d68e..26baf8a38a 100644 --- a/crates/libs/windows/src/Windows/Phone/Management/Deployment/mod.rs +++ b/crates/libs/windows/src/Windows/Phone/Management/Deployment/mod.rs @@ -315,13 +315,10 @@ impl EnterpriseEnrollmentManager { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn RequestUnenrollmentAsync<'a, P0>(enterprise: P0) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, Enterprise>>, - { + pub fn RequestUnenrollmentAsync(enterprise: &Enterprise) -> ::windows::core::Result> { Self::IEnterpriseEnrollmentManager(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).RequestUnenrollmentAsync)(::windows::core::Vtable::as_raw(this), enterprise.into().abi(), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).RequestUnenrollmentAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(enterprise), result__.as_mut_ptr()).from_abi::>(result__) }) } #[doc(hidden)] @@ -419,25 +416,18 @@ pub struct InstallationManager; impl InstallationManager { #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn AddPackageAsync<'a, P0>(title: &::windows::core::HSTRING, sourcelocation: P0) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Foundation::Uri>>, - { + pub fn AddPackageAsync(title: &::windows::core::HSTRING, sourcelocation: &super::super::super::Foundation::Uri) -> ::windows::core::Result> { Self::IInstallationManagerStatics(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).AddPackageAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(title), sourcelocation.into().abi(), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).AddPackageAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(title), ::core::mem::transmute_copy(sourcelocation), result__.as_mut_ptr()).from_abi::>(result__) }) } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn AddPackagePreloadedAsync<'a, P0, P1>(title: &::windows::core::HSTRING, sourcelocation: P0, instanceid: &::windows::core::HSTRING, offerid: &::windows::core::HSTRING, license: P1) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Foundation::Uri>>, - P1: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Foundation::Uri>>, - { + pub fn AddPackagePreloadedAsync(title: &::windows::core::HSTRING, sourcelocation: &super::super::super::Foundation::Uri, instanceid: &::windows::core::HSTRING, offerid: &::windows::core::HSTRING, license: &super::super::super::Foundation::Uri) -> ::windows::core::Result> { Self::IInstallationManagerStatics(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).AddPackagePreloadedAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(title), sourcelocation.into().abi(), ::core::mem::transmute_copy(instanceid), ::core::mem::transmute_copy(offerid), license.into().abi(), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).AddPackagePreloadedAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(title), ::core::mem::transmute_copy(sourcelocation), ::core::mem::transmute_copy(instanceid), ::core::mem::transmute_copy(offerid), ::core::mem::transmute_copy(license), result__.as_mut_ptr()).from_abi::>(result__) }) } #[doc = "*Required features: `\"Foundation_Collections\"`*"] @@ -474,15 +464,14 @@ impl InstallationManager { } #[doc = "*Required features: `\"Foundation_Collections\"`, `\"Management_Deployment\"`*"] #[cfg(all(feature = "Foundation_Collections", feature = "Management_Deployment"))] - pub fn RegisterPackageAsync<'a, P0, P1, E1>(manifesturi: P0, dependencypackageuris: P1, deploymentoptions: super::super::super::Management::Deployment::DeploymentOptions) -> ::windows::core::Result> + pub fn RegisterPackageAsync<'a, P0, E0>(manifesturi: &super::super::super::Foundation::Uri, dependencypackageuris: P0, deploymentoptions: super::super::super::Management::Deployment::DeploymentOptions) -> ::windows::core::Result> where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Foundation::Uri>>, - P1: ::std::convert::TryInto<::windows::core::InParam<'a, super::super::super::Foundation::Collections::IIterable>, Error = E1>, - E1: ::std::convert::Into<::windows::core::Error>, + P0: ::std::convert::TryInto<::windows::core::InParam<'a, super::super::super::Foundation::Collections::IIterable>, Error = E0>, + E0: ::std::convert::Into<::windows::core::Error>, { Self::IInstallationManagerStatics2(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).RegisterPackageAsync)(::windows::core::Vtable::as_raw(this), manifesturi.into().abi(), dependencypackageuris.try_into().map_err(|e| e.into())?.abi(), deploymentoptions, result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).RegisterPackageAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(manifesturi), dependencypackageuris.try_into().map_err(|e| e.into())?.abi(), deploymentoptions, result__.as_mut_ptr()).from_abi::>(result__) }) } #[doc = "*Required features: `\"ApplicationModel\"`, `\"Foundation_Collections\"`*"] diff --git a/crates/libs/windows/src/Windows/Phone/Media/Devices/mod.rs b/crates/libs/windows/src/Windows/Phone/Media/Devices/mod.rs index 6dbb44c3aa..ed5e7cf585 100644 --- a/crates/libs/windows/src/Windows/Phone/Media/Devices/mod.rs +++ b/crates/libs/windows/src/Windows/Phone/Media/Devices/mod.rs @@ -55,14 +55,11 @@ impl AudioRoutingManager { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn AudioEndpointChanged<'a, P0>(&self, endpointchangehandler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Foundation::TypedEventHandler>>, - { + pub fn AudioEndpointChanged(&self, endpointchangehandler: &super::super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).AudioEndpointChanged)(::windows::core::Vtable::as_raw(this), endpointchangehandler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).AudioEndpointChanged)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(endpointchangehandler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] diff --git a/crates/libs/windows/src/Windows/Phone/Notification/Management/mod.rs b/crates/libs/windows/src/Windows/Phone/Notification/Management/mod.rs index 4528460609..f0ea4ae541 100644 --- a/crates/libs/windows/src/Windows/Phone/Notification/Management/mod.rs +++ b/crates/libs/windows/src/Windows/Phone/Notification/Management/mod.rs @@ -975,11 +975,8 @@ impl AccessoryManager { { Self::IAccessoryManager2(|this| unsafe { (::windows::core::Vtable::vtable(this).EnableEmailNotificationFolderFilter)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(emailaccount), folders.try_into().map_err(|e| e.into())?.abi()).ok() }) } - pub fn UpdateEmailReadStatus<'a, P0>(messageentryid: P0, isread: bool) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, BinaryId>>, - { - Self::IAccessoryManager2(|this| unsafe { (::windows::core::Vtable::vtable(this).UpdateEmailReadStatus)(::windows::core::Vtable::as_raw(this), messageentryid.into().abi(), isread).ok() }) + pub fn UpdateEmailReadStatus(messageentryid: &BinaryId, isread: bool) -> ::windows::core::Result<()> { + Self::IAccessoryManager2(|this| unsafe { (::windows::core::Vtable::vtable(this).UpdateEmailReadStatus)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(messageentryid), isread).ok() }) } pub fn SnoozeAlarmByInstanceId(instanceid: &::windows::core::HSTRING) -> ::windows::core::Result<()> { Self::IAccessoryManager3(|this| unsafe { (::windows::core::Vtable::vtable(this).SnoozeAlarmByInstanceId)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(instanceid)).ok() }) diff --git a/crates/libs/windows/src/Windows/Phone/PersonalInformation/Provisioning/mod.rs b/crates/libs/windows/src/Windows/Phone/PersonalInformation/Provisioning/mod.rs index f1f55f61a6..e3c5dd29fa 100644 --- a/crates/libs/windows/src/Windows/Phone/PersonalInformation/Provisioning/mod.rs +++ b/crates/libs/windows/src/Windows/Phone/PersonalInformation/Provisioning/mod.rs @@ -65,13 +65,10 @@ pub struct ContactPartnerProvisioningManager; impl ContactPartnerProvisioningManager { #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn AssociateNetworkAccountAsync<'a, P0>(store: P0, networkname: &::windows::core::HSTRING, networkaccountid: &::windows::core::HSTRING) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::ContactStore>>, - { + pub fn AssociateNetworkAccountAsync(store: &super::ContactStore, networkname: &::windows::core::HSTRING, networkaccountid: &::windows::core::HSTRING) -> ::windows::core::Result { Self::IContactPartnerProvisioningManagerStatics(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).AssociateNetworkAccountAsync)(::windows::core::Vtable::as_raw(this), store.into().abi(), ::core::mem::transmute_copy(networkname), ::core::mem::transmute_copy(networkaccountid), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).AssociateNetworkAccountAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(store), ::core::mem::transmute_copy(networkname), ::core::mem::transmute_copy(networkaccountid), result__.as_mut_ptr()).from_abi::(result__) }) } #[doc = "*Required features: `\"Foundation\"`, `\"Storage_Streams\"`*"] @@ -88,13 +85,10 @@ impl ContactPartnerProvisioningManager { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn AssociateSocialNetworkAccountAsync<'a, P0>(store: P0, networkname: &::windows::core::HSTRING, networkaccountid: &::windows::core::HSTRING) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::ContactStore>>, - { + pub fn AssociateSocialNetworkAccountAsync(store: &super::ContactStore, networkname: &::windows::core::HSTRING, networkaccountid: &::windows::core::HSTRING) -> ::windows::core::Result { Self::IContactPartnerProvisioningManagerStatics2(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).AssociateSocialNetworkAccountAsync)(::windows::core::Vtable::as_raw(this), store.into().abi(), ::core::mem::transmute_copy(networkname), ::core::mem::transmute_copy(networkaccountid), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).AssociateSocialNetworkAccountAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(store), ::core::mem::transmute_copy(networkname), ::core::mem::transmute_copy(networkaccountid), result__.as_mut_ptr()).from_abi::(result__) }) } #[doc(hidden)] diff --git a/crates/libs/windows/src/Windows/Phone/PersonalInformation/mod.rs b/crates/libs/windows/src/Windows/Phone/PersonalInformation/mod.rs index 2e3b01648a..021583d02e 100644 --- a/crates/libs/windows/src/Windows/Phone/PersonalInformation/mod.rs +++ b/crates/libs/windows/src/Windows/Phone/PersonalInformation/mod.rs @@ -1285,14 +1285,11 @@ impl ContactStore { (::windows::core::Vtable::vtable(this).CreateContactQueryDefault)(::windows::core::Vtable::as_raw(this), result__.as_mut_ptr()).from_abi::(result__) } } - pub fn CreateContactQueryWithOptions<'a, P0>(&self, options: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, ContactQueryOptions>>, - { + pub fn CreateContactQueryWithOptions(&self, options: &ContactQueryOptions) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).CreateContactQueryWithOptions)(::windows::core::Vtable::as_raw(this), options.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).CreateContactQueryWithOptions)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(options), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -1843,23 +1840,16 @@ impl StoredContact { (::windows::core::Vtable::vtable(this).ReplaceExistingContactAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(id), result__.as_mut_ptr()).from_abi::(result__) } } - pub fn CreateStoredContact<'a, P0>(store: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, ContactStore>>, - { + pub fn CreateStoredContact(store: &ContactStore) -> ::windows::core::Result { Self::IStoredContactFactory(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).CreateStoredContact)(::windows::core::Vtable::as_raw(this), store.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).CreateStoredContact)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(store), result__.as_mut_ptr()).from_abi::(result__) }) } - pub fn CreateStoredContactFromInformation<'a, P0, P1>(store: P0, contact: P1) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, ContactStore>>, - P1: ::std::convert::Into<::windows::core::InParam<'a, ContactInformation>>, - { + pub fn CreateStoredContactFromInformation(store: &ContactStore, contact: &ContactInformation) -> ::windows::core::Result { Self::IStoredContactFactory(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).CreateStoredContactFromInformation)(::windows::core::Vtable::as_raw(this), store.into().abi(), contact.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).CreateStoredContactFromInformation)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(store), ::core::mem::transmute_copy(contact), result__.as_mut_ptr()).from_abi::(result__) }) } #[doc(hidden)] diff --git a/crates/libs/windows/src/Windows/Phone/System/Power/mod.rs b/crates/libs/windows/src/Windows/Phone/System/Power/mod.rs index 26075ed909..6f47863ce8 100644 --- a/crates/libs/windows/src/Windows/Phone/System/Power/mod.rs +++ b/crates/libs/windows/src/Windows/Phone/System/Power/mod.rs @@ -47,13 +47,10 @@ impl PowerManager { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn PowerSavingModeChanged<'a, P0>(changehandler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Foundation::EventHandler<::windows::core::IInspectable>>>, - { + pub fn PowerSavingModeChanged(changehandler: &super::super::super::Foundation::EventHandler<::windows::core::IInspectable>) -> ::windows::core::Result { Self::IPowerManagerStatics(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).PowerSavingModeChanged)(::windows::core::Vtable::as_raw(this), changehandler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).PowerSavingModeChanged)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(changehandler), result__.as_mut_ptr()).from_abi::(result__) }) } #[doc = "*Required features: `\"Foundation\"`*"] diff --git a/crates/libs/windows/src/Windows/Phone/System/UserProfile/GameServices/Core/mod.rs b/crates/libs/windows/src/Windows/Phone/System/UserProfile/GameServices/Core/mod.rs index 0ead8b160e..5c3fd54ced 100644 --- a/crates/libs/windows/src/Windows/Phone/System/UserProfile/GameServices/Core/mod.rs +++ b/crates/libs/windows/src/Windows/Phone/System/UserProfile/GameServices/Core/mod.rs @@ -104,13 +104,10 @@ impl GameService { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn GetPartnerTokenAsync<'a, P0>(audienceuri: P0) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::super::super::Foundation::Uri>>, - { + pub fn GetPartnerTokenAsync(audienceuri: &super::super::super::super::super::Foundation::Uri) -> ::windows::core::Result> { Self::IGameService(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).GetPartnerTokenAsync)(::windows::core::Vtable::as_raw(this), audienceuri.into().abi(), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).GetPartnerTokenAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(audienceuri), result__.as_mut_ptr()).from_abi::>(result__) }) } #[doc = "*Required features: `\"Foundation\"`*"] @@ -138,11 +135,8 @@ impl GameService { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn NotifyPartnerTokenExpired<'a, P0>(audienceuri: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::super::super::Foundation::Uri>>, - { - Self::IGameService2(|this| unsafe { (::windows::core::Vtable::vtable(this).NotifyPartnerTokenExpired)(::windows::core::Vtable::as_raw(this), audienceuri.into().abi()).ok() }) + pub fn NotifyPartnerTokenExpired(audienceuri: &super::super::super::super::super::Foundation::Uri) -> ::windows::core::Result<()> { + Self::IGameService2(|this| unsafe { (::windows::core::Vtable::vtable(this).NotifyPartnerTokenExpired)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(audienceuri)).ok() }) } pub fn GetAuthenticationStatus() -> ::windows::core::Result { Self::IGameService2(|this| unsafe { diff --git a/crates/libs/windows/src/Windows/Phone/UI/Input/mod.rs b/crates/libs/windows/src/Windows/Phone/UI/Input/mod.rs index a9e8535259..f86c3017e8 100644 --- a/crates/libs/windows/src/Windows/Phone/UI/Input/mod.rs +++ b/crates/libs/windows/src/Windows/Phone/UI/Input/mod.rs @@ -241,13 +241,10 @@ pub struct HardwareButtons; impl HardwareButtons { #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn BackPressed<'a, P0>(handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Foundation::EventHandler>>, - { + pub fn BackPressed(handler: &super::super::super::Foundation::EventHandler) -> ::windows::core::Result { Self::IHardwareButtonsStatics(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).BackPressed)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).BackPressed)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) }) } #[doc = "*Required features: `\"Foundation\"`*"] @@ -257,13 +254,10 @@ impl HardwareButtons { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn CameraHalfPressed<'a, P0>(handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Foundation::EventHandler>>, - { + pub fn CameraHalfPressed(handler: &super::super::super::Foundation::EventHandler) -> ::windows::core::Result { Self::IHardwareButtonsStatics2(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).CameraHalfPressed)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).CameraHalfPressed)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) }) } #[doc = "*Required features: `\"Foundation\"`*"] @@ -273,13 +267,10 @@ impl HardwareButtons { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn CameraPressed<'a, P0>(handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Foundation::EventHandler>>, - { + pub fn CameraPressed(handler: &super::super::super::Foundation::EventHandler) -> ::windows::core::Result { Self::IHardwareButtonsStatics2(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).CameraPressed)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).CameraPressed)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) }) } #[doc = "*Required features: `\"Foundation\"`*"] @@ -289,13 +280,10 @@ impl HardwareButtons { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn CameraReleased<'a, P0>(handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Foundation::EventHandler>>, - { + pub fn CameraReleased(handler: &super::super::super::Foundation::EventHandler) -> ::windows::core::Result { Self::IHardwareButtonsStatics2(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).CameraReleased)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).CameraReleased)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) }) } #[doc = "*Required features: `\"Foundation\"`*"] diff --git a/crates/libs/windows/src/Windows/Security/Authentication/Identity/Core/mod.rs b/crates/libs/windows/src/Windows/Security/Authentication/Identity/Core/mod.rs index 18a10d9285..30b5052c26 100644 --- a/crates/libs/windows/src/Windows/Security/Authentication/Identity/Core/mod.rs +++ b/crates/libs/windows/src/Windows/Security/Authentication/Identity/Core/mod.rs @@ -228,14 +228,11 @@ impl MicrosoftAccountMultiFactorAuthenticationManager { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn ApproveSessionUsingAuthSessionInfoAsync<'a, P0>(&self, sessionauthentictionstatus: MicrosoftAccountMultiFactorSessionAuthenticationStatus, authenticationsessioninfo: P0) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, MicrosoftAccountMultiFactorSessionInfo>>, - { + pub fn ApproveSessionUsingAuthSessionInfoAsync(&self, sessionauthentictionstatus: MicrosoftAccountMultiFactorSessionAuthenticationStatus, authenticationsessioninfo: &MicrosoftAccountMultiFactorSessionInfo) -> ::windows::core::Result> { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).ApproveSessionUsingAuthSessionInfoAsync)(::windows::core::Vtable::as_raw(this), sessionauthentictionstatus, authenticationsessioninfo.into().abi(), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).ApproveSessionUsingAuthSessionInfoAsync)(::windows::core::Vtable::as_raw(this), sessionauthentictionstatus, ::core::mem::transmute_copy(authenticationsessioninfo), result__.as_mut_ptr()).from_abi::>(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -249,14 +246,11 @@ impl MicrosoftAccountMultiFactorAuthenticationManager { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn DenySessionUsingAuthSessionInfoAsync<'a, P0>(&self, authenticationsessioninfo: P0) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, MicrosoftAccountMultiFactorSessionInfo>>, - { + pub fn DenySessionUsingAuthSessionInfoAsync(&self, authenticationsessioninfo: &MicrosoftAccountMultiFactorSessionInfo) -> ::windows::core::Result> { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).DenySessionUsingAuthSessionInfoAsync)(::windows::core::Vtable::as_raw(this), authenticationsessioninfo.into().abi(), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).DenySessionUsingAuthSessionInfoAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(authenticationsessioninfo), result__.as_mut_ptr()).from_abi::>(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] diff --git a/crates/libs/windows/src/Windows/Security/Authentication/Identity/Provider/mod.rs b/crates/libs/windows/src/Windows/Security/Authentication/Identity/Provider/mod.rs index b3ace5cfc8..93f9933c19 100644 --- a/crates/libs/windows/src/Windows/Security/Authentication/Identity/Provider/mod.rs +++ b/crates/libs/windows/src/Windows/Security/Authentication/Identity/Provider/mod.rs @@ -428,13 +428,10 @@ impl SecondaryAuthenticationFactorAuthentication { } #[doc = "*Required features: `\"Foundation\"`, `\"deprecated\"`*"] #[cfg(all(feature = "Foundation", feature = "deprecated"))] - pub fn AuthenticationStageChanged<'a, P0>(handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::super::Foundation::EventHandler>>, - { + pub fn AuthenticationStageChanged(handler: &super::super::super::super::Foundation::EventHandler) -> ::windows::core::Result { Self::ISecondaryAuthenticationFactorAuthenticationStatics(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).AuthenticationStageChanged)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).AuthenticationStageChanged)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) }) } #[doc = "*Required features: `\"Foundation\"`, `\"deprecated\"`*"] diff --git a/crates/libs/windows/src/Windows/Security/Authentication/OnlineId/mod.rs b/crates/libs/windows/src/Windows/Security/Authentication/OnlineId/mod.rs index 854f1a2248..a88f8ef9d0 100644 --- a/crates/libs/windows/src/Windows/Security/Authentication/OnlineId/mod.rs +++ b/crates/libs/windows/src/Windows/Security/Authentication/OnlineId/mod.rs @@ -191,14 +191,11 @@ impl OnlineIdAuthenticator { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn AuthenticateUserAsync<'a, P0>(&self, request: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, OnlineIdServiceTicketRequest>>, - { + pub fn AuthenticateUserAsync(&self, request: &OnlineIdServiceTicketRequest) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).AuthenticateUserAsync)(::windows::core::Vtable::as_raw(this), request.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).AuthenticateUserAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(request), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation_Collections\"`*"] @@ -514,13 +511,10 @@ impl OnlineIdSystemAuthenticator { } #[doc = "*Required features: `\"System\"`*"] #[cfg(feature = "System")] - pub fn GetForUser<'a, P0>(user: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::System::User>>, - { + pub fn GetForUser(user: &super::super::super::System::User) -> ::windows::core::Result { Self::IOnlineIdSystemAuthenticatorStatics(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).GetForUser)(::windows::core::Vtable::as_raw(this), user.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).GetForUser)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(user), result__.as_mut_ptr()).from_abi::(result__) }) } #[doc(hidden)] @@ -538,14 +532,11 @@ pub struct OnlineIdSystemAuthenticatorForUser(::windows::core::IUnknown); impl OnlineIdSystemAuthenticatorForUser { #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn GetTicketAsync<'a, P0>(&self, request: P0) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, OnlineIdServiceTicketRequest>>, - { + pub fn GetTicketAsync(&self, request: &OnlineIdServiceTicketRequest) -> ::windows::core::Result> { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).GetTicketAsync)(::windows::core::Vtable::as_raw(this), request.into().abi(), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).GetTicketAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(request), result__.as_mut_ptr()).from_abi::>(result__) } } pub fn SetApplicationId(&self, value: ::windows::core::GUID) -> ::windows::core::Result<()> { @@ -814,12 +805,9 @@ pub struct SignOutUserOperation(::windows::core::IUnknown); impl SignOutUserOperation { #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn SetCompleted<'a, P0>(&self, handler: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Foundation::AsyncActionCompletedHandler>>, - { + pub fn SetCompleted(&self, handler: &super::super::super::Foundation::AsyncActionCompletedHandler) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).SetCompleted)(::windows::core::Vtable::as_raw(this), handler.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetCompleted)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler)).ok() } } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] @@ -1078,12 +1066,9 @@ impl UserAuthenticationOperation { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn SetCompleted<'a, P0>(&self, handler: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Foundation::AsyncOperationCompletedHandler>>, - { + pub fn SetCompleted(&self, handler: &super::super::super::Foundation::AsyncOperationCompletedHandler) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).SetCompleted)(::windows::core::Vtable::as_raw(this), handler.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetCompleted)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler)).ok() } } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] diff --git a/crates/libs/windows/src/Windows/Security/Authentication/Web/Core/mod.rs b/crates/libs/windows/src/Windows/Security/Authentication/Web/Core/mod.rs index e9a871413b..c61fd639fc 100644 --- a/crates/libs/windows/src/Windows/Security/Authentication/Web/Core/mod.rs +++ b/crates/libs/windows/src/Windows/Security/Authentication/Web/Core/mod.rs @@ -579,14 +579,11 @@ pub struct WebAccountMonitor(::windows::core::IUnknown); impl WebAccountMonitor { #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn Updated<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::super::Foundation::TypedEventHandler>>, - { + pub fn Updated(&self, handler: &super::super::super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).Updated)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).Updated)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -597,14 +594,11 @@ impl WebAccountMonitor { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn Removed<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::super::Foundation::TypedEventHandler>>, - { + pub fn Removed(&self, handler: &super::super::super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).Removed)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).Removed)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -615,14 +609,11 @@ impl WebAccountMonitor { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn DefaultSignInAccountChanged<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::super::Foundation::TypedEventHandler>>, - { + pub fn DefaultSignInAccountChanged(&self, handler: &super::super::super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).DefaultSignInAccountChanged)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).DefaultSignInAccountChanged)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -633,14 +624,11 @@ impl WebAccountMonitor { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn AccountPictureUpdated<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::super::Foundation::TypedEventHandler>>, - { + pub fn AccountPictureUpdated(&self, handler: &super::super::super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = &::windows::core::Interface::cast::(self)?; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).AccountPictureUpdated)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).AccountPictureUpdated)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -719,59 +707,42 @@ pub struct WebAuthenticationCoreManager; impl WebAuthenticationCoreManager { #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn GetTokenSilentlyAsync<'a, P0>(request: P0) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, WebTokenRequest>>, - { + pub fn GetTokenSilentlyAsync(request: &WebTokenRequest) -> ::windows::core::Result> { Self::IWebAuthenticationCoreManagerStatics(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).GetTokenSilentlyAsync)(::windows::core::Vtable::as_raw(this), request.into().abi(), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).GetTokenSilentlyAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(request), result__.as_mut_ptr()).from_abi::>(result__) }) } #[doc = "*Required features: `\"Foundation\"`, `\"Security_Credentials\"`*"] #[cfg(all(feature = "Foundation", feature = "Security_Credentials"))] - pub fn GetTokenSilentlyWithWebAccountAsync<'a, P0, P1>(request: P0, webaccount: P1) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, WebTokenRequest>>, - P1: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Credentials::WebAccount>>, - { + pub fn GetTokenSilentlyWithWebAccountAsync(request: &WebTokenRequest, webaccount: &super::super::super::Credentials::WebAccount) -> ::windows::core::Result> { Self::IWebAuthenticationCoreManagerStatics(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).GetTokenSilentlyWithWebAccountAsync)(::windows::core::Vtable::as_raw(this), request.into().abi(), webaccount.into().abi(), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).GetTokenSilentlyWithWebAccountAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(request), ::core::mem::transmute_copy(webaccount), result__.as_mut_ptr()).from_abi::>(result__) }) } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn RequestTokenAsync<'a, P0>(request: P0) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, WebTokenRequest>>, - { + pub fn RequestTokenAsync(request: &WebTokenRequest) -> ::windows::core::Result> { Self::IWebAuthenticationCoreManagerStatics(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).RequestTokenAsync)(::windows::core::Vtable::as_raw(this), request.into().abi(), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).RequestTokenAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(request), result__.as_mut_ptr()).from_abi::>(result__) }) } #[doc = "*Required features: `\"Foundation\"`, `\"Security_Credentials\"`*"] #[cfg(all(feature = "Foundation", feature = "Security_Credentials"))] - pub fn RequestTokenWithWebAccountAsync<'a, P0, P1>(request: P0, webaccount: P1) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, WebTokenRequest>>, - P1: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Credentials::WebAccount>>, - { + pub fn RequestTokenWithWebAccountAsync(request: &WebTokenRequest, webaccount: &super::super::super::Credentials::WebAccount) -> ::windows::core::Result> { Self::IWebAuthenticationCoreManagerStatics(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).RequestTokenWithWebAccountAsync)(::windows::core::Vtable::as_raw(this), request.into().abi(), webaccount.into().abi(), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).RequestTokenWithWebAccountAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(request), ::core::mem::transmute_copy(webaccount), result__.as_mut_ptr()).from_abi::>(result__) }) } #[doc = "*Required features: `\"Foundation\"`, `\"Security_Credentials\"`*"] #[cfg(all(feature = "Foundation", feature = "Security_Credentials"))] - pub fn FindAccountAsync<'a, P0>(provider: P0, webaccountid: &::windows::core::HSTRING) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Credentials::WebAccountProvider>>, - { + pub fn FindAccountAsync(provider: &super::super::super::Credentials::WebAccountProvider, webaccountid: &::windows::core::HSTRING) -> ::windows::core::Result> { Self::IWebAuthenticationCoreManagerStatics(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).FindAccountAsync)(::windows::core::Vtable::as_raw(this), provider.into().abi(), ::core::mem::transmute_copy(webaccountid), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).FindAccountAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(provider), ::core::mem::transmute_copy(webaccountid), result__.as_mut_ptr()).from_abi::>(result__) }) } #[doc = "*Required features: `\"Foundation\"`, `\"Security_Credentials\"`*"] @@ -792,13 +763,10 @@ impl WebAuthenticationCoreManager { } #[doc = "*Required features: `\"Foundation\"`, `\"Security_Credentials\"`, `\"System\"`*"] #[cfg(all(feature = "Foundation", feature = "Security_Credentials", feature = "System"))] - pub fn FindAccountProviderWithAuthorityForUserAsync<'a, P0>(webaccountproviderid: &::windows::core::HSTRING, authority: &::windows::core::HSTRING, user: P0) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::super::System::User>>, - { + pub fn FindAccountProviderWithAuthorityForUserAsync(webaccountproviderid: &::windows::core::HSTRING, authority: &::windows::core::HSTRING, user: &super::super::super::super::System::User) -> ::windows::core::Result> { Self::IWebAuthenticationCoreManagerStatics2(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).FindAccountProviderWithAuthorityForUserAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(webaccountproviderid), ::core::mem::transmute_copy(authority), user.into().abi(), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).FindAccountProviderWithAuthorityForUserAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(webaccountproviderid), ::core::mem::transmute_copy(authority), ::core::mem::transmute_copy(user), result__.as_mut_ptr()).from_abi::>(result__) }) } #[doc = "*Required features: `\"Foundation_Collections\"`, `\"Security_Credentials\"`*"] @@ -815,24 +783,18 @@ impl WebAuthenticationCoreManager { } #[doc = "*Required features: `\"Foundation\"`, `\"Security_Credentials\"`*"] #[cfg(all(feature = "Foundation", feature = "Security_Credentials"))] - pub fn FindAllAccountsAsync<'a, P0>(provider: P0) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Credentials::WebAccountProvider>>, - { + pub fn FindAllAccountsAsync(provider: &super::super::super::Credentials::WebAccountProvider) -> ::windows::core::Result> { Self::IWebAuthenticationCoreManagerStatics4(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).FindAllAccountsAsync)(::windows::core::Vtable::as_raw(this), provider.into().abi(), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).FindAllAccountsAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(provider), result__.as_mut_ptr()).from_abi::>(result__) }) } #[doc = "*Required features: `\"Foundation\"`, `\"Security_Credentials\"`*"] #[cfg(all(feature = "Foundation", feature = "Security_Credentials"))] - pub fn FindAllAccountsWithClientIdAsync<'a, P0>(provider: P0, clientid: &::windows::core::HSTRING) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Credentials::WebAccountProvider>>, - { + pub fn FindAllAccountsWithClientIdAsync(provider: &super::super::super::Credentials::WebAccountProvider, clientid: &::windows::core::HSTRING) -> ::windows::core::Result> { Self::IWebAuthenticationCoreManagerStatics4(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).FindAllAccountsWithClientIdAsync)(::windows::core::Vtable::as_raw(this), provider.into().abi(), ::core::mem::transmute_copy(clientid), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).FindAllAccountsWithClientIdAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(provider), ::core::mem::transmute_copy(clientid), result__.as_mut_ptr()).from_abi::>(result__) }) } #[doc = "*Required features: `\"Foundation\"`, `\"Security_Credentials\"`*"] @@ -853,13 +815,10 @@ impl WebAuthenticationCoreManager { } #[doc = "*Required features: `\"Foundation\"`, `\"Security_Credentials\"`, `\"System\"`*"] #[cfg(all(feature = "Foundation", feature = "Security_Credentials", feature = "System"))] - pub fn FindSystemAccountProviderWithAuthorityForUserAsync<'a, P0>(webaccountproviderid: &::windows::core::HSTRING, authority: &::windows::core::HSTRING, user: P0) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::super::System::User>>, - { + pub fn FindSystemAccountProviderWithAuthorityForUserAsync(webaccountproviderid: &::windows::core::HSTRING, authority: &::windows::core::HSTRING, user: &super::super::super::super::System::User) -> ::windows::core::Result> { Self::IWebAuthenticationCoreManagerStatics4(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).FindSystemAccountProviderWithAuthorityForUserAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(webaccountproviderid), ::core::mem::transmute_copy(authority), user.into().abi(), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).FindSystemAccountProviderWithAuthorityForUserAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(webaccountproviderid), ::core::mem::transmute_copy(authority), ::core::mem::transmute_copy(user), result__.as_mut_ptr()).from_abi::>(result__) }) } #[doc(hidden)] @@ -1054,46 +1013,34 @@ impl WebTokenRequest { } #[doc = "*Required features: `\"Security_Credentials\"`*"] #[cfg(feature = "Security_Credentials")] - pub fn Create<'a, P0>(provider: P0, scope: &::windows::core::HSTRING, clientid: &::windows::core::HSTRING) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Credentials::WebAccountProvider>>, - { + pub fn Create(provider: &super::super::super::Credentials::WebAccountProvider, scope: &::windows::core::HSTRING, clientid: &::windows::core::HSTRING) -> ::windows::core::Result { Self::IWebTokenRequestFactory(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).Create)(::windows::core::Vtable::as_raw(this), provider.into().abi(), ::core::mem::transmute_copy(scope), ::core::mem::transmute_copy(clientid), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).Create)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(provider), ::core::mem::transmute_copy(scope), ::core::mem::transmute_copy(clientid), result__.as_mut_ptr()).from_abi::(result__) }) } #[doc = "*Required features: `\"Security_Credentials\"`*"] #[cfg(feature = "Security_Credentials")] - pub fn CreateWithPromptType<'a, P0>(provider: P0, scope: &::windows::core::HSTRING, clientid: &::windows::core::HSTRING, prompttype: WebTokenRequestPromptType) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Credentials::WebAccountProvider>>, - { + pub fn CreateWithPromptType(provider: &super::super::super::Credentials::WebAccountProvider, scope: &::windows::core::HSTRING, clientid: &::windows::core::HSTRING, prompttype: WebTokenRequestPromptType) -> ::windows::core::Result { Self::IWebTokenRequestFactory(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).CreateWithPromptType)(::windows::core::Vtable::as_raw(this), provider.into().abi(), ::core::mem::transmute_copy(scope), ::core::mem::transmute_copy(clientid), prompttype, result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).CreateWithPromptType)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(provider), ::core::mem::transmute_copy(scope), ::core::mem::transmute_copy(clientid), prompttype, result__.as_mut_ptr()).from_abi::(result__) }) } #[doc = "*Required features: `\"Security_Credentials\"`*"] #[cfg(feature = "Security_Credentials")] - pub fn CreateWithProvider<'a, P0>(provider: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Credentials::WebAccountProvider>>, - { + pub fn CreateWithProvider(provider: &super::super::super::Credentials::WebAccountProvider) -> ::windows::core::Result { Self::IWebTokenRequestFactory(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).CreateWithProvider)(::windows::core::Vtable::as_raw(this), provider.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).CreateWithProvider)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(provider), result__.as_mut_ptr()).from_abi::(result__) }) } #[doc = "*Required features: `\"Security_Credentials\"`*"] #[cfg(feature = "Security_Credentials")] - pub fn CreateWithScope<'a, P0>(provider: P0, scope: &::windows::core::HSTRING) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Credentials::WebAccountProvider>>, - { + pub fn CreateWithScope(provider: &super::super::super::Credentials::WebAccountProvider, scope: &::windows::core::HSTRING) -> ::windows::core::Result { Self::IWebTokenRequestFactory(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).CreateWithScope)(::windows::core::Vtable::as_raw(this), provider.into().abi(), ::core::mem::transmute_copy(scope), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).CreateWithScope)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(provider), ::core::mem::transmute_copy(scope), result__.as_mut_ptr()).from_abi::(result__) }) } #[doc(hidden)] @@ -1318,25 +1265,18 @@ impl WebTokenResponse { } #[doc = "*Required features: `\"Security_Credentials\"`*"] #[cfg(feature = "Security_Credentials")] - pub fn CreateWithTokenAndAccount<'a, P0>(token: &::windows::core::HSTRING, webaccount: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Credentials::WebAccount>>, - { + pub fn CreateWithTokenAndAccount(token: &::windows::core::HSTRING, webaccount: &super::super::super::Credentials::WebAccount) -> ::windows::core::Result { Self::IWebTokenResponseFactory(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).CreateWithTokenAndAccount)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(token), webaccount.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).CreateWithTokenAndAccount)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(token), ::core::mem::transmute_copy(webaccount), result__.as_mut_ptr()).from_abi::(result__) }) } #[doc = "*Required features: `\"Security_Credentials\"`*"] #[cfg(feature = "Security_Credentials")] - pub fn CreateWithTokenAccountAndError<'a, P0, P1>(token: &::windows::core::HSTRING, webaccount: P0, error: P1) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Credentials::WebAccount>>, - P1: ::std::convert::Into<::windows::core::InParam<'a, WebProviderError>>, - { + pub fn CreateWithTokenAccountAndError(token: &::windows::core::HSTRING, webaccount: &super::super::super::Credentials::WebAccount, error: &WebProviderError) -> ::windows::core::Result { Self::IWebTokenResponseFactory(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).CreateWithTokenAccountAndError)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(token), webaccount.into().abi(), error.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).CreateWithTokenAccountAndError)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(token), ::core::mem::transmute_copy(webaccount), ::core::mem::transmute_copy(error), result__.as_mut_ptr()).from_abi::(result__) }) } #[doc(hidden)] diff --git a/crates/libs/windows/src/Windows/Security/Authentication/Web/Provider/mod.rs b/crates/libs/windows/src/Windows/Security/Authentication/Web/Provider/mod.rs index 6960b7eab9..7f4ea64bf4 100644 --- a/crates/libs/windows/src/Windows/Security/Authentication/Web/Provider/mod.rs +++ b/crates/libs/windows/src/Windows/Security/Authentication/Web/Provider/mod.rs @@ -219,12 +219,9 @@ impl IWebAccountProviderBaseReportOperation { } #[doc = "*Required features: `\"Security_Authentication_Web_Core\"`*"] #[cfg(feature = "Security_Authentication_Web_Core")] - pub fn ReportError<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::Core::WebProviderError>>, - { + pub fn ReportError(&self, value: &super::Core::WebProviderError) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).ReportError)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).ReportError)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } } impl ::core::convert::From for ::windows::core::IUnknown { @@ -477,12 +474,9 @@ impl IWebAccountProviderSilentReportOperation { } #[doc = "*Required features: `\"Security_Authentication_Web_Core\"`*"] #[cfg(feature = "Security_Authentication_Web_Core")] - pub fn ReportUserInteractionRequiredWithError<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::Core::WebProviderError>>, - { + pub fn ReportUserInteractionRequiredWithError(&self, value: &super::Core::WebProviderError) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).ReportUserInteractionRequiredWithError)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).ReportUserInteractionRequiredWithError)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } pub fn ReportCompleted(&self) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; @@ -490,12 +484,9 @@ impl IWebAccountProviderSilentReportOperation { } #[doc = "*Required features: `\"Security_Authentication_Web_Core\"`*"] #[cfg(feature = "Security_Authentication_Web_Core")] - pub fn ReportError<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::Core::WebProviderError>>, - { + pub fn ReportError(&self, value: &super::Core::WebProviderError) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).ReportError)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).ReportError)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } } impl ::core::convert::From for ::windows::core::IUnknown { @@ -924,12 +915,9 @@ impl IWebAccountProviderUIReportOperation { } #[doc = "*Required features: `\"Security_Authentication_Web_Core\"`*"] #[cfg(feature = "Security_Authentication_Web_Core")] - pub fn ReportError<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::Core::WebProviderError>>, - { + pub fn ReportError(&self, value: &super::Core::WebProviderError) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).ReportError)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).ReportError)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } } impl ::core::convert::From for ::windows::core::IUnknown { @@ -1176,24 +1164,18 @@ impl WebAccountClientView { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn Create<'a, P0>(viewtype: WebAccountClientViewType, applicationcallbackuri: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::super::Foundation::Uri>>, - { + pub fn Create(viewtype: WebAccountClientViewType, applicationcallbackuri: &super::super::super::super::Foundation::Uri) -> ::windows::core::Result { Self::IWebAccountClientViewFactory(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).Create)(::windows::core::Vtable::as_raw(this), viewtype, applicationcallbackuri.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).Create)(::windows::core::Vtable::as_raw(this), viewtype, ::core::mem::transmute_copy(applicationcallbackuri), result__.as_mut_ptr()).from_abi::(result__) }) } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn CreateWithPairwiseId<'a, P0>(viewtype: WebAccountClientViewType, applicationcallbackuri: P0, accountpairwiseid: &::windows::core::HSTRING) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::super::Foundation::Uri>>, - { + pub fn CreateWithPairwiseId(viewtype: WebAccountClientViewType, applicationcallbackuri: &super::super::super::super::Foundation::Uri, accountpairwiseid: &::windows::core::HSTRING) -> ::windows::core::Result { Self::IWebAccountClientViewFactory(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).CreateWithPairwiseId)(::windows::core::Vtable::as_raw(this), viewtype, applicationcallbackuri.into().abi(), ::core::mem::transmute_copy(accountpairwiseid), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).CreateWithPairwiseId)(::windows::core::Vtable::as_raw(this), viewtype, ::core::mem::transmute_copy(applicationcallbackuri), ::core::mem::transmute_copy(accountpairwiseid), result__.as_mut_ptr()).from_abi::(result__) }) } #[doc(hidden)] @@ -1271,15 +1253,14 @@ pub struct WebAccountManager; impl WebAccountManager { #[doc = "*Required features: `\"Foundation_Collections\"`, `\"Security_Credentials\"`*"] #[cfg(all(feature = "Foundation_Collections", feature = "Security_Credentials"))] - pub fn UpdateWebAccountPropertiesAsync<'a, P0, P1, E1>(webaccount: P0, webaccountusername: &::windows::core::HSTRING, additionalproperties: P1) -> ::windows::core::Result + pub fn UpdateWebAccountPropertiesAsync<'a, P0, E0>(webaccount: &super::super::super::Credentials::WebAccount, webaccountusername: &::windows::core::HSTRING, additionalproperties: P0) -> ::windows::core::Result where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Credentials::WebAccount>>, - P1: ::std::convert::TryInto<::windows::core::InParam<'a, super::super::super::super::Foundation::Collections::IMapView<::windows::core::HSTRING, ::windows::core::HSTRING>>, Error = E1>, - E1: ::std::convert::Into<::windows::core::Error>, + P0: ::std::convert::TryInto<::windows::core::InParam<'a, super::super::super::super::Foundation::Collections::IMapView<::windows::core::HSTRING, ::windows::core::HSTRING>>, Error = E0>, + E0: ::std::convert::Into<::windows::core::Error>, { Self::IWebAccountManagerStatics(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).UpdateWebAccountPropertiesAsync)(::windows::core::Vtable::as_raw(this), webaccount.into().abi(), ::core::mem::transmute_copy(webaccountusername), additionalproperties.try_into().map_err(|e| e.into())?.abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).UpdateWebAccountPropertiesAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(webaccount), ::core::mem::transmute_copy(webaccountusername), additionalproperties.try_into().map_err(|e| e.into())?.abi(), result__.as_mut_ptr()).from_abi::(result__) }) } #[doc = "*Required features: `\"Foundation_Collections\"`, `\"Security_Credentials\"`*"] @@ -1296,13 +1277,10 @@ impl WebAccountManager { } #[doc = "*Required features: `\"Foundation\"`, `\"Security_Credentials\"`*"] #[cfg(all(feature = "Foundation", feature = "Security_Credentials"))] - pub fn DeleteWebAccountAsync<'a, P0>(webaccount: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Credentials::WebAccount>>, - { + pub fn DeleteWebAccountAsync(webaccount: &super::super::super::Credentials::WebAccount) -> ::windows::core::Result { Self::IWebAccountManagerStatics(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).DeleteWebAccountAsync)(::windows::core::Vtable::as_raw(this), webaccount.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).DeleteWebAccountAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(webaccount), result__.as_mut_ptr()).from_abi::(result__) }) } #[doc = "*Required features: `\"Foundation_Collections\"`, `\"Security_Credentials\"`*"] @@ -1315,74 +1293,58 @@ impl WebAccountManager { } #[doc = "*Required features: `\"Foundation_Collections\"`, `\"Web_Http\"`*"] #[cfg(all(feature = "Foundation_Collections", feature = "Web_Http"))] - pub fn PushCookiesAsync<'a, P0, P1, E1>(uri: P0, cookies: P1) -> ::windows::core::Result + pub fn PushCookiesAsync<'a, P0, E0>(uri: &super::super::super::super::Foundation::Uri, cookies: P0) -> ::windows::core::Result where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::super::Foundation::Uri>>, - P1: ::std::convert::TryInto<::windows::core::InParam<'a, super::super::super::super::Foundation::Collections::IVectorView>, Error = E1>, - E1: ::std::convert::Into<::windows::core::Error>, + P0: ::std::convert::TryInto<::windows::core::InParam<'a, super::super::super::super::Foundation::Collections::IVectorView>, Error = E0>, + E0: ::std::convert::Into<::windows::core::Error>, { Self::IWebAccountManagerStatics(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).PushCookiesAsync)(::windows::core::Vtable::as_raw(this), uri.into().abi(), cookies.try_into().map_err(|e| e.into())?.abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).PushCookiesAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(uri), cookies.try_into().map_err(|e| e.into())?.abi(), result__.as_mut_ptr()).from_abi::(result__) }) } #[doc = "*Required features: `\"Foundation\"`, `\"Security_Credentials\"`*"] #[cfg(all(feature = "Foundation", feature = "Security_Credentials"))] - pub fn SetViewAsync<'a, P0, P1>(webaccount: P0, view: P1) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Credentials::WebAccount>>, - P1: ::std::convert::Into<::windows::core::InParam<'a, WebAccountClientView>>, - { + pub fn SetViewAsync(webaccount: &super::super::super::Credentials::WebAccount, view: &WebAccountClientView) -> ::windows::core::Result { Self::IWebAccountManagerStatics(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).SetViewAsync)(::windows::core::Vtable::as_raw(this), webaccount.into().abi(), view.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).SetViewAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(webaccount), ::core::mem::transmute_copy(view), result__.as_mut_ptr()).from_abi::(result__) }) } #[doc = "*Required features: `\"Foundation\"`, `\"Security_Credentials\"`*"] #[cfg(all(feature = "Foundation", feature = "Security_Credentials"))] - pub fn ClearViewAsync<'a, P0, P1>(webaccount: P0, applicationcallbackuri: P1) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Credentials::WebAccount>>, - P1: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::super::Foundation::Uri>>, - { + pub fn ClearViewAsync(webaccount: &super::super::super::Credentials::WebAccount, applicationcallbackuri: &super::super::super::super::Foundation::Uri) -> ::windows::core::Result { Self::IWebAccountManagerStatics(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).ClearViewAsync)(::windows::core::Vtable::as_raw(this), webaccount.into().abi(), applicationcallbackuri.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).ClearViewAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(webaccount), ::core::mem::transmute_copy(applicationcallbackuri), result__.as_mut_ptr()).from_abi::(result__) }) } #[doc = "*Required features: `\"Foundation_Collections\"`, `\"Security_Credentials\"`*"] #[cfg(all(feature = "Foundation_Collections", feature = "Security_Credentials"))] - pub fn GetViewsAsync<'a, P0>(webaccount: P0) -> ::windows::core::Result>> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Credentials::WebAccount>>, - { + pub fn GetViewsAsync(webaccount: &super::super::super::Credentials::WebAccount) -> ::windows::core::Result>> { Self::IWebAccountManagerStatics(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).GetViewsAsync)(::windows::core::Vtable::as_raw(this), webaccount.into().abi(), result__.as_mut_ptr()).from_abi::>>(result__) + (::windows::core::Vtable::vtable(this).GetViewsAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(webaccount), result__.as_mut_ptr()).from_abi::>>(result__) }) } #[doc = "*Required features: `\"Foundation\"`, `\"Security_Credentials\"`, `\"Storage_Streams\"`*"] #[cfg(all(feature = "Foundation", feature = "Security_Credentials", feature = "Storage_Streams"))] - pub fn SetWebAccountPictureAsync<'a, P0, P1, E1>(webaccount: P0, webaccountpicture: P1) -> ::windows::core::Result + pub fn SetWebAccountPictureAsync<'a, P0, E0>(webaccount: &super::super::super::Credentials::WebAccount, webaccountpicture: P0) -> ::windows::core::Result where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Credentials::WebAccount>>, - P1: ::std::convert::TryInto<::windows::core::InParam<'a, super::super::super::super::Storage::Streams::IRandomAccessStream>, Error = E1>, - E1: ::std::convert::Into<::windows::core::Error>, + P0: ::std::convert::TryInto<::windows::core::InParam<'a, super::super::super::super::Storage::Streams::IRandomAccessStream>, Error = E0>, + E0: ::std::convert::Into<::windows::core::Error>, { Self::IWebAccountManagerStatics(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).SetWebAccountPictureAsync)(::windows::core::Vtable::as_raw(this), webaccount.into().abi(), webaccountpicture.try_into().map_err(|e| e.into())?.abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).SetWebAccountPictureAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(webaccount), webaccountpicture.try_into().map_err(|e| e.into())?.abi(), result__.as_mut_ptr()).from_abi::(result__) }) } #[doc = "*Required features: `\"Foundation\"`, `\"Security_Credentials\"`*"] #[cfg(all(feature = "Foundation", feature = "Security_Credentials"))] - pub fn ClearWebAccountPictureAsync<'a, P0>(webaccount: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Credentials::WebAccount>>, - { + pub fn ClearWebAccountPictureAsync(webaccount: &super::super::super::Credentials::WebAccount) -> ::windows::core::Result { Self::IWebAccountManagerStatics(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).ClearWebAccountPictureAsync)(::windows::core::Vtable::as_raw(this), webaccount.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).ClearWebAccountPictureAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(webaccount), result__.as_mut_ptr()).from_abi::(result__) }) } #[doc = "*Required features: `\"Foundation\"`*"] @@ -1395,52 +1357,46 @@ impl WebAccountManager { } #[doc = "*Required features: `\"Foundation_Collections\"`, `\"Security_Credentials\"`, `\"System\"`*"] #[cfg(all(feature = "Foundation_Collections", feature = "Security_Credentials", feature = "System"))] - pub fn FindAllProviderWebAccountsForUserAsync<'a, P0>(user: P0) -> ::windows::core::Result>> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::super::System::User>>, - { + pub fn FindAllProviderWebAccountsForUserAsync(user: &super::super::super::super::System::User) -> ::windows::core::Result>> { Self::IWebAccountManagerStatics3(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).FindAllProviderWebAccountsForUserAsync)(::windows::core::Vtable::as_raw(this), user.into().abi(), result__.as_mut_ptr()).from_abi::>>(result__) + (::windows::core::Vtable::vtable(this).FindAllProviderWebAccountsForUserAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(user), result__.as_mut_ptr()).from_abi::>>(result__) }) } #[doc = "*Required features: `\"Foundation_Collections\"`, `\"Security_Credentials\"`, `\"System\"`*"] #[cfg(all(feature = "Foundation_Collections", feature = "Security_Credentials", feature = "System"))] - pub fn AddWebAccountForUserAsync<'a, P0, P1, E1>(user: P0, webaccountid: &::windows::core::HSTRING, webaccountusername: &::windows::core::HSTRING, props: P1) -> ::windows::core::Result> + pub fn AddWebAccountForUserAsync<'a, P0, E0>(user: &super::super::super::super::System::User, webaccountid: &::windows::core::HSTRING, webaccountusername: &::windows::core::HSTRING, props: P0) -> ::windows::core::Result> where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::super::System::User>>, - P1: ::std::convert::TryInto<::windows::core::InParam<'a, super::super::super::super::Foundation::Collections::IMapView<::windows::core::HSTRING, ::windows::core::HSTRING>>, Error = E1>, - E1: ::std::convert::Into<::windows::core::Error>, + P0: ::std::convert::TryInto<::windows::core::InParam<'a, super::super::super::super::Foundation::Collections::IMapView<::windows::core::HSTRING, ::windows::core::HSTRING>>, Error = E0>, + E0: ::std::convert::Into<::windows::core::Error>, { Self::IWebAccountManagerStatics3(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).AddWebAccountForUserAsync)(::windows::core::Vtable::as_raw(this), user.into().abi(), ::core::mem::transmute_copy(webaccountid), ::core::mem::transmute_copy(webaccountusername), props.try_into().map_err(|e| e.into())?.abi(), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).AddWebAccountForUserAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(user), ::core::mem::transmute_copy(webaccountid), ::core::mem::transmute_copy(webaccountusername), props.try_into().map_err(|e| e.into())?.abi(), result__.as_mut_ptr()).from_abi::>(result__) }) } #[doc = "*Required features: `\"Foundation_Collections\"`, `\"Security_Credentials\"`, `\"System\"`*"] #[cfg(all(feature = "Foundation_Collections", feature = "Security_Credentials", feature = "System"))] - pub fn AddWebAccountWithScopeForUserAsync<'a, P0, P1, E1>(user: P0, webaccountid: &::windows::core::HSTRING, webaccountusername: &::windows::core::HSTRING, props: P1, scope: WebAccountScope) -> ::windows::core::Result> + pub fn AddWebAccountWithScopeForUserAsync<'a, P0, E0>(user: &super::super::super::super::System::User, webaccountid: &::windows::core::HSTRING, webaccountusername: &::windows::core::HSTRING, props: P0, scope: WebAccountScope) -> ::windows::core::Result> where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::super::System::User>>, - P1: ::std::convert::TryInto<::windows::core::InParam<'a, super::super::super::super::Foundation::Collections::IMapView<::windows::core::HSTRING, ::windows::core::HSTRING>>, Error = E1>, - E1: ::std::convert::Into<::windows::core::Error>, + P0: ::std::convert::TryInto<::windows::core::InParam<'a, super::super::super::super::Foundation::Collections::IMapView<::windows::core::HSTRING, ::windows::core::HSTRING>>, Error = E0>, + E0: ::std::convert::Into<::windows::core::Error>, { Self::IWebAccountManagerStatics3(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).AddWebAccountWithScopeForUserAsync)(::windows::core::Vtable::as_raw(this), user.into().abi(), ::core::mem::transmute_copy(webaccountid), ::core::mem::transmute_copy(webaccountusername), props.try_into().map_err(|e| e.into())?.abi(), scope, result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).AddWebAccountWithScopeForUserAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(user), ::core::mem::transmute_copy(webaccountid), ::core::mem::transmute_copy(webaccountusername), props.try_into().map_err(|e| e.into())?.abi(), scope, result__.as_mut_ptr()).from_abi::>(result__) }) } #[doc = "*Required features: `\"Foundation_Collections\"`, `\"Security_Credentials\"`, `\"System\"`*"] #[cfg(all(feature = "Foundation_Collections", feature = "Security_Credentials", feature = "System"))] - pub fn AddWebAccountWithScopeAndMapForUserAsync<'a, P0, P1, E1>(user: P0, webaccountid: &::windows::core::HSTRING, webaccountusername: &::windows::core::HSTRING, props: P1, scope: WebAccountScope, peruserwebaccountid: &::windows::core::HSTRING) -> ::windows::core::Result> + pub fn AddWebAccountWithScopeAndMapForUserAsync<'a, P0, E0>(user: &super::super::super::super::System::User, webaccountid: &::windows::core::HSTRING, webaccountusername: &::windows::core::HSTRING, props: P0, scope: WebAccountScope, peruserwebaccountid: &::windows::core::HSTRING) -> ::windows::core::Result> where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::super::System::User>>, - P1: ::std::convert::TryInto<::windows::core::InParam<'a, super::super::super::super::Foundation::Collections::IMapView<::windows::core::HSTRING, ::windows::core::HSTRING>>, Error = E1>, - E1: ::std::convert::Into<::windows::core::Error>, + P0: ::std::convert::TryInto<::windows::core::InParam<'a, super::super::super::super::Foundation::Collections::IMapView<::windows::core::HSTRING, ::windows::core::HSTRING>>, Error = E0>, + E0: ::std::convert::Into<::windows::core::Error>, { Self::IWebAccountManagerStatics3(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).AddWebAccountWithScopeAndMapForUserAsync)(::windows::core::Vtable::as_raw(this), user.into().abi(), ::core::mem::transmute_copy(webaccountid), ::core::mem::transmute_copy(webaccountusername), props.try_into().map_err(|e| e.into())?.abi(), scope, ::core::mem::transmute_copy(peruserwebaccountid), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).AddWebAccountWithScopeAndMapForUserAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(user), ::core::mem::transmute_copy(webaccountid), ::core::mem::transmute_copy(webaccountusername), props.try_into().map_err(|e| e.into())?.abi(), scope, ::core::mem::transmute_copy(peruserwebaccountid), result__.as_mut_ptr()).from_abi::>(result__) }) } #[doc = "*Required features: `\"Foundation\"`*"] @@ -1453,13 +1409,10 @@ impl WebAccountManager { } #[doc = "*Required features: `\"Foundation\"`, `\"Security_Credentials\"`*"] #[cfg(all(feature = "Foundation", feature = "Security_Credentials"))] - pub fn InvalidateAppCacheForAccountAsync<'a, P0>(webaccount: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Credentials::WebAccount>>, - { + pub fn InvalidateAppCacheForAccountAsync(webaccount: &super::super::super::Credentials::WebAccount) -> ::windows::core::Result { Self::IWebAccountManagerStatics4(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).InvalidateAppCacheForAccountAsync)(::windows::core::Vtable::as_raw(this), webaccount.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).InvalidateAppCacheForAccountAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(webaccount), result__.as_mut_ptr()).from_abi::(result__) }) } #[doc = "*Required features: `\"Foundation_Collections\"`, `\"Security_Credentials\"`*"] @@ -1476,35 +1429,26 @@ impl WebAccountManager { } #[doc = "*Required features: `\"Foundation\"`, `\"Security_Credentials\"`*"] #[cfg(all(feature = "Foundation", feature = "Security_Credentials"))] - pub fn SetPerAppToPerUserAccountAsync<'a, P0>(perappaccount: P0, peruserwebaccountid: &::windows::core::HSTRING) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Credentials::WebAccount>>, - { + pub fn SetPerAppToPerUserAccountAsync(perappaccount: &super::super::super::Credentials::WebAccount, peruserwebaccountid: &::windows::core::HSTRING) -> ::windows::core::Result { Self::IWebAccountMapManagerStatics(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).SetPerAppToPerUserAccountAsync)(::windows::core::Vtable::as_raw(this), perappaccount.into().abi(), ::core::mem::transmute_copy(peruserwebaccountid), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).SetPerAppToPerUserAccountAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(perappaccount), ::core::mem::transmute_copy(peruserwebaccountid), result__.as_mut_ptr()).from_abi::(result__) }) } #[doc = "*Required features: `\"Foundation\"`, `\"Security_Credentials\"`*"] #[cfg(all(feature = "Foundation", feature = "Security_Credentials"))] - pub fn GetPerUserFromPerAppAccountAsync<'a, P0>(perappaccount: P0) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Credentials::WebAccount>>, - { + pub fn GetPerUserFromPerAppAccountAsync(perappaccount: &super::super::super::Credentials::WebAccount) -> ::windows::core::Result> { Self::IWebAccountMapManagerStatics(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).GetPerUserFromPerAppAccountAsync)(::windows::core::Vtable::as_raw(this), perappaccount.into().abi(), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).GetPerUserFromPerAppAccountAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(perappaccount), result__.as_mut_ptr()).from_abi::>(result__) }) } #[doc = "*Required features: `\"Foundation\"`, `\"Security_Credentials\"`*"] #[cfg(all(feature = "Foundation", feature = "Security_Credentials"))] - pub fn ClearPerUserFromPerAppAccountAsync<'a, P0>(perappaccount: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Credentials::WebAccount>>, - { + pub fn ClearPerUserFromPerAppAccountAsync(perappaccount: &super::super::super::Credentials::WebAccount) -> ::windows::core::Result { Self::IWebAccountMapManagerStatics(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).ClearPerUserFromPerAppAccountAsync)(::windows::core::Vtable::as_raw(this), perappaccount.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).ClearPerUserFromPerAppAccountAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(perappaccount), result__.as_mut_ptr()).from_abi::(result__) }) } #[doc = "*Required features: `\"Foundation_Collections\"`, `\"Security_Credentials\"`*"] @@ -1521,24 +1465,18 @@ impl WebAccountManager { } #[doc = "*Required features: `\"Foundation\"`, `\"Security_Credentials\"`*"] #[cfg(all(feature = "Foundation", feature = "Security_Credentials"))] - pub fn SetScopeAsync<'a, P0>(webaccount: P0, scope: WebAccountScope) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Credentials::WebAccount>>, - { + pub fn SetScopeAsync(webaccount: &super::super::super::Credentials::WebAccount, scope: WebAccountScope) -> ::windows::core::Result { Self::IWebAccountScopeManagerStatics(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).SetScopeAsync)(::windows::core::Vtable::as_raw(this), webaccount.into().abi(), scope, result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).SetScopeAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(webaccount), scope, result__.as_mut_ptr()).from_abi::(result__) }) } #[doc = "*Required features: `\"Security_Credentials\"`*"] #[cfg(feature = "Security_Credentials")] - pub fn GetScope<'a, P0>(webaccount: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Credentials::WebAccount>>, - { + pub fn GetScope(webaccount: &super::super::super::Credentials::WebAccount) -> ::windows::core::Result { Self::IWebAccountScopeManagerStatics(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).GetScope)(::windows::core::Vtable::as_raw(this), webaccount.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).GetScope)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(webaccount), result__.as_mut_ptr()).from_abi::(result__) }) } #[doc(hidden)] @@ -1684,12 +1622,9 @@ impl WebAccountProviderDeleteAccountOperation { } #[doc = "*Required features: `\"Security_Authentication_Web_Core\"`*"] #[cfg(feature = "Security_Authentication_Web_Core")] - pub fn ReportError<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::Core::WebProviderError>>, - { + pub fn ReportError(&self, value: &super::Core::WebProviderError) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).ReportError)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).ReportError)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } #[doc = "*Required features: `\"Security_Credentials\"`*"] #[cfg(feature = "Security_Credentials")] @@ -1820,12 +1755,9 @@ impl WebAccountProviderGetTokenSilentOperation { } #[doc = "*Required features: `\"Security_Authentication_Web_Core\"`*"] #[cfg(feature = "Security_Authentication_Web_Core")] - pub fn ReportError<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::Core::WebProviderError>>, - { + pub fn ReportError(&self, value: &super::Core::WebProviderError) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).ReportError)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).ReportError)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } pub fn Kind(&self) -> ::windows::core::Result { let this = &::windows::core::Interface::cast::(self)?; @@ -1840,12 +1772,9 @@ impl WebAccountProviderGetTokenSilentOperation { } #[doc = "*Required features: `\"Security_Authentication_Web_Core\"`*"] #[cfg(feature = "Security_Authentication_Web_Core")] - pub fn ReportUserInteractionRequiredWithError<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::Core::WebProviderError>>, - { + pub fn ReportUserInteractionRequiredWithError(&self, value: &super::Core::WebProviderError) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).ReportUserInteractionRequiredWithError)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).ReportUserInteractionRequiredWithError)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } pub fn ProviderRequest(&self) -> ::windows::core::Result { let this = self; @@ -2137,12 +2066,9 @@ impl WebAccountProviderRequestTokenOperation { } #[doc = "*Required features: `\"Security_Authentication_Web_Core\"`*"] #[cfg(feature = "Security_Authentication_Web_Core")] - pub fn ReportError<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::Core::WebProviderError>>, - { + pub fn ReportError(&self, value: &super::Core::WebProviderError) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).ReportError)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).ReportError)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } pub fn Kind(&self) -> ::windows::core::Result { let this = &::windows::core::Interface::cast::(self)?; @@ -2337,12 +2263,9 @@ impl WebAccountProviderRetrieveCookiesOperation { } #[doc = "*Required features: `\"Security_Authentication_Web_Core\"`*"] #[cfg(feature = "Security_Authentication_Web_Core")] - pub fn ReportError<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::Core::WebProviderError>>, - { + pub fn ReportError(&self, value: &super::Core::WebProviderError) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).ReportError)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).ReportError)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } pub fn Kind(&self) -> ::windows::core::Result { let this = &::windows::core::Interface::cast::(self)?; @@ -2371,12 +2294,9 @@ impl WebAccountProviderRetrieveCookiesOperation { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn SetUri<'a, P0>(&self, uri: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::super::Foundation::Uri>>, - { + pub fn SetUri(&self, uri: &super::super::super::super::Foundation::Uri) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).SetUri)(::windows::core::Vtable::as_raw(this), uri.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetUri)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(uri)).ok() } } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] @@ -2509,12 +2429,9 @@ impl WebAccountProviderSignOutAccountOperation { } #[doc = "*Required features: `\"Security_Authentication_Web_Core\"`*"] #[cfg(feature = "Security_Authentication_Web_Core")] - pub fn ReportError<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::Core::WebProviderError>>, - { + pub fn ReportError(&self, value: &super::Core::WebProviderError) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).ReportError)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).ReportError)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } pub fn Kind(&self) -> ::windows::core::Result { let this = &::windows::core::Interface::cast::(self)?; @@ -2814,26 +2731,20 @@ impl WebProviderTokenRequest { } #[doc = "*Required features: `\"Foundation\"`, `\"Security_Cryptography_Core\"`*"] #[cfg(all(feature = "Foundation", feature = "Security_Cryptography_Core"))] - pub fn GetApplicationTokenBindingKeyAsync<'a, P0>(&self, keytype: super::TokenBindingKeyType, target: P0) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::super::Foundation::Uri>>, - { + pub fn GetApplicationTokenBindingKeyAsync(&self, keytype: super::TokenBindingKeyType, target: &super::super::super::super::Foundation::Uri) -> ::windows::core::Result> { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).GetApplicationTokenBindingKeyAsync)(::windows::core::Vtable::as_raw(this), keytype, target.into().abi(), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).GetApplicationTokenBindingKeyAsync)(::windows::core::Vtable::as_raw(this), keytype, ::core::mem::transmute_copy(target), result__.as_mut_ptr()).from_abi::>(result__) } } #[doc = "*Required features: `\"Foundation\"`, `\"Storage_Streams\"`*"] #[cfg(all(feature = "Foundation", feature = "Storage_Streams"))] - pub fn GetApplicationTokenBindingKeyIdAsync<'a, P0>(&self, keytype: super::TokenBindingKeyType, target: P0) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::super::Foundation::Uri>>, - { + pub fn GetApplicationTokenBindingKeyIdAsync(&self, keytype: super::TokenBindingKeyType, target: &super::super::super::super::Foundation::Uri) -> ::windows::core::Result> { let this = &::windows::core::Interface::cast::(self)?; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).GetApplicationTokenBindingKeyIdAsync)(::windows::core::Vtable::as_raw(this), keytype, target.into().abi(), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).GetApplicationTokenBindingKeyIdAsync)(::windows::core::Vtable::as_raw(this), keytype, ::core::mem::transmute_copy(target), result__.as_mut_ptr()).from_abi::>(result__) } } pub fn ApplicationPackageFamilyName(&self) -> ::windows::core::Result<::windows::core::HSTRING> { @@ -2939,13 +2850,10 @@ impl WebProviderTokenResponse { } #[doc = "*Required features: `\"Security_Authentication_Web_Core\"`*"] #[cfg(feature = "Security_Authentication_Web_Core")] - pub fn Create<'a, P0>(webtokenresponse: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::Core::WebTokenResponse>>, - { + pub fn Create(webtokenresponse: &super::Core::WebTokenResponse) -> ::windows::core::Result { Self::IWebProviderTokenResponseFactory(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).Create)(::windows::core::Vtable::as_raw(this), webtokenresponse.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).Create)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(webtokenresponse), result__.as_mut_ptr()).from_abi::(result__) }) } #[doc(hidden)] diff --git a/crates/libs/windows/src/Windows/Security/Authentication/Web/mod.rs b/crates/libs/windows/src/Windows/Security/Authentication/Web/mod.rs index 496646bdf7..b1f8abaaae 100644 --- a/crates/libs/windows/src/Windows/Security/Authentication/Web/mod.rs +++ b/crates/libs/windows/src/Windows/Security/Authentication/Web/mod.rs @@ -84,25 +84,18 @@ pub struct WebAuthenticationBroker; impl WebAuthenticationBroker { #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn AuthenticateWithCallbackUriAsync<'a, P0, P1>(options: WebAuthenticationOptions, requesturi: P0, callbackuri: P1) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Foundation::Uri>>, - P1: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Foundation::Uri>>, - { + pub fn AuthenticateWithCallbackUriAsync(options: WebAuthenticationOptions, requesturi: &super::super::super::Foundation::Uri, callbackuri: &super::super::super::Foundation::Uri) -> ::windows::core::Result> { Self::IWebAuthenticationBrokerStatics(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).AuthenticateWithCallbackUriAsync)(::windows::core::Vtable::as_raw(this), options, requesturi.into().abi(), callbackuri.into().abi(), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).AuthenticateWithCallbackUriAsync)(::windows::core::Vtable::as_raw(this), options, ::core::mem::transmute_copy(requesturi), ::core::mem::transmute_copy(callbackuri), result__.as_mut_ptr()).from_abi::>(result__) }) } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn AuthenticateWithoutCallbackUriAsync<'a, P0>(options: WebAuthenticationOptions, requesturi: P0) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Foundation::Uri>>, - { + pub fn AuthenticateWithoutCallbackUriAsync(options: WebAuthenticationOptions, requesturi: &super::super::super::Foundation::Uri) -> ::windows::core::Result> { Self::IWebAuthenticationBrokerStatics(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).AuthenticateWithoutCallbackUriAsync)(::windows::core::Vtable::as_raw(this), options, requesturi.into().abi(), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).AuthenticateWithoutCallbackUriAsync)(::windows::core::Vtable::as_raw(this), options, ::core::mem::transmute_copy(requesturi), result__.as_mut_ptr()).from_abi::>(result__) }) } #[doc = "*Required features: `\"Foundation\"`*"] @@ -115,51 +108,33 @@ impl WebAuthenticationBroker { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn AuthenticateAndContinue<'a, P0>(requesturi: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Foundation::Uri>>, - { - Self::IWebAuthenticationBrokerStatics2(|this| unsafe { (::windows::core::Vtable::vtable(this).AuthenticateAndContinue)(::windows::core::Vtable::as_raw(this), requesturi.into().abi()).ok() }) + pub fn AuthenticateAndContinue(requesturi: &super::super::super::Foundation::Uri) -> ::windows::core::Result<()> { + Self::IWebAuthenticationBrokerStatics2(|this| unsafe { (::windows::core::Vtable::vtable(this).AuthenticateAndContinue)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(requesturi)).ok() }) } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn AuthenticateWithCallbackUriAndContinue<'a, P0, P1>(requesturi: P0, callbackuri: P1) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Foundation::Uri>>, - P1: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Foundation::Uri>>, - { - Self::IWebAuthenticationBrokerStatics2(|this| unsafe { (::windows::core::Vtable::vtable(this).AuthenticateWithCallbackUriAndContinue)(::windows::core::Vtable::as_raw(this), requesturi.into().abi(), callbackuri.into().abi()).ok() }) + pub fn AuthenticateWithCallbackUriAndContinue(requesturi: &super::super::super::Foundation::Uri, callbackuri: &super::super::super::Foundation::Uri) -> ::windows::core::Result<()> { + Self::IWebAuthenticationBrokerStatics2(|this| unsafe { (::windows::core::Vtable::vtable(this).AuthenticateWithCallbackUriAndContinue)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(requesturi), ::core::mem::transmute_copy(callbackuri)).ok() }) } #[doc = "*Required features: `\"Foundation_Collections\"`*"] #[cfg(feature = "Foundation_Collections")] - pub fn AuthenticateWithCallbackUriContinuationDataAndOptionsAndContinue<'a, P0, P1, P2>(requesturi: P0, callbackuri: P1, continuationdata: P2, options: WebAuthenticationOptions) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Foundation::Uri>>, - P1: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Foundation::Uri>>, - P2: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Foundation::Collections::ValueSet>>, - { - Self::IWebAuthenticationBrokerStatics2(|this| unsafe { (::windows::core::Vtable::vtable(this).AuthenticateWithCallbackUriContinuationDataAndOptionsAndContinue)(::windows::core::Vtable::as_raw(this), requesturi.into().abi(), callbackuri.into().abi(), continuationdata.into().abi(), options).ok() }) + pub fn AuthenticateWithCallbackUriContinuationDataAndOptionsAndContinue(requesturi: &super::super::super::Foundation::Uri, callbackuri: &super::super::super::Foundation::Uri, continuationdata: &super::super::super::Foundation::Collections::ValueSet, options: WebAuthenticationOptions) -> ::windows::core::Result<()> { + Self::IWebAuthenticationBrokerStatics2(|this| unsafe { (::windows::core::Vtable::vtable(this).AuthenticateWithCallbackUriContinuationDataAndOptionsAndContinue)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(requesturi), ::core::mem::transmute_copy(callbackuri), ::core::mem::transmute_copy(continuationdata), options).ok() }) } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn AuthenticateSilentlyAsync<'a, P0>(requesturi: P0) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Foundation::Uri>>, - { + pub fn AuthenticateSilentlyAsync(requesturi: &super::super::super::Foundation::Uri) -> ::windows::core::Result> { Self::IWebAuthenticationBrokerStatics2(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).AuthenticateSilentlyAsync)(::windows::core::Vtable::as_raw(this), requesturi.into().abi(), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).AuthenticateSilentlyAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(requesturi), result__.as_mut_ptr()).from_abi::>(result__) }) } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn AuthenticateSilentlyWithOptionsAsync<'a, P0>(requesturi: P0, options: WebAuthenticationOptions) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Foundation::Uri>>, - { + pub fn AuthenticateSilentlyWithOptionsAsync(requesturi: &super::super::super::Foundation::Uri, options: WebAuthenticationOptions) -> ::windows::core::Result> { Self::IWebAuthenticationBrokerStatics2(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).AuthenticateSilentlyWithOptionsAsync)(::windows::core::Vtable::as_raw(this), requesturi.into().abi(), options, result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).AuthenticateSilentlyWithOptionsAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(requesturi), options, result__.as_mut_ptr()).from_abi::>(result__) }) } #[doc(hidden)] diff --git a/crates/libs/windows/src/Windows/Security/Authorization/AppCapabilityAccess/mod.rs b/crates/libs/windows/src/Windows/Security/Authorization/AppCapabilityAccess/mod.rs index b431bb064b..ab4fa00144 100644 --- a/crates/libs/windows/src/Windows/Security/Authorization/AppCapabilityAccess/mod.rs +++ b/crates/libs/windows/src/Windows/Security/Authorization/AppCapabilityAccess/mod.rs @@ -109,14 +109,11 @@ impl AppCapability { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn AccessChanged<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Foundation::TypedEventHandler>>, - { + pub fn AccessChanged(&self, handler: &super::super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).AccessChanged)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).AccessChanged)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -139,15 +136,14 @@ impl AppCapability { } #[doc = "*Required features: `\"Foundation_Collections\"`, `\"System\"`*"] #[cfg(all(feature = "Foundation_Collections", feature = "System"))] - pub fn RequestAccessForCapabilitiesForUserAsync<'a, P0, P1, E1>(user: P0, capabilitynames: P1) -> ::windows::core::Result>> + pub fn RequestAccessForCapabilitiesForUserAsync<'a, P0, E0>(user: &super::super::super::System::User, capabilitynames: P0) -> ::windows::core::Result>> where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::System::User>>, - P1: ::std::convert::TryInto<::windows::core::InParam<'a, super::super::super::Foundation::Collections::IIterable<::windows::core::HSTRING>>, Error = E1>, - E1: ::std::convert::Into<::windows::core::Error>, + P0: ::std::convert::TryInto<::windows::core::InParam<'a, super::super::super::Foundation::Collections::IIterable<::windows::core::HSTRING>>, Error = E0>, + E0: ::std::convert::Into<::windows::core::Error>, { Self::IAppCapabilityStatics(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).RequestAccessForCapabilitiesForUserAsync)(::windows::core::Vtable::as_raw(this), user.into().abi(), capabilitynames.try_into().map_err(|e| e.into())?.abi(), result__.as_mut_ptr()).from_abi::>>(result__) + (::windows::core::Vtable::vtable(this).RequestAccessForCapabilitiesForUserAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(user), capabilitynames.try_into().map_err(|e| e.into())?.abi(), result__.as_mut_ptr()).from_abi::>>(result__) }) } pub fn Create(capabilityname: &::windows::core::HSTRING) -> ::windows::core::Result { @@ -158,13 +154,10 @@ impl AppCapability { } #[doc = "*Required features: `\"System\"`*"] #[cfg(feature = "System")] - pub fn CreateWithProcessIdForUser<'a, P0>(user: P0, capabilityname: &::windows::core::HSTRING, pid: u32) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::System::User>>, - { + pub fn CreateWithProcessIdForUser(user: &super::super::super::System::User, capabilityname: &::windows::core::HSTRING, pid: u32) -> ::windows::core::Result { Self::IAppCapabilityStatics(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).CreateWithProcessIdForUser)(::windows::core::Vtable::as_raw(this), user.into().abi(), ::core::mem::transmute_copy(capabilityname), pid, result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).CreateWithProcessIdForUser)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(user), ::core::mem::transmute_copy(capabilityname), pid, result__.as_mut_ptr()).from_abi::(result__) }) } #[doc(hidden)] diff --git a/crates/libs/windows/src/Windows/Security/Credentials/UI/mod.rs b/crates/libs/windows/src/Windows/Security/Credentials/UI/mod.rs index 79d27f7baa..45a58fb1c5 100644 --- a/crates/libs/windows/src/Windows/Security/Credentials/UI/mod.rs +++ b/crates/libs/windows/src/Windows/Security/Credentials/UI/mod.rs @@ -115,13 +115,10 @@ pub struct CredentialPicker; impl CredentialPicker { #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn PickWithOptionsAsync<'a, P0>(options: P0) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, CredentialPickerOptions>>, - { + pub fn PickWithOptionsAsync(options: &CredentialPickerOptions) -> ::windows::core::Result> { Self::ICredentialPickerStatics(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).PickWithOptionsAsync)(::windows::core::Vtable::as_raw(this), options.into().abi(), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).PickWithOptionsAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(options), result__.as_mut_ptr()).from_abi::>(result__) }) } #[doc = "*Required features: `\"Foundation\"`*"] diff --git a/crates/libs/windows/src/Windows/Security/Credentials/mod.rs b/crates/libs/windows/src/Windows/Security/Credentials/mod.rs index 1f4697b6d3..204fdb135a 100644 --- a/crates/libs/windows/src/Windows/Security/Credentials/mod.rs +++ b/crates/libs/windows/src/Windows/Security/Credentials/mod.rs @@ -1065,14 +1065,11 @@ impl PasswordCredentialPropertyStore { } #[doc = "*Required features: `\"Foundation_Collections\"`*"] #[cfg(feature = "Foundation_Collections")] - pub fn MapChanged<'a, P0>(&self, vhnd: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::Collections::MapChangedEventHandler<::windows::core::HSTRING, ::windows::core::IInspectable>>>, - { + pub fn MapChanged(&self, vhnd: &super::super::Foundation::Collections::MapChangedEventHandler<::windows::core::HSTRING, ::windows::core::IInspectable>) -> ::windows::core::Result { let this = &::windows::core::Interface::cast::>(self)?; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).MapChanged)(::windows::core::Vtable::as_raw(this), vhnd.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).MapChanged)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(vhnd), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation_Collections\"`*"] @@ -1277,19 +1274,13 @@ impl PasswordVault { static SHARED: ::windows::core::FactoryCache = ::windows::core::FactoryCache::new(); SHARED.call(callback) } - pub fn Add<'a, P0>(&self, credential: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, PasswordCredential>>, - { + pub fn Add(&self, credential: &PasswordCredential) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).Add)(::windows::core::Vtable::as_raw(this), credential.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).Add)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(credential)).ok() } } - pub fn Remove<'a, P0>(&self, credential: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, PasswordCredential>>, - { + pub fn Remove(&self, credential: &PasswordCredential) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).Remove)(::windows::core::Vtable::as_raw(this), credential.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).Remove)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(credential)).ok() } } pub fn Retrieve(&self, resource: &::windows::core::HSTRING, username: &::windows::core::HSTRING) -> ::windows::core::Result { let this = self; @@ -1458,13 +1449,10 @@ impl WebAccount { (::windows::core::Vtable::vtable(this).SignOutWithClientIdAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(clientid), result__.as_mut_ptr()).from_abi::(result__) } } - pub fn CreateWebAccount<'a, P0>(webaccountprovider: P0, username: &::windows::core::HSTRING, state: WebAccountState) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, WebAccountProvider>>, - { + pub fn CreateWebAccount(webaccountprovider: &WebAccountProvider, username: &::windows::core::HSTRING, state: WebAccountState) -> ::windows::core::Result { Self::IWebAccountFactory(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).CreateWebAccount)(::windows::core::Vtable::as_raw(this), webaccountprovider.into().abi(), ::core::mem::transmute_copy(username), state, result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).CreateWebAccount)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(webaccountprovider), ::core::mem::transmute_copy(username), state, result__.as_mut_ptr()).from_abi::(result__) }) } #[doc(hidden)] @@ -1615,13 +1603,10 @@ impl WebAccountProvider { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn CreateWebAccountProvider<'a, P0>(id: &::windows::core::HSTRING, displayname: &::windows::core::HSTRING, iconuri: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::Uri>>, - { + pub fn CreateWebAccountProvider(id: &::windows::core::HSTRING, displayname: &::windows::core::HSTRING, iconuri: &super::super::Foundation::Uri) -> ::windows::core::Result { Self::IWebAccountProviderFactory(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).CreateWebAccountProvider)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(id), ::core::mem::transmute_copy(displayname), iconuri.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).CreateWebAccountProvider)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(id), ::core::mem::transmute_copy(displayname), ::core::mem::transmute_copy(iconuri), result__.as_mut_ptr()).from_abi::(result__) }) } #[doc(hidden)] diff --git a/crates/libs/windows/src/Windows/Security/Cryptography/Certificates/mod.rs b/crates/libs/windows/src/Windows/Security/Cryptography/Certificates/mod.rs index e2c0bf5163..655a36d463 100644 --- a/crates/libs/windows/src/Windows/Security/Cryptography/Certificates/mod.rs +++ b/crates/libs/windows/src/Windows/Security/Cryptography/Certificates/mod.rs @@ -995,16 +995,15 @@ impl Certificate { } #[doc = "*Required features: `\"Foundation_Collections\"`*"] #[cfg(feature = "Foundation_Collections")] - pub fn BuildChainWithParametersAsync<'a, P0, E0, P1>(&self, certificates: P0, parameters: P1) -> ::windows::core::Result> + pub fn BuildChainWithParametersAsync<'a, P0, E0>(&self, certificates: P0, parameters: &ChainBuildingParameters) -> ::windows::core::Result> where P0: ::std::convert::TryInto<::windows::core::InParam<'a, super::super::super::Foundation::Collections::IIterable>, Error = E0>, E0: ::std::convert::Into<::windows::core::Error>, - P1: ::std::convert::Into<::windows::core::InParam<'a, ChainBuildingParameters>>, { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).BuildChainWithParametersAsync)(::windows::core::Vtable::as_raw(this), certificates.try_into().map_err(|e| e.into())?.abi(), parameters.into().abi(), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).BuildChainWithParametersAsync)(::windows::core::Vtable::as_raw(this), certificates.try_into().map_err(|e| e.into())?.abi(), ::core::mem::transmute_copy(parameters), result__.as_mut_ptr()).from_abi::>(result__) } } pub fn SerialNumber(&self) -> ::windows::core::Result<::windows::core::Array> { @@ -1259,14 +1258,11 @@ impl CertificateChain { (::windows::core::Vtable::vtable(this).Validate)(::windows::core::Vtable::as_raw(this), result__.as_mut_ptr()).from_abi::(result__) } } - pub fn ValidateWithParameters<'a, P0>(&self, parameter: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, ChainValidationParameters>>, - { + pub fn ValidateWithParameters(&self, parameter: &ChainValidationParameters) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).ValidateWithParameters)(::windows::core::Vtable::as_raw(this), parameter.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).ValidateWithParameters)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(parameter), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation_Collections\"`*"] @@ -1348,13 +1344,10 @@ pub struct CertificateEnrollmentManager; impl CertificateEnrollmentManager { #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn CreateRequestAsync<'a, P0>(request: P0) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, CertificateRequestProperties>>, - { + pub fn CreateRequestAsync(request: &CertificateRequestProperties) -> ::windows::core::Result> { Self::ICertificateEnrollmentManagerStatics(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).CreateRequestAsync)(::windows::core::Vtable::as_raw(this), request.into().abi(), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).CreateRequestAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(request), result__.as_mut_ptr()).from_abi::>(result__) }) } #[doc = "*Required features: `\"Foundation\"`*"] @@ -1389,13 +1382,10 @@ impl CertificateEnrollmentManager { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn ImportPfxDataToKspWithParametersAsync<'a, P0>(pfxdata: &::windows::core::HSTRING, password: &::windows::core::HSTRING, pfximportparameters: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, PfxImportParameters>>, - { + pub fn ImportPfxDataToKspWithParametersAsync(pfxdata: &::windows::core::HSTRING, password: &::windows::core::HSTRING, pfximportparameters: &PfxImportParameters) -> ::windows::core::Result { Self::ICertificateEnrollmentManagerStatics3(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).ImportPfxDataToKspWithParametersAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(pfxdata), ::core::mem::transmute_copy(password), pfximportparameters.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).ImportPfxDataToKspWithParametersAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(pfxdata), ::core::mem::transmute_copy(password), ::core::mem::transmute_copy(pfximportparameters), result__.as_mut_ptr()).from_abi::(result__) }) } #[doc(hidden)] @@ -1984,12 +1974,9 @@ impl CertificateRequestProperties { (::windows::core::Vtable::vtable(this).SigningCertificate)(::windows::core::Vtable::as_raw(this), result__.as_mut_ptr()).from_abi::(result__) } } - pub fn SetSigningCertificate<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, Certificate>>, - { + pub fn SetSigningCertificate(&self, value: &Certificate) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).SetSigningCertificate)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetSigningCertificate)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } pub fn AttestationCredentialCertificate(&self) -> ::windows::core::Result { let this = &::windows::core::Interface::cast::(self)?; @@ -1998,12 +1985,9 @@ impl CertificateRequestProperties { (::windows::core::Vtable::vtable(this).AttestationCredentialCertificate)(::windows::core::Vtable::as_raw(this), result__.as_mut_ptr()).from_abi::(result__) } } - pub fn SetAttestationCredentialCertificate<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, Certificate>>, - { + pub fn SetAttestationCredentialCertificate(&self, value: &Certificate) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).SetAttestationCredentialCertificate)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetAttestationCredentialCertificate)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } pub fn CurveName(&self) -> ::windows::core::Result<::windows::core::HSTRING> { let this = &::windows::core::Interface::cast::(self)?; @@ -2154,19 +2138,13 @@ unsafe impl ::core::marker::Sync for CertificateRequestProperties {} #[repr(transparent)] pub struct CertificateStore(::windows::core::IUnknown); impl CertificateStore { - pub fn Add<'a, P0>(&self, certificate: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, Certificate>>, - { + pub fn Add(&self, certificate: &Certificate) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).Add)(::windows::core::Vtable::as_raw(this), certificate.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).Add)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(certificate)).ok() } } - pub fn Delete<'a, P0>(&self, certificate: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, Certificate>>, - { + pub fn Delete(&self, certificate: &Certificate) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).Delete)(::windows::core::Vtable::as_raw(this), certificate.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).Delete)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(certificate)).ok() } } pub fn Name(&self) -> ::windows::core::Result<::windows::core::HSTRING> { let this = &::windows::core::Interface::cast::(self)?; @@ -2253,13 +2231,10 @@ impl CertificateStores { } #[doc = "*Required features: `\"Foundation_Collections\"`*"] #[cfg(feature = "Foundation_Collections")] - pub fn FindAllWithQueryAsync<'a, P0>(query: P0) -> ::windows::core::Result>> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, CertificateQuery>>, - { + pub fn FindAllWithQueryAsync(query: &CertificateQuery) -> ::windows::core::Result>> { Self::ICertificateStoresStatics(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).FindAllWithQueryAsync)(::windows::core::Vtable::as_raw(this), query.into().abi(), result__.as_mut_ptr()).from_abi::>>(result__) + (::windows::core::Vtable::vtable(this).FindAllWithQueryAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(query), result__.as_mut_ptr()).from_abi::>>(result__) }) } pub fn TrustedRootCertificationAuthorities() -> ::windows::core::Result { @@ -2486,12 +2461,9 @@ impl ChainValidationParameters { } #[doc = "*Required features: `\"Networking\"`*"] #[cfg(feature = "Networking")] - pub fn SetServerDnsName<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Networking::HostName>>, - { + pub fn SetServerDnsName(&self, value: &super::super::super::Networking::HostName) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).SetServerDnsName)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetServerDnsName)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } } impl ::core::clone::Clone for ChainValidationParameters { @@ -2853,12 +2825,9 @@ impl CmsSignerInfo { (::windows::core::Vtable::vtable(this).Certificate)(::windows::core::Vtable::as_raw(this), result__.as_mut_ptr()).from_abi::(result__) } } - pub fn SetCertificate<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, Certificate>>, - { + pub fn SetCertificate(&self, value: &Certificate) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).SetCertificate)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetCertificate)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } pub fn HashAlgorithmName(&self) -> ::windows::core::Result<::windows::core::HSTRING> { let this = self; @@ -3574,14 +3543,11 @@ pub struct UserCertificateEnrollmentManager(::windows::core::IUnknown); impl UserCertificateEnrollmentManager { #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn CreateRequestAsync<'a, P0>(&self, request: P0) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, CertificateRequestProperties>>, - { + pub fn CreateRequestAsync(&self, request: &CertificateRequestProperties) -> ::windows::core::Result> { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).CreateRequestAsync)(::windows::core::Vtable::as_raw(this), request.into().abi(), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).CreateRequestAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(request), result__.as_mut_ptr()).from_abi::>(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -3613,14 +3579,11 @@ impl UserCertificateEnrollmentManager { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn ImportPfxDataToKspWithParametersAsync<'a, P0>(&self, pfxdata: &::windows::core::HSTRING, password: &::windows::core::HSTRING, pfximportparameters: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, PfxImportParameters>>, - { + pub fn ImportPfxDataToKspWithParametersAsync(&self, pfxdata: &::windows::core::HSTRING, password: &::windows::core::HSTRING, pfximportparameters: &PfxImportParameters) -> ::windows::core::Result { let this = &::windows::core::Interface::cast::(self)?; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).ImportPfxDataToKspWithParametersAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(pfxdata), ::core::mem::transmute_copy(password), pfximportparameters.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).ImportPfxDataToKspWithParametersAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(pfxdata), ::core::mem::transmute_copy(password), ::core::mem::transmute_copy(pfximportparameters), result__.as_mut_ptr()).from_abi::(result__) } } } @@ -3694,26 +3657,20 @@ pub struct UserCertificateStore(::windows::core::IUnknown); impl UserCertificateStore { #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn RequestAddAsync<'a, P0>(&self, certificate: P0) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, Certificate>>, - { + pub fn RequestAddAsync(&self, certificate: &Certificate) -> ::windows::core::Result> { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).RequestAddAsync)(::windows::core::Vtable::as_raw(this), certificate.into().abi(), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).RequestAddAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(certificate), result__.as_mut_ptr()).from_abi::>(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn RequestDeleteAsync<'a, P0>(&self, certificate: P0) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, Certificate>>, - { + pub fn RequestDeleteAsync(&self, certificate: &Certificate) -> ::windows::core::Result> { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).RequestDeleteAsync)(::windows::core::Vtable::as_raw(this), certificate.into().abi(), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).RequestDeleteAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(certificate), result__.as_mut_ptr()).from_abi::>(result__) } } pub fn Name(&self) -> ::windows::core::Result<::windows::core::HSTRING> { diff --git a/crates/libs/windows/src/Windows/Security/Cryptography/Core/mod.rs b/crates/libs/windows/src/Windows/Security/Cryptography/Core/mod.rs index fa971bbfe5..589dcf5fdb 100644 --- a/crates/libs/windows/src/Windows/Security/Cryptography/Core/mod.rs +++ b/crates/libs/windows/src/Windows/Security/Cryptography/Core/mod.rs @@ -1012,177 +1012,162 @@ pub struct CryptographicEngine; impl CryptographicEngine { #[doc = "*Required features: `\"Storage_Streams\"`*"] #[cfg(feature = "Storage_Streams")] - pub fn Encrypt<'a, P0, P1, E1, P2, E2>(key: P0, data: P1, iv: P2) -> ::windows::core::Result + pub fn Encrypt<'a, P0, E0, P1, E1>(key: &CryptographicKey, data: P0, iv: P1) -> ::windows::core::Result where - P0: ::std::convert::Into<::windows::core::InParam<'a, CryptographicKey>>, + P0: ::std::convert::TryInto<::windows::core::InParam<'a, super::super::super::Storage::Streams::IBuffer>, Error = E0>, + E0: ::std::convert::Into<::windows::core::Error>, P1: ::std::convert::TryInto<::windows::core::InParam<'a, super::super::super::Storage::Streams::IBuffer>, Error = E1>, E1: ::std::convert::Into<::windows::core::Error>, - P2: ::std::convert::TryInto<::windows::core::InParam<'a, super::super::super::Storage::Streams::IBuffer>, Error = E2>, - E2: ::std::convert::Into<::windows::core::Error>, { Self::ICryptographicEngineStatics(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).Encrypt)(::windows::core::Vtable::as_raw(this), key.into().abi(), data.try_into().map_err(|e| e.into())?.abi(), iv.try_into().map_err(|e| e.into())?.abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).Encrypt)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(key), data.try_into().map_err(|e| e.into())?.abi(), iv.try_into().map_err(|e| e.into())?.abi(), result__.as_mut_ptr()).from_abi::(result__) }) } #[doc = "*Required features: `\"Storage_Streams\"`*"] #[cfg(feature = "Storage_Streams")] - pub fn Decrypt<'a, P0, P1, E1, P2, E2>(key: P0, data: P1, iv: P2) -> ::windows::core::Result + pub fn Decrypt<'a, P0, E0, P1, E1>(key: &CryptographicKey, data: P0, iv: P1) -> ::windows::core::Result where - P0: ::std::convert::Into<::windows::core::InParam<'a, CryptographicKey>>, + P0: ::std::convert::TryInto<::windows::core::InParam<'a, super::super::super::Storage::Streams::IBuffer>, Error = E0>, + E0: ::std::convert::Into<::windows::core::Error>, P1: ::std::convert::TryInto<::windows::core::InParam<'a, super::super::super::Storage::Streams::IBuffer>, Error = E1>, E1: ::std::convert::Into<::windows::core::Error>, - P2: ::std::convert::TryInto<::windows::core::InParam<'a, super::super::super::Storage::Streams::IBuffer>, Error = E2>, - E2: ::std::convert::Into<::windows::core::Error>, { Self::ICryptographicEngineStatics(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).Decrypt)(::windows::core::Vtable::as_raw(this), key.into().abi(), data.try_into().map_err(|e| e.into())?.abi(), iv.try_into().map_err(|e| e.into())?.abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).Decrypt)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(key), data.try_into().map_err(|e| e.into())?.abi(), iv.try_into().map_err(|e| e.into())?.abi(), result__.as_mut_ptr()).from_abi::(result__) }) } #[doc = "*Required features: `\"Storage_Streams\"`*"] #[cfg(feature = "Storage_Streams")] - pub fn EncryptAndAuthenticate<'a, P0, P1, E1, P2, E2, P3, E3>(key: P0, data: P1, nonce: P2, authenticateddata: P3) -> ::windows::core::Result + pub fn EncryptAndAuthenticate<'a, P0, E0, P1, E1, P2, E2>(key: &CryptographicKey, data: P0, nonce: P1, authenticateddata: P2) -> ::windows::core::Result where - P0: ::std::convert::Into<::windows::core::InParam<'a, CryptographicKey>>, + P0: ::std::convert::TryInto<::windows::core::InParam<'a, super::super::super::Storage::Streams::IBuffer>, Error = E0>, + E0: ::std::convert::Into<::windows::core::Error>, P1: ::std::convert::TryInto<::windows::core::InParam<'a, super::super::super::Storage::Streams::IBuffer>, Error = E1>, E1: ::std::convert::Into<::windows::core::Error>, P2: ::std::convert::TryInto<::windows::core::InParam<'a, super::super::super::Storage::Streams::IBuffer>, Error = E2>, E2: ::std::convert::Into<::windows::core::Error>, - P3: ::std::convert::TryInto<::windows::core::InParam<'a, super::super::super::Storage::Streams::IBuffer>, Error = E3>, - E3: ::std::convert::Into<::windows::core::Error>, { Self::ICryptographicEngineStatics(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).EncryptAndAuthenticate)(::windows::core::Vtable::as_raw(this), key.into().abi(), data.try_into().map_err(|e| e.into())?.abi(), nonce.try_into().map_err(|e| e.into())?.abi(), authenticateddata.try_into().map_err(|e| e.into())?.abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).EncryptAndAuthenticate)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(key), data.try_into().map_err(|e| e.into())?.abi(), nonce.try_into().map_err(|e| e.into())?.abi(), authenticateddata.try_into().map_err(|e| e.into())?.abi(), result__.as_mut_ptr()).from_abi::(result__) }) } #[doc = "*Required features: `\"Storage_Streams\"`*"] #[cfg(feature = "Storage_Streams")] - pub fn DecryptAndAuthenticate<'a, P0, P1, E1, P2, E2, P3, E3, P4, E4>(key: P0, data: P1, nonce: P2, authenticationtag: P3, authenticateddata: P4) -> ::windows::core::Result + pub fn DecryptAndAuthenticate<'a, P0, E0, P1, E1, P2, E2, P3, E3>(key: &CryptographicKey, data: P0, nonce: P1, authenticationtag: P2, authenticateddata: P3) -> ::windows::core::Result where - P0: ::std::convert::Into<::windows::core::InParam<'a, CryptographicKey>>, + P0: ::std::convert::TryInto<::windows::core::InParam<'a, super::super::super::Storage::Streams::IBuffer>, Error = E0>, + E0: ::std::convert::Into<::windows::core::Error>, P1: ::std::convert::TryInto<::windows::core::InParam<'a, super::super::super::Storage::Streams::IBuffer>, Error = E1>, E1: ::std::convert::Into<::windows::core::Error>, P2: ::std::convert::TryInto<::windows::core::InParam<'a, super::super::super::Storage::Streams::IBuffer>, Error = E2>, E2: ::std::convert::Into<::windows::core::Error>, P3: ::std::convert::TryInto<::windows::core::InParam<'a, super::super::super::Storage::Streams::IBuffer>, Error = E3>, E3: ::std::convert::Into<::windows::core::Error>, - P4: ::std::convert::TryInto<::windows::core::InParam<'a, super::super::super::Storage::Streams::IBuffer>, Error = E4>, - E4: ::std::convert::Into<::windows::core::Error>, { Self::ICryptographicEngineStatics(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).DecryptAndAuthenticate)(::windows::core::Vtable::as_raw(this), key.into().abi(), data.try_into().map_err(|e| e.into())?.abi(), nonce.try_into().map_err(|e| e.into())?.abi(), authenticationtag.try_into().map_err(|e| e.into())?.abi(), authenticateddata.try_into().map_err(|e| e.into())?.abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).DecryptAndAuthenticate)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(key), data.try_into().map_err(|e| e.into())?.abi(), nonce.try_into().map_err(|e| e.into())?.abi(), authenticationtag.try_into().map_err(|e| e.into())?.abi(), authenticateddata.try_into().map_err(|e| e.into())?.abi(), result__.as_mut_ptr()).from_abi::(result__) }) } #[doc = "*Required features: `\"Storage_Streams\"`*"] #[cfg(feature = "Storage_Streams")] - pub fn Sign<'a, P0, P1, E1>(key: P0, data: P1) -> ::windows::core::Result + pub fn Sign<'a, P0, E0>(key: &CryptographicKey, data: P0) -> ::windows::core::Result where - P0: ::std::convert::Into<::windows::core::InParam<'a, CryptographicKey>>, - P1: ::std::convert::TryInto<::windows::core::InParam<'a, super::super::super::Storage::Streams::IBuffer>, Error = E1>, - E1: ::std::convert::Into<::windows::core::Error>, + P0: ::std::convert::TryInto<::windows::core::InParam<'a, super::super::super::Storage::Streams::IBuffer>, Error = E0>, + E0: ::std::convert::Into<::windows::core::Error>, { Self::ICryptographicEngineStatics(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).Sign)(::windows::core::Vtable::as_raw(this), key.into().abi(), data.try_into().map_err(|e| e.into())?.abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).Sign)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(key), data.try_into().map_err(|e| e.into())?.abi(), result__.as_mut_ptr()).from_abi::(result__) }) } #[doc = "*Required features: `\"Storage_Streams\"`*"] #[cfg(feature = "Storage_Streams")] - pub fn VerifySignature<'a, P0, P1, E1, P2, E2>(key: P0, data: P1, signature: P2) -> ::windows::core::Result + pub fn VerifySignature<'a, P0, E0, P1, E1>(key: &CryptographicKey, data: P0, signature: P1) -> ::windows::core::Result where - P0: ::std::convert::Into<::windows::core::InParam<'a, CryptographicKey>>, + P0: ::std::convert::TryInto<::windows::core::InParam<'a, super::super::super::Storage::Streams::IBuffer>, Error = E0>, + E0: ::std::convert::Into<::windows::core::Error>, P1: ::std::convert::TryInto<::windows::core::InParam<'a, super::super::super::Storage::Streams::IBuffer>, Error = E1>, E1: ::std::convert::Into<::windows::core::Error>, - P2: ::std::convert::TryInto<::windows::core::InParam<'a, super::super::super::Storage::Streams::IBuffer>, Error = E2>, - E2: ::std::convert::Into<::windows::core::Error>, { Self::ICryptographicEngineStatics(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).VerifySignature)(::windows::core::Vtable::as_raw(this), key.into().abi(), data.try_into().map_err(|e| e.into())?.abi(), signature.try_into().map_err(|e| e.into())?.abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).VerifySignature)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(key), data.try_into().map_err(|e| e.into())?.abi(), signature.try_into().map_err(|e| e.into())?.abi(), result__.as_mut_ptr()).from_abi::(result__) }) } #[doc = "*Required features: `\"Storage_Streams\"`*"] #[cfg(feature = "Storage_Streams")] - pub fn DeriveKeyMaterial<'a, P0, P1>(key: P0, parameters: P1, desiredkeysize: u32) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, CryptographicKey>>, - P1: ::std::convert::Into<::windows::core::InParam<'a, KeyDerivationParameters>>, - { + pub fn DeriveKeyMaterial(key: &CryptographicKey, parameters: &KeyDerivationParameters, desiredkeysize: u32) -> ::windows::core::Result { Self::ICryptographicEngineStatics(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).DeriveKeyMaterial)(::windows::core::Vtable::as_raw(this), key.into().abi(), parameters.into().abi(), desiredkeysize, result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).DeriveKeyMaterial)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(key), ::core::mem::transmute_copy(parameters), desiredkeysize, result__.as_mut_ptr()).from_abi::(result__) }) } #[doc = "*Required features: `\"Storage_Streams\"`*"] #[cfg(feature = "Storage_Streams")] - pub fn SignHashedData<'a, P0, P1, E1>(key: P0, data: P1) -> ::windows::core::Result + pub fn SignHashedData<'a, P0, E0>(key: &CryptographicKey, data: P0) -> ::windows::core::Result where - P0: ::std::convert::Into<::windows::core::InParam<'a, CryptographicKey>>, - P1: ::std::convert::TryInto<::windows::core::InParam<'a, super::super::super::Storage::Streams::IBuffer>, Error = E1>, - E1: ::std::convert::Into<::windows::core::Error>, + P0: ::std::convert::TryInto<::windows::core::InParam<'a, super::super::super::Storage::Streams::IBuffer>, Error = E0>, + E0: ::std::convert::Into<::windows::core::Error>, { Self::ICryptographicEngineStatics2(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).SignHashedData)(::windows::core::Vtable::as_raw(this), key.into().abi(), data.try_into().map_err(|e| e.into())?.abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).SignHashedData)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(key), data.try_into().map_err(|e| e.into())?.abi(), result__.as_mut_ptr()).from_abi::(result__) }) } #[doc = "*Required features: `\"Storage_Streams\"`*"] #[cfg(feature = "Storage_Streams")] - pub fn VerifySignatureWithHashInput<'a, P0, P1, E1, P2, E2>(key: P0, data: P1, signature: P2) -> ::windows::core::Result + pub fn VerifySignatureWithHashInput<'a, P0, E0, P1, E1>(key: &CryptographicKey, data: P0, signature: P1) -> ::windows::core::Result where - P0: ::std::convert::Into<::windows::core::InParam<'a, CryptographicKey>>, + P0: ::std::convert::TryInto<::windows::core::InParam<'a, super::super::super::Storage::Streams::IBuffer>, Error = E0>, + E0: ::std::convert::Into<::windows::core::Error>, P1: ::std::convert::TryInto<::windows::core::InParam<'a, super::super::super::Storage::Streams::IBuffer>, Error = E1>, E1: ::std::convert::Into<::windows::core::Error>, - P2: ::std::convert::TryInto<::windows::core::InParam<'a, super::super::super::Storage::Streams::IBuffer>, Error = E2>, - E2: ::std::convert::Into<::windows::core::Error>, { Self::ICryptographicEngineStatics2(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).VerifySignatureWithHashInput)(::windows::core::Vtable::as_raw(this), key.into().abi(), data.try_into().map_err(|e| e.into())?.abi(), signature.try_into().map_err(|e| e.into())?.abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).VerifySignatureWithHashInput)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(key), data.try_into().map_err(|e| e.into())?.abi(), signature.try_into().map_err(|e| e.into())?.abi(), result__.as_mut_ptr()).from_abi::(result__) }) } #[doc = "*Required features: `\"Foundation\"`, `\"Storage_Streams\"`*"] #[cfg(all(feature = "Foundation", feature = "Storage_Streams"))] - pub fn DecryptAsync<'a, P0, P1, E1, P2, E2>(key: P0, data: P1, iv: P2) -> ::windows::core::Result> + pub fn DecryptAsync<'a, P0, E0, P1, E1>(key: &CryptographicKey, data: P0, iv: P1) -> ::windows::core::Result> where - P0: ::std::convert::Into<::windows::core::InParam<'a, CryptographicKey>>, + P0: ::std::convert::TryInto<::windows::core::InParam<'a, super::super::super::Storage::Streams::IBuffer>, Error = E0>, + E0: ::std::convert::Into<::windows::core::Error>, P1: ::std::convert::TryInto<::windows::core::InParam<'a, super::super::super::Storage::Streams::IBuffer>, Error = E1>, E1: ::std::convert::Into<::windows::core::Error>, - P2: ::std::convert::TryInto<::windows::core::InParam<'a, super::super::super::Storage::Streams::IBuffer>, Error = E2>, - E2: ::std::convert::Into<::windows::core::Error>, { Self::ICryptographicEngineStatics2(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).DecryptAsync)(::windows::core::Vtable::as_raw(this), key.into().abi(), data.try_into().map_err(|e| e.into())?.abi(), iv.try_into().map_err(|e| e.into())?.abi(), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).DecryptAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(key), data.try_into().map_err(|e| e.into())?.abi(), iv.try_into().map_err(|e| e.into())?.abi(), result__.as_mut_ptr()).from_abi::>(result__) }) } #[doc = "*Required features: `\"Foundation\"`, `\"Storage_Streams\"`*"] #[cfg(all(feature = "Foundation", feature = "Storage_Streams"))] - pub fn SignAsync<'a, P0, P1, E1>(key: P0, data: P1) -> ::windows::core::Result> + pub fn SignAsync<'a, P0, E0>(key: &CryptographicKey, data: P0) -> ::windows::core::Result> where - P0: ::std::convert::Into<::windows::core::InParam<'a, CryptographicKey>>, - P1: ::std::convert::TryInto<::windows::core::InParam<'a, super::super::super::Storage::Streams::IBuffer>, Error = E1>, - E1: ::std::convert::Into<::windows::core::Error>, + P0: ::std::convert::TryInto<::windows::core::InParam<'a, super::super::super::Storage::Streams::IBuffer>, Error = E0>, + E0: ::std::convert::Into<::windows::core::Error>, { Self::ICryptographicEngineStatics2(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).SignAsync)(::windows::core::Vtable::as_raw(this), key.into().abi(), data.try_into().map_err(|e| e.into())?.abi(), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).SignAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(key), data.try_into().map_err(|e| e.into())?.abi(), result__.as_mut_ptr()).from_abi::>(result__) }) } #[doc = "*Required features: `\"Foundation\"`, `\"Storage_Streams\"`*"] #[cfg(all(feature = "Foundation", feature = "Storage_Streams"))] - pub fn SignHashedDataAsync<'a, P0, P1, E1>(key: P0, data: P1) -> ::windows::core::Result> + pub fn SignHashedDataAsync<'a, P0, E0>(key: &CryptographicKey, data: P0) -> ::windows::core::Result> where - P0: ::std::convert::Into<::windows::core::InParam<'a, CryptographicKey>>, - P1: ::std::convert::TryInto<::windows::core::InParam<'a, super::super::super::Storage::Streams::IBuffer>, Error = E1>, - E1: ::std::convert::Into<::windows::core::Error>, + P0: ::std::convert::TryInto<::windows::core::InParam<'a, super::super::super::Storage::Streams::IBuffer>, Error = E0>, + E0: ::std::convert::Into<::windows::core::Error>, { Self::ICryptographicEngineStatics2(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).SignHashedDataAsync)(::windows::core::Vtable::as_raw(this), key.into().abi(), data.try_into().map_err(|e| e.into())?.abi(), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).SignHashedDataAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(key), data.try_into().map_err(|e| e.into())?.abi(), result__.as_mut_ptr()).from_abi::>(result__) }) } #[doc(hidden)] @@ -2510,24 +2495,18 @@ pub struct PersistedKeyProvider; impl PersistedKeyProvider { #[doc = "*Required features: `\"Foundation\"`, `\"Security_Cryptography_Certificates\"`*"] #[cfg(all(feature = "Foundation", feature = "Security_Cryptography_Certificates"))] - pub fn OpenKeyPairFromCertificateAsync<'a, P0>(certificate: P0, hashalgorithmname: &::windows::core::HSTRING, padding: CryptographicPadding) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::Certificates::Certificate>>, - { + pub fn OpenKeyPairFromCertificateAsync(certificate: &super::Certificates::Certificate, hashalgorithmname: &::windows::core::HSTRING, padding: CryptographicPadding) -> ::windows::core::Result> { Self::IPersistedKeyProviderStatics(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).OpenKeyPairFromCertificateAsync)(::windows::core::Vtable::as_raw(this), certificate.into().abi(), ::core::mem::transmute_copy(hashalgorithmname), padding, result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).OpenKeyPairFromCertificateAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(certificate), ::core::mem::transmute_copy(hashalgorithmname), padding, result__.as_mut_ptr()).from_abi::>(result__) }) } #[doc = "*Required features: `\"Security_Cryptography_Certificates\"`*"] #[cfg(feature = "Security_Cryptography_Certificates")] - pub fn OpenPublicKeyFromCertificate<'a, P0>(certificate: P0, hashalgorithmname: &::windows::core::HSTRING, padding: CryptographicPadding) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::Certificates::Certificate>>, - { + pub fn OpenPublicKeyFromCertificate(certificate: &super::Certificates::Certificate, hashalgorithmname: &::windows::core::HSTRING, padding: CryptographicPadding) -> ::windows::core::Result { Self::IPersistedKeyProviderStatics(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).OpenPublicKeyFromCertificate)(::windows::core::Vtable::as_raw(this), certificate.into().abi(), ::core::mem::transmute_copy(hashalgorithmname), padding, result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).OpenPublicKeyFromCertificate)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(certificate), ::core::mem::transmute_copy(hashalgorithmname), padding, result__.as_mut_ptr()).from_abi::(result__) }) } #[doc(hidden)] diff --git a/crates/libs/windows/src/Windows/Security/DataProtection/mod.rs b/crates/libs/windows/src/Windows/Security/DataProtection/mod.rs index d8fde1d4fa..3164e7f07f 100644 --- a/crates/libs/windows/src/Windows/Security/DataProtection/mod.rs +++ b/crates/libs/windows/src/Windows/Security/DataProtection/mod.rs @@ -336,14 +336,11 @@ impl UserDataProtectionManager { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn DataAvailabilityStateChanged<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn DataAvailabilityStateChanged(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).DataAvailabilityStateChanged)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).DataAvailabilityStateChanged)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -360,13 +357,10 @@ impl UserDataProtectionManager { } #[doc = "*Required features: `\"System\"`*"] #[cfg(feature = "System")] - pub fn TryGetForUser<'a, P0>(user: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::System::User>>, - { + pub fn TryGetForUser(user: &super::super::System::User) -> ::windows::core::Result { Self::IUserDataProtectionManagerStatics(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).TryGetForUser)(::windows::core::Vtable::as_raw(this), user.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).TryGetForUser)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(user), result__.as_mut_ptr()).from_abi::(result__) }) } #[doc(hidden)] diff --git a/crates/libs/windows/src/Windows/Security/EnterpriseData/mod.rs b/crates/libs/windows/src/Windows/Security/EnterpriseData/mod.rs index 080065cb8e..2c405b6306 100644 --- a/crates/libs/windows/src/Windows/Security/EnterpriseData/mod.rs +++ b/crates/libs/windows/src/Windows/Security/EnterpriseData/mod.rs @@ -1131,15 +1131,14 @@ impl FileProtectionManager { } #[doc = "*Required features: `\"Foundation\"`, `\"Storage\"`*"] #[cfg(all(feature = "Foundation", feature = "Storage"))] - pub fn UnprotectWithOptionsAsync<'a, P0, E0, P1>(target: P0, options: P1) -> ::windows::core::Result> + pub fn UnprotectWithOptionsAsync<'a, P0, E0>(target: P0, options: &FileUnprotectOptions) -> ::windows::core::Result> where P0: ::std::convert::TryInto<::windows::core::InParam<'a, super::super::Storage::IStorageItem>, Error = E0>, E0: ::std::convert::Into<::windows::core::Error>, - P1: ::std::convert::Into<::windows::core::InParam<'a, FileUnprotectOptions>>, { Self::IFileProtectionManagerStatics3(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).UnprotectWithOptionsAsync)(::windows::core::Vtable::as_raw(this), target.try_into().map_err(|e| e.into())?.abi(), options.into().abi(), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).UnprotectWithOptionsAsync)(::windows::core::Vtable::as_raw(this), target.try_into().map_err(|e| e.into())?.abi(), ::core::mem::transmute_copy(options), result__.as_mut_ptr()).from_abi::>(result__) }) } #[doc(hidden)] @@ -2006,13 +2005,10 @@ impl ProtectionPolicyManager { } #[doc = "*Required features: `\"Foundation\"`, `\"Networking\"`*"] #[cfg(all(feature = "Foundation", feature = "Networking"))] - pub fn GetPrimaryManagedIdentityForNetworkEndpointAsync<'a, P0>(endpointhost: P0) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Networking::HostName>>, - { + pub fn GetPrimaryManagedIdentityForNetworkEndpointAsync(endpointhost: &super::super::Networking::HostName) -> ::windows::core::Result> { Self::IProtectionPolicyManagerStatics(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).GetPrimaryManagedIdentityForNetworkEndpointAsync)(::windows::core::Vtable::as_raw(this), endpointhost.into().abi(), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).GetPrimaryManagedIdentityForNetworkEndpointAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(endpointhost), result__.as_mut_ptr()).from_abi::>(result__) }) } pub fn RevokeContent(identity: &::windows::core::HSTRING) -> ::windows::core::Result<()> { @@ -2026,13 +2022,10 @@ impl ProtectionPolicyManager { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn ProtectedAccessSuspending<'a, P0>(handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::EventHandler>>, - { + pub fn ProtectedAccessSuspending(handler: &super::super::Foundation::EventHandler) -> ::windows::core::Result { Self::IProtectionPolicyManagerStatics(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).ProtectedAccessSuspending)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).ProtectedAccessSuspending)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) }) } #[doc = "*Required features: `\"Foundation\"`*"] @@ -2042,13 +2035,10 @@ impl ProtectionPolicyManager { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn ProtectedAccessResumed<'a, P0>(handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::EventHandler>>, - { + pub fn ProtectedAccessResumed(handler: &super::super::Foundation::EventHandler) -> ::windows::core::Result { Self::IProtectionPolicyManagerStatics(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).ProtectedAccessResumed)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).ProtectedAccessResumed)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) }) } #[doc = "*Required features: `\"Foundation\"`*"] @@ -2058,13 +2048,10 @@ impl ProtectionPolicyManager { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn ProtectedContentRevoked<'a, P0>(handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::EventHandler>>, - { + pub fn ProtectedContentRevoked(handler: &super::super::Foundation::EventHandler) -> ::windows::core::Result { Self::IProtectionPolicyManagerStatics(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).ProtectedContentRevoked)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).ProtectedContentRevoked)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) }) } #[doc = "*Required features: `\"Foundation\"`*"] @@ -2128,13 +2115,10 @@ impl ProtectionPolicyManager { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn PolicyChanged<'a, P0>(handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::EventHandler<::windows::core::IInspectable>>>, - { + pub fn PolicyChanged(handler: &super::super::Foundation::EventHandler<::windows::core::IInspectable>) -> ::windows::core::Result { Self::IProtectionPolicyManagerStatics2(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).PolicyChanged)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).PolicyChanged)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) }) } #[doc = "*Required features: `\"Foundation\"`*"] @@ -2150,53 +2134,38 @@ impl ProtectionPolicyManager { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn RequestAccessWithAuditingInfoAsync<'a, P0>(sourceidentity: &::windows::core::HSTRING, targetidentity: &::windows::core::HSTRING, auditinfo: P0) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, ProtectionPolicyAuditInfo>>, - { + pub fn RequestAccessWithAuditingInfoAsync(sourceidentity: &::windows::core::HSTRING, targetidentity: &::windows::core::HSTRING, auditinfo: &ProtectionPolicyAuditInfo) -> ::windows::core::Result> { Self::IProtectionPolicyManagerStatics3(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).RequestAccessWithAuditingInfoAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(sourceidentity), ::core::mem::transmute_copy(targetidentity), auditinfo.into().abi(), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).RequestAccessWithAuditingInfoAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(sourceidentity), ::core::mem::transmute_copy(targetidentity), ::core::mem::transmute_copy(auditinfo), result__.as_mut_ptr()).from_abi::>(result__) }) } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn RequestAccessWithMessageAsync<'a, P0>(sourceidentity: &::windows::core::HSTRING, targetidentity: &::windows::core::HSTRING, auditinfo: P0, messagefromapp: &::windows::core::HSTRING) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, ProtectionPolicyAuditInfo>>, - { + pub fn RequestAccessWithMessageAsync(sourceidentity: &::windows::core::HSTRING, targetidentity: &::windows::core::HSTRING, auditinfo: &ProtectionPolicyAuditInfo, messagefromapp: &::windows::core::HSTRING) -> ::windows::core::Result> { Self::IProtectionPolicyManagerStatics3(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).RequestAccessWithMessageAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(sourceidentity), ::core::mem::transmute_copy(targetidentity), auditinfo.into().abi(), ::core::mem::transmute_copy(messagefromapp), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).RequestAccessWithMessageAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(sourceidentity), ::core::mem::transmute_copy(targetidentity), ::core::mem::transmute_copy(auditinfo), ::core::mem::transmute_copy(messagefromapp), result__.as_mut_ptr()).from_abi::>(result__) }) } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn RequestAccessForAppWithAuditingInfoAsync<'a, P0>(sourceidentity: &::windows::core::HSTRING, apppackagefamilyname: &::windows::core::HSTRING, auditinfo: P0) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, ProtectionPolicyAuditInfo>>, - { + pub fn RequestAccessForAppWithAuditingInfoAsync(sourceidentity: &::windows::core::HSTRING, apppackagefamilyname: &::windows::core::HSTRING, auditinfo: &ProtectionPolicyAuditInfo) -> ::windows::core::Result> { Self::IProtectionPolicyManagerStatics3(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).RequestAccessForAppWithAuditingInfoAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(sourceidentity), ::core::mem::transmute_copy(apppackagefamilyname), auditinfo.into().abi(), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).RequestAccessForAppWithAuditingInfoAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(sourceidentity), ::core::mem::transmute_copy(apppackagefamilyname), ::core::mem::transmute_copy(auditinfo), result__.as_mut_ptr()).from_abi::>(result__) }) } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn RequestAccessForAppWithMessageAsync<'a, P0>(sourceidentity: &::windows::core::HSTRING, apppackagefamilyname: &::windows::core::HSTRING, auditinfo: P0, messagefromapp: &::windows::core::HSTRING) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, ProtectionPolicyAuditInfo>>, - { + pub fn RequestAccessForAppWithMessageAsync(sourceidentity: &::windows::core::HSTRING, apppackagefamilyname: &::windows::core::HSTRING, auditinfo: &ProtectionPolicyAuditInfo, messagefromapp: &::windows::core::HSTRING) -> ::windows::core::Result> { Self::IProtectionPolicyManagerStatics3(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).RequestAccessForAppWithMessageAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(sourceidentity), ::core::mem::transmute_copy(apppackagefamilyname), auditinfo.into().abi(), ::core::mem::transmute_copy(messagefromapp), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).RequestAccessForAppWithMessageAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(sourceidentity), ::core::mem::transmute_copy(apppackagefamilyname), ::core::mem::transmute_copy(auditinfo), ::core::mem::transmute_copy(messagefromapp), result__.as_mut_ptr()).from_abi::>(result__) }) } - pub fn LogAuditEvent<'a, P0>(sourceidentity: &::windows::core::HSTRING, targetidentity: &::windows::core::HSTRING, auditinfo: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, ProtectionPolicyAuditInfo>>, - { - Self::IProtectionPolicyManagerStatics3(|this| unsafe { (::windows::core::Vtable::vtable(this).LogAuditEvent)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(sourceidentity), ::core::mem::transmute_copy(targetidentity), auditinfo.into().abi()).ok() }) + pub fn LogAuditEvent(sourceidentity: &::windows::core::HSTRING, targetidentity: &::windows::core::HSTRING, auditinfo: &ProtectionPolicyAuditInfo) -> ::windows::core::Result<()> { + Self::IProtectionPolicyManagerStatics3(|this| unsafe { (::windows::core::Vtable::vtable(this).LogAuditEvent)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(sourceidentity), ::core::mem::transmute_copy(targetidentity), ::core::mem::transmute_copy(auditinfo)).ok() }) } pub fn IsRoamableProtectionEnabled(identity: &::windows::core::HSTRING) -> ::windows::core::Result { Self::IProtectionPolicyManagerStatics4(|this| unsafe { @@ -2206,76 +2175,66 @@ impl ProtectionPolicyManager { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn RequestAccessWithBehaviorAsync<'a, P0>(sourceidentity: &::windows::core::HSTRING, targetidentity: &::windows::core::HSTRING, auditinfo: P0, messagefromapp: &::windows::core::HSTRING, behavior: ProtectionPolicyRequestAccessBehavior) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, ProtectionPolicyAuditInfo>>, - { + pub fn RequestAccessWithBehaviorAsync(sourceidentity: &::windows::core::HSTRING, targetidentity: &::windows::core::HSTRING, auditinfo: &ProtectionPolicyAuditInfo, messagefromapp: &::windows::core::HSTRING, behavior: ProtectionPolicyRequestAccessBehavior) -> ::windows::core::Result> { Self::IProtectionPolicyManagerStatics4(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).RequestAccessWithBehaviorAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(sourceidentity), ::core::mem::transmute_copy(targetidentity), auditinfo.into().abi(), ::core::mem::transmute_copy(messagefromapp), behavior, result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).RequestAccessWithBehaviorAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(sourceidentity), ::core::mem::transmute_copy(targetidentity), ::core::mem::transmute_copy(auditinfo), ::core::mem::transmute_copy(messagefromapp), behavior, result__.as_mut_ptr()).from_abi::>(result__) }) } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn RequestAccessForAppWithBehaviorAsync<'a, P0>(sourceidentity: &::windows::core::HSTRING, apppackagefamilyname: &::windows::core::HSTRING, auditinfo: P0, messagefromapp: &::windows::core::HSTRING, behavior: ProtectionPolicyRequestAccessBehavior) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, ProtectionPolicyAuditInfo>>, - { + pub fn RequestAccessForAppWithBehaviorAsync(sourceidentity: &::windows::core::HSTRING, apppackagefamilyname: &::windows::core::HSTRING, auditinfo: &ProtectionPolicyAuditInfo, messagefromapp: &::windows::core::HSTRING, behavior: ProtectionPolicyRequestAccessBehavior) -> ::windows::core::Result> { Self::IProtectionPolicyManagerStatics4(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).RequestAccessForAppWithBehaviorAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(sourceidentity), ::core::mem::transmute_copy(apppackagefamilyname), auditinfo.into().abi(), ::core::mem::transmute_copy(messagefromapp), behavior, result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).RequestAccessForAppWithBehaviorAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(sourceidentity), ::core::mem::transmute_copy(apppackagefamilyname), ::core::mem::transmute_copy(auditinfo), ::core::mem::transmute_copy(messagefromapp), behavior, result__.as_mut_ptr()).from_abi::>(result__) }) } #[doc = "*Required features: `\"Foundation_Collections\"`, `\"Storage\"`*"] #[cfg(all(feature = "Foundation_Collections", feature = "Storage"))] - pub fn RequestAccessToFilesForAppAsync<'a, P0, E0, P1>(sourceitemlist: P0, apppackagefamilyname: &::windows::core::HSTRING, auditinfo: P1) -> ::windows::core::Result> + pub fn RequestAccessToFilesForAppAsync<'a, P0, E0>(sourceitemlist: P0, apppackagefamilyname: &::windows::core::HSTRING, auditinfo: &ProtectionPolicyAuditInfo) -> ::windows::core::Result> where P0: ::std::convert::TryInto<::windows::core::InParam<'a, super::super::Foundation::Collections::IIterable>, Error = E0>, E0: ::std::convert::Into<::windows::core::Error>, - P1: ::std::convert::Into<::windows::core::InParam<'a, ProtectionPolicyAuditInfo>>, { Self::IProtectionPolicyManagerStatics4(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).RequestAccessToFilesForAppAsync)(::windows::core::Vtable::as_raw(this), sourceitemlist.try_into().map_err(|e| e.into())?.abi(), ::core::mem::transmute_copy(apppackagefamilyname), auditinfo.into().abi(), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).RequestAccessToFilesForAppAsync)(::windows::core::Vtable::as_raw(this), sourceitemlist.try_into().map_err(|e| e.into())?.abi(), ::core::mem::transmute_copy(apppackagefamilyname), ::core::mem::transmute_copy(auditinfo), result__.as_mut_ptr()).from_abi::>(result__) }) } #[doc = "*Required features: `\"Foundation_Collections\"`, `\"Storage\"`*"] #[cfg(all(feature = "Foundation_Collections", feature = "Storage"))] - pub fn RequestAccessToFilesForAppWithMessageAndBehaviorAsync<'a, P0, E0, P1>(sourceitemlist: P0, apppackagefamilyname: &::windows::core::HSTRING, auditinfo: P1, messagefromapp: &::windows::core::HSTRING, behavior: ProtectionPolicyRequestAccessBehavior) -> ::windows::core::Result> + pub fn RequestAccessToFilesForAppWithMessageAndBehaviorAsync<'a, P0, E0>(sourceitemlist: P0, apppackagefamilyname: &::windows::core::HSTRING, auditinfo: &ProtectionPolicyAuditInfo, messagefromapp: &::windows::core::HSTRING, behavior: ProtectionPolicyRequestAccessBehavior) -> ::windows::core::Result> where P0: ::std::convert::TryInto<::windows::core::InParam<'a, super::super::Foundation::Collections::IIterable>, Error = E0>, E0: ::std::convert::Into<::windows::core::Error>, - P1: ::std::convert::Into<::windows::core::InParam<'a, ProtectionPolicyAuditInfo>>, { Self::IProtectionPolicyManagerStatics4(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).RequestAccessToFilesForAppWithMessageAndBehaviorAsync)(::windows::core::Vtable::as_raw(this), sourceitemlist.try_into().map_err(|e| e.into())?.abi(), ::core::mem::transmute_copy(apppackagefamilyname), auditinfo.into().abi(), ::core::mem::transmute_copy(messagefromapp), behavior, result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).RequestAccessToFilesForAppWithMessageAndBehaviorAsync)(::windows::core::Vtable::as_raw(this), sourceitemlist.try_into().map_err(|e| e.into())?.abi(), ::core::mem::transmute_copy(apppackagefamilyname), ::core::mem::transmute_copy(auditinfo), ::core::mem::transmute_copy(messagefromapp), behavior, result__.as_mut_ptr()).from_abi::>(result__) }) } #[doc = "*Required features: `\"Foundation_Collections\"`, `\"Storage\"`*"] #[cfg(all(feature = "Foundation_Collections", feature = "Storage"))] - pub fn RequestAccessToFilesForProcessAsync<'a, P0, E0, P1>(sourceitemlist: P0, processid: u32, auditinfo: P1) -> ::windows::core::Result> + pub fn RequestAccessToFilesForProcessAsync<'a, P0, E0>(sourceitemlist: P0, processid: u32, auditinfo: &ProtectionPolicyAuditInfo) -> ::windows::core::Result> where P0: ::std::convert::TryInto<::windows::core::InParam<'a, super::super::Foundation::Collections::IIterable>, Error = E0>, E0: ::std::convert::Into<::windows::core::Error>, - P1: ::std::convert::Into<::windows::core::InParam<'a, ProtectionPolicyAuditInfo>>, { Self::IProtectionPolicyManagerStatics4(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).RequestAccessToFilesForProcessAsync)(::windows::core::Vtable::as_raw(this), sourceitemlist.try_into().map_err(|e| e.into())?.abi(), processid, auditinfo.into().abi(), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).RequestAccessToFilesForProcessAsync)(::windows::core::Vtable::as_raw(this), sourceitemlist.try_into().map_err(|e| e.into())?.abi(), processid, ::core::mem::transmute_copy(auditinfo), result__.as_mut_ptr()).from_abi::>(result__) }) } #[doc = "*Required features: `\"Foundation_Collections\"`, `\"Storage\"`*"] #[cfg(all(feature = "Foundation_Collections", feature = "Storage"))] - pub fn RequestAccessToFilesForProcessWithMessageAndBehaviorAsync<'a, P0, E0, P1>(sourceitemlist: P0, processid: u32, auditinfo: P1, messagefromapp: &::windows::core::HSTRING, behavior: ProtectionPolicyRequestAccessBehavior) -> ::windows::core::Result> + pub fn RequestAccessToFilesForProcessWithMessageAndBehaviorAsync<'a, P0, E0>(sourceitemlist: P0, processid: u32, auditinfo: &ProtectionPolicyAuditInfo, messagefromapp: &::windows::core::HSTRING, behavior: ProtectionPolicyRequestAccessBehavior) -> ::windows::core::Result> where P0: ::std::convert::TryInto<::windows::core::InParam<'a, super::super::Foundation::Collections::IIterable>, Error = E0>, E0: ::std::convert::Into<::windows::core::Error>, - P1: ::std::convert::Into<::windows::core::InParam<'a, ProtectionPolicyAuditInfo>>, { Self::IProtectionPolicyManagerStatics4(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).RequestAccessToFilesForProcessWithMessageAndBehaviorAsync)(::windows::core::Vtable::as_raw(this), sourceitemlist.try_into().map_err(|e| e.into())?.abi(), processid, auditinfo.into().abi(), ::core::mem::transmute_copy(messagefromapp), behavior, result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).RequestAccessToFilesForProcessWithMessageAndBehaviorAsync)(::windows::core::Vtable::as_raw(this), sourceitemlist.try_into().map_err(|e| e.into())?.abi(), processid, ::core::mem::transmute_copy(auditinfo), ::core::mem::transmute_copy(messagefromapp), behavior, result__.as_mut_ptr()).from_abi::>(result__) }) } #[doc = "*Required features: `\"Foundation\"`, `\"Storage\"`*"] diff --git a/crates/libs/windows/src/Windows/Security/Isolation/mod.rs b/crates/libs/windows/src/Windows/Security/Isolation/mod.rs index 4396c42aca..99a660b501 100644 --- a/crates/libs/windows/src/Windows/Security/Isolation/mod.rs +++ b/crates/libs/windows/src/Windows/Security/Isolation/mod.rs @@ -533,39 +533,29 @@ impl IsolatedWindowsEnvironment { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn StartProcessSilentlyWithTelemetryAsync<'a, P0>(&self, hostexepath: &::windows::core::HSTRING, arguments: &::windows::core::HSTRING, activator: IsolatedWindowsEnvironmentActivator, telemetryparameters: P0) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, IsolatedWindowsEnvironmentTelemetryParameters>>, - { + pub fn StartProcessSilentlyWithTelemetryAsync(&self, hostexepath: &::windows::core::HSTRING, arguments: &::windows::core::HSTRING, activator: IsolatedWindowsEnvironmentActivator, telemetryparameters: &IsolatedWindowsEnvironmentTelemetryParameters) -> ::windows::core::Result> { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).StartProcessSilentlyWithTelemetryAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(hostexepath), ::core::mem::transmute_copy(arguments), activator, telemetryparameters.into().abi(), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).StartProcessSilentlyWithTelemetryAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(hostexepath), ::core::mem::transmute_copy(arguments), activator, ::core::mem::transmute_copy(telemetryparameters), result__.as_mut_ptr()).from_abi::>(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn ShareFolderAsync<'a, P0>(&self, hostfolder: &::windows::core::HSTRING, requestoptions: P0) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, IsolatedWindowsEnvironmentShareFolderRequestOptions>>, - { + pub fn ShareFolderAsync(&self, hostfolder: &::windows::core::HSTRING, requestoptions: &IsolatedWindowsEnvironmentShareFolderRequestOptions) -> ::windows::core::Result> { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).ShareFolderAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(hostfolder), requestoptions.into().abi(), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).ShareFolderAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(hostfolder), ::core::mem::transmute_copy(requestoptions), result__.as_mut_ptr()).from_abi::>(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn ShareFolderWithTelemetryAsync<'a, P0, P1>(&self, hostfolder: &::windows::core::HSTRING, requestoptions: P0, telemetryparameters: P1) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, IsolatedWindowsEnvironmentShareFolderRequestOptions>>, - P1: ::std::convert::Into<::windows::core::InParam<'a, IsolatedWindowsEnvironmentTelemetryParameters>>, - { + pub fn ShareFolderWithTelemetryAsync(&self, hostfolder: &::windows::core::HSTRING, requestoptions: &IsolatedWindowsEnvironmentShareFolderRequestOptions, telemetryparameters: &IsolatedWindowsEnvironmentTelemetryParameters) -> ::windows::core::Result> { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).ShareFolderWithTelemetryAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(hostfolder), requestoptions.into().abi(), telemetryparameters.into().abi(), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).ShareFolderWithTelemetryAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(hostfolder), ::core::mem::transmute_copy(requestoptions), ::core::mem::transmute_copy(telemetryparameters), result__.as_mut_ptr()).from_abi::>(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -579,14 +569,11 @@ impl IsolatedWindowsEnvironment { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn LaunchFileWithUIAndTelemetryAsync<'a, P0>(&self, appexepath: &::windows::core::HSTRING, argumentstemplate: &::windows::core::HSTRING, filepath: &::windows::core::HSTRING, telemetryparameters: P0) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, IsolatedWindowsEnvironmentTelemetryParameters>>, - { + pub fn LaunchFileWithUIAndTelemetryAsync(&self, appexepath: &::windows::core::HSTRING, argumentstemplate: &::windows::core::HSTRING, filepath: &::windows::core::HSTRING, telemetryparameters: &IsolatedWindowsEnvironmentTelemetryParameters) -> ::windows::core::Result> { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).LaunchFileWithUIAndTelemetryAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(appexepath), ::core::mem::transmute_copy(argumentstemplate), ::core::mem::transmute_copy(filepath), telemetryparameters.into().abi(), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).LaunchFileWithUIAndTelemetryAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(appexepath), ::core::mem::transmute_copy(argumentstemplate), ::core::mem::transmute_copy(filepath), ::core::mem::transmute_copy(telemetryparameters), result__.as_mut_ptr()).from_abi::>(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -600,24 +587,18 @@ impl IsolatedWindowsEnvironment { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn TerminateWithTelemetryAsync<'a, P0>(&self, telemetryparameters: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, IsolatedWindowsEnvironmentTelemetryParameters>>, - { + pub fn TerminateWithTelemetryAsync(&self, telemetryparameters: &IsolatedWindowsEnvironmentTelemetryParameters) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).TerminateWithTelemetryAsync)(::windows::core::Vtable::as_raw(this), telemetryparameters.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).TerminateWithTelemetryAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(telemetryparameters), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation_Collections\"`*"] #[cfg(feature = "Foundation_Collections")] - pub fn RegisterMessageReceiver<'a, P0>(&self, receiverid: ::windows::core::GUID, messagereceivedcallback: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, MessageReceivedCallback>>, - { + pub fn RegisterMessageReceiver(&self, receiverid: ::windows::core::GUID, messagereceivedcallback: &MessageReceivedCallback) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).RegisterMessageReceiver)(::windows::core::Vtable::as_raw(this), receiverid, messagereceivedcallback.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).RegisterMessageReceiver)(::windows::core::Vtable::as_raw(this), receiverid, ::core::mem::transmute_copy(messagereceivedcallback)).ok() } } pub fn UnregisterMessageReceiver(&self, receiverid: ::windows::core::GUID) -> ::windows::core::Result<()> { let this = self; @@ -638,16 +619,15 @@ impl IsolatedWindowsEnvironment { } #[doc = "*Required features: `\"Foundation_Collections\"`*"] #[cfg(feature = "Foundation_Collections")] - pub fn PostMessageToReceiverWithTelemetryAsync<'a, P0, E0, P1>(&self, receiverid: ::windows::core::GUID, message: P0, telemetryparameters: P1) -> ::windows::core::Result> + pub fn PostMessageToReceiverWithTelemetryAsync<'a, P0, E0>(&self, receiverid: ::windows::core::GUID, message: P0, telemetryparameters: &IsolatedWindowsEnvironmentTelemetryParameters) -> ::windows::core::Result> where P0: ::std::convert::TryInto<::windows::core::InParam<'a, super::super::Foundation::Collections::IIterable<::windows::core::IInspectable>>, Error = E0>, E0: ::std::convert::Into<::windows::core::Error>, - P1: ::std::convert::Into<::windows::core::InParam<'a, IsolatedWindowsEnvironmentTelemetryParameters>>, { let this = &::windows::core::Interface::cast::(self)?; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).PostMessageToReceiverWithTelemetryAsync)(::windows::core::Vtable::as_raw(this), receiverid, message.try_into().map_err(|e| e.into())?.abi(), telemetryparameters.into().abi(), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).PostMessageToReceiverWithTelemetryAsync)(::windows::core::Vtable::as_raw(this), receiverid, message.try_into().map_err(|e| e.into())?.abi(), ::core::mem::transmute_copy(telemetryparameters), result__.as_mut_ptr()).from_abi::>(result__) } } pub fn GetUserInfo(&self) -> ::windows::core::Result { @@ -659,50 +639,36 @@ impl IsolatedWindowsEnvironment { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn ShareFileAsync<'a, P0>(&self, filepath: &::windows::core::HSTRING, options: P0) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, IsolatedWindowsEnvironmentShareFileRequestOptions>>, - { + pub fn ShareFileAsync(&self, filepath: &::windows::core::HSTRING, options: &IsolatedWindowsEnvironmentShareFileRequestOptions) -> ::windows::core::Result> { let this = &::windows::core::Interface::cast::(self)?; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).ShareFileAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(filepath), options.into().abi(), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).ShareFileAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(filepath), ::core::mem::transmute_copy(options), result__.as_mut_ptr()).from_abi::>(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn ShareFileWithTelemetryAsync<'a, P0, P1>(&self, filepath: &::windows::core::HSTRING, options: P0, telemetryparameters: P1) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, IsolatedWindowsEnvironmentShareFileRequestOptions>>, - P1: ::std::convert::Into<::windows::core::InParam<'a, IsolatedWindowsEnvironmentTelemetryParameters>>, - { + pub fn ShareFileWithTelemetryAsync(&self, filepath: &::windows::core::HSTRING, options: &IsolatedWindowsEnvironmentShareFileRequestOptions, telemetryparameters: &IsolatedWindowsEnvironmentTelemetryParameters) -> ::windows::core::Result> { let this = &::windows::core::Interface::cast::(self)?; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).ShareFileWithTelemetryAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(filepath), options.into().abi(), telemetryparameters.into().abi(), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).ShareFileWithTelemetryAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(filepath), ::core::mem::transmute_copy(options), ::core::mem::transmute_copy(telemetryparameters), result__.as_mut_ptr()).from_abi::>(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn CreateAsync<'a, P0>(options: P0) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, IsolatedWindowsEnvironmentOptions>>, - { + pub fn CreateAsync(options: &IsolatedWindowsEnvironmentOptions) -> ::windows::core::Result> { Self::IIsolatedWindowsEnvironmentFactory(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).CreateAsync)(::windows::core::Vtable::as_raw(this), options.into().abi(), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).CreateAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(options), result__.as_mut_ptr()).from_abi::>(result__) }) } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn CreateWithTelemetryAsync<'a, P0, P1>(options: P0, telemetryparameters: P1) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, IsolatedWindowsEnvironmentOptions>>, - P1: ::std::convert::Into<::windows::core::InParam<'a, IsolatedWindowsEnvironmentTelemetryParameters>>, - { + pub fn CreateWithTelemetryAsync(options: &IsolatedWindowsEnvironmentOptions, telemetryparameters: &IsolatedWindowsEnvironmentTelemetryParameters) -> ::windows::core::Result> { Self::IIsolatedWindowsEnvironmentFactory(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).CreateWithTelemetryAsync)(::windows::core::Vtable::as_raw(this), options.into().abi(), telemetryparameters.into().abi(), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).CreateWithTelemetryAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(options), ::core::mem::transmute_copy(telemetryparameters), result__.as_mut_ptr()).from_abi::>(result__) }) } pub fn GetById(environmentid: &::windows::core::HSTRING) -> ::windows::core::Result { @@ -1281,13 +1247,10 @@ unsafe impl ::core::marker::Sync for IsolatedWindowsEnvironmentOptions {} #[doc = "*Required features: `\"Security_Isolation\"`*"] pub struct IsolatedWindowsEnvironmentOwnerRegistration; impl IsolatedWindowsEnvironmentOwnerRegistration { - pub fn Register<'a, P0>(ownername: &::windows::core::HSTRING, ownerregistrationdata: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, IsolatedWindowsEnvironmentOwnerRegistrationData>>, - { + pub fn Register(ownername: &::windows::core::HSTRING, ownerregistrationdata: &IsolatedWindowsEnvironmentOwnerRegistrationData) -> ::windows::core::Result { Self::IIsolatedWindowsEnvironmentOwnerRegistrationStatics(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).Register)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(ownername), ownerregistrationdata.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).Register)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(ownername), ::core::mem::transmute_copy(ownerregistrationdata), result__.as_mut_ptr()).from_abi::(result__) }) } pub fn Unregister(ownername: &::windows::core::HSTRING) -> ::windows::core::Result<()> { @@ -2316,11 +2279,8 @@ impl IsolatedWindowsHostMessenger { } #[doc = "*Required features: `\"Foundation_Collections\"`*"] #[cfg(feature = "Foundation_Collections")] - pub fn RegisterHostMessageReceiver<'a, P0>(receiverid: ::windows::core::GUID, hostmessagereceivedcallback: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, HostMessageReceivedCallback>>, - { - Self::IIsolatedWindowsHostMessengerStatics2(|this| unsafe { (::windows::core::Vtable::vtable(this).RegisterHostMessageReceiver)(::windows::core::Vtable::as_raw(this), receiverid, hostmessagereceivedcallback.into().abi()).ok() }) + pub fn RegisterHostMessageReceiver(receiverid: ::windows::core::GUID, hostmessagereceivedcallback: &HostMessageReceivedCallback) -> ::windows::core::Result<()> { + Self::IIsolatedWindowsHostMessengerStatics2(|this| unsafe { (::windows::core::Vtable::vtable(this).RegisterHostMessageReceiver)(::windows::core::Vtable::as_raw(this), receiverid, ::core::mem::transmute_copy(hostmessagereceivedcallback)).ok() }) } pub fn UnregisterHostMessageReceiver(receiverid: ::windows::core::GUID) -> ::windows::core::Result<()> { Self::IIsolatedWindowsHostMessengerStatics2(|this| unsafe { (::windows::core::Vtable::vtable(this).UnregisterHostMessageReceiver)(::windows::core::Vtable::as_raw(this), receiverid).ok() }) diff --git a/crates/libs/windows/src/Windows/Services/Cortana/mod.rs b/crates/libs/windows/src/Windows/Services/Cortana/mod.rs index 34600fa91d..03be959428 100644 --- a/crates/libs/windows/src/Windows/Services/Cortana/mod.rs +++ b/crates/libs/windows/src/Windows/Services/Cortana/mod.rs @@ -259,16 +259,15 @@ impl CortanaActionableInsights { } #[doc = "*Required features: `\"Foundation\"`, `\"Storage_Streams\"`, `\"deprecated\"`*"] #[cfg(all(feature = "Foundation", feature = "Storage_Streams", feature = "deprecated"))] - pub fn ShowInsightsForImageWithOptionsAsync<'a, P0, E0, P1>(&self, imagestream: P0, options: P1) -> ::windows::core::Result + pub fn ShowInsightsForImageWithOptionsAsync<'a, P0, E0>(&self, imagestream: P0, options: &CortanaActionableInsightsOptions) -> ::windows::core::Result where P0: ::std::convert::TryInto<::windows::core::InParam<'a, super::super::Storage::Streams::IRandomAccessStreamReference>, Error = E0>, E0: ::std::convert::Into<::windows::core::Error>, - P1: ::std::convert::Into<::windows::core::InParam<'a, CortanaActionableInsightsOptions>>, { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).ShowInsightsForImageWithOptionsAsync)(::windows::core::Vtable::as_raw(this), imagestream.try_into().map_err(|e| e.into())?.abi(), options.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).ShowInsightsForImageWithOptionsAsync)(::windows::core::Vtable::as_raw(this), imagestream.try_into().map_err(|e| e.into())?.abi(), ::core::mem::transmute_copy(options), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`, `\"deprecated\"`*"] @@ -282,39 +281,29 @@ impl CortanaActionableInsights { } #[doc = "*Required features: `\"Foundation\"`, `\"deprecated\"`*"] #[cfg(all(feature = "Foundation", feature = "deprecated"))] - pub fn ShowInsightsForTextWithOptionsAsync<'a, P0>(&self, text: &::windows::core::HSTRING, options: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, CortanaActionableInsightsOptions>>, - { + pub fn ShowInsightsForTextWithOptionsAsync(&self, text: &::windows::core::HSTRING, options: &CortanaActionableInsightsOptions) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).ShowInsightsForTextWithOptionsAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(text), options.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).ShowInsightsForTextWithOptionsAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(text), ::core::mem::transmute_copy(options), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"ApplicationModel_DataTransfer\"`, `\"Foundation\"`, `\"deprecated\"`*"] #[cfg(all(feature = "ApplicationModel_DataTransfer", feature = "Foundation", feature = "deprecated"))] - pub fn ShowInsightsAsync<'a, P0>(&self, datapackage: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::ApplicationModel::DataTransfer::DataPackage>>, - { + pub fn ShowInsightsAsync(&self, datapackage: &super::super::ApplicationModel::DataTransfer::DataPackage) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).ShowInsightsAsync)(::windows::core::Vtable::as_raw(this), datapackage.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).ShowInsightsAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(datapackage), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"ApplicationModel_DataTransfer\"`, `\"Foundation\"`, `\"deprecated\"`*"] #[cfg(all(feature = "ApplicationModel_DataTransfer", feature = "Foundation", feature = "deprecated"))] - pub fn ShowInsightsWithOptionsAsync<'a, P0, P1>(&self, datapackage: P0, options: P1) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::ApplicationModel::DataTransfer::DataPackage>>, - P1: ::std::convert::Into<::windows::core::InParam<'a, CortanaActionableInsightsOptions>>, - { + pub fn ShowInsightsWithOptionsAsync(&self, datapackage: &super::super::ApplicationModel::DataTransfer::DataPackage, options: &CortanaActionableInsightsOptions) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).ShowInsightsWithOptionsAsync)(::windows::core::Vtable::as_raw(this), datapackage.into().abi(), options.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).ShowInsightsWithOptionsAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(datapackage), ::core::mem::transmute_copy(options), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"deprecated\"`*"] @@ -327,13 +316,10 @@ impl CortanaActionableInsights { } #[doc = "*Required features: `\"System\"`, `\"deprecated\"`*"] #[cfg(all(feature = "System", feature = "deprecated"))] - pub fn GetForUser<'a, P0>(user: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::System::User>>, - { + pub fn GetForUser(user: &super::super::System::User) -> ::windows::core::Result { Self::ICortanaActionableInsightsStatics(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).GetForUser)(::windows::core::Vtable::as_raw(this), user.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).GetForUser)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(user), result__.as_mut_ptr()).from_abi::(result__) }) } #[doc(hidden)] @@ -447,12 +433,9 @@ impl CortanaActionableInsightsOptions { } #[doc = "*Required features: `\"Foundation\"`, `\"deprecated\"`*"] #[cfg(all(feature = "Foundation", feature = "deprecated"))] - pub fn SetContentSourceWebLink<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::Uri>>, - { + pub fn SetContentSourceWebLink(&self, value: &super::super::Foundation::Uri) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).SetContentSourceWebLink)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetContentSourceWebLink)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } #[doc = "*Required features: `\"deprecated\"`*"] #[cfg(feature = "deprecated")] diff --git a/crates/libs/windows/src/Windows/Services/Maps/Guidance/mod.rs b/crates/libs/windows/src/Windows/Services/Maps/Guidance/mod.rs index d827caede2..862b999a68 100644 --- a/crates/libs/windows/src/Windows/Services/Maps/Guidance/mod.rs +++ b/crates/libs/windows/src/Windows/Services/Maps/Guidance/mod.rs @@ -881,19 +881,13 @@ unsafe impl ::core::marker::Sync for GuidanceMapMatchedCoordinate {} #[repr(transparent)] pub struct GuidanceNavigator(::windows::core::IUnknown); impl GuidanceNavigator { - pub fn StartNavigating<'a, P0>(&self, route: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, GuidanceRoute>>, - { + pub fn StartNavigating(&self, route: &GuidanceRoute) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).StartNavigating)(::windows::core::Vtable::as_raw(this), route.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).StartNavigating)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(route)).ok() } } - pub fn StartSimulating<'a, P0>(&self, route: P0, speedinmeterspersecond: i32) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, GuidanceRoute>>, - { + pub fn StartSimulating(&self, route: &GuidanceRoute, speedinmeterspersecond: i32) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).StartSimulating)(::windows::core::Vtable::as_raw(this), route.into().abi(), speedinmeterspersecond).ok() } + unsafe { (::windows::core::Vtable::vtable(this).StartSimulating)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(route), speedinmeterspersecond).ok() } } pub fn StartTracking(&self) -> ::windows::core::Result<()> { let this = self; @@ -939,14 +933,11 @@ impl GuidanceNavigator { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn GuidanceUpdated<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Foundation::TypedEventHandler>>, - { + pub fn GuidanceUpdated(&self, handler: &super::super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).GuidanceUpdated)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).GuidanceUpdated)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -957,14 +948,11 @@ impl GuidanceNavigator { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn DestinationReached<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Foundation::TypedEventHandler>>, - { + pub fn DestinationReached(&self, handler: &super::super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).DestinationReached)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).DestinationReached)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -975,14 +963,11 @@ impl GuidanceNavigator { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn Rerouting<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Foundation::TypedEventHandler>>, - { + pub fn Rerouting(&self, handler: &super::super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).Rerouting)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).Rerouting)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -993,14 +978,11 @@ impl GuidanceNavigator { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn Rerouted<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Foundation::TypedEventHandler>>, - { + pub fn Rerouted(&self, handler: &super::super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).Rerouted)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).Rerouted)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -1011,14 +993,11 @@ impl GuidanceNavigator { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn RerouteFailed<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Foundation::TypedEventHandler>>, - { + pub fn RerouteFailed(&self, handler: &super::super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).RerouteFailed)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).RerouteFailed)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -1029,14 +1008,11 @@ impl GuidanceNavigator { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn UserLocationLost<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Foundation::TypedEventHandler>>, - { + pub fn UserLocationLost(&self, handler: &super::super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).UserLocationLost)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).UserLocationLost)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -1047,14 +1023,11 @@ impl GuidanceNavigator { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn UserLocationRestored<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Foundation::TypedEventHandler>>, - { + pub fn UserLocationRestored(&self, handler: &super::super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).UserLocationRestored)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).UserLocationRestored)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -1069,32 +1042,23 @@ impl GuidanceNavigator { } #[doc = "*Required features: `\"Devices_Geolocation\"`*"] #[cfg(feature = "Devices_Geolocation")] - pub fn UpdateUserLocation<'a, P0>(&self, userlocation: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Devices::Geolocation::Geocoordinate>>, - { + pub fn UpdateUserLocation(&self, userlocation: &super::super::super::Devices::Geolocation::Geocoordinate) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).UpdateUserLocation)(::windows::core::Vtable::as_raw(this), userlocation.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).UpdateUserLocation)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(userlocation)).ok() } } #[doc = "*Required features: `\"Devices_Geolocation\"`*"] #[cfg(feature = "Devices_Geolocation")] - pub fn UpdateUserLocationWithPositionOverride<'a, P0>(&self, userlocation: P0, positionoverride: super::super::super::Devices::Geolocation::BasicGeoposition) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Devices::Geolocation::Geocoordinate>>, - { + pub fn UpdateUserLocationWithPositionOverride(&self, userlocation: &super::super::super::Devices::Geolocation::Geocoordinate, positionoverride: super::super::super::Devices::Geolocation::BasicGeoposition) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).UpdateUserLocationWithPositionOverride)(::windows::core::Vtable::as_raw(this), userlocation.into().abi(), positionoverride).ok() } + unsafe { (::windows::core::Vtable::vtable(this).UpdateUserLocationWithPositionOverride)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(userlocation), positionoverride).ok() } } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn AudioNotificationRequested<'a, P0>(&self, value: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Foundation::TypedEventHandler>>, - { + pub fn AudioNotificationRequested(&self, value: &super::super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = &::windows::core::Interface::cast::(self)?; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).AudioNotificationRequested)(::windows::core::Vtable::as_raw(this), value.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).AudioNotificationRequested)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -1593,22 +1557,16 @@ impl GuidanceRoute { (::windows::core::Vtable::vtable(this).ConvertToMapRoute)(::windows::core::Vtable::as_raw(this), result__.as_mut_ptr()).from_abi::(result__) } } - pub fn CanCreateFromMapRoute<'a, P0>(maproute: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::MapRoute>>, - { + pub fn CanCreateFromMapRoute(maproute: &super::MapRoute) -> ::windows::core::Result { Self::IGuidanceRouteStatics(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).CanCreateFromMapRoute)(::windows::core::Vtable::as_raw(this), maproute.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).CanCreateFromMapRoute)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(maproute), result__.as_mut_ptr()).from_abi::(result__) }) } - pub fn TryCreateFromMapRoute<'a, P0>(maproute: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::MapRoute>>, - { + pub fn TryCreateFromMapRoute(maproute: &super::MapRoute) -> ::windows::core::Result { Self::IGuidanceRouteStatics(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).TryCreateFromMapRoute)(::windows::core::Vtable::as_raw(this), maproute.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).TryCreateFromMapRoute)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(maproute), result__.as_mut_ptr()).from_abi::(result__) }) } #[doc(hidden)] diff --git a/crates/libs/windows/src/Windows/Services/Maps/LocalSearch/mod.rs b/crates/libs/windows/src/Windows/Services/Maps/LocalSearch/mod.rs index 90e5295bfc..8c4a9e63a3 100644 --- a/crates/libs/windows/src/Windows/Services/Maps/LocalSearch/mod.rs +++ b/crates/libs/windows/src/Windows/Services/Maps/LocalSearch/mod.rs @@ -373,13 +373,10 @@ pub struct LocalLocationFinder; impl LocalLocationFinder { #[doc = "*Required features: `\"Devices_Geolocation\"`, `\"Foundation\"`*"] #[cfg(all(feature = "Devices_Geolocation", feature = "Foundation"))] - pub fn FindLocalLocationsAsync<'a, P0>(searchterm: &::windows::core::HSTRING, searcharea: P0, localcategory: &::windows::core::HSTRING, maxresults: u32) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Devices::Geolocation::Geocircle>>, - { + pub fn FindLocalLocationsAsync(searchterm: &::windows::core::HSTRING, searcharea: &super::super::super::Devices::Geolocation::Geocircle, localcategory: &::windows::core::HSTRING, maxresults: u32) -> ::windows::core::Result> { Self::ILocalLocationFinderStatics(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).FindLocalLocationsAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(searchterm), searcharea.into().abi(), ::core::mem::transmute_copy(localcategory), maxresults, result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).FindLocalLocationsAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(searchterm), ::core::mem::transmute_copy(searcharea), ::core::mem::transmute_copy(localcategory), maxresults, result__.as_mut_ptr()).from_abi::>(result__) }) } #[doc(hidden)] @@ -669,13 +666,10 @@ unsafe impl ::core::marker::Sync for LocalLocationRatingInfo {} #[doc = "*Required features: `\"Services_Maps_LocalSearch\"`*"] pub struct PlaceInfoHelper; impl PlaceInfoHelper { - pub fn CreateFromLocalLocation<'a, P0>(location: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, LocalLocation>>, - { + pub fn CreateFromLocalLocation(location: &LocalLocation) -> ::windows::core::Result { Self::IPlaceInfoHelperStatics(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).CreateFromLocalLocation)(::windows::core::Vtable::as_raw(this), location.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).CreateFromLocalLocation)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(location), result__.as_mut_ptr()).from_abi::(result__) }) } #[doc(hidden)] diff --git a/crates/libs/windows/src/Windows/Services/Maps/OfflineMaps/mod.rs b/crates/libs/windows/src/Windows/Services/Maps/OfflineMaps/mod.rs index b3bb5db61c..0e9ab3200b 100644 --- a/crates/libs/windows/src/Windows/Services/Maps/OfflineMaps/mod.rs +++ b/crates/libs/windows/src/Windows/Services/Maps/OfflineMaps/mod.rs @@ -128,14 +128,11 @@ impl OfflineMapPackage { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn StatusChanged<'a, P0>(&self, value: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Foundation::TypedEventHandler>>, - { + pub fn StatusChanged(&self, value: &super::super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).StatusChanged)(::windows::core::Vtable::as_raw(this), value.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).StatusChanged)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -149,35 +146,26 @@ impl OfflineMapPackage { } #[doc = "*Required features: `\"Devices_Geolocation\"`, `\"Foundation\"`*"] #[cfg(all(feature = "Devices_Geolocation", feature = "Foundation"))] - pub fn FindPackagesAsync<'a, P0>(querypoint: P0) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Devices::Geolocation::Geopoint>>, - { + pub fn FindPackagesAsync(querypoint: &super::super::super::Devices::Geolocation::Geopoint) -> ::windows::core::Result> { Self::IOfflineMapPackageStatics(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).FindPackagesAsync)(::windows::core::Vtable::as_raw(this), querypoint.into().abi(), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).FindPackagesAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(querypoint), result__.as_mut_ptr()).from_abi::>(result__) }) } #[doc = "*Required features: `\"Devices_Geolocation\"`, `\"Foundation\"`*"] #[cfg(all(feature = "Devices_Geolocation", feature = "Foundation"))] - pub fn FindPackagesInBoundingBoxAsync<'a, P0>(queryboundingbox: P0) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Devices::Geolocation::GeoboundingBox>>, - { + pub fn FindPackagesInBoundingBoxAsync(queryboundingbox: &super::super::super::Devices::Geolocation::GeoboundingBox) -> ::windows::core::Result> { Self::IOfflineMapPackageStatics(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).FindPackagesInBoundingBoxAsync)(::windows::core::Vtable::as_raw(this), queryboundingbox.into().abi(), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).FindPackagesInBoundingBoxAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(queryboundingbox), result__.as_mut_ptr()).from_abi::>(result__) }) } #[doc = "*Required features: `\"Devices_Geolocation\"`, `\"Foundation\"`*"] #[cfg(all(feature = "Devices_Geolocation", feature = "Foundation"))] - pub fn FindPackagesInGeocircleAsync<'a, P0>(querycircle: P0) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Devices::Geolocation::Geocircle>>, - { + pub fn FindPackagesInGeocircleAsync(querycircle: &super::super::super::Devices::Geolocation::Geocircle) -> ::windows::core::Result> { Self::IOfflineMapPackageStatics(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).FindPackagesInGeocircleAsync)(::windows::core::Vtable::as_raw(this), querycircle.into().abi(), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).FindPackagesInGeocircleAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(querycircle), result__.as_mut_ptr()).from_abi::>(result__) }) } #[doc(hidden)] diff --git a/crates/libs/windows/src/Windows/Services/Maps/mod.rs b/crates/libs/windows/src/Windows/Services/Maps/mod.rs index 977882311e..904ec838e9 100644 --- a/crates/libs/windows/src/Windows/Services/Maps/mod.rs +++ b/crates/libs/windows/src/Windows/Services/Maps/mod.rs @@ -745,13 +745,10 @@ impl EnhancedWaypoint { } #[doc = "*Required features: `\"Devices_Geolocation\"`*"] #[cfg(feature = "Devices_Geolocation")] - pub fn Create<'a, P0>(point: P0, kind: WaypointKind) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Devices::Geolocation::Geopoint>>, - { + pub fn Create(point: &super::super::Devices::Geolocation::Geopoint, kind: WaypointKind) -> ::windows::core::Result { Self::IEnhancedWaypointFactory(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).Create)(::windows::core::Vtable::as_raw(this), point.into().abi(), kind, result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).Create)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(point), kind, result__.as_mut_ptr()).from_abi::(result__) }) } #[doc(hidden)] @@ -1192,46 +1189,34 @@ pub struct MapLocationFinder; impl MapLocationFinder { #[doc = "*Required features: `\"Devices_Geolocation\"`, `\"Foundation\"`*"] #[cfg(all(feature = "Devices_Geolocation", feature = "Foundation"))] - pub fn FindLocationsAtAsync<'a, P0>(querypoint: P0) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Devices::Geolocation::Geopoint>>, - { + pub fn FindLocationsAtAsync(querypoint: &super::super::Devices::Geolocation::Geopoint) -> ::windows::core::Result> { Self::IMapLocationFinderStatics(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).FindLocationsAtAsync)(::windows::core::Vtable::as_raw(this), querypoint.into().abi(), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).FindLocationsAtAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(querypoint), result__.as_mut_ptr()).from_abi::>(result__) }) } #[doc = "*Required features: `\"Devices_Geolocation\"`, `\"Foundation\"`*"] #[cfg(all(feature = "Devices_Geolocation", feature = "Foundation"))] - pub fn FindLocationsAsync<'a, P0>(searchtext: &::windows::core::HSTRING, referencepoint: P0) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Devices::Geolocation::Geopoint>>, - { + pub fn FindLocationsAsync(searchtext: &::windows::core::HSTRING, referencepoint: &super::super::Devices::Geolocation::Geopoint) -> ::windows::core::Result> { Self::IMapLocationFinderStatics(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).FindLocationsAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(searchtext), referencepoint.into().abi(), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).FindLocationsAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(searchtext), ::core::mem::transmute_copy(referencepoint), result__.as_mut_ptr()).from_abi::>(result__) }) } #[doc = "*Required features: `\"Devices_Geolocation\"`, `\"Foundation\"`*"] #[cfg(all(feature = "Devices_Geolocation", feature = "Foundation"))] - pub fn FindLocationsWithMaxCountAsync<'a, P0>(searchtext: &::windows::core::HSTRING, referencepoint: P0, maxcount: u32) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Devices::Geolocation::Geopoint>>, - { + pub fn FindLocationsWithMaxCountAsync(searchtext: &::windows::core::HSTRING, referencepoint: &super::super::Devices::Geolocation::Geopoint, maxcount: u32) -> ::windows::core::Result> { Self::IMapLocationFinderStatics(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).FindLocationsWithMaxCountAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(searchtext), referencepoint.into().abi(), maxcount, result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).FindLocationsWithMaxCountAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(searchtext), ::core::mem::transmute_copy(referencepoint), maxcount, result__.as_mut_ptr()).from_abi::>(result__) }) } #[doc = "*Required features: `\"Devices_Geolocation\"`, `\"Foundation\"`*"] #[cfg(all(feature = "Devices_Geolocation", feature = "Foundation"))] - pub fn FindLocationsAtWithAccuracyAsync<'a, P0>(querypoint: P0, accuracy: MapLocationDesiredAccuracy) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Devices::Geolocation::Geopoint>>, - { + pub fn FindLocationsAtWithAccuracyAsync(querypoint: &super::super::Devices::Geolocation::Geopoint, accuracy: MapLocationDesiredAccuracy) -> ::windows::core::Result> { Self::IMapLocationFinderStatics2(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).FindLocationsAtWithAccuracyAsync)(::windows::core::Vtable::as_raw(this), querypoint.into().abi(), accuracy, result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).FindLocationsAtWithAccuracyAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(querypoint), accuracy, result__.as_mut_ptr()).from_abi::>(result__) }) } #[doc(hidden)] @@ -1659,50 +1644,34 @@ pub struct MapRouteFinder; impl MapRouteFinder { #[doc = "*Required features: `\"Devices_Geolocation\"`, `\"Foundation\"`*"] #[cfg(all(feature = "Devices_Geolocation", feature = "Foundation"))] - pub fn GetDrivingRouteAsync<'a, P0, P1>(startpoint: P0, endpoint: P1) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Devices::Geolocation::Geopoint>>, - P1: ::std::convert::Into<::windows::core::InParam<'a, super::super::Devices::Geolocation::Geopoint>>, - { + pub fn GetDrivingRouteAsync(startpoint: &super::super::Devices::Geolocation::Geopoint, endpoint: &super::super::Devices::Geolocation::Geopoint) -> ::windows::core::Result> { Self::IMapRouteFinderStatics(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).GetDrivingRouteAsync)(::windows::core::Vtable::as_raw(this), startpoint.into().abi(), endpoint.into().abi(), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).GetDrivingRouteAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(startpoint), ::core::mem::transmute_copy(endpoint), result__.as_mut_ptr()).from_abi::>(result__) }) } #[doc = "*Required features: `\"Devices_Geolocation\"`, `\"Foundation\"`*"] #[cfg(all(feature = "Devices_Geolocation", feature = "Foundation"))] - pub fn GetDrivingRouteWithOptimizationAsync<'a, P0, P1>(startpoint: P0, endpoint: P1, optimization: MapRouteOptimization) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Devices::Geolocation::Geopoint>>, - P1: ::std::convert::Into<::windows::core::InParam<'a, super::super::Devices::Geolocation::Geopoint>>, - { + pub fn GetDrivingRouteWithOptimizationAsync(startpoint: &super::super::Devices::Geolocation::Geopoint, endpoint: &super::super::Devices::Geolocation::Geopoint, optimization: MapRouteOptimization) -> ::windows::core::Result> { Self::IMapRouteFinderStatics(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).GetDrivingRouteWithOptimizationAsync)(::windows::core::Vtable::as_raw(this), startpoint.into().abi(), endpoint.into().abi(), optimization, result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).GetDrivingRouteWithOptimizationAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(startpoint), ::core::mem::transmute_copy(endpoint), optimization, result__.as_mut_ptr()).from_abi::>(result__) }) } #[doc = "*Required features: `\"Devices_Geolocation\"`, `\"Foundation\"`*"] #[cfg(all(feature = "Devices_Geolocation", feature = "Foundation"))] - pub fn GetDrivingRouteWithOptimizationAndRestrictionsAsync<'a, P0, P1>(startpoint: P0, endpoint: P1, optimization: MapRouteOptimization, restrictions: MapRouteRestrictions) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Devices::Geolocation::Geopoint>>, - P1: ::std::convert::Into<::windows::core::InParam<'a, super::super::Devices::Geolocation::Geopoint>>, - { + pub fn GetDrivingRouteWithOptimizationAndRestrictionsAsync(startpoint: &super::super::Devices::Geolocation::Geopoint, endpoint: &super::super::Devices::Geolocation::Geopoint, optimization: MapRouteOptimization, restrictions: MapRouteRestrictions) -> ::windows::core::Result> { Self::IMapRouteFinderStatics(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).GetDrivingRouteWithOptimizationAndRestrictionsAsync)(::windows::core::Vtable::as_raw(this), startpoint.into().abi(), endpoint.into().abi(), optimization, restrictions, result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).GetDrivingRouteWithOptimizationAndRestrictionsAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(startpoint), ::core::mem::transmute_copy(endpoint), optimization, restrictions, result__.as_mut_ptr()).from_abi::>(result__) }) } #[doc = "*Required features: `\"Devices_Geolocation\"`, `\"Foundation\"`*"] #[cfg(all(feature = "Devices_Geolocation", feature = "Foundation"))] - pub fn GetDrivingRouteWithOptimizationRestrictionsAndHeadingAsync<'a, P0, P1>(startpoint: P0, endpoint: P1, optimization: MapRouteOptimization, restrictions: MapRouteRestrictions, headingindegrees: f64) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Devices::Geolocation::Geopoint>>, - P1: ::std::convert::Into<::windows::core::InParam<'a, super::super::Devices::Geolocation::Geopoint>>, - { + pub fn GetDrivingRouteWithOptimizationRestrictionsAndHeadingAsync(startpoint: &super::super::Devices::Geolocation::Geopoint, endpoint: &super::super::Devices::Geolocation::Geopoint, optimization: MapRouteOptimization, restrictions: MapRouteRestrictions, headingindegrees: f64) -> ::windows::core::Result> { Self::IMapRouteFinderStatics(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).GetDrivingRouteWithOptimizationRestrictionsAndHeadingAsync)(::windows::core::Vtable::as_raw(this), startpoint.into().abi(), endpoint.into().abi(), optimization, restrictions, headingindegrees, result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).GetDrivingRouteWithOptimizationRestrictionsAndHeadingAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(startpoint), ::core::mem::transmute_copy(endpoint), optimization, restrictions, headingindegrees, result__.as_mut_ptr()).from_abi::>(result__) }) } #[doc = "*Required features: `\"Devices_Geolocation\"`, `\"Foundation_Collections\"`*"] @@ -1755,14 +1724,10 @@ impl MapRouteFinder { } #[doc = "*Required features: `\"Devices_Geolocation\"`, `\"Foundation\"`*"] #[cfg(all(feature = "Devices_Geolocation", feature = "Foundation"))] - pub fn GetWalkingRouteAsync<'a, P0, P1>(startpoint: P0, endpoint: P1) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Devices::Geolocation::Geopoint>>, - P1: ::std::convert::Into<::windows::core::InParam<'a, super::super::Devices::Geolocation::Geopoint>>, - { + pub fn GetWalkingRouteAsync(startpoint: &super::super::Devices::Geolocation::Geopoint, endpoint: &super::super::Devices::Geolocation::Geopoint) -> ::windows::core::Result> { Self::IMapRouteFinderStatics(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).GetWalkingRouteAsync)(::windows::core::Vtable::as_raw(this), startpoint.into().abi(), endpoint.into().abi(), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).GetWalkingRouteAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(startpoint), ::core::mem::transmute_copy(endpoint), result__.as_mut_ptr()).from_abi::>(result__) }) } #[doc = "*Required features: `\"Devices_Geolocation\"`, `\"Foundation_Collections\"`*"] @@ -1779,15 +1744,10 @@ impl MapRouteFinder { } #[doc = "*Required features: `\"Devices_Geolocation\"`, `\"Foundation\"`*"] #[cfg(all(feature = "Devices_Geolocation", feature = "Foundation"))] - pub fn GetDrivingRouteWithOptionsAsync<'a, P0, P1, P2>(startpoint: P0, endpoint: P1, options: P2) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Devices::Geolocation::Geopoint>>, - P1: ::std::convert::Into<::windows::core::InParam<'a, super::super::Devices::Geolocation::Geopoint>>, - P2: ::std::convert::Into<::windows::core::InParam<'a, MapRouteDrivingOptions>>, - { + pub fn GetDrivingRouteWithOptionsAsync(startpoint: &super::super::Devices::Geolocation::Geopoint, endpoint: &super::super::Devices::Geolocation::Geopoint, options: &MapRouteDrivingOptions) -> ::windows::core::Result> { Self::IMapRouteFinderStatics2(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).GetDrivingRouteWithOptionsAsync)(::windows::core::Vtable::as_raw(this), startpoint.into().abi(), endpoint.into().abi(), options.into().abi(), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).GetDrivingRouteWithOptionsAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(startpoint), ::core::mem::transmute_copy(endpoint), ::core::mem::transmute_copy(options), result__.as_mut_ptr()).from_abi::>(result__) }) } #[doc = "*Required features: `\"Foundation_Collections\"`*"] @@ -1804,15 +1764,14 @@ impl MapRouteFinder { } #[doc = "*Required features: `\"Foundation_Collections\"`*"] #[cfg(feature = "Foundation_Collections")] - pub fn GetDrivingRouteFromEnhancedWaypointsWithOptionsAsync<'a, P0, E0, P1>(waypoints: P0, options: P1) -> ::windows::core::Result> + pub fn GetDrivingRouteFromEnhancedWaypointsWithOptionsAsync<'a, P0, E0>(waypoints: P0, options: &MapRouteDrivingOptions) -> ::windows::core::Result> where P0: ::std::convert::TryInto<::windows::core::InParam<'a, super::super::Foundation::Collections::IIterable>, Error = E0>, E0: ::std::convert::Into<::windows::core::Error>, - P1: ::std::convert::Into<::windows::core::InParam<'a, MapRouteDrivingOptions>>, { Self::IMapRouteFinderStatics3(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).GetDrivingRouteFromEnhancedWaypointsWithOptionsAsync)(::windows::core::Vtable::as_raw(this), waypoints.try_into().map_err(|e| e.into())?.abi(), options.into().abi(), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).GetDrivingRouteFromEnhancedWaypointsWithOptionsAsync)(::windows::core::Vtable::as_raw(this), waypoints.try_into().map_err(|e| e.into())?.abi(), ::core::mem::transmute_copy(options), result__.as_mut_ptr()).from_abi::>(result__) }) } #[doc(hidden)] @@ -2302,25 +2261,18 @@ impl PlaceInfo { } #[doc = "*Required features: `\"Devices_Geolocation\"`*"] #[cfg(feature = "Devices_Geolocation")] - pub fn Create<'a, P0>(referencepoint: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Devices::Geolocation::Geopoint>>, - { + pub fn Create(referencepoint: &super::super::Devices::Geolocation::Geopoint) -> ::windows::core::Result { Self::IPlaceInfoStatics(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).Create)(::windows::core::Vtable::as_raw(this), referencepoint.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).Create)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(referencepoint), result__.as_mut_ptr()).from_abi::(result__) }) } #[doc = "*Required features: `\"Devices_Geolocation\"`*"] #[cfg(feature = "Devices_Geolocation")] - pub fn CreateWithGeopointAndOptions<'a, P0, P1>(referencepoint: P0, options: P1) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Devices::Geolocation::Geopoint>>, - P1: ::std::convert::Into<::windows::core::InParam<'a, PlaceInfoCreateOptions>>, - { + pub fn CreateWithGeopointAndOptions(referencepoint: &super::super::Devices::Geolocation::Geopoint, options: &PlaceInfoCreateOptions) -> ::windows::core::Result { Self::IPlaceInfoStatics(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).CreateWithGeopointAndOptions)(::windows::core::Vtable::as_raw(this), referencepoint.into().abi(), options.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).CreateWithGeopointAndOptions)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(referencepoint), ::core::mem::transmute_copy(options), result__.as_mut_ptr()).from_abi::(result__) }) } pub fn CreateFromIdentifier(identifier: &::windows::core::HSTRING) -> ::windows::core::Result { @@ -2331,23 +2283,16 @@ impl PlaceInfo { } #[doc = "*Required features: `\"Devices_Geolocation\"`*"] #[cfg(feature = "Devices_Geolocation")] - pub fn CreateFromIdentifierWithOptions<'a, P0, P1>(identifier: &::windows::core::HSTRING, defaultpoint: P0, options: P1) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Devices::Geolocation::Geopoint>>, - P1: ::std::convert::Into<::windows::core::InParam<'a, PlaceInfoCreateOptions>>, - { + pub fn CreateFromIdentifierWithOptions(identifier: &::windows::core::HSTRING, defaultpoint: &super::super::Devices::Geolocation::Geopoint, options: &PlaceInfoCreateOptions) -> ::windows::core::Result { Self::IPlaceInfoStatics(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).CreateFromIdentifierWithOptions)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(identifier), defaultpoint.into().abi(), options.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).CreateFromIdentifierWithOptions)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(identifier), ::core::mem::transmute_copy(defaultpoint), ::core::mem::transmute_copy(options), result__.as_mut_ptr()).from_abi::(result__) }) } - pub fn CreateFromMapLocation<'a, P0>(location: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, MapLocation>>, - { + pub fn CreateFromMapLocation(location: &MapLocation) -> ::windows::core::Result { Self::IPlaceInfoStatics(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).CreateFromMapLocation)(::windows::core::Vtable::as_raw(this), location.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).CreateFromMapLocation)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(location), result__.as_mut_ptr()).from_abi::(result__) }) } pub fn IsShowSupported() -> ::windows::core::Result { diff --git a/crates/libs/windows/src/Windows/Services/Store/mod.rs b/crates/libs/windows/src/Windows/Services/Store/mod.rs index a02b52b26a..f42ca0306e 100644 --- a/crates/libs/windows/src/Windows/Services/Store/mod.rs +++ b/crates/libs/windows/src/Windows/Services/Store/mod.rs @@ -1280,14 +1280,11 @@ impl StoreAvailability { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn RequestPurchaseWithPurchasePropertiesAsync<'a, P0>(&self, storepurchaseproperties: P0) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, StorePurchaseProperties>>, - { + pub fn RequestPurchaseWithPurchasePropertiesAsync(&self, storepurchaseproperties: &StorePurchaseProperties) -> ::windows::core::Result> { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).RequestPurchaseWithPurchasePropertiesAsync)(::windows::core::Vtable::as_raw(this), storepurchaseproperties.into().abi(), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).RequestPurchaseWithPurchasePropertiesAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(storepurchaseproperties), result__.as_mut_ptr()).from_abi::>(result__) } } } @@ -1690,14 +1687,11 @@ impl StoreContext { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn OfflineLicensesChanged<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn OfflineLicensesChanged(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).OfflineLicensesChanged)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).OfflineLicensesChanged)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -1829,14 +1823,11 @@ impl StoreContext { } #[doc = "*Required features: `\"ApplicationModel\"`, `\"Foundation\"`*"] #[cfg(all(feature = "ApplicationModel", feature = "Foundation"))] - pub fn AcquireStoreLicenseForOptionalPackageAsync<'a, P0>(&self, optionalpackage: P0) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::ApplicationModel::Package>>, - { + pub fn AcquireStoreLicenseForOptionalPackageAsync(&self, optionalpackage: &super::super::ApplicationModel::Package) -> ::windows::core::Result> { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).AcquireStoreLicenseForOptionalPackageAsync)(::windows::core::Vtable::as_raw(this), optionalpackage.into().abi(), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).AcquireStoreLicenseForOptionalPackageAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(optionalpackage), result__.as_mut_ptr()).from_abi::>(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -1850,14 +1841,11 @@ impl StoreContext { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn RequestPurchaseWithPurchasePropertiesAsync<'a, P0>(&self, storeid: &::windows::core::HSTRING, storepurchaseproperties: P0) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, StorePurchaseProperties>>, - { + pub fn RequestPurchaseWithPurchasePropertiesAsync(&self, storeid: &::windows::core::HSTRING, storepurchaseproperties: &StorePurchaseProperties) -> ::windows::core::Result> { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).RequestPurchaseWithPurchasePropertiesAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(storeid), storepurchaseproperties.into().abi(), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).RequestPurchaseWithPurchasePropertiesAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(storeid), ::core::mem::transmute_copy(storepurchaseproperties), result__.as_mut_ptr()).from_abi::>(result__) } } #[doc = "*Required features: `\"Foundation_Collections\"`*"] @@ -1910,16 +1898,15 @@ impl StoreContext { } #[doc = "*Required features: `\"ApplicationModel\"`, `\"Foundation_Collections\"`*"] #[cfg(all(feature = "ApplicationModel", feature = "Foundation_Collections"))] - pub fn FindStoreProductForPackageAsync<'a, P0, E0, P1>(&self, productkinds: P0, package: P1) -> ::windows::core::Result> + pub fn FindStoreProductForPackageAsync<'a, P0, E0>(&self, productkinds: P0, package: &super::super::ApplicationModel::Package) -> ::windows::core::Result> where P0: ::std::convert::TryInto<::windows::core::InParam<'a, super::super::Foundation::Collections::IIterable<::windows::core::HSTRING>>, Error = E0>, E0: ::std::convert::Into<::windows::core::Error>, - P1: ::std::convert::Into<::windows::core::InParam<'a, super::super::ApplicationModel::Package>>, { let this = &::windows::core::Interface::cast::(self)?; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).FindStoreProductForPackageAsync)(::windows::core::Vtable::as_raw(this), productkinds.try_into().map_err(|e| e.into())?.abi(), package.into().abi(), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).FindStoreProductForPackageAsync)(::windows::core::Vtable::as_raw(this), productkinds.try_into().map_err(|e| e.into())?.abi(), ::core::mem::transmute_copy(package), result__.as_mut_ptr()).from_abi::>(result__) } } pub fn CanSilentlyDownloadStorePackageUpdates(&self) -> ::windows::core::Result { @@ -1957,14 +1944,11 @@ impl StoreContext { } #[doc = "*Required features: `\"ApplicationModel\"`, `\"Foundation\"`*"] #[cfg(all(feature = "ApplicationModel", feature = "Foundation"))] - pub fn CanAcquireStoreLicenseForOptionalPackageAsync<'a, P0>(&self, optionalpackage: P0) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::ApplicationModel::Package>>, - { + pub fn CanAcquireStoreLicenseForOptionalPackageAsync(&self, optionalpackage: &super::super::ApplicationModel::Package) -> ::windows::core::Result> { let this = &::windows::core::Interface::cast::(self)?; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).CanAcquireStoreLicenseForOptionalPackageAsync)(::windows::core::Vtable::as_raw(this), optionalpackage.into().abi(), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).CanAcquireStoreLicenseForOptionalPackageAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(optionalpackage), result__.as_mut_ptr()).from_abi::>(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -1978,18 +1962,17 @@ impl StoreContext { } #[doc = "*Required features: `\"Foundation_Collections\"`*"] #[cfg(feature = "Foundation_Collections")] - pub fn GetStoreProductsWithOptionsAsync<'a, P0, E0, P1, E1, P2>(&self, productkinds: P0, storeids: P1, storeproductoptions: P2) -> ::windows::core::Result> + pub fn GetStoreProductsWithOptionsAsync<'a, P0, E0, P1, E1>(&self, productkinds: P0, storeids: P1, storeproductoptions: &StoreProductOptions) -> ::windows::core::Result> where P0: ::std::convert::TryInto<::windows::core::InParam<'a, super::super::Foundation::Collections::IIterable<::windows::core::HSTRING>>, Error = E0>, E0: ::std::convert::Into<::windows::core::Error>, P1: ::std::convert::TryInto<::windows::core::InParam<'a, super::super::Foundation::Collections::IIterable<::windows::core::HSTRING>>, Error = E1>, E1: ::std::convert::Into<::windows::core::Error>, - P2: ::std::convert::Into<::windows::core::InParam<'a, StoreProductOptions>>, { let this = &::windows::core::Interface::cast::(self)?; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).GetStoreProductsWithOptionsAsync)(::windows::core::Vtable::as_raw(this), productkinds.try_into().map_err(|e| e.into())?.abi(), storeids.try_into().map_err(|e| e.into())?.abi(), storeproductoptions.into().abi(), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).GetStoreProductsWithOptionsAsync)(::windows::core::Vtable::as_raw(this), productkinds.try_into().map_err(|e| e.into())?.abi(), storeids.try_into().map_err(|e| e.into())?.abi(), ::core::mem::transmute_copy(storeproductoptions), result__.as_mut_ptr()).from_abi::>(result__) } } #[doc = "*Required features: `\"Foundation_Collections\"`*"] @@ -2016,16 +1999,15 @@ impl StoreContext { } #[doc = "*Required features: `\"Foundation_Collections\"`*"] #[cfg(feature = "Foundation_Collections")] - pub fn RequestDownloadAndInstallStorePackagesWithInstallOptionsAsync<'a, P0, E0, P1>(&self, storeids: P0, storepackageinstalloptions: P1) -> ::windows::core::Result> + pub fn RequestDownloadAndInstallStorePackagesWithInstallOptionsAsync<'a, P0, E0>(&self, storeids: P0, storepackageinstalloptions: &StorePackageInstallOptions) -> ::windows::core::Result> where P0: ::std::convert::TryInto<::windows::core::InParam<'a, super::super::Foundation::Collections::IIterable<::windows::core::HSTRING>>, Error = E0>, E0: ::std::convert::Into<::windows::core::Error>, - P1: ::std::convert::Into<::windows::core::InParam<'a, StorePackageInstallOptions>>, { let this = &::windows::core::Interface::cast::(self)?; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).RequestDownloadAndInstallStorePackagesWithInstallOptionsAsync)(::windows::core::Vtable::as_raw(this), storeids.try_into().map_err(|e| e.into())?.abi(), storepackageinstalloptions.into().abi(), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).RequestDownloadAndInstallStorePackagesWithInstallOptionsAsync)(::windows::core::Vtable::as_raw(this), storeids.try_into().map_err(|e| e.into())?.abi(), ::core::mem::transmute_copy(storepackageinstalloptions), result__.as_mut_ptr()).from_abi::>(result__) } } #[doc = "*Required features: `\"Foundation_Collections\"`*"] @@ -2043,14 +2025,11 @@ impl StoreContext { } #[doc = "*Required features: `\"ApplicationModel\"`, `\"Foundation\"`*"] #[cfg(all(feature = "ApplicationModel", feature = "Foundation"))] - pub fn RequestUninstallStorePackageAsync<'a, P0>(&self, package: P0) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::ApplicationModel::Package>>, - { + pub fn RequestUninstallStorePackageAsync(&self, package: &super::super::ApplicationModel::Package) -> ::windows::core::Result> { let this = &::windows::core::Interface::cast::(self)?; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).RequestUninstallStorePackageAsync)(::windows::core::Vtable::as_raw(this), package.into().abi(), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).RequestUninstallStorePackageAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(package), result__.as_mut_ptr()).from_abi::>(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -2064,14 +2043,11 @@ impl StoreContext { } #[doc = "*Required features: `\"ApplicationModel\"`, `\"Foundation\"`*"] #[cfg(all(feature = "ApplicationModel", feature = "Foundation"))] - pub fn UninstallStorePackageAsync<'a, P0>(&self, package: P0) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::ApplicationModel::Package>>, - { + pub fn UninstallStorePackageAsync(&self, package: &super::super::ApplicationModel::Package) -> ::windows::core::Result> { let this = &::windows::core::Interface::cast::(self)?; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).UninstallStorePackageAsync)(::windows::core::Vtable::as_raw(this), package.into().abi(), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).UninstallStorePackageAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(package), result__.as_mut_ptr()).from_abi::>(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -2113,13 +2089,10 @@ impl StoreContext { } #[doc = "*Required features: `\"System\"`*"] #[cfg(feature = "System")] - pub fn GetForUser<'a, P0>(user: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::System::User>>, - { + pub fn GetForUser(user: &super::super::System::User) -> ::windows::core::Result { Self::IStoreContextStatics(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).GetForUser)(::windows::core::Vtable::as_raw(this), user.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).GetForUser)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(user), result__.as_mut_ptr()).from_abi::(result__) }) } #[doc(hidden)] @@ -2503,14 +2476,11 @@ impl StorePackageLicense { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn LicenseLost<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn LicenseLost(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).LicenseLost)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).LicenseLost)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -3050,14 +3020,11 @@ impl StoreProduct { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn RequestPurchaseWithPurchasePropertiesAsync<'a, P0>(&self, storepurchaseproperties: P0) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, StorePurchaseProperties>>, - { + pub fn RequestPurchaseWithPurchasePropertiesAsync(&self, storepurchaseproperties: &StorePurchaseProperties) -> ::windows::core::Result> { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).RequestPurchaseWithPurchasePropertiesAsync)(::windows::core::Vtable::as_raw(this), storepurchaseproperties.into().abi(), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).RequestPurchaseWithPurchasePropertiesAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(storepurchaseproperties), result__.as_mut_ptr()).from_abi::>(result__) } } pub fn InAppOfferToken(&self) -> ::windows::core::Result<::windows::core::HSTRING> { @@ -3712,14 +3679,11 @@ impl StoreQueueItem { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn Completed<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn Completed(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).Completed)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).Completed)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -3730,14 +3694,11 @@ impl StoreQueueItem { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn StatusChanged<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn StatusChanged(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).StatusChanged)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).StatusChanged)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -4113,13 +4074,10 @@ pub struct StoreRequestHelper; impl StoreRequestHelper { #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn SendRequestAsync<'a, P0>(context: P0, requestkind: u32, parametersasjson: &::windows::core::HSTRING) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, StoreContext>>, - { + pub fn SendRequestAsync(context: &StoreContext, requestkind: u32, parametersasjson: &::windows::core::HSTRING) -> ::windows::core::Result> { Self::IStoreRequestHelperStatics(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).SendRequestAsync)(::windows::core::Vtable::as_raw(this), context.into().abi(), requestkind, ::core::mem::transmute_copy(parametersasjson), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).SendRequestAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(context), requestkind, ::core::mem::transmute_copy(parametersasjson), result__.as_mut_ptr()).from_abi::>(result__) }) } #[doc(hidden)] @@ -4353,14 +4311,11 @@ impl StoreSku { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn RequestPurchaseWithPurchasePropertiesAsync<'a, P0>(&self, storepurchaseproperties: P0) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, StorePurchaseProperties>>, - { + pub fn RequestPurchaseWithPurchasePropertiesAsync(&self, storepurchaseproperties: &StorePurchaseProperties) -> ::windows::core::Result> { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).RequestPurchaseWithPurchasePropertiesAsync)(::windows::core::Vtable::as_raw(this), storepurchaseproperties.into().abi(), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).RequestPurchaseWithPurchasePropertiesAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(storepurchaseproperties), result__.as_mut_ptr()).from_abi::>(result__) } } pub fn IsSubscription(&self) -> ::windows::core::Result { diff --git a/crates/libs/windows/src/Windows/Services/TargetedContent/mod.rs b/crates/libs/windows/src/Windows/Services/TargetedContent/mod.rs index 3f346bfd92..6699f50a6b 100644 --- a/crates/libs/windows/src/Windows/Services/TargetedContent/mod.rs +++ b/crates/libs/windows/src/Windows/Services/TargetedContent/mod.rs @@ -1461,14 +1461,11 @@ impl TargetedContentSubscription { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn ContentChanged<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn ContentChanged(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).ContentChanged)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).ContentChanged)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -1479,14 +1476,11 @@ impl TargetedContentSubscription { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn AvailabilityChanged<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn AvailabilityChanged(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).AvailabilityChanged)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).AvailabilityChanged)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -1497,14 +1491,11 @@ impl TargetedContentSubscription { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn StateChanged<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn StateChanged(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).StateChanged)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).StateChanged)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] diff --git a/crates/libs/windows/src/Windows/Storage/AccessCache/mod.rs b/crates/libs/windows/src/Windows/Storage/AccessCache/mod.rs index c3e369101d..b607f9cd7b 100644 --- a/crates/libs/windows/src/Windows/Storage/AccessCache/mod.rs +++ b/crates/libs/windows/src/Windows/Storage/AccessCache/mod.rs @@ -611,24 +611,18 @@ impl StorageApplicationPermissions { } #[doc = "*Required features: `\"System\"`*"] #[cfg(feature = "System")] - pub fn GetFutureAccessListForUser<'a, P0>(user: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::System::User>>, - { + pub fn GetFutureAccessListForUser(user: &super::super::System::User) -> ::windows::core::Result { Self::IStorageApplicationPermissionsStatics2(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).GetFutureAccessListForUser)(::windows::core::Vtable::as_raw(this), user.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).GetFutureAccessListForUser)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(user), result__.as_mut_ptr()).from_abi::(result__) }) } #[doc = "*Required features: `\"System\"`*"] #[cfg(feature = "System")] - pub fn GetMostRecentlyUsedListForUser<'a, P0>(user: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::System::User>>, - { + pub fn GetMostRecentlyUsedListForUser(user: &super::super::System::User) -> ::windows::core::Result { Self::IStorageApplicationPermissionsStatics2(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).GetMostRecentlyUsedListForUser)(::windows::core::Vtable::as_raw(this), user.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).GetMostRecentlyUsedListForUser)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(user), result__.as_mut_ptr()).from_abi::(result__) }) } #[doc(hidden)] @@ -1005,14 +999,11 @@ impl StorageItemMostRecentlyUsedList { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn ItemRemoved<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn ItemRemoved(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).ItemRemoved)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).ItemRemoved)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] diff --git a/crates/libs/windows/src/Windows/Storage/BulkAccess/mod.rs b/crates/libs/windows/src/Windows/Storage/BulkAccess/mod.rs index f9b19ed3f9..3f35d3e8fb 100644 --- a/crates/libs/windows/src/Windows/Storage/BulkAccess/mod.rs +++ b/crates/libs/windows/src/Windows/Storage/BulkAccess/mod.rs @@ -129,14 +129,11 @@ impl IStorageItemInformation { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn ThumbnailUpdated<'a, P0>(&self, changedhandler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn ThumbnailUpdated(&self, changedhandler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).ThumbnailUpdated)(::windows::core::Vtable::as_raw(this), changedhandler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).ThumbnailUpdated)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(changedhandler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -147,14 +144,11 @@ impl IStorageItemInformation { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn PropertiesUpdated<'a, P0>(&self, changedhandler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn PropertiesUpdated(&self, changedhandler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).PropertiesUpdated)(::windows::core::Vtable::as_raw(this), changedhandler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).PropertiesUpdated)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(changedhandler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -609,14 +603,11 @@ impl FileInformation { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn ThumbnailUpdated<'a, P0>(&self, changedhandler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn ThumbnailUpdated(&self, changedhandler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).ThumbnailUpdated)(::windows::core::Vtable::as_raw(this), changedhandler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).ThumbnailUpdated)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(changedhandler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -627,14 +618,11 @@ impl FileInformation { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn PropertiesUpdated<'a, P0>(&self, changedhandler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn PropertiesUpdated(&self, changedhandler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).PropertiesUpdated)(::windows::core::Vtable::as_raw(this), changedhandler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).PropertiesUpdated)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(changedhandler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -1295,14 +1283,11 @@ impl FolderInformation { } #[doc = "*Required features: `\"Storage_Search\"`*"] #[cfg(feature = "Storage_Search")] - pub fn CreateFileQueryWithOptions<'a, P0>(&self, queryoptions: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::Search::QueryOptions>>, - { + pub fn CreateFileQueryWithOptions(&self, queryoptions: &super::Search::QueryOptions) -> ::windows::core::Result { let this = &::windows::core::Interface::cast::(self)?; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).CreateFileQueryWithOptions)(::windows::core::Vtable::as_raw(this), queryoptions.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).CreateFileQueryWithOptions)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(queryoptions), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Storage_Search\"`*"] @@ -1325,14 +1310,11 @@ impl FolderInformation { } #[doc = "*Required features: `\"Storage_Search\"`*"] #[cfg(feature = "Storage_Search")] - pub fn CreateFolderQueryWithOptions<'a, P0>(&self, queryoptions: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::Search::QueryOptions>>, - { + pub fn CreateFolderQueryWithOptions(&self, queryoptions: &super::Search::QueryOptions) -> ::windows::core::Result { let this = &::windows::core::Interface::cast::(self)?; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).CreateFolderQueryWithOptions)(::windows::core::Vtable::as_raw(this), queryoptions.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).CreateFolderQueryWithOptions)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(queryoptions), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Storage_Search\"`*"] @@ -1346,14 +1328,11 @@ impl FolderInformation { } #[doc = "*Required features: `\"Storage_Search\"`*"] #[cfg(feature = "Storage_Search")] - pub fn CreateItemQueryWithOptions<'a, P0>(&self, queryoptions: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::Search::QueryOptions>>, - { + pub fn CreateItemQueryWithOptions(&self, queryoptions: &super::Search::QueryOptions) -> ::windows::core::Result { let this = &::windows::core::Interface::cast::(self)?; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).CreateItemQueryWithOptions)(::windows::core::Vtable::as_raw(this), queryoptions.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).CreateItemQueryWithOptions)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(queryoptions), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation_Collections\"`, `\"Storage_Search\"`*"] @@ -1403,14 +1382,11 @@ impl FolderInformation { } #[doc = "*Required features: `\"Storage_Search\"`*"] #[cfg(feature = "Storage_Search")] - pub fn AreQueryOptionsSupported<'a, P0>(&self, queryoptions: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::Search::QueryOptions>>, - { + pub fn AreQueryOptionsSupported(&self, queryoptions: &super::Search::QueryOptions) -> ::windows::core::Result { let this = &::windows::core::Interface::cast::(self)?; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).AreQueryOptionsSupported)(::windows::core::Vtable::as_raw(this), queryoptions.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).AreQueryOptionsSupported)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(queryoptions), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Storage_Search\"`*"] @@ -1589,14 +1565,11 @@ impl FolderInformation { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn ThumbnailUpdated<'a, P0>(&self, changedhandler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn ThumbnailUpdated(&self, changedhandler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).ThumbnailUpdated)(::windows::core::Vtable::as_raw(this), changedhandler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).ThumbnailUpdated)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(changedhandler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -1607,14 +1580,11 @@ impl FolderInformation { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn PropertiesUpdated<'a, P0>(&self, changedhandler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn PropertiesUpdated(&self, changedhandler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).PropertiesUpdated)(::windows::core::Vtable::as_raw(this), changedhandler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).PropertiesUpdated)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(changedhandler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] diff --git a/crates/libs/windows/src/Windows/Storage/FileProperties/mod.rs b/crates/libs/windows/src/Windows/Storage/FileProperties/mod.rs index 15e0961cb9..d4dbd65fdb 100644 --- a/crates/libs/windows/src/Windows/Storage/FileProperties/mod.rs +++ b/crates/libs/windows/src/Windows/Storage/FileProperties/mod.rs @@ -723,28 +723,26 @@ impl GeotagHelper { } #[doc = "*Required features: `\"Devices_Geolocation\"`, `\"Foundation\"`*"] #[cfg(all(feature = "Devices_Geolocation", feature = "Foundation"))] - pub fn SetGeotagFromGeolocatorAsync<'a, P0, E0, P1>(file: P0, geolocator: P1) -> ::windows::core::Result + pub fn SetGeotagFromGeolocatorAsync<'a, P0, E0>(file: P0, geolocator: &super::super::Devices::Geolocation::Geolocator) -> ::windows::core::Result where P0: ::std::convert::TryInto<::windows::core::InParam<'a, super::IStorageFile>, Error = E0>, E0: ::std::convert::Into<::windows::core::Error>, - P1: ::std::convert::Into<::windows::core::InParam<'a, super::super::Devices::Geolocation::Geolocator>>, { Self::IGeotagHelperStatics(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).SetGeotagFromGeolocatorAsync)(::windows::core::Vtable::as_raw(this), file.try_into().map_err(|e| e.into())?.abi(), geolocator.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).SetGeotagFromGeolocatorAsync)(::windows::core::Vtable::as_raw(this), file.try_into().map_err(|e| e.into())?.abi(), ::core::mem::transmute_copy(geolocator), result__.as_mut_ptr()).from_abi::(result__) }) } #[doc = "*Required features: `\"Devices_Geolocation\"`, `\"Foundation\"`*"] #[cfg(all(feature = "Devices_Geolocation", feature = "Foundation"))] - pub fn SetGeotagAsync<'a, P0, E0, P1>(file: P0, geopoint: P1) -> ::windows::core::Result + pub fn SetGeotagAsync<'a, P0, E0>(file: P0, geopoint: &super::super::Devices::Geolocation::Geopoint) -> ::windows::core::Result where P0: ::std::convert::TryInto<::windows::core::InParam<'a, super::IStorageFile>, Error = E0>, E0: ::std::convert::Into<::windows::core::Error>, - P1: ::std::convert::Into<::windows::core::InParam<'a, super::super::Devices::Geolocation::Geopoint>>, { Self::IGeotagHelperStatics(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).SetGeotagAsync)(::windows::core::Vtable::as_raw(this), file.try_into().map_err(|e| e.into())?.abi(), geopoint.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).SetGeotagAsync)(::windows::core::Vtable::as_raw(this), file.try_into().map_err(|e| e.into())?.abi(), ::core::mem::transmute_copy(geopoint), result__.as_mut_ptr()).from_abi::(result__) }) } #[doc(hidden)] diff --git a/crates/libs/windows/src/Windows/Storage/Pickers/Provider/mod.rs b/crates/libs/windows/src/Windows/Storage/Pickers/Provider/mod.rs index 0d180bdbec..08fc677215 100644 --- a/crates/libs/windows/src/Windows/Storage/Pickers/Provider/mod.rs +++ b/crates/libs/windows/src/Windows/Storage/Pickers/Provider/mod.rs @@ -271,14 +271,11 @@ impl FileOpenPickerUI { } #[doc = "*Required features: `\"Foundation\"`, `\"deprecated\"`*"] #[cfg(all(feature = "Foundation", feature = "deprecated"))] - pub fn FileRemoved<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Foundation::TypedEventHandler>>, - { + pub fn FileRemoved(&self, handler: &super::super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).FileRemoved)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).FileRemoved)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`, `\"deprecated\"`*"] @@ -289,14 +286,11 @@ impl FileOpenPickerUI { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn Closing<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Foundation::TypedEventHandler>>, - { + pub fn Closing(&self, handler: &super::super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).Closing)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).Closing)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -507,14 +501,11 @@ impl FileSavePickerUI { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn FileNameChanged<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Foundation::TypedEventHandler>>, - { + pub fn FileNameChanged(&self, handler: &super::super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).FileNameChanged)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).FileNameChanged)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -525,14 +516,11 @@ impl FileSavePickerUI { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn TargetFileRequested<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Foundation::TypedEventHandler>>, - { + pub fn TargetFileRequested(&self, handler: &super::super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).TargetFileRequested)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).TargetFileRequested)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] diff --git a/crates/libs/windows/src/Windows/Storage/Pickers/mod.rs b/crates/libs/windows/src/Windows/Storage/Pickers/mod.rs index 46bb95fc2a..de88578cb3 100644 --- a/crates/libs/windows/src/Windows/Storage/Pickers/mod.rs +++ b/crates/libs/windows/src/Windows/Storage/Pickers/mod.rs @@ -693,13 +693,10 @@ impl FileOpenPicker { } #[doc = "*Required features: `\"System\"`*"] #[cfg(feature = "System")] - pub fn CreateForUser<'a, P0>(user: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::System::User>>, - { + pub fn CreateForUser(user: &super::super::System::User) -> ::windows::core::Result { Self::IFileOpenPickerStatics2(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).CreateForUser)(::windows::core::Vtable::as_raw(this), user.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).CreateForUser)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(user), result__.as_mut_ptr()).from_abi::(result__) }) } #[doc = "*Required features: `\"Foundation\"`*"] @@ -1038,14 +1035,11 @@ impl FilePickerSelectedFilesArray { } #[doc = "*Required features: `\"Foundation_Collections\"`*"] #[cfg(feature = "Foundation_Collections")] - pub fn IndexOf<'a, P0>(&self, value: P0, index: &mut u32) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::StorageFile>>, - { + pub fn IndexOf(&self, value: &super::StorageFile, index: &mut u32) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).IndexOf)(::windows::core::Vtable::as_raw(this), value.into().abi(), index, result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).IndexOf)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value), index, result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation_Collections\"`*"] @@ -1269,12 +1263,9 @@ impl FileSavePicker { (::windows::core::Vtable::vtable(this).SuggestedSaveFile)(::windows::core::Vtable::as_raw(this), result__.as_mut_ptr()).from_abi::(result__) } } - pub fn SetSuggestedSaveFile<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::StorageFile>>, - { + pub fn SetSuggestedSaveFile(&self, value: &super::StorageFile) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).SetSuggestedSaveFile)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetSuggestedSaveFile)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } pub fn SuggestedFileName(&self) -> ::windows::core::Result<::windows::core::HSTRING> { let this = self; @@ -1333,13 +1324,10 @@ impl FileSavePicker { } #[doc = "*Required features: `\"System\"`*"] #[cfg(feature = "System")] - pub fn CreateForUser<'a, P0>(user: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::System::User>>, - { + pub fn CreateForUser(user: &super::super::System::User) -> ::windows::core::Result { Self::IFileSavePickerStatics(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).CreateForUser)(::windows::core::Vtable::as_raw(this), user.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).CreateForUser)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(user), result__.as_mut_ptr()).from_abi::(result__) }) } #[doc(hidden)] @@ -1511,13 +1499,10 @@ impl FolderPicker { } #[doc = "*Required features: `\"System\"`*"] #[cfg(feature = "System")] - pub fn CreateForUser<'a, P0>(user: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::System::User>>, - { + pub fn CreateForUser(user: &super::super::System::User) -> ::windows::core::Result { Self::IFolderPickerStatics(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).CreateForUser)(::windows::core::Vtable::as_raw(this), user.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).CreateForUser)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(user), result__.as_mut_ptr()).from_abi::(result__) }) } #[doc(hidden)] diff --git a/crates/libs/windows/src/Windows/Storage/Provider/mod.rs b/crates/libs/windows/src/Windows/Storage/Provider/mod.rs index 91a06d5957..8c4585be36 100644 --- a/crates/libs/windows/src/Windows/Storage/Provider/mod.rs +++ b/crates/libs/windows/src/Windows/Storage/Provider/mod.rs @@ -619,14 +619,11 @@ impl IStorageProviderStatusSource { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn Changed<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn Changed(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).Changed)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).Changed)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -844,19 +841,13 @@ pub struct IStorageProviderSyncRootManagerStatics2_Vtbl { #[repr(transparent)] pub struct IStorageProviderUriSource(::windows::core::IUnknown); impl IStorageProviderUriSource { - pub fn GetPathForContentUri<'a, P0>(&self, contenturi: &::windows::core::HSTRING, result: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, StorageProviderGetPathForContentUriResult>>, - { + pub fn GetPathForContentUri(&self, contenturi: &::windows::core::HSTRING, result: &StorageProviderGetPathForContentUriResult) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).GetPathForContentUri)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(contenturi), result.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).GetPathForContentUri)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(contenturi), ::core::mem::transmute_copy(result)).ok() } } - pub fn GetContentInfoForPath<'a, P0>(&self, path: &::windows::core::HSTRING, result: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, StorageProviderGetContentInfoForPathResult>>, - { + pub fn GetContentInfoForPath(&self, path: &::windows::core::HSTRING, result: &StorageProviderGetContentInfoForPathResult) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).GetContentInfoForPath)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(path), result.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).GetContentInfoForPath)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(path), ::core::mem::transmute_copy(result)).ok() } } } impl ::core::convert::From for ::windows::core::IUnknown { @@ -968,14 +959,11 @@ impl CachedFileUpdaterUI { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn FileUpdateRequested<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn FileUpdateRequested(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).FileUpdateRequested)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).FileUpdateRequested)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -986,14 +974,11 @@ impl CachedFileUpdaterUI { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn UIRequested<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn UIRequested(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).UIRequested)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).UIRequested)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -1392,12 +1377,9 @@ impl StorageProviderError { (::windows::core::Vtable::vtable(this).PrimaryAction)(::windows::core::Vtable::as_raw(this), result__.as_mut_ptr()).from_abi::(result__) } } - pub fn SetPrimaryAction<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, StorageProviderErrorCommand>>, - { + pub fn SetPrimaryAction(&self, value: &StorageProviderErrorCommand) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).SetPrimaryAction)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetPrimaryAction)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } pub fn SecondaryAction(&self) -> ::windows::core::Result { let this = self; @@ -1406,12 +1388,9 @@ impl StorageProviderError { (::windows::core::Vtable::vtable(this).SecondaryAction)(::windows::core::Vtable::as_raw(this), result__.as_mut_ptr()).from_abi::(result__) } } - pub fn SetSecondaryAction<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, StorageProviderErrorCommand>>, - { + pub fn SetSecondaryAction(&self, value: &StorageProviderErrorCommand) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).SetSecondaryAction)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetSecondaryAction)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } pub fn InformationalLink(&self) -> ::windows::core::Result { let this = self; @@ -1420,12 +1399,9 @@ impl StorageProviderError { (::windows::core::Vtable::vtable(this).InformationalLink)(::windows::core::Vtable::as_raw(this), result__.as_mut_ptr()).from_abi::(result__) } } - pub fn SetInformationalLink<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, StorageProviderErrorCommand>>, - { + pub fn SetInformationalLink(&self, value: &StorageProviderErrorCommand) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).SetInformationalLink)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetInformationalLink)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } pub fn CreateInstance(id: &::windows::core::HSTRING, title: &::windows::core::HSTRING, message: &::windows::core::HSTRING) -> ::windows::core::Result { Self::IStorageProviderErrorFactory(|this| unsafe { @@ -1525,13 +1501,10 @@ impl StorageProviderErrorCommand { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn CreateInstance<'a, P0>(label: &::windows::core::HSTRING, actionuri: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::Uri>>, - { + pub fn CreateInstance(label: &::windows::core::HSTRING, actionuri: &super::super::Foundation::Uri) -> ::windows::core::Result { Self::IStorageProviderErrorCommandFactory(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).CreateInstance)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(label), actionuri.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).CreateInstance)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(label), ::core::mem::transmute_copy(actionuri), result__.as_mut_ptr()).from_abi::(result__) }) } #[doc(hidden)] @@ -2450,12 +2423,9 @@ impl StorageProviderSyncRootInfo { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn SetRecycleBinUri<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::Uri>>, - { + pub fn SetRecycleBinUri(&self, value: &super::super::Foundation::Uri) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).SetRecycleBinUri)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetRecycleBinUri)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } pub fn ProviderId(&self) -> ::windows::core::Result<::windows::core::GUID> { let this = &::windows::core::Interface::cast::(self)?; @@ -2545,11 +2515,8 @@ unsafe impl ::core::marker::Sync for StorageProviderSyncRootInfo {} #[doc = "*Required features: `\"Storage_Provider\"`*"] pub struct StorageProviderSyncRootManager; impl StorageProviderSyncRootManager { - pub fn Register<'a, P0>(syncrootinformation: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, StorageProviderSyncRootInfo>>, - { - Self::IStorageProviderSyncRootManagerStatics(|this| unsafe { (::windows::core::Vtable::vtable(this).Register)(::windows::core::Vtable::as_raw(this), syncrootinformation.into().abi()).ok() }) + pub fn Register(syncrootinformation: &StorageProviderSyncRootInfo) -> ::windows::core::Result<()> { + Self::IStorageProviderSyncRootManagerStatics(|this| unsafe { (::windows::core::Vtable::vtable(this).Register)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(syncrootinformation)).ok() }) } pub fn Unregister(id: &::windows::core::HSTRING) -> ::windows::core::Result<()> { Self::IStorageProviderSyncRootManagerStatics(|this| unsafe { (::windows::core::Vtable::vtable(this).Unregister)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(id)).ok() }) diff --git a/crates/libs/windows/src/Windows/Storage/Search/mod.rs b/crates/libs/windows/src/Windows/Storage/Search/mod.rs index d7fd92d690..2bb2d6f092 100644 --- a/crates/libs/windows/src/Windows/Storage/Search/mod.rs +++ b/crates/libs/windows/src/Windows/Storage/Search/mod.rs @@ -397,14 +397,11 @@ impl IStorageFolderQueryOperations { (::windows::core::Vtable::vtable(this).CreateFileQuery)(::windows::core::Vtable::as_raw(this), query, result__.as_mut_ptr()).from_abi::(result__) } } - pub fn CreateFileQueryWithOptions<'a, P0>(&self, queryoptions: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, QueryOptions>>, - { + pub fn CreateFileQueryWithOptions(&self, queryoptions: &QueryOptions) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).CreateFileQueryWithOptions)(::windows::core::Vtable::as_raw(this), queryoptions.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).CreateFileQueryWithOptions)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(queryoptions), result__.as_mut_ptr()).from_abi::(result__) } } pub fn CreateFolderQueryOverloadDefault(&self) -> ::windows::core::Result { @@ -421,14 +418,11 @@ impl IStorageFolderQueryOperations { (::windows::core::Vtable::vtable(this).CreateFolderQuery)(::windows::core::Vtable::as_raw(this), query, result__.as_mut_ptr()).from_abi::(result__) } } - pub fn CreateFolderQueryWithOptions<'a, P0>(&self, queryoptions: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, QueryOptions>>, - { + pub fn CreateFolderQueryWithOptions(&self, queryoptions: &QueryOptions) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).CreateFolderQueryWithOptions)(::windows::core::Vtable::as_raw(this), queryoptions.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).CreateFolderQueryWithOptions)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(queryoptions), result__.as_mut_ptr()).from_abi::(result__) } } pub fn CreateItemQuery(&self) -> ::windows::core::Result { @@ -438,14 +432,11 @@ impl IStorageFolderQueryOperations { (::windows::core::Vtable::vtable(this).CreateItemQuery)(::windows::core::Vtable::as_raw(this), result__.as_mut_ptr()).from_abi::(result__) } } - pub fn CreateItemQueryWithOptions<'a, P0>(&self, queryoptions: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, QueryOptions>>, - { + pub fn CreateItemQueryWithOptions(&self, queryoptions: &QueryOptions) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).CreateItemQueryWithOptions)(::windows::core::Vtable::as_raw(this), queryoptions.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).CreateItemQueryWithOptions)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(queryoptions), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation_Collections\"`*"] @@ -493,14 +484,11 @@ impl IStorageFolderQueryOperations { (::windows::core::Vtable::vtable(this).GetItemsAsync)(::windows::core::Vtable::as_raw(this), startindex, maxitemstoretrieve, result__.as_mut_ptr()).from_abi::>>(result__) } } - pub fn AreQueryOptionsSupported<'a, P0>(&self, queryoptions: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, QueryOptions>>, - { + pub fn AreQueryOptionsSupported(&self, queryoptions: &QueryOptions) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).AreQueryOptionsSupported)(::windows::core::Vtable::as_raw(this), queryoptions.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).AreQueryOptionsSupported)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(queryoptions), result__.as_mut_ptr()).from_abi::(result__) } } pub fn IsCommonFolderQuerySupported(&self, query: CommonFolderQuery) -> ::windows::core::Result { @@ -718,14 +706,11 @@ impl IStorageQueryResultBase { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn ContentsChanged<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn ContentsChanged(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).ContentsChanged)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).ContentsChanged)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -736,14 +721,11 @@ impl IStorageQueryResultBase { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn OptionsChanged<'a, P0>(&self, changedhandler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn OptionsChanged(&self, changedhandler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).OptionsChanged)(::windows::core::Vtable::as_raw(this), changedhandler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).OptionsChanged)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(changedhandler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -771,12 +753,9 @@ impl IStorageQueryResultBase { (::windows::core::Vtable::vtable(this).GetCurrentQueryOptions)(::windows::core::Vtable::as_raw(this), result__.as_mut_ptr()).from_abi::(result__) } } - pub fn ApplyNewQueryOptions<'a, P0>(&self, newqueryoptions: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, QueryOptions>>, - { + pub fn ApplyNewQueryOptions(&self, newqueryoptions: &QueryOptions) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).ApplyNewQueryOptions)(::windows::core::Vtable::as_raw(this), newqueryoptions.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).ApplyNewQueryOptions)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(newqueryoptions)).ok() } } } impl ::core::convert::From for ::windows::core::IUnknown { @@ -1857,14 +1836,11 @@ impl StorageFileQueryResult { } #[doc = "*Required features: `\"Data_Text\"`, `\"Foundation_Collections\"`*"] #[cfg(all(feature = "Data_Text", feature = "Foundation_Collections"))] - pub fn GetMatchingPropertiesWithRanges<'a, P0>(&self, file: P0) -> ::windows::core::Result>> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::StorageFile>>, - { + pub fn GetMatchingPropertiesWithRanges(&self, file: &super::StorageFile) -> ::windows::core::Result>> { let this = &::windows::core::Interface::cast::(self)?; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).GetMatchingPropertiesWithRanges)(::windows::core::Vtable::as_raw(this), file.into().abi(), result__.as_mut_ptr()).from_abi::>>(result__) + (::windows::core::Vtable::vtable(this).GetMatchingPropertiesWithRanges)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(file), result__.as_mut_ptr()).from_abi::>>(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -1885,14 +1861,11 @@ impl StorageFileQueryResult { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn ContentsChanged<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn ContentsChanged(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = &::windows::core::Interface::cast::(self)?; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).ContentsChanged)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).ContentsChanged)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -1903,14 +1876,11 @@ impl StorageFileQueryResult { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn OptionsChanged<'a, P0>(&self, changedhandler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn OptionsChanged(&self, changedhandler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = &::windows::core::Interface::cast::(self)?; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).OptionsChanged)(::windows::core::Vtable::as_raw(this), changedhandler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).OptionsChanged)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(changedhandler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -1938,12 +1908,9 @@ impl StorageFileQueryResult { (::windows::core::Vtable::vtable(this).GetCurrentQueryOptions)(::windows::core::Vtable::as_raw(this), result__.as_mut_ptr()).from_abi::(result__) } } - pub fn ApplyNewQueryOptions<'a, P0>(&self, newqueryoptions: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, QueryOptions>>, - { + pub fn ApplyNewQueryOptions(&self, newqueryoptions: &QueryOptions) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).ApplyNewQueryOptions)(::windows::core::Vtable::as_raw(this), newqueryoptions.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).ApplyNewQueryOptions)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(newqueryoptions)).ok() } } } impl ::core::clone::Clone for StorageFileQueryResult { @@ -2067,14 +2034,11 @@ impl StorageFolderQueryResult { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn ContentsChanged<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn ContentsChanged(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = &::windows::core::Interface::cast::(self)?; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).ContentsChanged)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).ContentsChanged)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -2085,14 +2049,11 @@ impl StorageFolderQueryResult { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn OptionsChanged<'a, P0>(&self, changedhandler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn OptionsChanged(&self, changedhandler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = &::windows::core::Interface::cast::(self)?; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).OptionsChanged)(::windows::core::Vtable::as_raw(this), changedhandler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).OptionsChanged)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(changedhandler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -2120,12 +2081,9 @@ impl StorageFolderQueryResult { (::windows::core::Vtable::vtable(this).GetCurrentQueryOptions)(::windows::core::Vtable::as_raw(this), result__.as_mut_ptr()).from_abi::(result__) } } - pub fn ApplyNewQueryOptions<'a, P0>(&self, newqueryoptions: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, QueryOptions>>, - { + pub fn ApplyNewQueryOptions(&self, newqueryoptions: &QueryOptions) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).ApplyNewQueryOptions)(::windows::core::Vtable::as_raw(this), newqueryoptions.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).ApplyNewQueryOptions)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(newqueryoptions)).ok() } } } impl ::core::clone::Clone for StorageFolderQueryResult { @@ -2249,14 +2207,11 @@ impl StorageItemQueryResult { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn ContentsChanged<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn ContentsChanged(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = &::windows::core::Interface::cast::(self)?; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).ContentsChanged)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).ContentsChanged)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -2267,14 +2222,11 @@ impl StorageItemQueryResult { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn OptionsChanged<'a, P0>(&self, changedhandler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn OptionsChanged(&self, changedhandler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = &::windows::core::Interface::cast::(self)?; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).OptionsChanged)(::windows::core::Vtable::as_raw(this), changedhandler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).OptionsChanged)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(changedhandler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -2302,12 +2254,9 @@ impl StorageItemQueryResult { (::windows::core::Vtable::vtable(this).GetCurrentQueryOptions)(::windows::core::Vtable::as_raw(this), result__.as_mut_ptr()).from_abi::(result__) } } - pub fn ApplyNewQueryOptions<'a, P0>(&self, newqueryoptions: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, QueryOptions>>, - { + pub fn ApplyNewQueryOptions(&self, newqueryoptions: &QueryOptions) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).ApplyNewQueryOptions)(::windows::core::Vtable::as_raw(this), newqueryoptions.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).ApplyNewQueryOptions)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(newqueryoptions)).ok() } } } impl ::core::clone::Clone for StorageItemQueryResult { diff --git a/crates/libs/windows/src/Windows/Storage/Streams/mod.rs b/crates/libs/windows/src/Windows/Storage/Streams/mod.rs index ef6698b705..62ac904503 100644 --- a/crates/libs/windows/src/Windows/Storage/Streams/mod.rs +++ b/crates/libs/windows/src/Windows/Storage/Streams/mod.rs @@ -2408,12 +2408,9 @@ impl DataReaderLoadOperation { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn SetCompleted<'a, P0>(&self, handler: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::AsyncOperationCompletedHandler>>, - { + pub fn SetCompleted(&self, handler: &super::super::Foundation::AsyncOperationCompletedHandler) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).SetCompleted)(::windows::core::Vtable::as_raw(this), handler.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetCompleted)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler)).ok() } } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] @@ -2925,12 +2922,9 @@ impl DataWriterStoreOperation { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn SetCompleted<'a, P0>(&self, handler: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::AsyncOperationCompletedHandler>>, - { + pub fn SetCompleted(&self, handler: &super::super::Foundation::AsyncOperationCompletedHandler) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).SetCompleted)(::windows::core::Vtable::as_raw(this), handler.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetCompleted)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler)).ok() } } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] @@ -3417,46 +3411,34 @@ impl FileRandomAccessStream { } #[doc = "*Required features: `\"Foundation\"`, `\"System\"`*"] #[cfg(all(feature = "Foundation", feature = "System"))] - pub fn OpenForUserAsync<'a, P0>(user: P0, filepath: &::windows::core::HSTRING, accessmode: super::FileAccessMode) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::System::User>>, - { + pub fn OpenForUserAsync(user: &super::super::System::User, filepath: &::windows::core::HSTRING, accessmode: super::FileAccessMode) -> ::windows::core::Result> { Self::IFileRandomAccessStreamStatics(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).OpenForUserAsync)(::windows::core::Vtable::as_raw(this), user.into().abi(), ::core::mem::transmute_copy(filepath), accessmode, result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).OpenForUserAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(user), ::core::mem::transmute_copy(filepath), accessmode, result__.as_mut_ptr()).from_abi::>(result__) }) } #[doc = "*Required features: `\"Foundation\"`, `\"System\"`*"] #[cfg(all(feature = "Foundation", feature = "System"))] - pub fn OpenForUserWithOptionsAsync<'a, P0>(user: P0, filepath: &::windows::core::HSTRING, accessmode: super::FileAccessMode, sharingoptions: super::StorageOpenOptions, opendisposition: FileOpenDisposition) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::System::User>>, - { + pub fn OpenForUserWithOptionsAsync(user: &super::super::System::User, filepath: &::windows::core::HSTRING, accessmode: super::FileAccessMode, sharingoptions: super::StorageOpenOptions, opendisposition: FileOpenDisposition) -> ::windows::core::Result> { Self::IFileRandomAccessStreamStatics(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).OpenForUserWithOptionsAsync)(::windows::core::Vtable::as_raw(this), user.into().abi(), ::core::mem::transmute_copy(filepath), accessmode, sharingoptions, opendisposition, result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).OpenForUserWithOptionsAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(user), ::core::mem::transmute_copy(filepath), accessmode, sharingoptions, opendisposition, result__.as_mut_ptr()).from_abi::>(result__) }) } #[doc = "*Required features: `\"Foundation\"`, `\"System\"`*"] #[cfg(all(feature = "Foundation", feature = "System"))] - pub fn OpenTransactedWriteForUserAsync<'a, P0>(user: P0, filepath: &::windows::core::HSTRING) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::System::User>>, - { + pub fn OpenTransactedWriteForUserAsync(user: &super::super::System::User, filepath: &::windows::core::HSTRING) -> ::windows::core::Result> { Self::IFileRandomAccessStreamStatics(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).OpenTransactedWriteForUserAsync)(::windows::core::Vtable::as_raw(this), user.into().abi(), ::core::mem::transmute_copy(filepath), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).OpenTransactedWriteForUserAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(user), ::core::mem::transmute_copy(filepath), result__.as_mut_ptr()).from_abi::>(result__) }) } #[doc = "*Required features: `\"Foundation\"`, `\"System\"`*"] #[cfg(all(feature = "Foundation", feature = "System"))] - pub fn OpenTransactedWriteForUserWithOptionsAsync<'a, P0>(user: P0, filepath: &::windows::core::HSTRING, openoptions: super::StorageOpenOptions, opendisposition: FileOpenDisposition) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::System::User>>, - { + pub fn OpenTransactedWriteForUserWithOptionsAsync(user: &super::super::System::User, filepath: &::windows::core::HSTRING, openoptions: super::StorageOpenOptions, opendisposition: FileOpenDisposition) -> ::windows::core::Result> { Self::IFileRandomAccessStreamStatics(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).OpenTransactedWriteForUserWithOptionsAsync)(::windows::core::Vtable::as_raw(this), user.into().abi(), ::core::mem::transmute_copy(filepath), openoptions, opendisposition, result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).OpenTransactedWriteForUserWithOptionsAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(user), ::core::mem::transmute_copy(filepath), openoptions, opendisposition, result__.as_mut_ptr()).from_abi::>(result__) }) } #[doc = "*Required features: `\"Foundation\"`*"] @@ -4545,13 +4527,10 @@ impl RandomAccessStreamReference { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn CreateFromUri<'a, P0>(uri: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::Uri>>, - { + pub fn CreateFromUri(uri: &super::super::Foundation::Uri) -> ::windows::core::Result { Self::IRandomAccessStreamReferenceStatics(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).CreateFromUri)(::windows::core::Vtable::as_raw(this), uri.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).CreateFromUri)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(uri), result__.as_mut_ptr()).from_abi::(result__) }) } pub fn CreateFromStream<'a, P0, E0>(stream: P0) -> ::windows::core::Result diff --git a/crates/libs/windows/src/Windows/Storage/mod.rs b/crates/libs/windows/src/Windows/Storage/mod.rs index a714c93e66..5b7111e80b 100644 --- a/crates/libs/windows/src/Windows/Storage/mod.rs +++ b/crates/libs/windows/src/Windows/Storage/mod.rs @@ -3196,13 +3196,10 @@ impl AppDataPaths { } #[doc = "*Required features: `\"System\"`*"] #[cfg(feature = "System")] - pub fn GetForUser<'a, P0>(user: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::System::User>>, - { + pub fn GetForUser(user: &super::System::User) -> ::windows::core::Result { Self::IAppDataPathsStatics(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).GetForUser)(::windows::core::Vtable::as_raw(this), user.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).GetForUser)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(user), result__.as_mut_ptr()).from_abi::(result__) }) } pub fn GetDefault() -> ::windows::core::Result { @@ -3294,14 +3291,11 @@ impl ApplicationData { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn SetVersionAsync<'a, P0>(&self, desiredversion: u32, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, ApplicationDataSetVersionHandler>>, - { + pub fn SetVersionAsync(&self, desiredversion: u32, handler: &ApplicationDataSetVersionHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).SetVersionAsync)(::windows::core::Vtable::as_raw(this), desiredversion, handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).SetVersionAsync)(::windows::core::Vtable::as_raw(this), desiredversion, ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -3359,14 +3353,11 @@ impl ApplicationData { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn DataChanged<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::Foundation::TypedEventHandler>>, - { + pub fn DataChanged(&self, handler: &super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).DataChanged)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).DataChanged)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -3424,13 +3415,10 @@ impl ApplicationData { } #[doc = "*Required features: `\"Foundation\"`, `\"System\"`*"] #[cfg(all(feature = "Foundation", feature = "System"))] - pub fn GetForUserAsync<'a, P0>(user: P0) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::System::User>>, - { + pub fn GetForUserAsync(user: &super::System::User) -> ::windows::core::Result> { Self::IApplicationDataStatics2(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).GetForUserAsync)(::windows::core::Vtable::as_raw(this), user.into().abi(), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).GetForUserAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(user), result__.as_mut_ptr()).from_abi::>(result__) }) } #[doc = "*Required features: `\"Foundation\"`*"] @@ -3620,14 +3608,11 @@ impl ApplicationDataCompositeValue { } #[doc = "*Required features: `\"Foundation_Collections\"`*"] #[cfg(feature = "Foundation_Collections")] - pub fn MapChanged<'a, P0>(&self, vhnd: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::Foundation::Collections::MapChangedEventHandler<::windows::core::HSTRING, ::windows::core::IInspectable>>>, - { + pub fn MapChanged(&self, vhnd: &super::Foundation::Collections::MapChangedEventHandler<::windows::core::HSTRING, ::windows::core::IInspectable>) -> ::windows::core::Result { let this = &::windows::core::Interface::cast::>(self)?; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).MapChanged)(::windows::core::Vtable::as_raw(this), vhnd.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).MapChanged)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(vhnd), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation_Collections\"`*"] @@ -4038,14 +4023,11 @@ impl ApplicationDataContainerSettings { } #[doc = "*Required features: `\"Foundation_Collections\"`*"] #[cfg(feature = "Foundation_Collections")] - pub fn MapChanged<'a, P0>(&self, vhnd: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::Foundation::Collections::MapChangedEventHandler<::windows::core::HSTRING, ::windows::core::IInspectable>>>, - { + pub fn MapChanged(&self, vhnd: &super::Foundation::Collections::MapChangedEventHandler<::windows::core::HSTRING, ::windows::core::IInspectable>) -> ::windows::core::Result { let this = &::windows::core::Interface::cast::>(self)?; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).MapChanged)(::windows::core::Vtable::as_raw(this), vhnd.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).MapChanged)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(vhnd), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation_Collections\"`*"] @@ -4307,46 +4289,34 @@ impl DownloadsFolder { } #[doc = "*Required features: `\"Foundation\"`, `\"System\"`*"] #[cfg(all(feature = "Foundation", feature = "System"))] - pub fn CreateFileForUserAsync<'a, P0>(user: P0, desiredname: &::windows::core::HSTRING) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::System::User>>, - { + pub fn CreateFileForUserAsync(user: &super::System::User, desiredname: &::windows::core::HSTRING) -> ::windows::core::Result> { Self::IDownloadsFolderStatics2(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).CreateFileForUserAsync)(::windows::core::Vtable::as_raw(this), user.into().abi(), ::core::mem::transmute_copy(desiredname), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).CreateFileForUserAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(user), ::core::mem::transmute_copy(desiredname), result__.as_mut_ptr()).from_abi::>(result__) }) } #[doc = "*Required features: `\"Foundation\"`, `\"System\"`*"] #[cfg(all(feature = "Foundation", feature = "System"))] - pub fn CreateFolderForUserAsync<'a, P0>(user: P0, desiredname: &::windows::core::HSTRING) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::System::User>>, - { + pub fn CreateFolderForUserAsync(user: &super::System::User, desiredname: &::windows::core::HSTRING) -> ::windows::core::Result> { Self::IDownloadsFolderStatics2(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).CreateFolderForUserAsync)(::windows::core::Vtable::as_raw(this), user.into().abi(), ::core::mem::transmute_copy(desiredname), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).CreateFolderForUserAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(user), ::core::mem::transmute_copy(desiredname), result__.as_mut_ptr()).from_abi::>(result__) }) } #[doc = "*Required features: `\"Foundation\"`, `\"System\"`*"] #[cfg(all(feature = "Foundation", feature = "System"))] - pub fn CreateFileForUserWithCollisionOptionAsync<'a, P0>(user: P0, desiredname: &::windows::core::HSTRING, option: CreationCollisionOption) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::System::User>>, - { + pub fn CreateFileForUserWithCollisionOptionAsync(user: &super::System::User, desiredname: &::windows::core::HSTRING, option: CreationCollisionOption) -> ::windows::core::Result> { Self::IDownloadsFolderStatics2(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).CreateFileForUserWithCollisionOptionAsync)(::windows::core::Vtable::as_raw(this), user.into().abi(), ::core::mem::transmute_copy(desiredname), option, result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).CreateFileForUserWithCollisionOptionAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(user), ::core::mem::transmute_copy(desiredname), option, result__.as_mut_ptr()).from_abi::>(result__) }) } #[doc = "*Required features: `\"Foundation\"`, `\"System\"`*"] #[cfg(all(feature = "Foundation", feature = "System"))] - pub fn CreateFolderForUserWithCollisionOptionAsync<'a, P0>(user: P0, desiredname: &::windows::core::HSTRING, option: CreationCollisionOption) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::System::User>>, - { + pub fn CreateFolderForUserWithCollisionOptionAsync(user: &super::System::User, desiredname: &::windows::core::HSTRING, option: CreationCollisionOption) -> ::windows::core::Result> { Self::IDownloadsFolderStatics2(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).CreateFolderForUserWithCollisionOptionAsync)(::windows::core::Vtable::as_raw(this), user.into().abi(), ::core::mem::transmute_copy(desiredname), option, result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).CreateFolderForUserWithCollisionOptionAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(user), ::core::mem::transmute_copy(desiredname), option, result__.as_mut_ptr()).from_abi::>(result__) }) } #[doc(hidden)] @@ -4648,13 +4618,10 @@ impl KnownFolders { } #[doc = "*Required features: `\"Foundation\"`, `\"System\"`*"] #[cfg(all(feature = "Foundation", feature = "System"))] - pub fn GetFolderForUserAsync<'a, P0>(user: P0, folderid: KnownFolderId) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::System::User>>, - { + pub fn GetFolderForUserAsync(user: &super::System::User, folderid: KnownFolderId) -> ::windows::core::Result> { Self::IKnownFoldersStatics3(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).GetFolderForUserAsync)(::windows::core::Vtable::as_raw(this), user.into().abi(), folderid, result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).GetFolderForUserAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(user), folderid, result__.as_mut_ptr()).from_abi::>(result__) }) } #[doc = "*Required features: `\"Foundation\"`*"] @@ -4667,13 +4634,10 @@ impl KnownFolders { } #[doc = "*Required features: `\"Foundation\"`, `\"System\"`*"] #[cfg(all(feature = "Foundation", feature = "System"))] - pub fn RequestAccessForUserAsync<'a, P0>(user: P0, folderid: KnownFolderId) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::System::User>>, - { + pub fn RequestAccessForUserAsync(user: &super::System::User, folderid: KnownFolderId) -> ::windows::core::Result> { Self::IKnownFoldersStatics4(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).RequestAccessForUserAsync)(::windows::core::Vtable::as_raw(this), user.into().abi(), folderid, result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).RequestAccessForUserAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(user), folderid, result__.as_mut_ptr()).from_abi::>(result__) }) } #[doc = "*Required features: `\"Foundation\"`*"] @@ -5231,80 +5195,70 @@ impl StorageFile { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn GetFileFromApplicationUriAsync<'a, P0>(uri: P0) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::Foundation::Uri>>, - { + pub fn GetFileFromApplicationUriAsync(uri: &super::Foundation::Uri) -> ::windows::core::Result> { Self::IStorageFileStatics(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).GetFileFromApplicationUriAsync)(::windows::core::Vtable::as_raw(this), uri.into().abi(), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).GetFileFromApplicationUriAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(uri), result__.as_mut_ptr()).from_abi::>(result__) }) } #[doc = "*Required features: `\"Foundation\"`, `\"Storage_Streams\"`*"] #[cfg(all(feature = "Foundation", feature = "Storage_Streams"))] - pub fn CreateStreamedFileAsync<'a, P0, P1, E1>(displaynamewithextension: &::windows::core::HSTRING, datarequested: P0, thumbnail: P1) -> ::windows::core::Result> + pub fn CreateStreamedFileAsync<'a, P0, E0>(displaynamewithextension: &::windows::core::HSTRING, datarequested: &StreamedFileDataRequestedHandler, thumbnail: P0) -> ::windows::core::Result> where - P0: ::std::convert::Into<::windows::core::InParam<'a, StreamedFileDataRequestedHandler>>, - P1: ::std::convert::TryInto<::windows::core::InParam<'a, Streams::IRandomAccessStreamReference>, Error = E1>, - E1: ::std::convert::Into<::windows::core::Error>, + P0: ::std::convert::TryInto<::windows::core::InParam<'a, Streams::IRandomAccessStreamReference>, Error = E0>, + E0: ::std::convert::Into<::windows::core::Error>, { Self::IStorageFileStatics(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).CreateStreamedFileAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(displaynamewithextension), datarequested.into().abi(), thumbnail.try_into().map_err(|e| e.into())?.abi(), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).CreateStreamedFileAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(displaynamewithextension), ::core::mem::transmute_copy(datarequested), thumbnail.try_into().map_err(|e| e.into())?.abi(), result__.as_mut_ptr()).from_abi::>(result__) }) } #[doc = "*Required features: `\"Foundation\"`, `\"Storage_Streams\"`*"] #[cfg(all(feature = "Foundation", feature = "Storage_Streams"))] - pub fn ReplaceWithStreamedFileAsync<'a, P0, E0, P1, P2, E2>(filetoreplace: P0, datarequested: P1, thumbnail: P2) -> ::windows::core::Result> + pub fn ReplaceWithStreamedFileAsync<'a, P0, E0, P1, E1>(filetoreplace: P0, datarequested: &StreamedFileDataRequestedHandler, thumbnail: P1) -> ::windows::core::Result> where P0: ::std::convert::TryInto<::windows::core::InParam<'a, IStorageFile>, Error = E0>, E0: ::std::convert::Into<::windows::core::Error>, - P1: ::std::convert::Into<::windows::core::InParam<'a, StreamedFileDataRequestedHandler>>, - P2: ::std::convert::TryInto<::windows::core::InParam<'a, Streams::IRandomAccessStreamReference>, Error = E2>, - E2: ::std::convert::Into<::windows::core::Error>, + P1: ::std::convert::TryInto<::windows::core::InParam<'a, Streams::IRandomAccessStreamReference>, Error = E1>, + E1: ::std::convert::Into<::windows::core::Error>, { Self::IStorageFileStatics(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).ReplaceWithStreamedFileAsync)(::windows::core::Vtable::as_raw(this), filetoreplace.try_into().map_err(|e| e.into())?.abi(), datarequested.into().abi(), thumbnail.try_into().map_err(|e| e.into())?.abi(), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).ReplaceWithStreamedFileAsync)(::windows::core::Vtable::as_raw(this), filetoreplace.try_into().map_err(|e| e.into())?.abi(), ::core::mem::transmute_copy(datarequested), thumbnail.try_into().map_err(|e| e.into())?.abi(), result__.as_mut_ptr()).from_abi::>(result__) }) } #[doc = "*Required features: `\"Foundation\"`, `\"Storage_Streams\"`*"] #[cfg(all(feature = "Foundation", feature = "Storage_Streams"))] - pub fn CreateStreamedFileFromUriAsync<'a, P0, P1, E1>(displaynamewithextension: &::windows::core::HSTRING, uri: P0, thumbnail: P1) -> ::windows::core::Result> + pub fn CreateStreamedFileFromUriAsync<'a, P0, E0>(displaynamewithextension: &::windows::core::HSTRING, uri: &super::Foundation::Uri, thumbnail: P0) -> ::windows::core::Result> where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::Foundation::Uri>>, - P1: ::std::convert::TryInto<::windows::core::InParam<'a, Streams::IRandomAccessStreamReference>, Error = E1>, - E1: ::std::convert::Into<::windows::core::Error>, + P0: ::std::convert::TryInto<::windows::core::InParam<'a, Streams::IRandomAccessStreamReference>, Error = E0>, + E0: ::std::convert::Into<::windows::core::Error>, { Self::IStorageFileStatics(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).CreateStreamedFileFromUriAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(displaynamewithextension), uri.into().abi(), thumbnail.try_into().map_err(|e| e.into())?.abi(), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).CreateStreamedFileFromUriAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(displaynamewithextension), ::core::mem::transmute_copy(uri), thumbnail.try_into().map_err(|e| e.into())?.abi(), result__.as_mut_ptr()).from_abi::>(result__) }) } #[doc = "*Required features: `\"Foundation\"`, `\"Storage_Streams\"`*"] #[cfg(all(feature = "Foundation", feature = "Storage_Streams"))] - pub fn ReplaceWithStreamedFileFromUriAsync<'a, P0, E0, P1, P2, E2>(filetoreplace: P0, uri: P1, thumbnail: P2) -> ::windows::core::Result> + pub fn ReplaceWithStreamedFileFromUriAsync<'a, P0, E0, P1, E1>(filetoreplace: P0, uri: &super::Foundation::Uri, thumbnail: P1) -> ::windows::core::Result> where P0: ::std::convert::TryInto<::windows::core::InParam<'a, IStorageFile>, Error = E0>, E0: ::std::convert::Into<::windows::core::Error>, - P1: ::std::convert::Into<::windows::core::InParam<'a, super::Foundation::Uri>>, - P2: ::std::convert::TryInto<::windows::core::InParam<'a, Streams::IRandomAccessStreamReference>, Error = E2>, - E2: ::std::convert::Into<::windows::core::Error>, + P1: ::std::convert::TryInto<::windows::core::InParam<'a, Streams::IRandomAccessStreamReference>, Error = E1>, + E1: ::std::convert::Into<::windows::core::Error>, { Self::IStorageFileStatics(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).ReplaceWithStreamedFileFromUriAsync)(::windows::core::Vtable::as_raw(this), filetoreplace.try_into().map_err(|e| e.into())?.abi(), uri.into().abi(), thumbnail.try_into().map_err(|e| e.into())?.abi(), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).ReplaceWithStreamedFileFromUriAsync)(::windows::core::Vtable::as_raw(this), filetoreplace.try_into().map_err(|e| e.into())?.abi(), ::core::mem::transmute_copy(uri), thumbnail.try_into().map_err(|e| e.into())?.abi(), result__.as_mut_ptr()).from_abi::>(result__) }) } #[doc = "*Required features: `\"Foundation\"`, `\"System\"`*"] #[cfg(all(feature = "Foundation", feature = "System"))] - pub fn GetFileFromPathForUserAsync<'a, P0>(user: P0, path: &::windows::core::HSTRING) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::System::User>>, - { + pub fn GetFileFromPathForUserAsync(user: &super::System::User, path: &::windows::core::HSTRING) -> ::windows::core::Result> { Self::IStorageFileStatics2(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).GetFileFromPathForUserAsync)(::windows::core::Vtable::as_raw(this), user.into().abi(), ::core::mem::transmute_copy(path), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).GetFileFromPathForUserAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(user), ::core::mem::transmute_copy(path), result__.as_mut_ptr()).from_abi::>(result__) }) } #[doc = "*Required features: `\"Foundation\"`*"] @@ -5908,14 +5862,11 @@ impl StorageFolder { } #[doc = "*Required features: `\"Storage_Search\"`*"] #[cfg(feature = "Storage_Search")] - pub fn CreateFileQueryWithOptions<'a, P0>(&self, queryoptions: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, Search::QueryOptions>>, - { + pub fn CreateFileQueryWithOptions(&self, queryoptions: &Search::QueryOptions) -> ::windows::core::Result { let this = &::windows::core::Interface::cast::(self)?; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).CreateFileQueryWithOptions)(::windows::core::Vtable::as_raw(this), queryoptions.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).CreateFileQueryWithOptions)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(queryoptions), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Storage_Search\"`*"] @@ -5938,14 +5889,11 @@ impl StorageFolder { } #[doc = "*Required features: `\"Storage_Search\"`*"] #[cfg(feature = "Storage_Search")] - pub fn CreateFolderQueryWithOptions<'a, P0>(&self, queryoptions: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, Search::QueryOptions>>, - { + pub fn CreateFolderQueryWithOptions(&self, queryoptions: &Search::QueryOptions) -> ::windows::core::Result { let this = &::windows::core::Interface::cast::(self)?; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).CreateFolderQueryWithOptions)(::windows::core::Vtable::as_raw(this), queryoptions.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).CreateFolderQueryWithOptions)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(queryoptions), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Storage_Search\"`*"] @@ -5959,14 +5907,11 @@ impl StorageFolder { } #[doc = "*Required features: `\"Storage_Search\"`*"] #[cfg(feature = "Storage_Search")] - pub fn CreateItemQueryWithOptions<'a, P0>(&self, queryoptions: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, Search::QueryOptions>>, - { + pub fn CreateItemQueryWithOptions(&self, queryoptions: &Search::QueryOptions) -> ::windows::core::Result { let this = &::windows::core::Interface::cast::(self)?; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).CreateItemQueryWithOptions)(::windows::core::Vtable::as_raw(this), queryoptions.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).CreateItemQueryWithOptions)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(queryoptions), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation_Collections\"`, `\"Storage_Search\"`*"] @@ -6016,14 +5961,11 @@ impl StorageFolder { } #[doc = "*Required features: `\"Storage_Search\"`*"] #[cfg(feature = "Storage_Search")] - pub fn AreQueryOptionsSupported<'a, P0>(&self, queryoptions: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, Search::QueryOptions>>, - { + pub fn AreQueryOptionsSupported(&self, queryoptions: &Search::QueryOptions) -> ::windows::core::Result { let this = &::windows::core::Interface::cast::(self)?; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).AreQueryOptionsSupported)(::windows::core::Vtable::as_raw(this), queryoptions.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).AreQueryOptionsSupported)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(queryoptions), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Storage_Search\"`*"] @@ -6054,13 +5996,10 @@ impl StorageFolder { } #[doc = "*Required features: `\"Foundation\"`, `\"System\"`*"] #[cfg(all(feature = "Foundation", feature = "System"))] - pub fn GetFolderFromPathForUserAsync<'a, P0>(user: P0, path: &::windows::core::HSTRING) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::System::User>>, - { + pub fn GetFolderFromPathForUserAsync(user: &super::System::User, path: &::windows::core::HSTRING) -> ::windows::core::Result> { Self::IStorageFolderStatics2(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).GetFolderFromPathForUserAsync)(::windows::core::Vtable::as_raw(this), user.into().abi(), ::core::mem::transmute_copy(path), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).GetFolderFromPathForUserAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(user), ::core::mem::transmute_copy(path), result__.as_mut_ptr()).from_abi::>(result__) }) } #[doc = "*Required features: `\"Foundation\"`*"] @@ -6499,14 +6438,11 @@ impl StorageLibrary { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn RequestRemoveFolderAsync<'a, P0>(&self, folder: P0) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, StorageFolder>>, - { + pub fn RequestRemoveFolderAsync(&self, folder: &StorageFolder) -> ::windows::core::Result> { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).RequestRemoveFolderAsync)(::windows::core::Vtable::as_raw(this), folder.into().abi(), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).RequestRemoveFolderAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(folder), result__.as_mut_ptr()).from_abi::>(result__) } } #[doc = "*Required features: `\"Foundation_Collections\"`*"] @@ -6527,14 +6463,11 @@ impl StorageLibrary { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn DefinitionChanged<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::Foundation::TypedEventHandler>>, - { + pub fn DefinitionChanged(&self, handler: &super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).DefinitionChanged)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).DefinitionChanged)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -6569,13 +6502,10 @@ impl StorageLibrary { } #[doc = "*Required features: `\"Foundation\"`, `\"System\"`*"] #[cfg(all(feature = "Foundation", feature = "System"))] - pub fn GetLibraryForUserAsync<'a, P0>(user: P0, libraryid: KnownLibraryId) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::System::User>>, - { + pub fn GetLibraryForUserAsync(user: &super::System::User, libraryid: KnownLibraryId) -> ::windows::core::Result> { Self::IStorageLibraryStatics2(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).GetLibraryForUserAsync)(::windows::core::Vtable::as_raw(this), user.into().abi(), libraryid, result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).GetLibraryForUserAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(user), libraryid, result__.as_mut_ptr()).from_abi::>(result__) }) } #[doc(hidden)] @@ -6870,12 +6800,9 @@ impl StorageLibraryChangeTracker { let this = self; unsafe { (::windows::core::Vtable::vtable(this).Reset)(::windows::core::Vtable::as_raw(this)).ok() } } - pub fn EnableWithOptions<'a, P0>(&self, options: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, StorageLibraryChangeTrackerOptions>>, - { + pub fn EnableWithOptions(&self, options: &StorageLibraryChangeTrackerOptions) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).EnableWithOptions)(::windows::core::Vtable::as_raw(this), options.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).EnableWithOptions)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(options)).ok() } } pub fn Disable(&self) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; @@ -8604,13 +8531,10 @@ impl UserDataPaths { } #[doc = "*Required features: `\"System\"`*"] #[cfg(feature = "System")] - pub fn GetForUser<'a, P0>(user: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::System::User>>, - { + pub fn GetForUser(user: &super::System::User) -> ::windows::core::Result { Self::IUserDataPathsStatics(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).GetForUser)(::windows::core::Vtable::as_raw(this), user.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).GetForUser)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(user), result__.as_mut_ptr()).from_abi::(result__) }) } pub fn GetDefault() -> ::windows::core::Result { @@ -9299,12 +9223,9 @@ impl ApplicationDataSetVersionHandler { let com = ApplicationDataSetVersionHandlerBox:: { vtable: &ApplicationDataSetVersionHandlerBox::::VTABLE, count: ::windows::core::RefCount::new(1), invoke }; unsafe { ::core::mem::transmute(::windows::core::alloc::boxed::Box::new(com)) } } - pub fn Invoke<'a, P0>(&self, setversionrequest: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, SetVersionRequest>>, - { + pub fn Invoke(&self, setversionrequest: &SetVersionRequest) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).Invoke)(::windows::core::Vtable::as_raw(this), setversionrequest.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).Invoke)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(setversionrequest)).ok() } } } #[repr(C)] @@ -9392,12 +9313,9 @@ impl StreamedFileDataRequestedHandler { } #[doc = "*Required features: `\"Storage_Streams\"`*"] #[cfg(feature = "Storage_Streams")] - pub fn Invoke<'a, P0>(&self, stream: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, StreamedFileDataRequest>>, - { + pub fn Invoke(&self, stream: &StreamedFileDataRequest) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).Invoke)(::windows::core::Vtable::as_raw(this), stream.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).Invoke)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(stream)).ok() } } } #[cfg(feature = "Storage_Streams")] diff --git a/crates/libs/windows/src/Windows/System/Diagnostics/DevicePortal/mod.rs b/crates/libs/windows/src/Windows/System/Diagnostics/DevicePortal/mod.rs index 267d3ae9d2..0d20a8768d 100644 --- a/crates/libs/windows/src/Windows/System/Diagnostics/DevicePortal/mod.rs +++ b/crates/libs/windows/src/Windows/System/Diagnostics/DevicePortal/mod.rs @@ -146,14 +146,11 @@ pub struct DevicePortalConnection(::windows::core::IUnknown); impl DevicePortalConnection { #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn Closed<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Foundation::TypedEventHandler>>, - { + pub fn Closed(&self, handler: &super::super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).Closed)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).Closed)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -164,14 +161,11 @@ impl DevicePortalConnection { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn RequestReceived<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Foundation::TypedEventHandler>>, - { + pub fn RequestReceived(&self, handler: &super::super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).RequestReceived)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).RequestReceived)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -182,73 +176,55 @@ impl DevicePortalConnection { } #[doc = "*Required features: `\"ApplicationModel_AppService\"`*"] #[cfg(feature = "ApplicationModel_AppService")] - pub fn GetForAppServiceConnection<'a, P0>(appserviceconnection: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::ApplicationModel::AppService::AppServiceConnection>>, - { + pub fn GetForAppServiceConnection(appserviceconnection: &super::super::super::ApplicationModel::AppService::AppServiceConnection) -> ::windows::core::Result { Self::IDevicePortalConnectionStatics(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).GetForAppServiceConnection)(::windows::core::Vtable::as_raw(this), appserviceconnection.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).GetForAppServiceConnection)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(appserviceconnection), result__.as_mut_ptr()).from_abi::(result__) }) } #[doc = "*Required features: `\"Networking_Sockets\"`, `\"Web_Http\"`*"] #[cfg(all(feature = "Networking_Sockets", feature = "Web_Http"))] - pub fn GetServerMessageWebSocketForRequest<'a, P0>(&self, request: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Web::Http::HttpRequestMessage>>, - { + pub fn GetServerMessageWebSocketForRequest(&self, request: &super::super::super::Web::Http::HttpRequestMessage) -> ::windows::core::Result { let this = &::windows::core::Interface::cast::(self)?; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).GetServerMessageWebSocketForRequest)(::windows::core::Vtable::as_raw(this), request.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).GetServerMessageWebSocketForRequest)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(request), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Networking_Sockets\"`, `\"Web_Http\"`*"] #[cfg(all(feature = "Networking_Sockets", feature = "Web_Http"))] - pub fn GetServerMessageWebSocketForRequest2<'a, P0>(&self, request: P0, messagetype: super::super::super::Networking::Sockets::SocketMessageType, protocol: &::windows::core::HSTRING) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Web::Http::HttpRequestMessage>>, - { + pub fn GetServerMessageWebSocketForRequest2(&self, request: &super::super::super::Web::Http::HttpRequestMessage, messagetype: super::super::super::Networking::Sockets::SocketMessageType, protocol: &::windows::core::HSTRING) -> ::windows::core::Result { let this = &::windows::core::Interface::cast::(self)?; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).GetServerMessageWebSocketForRequest2)(::windows::core::Vtable::as_raw(this), request.into().abi(), messagetype, ::core::mem::transmute_copy(protocol), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).GetServerMessageWebSocketForRequest2)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(request), messagetype, ::core::mem::transmute_copy(protocol), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Networking_Sockets\"`, `\"Web_Http\"`*"] #[cfg(all(feature = "Networking_Sockets", feature = "Web_Http"))] - pub fn GetServerMessageWebSocketForRequest3<'a, P0>(&self, request: P0, messagetype: super::super::super::Networking::Sockets::SocketMessageType, protocol: &::windows::core::HSTRING, outboundbuffersizeinbytes: u32, maxmessagesize: u32, receivemode: super::super::super::Networking::Sockets::MessageWebSocketReceiveMode) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Web::Http::HttpRequestMessage>>, - { + pub fn GetServerMessageWebSocketForRequest3(&self, request: &super::super::super::Web::Http::HttpRequestMessage, messagetype: super::super::super::Networking::Sockets::SocketMessageType, protocol: &::windows::core::HSTRING, outboundbuffersizeinbytes: u32, maxmessagesize: u32, receivemode: super::super::super::Networking::Sockets::MessageWebSocketReceiveMode) -> ::windows::core::Result { let this = &::windows::core::Interface::cast::(self)?; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).GetServerMessageWebSocketForRequest3)(::windows::core::Vtable::as_raw(this), request.into().abi(), messagetype, ::core::mem::transmute_copy(protocol), outboundbuffersizeinbytes, maxmessagesize, receivemode, result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).GetServerMessageWebSocketForRequest3)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(request), messagetype, ::core::mem::transmute_copy(protocol), outboundbuffersizeinbytes, maxmessagesize, receivemode, result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Networking_Sockets\"`, `\"Web_Http\"`*"] #[cfg(all(feature = "Networking_Sockets", feature = "Web_Http"))] - pub fn GetServerStreamWebSocketForRequest<'a, P0>(&self, request: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Web::Http::HttpRequestMessage>>, - { + pub fn GetServerStreamWebSocketForRequest(&self, request: &super::super::super::Web::Http::HttpRequestMessage) -> ::windows::core::Result { let this = &::windows::core::Interface::cast::(self)?; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).GetServerStreamWebSocketForRequest)(::windows::core::Vtable::as_raw(this), request.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).GetServerStreamWebSocketForRequest)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(request), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Networking_Sockets\"`, `\"Web_Http\"`*"] #[cfg(all(feature = "Networking_Sockets", feature = "Web_Http"))] - pub fn GetServerStreamWebSocketForRequest2<'a, P0>(&self, request: P0, protocol: &::windows::core::HSTRING, outboundbuffersizeinbytes: u32, nodelay: bool) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Web::Http::HttpRequestMessage>>, - { + pub fn GetServerStreamWebSocketForRequest2(&self, request: &super::super::super::Web::Http::HttpRequestMessage, protocol: &::windows::core::HSTRING, outboundbuffersizeinbytes: u32, nodelay: bool) -> ::windows::core::Result { let this = &::windows::core::Interface::cast::(self)?; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).GetServerStreamWebSocketForRequest2)(::windows::core::Vtable::as_raw(this), request.into().abi(), ::core::mem::transmute_copy(protocol), outboundbuffersizeinbytes, nodelay, result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).GetServerStreamWebSocketForRequest2)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(request), ::core::mem::transmute_copy(protocol), outboundbuffersizeinbytes, nodelay, result__.as_mut_ptr()).from_abi::(result__) } } #[doc(hidden)] diff --git a/crates/libs/windows/src/Windows/System/Diagnostics/Telemetry/mod.rs b/crates/libs/windows/src/Windows/System/Diagnostics/Telemetry/mod.rs index b908de4e8e..cfc3dac6c1 100644 --- a/crates/libs/windows/src/Windows/System/Diagnostics/Telemetry/mod.rs +++ b/crates/libs/windows/src/Windows/System/Diagnostics/Telemetry/mod.rs @@ -56,13 +56,10 @@ impl PlatformTelemetryClient { (::windows::core::Vtable::vtable(this).Register)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(id), result__.as_mut_ptr()).from_abi::(result__) }) } - pub fn RegisterWithSettings<'a, P0>(id: &::windows::core::HSTRING, settings: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, PlatformTelemetryRegistrationSettings>>, - { + pub fn RegisterWithSettings(id: &::windows::core::HSTRING, settings: &PlatformTelemetryRegistrationSettings) -> ::windows::core::Result { Self::IPlatformTelemetryClientStatics(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).RegisterWithSettings)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(id), settings.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).RegisterWithSettings)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(id), ::core::mem::transmute_copy(settings), result__.as_mut_ptr()).from_abi::(result__) }) } #[doc(hidden)] diff --git a/crates/libs/windows/src/Windows/System/Diagnostics/mod.rs b/crates/libs/windows/src/Windows/System/Diagnostics/mod.rs index 698cb9f374..01d2d87488 100644 --- a/crates/libs/windows/src/Windows/System/Diagnostics/mod.rs +++ b/crates/libs/windows/src/Windows/System/Diagnostics/mod.rs @@ -477,14 +477,11 @@ pub struct DiagnosticInvoker(::windows::core::IUnknown); impl DiagnosticInvoker { #[doc = "*Required features: `\"Data_Json\"`, `\"Foundation\"`*"] #[cfg(all(feature = "Data_Json", feature = "Foundation"))] - pub fn RunDiagnosticActionAsync<'a, P0>(&self, context: P0) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Data::Json::JsonObject>>, - { + pub fn RunDiagnosticActionAsync(&self, context: &super::super::Data::Json::JsonObject) -> ::windows::core::Result> { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).RunDiagnosticActionAsync)(::windows::core::Vtable::as_raw(this), context.into().abi(), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).RunDiagnosticActionAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(context), result__.as_mut_ptr()).from_abi::>(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -502,13 +499,10 @@ impl DiagnosticInvoker { (::windows::core::Vtable::vtable(this).GetDefault)(::windows::core::Vtable::as_raw(this), result__.as_mut_ptr()).from_abi::(result__) }) } - pub fn GetForUser<'a, P0>(user: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::User>>, - { + pub fn GetForUser(user: &super::User) -> ::windows::core::Result { Self::IDiagnosticInvokerStatics(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).GetForUser)(::windows::core::Vtable::as_raw(this), user.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).GetForUser)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(user), result__.as_mut_ptr()).from_abi::(result__) }) } pub fn IsSupported() -> ::windows::core::Result { diff --git a/crates/libs/windows/src/Windows/System/Implementation/FileExplorer/mod.rs b/crates/libs/windows/src/Windows/System/Implementation/FileExplorer/mod.rs index fc61c8a290..ff0f5a0511 100644 --- a/crates/libs/windows/src/Windows/System/Implementation/FileExplorer/mod.rs +++ b/crates/libs/windows/src/Windows/System/Implementation/FileExplorer/mod.rs @@ -34,14 +34,11 @@ pub struct ISysStorageProviderEventSource(::windows::core::IUnknown); impl ISysStorageProviderEventSource { #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn EventReceived<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Foundation::TypedEventHandler>>, - { + pub fn EventReceived(&self, handler: &super::super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).EventReceived)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).EventReceived)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -214,14 +211,11 @@ pub struct ISysStorageProviderHttpRequestProvider(::windows::core::IUnknown); impl ISysStorageProviderHttpRequestProvider { #[doc = "*Required features: `\"Foundation\"`, `\"Web_Http\"`*"] #[cfg(all(feature = "Foundation", feature = "Web_Http"))] - pub fn SendRequestAsync<'a, P0>(&self, request: P0) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Web::Http::HttpRequestMessage>>, - { + pub fn SendRequestAsync(&self, request: &super::super::super::Web::Http::HttpRequestMessage) -> ::windows::core::Result> { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).SendRequestAsync)(::windows::core::Vtable::as_raw(this), request.into().abi(), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).SendRequestAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(request), result__.as_mut_ptr()).from_abi::>(result__) } } } diff --git a/crates/libs/windows/src/Windows/System/Power/mod.rs b/crates/libs/windows/src/Windows/System/Power/mod.rs index fe88a0a8e0..019df8717c 100644 --- a/crates/libs/windows/src/Windows/System/Power/mod.rs +++ b/crates/libs/windows/src/Windows/System/Power/mod.rs @@ -257,13 +257,10 @@ impl BackgroundEnergyManager { } #[doc = "*Required features: `\"Foundation\"`, `\"deprecated\"`*"] #[cfg(all(feature = "Foundation", feature = "deprecated"))] - pub fn RecentEnergyUsageIncreased<'a, P0>(handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::EventHandler<::windows::core::IInspectable>>>, - { + pub fn RecentEnergyUsageIncreased(handler: &super::super::Foundation::EventHandler<::windows::core::IInspectable>) -> ::windows::core::Result { Self::IBackgroundEnergyManagerStatics(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).RecentEnergyUsageIncreased)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).RecentEnergyUsageIncreased)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) }) } #[doc = "*Required features: `\"Foundation\"`, `\"deprecated\"`*"] @@ -273,13 +270,10 @@ impl BackgroundEnergyManager { } #[doc = "*Required features: `\"Foundation\"`, `\"deprecated\"`*"] #[cfg(all(feature = "Foundation", feature = "deprecated"))] - pub fn RecentEnergyUsageReturnedToLow<'a, P0>(handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::EventHandler<::windows::core::IInspectable>>>, - { + pub fn RecentEnergyUsageReturnedToLow(handler: &super::super::Foundation::EventHandler<::windows::core::IInspectable>) -> ::windows::core::Result { Self::IBackgroundEnergyManagerStatics(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).RecentEnergyUsageReturnedToLow)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).RecentEnergyUsageReturnedToLow)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) }) } #[doc = "*Required features: `\"Foundation\"`, `\"deprecated\"`*"] @@ -353,13 +347,10 @@ impl ForegroundEnergyManager { } #[doc = "*Required features: `\"Foundation\"`, `\"deprecated\"`*"] #[cfg(all(feature = "Foundation", feature = "deprecated"))] - pub fn RecentEnergyUsageIncreased<'a, P0>(handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::EventHandler<::windows::core::IInspectable>>>, - { + pub fn RecentEnergyUsageIncreased(handler: &super::super::Foundation::EventHandler<::windows::core::IInspectable>) -> ::windows::core::Result { Self::IForegroundEnergyManagerStatics(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).RecentEnergyUsageIncreased)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).RecentEnergyUsageIncreased)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) }) } #[doc = "*Required features: `\"Foundation\"`, `\"deprecated\"`*"] @@ -369,13 +360,10 @@ impl ForegroundEnergyManager { } #[doc = "*Required features: `\"Foundation\"`, `\"deprecated\"`*"] #[cfg(all(feature = "Foundation", feature = "deprecated"))] - pub fn RecentEnergyUsageReturnedToLow<'a, P0>(handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::EventHandler<::windows::core::IInspectable>>>, - { + pub fn RecentEnergyUsageReturnedToLow(handler: &super::super::Foundation::EventHandler<::windows::core::IInspectable>) -> ::windows::core::Result { Self::IForegroundEnergyManagerStatics(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).RecentEnergyUsageReturnedToLow)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).RecentEnergyUsageReturnedToLow)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) }) } #[doc = "*Required features: `\"Foundation\"`, `\"deprecated\"`*"] @@ -405,13 +393,10 @@ impl PowerManager { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn EnergySaverStatusChanged<'a, P0>(handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::EventHandler<::windows::core::IInspectable>>>, - { + pub fn EnergySaverStatusChanged(handler: &super::super::Foundation::EventHandler<::windows::core::IInspectable>) -> ::windows::core::Result { Self::IPowerManagerStatics(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).EnergySaverStatusChanged)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).EnergySaverStatusChanged)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) }) } #[doc = "*Required features: `\"Foundation\"`*"] @@ -427,13 +412,10 @@ impl PowerManager { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn BatteryStatusChanged<'a, P0>(handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::EventHandler<::windows::core::IInspectable>>>, - { + pub fn BatteryStatusChanged(handler: &super::super::Foundation::EventHandler<::windows::core::IInspectable>) -> ::windows::core::Result { Self::IPowerManagerStatics(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).BatteryStatusChanged)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).BatteryStatusChanged)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) }) } #[doc = "*Required features: `\"Foundation\"`*"] @@ -449,13 +431,10 @@ impl PowerManager { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn PowerSupplyStatusChanged<'a, P0>(handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::EventHandler<::windows::core::IInspectable>>>, - { + pub fn PowerSupplyStatusChanged(handler: &super::super::Foundation::EventHandler<::windows::core::IInspectable>) -> ::windows::core::Result { Self::IPowerManagerStatics(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).PowerSupplyStatusChanged)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).PowerSupplyStatusChanged)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) }) } #[doc = "*Required features: `\"Foundation\"`*"] @@ -471,13 +450,10 @@ impl PowerManager { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn RemainingChargePercentChanged<'a, P0>(handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::EventHandler<::windows::core::IInspectable>>>, - { + pub fn RemainingChargePercentChanged(handler: &super::super::Foundation::EventHandler<::windows::core::IInspectable>) -> ::windows::core::Result { Self::IPowerManagerStatics(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).RemainingChargePercentChanged)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).RemainingChargePercentChanged)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) }) } #[doc = "*Required features: `\"Foundation\"`*"] @@ -495,13 +471,10 @@ impl PowerManager { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn RemainingDischargeTimeChanged<'a, P0>(handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::EventHandler<::windows::core::IInspectable>>>, - { + pub fn RemainingDischargeTimeChanged(handler: &super::super::Foundation::EventHandler<::windows::core::IInspectable>) -> ::windows::core::Result { Self::IPowerManagerStatics(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).RemainingDischargeTimeChanged)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).RemainingDischargeTimeChanged)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) }) } #[doc = "*Required features: `\"Foundation\"`*"] diff --git a/crates/libs/windows/src/Windows/System/Preview/mod.rs b/crates/libs/windows/src/Windows/System/Preview/mod.rs index 15b74dff9d..bf76bf2bfc 100644 --- a/crates/libs/windows/src/Windows/System/Preview/mod.rs +++ b/crates/libs/windows/src/Windows/System/Preview/mod.rs @@ -131,14 +131,11 @@ impl TwoPanelHingedDevicePosturePreview { } #[doc = "*Required features: `\"Foundation\"`, `\"deprecated\"`*"] #[cfg(all(feature = "Foundation", feature = "deprecated"))] - pub fn PostureChanged<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn PostureChanged(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).PostureChanged)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).PostureChanged)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`, `\"deprecated\"`*"] diff --git a/crates/libs/windows/src/Windows/System/Profile/mod.rs b/crates/libs/windows/src/Windows/System/Profile/mod.rs index bf49b6e461..c0d6cf09af 100644 --- a/crates/libs/windows/src/Windows/System/Profile/mod.rs +++ b/crates/libs/windows/src/Windows/System/Profile/mod.rs @@ -799,13 +799,10 @@ impl PlatformDiagnosticsAndUsageDataSettings { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn CollectionLevelChanged<'a, P0>(handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::EventHandler<::windows::core::IInspectable>>>, - { + pub fn CollectionLevelChanged(handler: &super::super::Foundation::EventHandler<::windows::core::IInspectable>) -> ::windows::core::Result { Self::IPlatformDiagnosticsAndUsageDataSettingsStatics(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).CollectionLevelChanged)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).CollectionLevelChanged)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) }) } #[doc = "*Required features: `\"Foundation\"`*"] @@ -892,13 +889,10 @@ impl SystemIdentification { (::windows::core::Vtable::vtable(this).GetSystemIdForPublisher)(::windows::core::Vtable::as_raw(this), result__.as_mut_ptr()).from_abi::(result__) }) } - pub fn GetSystemIdForUser<'a, P0>(user: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::User>>, - { + pub fn GetSystemIdForUser(user: &super::User) -> ::windows::core::Result { Self::ISystemIdentificationStatics(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).GetSystemIdForUser)(::windows::core::Vtable::as_raw(this), user.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).GetSystemIdForUser)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(user), result__.as_mut_ptr()).from_abi::(result__) }) } #[doc(hidden)] @@ -1006,13 +1000,10 @@ impl SystemSetupInfo { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn OutOfBoxExperienceStateChanged<'a, P0>(handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::EventHandler<::windows::core::IInspectable>>>, - { + pub fn OutOfBoxExperienceStateChanged(handler: &super::super::Foundation::EventHandler<::windows::core::IInspectable>) -> ::windows::core::Result { Self::ISystemSetupInfoStatics(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).OutOfBoxExperienceStateChanged)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).OutOfBoxExperienceStateChanged)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) }) } #[doc = "*Required features: `\"Foundation\"`*"] @@ -1141,13 +1132,10 @@ impl WindowsIntegrityPolicy { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn PolicyChanged<'a, P0>(handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::EventHandler<::windows::core::IInspectable>>>, - { + pub fn PolicyChanged(handler: &super::super::Foundation::EventHandler<::windows::core::IInspectable>) -> ::windows::core::Result { Self::IWindowsIntegrityPolicyStatics(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).PolicyChanged)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).PolicyChanged)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) }) } #[doc = "*Required features: `\"Foundation\"`*"] diff --git a/crates/libs/windows/src/Windows/System/RemoteDesktop/Input/mod.rs b/crates/libs/windows/src/Windows/System/RemoteDesktop/Input/mod.rs index 48200759c7..46cfe430f6 100644 --- a/crates/libs/windows/src/Windows/System/RemoteDesktop/Input/mod.rs +++ b/crates/libs/windows/src/Windows/System/RemoteDesktop/Input/mod.rs @@ -65,13 +65,10 @@ impl RemoteTextConnection { let this = self; unsafe { (::windows::core::Vtable::vtable(this).ReportDataReceived)(::windows::core::Vtable::as_raw(this), pdudata.len() as u32, pdudata.as_ptr()).ok() } } - pub fn CreateInstance<'a, P0>(connectionid: ::windows::core::GUID, pduforwarder: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, RemoteTextConnectionDataHandler>>, - { + pub fn CreateInstance(connectionid: ::windows::core::GUID, pduforwarder: &RemoteTextConnectionDataHandler) -> ::windows::core::Result { Self::IRemoteTextConnectionFactory(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).CreateInstance)(::windows::core::Vtable::as_raw(this), connectionid, pduforwarder.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).CreateInstance)(::windows::core::Vtable::as_raw(this), connectionid, ::core::mem::transmute_copy(pduforwarder), result__.as_mut_ptr()).from_abi::(result__) }) } #[doc(hidden)] diff --git a/crates/libs/windows/src/Windows/System/RemoteSystems/mod.rs b/crates/libs/windows/src/Windows/System/RemoteSystems/mod.rs index a64e331234..506c8b91c0 100644 --- a/crates/libs/windows/src/Windows/System/RemoteSystems/mod.rs +++ b/crates/libs/windows/src/Windows/System/RemoteSystems/mod.rs @@ -1443,13 +1443,10 @@ impl RemoteSystem { } #[doc = "*Required features: `\"Foundation\"`, `\"Networking\"`*"] #[cfg(all(feature = "Foundation", feature = "Networking"))] - pub fn FindByHostNameAsync<'a, P0>(hostname: P0) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Networking::HostName>>, - { + pub fn FindByHostNameAsync(hostname: &super::super::Networking::HostName) -> ::windows::core::Result> { Self::IRemoteSystemStatics(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).FindByHostNameAsync)(::windows::core::Vtable::as_raw(this), hostname.into().abi(), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).FindByHostNameAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(hostname), result__.as_mut_ptr()).from_abi::>(result__) }) } pub fn CreateWatcher() -> ::windows::core::Result { @@ -1484,26 +1481,22 @@ impl RemoteSystem { (::windows::core::Vtable::vtable(this).IsAuthorizationKindEnabled)(::windows::core::Vtable::as_raw(this), kind, result__.as_mut_ptr()).from_abi::(result__) }) } - pub fn CreateWatcherForUser<'a, P0>(user: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::User>>, - { + pub fn CreateWatcherForUser(user: &super::User) -> ::windows::core::Result { Self::IRemoteSystemStatics3(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).CreateWatcherForUser)(::windows::core::Vtable::as_raw(this), user.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).CreateWatcherForUser)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(user), result__.as_mut_ptr()).from_abi::(result__) }) } #[doc = "*Required features: `\"Foundation_Collections\"`*"] #[cfg(feature = "Foundation_Collections")] - pub fn CreateWatcherWithFiltersForUser<'a, P0, P1, E1>(user: P0, filters: P1) -> ::windows::core::Result + pub fn CreateWatcherWithFiltersForUser<'a, P0, E0>(user: &super::User, filters: P0) -> ::windows::core::Result where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::User>>, - P1: ::std::convert::TryInto<::windows::core::InParam<'a, super::super::Foundation::Collections::IIterable>, Error = E1>, - E1: ::std::convert::Into<::windows::core::Error>, + P0: ::std::convert::TryInto<::windows::core::InParam<'a, super::super::Foundation::Collections::IIterable>, Error = E0>, + E0: ::std::convert::Into<::windows::core::Error>, { Self::IRemoteSystemStatics3(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).CreateWatcherWithFiltersForUser)(::windows::core::Vtable::as_raw(this), user.into().abi(), filters.try_into().map_err(|e| e.into())?.abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).CreateWatcherWithFiltersForUser)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(user), filters.try_into().map_err(|e| e.into())?.abi(), result__.as_mut_ptr()).from_abi::(result__) }) } #[doc(hidden)] @@ -1817,13 +1810,10 @@ impl RemoteSystemAppRegistration { (::windows::core::Vtable::vtable(this).GetDefault)(::windows::core::Vtable::as_raw(this), result__.as_mut_ptr()).from_abi::(result__) }) } - pub fn GetForUser<'a, P0>(user: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::User>>, - { + pub fn GetForUser(user: &super::User) -> ::windows::core::Result { Self::IRemoteSystemAppRegistrationStatics(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).GetForUser)(::windows::core::Vtable::as_raw(this), user.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).GetForUser)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(user), result__.as_mut_ptr()).from_abi::(result__) }) } #[doc(hidden)] @@ -2015,13 +2005,10 @@ impl RemoteSystemConnectionInfo { } #[doc = "*Required features: `\"ApplicationModel_AppService\"`*"] #[cfg(feature = "ApplicationModel_AppService")] - pub fn TryCreateFromAppServiceConnection<'a, P0>(connection: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::ApplicationModel::AppService::AppServiceConnection>>, - { + pub fn TryCreateFromAppServiceConnection(connection: &super::super::ApplicationModel::AppService::AppServiceConnection) -> ::windows::core::Result { Self::IRemoteSystemConnectionInfoStatics(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).TryCreateFromAppServiceConnection)(::windows::core::Vtable::as_raw(this), connection.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).TryCreateFromAppServiceConnection)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(connection), result__.as_mut_ptr()).from_abi::(result__) }) } #[doc(hidden)] @@ -2119,22 +2106,16 @@ impl RemoteSystemConnectionRequest { (::windows::core::Vtable::vtable(this).ConnectionToken)(::windows::core::Vtable::as_raw(this), result__.as_mut_ptr()).from_abi::<::windows::core::HSTRING>(result__) } } - pub fn Create<'a, P0>(remotesystem: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, RemoteSystem>>, - { + pub fn Create(remotesystem: &RemoteSystem) -> ::windows::core::Result { Self::IRemoteSystemConnectionRequestFactory(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).Create)(::windows::core::Vtable::as_raw(this), remotesystem.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).Create)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(remotesystem), result__.as_mut_ptr()).from_abi::(result__) }) } - pub fn CreateForApp<'a, P0>(remotesystemapp: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, RemoteSystemApp>>, - { + pub fn CreateForApp(remotesystemapp: &RemoteSystemApp) -> ::windows::core::Result { Self::IRemoteSystemConnectionRequestStatics(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).CreateForApp)(::windows::core::Vtable::as_raw(this), remotesystemapp.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).CreateForApp)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(remotesystemapp), result__.as_mut_ptr()).from_abi::(result__) }) } pub fn CreateFromConnectionToken(connectiontoken: &::windows::core::HSTRING) -> ::windows::core::Result { @@ -2143,13 +2124,10 @@ impl RemoteSystemConnectionRequest { (::windows::core::Vtable::vtable(this).CreateFromConnectionToken)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(connectiontoken), result__.as_mut_ptr()).from_abi::(result__) }) } - pub fn CreateFromConnectionTokenForUser<'a, P0>(user: P0, connectiontoken: &::windows::core::HSTRING) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::User>>, - { + pub fn CreateFromConnectionTokenForUser(user: &super::User, connectiontoken: &::windows::core::HSTRING) -> ::windows::core::Result { Self::IRemoteSystemConnectionRequestStatics2(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).CreateFromConnectionTokenForUser)(::windows::core::Vtable::as_raw(this), user.into().abi(), ::core::mem::transmute_copy(connectiontoken), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).CreateFromConnectionTokenForUser)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(user), ::core::mem::transmute_copy(connectiontoken), result__.as_mut_ptr()).from_abi::(result__) }) } #[doc(hidden)] @@ -2694,14 +2672,11 @@ impl RemoteSystemSession { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn Disconnected<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn Disconnected(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).Disconnected)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).Disconnected)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -2719,14 +2694,11 @@ impl RemoteSystemSession { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn SendInvitationAsync<'a, P0>(&self, invitee: P0) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, RemoteSystem>>, - { + pub fn SendInvitationAsync(&self, invitee: &RemoteSystem) -> ::windows::core::Result> { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).SendInvitationAsync)(::windows::core::Vtable::as_raw(this), invitee.into().abi(), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).SendInvitationAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(invitee), result__.as_mut_ptr()).from_abi::>(result__) } } pub fn CreateWatcher() -> ::windows::core::Result { @@ -2909,14 +2881,11 @@ pub struct RemoteSystemSessionController(::windows::core::IUnknown); impl RemoteSystemSessionController { #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn JoinRequested<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn JoinRequested(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).JoinRequested)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).JoinRequested)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -2927,14 +2896,11 @@ impl RemoteSystemSessionController { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn RemoveParticipantAsync<'a, P0>(&self, pparticipant: P0) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, RemoteSystemSessionParticipant>>, - { + pub fn RemoveParticipantAsync(&self, pparticipant: &RemoteSystemSessionParticipant) -> ::windows::core::Result> { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).RemoveParticipantAsync)(::windows::core::Vtable::as_raw(this), pparticipant.into().abi(), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).RemoveParticipantAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(pparticipant), result__.as_mut_ptr()).from_abi::>(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -2952,13 +2918,10 @@ impl RemoteSystemSessionController { (::windows::core::Vtable::vtable(this).CreateController)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(displayname), result__.as_mut_ptr()).from_abi::(result__) }) } - pub fn CreateControllerWithSessionOptions<'a, P0>(displayname: &::windows::core::HSTRING, options: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, RemoteSystemSessionOptions>>, - { + pub fn CreateControllerWithSessionOptions(displayname: &::windows::core::HSTRING, options: &RemoteSystemSessionOptions) -> ::windows::core::Result { Self::IRemoteSystemSessionControllerFactory(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).CreateControllerWithSessionOptions)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(displayname), options.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).CreateControllerWithSessionOptions)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(displayname), ::core::mem::transmute_copy(options), result__.as_mut_ptr()).from_abi::(result__) }) } #[doc(hidden)] @@ -3378,14 +3341,11 @@ impl RemoteSystemSessionInvitationListener { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn InvitationReceived<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn InvitationReceived(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).InvitationReceived)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).InvitationReceived)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -3796,53 +3756,42 @@ impl RemoteSystemSessionMessageChannel { } #[doc = "*Required features: `\"Foundation_Collections\"`*"] #[cfg(feature = "Foundation_Collections")] - pub fn BroadcastValueSetAsync<'a, P0>(&self, messagedata: P0) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::Collections::ValueSet>>, - { + pub fn BroadcastValueSetAsync(&self, messagedata: &super::super::Foundation::Collections::ValueSet) -> ::windows::core::Result> { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).BroadcastValueSetAsync)(::windows::core::Vtable::as_raw(this), messagedata.into().abi(), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).BroadcastValueSetAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(messagedata), result__.as_mut_ptr()).from_abi::>(result__) } } #[doc = "*Required features: `\"Foundation_Collections\"`*"] #[cfg(feature = "Foundation_Collections")] - pub fn SendValueSetAsync<'a, P0, P1>(&self, messagedata: P0, participant: P1) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::Collections::ValueSet>>, - P1: ::std::convert::Into<::windows::core::InParam<'a, RemoteSystemSessionParticipant>>, - { + pub fn SendValueSetAsync(&self, messagedata: &super::super::Foundation::Collections::ValueSet, participant: &RemoteSystemSessionParticipant) -> ::windows::core::Result> { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).SendValueSetAsync)(::windows::core::Vtable::as_raw(this), messagedata.into().abi(), participant.into().abi(), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).SendValueSetAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(messagedata), ::core::mem::transmute_copy(participant), result__.as_mut_ptr()).from_abi::>(result__) } } #[doc = "*Required features: `\"Foundation_Collections\"`*"] #[cfg(feature = "Foundation_Collections")] - pub fn SendValueSetToParticipantsAsync<'a, P0, P1, E1>(&self, messagedata: P0, participants: P1) -> ::windows::core::Result> + pub fn SendValueSetToParticipantsAsync<'a, P0, E0>(&self, messagedata: &super::super::Foundation::Collections::ValueSet, participants: P0) -> ::windows::core::Result> where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::Collections::ValueSet>>, - P1: ::std::convert::TryInto<::windows::core::InParam<'a, super::super::Foundation::Collections::IIterable>, Error = E1>, - E1: ::std::convert::Into<::windows::core::Error>, + P0: ::std::convert::TryInto<::windows::core::InParam<'a, super::super::Foundation::Collections::IIterable>, Error = E0>, + E0: ::std::convert::Into<::windows::core::Error>, { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).SendValueSetToParticipantsAsync)(::windows::core::Vtable::as_raw(this), messagedata.into().abi(), participants.try_into().map_err(|e| e.into())?.abi(), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).SendValueSetToParticipantsAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(messagedata), participants.try_into().map_err(|e| e.into())?.abi(), result__.as_mut_ptr()).from_abi::>(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn ValueSetReceived<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn ValueSetReceived(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).ValueSetReceived)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).ValueSetReceived)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -3851,22 +3800,16 @@ impl RemoteSystemSessionMessageChannel { let this = self; unsafe { (::windows::core::Vtable::vtable(this).RemoveValueSetReceived)(::windows::core::Vtable::as_raw(this), token).ok() } } - pub fn Create<'a, P0>(session: P0, channelname: &::windows::core::HSTRING) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, RemoteSystemSession>>, - { + pub fn Create(session: &RemoteSystemSession, channelname: &::windows::core::HSTRING) -> ::windows::core::Result { Self::IRemoteSystemSessionMessageChannelFactory(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).Create)(::windows::core::Vtable::as_raw(this), session.into().abi(), ::core::mem::transmute_copy(channelname), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).Create)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(session), ::core::mem::transmute_copy(channelname), result__.as_mut_ptr()).from_abi::(result__) }) } - pub fn CreateWithReliability<'a, P0>(session: P0, channelname: &::windows::core::HSTRING, reliability: RemoteSystemSessionMessageChannelReliability) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, RemoteSystemSession>>, - { + pub fn CreateWithReliability(session: &RemoteSystemSession, channelname: &::windows::core::HSTRING, reliability: RemoteSystemSessionMessageChannelReliability) -> ::windows::core::Result { Self::IRemoteSystemSessionMessageChannelFactory(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).CreateWithReliability)(::windows::core::Vtable::as_raw(this), session.into().abi(), ::core::mem::transmute_copy(channelname), reliability, result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).CreateWithReliability)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(session), ::core::mem::transmute_copy(channelname), reliability, result__.as_mut_ptr()).from_abi::(result__) }) } #[doc(hidden)] @@ -4284,14 +4227,11 @@ impl RemoteSystemSessionParticipantWatcher { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn Added<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn Added(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).Added)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).Added)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -4302,14 +4242,11 @@ impl RemoteSystemSessionParticipantWatcher { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn Removed<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn Removed(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).Removed)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).Removed)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -4320,14 +4257,11 @@ impl RemoteSystemSessionParticipantWatcher { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn EnumerationCompleted<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn EnumerationCompleted(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).EnumerationCompleted)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).EnumerationCompleted)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -4659,14 +4593,11 @@ impl RemoteSystemSessionWatcher { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn Added<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn Added(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).Added)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).Added)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -4677,14 +4608,11 @@ impl RemoteSystemSessionWatcher { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn Updated<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn Updated(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).Updated)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).Updated)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -4695,14 +4623,11 @@ impl RemoteSystemSessionWatcher { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn Removed<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn Removed(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).Removed)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).Removed)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -4972,14 +4897,11 @@ impl RemoteSystemWatcher { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn RemoteSystemAdded<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn RemoteSystemAdded(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).RemoteSystemAdded)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).RemoteSystemAdded)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -4990,14 +4912,11 @@ impl RemoteSystemWatcher { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn RemoteSystemUpdated<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn RemoteSystemUpdated(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).RemoteSystemUpdated)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).RemoteSystemUpdated)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -5008,14 +4927,11 @@ impl RemoteSystemWatcher { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn RemoteSystemRemoved<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn RemoteSystemRemoved(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).RemoteSystemRemoved)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).RemoteSystemRemoved)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -5026,14 +4942,11 @@ impl RemoteSystemWatcher { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn EnumerationCompleted<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn EnumerationCompleted(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = &::windows::core::Interface::cast::(self)?; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).EnumerationCompleted)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).EnumerationCompleted)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -5044,14 +4957,11 @@ impl RemoteSystemWatcher { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn ErrorOccurred<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn ErrorOccurred(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = &::windows::core::Interface::cast::(self)?; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).ErrorOccurred)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).ErrorOccurred)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -5223,13 +5133,10 @@ impl RemoteSystemWebAccountFilter { } #[doc = "*Required features: `\"Security_Credentials\"`*"] #[cfg(feature = "Security_Credentials")] - pub fn Create<'a, P0>(account: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Security::Credentials::WebAccount>>, - { + pub fn Create(account: &super::super::Security::Credentials::WebAccount) -> ::windows::core::Result { Self::IRemoteSystemWebAccountFilterFactory(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).Create)(::windows::core::Vtable::as_raw(this), account.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).Create)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(account), result__.as_mut_ptr()).from_abi::(result__) }) } #[doc(hidden)] diff --git a/crates/libs/windows/src/Windows/System/Threading/Core/mod.rs b/crates/libs/windows/src/Windows/System/Threading/Core/mod.rs index 4b14a09fba..2066894e6b 100644 --- a/crates/libs/windows/src/Windows/System/Threading/Core/mod.rs +++ b/crates/libs/windows/src/Windows/System/Threading/Core/mod.rs @@ -97,35 +97,26 @@ impl PreallocatedWorkItem { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn CreateWorkItem<'a, P0>(handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::WorkItemHandler>>, - { + pub fn CreateWorkItem(handler: &super::WorkItemHandler) -> ::windows::core::Result { Self::IPreallocatedWorkItemFactory(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).CreateWorkItem)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).CreateWorkItem)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) }) } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn CreateWorkItemWithPriority<'a, P0>(handler: P0, priority: super::WorkItemPriority) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::WorkItemHandler>>, - { + pub fn CreateWorkItemWithPriority(handler: &super::WorkItemHandler, priority: super::WorkItemPriority) -> ::windows::core::Result { Self::IPreallocatedWorkItemFactory(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).CreateWorkItemWithPriority)(::windows::core::Vtable::as_raw(this), handler.into().abi(), priority, result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).CreateWorkItemWithPriority)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), priority, result__.as_mut_ptr()).from_abi::(result__) }) } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn CreateWorkItemWithPriorityAndOptions<'a, P0>(handler: P0, priority: super::WorkItemPriority, options: super::WorkItemOptions) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::WorkItemHandler>>, - { + pub fn CreateWorkItemWithPriorityAndOptions(handler: &super::WorkItemHandler, priority: super::WorkItemPriority, options: super::WorkItemOptions) -> ::windows::core::Result { Self::IPreallocatedWorkItemFactory(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).CreateWorkItemWithPriorityAndOptions)(::windows::core::Vtable::as_raw(this), handler.into().abi(), priority, options, result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).CreateWorkItemWithPriorityAndOptions)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), priority, options, result__.as_mut_ptr()).from_abi::(result__) }) } #[doc(hidden)] @@ -210,44 +201,32 @@ impl SignalNotifier { let this = self; unsafe { (::windows::core::Vtable::vtable(this).Terminate)(::windows::core::Vtable::as_raw(this)).ok() } } - pub fn AttachToEvent<'a, P0>(name: &::windows::core::HSTRING, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, SignalHandler>>, - { + pub fn AttachToEvent(name: &::windows::core::HSTRING, handler: &SignalHandler) -> ::windows::core::Result { Self::ISignalNotifierStatics(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).AttachToEvent)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(name), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).AttachToEvent)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(name), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) }) } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn AttachToEventWithTimeout<'a, P0>(name: &::windows::core::HSTRING, handler: P0, timeout: super::super::super::Foundation::TimeSpan) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, SignalHandler>>, - { + pub fn AttachToEventWithTimeout(name: &::windows::core::HSTRING, handler: &SignalHandler, timeout: super::super::super::Foundation::TimeSpan) -> ::windows::core::Result { Self::ISignalNotifierStatics(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).AttachToEventWithTimeout)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(name), handler.into().abi(), timeout, result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).AttachToEventWithTimeout)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(name), ::core::mem::transmute_copy(handler), timeout, result__.as_mut_ptr()).from_abi::(result__) }) } - pub fn AttachToSemaphore<'a, P0>(name: &::windows::core::HSTRING, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, SignalHandler>>, - { + pub fn AttachToSemaphore(name: &::windows::core::HSTRING, handler: &SignalHandler) -> ::windows::core::Result { Self::ISignalNotifierStatics(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).AttachToSemaphore)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(name), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).AttachToSemaphore)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(name), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) }) } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn AttachToSemaphoreWithTimeout<'a, P0>(name: &::windows::core::HSTRING, handler: P0, timeout: super::super::super::Foundation::TimeSpan) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, SignalHandler>>, - { + pub fn AttachToSemaphoreWithTimeout(name: &::windows::core::HSTRING, handler: &SignalHandler, timeout: super::super::super::Foundation::TimeSpan) -> ::windows::core::Result { Self::ISignalNotifierStatics(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).AttachToSemaphoreWithTimeout)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(name), handler.into().abi(), timeout, result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).AttachToSemaphoreWithTimeout)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(name), ::core::mem::transmute_copy(handler), timeout, result__.as_mut_ptr()).from_abi::(result__) }) } #[doc(hidden)] @@ -328,12 +307,9 @@ impl SignalHandler { let com = SignalHandlerBox:: { vtable: &SignalHandlerBox::::VTABLE, count: ::windows::core::RefCount::new(1), invoke }; unsafe { ::core::mem::transmute(::windows::core::alloc::boxed::Box::new(com)) } } - pub fn Invoke<'a, P0>(&self, signalnotifier: P0, timedout: bool) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, SignalNotifier>>, - { + pub fn Invoke(&self, signalnotifier: &SignalNotifier, timedout: bool) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).Invoke)(::windows::core::Vtable::as_raw(this), signalnotifier.into().abi(), timedout).ok() } + unsafe { (::windows::core::Vtable::vtable(this).Invoke)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(signalnotifier), timedout).ok() } } } #[repr(C)] diff --git a/crates/libs/windows/src/Windows/System/Threading/mod.rs b/crates/libs/windows/src/Windows/System/Threading/mod.rs index 8c41aab973..1a80a0bd92 100644 --- a/crates/libs/windows/src/Windows/System/Threading/mod.rs +++ b/crates/libs/windows/src/Windows/System/Threading/mod.rs @@ -84,35 +84,26 @@ pub struct ThreadPool; impl ThreadPool { #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn RunAsync<'a, P0>(handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, WorkItemHandler>>, - { + pub fn RunAsync(handler: &WorkItemHandler) -> ::windows::core::Result { Self::IThreadPoolStatics(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).RunAsync)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).RunAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) }) } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn RunWithPriorityAsync<'a, P0>(handler: P0, priority: WorkItemPriority) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, WorkItemHandler>>, - { + pub fn RunWithPriorityAsync(handler: &WorkItemHandler, priority: WorkItemPriority) -> ::windows::core::Result { Self::IThreadPoolStatics(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).RunWithPriorityAsync)(::windows::core::Vtable::as_raw(this), handler.into().abi(), priority, result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).RunWithPriorityAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), priority, result__.as_mut_ptr()).from_abi::(result__) }) } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn RunWithPriorityAndOptionsAsync<'a, P0>(handler: P0, priority: WorkItemPriority, options: WorkItemOptions) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, WorkItemHandler>>, - { + pub fn RunWithPriorityAndOptionsAsync(handler: &WorkItemHandler, priority: WorkItemPriority, options: WorkItemOptions) -> ::windows::core::Result { Self::IThreadPoolStatics(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).RunWithPriorityAndOptionsAsync)(::windows::core::Vtable::as_raw(this), handler.into().abi(), priority, options, result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).RunWithPriorityAndOptionsAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), priority, options, result__.as_mut_ptr()).from_abi::(result__) }) } #[doc(hidden)] @@ -152,48 +143,34 @@ impl ThreadPoolTimer { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn CreatePeriodicTimer<'a, P0>(handler: P0, period: super::super::Foundation::TimeSpan) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, TimerElapsedHandler>>, - { + pub fn CreatePeriodicTimer(handler: &TimerElapsedHandler, period: super::super::Foundation::TimeSpan) -> ::windows::core::Result { Self::IThreadPoolTimerStatics(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).CreatePeriodicTimer)(::windows::core::Vtable::as_raw(this), handler.into().abi(), period, result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).CreatePeriodicTimer)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), period, result__.as_mut_ptr()).from_abi::(result__) }) } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn CreateTimer<'a, P0>(handler: P0, delay: super::super::Foundation::TimeSpan) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, TimerElapsedHandler>>, - { + pub fn CreateTimer(handler: &TimerElapsedHandler, delay: super::super::Foundation::TimeSpan) -> ::windows::core::Result { Self::IThreadPoolTimerStatics(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).CreateTimer)(::windows::core::Vtable::as_raw(this), handler.into().abi(), delay, result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).CreateTimer)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), delay, result__.as_mut_ptr()).from_abi::(result__) }) } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn CreatePeriodicTimerWithCompletion<'a, P0, P1>(handler: P0, period: super::super::Foundation::TimeSpan, destroyed: P1) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, TimerElapsedHandler>>, - P1: ::std::convert::Into<::windows::core::InParam<'a, TimerDestroyedHandler>>, - { + pub fn CreatePeriodicTimerWithCompletion(handler: &TimerElapsedHandler, period: super::super::Foundation::TimeSpan, destroyed: &TimerDestroyedHandler) -> ::windows::core::Result { Self::IThreadPoolTimerStatics(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).CreatePeriodicTimerWithCompletion)(::windows::core::Vtable::as_raw(this), handler.into().abi(), period, destroyed.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).CreatePeriodicTimerWithCompletion)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), period, ::core::mem::transmute_copy(destroyed), result__.as_mut_ptr()).from_abi::(result__) }) } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn CreateTimerWithCompletion<'a, P0, P1>(handler: P0, delay: super::super::Foundation::TimeSpan, destroyed: P1) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, TimerElapsedHandler>>, - P1: ::std::convert::Into<::windows::core::InParam<'a, TimerDestroyedHandler>>, - { + pub fn CreateTimerWithCompletion(handler: &TimerElapsedHandler, delay: super::super::Foundation::TimeSpan, destroyed: &TimerDestroyedHandler) -> ::windows::core::Result { Self::IThreadPoolTimerStatics(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).CreateTimerWithCompletion)(::windows::core::Vtable::as_raw(this), handler.into().abi(), delay, destroyed.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).CreateTimerWithCompletion)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), delay, ::core::mem::transmute_copy(destroyed), result__.as_mut_ptr()).from_abi::(result__) }) } #[doc(hidden)] @@ -371,12 +348,9 @@ impl TimerDestroyedHandler { let com = TimerDestroyedHandlerBox:: { vtable: &TimerDestroyedHandlerBox::::VTABLE, count: ::windows::core::RefCount::new(1), invoke }; unsafe { ::core::mem::transmute(::windows::core::alloc::boxed::Box::new(com)) } } - pub fn Invoke<'a, P0>(&self, timer: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, ThreadPoolTimer>>, - { + pub fn Invoke(&self, timer: &ThreadPoolTimer) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).Invoke)(::windows::core::Vtable::as_raw(this), timer.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).Invoke)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(timer)).ok() } } } #[repr(C)] @@ -460,12 +434,9 @@ impl TimerElapsedHandler { let com = TimerElapsedHandlerBox:: { vtable: &TimerElapsedHandlerBox::::VTABLE, count: ::windows::core::RefCount::new(1), invoke }; unsafe { ::core::mem::transmute(::windows::core::alloc::boxed::Box::new(com)) } } - pub fn Invoke<'a, P0>(&self, timer: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, ThreadPoolTimer>>, - { + pub fn Invoke(&self, timer: &ThreadPoolTimer) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).Invoke)(::windows::core::Vtable::as_raw(this), timer.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).Invoke)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(timer)).ok() } } } #[repr(C)] diff --git a/crates/libs/windows/src/Windows/System/Update/mod.rs b/crates/libs/windows/src/Windows/System/Update/mod.rs index 0b358001f2..b07831acd5 100644 --- a/crates/libs/windows/src/Windows/System/Update/mod.rs +++ b/crates/libs/windows/src/Windows/System/Update/mod.rs @@ -340,13 +340,10 @@ impl SystemUpdateManager { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn StateChanged<'a, P0>(handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::EventHandler<::windows::core::IInspectable>>>, - { + pub fn StateChanged(handler: &super::super::Foundation::EventHandler<::windows::core::IInspectable>) -> ::windows::core::Result { Self::ISystemUpdateManagerStatics(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).StateChanged)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).StateChanged)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) }) } #[doc = "*Required features: `\"Foundation\"`*"] diff --git a/crates/libs/windows/src/Windows/System/UserProfile/mod.rs b/crates/libs/windows/src/Windows/System/UserProfile/mod.rs index dd98113aeb..02076014b7 100644 --- a/crates/libs/windows/src/Windows/System/UserProfile/mod.rs +++ b/crates/libs/windows/src/Windows/System/UserProfile/mod.rs @@ -417,13 +417,10 @@ impl AdvertisingManager { (::windows::core::Vtable::vtable(this).AdvertisingId)(::windows::core::Vtable::as_raw(this), result__.as_mut_ptr()).from_abi::<::windows::core::HSTRING>(result__) }) } - pub fn GetForUser<'a, P0>(user: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::User>>, - { + pub fn GetForUser(user: &super::User) -> ::windows::core::Result { Self::IAdvertisingManagerStatics2(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).GetForUser)(::windows::core::Vtable::as_raw(this), user.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).GetForUser)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(user), result__.as_mut_ptr()).from_abi::(result__) }) } #[doc(hidden)] @@ -554,13 +551,10 @@ impl AssignedAccessSettings { (::windows::core::Vtable::vtable(this).GetDefault)(::windows::core::Vtable::as_raw(this), result__.as_mut_ptr()).from_abi::(result__) }) } - pub fn GetForUser<'a, P0>(user: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::User>>, - { + pub fn GetForUser(user: &super::User) -> ::windows::core::Result { Self::IAssignedAccessSettingsStatics(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).GetForUser)(::windows::core::Vtable::as_raw(this), user.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).GetForUser)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(user), result__.as_mut_ptr()).from_abi::(result__) }) } #[doc(hidden)] @@ -657,13 +651,10 @@ impl DiagnosticsSettings { (::windows::core::Vtable::vtable(this).GetDefault)(::windows::core::Vtable::as_raw(this), result__.as_mut_ptr()).from_abi::(result__) }) } - pub fn GetForUser<'a, P0>(user: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::User>>, - { + pub fn GetForUser(user: &super::User) -> ::windows::core::Result { Self::IDiagnosticsSettingsStatics(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).GetForUser)(::windows::core::Vtable::as_raw(this), user.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).GetForUser)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(user), result__.as_mut_ptr()).from_abi::(result__) }) } #[doc(hidden)] @@ -985,13 +976,10 @@ impl GlobalizationPreferences { (::windows::core::Vtable::vtable(this).TrySetLanguages)(::windows::core::Vtable::as_raw(this), languagetags.try_into().map_err(|e| e.into())?.abi(), result__.as_mut_ptr()).from_abi::(result__) }) } - pub fn GetForUser<'a, P0>(user: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::User>>, - { + pub fn GetForUser(user: &super::User) -> ::windows::core::Result { Self::IGlobalizationPreferencesStatics3(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).GetForUser)(::windows::core::Vtable::as_raw(this), user.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).GetForUser)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(user), result__.as_mut_ptr()).from_abi::(result__) }) } #[doc(hidden)] @@ -1146,13 +1134,10 @@ pub struct LockScreen; impl LockScreen { #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn RequestSetImageFeedAsync<'a, P0>(syndicationfeeduri: P0) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::Uri>>, - { + pub fn RequestSetImageFeedAsync(syndicationfeeduri: &super::super::Foundation::Uri) -> ::windows::core::Result> { Self::ILockScreenImageFeedStatics(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).RequestSetImageFeedAsync)(::windows::core::Vtable::as_raw(this), syndicationfeeduri.into().abi(), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).RequestSetImageFeedAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(syndicationfeeduri), result__.as_mut_ptr()).from_abi::>(result__) }) } pub fn TryRemoveImageFeed() -> ::windows::core::Result { @@ -1302,13 +1287,10 @@ impl UserInformation { } #[doc = "*Required features: `\"Foundation\"`, `\"deprecated\"`*"] #[cfg(all(feature = "Foundation", feature = "deprecated"))] - pub fn AccountPictureChanged<'a, P0>(changehandler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::EventHandler<::windows::core::IInspectable>>>, - { + pub fn AccountPictureChanged(changehandler: &super::super::Foundation::EventHandler<::windows::core::IInspectable>) -> ::windows::core::Result { Self::IUserInformationStatics(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).AccountPictureChanged)(::windows::core::Vtable::as_raw(this), changehandler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).AccountPictureChanged)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(changehandler), result__.as_mut_ptr()).from_abi::(result__) }) } #[doc = "*Required features: `\"Foundation\"`, `\"deprecated\"`*"] @@ -1381,26 +1363,20 @@ pub struct UserProfilePersonalizationSettings(::windows::core::IUnknown); impl UserProfilePersonalizationSettings { #[doc = "*Required features: `\"Foundation\"`, `\"Storage\"`*"] #[cfg(all(feature = "Foundation", feature = "Storage"))] - pub fn TrySetLockScreenImageAsync<'a, P0>(&self, imagefile: P0) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Storage::StorageFile>>, - { + pub fn TrySetLockScreenImageAsync(&self, imagefile: &super::super::Storage::StorageFile) -> ::windows::core::Result> { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).TrySetLockScreenImageAsync)(::windows::core::Vtable::as_raw(this), imagefile.into().abi(), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).TrySetLockScreenImageAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(imagefile), result__.as_mut_ptr()).from_abi::>(result__) } } #[doc = "*Required features: `\"Foundation\"`, `\"Storage\"`*"] #[cfg(all(feature = "Foundation", feature = "Storage"))] - pub fn TrySetWallpaperImageAsync<'a, P0>(&self, imagefile: P0) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Storage::StorageFile>>, - { + pub fn TrySetWallpaperImageAsync(&self, imagefile: &super::super::Storage::StorageFile) -> ::windows::core::Result> { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).TrySetWallpaperImageAsync)(::windows::core::Vtable::as_raw(this), imagefile.into().abi(), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).TrySetWallpaperImageAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(imagefile), result__.as_mut_ptr()).from_abi::>(result__) } } pub fn Current() -> ::windows::core::Result { diff --git a/crates/libs/windows/src/Windows/System/mod.rs b/crates/libs/windows/src/Windows/System/mod.rs index f61bf02c34..6a301c8677 100644 --- a/crates/libs/windows/src/Windows/System/mod.rs +++ b/crates/libs/windows/src/Windows/System/mod.rs @@ -2152,14 +2152,11 @@ pub struct AppDiagnosticInfoWatcher(::windows::core::IUnknown); impl AppDiagnosticInfoWatcher { #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn Added<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::Foundation::TypedEventHandler>>, - { + pub fn Added(&self, handler: &super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).Added)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).Added)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -2170,14 +2167,11 @@ impl AppDiagnosticInfoWatcher { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn Removed<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::Foundation::TypedEventHandler>>, - { + pub fn Removed(&self, handler: &super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).Removed)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).Removed)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -2188,14 +2182,11 @@ impl AppDiagnosticInfoWatcher { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn EnumerationCompleted<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::Foundation::TypedEventHandler>>, - { + pub fn EnumerationCompleted(&self, handler: &super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).EnumerationCompleted)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).EnumerationCompleted)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -2206,14 +2197,11 @@ impl AppDiagnosticInfoWatcher { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn Stopped<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::Foundation::TypedEventHandler>>, - { + pub fn Stopped(&self, handler: &super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).Stopped)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).Stopped)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -2886,14 +2874,11 @@ pub struct AppResourceGroupInfoWatcher(::windows::core::IUnknown); impl AppResourceGroupInfoWatcher { #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn Added<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::Foundation::TypedEventHandler>>, - { + pub fn Added(&self, handler: &super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).Added)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).Added)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -2904,14 +2889,11 @@ impl AppResourceGroupInfoWatcher { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn Removed<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::Foundation::TypedEventHandler>>, - { + pub fn Removed(&self, handler: &super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).Removed)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).Removed)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -2922,14 +2904,11 @@ impl AppResourceGroupInfoWatcher { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn EnumerationCompleted<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::Foundation::TypedEventHandler>>, - { + pub fn EnumerationCompleted(&self, handler: &super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).EnumerationCompleted)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).EnumerationCompleted)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -2940,14 +2919,11 @@ impl AppResourceGroupInfoWatcher { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn Stopped<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::Foundation::TypedEventHandler>>, - { + pub fn Stopped(&self, handler: &super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).Stopped)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).Stopped)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -2958,14 +2934,11 @@ impl AppResourceGroupInfoWatcher { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn ExecutionStateChanged<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::Foundation::TypedEventHandler>>, - { + pub fn ExecutionStateChanged(&self, handler: &super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).ExecutionStateChanged)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).ExecutionStateChanged)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -3675,13 +3648,10 @@ impl AppUriHandlerRegistrationManager { (::windows::core::Vtable::vtable(this).GetDefault)(::windows::core::Vtable::as_raw(this), result__.as_mut_ptr()).from_abi::(result__) }) } - pub fn GetForUser<'a, P0>(user: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, User>>, - { + pub fn GetForUser(user: &User) -> ::windows::core::Result { Self::IAppUriHandlerRegistrationManagerStatics(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).GetForUser)(::windows::core::Vtable::as_raw(this), user.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).GetForUser)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(user), result__.as_mut_ptr()).from_abi::(result__) }) } pub fn GetForPackage(packagefamilyname: &::windows::core::HSTRING) -> ::windows::core::Result { @@ -3690,13 +3660,10 @@ impl AppUriHandlerRegistrationManager { (::windows::core::Vtable::vtable(this).GetForPackage)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(packagefamilyname), result__.as_mut_ptr()).from_abi::(result__) }) } - pub fn GetForPackageForUser<'a, P0>(packagefamilyname: &::windows::core::HSTRING, user: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, User>>, - { + pub fn GetForPackageForUser(packagefamilyname: &::windows::core::HSTRING, user: &User) -> ::windows::core::Result { Self::IAppUriHandlerRegistrationManagerStatics2(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).GetForPackageForUser)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(packagefamilyname), user.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).GetForPackageForUser)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(packagefamilyname), ::core::mem::transmute_copy(user), result__.as_mut_ptr()).from_abi::(result__) }) } #[doc(hidden)] @@ -3802,36 +3769,27 @@ impl DispatcherQueue { (::windows::core::Vtable::vtable(this).CreateTimer)(::windows::core::Vtable::as_raw(this), result__.as_mut_ptr()).from_abi::(result__) } } - pub fn TryEnqueue<'a, P0>(&self, callback: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, DispatcherQueueHandler>>, - { + pub fn TryEnqueue(&self, callback: &DispatcherQueueHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).TryEnqueue)(::windows::core::Vtable::as_raw(this), callback.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).TryEnqueue)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(callback), result__.as_mut_ptr()).from_abi::(result__) } } - pub fn TryEnqueueWithPriority<'a, P0>(&self, priority: DispatcherQueuePriority, callback: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, DispatcherQueueHandler>>, - { + pub fn TryEnqueueWithPriority(&self, priority: DispatcherQueuePriority, callback: &DispatcherQueueHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).TryEnqueueWithPriority)(::windows::core::Vtable::as_raw(this), priority, callback.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).TryEnqueueWithPriority)(::windows::core::Vtable::as_raw(this), priority, ::core::mem::transmute_copy(callback), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn ShutdownStarting<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::Foundation::TypedEventHandler>>, - { + pub fn ShutdownStarting(&self, handler: &super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).ShutdownStarting)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).ShutdownStarting)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -3842,14 +3800,11 @@ impl DispatcherQueue { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn ShutdownCompleted<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::Foundation::TypedEventHandler>>, - { + pub fn ShutdownCompleted(&self, handler: &super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).ShutdownCompleted)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).ShutdownCompleted)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -4162,14 +4117,11 @@ impl DispatcherQueueTimer { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn Tick<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::Foundation::TypedEventHandler>>, - { + pub fn Tick(&self, handler: &super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).Tick)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).Tick)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -4541,120 +4493,86 @@ impl Launcher { } #[doc = "*Required features: `\"Foundation\"`, `\"Storage\"`*"] #[cfg(all(feature = "Foundation", feature = "Storage"))] - pub fn LaunchFileWithOptionsAsync<'a, P0, E0, P1>(file: P0, options: P1) -> ::windows::core::Result> + pub fn LaunchFileWithOptionsAsync<'a, P0, E0>(file: P0, options: &LauncherOptions) -> ::windows::core::Result> where P0: ::std::convert::TryInto<::windows::core::InParam<'a, super::Storage::IStorageFile>, Error = E0>, E0: ::std::convert::Into<::windows::core::Error>, - P1: ::std::convert::Into<::windows::core::InParam<'a, LauncherOptions>>, { Self::ILauncherStatics(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).LaunchFileWithOptionsAsync)(::windows::core::Vtable::as_raw(this), file.try_into().map_err(|e| e.into())?.abi(), options.into().abi(), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).LaunchFileWithOptionsAsync)(::windows::core::Vtable::as_raw(this), file.try_into().map_err(|e| e.into())?.abi(), ::core::mem::transmute_copy(options), result__.as_mut_ptr()).from_abi::>(result__) }) } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn LaunchUriAsync<'a, P0>(uri: P0) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::Foundation::Uri>>, - { + pub fn LaunchUriAsync(uri: &super::Foundation::Uri) -> ::windows::core::Result> { Self::ILauncherStatics(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).LaunchUriAsync)(::windows::core::Vtable::as_raw(this), uri.into().abi(), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).LaunchUriAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(uri), result__.as_mut_ptr()).from_abi::>(result__) }) } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn LaunchUriWithOptionsAsync<'a, P0, P1>(uri: P0, options: P1) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::Foundation::Uri>>, - P1: ::std::convert::Into<::windows::core::InParam<'a, LauncherOptions>>, - { + pub fn LaunchUriWithOptionsAsync(uri: &super::Foundation::Uri, options: &LauncherOptions) -> ::windows::core::Result> { Self::ILauncherStatics(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).LaunchUriWithOptionsAsync)(::windows::core::Vtable::as_raw(this), uri.into().abi(), options.into().abi(), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).LaunchUriWithOptionsAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(uri), ::core::mem::transmute_copy(options), result__.as_mut_ptr()).from_abi::>(result__) }) } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn LaunchUriForResultsAsync<'a, P0, P1>(uri: P0, options: P1) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::Foundation::Uri>>, - P1: ::std::convert::Into<::windows::core::InParam<'a, LauncherOptions>>, - { + pub fn LaunchUriForResultsAsync(uri: &super::Foundation::Uri, options: &LauncherOptions) -> ::windows::core::Result> { Self::ILauncherStatics2(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).LaunchUriForResultsAsync)(::windows::core::Vtable::as_raw(this), uri.into().abi(), options.into().abi(), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).LaunchUriForResultsAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(uri), ::core::mem::transmute_copy(options), result__.as_mut_ptr()).from_abi::>(result__) }) } #[doc = "*Required features: `\"Foundation_Collections\"`*"] #[cfg(feature = "Foundation_Collections")] - pub fn LaunchUriForResultsWithDataAsync<'a, P0, P1, P2>(uri: P0, options: P1, inputdata: P2) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::Foundation::Uri>>, - P1: ::std::convert::Into<::windows::core::InParam<'a, LauncherOptions>>, - P2: ::std::convert::Into<::windows::core::InParam<'a, super::Foundation::Collections::ValueSet>>, - { + pub fn LaunchUriForResultsWithDataAsync(uri: &super::Foundation::Uri, options: &LauncherOptions, inputdata: &super::Foundation::Collections::ValueSet) -> ::windows::core::Result> { Self::ILauncherStatics2(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).LaunchUriForResultsWithDataAsync)(::windows::core::Vtable::as_raw(this), uri.into().abi(), options.into().abi(), inputdata.into().abi(), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).LaunchUriForResultsWithDataAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(uri), ::core::mem::transmute_copy(options), ::core::mem::transmute_copy(inputdata), result__.as_mut_ptr()).from_abi::>(result__) }) } #[doc = "*Required features: `\"Foundation_Collections\"`*"] #[cfg(feature = "Foundation_Collections")] - pub fn LaunchUriWithDataAsync<'a, P0, P1, P2>(uri: P0, options: P1, inputdata: P2) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::Foundation::Uri>>, - P1: ::std::convert::Into<::windows::core::InParam<'a, LauncherOptions>>, - P2: ::std::convert::Into<::windows::core::InParam<'a, super::Foundation::Collections::ValueSet>>, - { + pub fn LaunchUriWithDataAsync(uri: &super::Foundation::Uri, options: &LauncherOptions, inputdata: &super::Foundation::Collections::ValueSet) -> ::windows::core::Result> { Self::ILauncherStatics2(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).LaunchUriWithDataAsync)(::windows::core::Vtable::as_raw(this), uri.into().abi(), options.into().abi(), inputdata.into().abi(), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).LaunchUriWithDataAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(uri), ::core::mem::transmute_copy(options), ::core::mem::transmute_copy(inputdata), result__.as_mut_ptr()).from_abi::>(result__) }) } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn QueryUriSupportAsync<'a, P0>(uri: P0, launchquerysupporttype: LaunchQuerySupportType) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::Foundation::Uri>>, - { + pub fn QueryUriSupportAsync(uri: &super::Foundation::Uri, launchquerysupporttype: LaunchQuerySupportType) -> ::windows::core::Result> { Self::ILauncherStatics2(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).QueryUriSupportAsync)(::windows::core::Vtable::as_raw(this), uri.into().abi(), launchquerysupporttype, result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).QueryUriSupportAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(uri), launchquerysupporttype, result__.as_mut_ptr()).from_abi::>(result__) }) } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn QueryUriSupportWithPackageFamilyNameAsync<'a, P0>(uri: P0, launchquerysupporttype: LaunchQuerySupportType, packagefamilyname: &::windows::core::HSTRING) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::Foundation::Uri>>, - { + pub fn QueryUriSupportWithPackageFamilyNameAsync(uri: &super::Foundation::Uri, launchquerysupporttype: LaunchQuerySupportType, packagefamilyname: &::windows::core::HSTRING) -> ::windows::core::Result> { Self::ILauncherStatics2(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).QueryUriSupportWithPackageFamilyNameAsync)(::windows::core::Vtable::as_raw(this), uri.into().abi(), launchquerysupporttype, ::core::mem::transmute_copy(packagefamilyname), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).QueryUriSupportWithPackageFamilyNameAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(uri), launchquerysupporttype, ::core::mem::transmute_copy(packagefamilyname), result__.as_mut_ptr()).from_abi::>(result__) }) } #[doc = "*Required features: `\"Foundation\"`, `\"Storage\"`*"] #[cfg(all(feature = "Foundation", feature = "Storage"))] - pub fn QueryFileSupportAsync<'a, P0>(file: P0) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::Storage::StorageFile>>, - { + pub fn QueryFileSupportAsync(file: &super::Storage::StorageFile) -> ::windows::core::Result> { Self::ILauncherStatics2(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).QueryFileSupportAsync)(::windows::core::Vtable::as_raw(this), file.into().abi(), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).QueryFileSupportAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(file), result__.as_mut_ptr()).from_abi::>(result__) }) } #[doc = "*Required features: `\"Foundation\"`, `\"Storage\"`*"] #[cfg(all(feature = "Foundation", feature = "Storage"))] - pub fn QueryFileSupportWithPackageFamilyNameAsync<'a, P0>(file: P0, packagefamilyname: &::windows::core::HSTRING) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::Storage::StorageFile>>, - { + pub fn QueryFileSupportWithPackageFamilyNameAsync(file: &super::Storage::StorageFile, packagefamilyname: &::windows::core::HSTRING) -> ::windows::core::Result> { Self::ILauncherStatics2(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).QueryFileSupportWithPackageFamilyNameAsync)(::windows::core::Vtable::as_raw(this), file.into().abi(), ::core::mem::transmute_copy(packagefamilyname), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).QueryFileSupportWithPackageFamilyNameAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(file), ::core::mem::transmute_copy(packagefamilyname), result__.as_mut_ptr()).from_abi::>(result__) }) } #[doc = "*Required features: `\"ApplicationModel\"`, `\"Foundation_Collections\"`*"] @@ -4695,114 +4613,78 @@ impl Launcher { } #[doc = "*Required features: `\"Foundation\"`, `\"Storage\"`*"] #[cfg(all(feature = "Foundation", feature = "Storage"))] - pub fn LaunchFolderWithOptionsAsync<'a, P0, E0, P1>(folder: P0, options: P1) -> ::windows::core::Result> + pub fn LaunchFolderWithOptionsAsync<'a, P0, E0>(folder: P0, options: &FolderLauncherOptions) -> ::windows::core::Result> where P0: ::std::convert::TryInto<::windows::core::InParam<'a, super::Storage::IStorageFolder>, Error = E0>, E0: ::std::convert::Into<::windows::core::Error>, - P1: ::std::convert::Into<::windows::core::InParam<'a, FolderLauncherOptions>>, { Self::ILauncherStatics3(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).LaunchFolderWithOptionsAsync)(::windows::core::Vtable::as_raw(this), folder.try_into().map_err(|e| e.into())?.abi(), options.into().abi(), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).LaunchFolderWithOptionsAsync)(::windows::core::Vtable::as_raw(this), folder.try_into().map_err(|e| e.into())?.abi(), ::core::mem::transmute_copy(options), result__.as_mut_ptr()).from_abi::>(result__) }) } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn QueryAppUriSupportAsync<'a, P0>(uri: P0) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::Foundation::Uri>>, - { + pub fn QueryAppUriSupportAsync(uri: &super::Foundation::Uri) -> ::windows::core::Result> { Self::ILauncherStatics4(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).QueryAppUriSupportAsync)(::windows::core::Vtable::as_raw(this), uri.into().abi(), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).QueryAppUriSupportAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(uri), result__.as_mut_ptr()).from_abi::>(result__) }) } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn QueryAppUriSupportWithPackageFamilyNameAsync<'a, P0>(uri: P0, packagefamilyname: &::windows::core::HSTRING) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::Foundation::Uri>>, - { + pub fn QueryAppUriSupportWithPackageFamilyNameAsync(uri: &super::Foundation::Uri, packagefamilyname: &::windows::core::HSTRING) -> ::windows::core::Result> { Self::ILauncherStatics4(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).QueryAppUriSupportWithPackageFamilyNameAsync)(::windows::core::Vtable::as_raw(this), uri.into().abi(), ::core::mem::transmute_copy(packagefamilyname), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).QueryAppUriSupportWithPackageFamilyNameAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(uri), ::core::mem::transmute_copy(packagefamilyname), result__.as_mut_ptr()).from_abi::>(result__) }) } #[doc = "*Required features: `\"ApplicationModel\"`, `\"Foundation_Collections\"`*"] #[cfg(all(feature = "ApplicationModel", feature = "Foundation_Collections"))] - pub fn FindAppUriHandlersAsync<'a, P0>(uri: P0) -> ::windows::core::Result>> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::Foundation::Uri>>, - { + pub fn FindAppUriHandlersAsync(uri: &super::Foundation::Uri) -> ::windows::core::Result>> { Self::ILauncherStatics4(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).FindAppUriHandlersAsync)(::windows::core::Vtable::as_raw(this), uri.into().abi(), result__.as_mut_ptr()).from_abi::>>(result__) + (::windows::core::Vtable::vtable(this).FindAppUriHandlersAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(uri), result__.as_mut_ptr()).from_abi::>>(result__) }) } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn LaunchUriForUserAsync<'a, P0, P1>(user: P0, uri: P1) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, User>>, - P1: ::std::convert::Into<::windows::core::InParam<'a, super::Foundation::Uri>>, - { + pub fn LaunchUriForUserAsync(user: &User, uri: &super::Foundation::Uri) -> ::windows::core::Result> { Self::ILauncherStatics4(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).LaunchUriForUserAsync)(::windows::core::Vtable::as_raw(this), user.into().abi(), uri.into().abi(), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).LaunchUriForUserAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(user), ::core::mem::transmute_copy(uri), result__.as_mut_ptr()).from_abi::>(result__) }) } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn LaunchUriWithOptionsForUserAsync<'a, P0, P1, P2>(user: P0, uri: P1, options: P2) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, User>>, - P1: ::std::convert::Into<::windows::core::InParam<'a, super::Foundation::Uri>>, - P2: ::std::convert::Into<::windows::core::InParam<'a, LauncherOptions>>, - { + pub fn LaunchUriWithOptionsForUserAsync(user: &User, uri: &super::Foundation::Uri, options: &LauncherOptions) -> ::windows::core::Result> { Self::ILauncherStatics4(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).LaunchUriWithOptionsForUserAsync)(::windows::core::Vtable::as_raw(this), user.into().abi(), uri.into().abi(), options.into().abi(), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).LaunchUriWithOptionsForUserAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(user), ::core::mem::transmute_copy(uri), ::core::mem::transmute_copy(options), result__.as_mut_ptr()).from_abi::>(result__) }) } #[doc = "*Required features: `\"Foundation_Collections\"`*"] #[cfg(feature = "Foundation_Collections")] - pub fn LaunchUriWithDataForUserAsync<'a, P0, P1, P2, P3>(user: P0, uri: P1, options: P2, inputdata: P3) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, User>>, - P1: ::std::convert::Into<::windows::core::InParam<'a, super::Foundation::Uri>>, - P2: ::std::convert::Into<::windows::core::InParam<'a, LauncherOptions>>, - P3: ::std::convert::Into<::windows::core::InParam<'a, super::Foundation::Collections::ValueSet>>, - { + pub fn LaunchUriWithDataForUserAsync(user: &User, uri: &super::Foundation::Uri, options: &LauncherOptions, inputdata: &super::Foundation::Collections::ValueSet) -> ::windows::core::Result> { Self::ILauncherStatics4(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).LaunchUriWithDataForUserAsync)(::windows::core::Vtable::as_raw(this), user.into().abi(), uri.into().abi(), options.into().abi(), inputdata.into().abi(), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).LaunchUriWithDataForUserAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(user), ::core::mem::transmute_copy(uri), ::core::mem::transmute_copy(options), ::core::mem::transmute_copy(inputdata), result__.as_mut_ptr()).from_abi::>(result__) }) } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn LaunchUriForResultsForUserAsync<'a, P0, P1, P2>(user: P0, uri: P1, options: P2) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, User>>, - P1: ::std::convert::Into<::windows::core::InParam<'a, super::Foundation::Uri>>, - P2: ::std::convert::Into<::windows::core::InParam<'a, LauncherOptions>>, - { + pub fn LaunchUriForResultsForUserAsync(user: &User, uri: &super::Foundation::Uri, options: &LauncherOptions) -> ::windows::core::Result> { Self::ILauncherStatics4(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).LaunchUriForResultsForUserAsync)(::windows::core::Vtable::as_raw(this), user.into().abi(), uri.into().abi(), options.into().abi(), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).LaunchUriForResultsForUserAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(user), ::core::mem::transmute_copy(uri), ::core::mem::transmute_copy(options), result__.as_mut_ptr()).from_abi::>(result__) }) } #[doc = "*Required features: `\"Foundation_Collections\"`*"] #[cfg(feature = "Foundation_Collections")] - pub fn LaunchUriForResultsWithDataForUserAsync<'a, P0, P1, P2, P3>(user: P0, uri: P1, options: P2, inputdata: P3) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, User>>, - P1: ::std::convert::Into<::windows::core::InParam<'a, super::Foundation::Uri>>, - P2: ::std::convert::Into<::windows::core::InParam<'a, LauncherOptions>>, - P3: ::std::convert::Into<::windows::core::InParam<'a, super::Foundation::Collections::ValueSet>>, - { + pub fn LaunchUriForResultsWithDataForUserAsync(user: &User, uri: &super::Foundation::Uri, options: &LauncherOptions, inputdata: &super::Foundation::Collections::ValueSet) -> ::windows::core::Result> { Self::ILauncherStatics4(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).LaunchUriForResultsWithDataForUserAsync)(::windows::core::Vtable::as_raw(this), user.into().abi(), uri.into().abi(), options.into().abi(), inputdata.into().abi(), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).LaunchUriForResultsWithDataForUserAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(user), ::core::mem::transmute_copy(uri), ::core::mem::transmute_copy(options), ::core::mem::transmute_copy(inputdata), result__.as_mut_ptr()).from_abi::>(result__) }) } #[doc = "*Required features: `\"Foundation\"`*"] @@ -4815,36 +4697,26 @@ impl Launcher { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn LaunchFolderPathWithOptionsAsync<'a, P0>(path: &::windows::core::HSTRING, options: P0) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, FolderLauncherOptions>>, - { + pub fn LaunchFolderPathWithOptionsAsync(path: &::windows::core::HSTRING, options: &FolderLauncherOptions) -> ::windows::core::Result> { Self::ILauncherStatics5(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).LaunchFolderPathWithOptionsAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(path), options.into().abi(), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).LaunchFolderPathWithOptionsAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(path), ::core::mem::transmute_copy(options), result__.as_mut_ptr()).from_abi::>(result__) }) } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn LaunchFolderPathForUserAsync<'a, P0>(user: P0, path: &::windows::core::HSTRING) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, User>>, - { + pub fn LaunchFolderPathForUserAsync(user: &User, path: &::windows::core::HSTRING) -> ::windows::core::Result> { Self::ILauncherStatics5(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).LaunchFolderPathForUserAsync)(::windows::core::Vtable::as_raw(this), user.into().abi(), ::core::mem::transmute_copy(path), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).LaunchFolderPathForUserAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(user), ::core::mem::transmute_copy(path), result__.as_mut_ptr()).from_abi::>(result__) }) } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn LaunchFolderPathWithOptionsForUserAsync<'a, P0, P1>(user: P0, path: &::windows::core::HSTRING, options: P1) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, User>>, - P1: ::std::convert::Into<::windows::core::InParam<'a, FolderLauncherOptions>>, - { + pub fn LaunchFolderPathWithOptionsForUserAsync(user: &User, path: &::windows::core::HSTRING, options: &FolderLauncherOptions) -> ::windows::core::Result> { Self::ILauncherStatics5(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).LaunchFolderPathWithOptionsForUserAsync)(::windows::core::Vtable::as_raw(this), user.into().abi(), ::core::mem::transmute_copy(path), options.into().abi(), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).LaunchFolderPathWithOptionsForUserAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(user), ::core::mem::transmute_copy(path), ::core::mem::transmute_copy(options), result__.as_mut_ptr()).from_abi::>(result__) }) } #[doc(hidden)] @@ -4949,12 +4821,9 @@ impl LauncherOptions { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn SetFallbackUri<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::Foundation::Uri>>, - { + pub fn SetFallbackUri(&self, value: &super::Foundation::Uri) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).SetFallbackUri)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetFallbackUri)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } pub fn ContentType(&self) -> ::windows::core::Result<::windows::core::HSTRING> { let this = self; @@ -4989,12 +4858,9 @@ impl LauncherOptions { } #[doc = "*Required features: `\"Storage_Search\"`*"] #[cfg(feature = "Storage_Search")] - pub fn SetNeighboringFilesQuery<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::Storage::Search::StorageFileQueryResult>>, - { + pub fn SetNeighboringFilesQuery(&self, value: &super::Storage::Search::StorageFileQueryResult) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).SetNeighboringFilesQuery)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetNeighboringFilesQuery)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } pub fn IgnoreAppUriHandlers(&self) -> ::windows::core::Result { let this = &::windows::core::Interface::cast::(self)?; @@ -5262,13 +5128,10 @@ impl MemoryManager { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn AppMemoryUsageIncreased<'a, P0>(handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::Foundation::EventHandler<::windows::core::IInspectable>>>, - { + pub fn AppMemoryUsageIncreased(handler: &super::Foundation::EventHandler<::windows::core::IInspectable>) -> ::windows::core::Result { Self::IMemoryManagerStatics(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).AppMemoryUsageIncreased)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).AppMemoryUsageIncreased)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) }) } #[doc = "*Required features: `\"Foundation\"`*"] @@ -5278,13 +5141,10 @@ impl MemoryManager { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn AppMemoryUsageDecreased<'a, P0>(handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::Foundation::EventHandler<::windows::core::IInspectable>>>, - { + pub fn AppMemoryUsageDecreased(handler: &super::Foundation::EventHandler<::windows::core::IInspectable>) -> ::windows::core::Result { Self::IMemoryManagerStatics(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).AppMemoryUsageDecreased)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).AppMemoryUsageDecreased)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) }) } #[doc = "*Required features: `\"Foundation\"`*"] @@ -5294,13 +5154,10 @@ impl MemoryManager { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn AppMemoryUsageLimitChanging<'a, P0>(handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::Foundation::EventHandler>>, - { + pub fn AppMemoryUsageLimitChanging(handler: &super::Foundation::EventHandler) -> ::windows::core::Result { Self::IMemoryManagerStatics(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).AppMemoryUsageLimitChanging)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).AppMemoryUsageLimitChanging)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) }) } #[doc = "*Required features: `\"Foundation\"`*"] @@ -5369,13 +5226,10 @@ impl ProcessLauncher { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn RunToCompletionAsyncWithOptions<'a, P0>(filename: &::windows::core::HSTRING, args: &::windows::core::HSTRING, options: P0) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, ProcessLauncherOptions>>, - { + pub fn RunToCompletionAsyncWithOptions(filename: &::windows::core::HSTRING, args: &::windows::core::HSTRING, options: &ProcessLauncherOptions) -> ::windows::core::Result> { Self::IProcessLauncherStatics(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).RunToCompletionAsyncWithOptions)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(filename), ::core::mem::transmute_copy(args), options.into().abi(), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).RunToCompletionAsyncWithOptions)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(filename), ::core::mem::transmute_copy(args), ::core::mem::transmute_copy(options), result__.as_mut_ptr()).from_abi::>(result__) }) } #[doc(hidden)] @@ -5696,12 +5550,9 @@ pub struct ProtocolForResultsOperation(::windows::core::IUnknown); impl ProtocolForResultsOperation { #[doc = "*Required features: `\"Foundation_Collections\"`*"] #[cfg(feature = "Foundation_Collections")] - pub fn ReportCompleted<'a, P0>(&self, data: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::Foundation::Collections::ValueSet>>, - { + pub fn ReportCompleted(&self, data: &super::Foundation::Collections::ValueSet) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).ReportCompleted)(::windows::core::Vtable::as_raw(this), data.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).ReportCompleted)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(data)).ok() } } } impl ::core::clone::Clone for ProtocolForResultsOperation { @@ -5773,41 +5624,26 @@ pub struct RemoteLauncher; impl RemoteLauncher { #[doc = "*Required features: `\"Foundation\"`, `\"System_RemoteSystems\"`*"] #[cfg(all(feature = "Foundation", feature = "System_RemoteSystems"))] - pub fn LaunchUriAsync<'a, P0, P1>(remotesystemconnectionrequest: P0, uri: P1) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, RemoteSystems::RemoteSystemConnectionRequest>>, - P1: ::std::convert::Into<::windows::core::InParam<'a, super::Foundation::Uri>>, - { + pub fn LaunchUriAsync(remotesystemconnectionrequest: &RemoteSystems::RemoteSystemConnectionRequest, uri: &super::Foundation::Uri) -> ::windows::core::Result> { Self::IRemoteLauncherStatics(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).LaunchUriAsync)(::windows::core::Vtable::as_raw(this), remotesystemconnectionrequest.into().abi(), uri.into().abi(), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).LaunchUriAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(remotesystemconnectionrequest), ::core::mem::transmute_copy(uri), result__.as_mut_ptr()).from_abi::>(result__) }) } #[doc = "*Required features: `\"Foundation\"`, `\"System_RemoteSystems\"`*"] #[cfg(all(feature = "Foundation", feature = "System_RemoteSystems"))] - pub fn LaunchUriWithOptionsAsync<'a, P0, P1, P2>(remotesystemconnectionrequest: P0, uri: P1, options: P2) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, RemoteSystems::RemoteSystemConnectionRequest>>, - P1: ::std::convert::Into<::windows::core::InParam<'a, super::Foundation::Uri>>, - P2: ::std::convert::Into<::windows::core::InParam<'a, RemoteLauncherOptions>>, - { + pub fn LaunchUriWithOptionsAsync(remotesystemconnectionrequest: &RemoteSystems::RemoteSystemConnectionRequest, uri: &super::Foundation::Uri, options: &RemoteLauncherOptions) -> ::windows::core::Result> { Self::IRemoteLauncherStatics(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).LaunchUriWithOptionsAsync)(::windows::core::Vtable::as_raw(this), remotesystemconnectionrequest.into().abi(), uri.into().abi(), options.into().abi(), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).LaunchUriWithOptionsAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(remotesystemconnectionrequest), ::core::mem::transmute_copy(uri), ::core::mem::transmute_copy(options), result__.as_mut_ptr()).from_abi::>(result__) }) } #[doc = "*Required features: `\"Foundation_Collections\"`, `\"System_RemoteSystems\"`*"] #[cfg(all(feature = "Foundation_Collections", feature = "System_RemoteSystems"))] - pub fn LaunchUriWithDataAsync<'a, P0, P1, P2, P3>(remotesystemconnectionrequest: P0, uri: P1, options: P2, inputdata: P3) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, RemoteSystems::RemoteSystemConnectionRequest>>, - P1: ::std::convert::Into<::windows::core::InParam<'a, super::Foundation::Uri>>, - P2: ::std::convert::Into<::windows::core::InParam<'a, RemoteLauncherOptions>>, - P3: ::std::convert::Into<::windows::core::InParam<'a, super::Foundation::Collections::ValueSet>>, - { + pub fn LaunchUriWithDataAsync(remotesystemconnectionrequest: &RemoteSystems::RemoteSystemConnectionRequest, uri: &super::Foundation::Uri, options: &RemoteLauncherOptions, inputdata: &super::Foundation::Collections::ValueSet) -> ::windows::core::Result> { Self::IRemoteLauncherStatics(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).LaunchUriWithDataAsync)(::windows::core::Vtable::as_raw(this), remotesystemconnectionrequest.into().abi(), uri.into().abi(), options.into().abi(), inputdata.into().abi(), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).LaunchUriWithDataAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(remotesystemconnectionrequest), ::core::mem::transmute_copy(uri), ::core::mem::transmute_copy(options), ::core::mem::transmute_copy(inputdata), result__.as_mut_ptr()).from_abi::>(result__) }) } #[doc(hidden)] @@ -5841,12 +5677,9 @@ impl RemoteLauncherOptions { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn SetFallbackUri<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::Foundation::Uri>>, - { + pub fn SetFallbackUri(&self, value: &super::Foundation::Uri) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).SetFallbackUri)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetFallbackUri)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } #[doc = "*Required features: `\"Foundation_Collections\"`*"] #[cfg(feature = "Foundation_Collections")] @@ -6457,13 +6290,10 @@ impl UserDeviceAssociation { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn UserDeviceAssociationChanged<'a, P0>(handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::Foundation::EventHandler>>, - { + pub fn UserDeviceAssociationChanged(handler: &super::Foundation::EventHandler) -> ::windows::core::Result { Self::IUserDeviceAssociationStatics(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).UserDeviceAssociationChanged)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).UserDeviceAssociationChanged)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) }) } #[doc = "*Required features: `\"Foundation\"`*"] @@ -6599,12 +6429,9 @@ impl UserPicker { (::windows::core::Vtable::vtable(this).SuggestedSelectedUser)(::windows::core::Vtable::as_raw(this), result__.as_mut_ptr()).from_abi::(result__) } } - pub fn SetSuggestedSelectedUser<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, User>>, - { + pub fn SetSuggestedSelectedUser(&self, value: &User) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).SetSuggestedSelectedUser)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetSuggestedSelectedUser)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] @@ -6712,14 +6539,11 @@ impl UserWatcher { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn Added<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::Foundation::TypedEventHandler>>, - { + pub fn Added(&self, handler: &super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).Added)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).Added)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -6730,14 +6554,11 @@ impl UserWatcher { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn Removed<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::Foundation::TypedEventHandler>>, - { + pub fn Removed(&self, handler: &super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).Removed)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).Removed)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -6748,14 +6569,11 @@ impl UserWatcher { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn Updated<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::Foundation::TypedEventHandler>>, - { + pub fn Updated(&self, handler: &super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).Updated)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).Updated)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -6766,14 +6584,11 @@ impl UserWatcher { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn AuthenticationStatusChanged<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::Foundation::TypedEventHandler>>, - { + pub fn AuthenticationStatusChanged(&self, handler: &super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).AuthenticationStatusChanged)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).AuthenticationStatusChanged)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -6784,14 +6599,11 @@ impl UserWatcher { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn AuthenticationStatusChanging<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::Foundation::TypedEventHandler>>, - { + pub fn AuthenticationStatusChanging(&self, handler: &super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).AuthenticationStatusChanging)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).AuthenticationStatusChanging)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -6802,14 +6614,11 @@ impl UserWatcher { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn EnumerationCompleted<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::Foundation::TypedEventHandler>>, - { + pub fn EnumerationCompleted(&self, handler: &super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).EnumerationCompleted)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).EnumerationCompleted)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -6820,14 +6629,11 @@ impl UserWatcher { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn Stopped<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::Foundation::TypedEventHandler>>, - { + pub fn Stopped(&self, handler: &super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).Stopped)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).Stopped)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] diff --git a/crates/libs/windows/src/Windows/UI/Accessibility/mod.rs b/crates/libs/windows/src/Windows/UI/Accessibility/mod.rs index 5545638e21..d3d01bdd1c 100644 --- a/crates/libs/windows/src/Windows/UI/Accessibility/mod.rs +++ b/crates/libs/windows/src/Windows/UI/Accessibility/mod.rs @@ -145,14 +145,11 @@ impl ScreenReaderService { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn ScreenReaderPositionChanged<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn ScreenReaderPositionChanged(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).ScreenReaderPositionChanged)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).ScreenReaderPositionChanged)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] diff --git a/crates/libs/windows/src/Windows/UI/ApplicationSettings/mod.rs b/crates/libs/windows/src/Windows/UI/ApplicationSettings/mod.rs index 8fddffb2c4..83590f8c3f 100644 --- a/crates/libs/windows/src/Windows/UI/ApplicationSettings/mod.rs +++ b/crates/libs/windows/src/Windows/UI/ApplicationSettings/mod.rs @@ -419,14 +419,11 @@ pub struct AccountsSettingsPane(::windows::core::IUnknown); impl AccountsSettingsPane { #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn AccountCommandsRequested<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn AccountCommandsRequested(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).AccountCommandsRequested)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).AccountCommandsRequested)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -462,24 +459,18 @@ impl AccountsSettingsPane { } #[doc = "*Required features: `\"Foundation\"`, `\"System\"`*"] #[cfg(all(feature = "Foundation", feature = "System"))] - pub fn ShowManageAccountsForUserAsync<'a, P0>(user: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::System::User>>, - { + pub fn ShowManageAccountsForUserAsync(user: &super::super::System::User) -> ::windows::core::Result { Self::IAccountsSettingsPaneStatics3(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).ShowManageAccountsForUserAsync)(::windows::core::Vtable::as_raw(this), user.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).ShowManageAccountsForUserAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(user), result__.as_mut_ptr()).from_abi::(result__) }) } #[doc = "*Required features: `\"Foundation\"`, `\"System\"`*"] #[cfg(all(feature = "Foundation", feature = "System"))] - pub fn ShowAddAccountForUserAsync<'a, P0>(user: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::System::User>>, - { + pub fn ShowAddAccountForUserAsync(user: &super::super::System::User) -> ::windows::core::Result { Self::IAccountsSettingsPaneStatics3(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).ShowAddAccountForUserAsync)(::windows::core::Vtable::as_raw(this), user.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).ShowAddAccountForUserAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(user), result__.as_mut_ptr()).from_abi::(result__) }) } #[doc(hidden)] @@ -783,25 +774,18 @@ impl CredentialCommand { } #[doc = "*Required features: `\"Security_Credentials\"`*"] #[cfg(feature = "Security_Credentials")] - pub fn CreateCredentialCommand<'a, P0>(passwordcredential: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Security::Credentials::PasswordCredential>>, - { + pub fn CreateCredentialCommand(passwordcredential: &super::super::Security::Credentials::PasswordCredential) -> ::windows::core::Result { Self::ICredentialCommandFactory(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).CreateCredentialCommand)(::windows::core::Vtable::as_raw(this), passwordcredential.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).CreateCredentialCommand)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(passwordcredential), result__.as_mut_ptr()).from_abi::(result__) }) } #[doc = "*Required features: `\"Security_Credentials\"`*"] #[cfg(feature = "Security_Credentials")] - pub fn CreateCredentialCommandWithHandler<'a, P0, P1>(passwordcredential: P0, deleted: P1) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Security::Credentials::PasswordCredential>>, - P1: ::std::convert::Into<::windows::core::InParam<'a, CredentialCommandCredentialDeletedHandler>>, - { + pub fn CreateCredentialCommandWithHandler(passwordcredential: &super::super::Security::Credentials::PasswordCredential, deleted: &CredentialCommandCredentialDeletedHandler) -> ::windows::core::Result { Self::ICredentialCommandFactory(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).CreateCredentialCommandWithHandler)(::windows::core::Vtable::as_raw(this), passwordcredential.into().abi(), deleted.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).CreateCredentialCommandWithHandler)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(passwordcredential), ::core::mem::transmute_copy(deleted), result__.as_mut_ptr()).from_abi::(result__) }) } #[doc(hidden)] @@ -880,14 +864,13 @@ pub struct SettingsCommand(::windows::core::IUnknown); impl SettingsCommand { #[doc = "*Required features: `\"UI_Popups\"`*"] #[cfg(feature = "UI_Popups")] - pub fn CreateSettingsCommand<'a, P0, P1>(settingscommandid: P0, label: &::windows::core::HSTRING, handler: P1) -> ::windows::core::Result + pub fn CreateSettingsCommand<'a, P0>(settingscommandid: P0, label: &::windows::core::HSTRING, handler: &super::Popups::UICommandInvokedHandler) -> ::windows::core::Result where P0: ::std::convert::Into<::windows::core::InParam<'a, ::windows::core::IInspectable>>, - P1: ::std::convert::Into<::windows::core::InParam<'a, super::Popups::UICommandInvokedHandler>>, { Self::ISettingsCommandFactory(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).CreateSettingsCommand)(::windows::core::Vtable::as_raw(this), settingscommandid.into().abi(), ::core::mem::transmute_copy(label), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).CreateSettingsCommand)(::windows::core::Vtable::as_raw(this), settingscommandid.into().abi(), ::core::mem::transmute_copy(label), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) }) } #[doc = "*Required features: `\"UI_Popups\"`*"] @@ -924,12 +907,9 @@ impl SettingsCommand { } #[doc = "*Required features: `\"UI_Popups\"`*"] #[cfg(feature = "UI_Popups")] - pub fn SetInvoked<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::Popups::UICommandInvokedHandler>>, - { + pub fn SetInvoked(&self, value: &super::Popups::UICommandInvokedHandler) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).SetInvoked)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetInvoked)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } #[doc = "*Required features: `\"UI_Popups\"`*"] #[cfg(feature = "UI_Popups")] @@ -1066,14 +1046,11 @@ pub struct SettingsPane(::windows::core::IUnknown); impl SettingsPane { #[doc = "*Required features: `\"Foundation\"`, `\"deprecated\"`*"] #[cfg(all(feature = "Foundation", feature = "deprecated"))] - pub fn CommandsRequested<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn CommandsRequested(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).CommandsRequested)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).CommandsRequested)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`, `\"deprecated\"`*"] @@ -1399,14 +1376,10 @@ impl WebAccountCommand { } #[doc = "*Required features: `\"Security_Credentials\"`*"] #[cfg(feature = "Security_Credentials")] - pub fn CreateWebAccountCommand<'a, P0, P1>(webaccount: P0, invoked: P1, actions: SupportedWebAccountActions) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Security::Credentials::WebAccount>>, - P1: ::std::convert::Into<::windows::core::InParam<'a, WebAccountCommandInvokedHandler>>, - { + pub fn CreateWebAccountCommand(webaccount: &super::super::Security::Credentials::WebAccount, invoked: &WebAccountCommandInvokedHandler, actions: SupportedWebAccountActions) -> ::windows::core::Result { Self::IWebAccountCommandFactory(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).CreateWebAccountCommand)(::windows::core::Vtable::as_raw(this), webaccount.into().abi(), invoked.into().abi(), actions, result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).CreateWebAccountCommand)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(webaccount), ::core::mem::transmute_copy(invoked), actions, result__.as_mut_ptr()).from_abi::(result__) }) } #[doc(hidden)] @@ -1573,14 +1546,10 @@ impl WebAccountProviderCommand { } #[doc = "*Required features: `\"Security_Credentials\"`*"] #[cfg(feature = "Security_Credentials")] - pub fn CreateWebAccountProviderCommand<'a, P0, P1>(webaccountprovider: P0, invoked: P1) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Security::Credentials::WebAccountProvider>>, - P1: ::std::convert::Into<::windows::core::InParam<'a, WebAccountProviderCommandInvokedHandler>>, - { + pub fn CreateWebAccountProviderCommand(webaccountprovider: &super::super::Security::Credentials::WebAccountProvider, invoked: &WebAccountProviderCommandInvokedHandler) -> ::windows::core::Result { Self::IWebAccountProviderCommandFactory(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).CreateWebAccountProviderCommand)(::windows::core::Vtable::as_raw(this), webaccountprovider.into().abi(), invoked.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).CreateWebAccountProviderCommand)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(webaccountprovider), ::core::mem::transmute_copy(invoked), result__.as_mut_ptr()).from_abi::(result__) }) } #[doc(hidden)] @@ -1804,12 +1773,9 @@ impl CredentialCommandCredentialDeletedHandler { let com = CredentialCommandCredentialDeletedHandlerBox:: { vtable: &CredentialCommandCredentialDeletedHandlerBox::::VTABLE, count: ::windows::core::RefCount::new(1), invoke }; unsafe { ::core::mem::transmute(::windows::core::alloc::boxed::Box::new(com)) } } - pub fn Invoke<'a, P0>(&self, command: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, CredentialCommand>>, - { + pub fn Invoke(&self, command: &CredentialCommand) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).Invoke)(::windows::core::Vtable::as_raw(this), command.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).Invoke)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(command)).ok() } } } #[repr(C)] @@ -1893,13 +1859,9 @@ impl WebAccountCommandInvokedHandler { let com = WebAccountCommandInvokedHandlerBox:: { vtable: &WebAccountCommandInvokedHandlerBox::::VTABLE, count: ::windows::core::RefCount::new(1), invoke }; unsafe { ::core::mem::transmute(::windows::core::alloc::boxed::Box::new(com)) } } - pub fn Invoke<'a, P0, P1>(&self, command: P0, args: P1) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, WebAccountCommand>>, - P1: ::std::convert::Into<::windows::core::InParam<'a, WebAccountInvokedArgs>>, - { + pub fn Invoke(&self, command: &WebAccountCommand, args: &WebAccountInvokedArgs) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).Invoke)(::windows::core::Vtable::as_raw(this), command.into().abi(), args.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).Invoke)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(command), ::core::mem::transmute_copy(args)).ok() } } } #[repr(C)] @@ -1983,12 +1945,9 @@ impl WebAccountProviderCommandInvokedHandler { let com = WebAccountProviderCommandInvokedHandlerBox:: { vtable: &WebAccountProviderCommandInvokedHandlerBox::::VTABLE, count: ::windows::core::RefCount::new(1), invoke }; unsafe { ::core::mem::transmute(::windows::core::alloc::boxed::Box::new(com)) } } - pub fn Invoke<'a, P0>(&self, command: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, WebAccountProviderCommand>>, - { + pub fn Invoke(&self, command: &WebAccountProviderCommand) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).Invoke)(::windows::core::Vtable::as_raw(this), command.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).Invoke)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(command)).ok() } } } #[repr(C)] diff --git a/crates/libs/windows/src/Windows/UI/Composition/Core/mod.rs b/crates/libs/windows/src/Windows/UI/Composition/Core/mod.rs index 56f56c7d93..bd06343636 100644 --- a/crates/libs/windows/src/Windows/UI/Composition/Core/mod.rs +++ b/crates/libs/windows/src/Windows/UI/Composition/Core/mod.rs @@ -65,14 +65,11 @@ impl CompositorController { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn CommitNeeded<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Foundation::TypedEventHandler>>, - { + pub fn CommitNeeded(&self, handler: &super::super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).CommitNeeded)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).CommitNeeded)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] diff --git a/crates/libs/windows/src/Windows/UI/Composition/Desktop/mod.rs b/crates/libs/windows/src/Windows/UI/Composition/Desktop/mod.rs index e1652e67c5..5474dd60a9 100644 --- a/crates/libs/windows/src/Windows/UI/Composition/Desktop/mod.rs +++ b/crates/libs/windows/src/Windows/UI/Composition/Desktop/mod.rs @@ -17,12 +17,9 @@ pub struct IDesktopWindowTarget_Vtbl { #[repr(transparent)] pub struct DesktopWindowTarget(::windows::core::IUnknown); impl DesktopWindowTarget { - pub fn PopulatePropertyInfo<'a, P0>(&self, propertyname: &::windows::core::HSTRING, propertyinfo: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::AnimationPropertyInfo>>, - { + pub fn PopulatePropertyInfo(&self, propertyname: &::windows::core::HSTRING, propertyinfo: &super::AnimationPropertyInfo) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).PopulatePropertyInfo)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(propertyname), propertyinfo.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).PopulatePropertyInfo)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(propertyname), ::core::mem::transmute_copy(propertyinfo)).ok() } } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] @@ -82,12 +79,9 @@ impl DesktopWindowTarget { (::windows::core::Vtable::vtable(this).ImplicitAnimations)(::windows::core::Vtable::as_raw(this), result__.as_mut_ptr()).from_abi::(result__) } } - pub fn SetImplicitAnimations<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::ImplicitAnimationCollection>>, - { + pub fn SetImplicitAnimations(&self, value: &super::ImplicitAnimationCollection) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).SetImplicitAnimations)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetImplicitAnimations)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } pub fn StartAnimationGroup<'a, P0, E0>(&self, value: P0) -> ::windows::core::Result<()> where diff --git a/crates/libs/windows/src/Windows/UI/Composition/Diagnostics/mod.rs b/crates/libs/windows/src/Windows/UI/Composition/Diagnostics/mod.rs index 01a67f4256..7385b63be5 100644 --- a/crates/libs/windows/src/Windows/UI/Composition/Diagnostics/mod.rs +++ b/crates/libs/windows/src/Windows/UI/Composition/Diagnostics/mod.rs @@ -154,13 +154,10 @@ impl CompositionDebugSettings { (::windows::core::Vtable::vtable(this).HeatMaps)(::windows::core::Vtable::as_raw(this), result__.as_mut_ptr()).from_abi::(result__) } } - pub fn TryGetSettings<'a, P0>(compositor: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::Compositor>>, - { + pub fn TryGetSettings(compositor: &super::Compositor) -> ::windows::core::Result { Self::ICompositionDebugSettingsStatics(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).TryGetSettings)(::windows::core::Vtable::as_raw(this), compositor.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).TryGetSettings)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(compositor), result__.as_mut_ptr()).from_abi::(result__) }) } #[doc(hidden)] diff --git a/crates/libs/windows/src/Windows/UI/Composition/Interactions/mod.rs b/crates/libs/windows/src/Windows/UI/Composition/Interactions/mod.rs index c476d21bcf..8e246aba85 100644 --- a/crates/libs/windows/src/Windows/UI/Composition/Interactions/mod.rs +++ b/crates/libs/windows/src/Windows/UI/Composition/Interactions/mod.rs @@ -609,53 +609,29 @@ pub struct IInteractionTrackerInteractingStateEnteredArgs2_Vtbl { #[repr(transparent)] pub struct IInteractionTrackerOwner(::windows::core::IUnknown); impl IInteractionTrackerOwner { - pub fn CustomAnimationStateEntered<'a, P0, P1>(&self, sender: P0, args: P1) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, InteractionTracker>>, - P1: ::std::convert::Into<::windows::core::InParam<'a, InteractionTrackerCustomAnimationStateEnteredArgs>>, - { + pub fn CustomAnimationStateEntered(&self, sender: &InteractionTracker, args: &InteractionTrackerCustomAnimationStateEnteredArgs) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).CustomAnimationStateEntered)(::windows::core::Vtable::as_raw(this), sender.into().abi(), args.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).CustomAnimationStateEntered)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(sender), ::core::mem::transmute_copy(args)).ok() } } - pub fn IdleStateEntered<'a, P0, P1>(&self, sender: P0, args: P1) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, InteractionTracker>>, - P1: ::std::convert::Into<::windows::core::InParam<'a, InteractionTrackerIdleStateEnteredArgs>>, - { + pub fn IdleStateEntered(&self, sender: &InteractionTracker, args: &InteractionTrackerIdleStateEnteredArgs) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).IdleStateEntered)(::windows::core::Vtable::as_raw(this), sender.into().abi(), args.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).IdleStateEntered)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(sender), ::core::mem::transmute_copy(args)).ok() } } - pub fn InertiaStateEntered<'a, P0, P1>(&self, sender: P0, args: P1) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, InteractionTracker>>, - P1: ::std::convert::Into<::windows::core::InParam<'a, InteractionTrackerInertiaStateEnteredArgs>>, - { + pub fn InertiaStateEntered(&self, sender: &InteractionTracker, args: &InteractionTrackerInertiaStateEnteredArgs) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).InertiaStateEntered)(::windows::core::Vtable::as_raw(this), sender.into().abi(), args.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).InertiaStateEntered)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(sender), ::core::mem::transmute_copy(args)).ok() } } - pub fn InteractingStateEntered<'a, P0, P1>(&self, sender: P0, args: P1) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, InteractionTracker>>, - P1: ::std::convert::Into<::windows::core::InParam<'a, InteractionTrackerInteractingStateEnteredArgs>>, - { + pub fn InteractingStateEntered(&self, sender: &InteractionTracker, args: &InteractionTrackerInteractingStateEnteredArgs) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).InteractingStateEntered)(::windows::core::Vtable::as_raw(this), sender.into().abi(), args.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).InteractingStateEntered)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(sender), ::core::mem::transmute_copy(args)).ok() } } - pub fn RequestIgnored<'a, P0, P1>(&self, sender: P0, args: P1) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, InteractionTracker>>, - P1: ::std::convert::Into<::windows::core::InParam<'a, InteractionTrackerRequestIgnoredArgs>>, - { + pub fn RequestIgnored(&self, sender: &InteractionTracker, args: &InteractionTrackerRequestIgnoredArgs) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).RequestIgnored)(::windows::core::Vtable::as_raw(this), sender.into().abi(), args.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).RequestIgnored)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(sender), ::core::mem::transmute_copy(args)).ok() } } - pub fn ValuesChanged<'a, P0, P1>(&self, sender: P0, args: P1) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, InteractionTracker>>, - P1: ::std::convert::Into<::windows::core::InParam<'a, InteractionTrackerValuesChangedArgs>>, - { + pub fn ValuesChanged(&self, sender: &InteractionTracker, args: &InteractionTrackerValuesChangedArgs) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).ValuesChanged)(::windows::core::Vtable::as_raw(this), sender.into().abi(), args.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).ValuesChanged)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(sender), ::core::mem::transmute_copy(args)).ok() } } } impl ::core::convert::From for ::windows::core::IUnknown { @@ -1005,12 +981,9 @@ pub struct IVisualInteractionSourceStatics2_Vtbl { #[repr(transparent)] pub struct CompositionConditionalValue(::windows::core::IUnknown); impl CompositionConditionalValue { - pub fn PopulatePropertyInfo<'a, P0>(&self, propertyname: &::windows::core::HSTRING, propertyinfo: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::AnimationPropertyInfo>>, - { + pub fn PopulatePropertyInfo(&self, propertyname: &::windows::core::HSTRING, propertyinfo: &super::AnimationPropertyInfo) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).PopulatePropertyInfo)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(propertyname), propertyinfo.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).PopulatePropertyInfo)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(propertyname), ::core::mem::transmute_copy(propertyinfo)).ok() } } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] @@ -1025,12 +998,9 @@ impl CompositionConditionalValue { (::windows::core::Vtable::vtable(this).Condition)(::windows::core::Vtable::as_raw(this), result__.as_mut_ptr()).from_abi::(result__) } } - pub fn SetCondition<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::ExpressionAnimation>>, - { + pub fn SetCondition(&self, value: &super::ExpressionAnimation) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).SetCondition)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetCondition)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } pub fn Value(&self) -> ::windows::core::Result { let this = self; @@ -1039,20 +1009,14 @@ impl CompositionConditionalValue { (::windows::core::Vtable::vtable(this).Value)(::windows::core::Vtable::as_raw(this), result__.as_mut_ptr()).from_abi::(result__) } } - pub fn SetValue<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::ExpressionAnimation>>, - { + pub fn SetValue(&self, value: &super::ExpressionAnimation) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).SetValue)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetValue)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } - pub fn Create<'a, P0>(compositor: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::Compositor>>, - { + pub fn Create(compositor: &super::Compositor) -> ::windows::core::Result { Self::ICompositionConditionalValueStatics(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).Create)(::windows::core::Vtable::as_raw(this), compositor.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).Create)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(compositor), result__.as_mut_ptr()).from_abi::(result__) }) } pub fn Compositor(&self) -> ::windows::core::Result { @@ -1107,12 +1071,9 @@ impl CompositionConditionalValue { (::windows::core::Vtable::vtable(this).ImplicitAnimations)(::windows::core::Vtable::as_raw(this), result__.as_mut_ptr()).from_abi::(result__) } } - pub fn SetImplicitAnimations<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::ImplicitAnimationCollection>>, - { + pub fn SetImplicitAnimations(&self, value: &super::ImplicitAnimationCollection) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).SetImplicitAnimations)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetImplicitAnimations)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } pub fn StartAnimationGroup<'a, P0, E0>(&self, value: P0) -> ::windows::core::Result<()> where @@ -1276,12 +1237,9 @@ unsafe impl ::core::marker::Sync for CompositionConditionalValue {} #[repr(transparent)] pub struct CompositionInteractionSourceCollection(::windows::core::IUnknown); impl CompositionInteractionSourceCollection { - pub fn PopulatePropertyInfo<'a, P0>(&self, propertyname: &::windows::core::HSTRING, propertyinfo: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::AnimationPropertyInfo>>, - { + pub fn PopulatePropertyInfo(&self, propertyname: &::windows::core::HSTRING, propertyinfo: &super::AnimationPropertyInfo) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).PopulatePropertyInfo)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(propertyname), propertyinfo.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).PopulatePropertyInfo)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(propertyname), ::core::mem::transmute_copy(propertyinfo)).ok() } } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] @@ -1368,12 +1326,9 @@ impl CompositionInteractionSourceCollection { (::windows::core::Vtable::vtable(this).ImplicitAnimations)(::windows::core::Vtable::as_raw(this), result__.as_mut_ptr()).from_abi::(result__) } } - pub fn SetImplicitAnimations<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::ImplicitAnimationCollection>>, - { + pub fn SetImplicitAnimations(&self, value: &super::ImplicitAnimationCollection) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).SetImplicitAnimations)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetImplicitAnimations)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } pub fn StartAnimationGroup<'a, P0, E0>(&self, value: P0) -> ::windows::core::Result<()> where @@ -1579,12 +1534,9 @@ unsafe impl ::core::marker::Sync for CompositionInteractionSourceCollection {} #[repr(transparent)] pub struct InteractionSourceConfiguration(::windows::core::IUnknown); impl InteractionSourceConfiguration { - pub fn PopulatePropertyInfo<'a, P0>(&self, propertyname: &::windows::core::HSTRING, propertyinfo: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::AnimationPropertyInfo>>, - { + pub fn PopulatePropertyInfo(&self, propertyname: &::windows::core::HSTRING, propertyinfo: &super::AnimationPropertyInfo) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).PopulatePropertyInfo)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(propertyname), propertyinfo.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).PopulatePropertyInfo)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(propertyname), ::core::mem::transmute_copy(propertyinfo)).ok() } } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] @@ -1644,12 +1596,9 @@ impl InteractionSourceConfiguration { (::windows::core::Vtable::vtable(this).ImplicitAnimations)(::windows::core::Vtable::as_raw(this), result__.as_mut_ptr()).from_abi::(result__) } } - pub fn SetImplicitAnimations<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::ImplicitAnimationCollection>>, - { + pub fn SetImplicitAnimations(&self, value: &super::ImplicitAnimationCollection) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).SetImplicitAnimations)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetImplicitAnimations)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } pub fn StartAnimationGroup<'a, P0, E0>(&self, value: P0) -> ::windows::core::Result<()> where @@ -1841,12 +1790,9 @@ unsafe impl ::core::marker::Sync for InteractionSourceConfiguration {} #[repr(transparent)] pub struct InteractionTracker(::windows::core::IUnknown); impl InteractionTracker { - pub fn PopulatePropertyInfo<'a, P0>(&self, propertyname: &::windows::core::HSTRING, propertyinfo: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::AnimationPropertyInfo>>, - { + pub fn PopulatePropertyInfo(&self, propertyname: &::windows::core::HSTRING, propertyinfo: &super::AnimationPropertyInfo) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).PopulatePropertyInfo)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(propertyname), propertyinfo.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).PopulatePropertyInfo)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(propertyname), ::core::mem::transmute_copy(propertyinfo)).ok() } } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] @@ -1906,12 +1852,9 @@ impl InteractionTracker { (::windows::core::Vtable::vtable(this).ImplicitAnimations)(::windows::core::Vtable::as_raw(this), result__.as_mut_ptr()).from_abi::(result__) } } - pub fn SetImplicitAnimations<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::ImplicitAnimationCollection>>, - { + pub fn SetImplicitAnimations(&self, value: &super::ImplicitAnimationCollection) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).SetImplicitAnimations)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetImplicitAnimations)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } pub fn StartAnimationGroup<'a, P0, E0>(&self, value: P0) -> ::windows::core::Result<()> where @@ -2273,41 +2216,29 @@ impl InteractionTracker { (::windows::core::Vtable::vtable(this).TryUpdatePositionWithOption)(::windows::core::Vtable::as_raw(this), value, option, posupdateoption, result__.as_mut_ptr()).from_abi::(result__) } } - pub fn Create<'a, P0>(compositor: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::Compositor>>, - { + pub fn Create(compositor: &super::Compositor) -> ::windows::core::Result { Self::IInteractionTrackerStatics(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).Create)(::windows::core::Vtable::as_raw(this), compositor.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).Create)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(compositor), result__.as_mut_ptr()).from_abi::(result__) }) } - pub fn CreateWithOwner<'a, P0, P1, E1>(compositor: P0, owner: P1) -> ::windows::core::Result + pub fn CreateWithOwner<'a, P0, E0>(compositor: &super::Compositor, owner: P0) -> ::windows::core::Result where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::Compositor>>, - P1: ::std::convert::TryInto<::windows::core::InParam<'a, IInteractionTrackerOwner>, Error = E1>, - E1: ::std::convert::Into<::windows::core::Error>, + P0: ::std::convert::TryInto<::windows::core::InParam<'a, IInteractionTrackerOwner>, Error = E0>, + E0: ::std::convert::Into<::windows::core::Error>, { Self::IInteractionTrackerStatics(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).CreateWithOwner)(::windows::core::Vtable::as_raw(this), compositor.into().abi(), owner.try_into().map_err(|e| e.into())?.abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).CreateWithOwner)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(compositor), owner.try_into().map_err(|e| e.into())?.abi(), result__.as_mut_ptr()).from_abi::(result__) }) } - pub fn SetBindingMode<'a, P0, P1>(boundtracker1: P0, boundtracker2: P1, axismode: InteractionBindingAxisModes) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, InteractionTracker>>, - P1: ::std::convert::Into<::windows::core::InParam<'a, InteractionTracker>>, - { - Self::IInteractionTrackerStatics2(|this| unsafe { (::windows::core::Vtable::vtable(this).SetBindingMode)(::windows::core::Vtable::as_raw(this), boundtracker1.into().abi(), boundtracker2.into().abi(), axismode).ok() }) + pub fn SetBindingMode(boundtracker1: &InteractionTracker, boundtracker2: &InteractionTracker, axismode: InteractionBindingAxisModes) -> ::windows::core::Result<()> { + Self::IInteractionTrackerStatics2(|this| unsafe { (::windows::core::Vtable::vtable(this).SetBindingMode)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(boundtracker1), ::core::mem::transmute_copy(boundtracker2), axismode).ok() }) } - pub fn GetBindingMode<'a, P0, P1>(boundtracker1: P0, boundtracker2: P1) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, InteractionTracker>>, - P1: ::std::convert::Into<::windows::core::InParam<'a, InteractionTracker>>, - { + pub fn GetBindingMode(boundtracker1: &InteractionTracker, boundtracker2: &InteractionTracker) -> ::windows::core::Result { Self::IInteractionTrackerStatics2(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).GetBindingMode)(::windows::core::Vtable::as_raw(this), boundtracker1.into().abi(), boundtracker2.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).GetBindingMode)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(boundtracker1), ::core::mem::transmute_copy(boundtracker2), result__.as_mut_ptr()).from_abi::(result__) }) } #[doc(hidden)] @@ -2611,12 +2542,9 @@ unsafe impl ::core::marker::Sync for InteractionTrackerIdleStateEnteredArgs {} #[repr(transparent)] pub struct InteractionTrackerInertiaModifier(::windows::core::IUnknown); impl InteractionTrackerInertiaModifier { - pub fn PopulatePropertyInfo<'a, P0>(&self, propertyname: &::windows::core::HSTRING, propertyinfo: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::AnimationPropertyInfo>>, - { + pub fn PopulatePropertyInfo(&self, propertyname: &::windows::core::HSTRING, propertyinfo: &super::AnimationPropertyInfo) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).PopulatePropertyInfo)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(propertyname), propertyinfo.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).PopulatePropertyInfo)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(propertyname), ::core::mem::transmute_copy(propertyinfo)).ok() } } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] @@ -2676,12 +2604,9 @@ impl InteractionTrackerInertiaModifier { (::windows::core::Vtable::vtable(this).ImplicitAnimations)(::windows::core::Vtable::as_raw(this), result__.as_mut_ptr()).from_abi::(result__) } } - pub fn SetImplicitAnimations<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::ImplicitAnimationCollection>>, - { + pub fn SetImplicitAnimations(&self, value: &super::ImplicitAnimationCollection) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).SetImplicitAnimations)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetImplicitAnimations)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } pub fn StartAnimationGroup<'a, P0, E0>(&self, value: P0) -> ::windows::core::Result<()> where @@ -2840,12 +2765,9 @@ unsafe impl ::core::marker::Sync for InteractionTrackerInertiaModifier {} #[repr(transparent)] pub struct InteractionTrackerInertiaMotion(::windows::core::IUnknown); impl InteractionTrackerInertiaMotion { - pub fn PopulatePropertyInfo<'a, P0>(&self, propertyname: &::windows::core::HSTRING, propertyinfo: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::AnimationPropertyInfo>>, - { + pub fn PopulatePropertyInfo(&self, propertyname: &::windows::core::HSTRING, propertyinfo: &super::AnimationPropertyInfo) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).PopulatePropertyInfo)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(propertyname), propertyinfo.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).PopulatePropertyInfo)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(propertyname), ::core::mem::transmute_copy(propertyinfo)).ok() } } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] @@ -2905,12 +2827,9 @@ impl InteractionTrackerInertiaMotion { (::windows::core::Vtable::vtable(this).ImplicitAnimations)(::windows::core::Vtable::as_raw(this), result__.as_mut_ptr()).from_abi::(result__) } } - pub fn SetImplicitAnimations<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::ImplicitAnimationCollection>>, - { + pub fn SetImplicitAnimations(&self, value: &super::ImplicitAnimationCollection) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).SetImplicitAnimations)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetImplicitAnimations)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } pub fn StartAnimationGroup<'a, P0, E0>(&self, value: P0) -> ::windows::core::Result<()> where @@ -2951,12 +2870,9 @@ impl InteractionTrackerInertiaMotion { (::windows::core::Vtable::vtable(this).Condition)(::windows::core::Vtable::as_raw(this), result__.as_mut_ptr()).from_abi::(result__) } } - pub fn SetCondition<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::ExpressionAnimation>>, - { + pub fn SetCondition(&self, value: &super::ExpressionAnimation) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).SetCondition)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetCondition)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } pub fn Motion(&self) -> ::windows::core::Result { let this = self; @@ -2965,20 +2881,14 @@ impl InteractionTrackerInertiaMotion { (::windows::core::Vtable::vtable(this).Motion)(::windows::core::Vtable::as_raw(this), result__.as_mut_ptr()).from_abi::(result__) } } - pub fn SetMotion<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::ExpressionAnimation>>, - { + pub fn SetMotion(&self, value: &super::ExpressionAnimation) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).SetMotion)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetMotion)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } - pub fn Create<'a, P0>(compositor: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::Compositor>>, - { + pub fn Create(compositor: &super::Compositor) -> ::windows::core::Result { Self::IInteractionTrackerInertiaMotionStatics(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).Create)(::windows::core::Vtable::as_raw(this), compositor.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).Create)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(compositor), result__.as_mut_ptr()).from_abi::(result__) }) } #[doc(hidden)] @@ -3126,12 +3036,9 @@ unsafe impl ::core::marker::Sync for InteractionTrackerInertiaMotion {} #[repr(transparent)] pub struct InteractionTrackerInertiaNaturalMotion(::windows::core::IUnknown); impl InteractionTrackerInertiaNaturalMotion { - pub fn PopulatePropertyInfo<'a, P0>(&self, propertyname: &::windows::core::HSTRING, propertyinfo: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::AnimationPropertyInfo>>, - { + pub fn PopulatePropertyInfo(&self, propertyname: &::windows::core::HSTRING, propertyinfo: &super::AnimationPropertyInfo) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).PopulatePropertyInfo)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(propertyname), propertyinfo.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).PopulatePropertyInfo)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(propertyname), ::core::mem::transmute_copy(propertyinfo)).ok() } } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] @@ -3191,12 +3098,9 @@ impl InteractionTrackerInertiaNaturalMotion { (::windows::core::Vtable::vtable(this).ImplicitAnimations)(::windows::core::Vtable::as_raw(this), result__.as_mut_ptr()).from_abi::(result__) } } - pub fn SetImplicitAnimations<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::ImplicitAnimationCollection>>, - { + pub fn SetImplicitAnimations(&self, value: &super::ImplicitAnimationCollection) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).SetImplicitAnimations)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetImplicitAnimations)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } pub fn StartAnimationGroup<'a, P0, E0>(&self, value: P0) -> ::windows::core::Result<()> where @@ -3237,12 +3141,9 @@ impl InteractionTrackerInertiaNaturalMotion { (::windows::core::Vtable::vtable(this).Condition)(::windows::core::Vtable::as_raw(this), result__.as_mut_ptr()).from_abi::(result__) } } - pub fn SetCondition<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::ExpressionAnimation>>, - { + pub fn SetCondition(&self, value: &super::ExpressionAnimation) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).SetCondition)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetCondition)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } pub fn NaturalMotion(&self) -> ::windows::core::Result { let this = self; @@ -3258,13 +3159,10 @@ impl InteractionTrackerInertiaNaturalMotion { let this = self; unsafe { (::windows::core::Vtable::vtable(this).SetNaturalMotion)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } } - pub fn Create<'a, P0>(compositor: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::Compositor>>, - { + pub fn Create(compositor: &super::Compositor) -> ::windows::core::Result { Self::IInteractionTrackerInertiaNaturalMotionStatics(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).Create)(::windows::core::Vtable::as_raw(this), compositor.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).Create)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(compositor), result__.as_mut_ptr()).from_abi::(result__) }) } #[doc(hidden)] @@ -3412,12 +3310,9 @@ unsafe impl ::core::marker::Sync for InteractionTrackerInertiaNaturalMotion {} #[repr(transparent)] pub struct InteractionTrackerInertiaRestingValue(::windows::core::IUnknown); impl InteractionTrackerInertiaRestingValue { - pub fn PopulatePropertyInfo<'a, P0>(&self, propertyname: &::windows::core::HSTRING, propertyinfo: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::AnimationPropertyInfo>>, - { + pub fn PopulatePropertyInfo(&self, propertyname: &::windows::core::HSTRING, propertyinfo: &super::AnimationPropertyInfo) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).PopulatePropertyInfo)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(propertyname), propertyinfo.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).PopulatePropertyInfo)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(propertyname), ::core::mem::transmute_copy(propertyinfo)).ok() } } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] @@ -3477,12 +3372,9 @@ impl InteractionTrackerInertiaRestingValue { (::windows::core::Vtable::vtable(this).ImplicitAnimations)(::windows::core::Vtable::as_raw(this), result__.as_mut_ptr()).from_abi::(result__) } } - pub fn SetImplicitAnimations<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::ImplicitAnimationCollection>>, - { + pub fn SetImplicitAnimations(&self, value: &super::ImplicitAnimationCollection) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).SetImplicitAnimations)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetImplicitAnimations)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } pub fn StartAnimationGroup<'a, P0, E0>(&self, value: P0) -> ::windows::core::Result<()> where @@ -3523,12 +3415,9 @@ impl InteractionTrackerInertiaRestingValue { (::windows::core::Vtable::vtable(this).Condition)(::windows::core::Vtable::as_raw(this), result__.as_mut_ptr()).from_abi::(result__) } } - pub fn SetCondition<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::ExpressionAnimation>>, - { + pub fn SetCondition(&self, value: &super::ExpressionAnimation) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).SetCondition)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetCondition)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } pub fn RestingValue(&self) -> ::windows::core::Result { let this = self; @@ -3537,20 +3426,14 @@ impl InteractionTrackerInertiaRestingValue { (::windows::core::Vtable::vtable(this).RestingValue)(::windows::core::Vtable::as_raw(this), result__.as_mut_ptr()).from_abi::(result__) } } - pub fn SetRestingValue<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::ExpressionAnimation>>, - { + pub fn SetRestingValue(&self, value: &super::ExpressionAnimation) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).SetRestingValue)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetRestingValue)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } - pub fn Create<'a, P0>(compositor: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::Compositor>>, - { + pub fn Create(compositor: &super::Compositor) -> ::windows::core::Result { Self::IInteractionTrackerInertiaRestingValueStatics(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).Create)(::windows::core::Vtable::as_raw(this), compositor.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).Create)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(compositor), result__.as_mut_ptr()).from_abi::(result__) }) } #[doc(hidden)] @@ -4089,12 +3972,9 @@ unsafe impl ::core::marker::Sync for InteractionTrackerValuesChangedArgs {} #[repr(transparent)] pub struct InteractionTrackerVector2InertiaModifier(::windows::core::IUnknown); impl InteractionTrackerVector2InertiaModifier { - pub fn PopulatePropertyInfo<'a, P0>(&self, propertyname: &::windows::core::HSTRING, propertyinfo: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::AnimationPropertyInfo>>, - { + pub fn PopulatePropertyInfo(&self, propertyname: &::windows::core::HSTRING, propertyinfo: &super::AnimationPropertyInfo) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).PopulatePropertyInfo)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(propertyname), propertyinfo.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).PopulatePropertyInfo)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(propertyname), ::core::mem::transmute_copy(propertyinfo)).ok() } } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] @@ -4154,12 +4034,9 @@ impl InteractionTrackerVector2InertiaModifier { (::windows::core::Vtable::vtable(this).ImplicitAnimations)(::windows::core::Vtable::as_raw(this), result__.as_mut_ptr()).from_abi::(result__) } } - pub fn SetImplicitAnimations<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::ImplicitAnimationCollection>>, - { + pub fn SetImplicitAnimations(&self, value: &super::ImplicitAnimationCollection) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).SetImplicitAnimations)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetImplicitAnimations)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } pub fn StartAnimationGroup<'a, P0, E0>(&self, value: P0) -> ::windows::core::Result<()> where @@ -4318,12 +4195,9 @@ unsafe impl ::core::marker::Sync for InteractionTrackerVector2InertiaModifier {} #[repr(transparent)] pub struct InteractionTrackerVector2InertiaNaturalMotion(::windows::core::IUnknown); impl InteractionTrackerVector2InertiaNaturalMotion { - pub fn PopulatePropertyInfo<'a, P0>(&self, propertyname: &::windows::core::HSTRING, propertyinfo: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::AnimationPropertyInfo>>, - { + pub fn PopulatePropertyInfo(&self, propertyname: &::windows::core::HSTRING, propertyinfo: &super::AnimationPropertyInfo) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).PopulatePropertyInfo)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(propertyname), propertyinfo.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).PopulatePropertyInfo)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(propertyname), ::core::mem::transmute_copy(propertyinfo)).ok() } } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] @@ -4383,12 +4257,9 @@ impl InteractionTrackerVector2InertiaNaturalMotion { (::windows::core::Vtable::vtable(this).ImplicitAnimations)(::windows::core::Vtable::as_raw(this), result__.as_mut_ptr()).from_abi::(result__) } } - pub fn SetImplicitAnimations<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::ImplicitAnimationCollection>>, - { + pub fn SetImplicitAnimations(&self, value: &super::ImplicitAnimationCollection) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).SetImplicitAnimations)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetImplicitAnimations)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } pub fn StartAnimationGroup<'a, P0, E0>(&self, value: P0) -> ::windows::core::Result<()> where @@ -4429,12 +4300,9 @@ impl InteractionTrackerVector2InertiaNaturalMotion { (::windows::core::Vtable::vtable(this).Condition)(::windows::core::Vtable::as_raw(this), result__.as_mut_ptr()).from_abi::(result__) } } - pub fn SetCondition<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::ExpressionAnimation>>, - { + pub fn SetCondition(&self, value: &super::ExpressionAnimation) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).SetCondition)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetCondition)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } pub fn NaturalMotion(&self) -> ::windows::core::Result { let this = self; @@ -4450,13 +4318,10 @@ impl InteractionTrackerVector2InertiaNaturalMotion { let this = self; unsafe { (::windows::core::Vtable::vtable(this).SetNaturalMotion)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } } - pub fn Create<'a, P0>(compositor: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::Compositor>>, - { + pub fn Create(compositor: &super::Compositor) -> ::windows::core::Result { Self::IInteractionTrackerVector2InertiaNaturalMotionStatics(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).Create)(::windows::core::Vtable::as_raw(this), compositor.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).Create)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(compositor), result__.as_mut_ptr()).from_abi::(result__) }) } #[doc(hidden)] @@ -4604,12 +4469,9 @@ unsafe impl ::core::marker::Sync for InteractionTrackerVector2InertiaNaturalMoti #[repr(transparent)] pub struct VisualInteractionSource(::windows::core::IUnknown); impl VisualInteractionSource { - pub fn PopulatePropertyInfo<'a, P0>(&self, propertyname: &::windows::core::HSTRING, propertyinfo: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::AnimationPropertyInfo>>, - { + pub fn PopulatePropertyInfo(&self, propertyname: &::windows::core::HSTRING, propertyinfo: &super::AnimationPropertyInfo) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).PopulatePropertyInfo)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(propertyname), propertyinfo.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).PopulatePropertyInfo)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(propertyname), ::core::mem::transmute_copy(propertyinfo)).ok() } } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] @@ -4669,12 +4531,9 @@ impl VisualInteractionSource { (::windows::core::Vtable::vtable(this).ImplicitAnimations)(::windows::core::Vtable::as_raw(this), result__.as_mut_ptr()).from_abi::(result__) } } - pub fn SetImplicitAnimations<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::ImplicitAnimationCollection>>, - { + pub fn SetImplicitAnimations(&self, value: &super::ImplicitAnimationCollection) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).SetImplicitAnimations)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetImplicitAnimations)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } pub fn StartAnimationGroup<'a, P0, E0>(&self, value: P0) -> ::windows::core::Result<()> where @@ -4816,12 +4675,9 @@ impl VisualInteractionSource { } #[doc = "*Required features: `\"UI_Input\"`*"] #[cfg(feature = "UI_Input")] - pub fn TryRedirectForManipulation<'a, P0>(&self, pointerpoint: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Input::PointerPoint>>, - { + pub fn TryRedirectForManipulation(&self, pointerpoint: &super::super::Input::PointerPoint) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).TryRedirectForManipulation)(::windows::core::Vtable::as_raw(this), pointerpoint.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).TryRedirectForManipulation)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(pointerpoint)).ok() } } #[doc = "*Required features: `\"Foundation_Numerics\"`*"] #[cfg(feature = "Foundation_Numerics")] diff --git a/crates/libs/windows/src/Windows/UI/Composition/Scenes/mod.rs b/crates/libs/windows/src/Windows/UI/Composition/Scenes/mod.rs index 3b67e60d04..7cc91b6c2a 100644 --- a/crates/libs/windows/src/Windows/UI/Composition/Scenes/mod.rs +++ b/crates/libs/windows/src/Windows/UI/Composition/Scenes/mod.rs @@ -550,12 +550,9 @@ pub struct ISceneVisualStatics_Vtbl { #[repr(transparent)] pub struct SceneBoundingBox(::windows::core::IUnknown); impl SceneBoundingBox { - pub fn PopulatePropertyInfo<'a, P0>(&self, propertyname: &::windows::core::HSTRING, propertyinfo: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::AnimationPropertyInfo>>, - { + pub fn PopulatePropertyInfo(&self, propertyname: &::windows::core::HSTRING, propertyinfo: &super::AnimationPropertyInfo) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).PopulatePropertyInfo)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(propertyname), propertyinfo.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).PopulatePropertyInfo)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(propertyname), ::core::mem::transmute_copy(propertyinfo)).ok() } } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] @@ -615,12 +612,9 @@ impl SceneBoundingBox { (::windows::core::Vtable::vtable(this).ImplicitAnimations)(::windows::core::Vtable::as_raw(this), result__.as_mut_ptr()).from_abi::(result__) } } - pub fn SetImplicitAnimations<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::ImplicitAnimationCollection>>, - { + pub fn SetImplicitAnimations(&self, value: &super::ImplicitAnimationCollection) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).SetImplicitAnimations)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetImplicitAnimations)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } pub fn StartAnimationGroup<'a, P0, E0>(&self, value: P0) -> ::windows::core::Result<()> where @@ -839,12 +833,9 @@ unsafe impl ::core::marker::Sync for SceneBoundingBox {} #[repr(transparent)] pub struct SceneComponent(::windows::core::IUnknown); impl SceneComponent { - pub fn PopulatePropertyInfo<'a, P0>(&self, propertyname: &::windows::core::HSTRING, propertyinfo: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::AnimationPropertyInfo>>, - { + pub fn PopulatePropertyInfo(&self, propertyname: &::windows::core::HSTRING, propertyinfo: &super::AnimationPropertyInfo) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).PopulatePropertyInfo)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(propertyname), propertyinfo.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).PopulatePropertyInfo)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(propertyname), ::core::mem::transmute_copy(propertyinfo)).ok() } } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] @@ -904,12 +895,9 @@ impl SceneComponent { (::windows::core::Vtable::vtable(this).ImplicitAnimations)(::windows::core::Vtable::as_raw(this), result__.as_mut_ptr()).from_abi::(result__) } } - pub fn SetImplicitAnimations<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::ImplicitAnimationCollection>>, - { + pub fn SetImplicitAnimations(&self, value: &super::ImplicitAnimationCollection) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).SetImplicitAnimations)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetImplicitAnimations)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } pub fn StartAnimationGroup<'a, P0, E0>(&self, value: P0) -> ::windows::core::Result<()> where @@ -1092,12 +1080,9 @@ unsafe impl ::core::marker::Sync for SceneComponent {} pub struct SceneComponentCollection(::windows::core::IUnknown); #[cfg(feature = "Foundation_Collections")] impl SceneComponentCollection { - pub fn PopulatePropertyInfo<'a, P0>(&self, propertyname: &::windows::core::HSTRING, propertyinfo: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::AnimationPropertyInfo>>, - { + pub fn PopulatePropertyInfo(&self, propertyname: &::windows::core::HSTRING, propertyinfo: &super::AnimationPropertyInfo) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).PopulatePropertyInfo)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(propertyname), propertyinfo.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).PopulatePropertyInfo)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(propertyname), ::core::mem::transmute_copy(propertyinfo)).ok() } } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] @@ -1157,12 +1142,9 @@ impl SceneComponentCollection { (::windows::core::Vtable::vtable(this).ImplicitAnimations)(::windows::core::Vtable::as_raw(this), result__.as_mut_ptr()).from_abi::(result__) } } - pub fn SetImplicitAnimations<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::ImplicitAnimationCollection>>, - { + pub fn SetImplicitAnimations(&self, value: &super::ImplicitAnimationCollection) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).SetImplicitAnimations)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetImplicitAnimations)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } pub fn StartAnimationGroup<'a, P0, E0>(&self, value: P0) -> ::windows::core::Result<()> where @@ -1529,12 +1511,9 @@ unsafe impl ::core::marker::Sync for SceneComponentCollection {} #[repr(transparent)] pub struct SceneMaterial(::windows::core::IUnknown); impl SceneMaterial { - pub fn PopulatePropertyInfo<'a, P0>(&self, propertyname: &::windows::core::HSTRING, propertyinfo: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::AnimationPropertyInfo>>, - { + pub fn PopulatePropertyInfo(&self, propertyname: &::windows::core::HSTRING, propertyinfo: &super::AnimationPropertyInfo) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).PopulatePropertyInfo)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(propertyname), propertyinfo.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).PopulatePropertyInfo)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(propertyname), ::core::mem::transmute_copy(propertyinfo)).ok() } } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] @@ -1594,12 +1573,9 @@ impl SceneMaterial { (::windows::core::Vtable::vtable(this).ImplicitAnimations)(::windows::core::Vtable::as_raw(this), result__.as_mut_ptr()).from_abi::(result__) } } - pub fn SetImplicitAnimations<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::ImplicitAnimationCollection>>, - { + pub fn SetImplicitAnimations(&self, value: &super::ImplicitAnimationCollection) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).SetImplicitAnimations)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetImplicitAnimations)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } pub fn StartAnimationGroup<'a, P0, E0>(&self, value: P0) -> ::windows::core::Result<()> where @@ -1773,12 +1749,9 @@ unsafe impl ::core::marker::Sync for SceneMaterial {} #[repr(transparent)] pub struct SceneMaterialInput(::windows::core::IUnknown); impl SceneMaterialInput { - pub fn PopulatePropertyInfo<'a, P0>(&self, propertyname: &::windows::core::HSTRING, propertyinfo: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::AnimationPropertyInfo>>, - { + pub fn PopulatePropertyInfo(&self, propertyname: &::windows::core::HSTRING, propertyinfo: &super::AnimationPropertyInfo) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).PopulatePropertyInfo)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(propertyname), propertyinfo.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).PopulatePropertyInfo)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(propertyname), ::core::mem::transmute_copy(propertyinfo)).ok() } } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] @@ -1838,12 +1811,9 @@ impl SceneMaterialInput { (::windows::core::Vtable::vtable(this).ImplicitAnimations)(::windows::core::Vtable::as_raw(this), result__.as_mut_ptr()).from_abi::(result__) } } - pub fn SetImplicitAnimations<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::ImplicitAnimationCollection>>, - { + pub fn SetImplicitAnimations(&self, value: &super::ImplicitAnimationCollection) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).SetImplicitAnimations)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetImplicitAnimations)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } pub fn StartAnimationGroup<'a, P0, E0>(&self, value: P0) -> ::windows::core::Result<()> where @@ -2017,12 +1987,9 @@ unsafe impl ::core::marker::Sync for SceneMaterialInput {} #[repr(transparent)] pub struct SceneMesh(::windows::core::IUnknown); impl SceneMesh { - pub fn PopulatePropertyInfo<'a, P0>(&self, propertyname: &::windows::core::HSTRING, propertyinfo: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::AnimationPropertyInfo>>, - { + pub fn PopulatePropertyInfo(&self, propertyname: &::windows::core::HSTRING, propertyinfo: &super::AnimationPropertyInfo) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).PopulatePropertyInfo)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(propertyname), propertyinfo.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).PopulatePropertyInfo)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(propertyname), ::core::mem::transmute_copy(propertyinfo)).ok() } } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] @@ -2082,12 +2049,9 @@ impl SceneMesh { (::windows::core::Vtable::vtable(this).ImplicitAnimations)(::windows::core::Vtable::as_raw(this), result__.as_mut_ptr()).from_abi::(result__) } } - pub fn SetImplicitAnimations<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::ImplicitAnimationCollection>>, - { + pub fn SetImplicitAnimations(&self, value: &super::ImplicitAnimationCollection) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).SetImplicitAnimations)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetImplicitAnimations)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } pub fn StartAnimationGroup<'a, P0, E0>(&self, value: P0) -> ::windows::core::Result<()> where @@ -2145,20 +2109,14 @@ impl SceneMesh { } #[doc = "*Required features: `\"Foundation\"`, `\"Graphics_DirectX\"`*"] #[cfg(all(feature = "Foundation", feature = "Graphics_DirectX"))] - pub fn FillMeshAttribute<'a, P0>(&self, semantic: SceneAttributeSemantic, format: super::super::super::Graphics::DirectX::DirectXPixelFormat, memory: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Foundation::MemoryBuffer>>, - { + pub fn FillMeshAttribute(&self, semantic: SceneAttributeSemantic, format: super::super::super::Graphics::DirectX::DirectXPixelFormat, memory: &super::super::super::Foundation::MemoryBuffer) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).FillMeshAttribute)(::windows::core::Vtable::as_raw(this), semantic, format, memory.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).FillMeshAttribute)(::windows::core::Vtable::as_raw(this), semantic, format, ::core::mem::transmute_copy(memory)).ok() } } - pub fn Create<'a, P0>(compositor: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::Compositor>>, - { + pub fn Create(compositor: &super::Compositor) -> ::windows::core::Result { Self::ISceneMeshStatics(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).Create)(::windows::core::Vtable::as_raw(this), compositor.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).Create)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(compositor), result__.as_mut_ptr()).from_abi::(result__) }) } #[doc(hidden)] @@ -2306,12 +2264,9 @@ unsafe impl ::core::marker::Sync for SceneMesh {} #[repr(transparent)] pub struct SceneMeshMaterialAttributeMap(::windows::core::IUnknown); impl SceneMeshMaterialAttributeMap { - pub fn PopulatePropertyInfo<'a, P0>(&self, propertyname: &::windows::core::HSTRING, propertyinfo: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::AnimationPropertyInfo>>, - { + pub fn PopulatePropertyInfo(&self, propertyname: &::windows::core::HSTRING, propertyinfo: &super::AnimationPropertyInfo) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).PopulatePropertyInfo)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(propertyname), propertyinfo.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).PopulatePropertyInfo)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(propertyname), ::core::mem::transmute_copy(propertyinfo)).ok() } } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] @@ -2371,12 +2326,9 @@ impl SceneMeshMaterialAttributeMap { (::windows::core::Vtable::vtable(this).ImplicitAnimations)(::windows::core::Vtable::as_raw(this), result__.as_mut_ptr()).from_abi::(result__) } } - pub fn SetImplicitAnimations<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::ImplicitAnimationCollection>>, - { + pub fn SetImplicitAnimations(&self, value: &super::ImplicitAnimationCollection) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).SetImplicitAnimations)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetImplicitAnimations)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } pub fn StartAnimationGroup<'a, P0, E0>(&self, value: P0) -> ::windows::core::Result<()> where @@ -2676,12 +2628,9 @@ unsafe impl ::core::marker::Sync for SceneMeshMaterialAttributeMap {} #[repr(transparent)] pub struct SceneMeshRendererComponent(::windows::core::IUnknown); impl SceneMeshRendererComponent { - pub fn PopulatePropertyInfo<'a, P0>(&self, propertyname: &::windows::core::HSTRING, propertyinfo: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::AnimationPropertyInfo>>, - { + pub fn PopulatePropertyInfo(&self, propertyname: &::windows::core::HSTRING, propertyinfo: &super::AnimationPropertyInfo) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).PopulatePropertyInfo)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(propertyname), propertyinfo.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).PopulatePropertyInfo)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(propertyname), ::core::mem::transmute_copy(propertyinfo)).ok() } } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] @@ -2741,12 +2690,9 @@ impl SceneMeshRendererComponent { (::windows::core::Vtable::vtable(this).ImplicitAnimations)(::windows::core::Vtable::as_raw(this), result__.as_mut_ptr()).from_abi::(result__) } } - pub fn SetImplicitAnimations<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::ImplicitAnimationCollection>>, - { + pub fn SetImplicitAnimations(&self, value: &super::ImplicitAnimationCollection) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).SetImplicitAnimations)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetImplicitAnimations)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } pub fn StartAnimationGroup<'a, P0, E0>(&self, value: P0) -> ::windows::core::Result<()> where @@ -2808,12 +2754,9 @@ impl SceneMeshRendererComponent { (::windows::core::Vtable::vtable(this).Mesh)(::windows::core::Vtable::as_raw(this), result__.as_mut_ptr()).from_abi::(result__) } } - pub fn SetMesh<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, SceneMesh>>, - { + pub fn SetMesh(&self, value: &SceneMesh) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).SetMesh)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetMesh)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } pub fn UVMappings(&self) -> ::windows::core::Result { let this = self; @@ -2822,13 +2765,10 @@ impl SceneMeshRendererComponent { (::windows::core::Vtable::vtable(this).UVMappings)(::windows::core::Vtable::as_raw(this), result__.as_mut_ptr()).from_abi::(result__) } } - pub fn Create<'a, P0>(compositor: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::Compositor>>, - { + pub fn Create(compositor: &super::Compositor) -> ::windows::core::Result { Self::ISceneMeshRendererComponentStatics(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).Create)(::windows::core::Vtable::as_raw(this), compositor.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).Create)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(compositor), result__.as_mut_ptr()).from_abi::(result__) }) } #[doc(hidden)] @@ -3006,12 +2946,9 @@ unsafe impl ::core::marker::Sync for SceneMeshRendererComponent {} #[repr(transparent)] pub struct SceneMetallicRoughnessMaterial(::windows::core::IUnknown); impl SceneMetallicRoughnessMaterial { - pub fn PopulatePropertyInfo<'a, P0>(&self, propertyname: &::windows::core::HSTRING, propertyinfo: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::AnimationPropertyInfo>>, - { + pub fn PopulatePropertyInfo(&self, propertyname: &::windows::core::HSTRING, propertyinfo: &super::AnimationPropertyInfo) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).PopulatePropertyInfo)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(propertyname), propertyinfo.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).PopulatePropertyInfo)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(propertyname), ::core::mem::transmute_copy(propertyinfo)).ok() } } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] @@ -3071,12 +3008,9 @@ impl SceneMetallicRoughnessMaterial { (::windows::core::Vtable::vtable(this).ImplicitAnimations)(::windows::core::Vtable::as_raw(this), result__.as_mut_ptr()).from_abi::(result__) } } - pub fn SetImplicitAnimations<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::ImplicitAnimationCollection>>, - { + pub fn SetImplicitAnimations(&self, value: &super::ImplicitAnimationCollection) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).SetImplicitAnimations)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetImplicitAnimations)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } pub fn StartAnimationGroup<'a, P0, E0>(&self, value: P0) -> ::windows::core::Result<()> where @@ -3175,13 +3109,10 @@ impl SceneMetallicRoughnessMaterial { let this = self; unsafe { (::windows::core::Vtable::vtable(this).SetRoughnessFactor)(::windows::core::Vtable::as_raw(this), value).ok() } } - pub fn Create<'a, P0>(compositor: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::Compositor>>, - { + pub fn Create(compositor: &super::Compositor) -> ::windows::core::Result { Self::ISceneMetallicRoughnessMaterialStatics(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).Create)(::windows::core::Vtable::as_raw(this), compositor.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).Create)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(compositor), result__.as_mut_ptr()).from_abi::(result__) }) } pub fn AlphaCutoff(&self) -> ::windows::core::Result { @@ -3471,12 +3402,9 @@ unsafe impl ::core::marker::Sync for SceneMetallicRoughnessMaterial {} #[repr(transparent)] pub struct SceneModelTransform(::windows::core::IUnknown); impl SceneModelTransform { - pub fn PopulatePropertyInfo<'a, P0>(&self, propertyname: &::windows::core::HSTRING, propertyinfo: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::AnimationPropertyInfo>>, - { + pub fn PopulatePropertyInfo(&self, propertyname: &::windows::core::HSTRING, propertyinfo: &super::AnimationPropertyInfo) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).PopulatePropertyInfo)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(propertyname), propertyinfo.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).PopulatePropertyInfo)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(propertyname), ::core::mem::transmute_copy(propertyinfo)).ok() } } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] @@ -3536,12 +3464,9 @@ impl SceneModelTransform { (::windows::core::Vtable::vtable(this).ImplicitAnimations)(::windows::core::Vtable::as_raw(this), result__.as_mut_ptr()).from_abi::(result__) } } - pub fn SetImplicitAnimations<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::ImplicitAnimationCollection>>, - { + pub fn SetImplicitAnimations(&self, value: &super::ImplicitAnimationCollection) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).SetImplicitAnimations)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetImplicitAnimations)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } pub fn StartAnimationGroup<'a, P0, E0>(&self, value: P0) -> ::windows::core::Result<()> where @@ -3797,12 +3722,9 @@ unsafe impl ::core::marker::Sync for SceneModelTransform {} #[repr(transparent)] pub struct SceneNode(::windows::core::IUnknown); impl SceneNode { - pub fn PopulatePropertyInfo<'a, P0>(&self, propertyname: &::windows::core::HSTRING, propertyinfo: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::AnimationPropertyInfo>>, - { + pub fn PopulatePropertyInfo(&self, propertyname: &::windows::core::HSTRING, propertyinfo: &super::AnimationPropertyInfo) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).PopulatePropertyInfo)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(propertyname), propertyinfo.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).PopulatePropertyInfo)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(propertyname), ::core::mem::transmute_copy(propertyinfo)).ok() } } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] @@ -3862,12 +3784,9 @@ impl SceneNode { (::windows::core::Vtable::vtable(this).ImplicitAnimations)(::windows::core::Vtable::as_raw(this), result__.as_mut_ptr()).from_abi::(result__) } } - pub fn SetImplicitAnimations<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::ImplicitAnimationCollection>>, - { + pub fn SetImplicitAnimations(&self, value: &super::ImplicitAnimationCollection) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).SetImplicitAnimations)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetImplicitAnimations)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } pub fn StartAnimationGroup<'a, P0, E0>(&self, value: P0) -> ::windows::core::Result<()> where @@ -3940,13 +3859,10 @@ impl SceneNode { (::windows::core::Vtable::vtable(this).FindFirstComponentOfType)(::windows::core::Vtable::as_raw(this), value, result__.as_mut_ptr()).from_abi::(result__) } } - pub fn Create<'a, P0>(compositor: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::Compositor>>, - { + pub fn Create(compositor: &super::Compositor) -> ::windows::core::Result { Self::ISceneNodeStatics(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).Create)(::windows::core::Vtable::as_raw(this), compositor.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).Create)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(compositor), result__.as_mut_ptr()).from_abi::(result__) }) } #[doc(hidden)] @@ -4096,12 +4012,9 @@ unsafe impl ::core::marker::Sync for SceneNode {} pub struct SceneNodeCollection(::windows::core::IUnknown); #[cfg(feature = "Foundation_Collections")] impl SceneNodeCollection { - pub fn PopulatePropertyInfo<'a, P0>(&self, propertyname: &::windows::core::HSTRING, propertyinfo: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::AnimationPropertyInfo>>, - { + pub fn PopulatePropertyInfo(&self, propertyname: &::windows::core::HSTRING, propertyinfo: &super::AnimationPropertyInfo) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).PopulatePropertyInfo)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(propertyname), propertyinfo.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).PopulatePropertyInfo)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(propertyname), ::core::mem::transmute_copy(propertyinfo)).ok() } } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] @@ -4161,12 +4074,9 @@ impl SceneNodeCollection { (::windows::core::Vtable::vtable(this).ImplicitAnimations)(::windows::core::Vtable::as_raw(this), result__.as_mut_ptr()).from_abi::(result__) } } - pub fn SetImplicitAnimations<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::ImplicitAnimationCollection>>, - { + pub fn SetImplicitAnimations(&self, value: &super::ImplicitAnimationCollection) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).SetImplicitAnimations)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetImplicitAnimations)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } pub fn StartAnimationGroup<'a, P0, E0>(&self, value: P0) -> ::windows::core::Result<()> where @@ -4238,33 +4148,24 @@ impl SceneNodeCollection { } #[doc = "*Required features: `\"Foundation_Collections\"`*"] #[cfg(feature = "Foundation_Collections")] - pub fn IndexOf<'a, P0>(&self, value: P0, index: &mut u32) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, SceneNode>>, - { + pub fn IndexOf(&self, value: &SceneNode, index: &mut u32) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).IndexOf)(::windows::core::Vtable::as_raw(this), value.into().abi(), index, result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).IndexOf)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value), index, result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation_Collections\"`*"] #[cfg(feature = "Foundation_Collections")] - pub fn SetAt<'a, P0>(&self, index: u32, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, SceneNode>>, - { + pub fn SetAt(&self, index: u32, value: &SceneNode) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).SetAt)(::windows::core::Vtable::as_raw(this), index, value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetAt)(::windows::core::Vtable::as_raw(this), index, ::core::mem::transmute_copy(value)).ok() } } #[doc = "*Required features: `\"Foundation_Collections\"`*"] #[cfg(feature = "Foundation_Collections")] - pub fn InsertAt<'a, P0>(&self, index: u32, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, SceneNode>>, - { + pub fn InsertAt(&self, index: u32, value: &SceneNode) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).InsertAt)(::windows::core::Vtable::as_raw(this), index, value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).InsertAt)(::windows::core::Vtable::as_raw(this), index, ::core::mem::transmute_copy(value)).ok() } } #[doc = "*Required features: `\"Foundation_Collections\"`*"] #[cfg(feature = "Foundation_Collections")] @@ -4274,12 +4175,9 @@ impl SceneNodeCollection { } #[doc = "*Required features: `\"Foundation_Collections\"`*"] #[cfg(feature = "Foundation_Collections")] - pub fn Append<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, SceneNode>>, - { + pub fn Append(&self, value: &SceneNode) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).Append)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).Append)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } #[doc = "*Required features: `\"Foundation_Collections\"`*"] #[cfg(feature = "Foundation_Collections")] @@ -4533,12 +4431,9 @@ unsafe impl ::core::marker::Sync for SceneNodeCollection {} #[repr(transparent)] pub struct SceneObject(::windows::core::IUnknown); impl SceneObject { - pub fn PopulatePropertyInfo<'a, P0>(&self, propertyname: &::windows::core::HSTRING, propertyinfo: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::AnimationPropertyInfo>>, - { + pub fn PopulatePropertyInfo(&self, propertyname: &::windows::core::HSTRING, propertyinfo: &super::AnimationPropertyInfo) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).PopulatePropertyInfo)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(propertyname), propertyinfo.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).PopulatePropertyInfo)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(propertyname), ::core::mem::transmute_copy(propertyinfo)).ok() } } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] @@ -4598,12 +4493,9 @@ impl SceneObject { (::windows::core::Vtable::vtable(this).ImplicitAnimations)(::windows::core::Vtable::as_raw(this), result__.as_mut_ptr()).from_abi::(result__) } } - pub fn SetImplicitAnimations<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::ImplicitAnimationCollection>>, - { + pub fn SetImplicitAnimations(&self, value: &super::ImplicitAnimationCollection) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).SetImplicitAnimations)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetImplicitAnimations)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } pub fn StartAnimationGroup<'a, P0, E0>(&self, value: P0) -> ::windows::core::Result<()> where @@ -4762,12 +4654,9 @@ unsafe impl ::core::marker::Sync for SceneObject {} #[repr(transparent)] pub struct ScenePbrMaterial(::windows::core::IUnknown); impl ScenePbrMaterial { - pub fn PopulatePropertyInfo<'a, P0>(&self, propertyname: &::windows::core::HSTRING, propertyinfo: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::AnimationPropertyInfo>>, - { + pub fn PopulatePropertyInfo(&self, propertyname: &::windows::core::HSTRING, propertyinfo: &super::AnimationPropertyInfo) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).PopulatePropertyInfo)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(propertyname), propertyinfo.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).PopulatePropertyInfo)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(propertyname), ::core::mem::transmute_copy(propertyinfo)).ok() } } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] @@ -4827,12 +4716,9 @@ impl ScenePbrMaterial { (::windows::core::Vtable::vtable(this).ImplicitAnimations)(::windows::core::Vtable::as_raw(this), result__.as_mut_ptr()).from_abi::(result__) } } - pub fn SetImplicitAnimations<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::ImplicitAnimationCollection>>, - { + pub fn SetImplicitAnimations(&self, value: &super::ImplicitAnimationCollection) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).SetImplicitAnimations)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetImplicitAnimations)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } pub fn StartAnimationGroup<'a, P0, E0>(&self, value: P0) -> ::windows::core::Result<()> where @@ -5133,12 +5019,9 @@ unsafe impl ::core::marker::Sync for ScenePbrMaterial {} #[repr(transparent)] pub struct SceneRendererComponent(::windows::core::IUnknown); impl SceneRendererComponent { - pub fn PopulatePropertyInfo<'a, P0>(&self, propertyname: &::windows::core::HSTRING, propertyinfo: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::AnimationPropertyInfo>>, - { + pub fn PopulatePropertyInfo(&self, propertyname: &::windows::core::HSTRING, propertyinfo: &super::AnimationPropertyInfo) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).PopulatePropertyInfo)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(propertyname), propertyinfo.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).PopulatePropertyInfo)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(propertyname), ::core::mem::transmute_copy(propertyinfo)).ok() } } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] @@ -5198,12 +5081,9 @@ impl SceneRendererComponent { (::windows::core::Vtable::vtable(this).ImplicitAnimations)(::windows::core::Vtable::as_raw(this), result__.as_mut_ptr()).from_abi::(result__) } } - pub fn SetImplicitAnimations<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::ImplicitAnimationCollection>>, - { + pub fn SetImplicitAnimations(&self, value: &super::ImplicitAnimationCollection) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).SetImplicitAnimations)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetImplicitAnimations)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } pub fn StartAnimationGroup<'a, P0, E0>(&self, value: P0) -> ::windows::core::Result<()> where @@ -5399,12 +5279,9 @@ unsafe impl ::core::marker::Sync for SceneRendererComponent {} #[repr(transparent)] pub struct SceneSurfaceMaterialInput(::windows::core::IUnknown); impl SceneSurfaceMaterialInput { - pub fn PopulatePropertyInfo<'a, P0>(&self, propertyname: &::windows::core::HSTRING, propertyinfo: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::AnimationPropertyInfo>>, - { + pub fn PopulatePropertyInfo(&self, propertyname: &::windows::core::HSTRING, propertyinfo: &super::AnimationPropertyInfo) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).PopulatePropertyInfo)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(propertyname), propertyinfo.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).PopulatePropertyInfo)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(propertyname), ::core::mem::transmute_copy(propertyinfo)).ok() } } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] @@ -5464,12 +5341,9 @@ impl SceneSurfaceMaterialInput { (::windows::core::Vtable::vtable(this).ImplicitAnimations)(::windows::core::Vtable::as_raw(this), result__.as_mut_ptr()).from_abi::(result__) } } - pub fn SetImplicitAnimations<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::ImplicitAnimationCollection>>, - { + pub fn SetImplicitAnimations(&self, value: &super::ImplicitAnimationCollection) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).SetImplicitAnimations)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetImplicitAnimations)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } pub fn StartAnimationGroup<'a, P0, E0>(&self, value: P0) -> ::windows::core::Result<()> where @@ -5551,13 +5425,10 @@ impl SceneSurfaceMaterialInput { let this = self; unsafe { (::windows::core::Vtable::vtable(this).SetWrappingVMode)(::windows::core::Vtable::as_raw(this), value).ok() } } - pub fn Create<'a, P0>(compositor: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::Compositor>>, - { + pub fn Create(compositor: &super::Compositor) -> ::windows::core::Result { Self::ISceneSurfaceMaterialInputStatics(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).Create)(::windows::core::Vtable::as_raw(this), compositor.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).Create)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(compositor), result__.as_mut_ptr()).from_abi::(result__) }) } #[doc(hidden)] @@ -5720,12 +5591,9 @@ unsafe impl ::core::marker::Sync for SceneSurfaceMaterialInput {} #[repr(transparent)] pub struct SceneVisual(::windows::core::IUnknown); impl SceneVisual { - pub fn PopulatePropertyInfo<'a, P0>(&self, propertyname: &::windows::core::HSTRING, propertyinfo: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::AnimationPropertyInfo>>, - { + pub fn PopulatePropertyInfo(&self, propertyname: &::windows::core::HSTRING, propertyinfo: &super::AnimationPropertyInfo) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).PopulatePropertyInfo)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(propertyname), propertyinfo.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).PopulatePropertyInfo)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(propertyname), ::core::mem::transmute_copy(propertyinfo)).ok() } } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] @@ -5785,12 +5653,9 @@ impl SceneVisual { (::windows::core::Vtable::vtable(this).ImplicitAnimations)(::windows::core::Vtable::as_raw(this), result__.as_mut_ptr()).from_abi::(result__) } } - pub fn SetImplicitAnimations<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::ImplicitAnimationCollection>>, - { + pub fn SetImplicitAnimations(&self, value: &super::ImplicitAnimationCollection) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).SetImplicitAnimations)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetImplicitAnimations)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } pub fn StartAnimationGroup<'a, P0, E0>(&self, value: P0) -> ::windows::core::Result<()> where @@ -5838,20 +5703,14 @@ impl SceneVisual { (::windows::core::Vtable::vtable(this).Root)(::windows::core::Vtable::as_raw(this), result__.as_mut_ptr()).from_abi::(result__) } } - pub fn SetRoot<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, SceneNode>>, - { + pub fn SetRoot(&self, value: &SceneNode) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).SetRoot)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetRoot)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } - pub fn Create<'a, P0>(compositor: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::Compositor>>, - { + pub fn Create(compositor: &super::Compositor) -> ::windows::core::Result { Self::ISceneVisualStatics(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).Create)(::windows::core::Vtable::as_raw(this), compositor.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).Create)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(compositor), result__.as_mut_ptr()).from_abi::(result__) }) } #[doc = "*Required features: `\"Foundation_Numerics\"`*"] diff --git a/crates/libs/windows/src/Windows/UI/Composition/mod.rs b/crates/libs/windows/src/Windows/UI/Composition/mod.rs index f1c67f3373..39a9897713 100644 --- a/crates/libs/windows/src/Windows/UI/Composition/mod.rs +++ b/crates/libs/windows/src/Windows/UI/Composition/mod.rs @@ -84,12 +84,9 @@ pub struct IAnimationControllerStatics_Vtbl { #[repr(transparent)] pub struct IAnimationObject(::windows::core::IUnknown); impl IAnimationObject { - pub fn PopulatePropertyInfo<'a, P0>(&self, propertyname: &::windows::core::HSTRING, propertyinfo: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, AnimationPropertyInfo>>, - { + pub fn PopulatePropertyInfo(&self, propertyname: &::windows::core::HSTRING, propertyinfo: &AnimationPropertyInfo) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).PopulatePropertyInfo)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(propertyname), propertyinfo.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).PopulatePropertyInfo)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(propertyname), ::core::mem::transmute_copy(propertyinfo)).ok() } } } impl ::core::convert::From for ::windows::core::IUnknown { @@ -4319,12 +4316,9 @@ impl AmbientLight { let this = &::windows::core::Interface::cast::(self)?; unsafe { (::windows::core::Vtable::vtable(this).SetIntensity)(::windows::core::Vtable::as_raw(this), value).ok() } } - pub fn PopulatePropertyInfo<'a, P0>(&self, propertyname: &::windows::core::HSTRING, propertyinfo: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, AnimationPropertyInfo>>, - { + pub fn PopulatePropertyInfo(&self, propertyname: &::windows::core::HSTRING, propertyinfo: &AnimationPropertyInfo) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).PopulatePropertyInfo)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(propertyname), propertyinfo.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).PopulatePropertyInfo)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(propertyname), ::core::mem::transmute_copy(propertyinfo)).ok() } } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] @@ -4409,12 +4403,9 @@ impl AmbientLight { (::windows::core::Vtable::vtable(this).ImplicitAnimations)(::windows::core::Vtable::as_raw(this), result__.as_mut_ptr()).from_abi::(result__) } } - pub fn SetImplicitAnimations<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, ImplicitAnimationCollection>>, - { + pub fn SetImplicitAnimations(&self, value: &ImplicitAnimationCollection) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).SetImplicitAnimations)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetImplicitAnimations)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } pub fn StartAnimationGroup<'a, P0, E0>(&self, value: P0) -> ::windows::core::Result<()> where @@ -4641,12 +4632,9 @@ impl AnimationController { (::windows::core::Vtable::vtable(this).MinPlaybackRate)(::windows::core::Vtable::as_raw(this), result__.as_mut_ptr()).from_abi::(result__) }) } - pub fn PopulatePropertyInfo<'a, P0>(&self, propertyname: &::windows::core::HSTRING, propertyinfo: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, AnimationPropertyInfo>>, - { + pub fn PopulatePropertyInfo(&self, propertyname: &::windows::core::HSTRING, propertyinfo: &AnimationPropertyInfo) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).PopulatePropertyInfo)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(propertyname), propertyinfo.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).PopulatePropertyInfo)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(propertyname), ::core::mem::transmute_copy(propertyinfo)).ok() } } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] @@ -4706,12 +4694,9 @@ impl AnimationController { (::windows::core::Vtable::vtable(this).ImplicitAnimations)(::windows::core::Vtable::as_raw(this), result__.as_mut_ptr()).from_abi::(result__) } } - pub fn SetImplicitAnimations<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, ImplicitAnimationCollection>>, - { + pub fn SetImplicitAnimations(&self, value: &ImplicitAnimationCollection) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).SetImplicitAnimations)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetImplicitAnimations)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } pub fn StartAnimationGroup<'a, P0, E0>(&self, value: P0) -> ::windows::core::Result<()> where @@ -4875,12 +4860,9 @@ unsafe impl ::core::marker::Sync for AnimationController {} #[repr(transparent)] pub struct AnimationPropertyInfo(::windows::core::IUnknown); impl AnimationPropertyInfo { - pub fn PopulatePropertyInfo<'a, P0>(&self, propertyname: &::windows::core::HSTRING, propertyinfo: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, AnimationPropertyInfo>>, - { + pub fn PopulatePropertyInfo(&self, propertyname: &::windows::core::HSTRING, propertyinfo: &AnimationPropertyInfo) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).PopulatePropertyInfo)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(propertyname), propertyinfo.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).PopulatePropertyInfo)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(propertyname), ::core::mem::transmute_copy(propertyinfo)).ok() } } pub fn AccessMode(&self) -> ::windows::core::Result { let this = self; @@ -4965,12 +4947,9 @@ impl AnimationPropertyInfo { (::windows::core::Vtable::vtable(this).ImplicitAnimations)(::windows::core::Vtable::as_raw(this), result__.as_mut_ptr()).from_abi::(result__) } } - pub fn SetImplicitAnimations<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, ImplicitAnimationCollection>>, - { + pub fn SetImplicitAnimations(&self, value: &ImplicitAnimationCollection) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).SetImplicitAnimations)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetImplicitAnimations)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } pub fn StartAnimationGroup<'a, P0, E0>(&self, value: P0) -> ::windows::core::Result<()> where @@ -5129,12 +5108,9 @@ unsafe impl ::core::marker::Sync for AnimationPropertyInfo {} #[repr(transparent)] pub struct BackEasingFunction(::windows::core::IUnknown); impl BackEasingFunction { - pub fn PopulatePropertyInfo<'a, P0>(&self, propertyname: &::windows::core::HSTRING, propertyinfo: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, AnimationPropertyInfo>>, - { + pub fn PopulatePropertyInfo(&self, propertyname: &::windows::core::HSTRING, propertyinfo: &AnimationPropertyInfo) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).PopulatePropertyInfo)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(propertyname), propertyinfo.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).PopulatePropertyInfo)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(propertyname), ::core::mem::transmute_copy(propertyinfo)).ok() } } pub fn Mode(&self) -> ::windows::core::Result { let this = self; @@ -5208,12 +5184,9 @@ impl BackEasingFunction { (::windows::core::Vtable::vtable(this).ImplicitAnimations)(::windows::core::Vtable::as_raw(this), result__.as_mut_ptr()).from_abi::(result__) } } - pub fn SetImplicitAnimations<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, ImplicitAnimationCollection>>, - { + pub fn SetImplicitAnimations(&self, value: &ImplicitAnimationCollection) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).SetImplicitAnimations)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetImplicitAnimations)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } pub fn StartAnimationGroup<'a, P0, E0>(&self, value: P0) -> ::windows::core::Result<()> where @@ -5387,12 +5360,9 @@ unsafe impl ::core::marker::Sync for BackEasingFunction {} #[repr(transparent)] pub struct BooleanKeyFrameAnimation(::windows::core::IUnknown); impl BooleanKeyFrameAnimation { - pub fn PopulatePropertyInfo<'a, P0>(&self, propertyname: &::windows::core::HSTRING, propertyinfo: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, AnimationPropertyInfo>>, - { + pub fn PopulatePropertyInfo(&self, propertyname: &::windows::core::HSTRING, propertyinfo: &AnimationPropertyInfo) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).PopulatePropertyInfo)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(propertyname), propertyinfo.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).PopulatePropertyInfo)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(propertyname), ::core::mem::transmute_copy(propertyinfo)).ok() } } pub fn InsertKeyFrame(&self, normalizedprogresskey: f32, value: bool) -> ::windows::core::Result<()> { let this = self; @@ -5547,12 +5517,9 @@ impl BooleanKeyFrameAnimation { (::windows::core::Vtable::vtable(this).ImplicitAnimations)(::windows::core::Vtable::as_raw(this), result__.as_mut_ptr()).from_abi::(result__) } } - pub fn SetImplicitAnimations<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, ImplicitAnimationCollection>>, - { + pub fn SetImplicitAnimations(&self, value: &ImplicitAnimationCollection) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).SetImplicitAnimations)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetImplicitAnimations)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } pub fn StartAnimationGroup<'a, P0, E0>(&self, value: P0) -> ::windows::core::Result<()> where @@ -5863,12 +5830,9 @@ unsafe impl ::core::marker::Sync for BooleanKeyFrameAnimation {} #[repr(transparent)] pub struct BounceEasingFunction(::windows::core::IUnknown); impl BounceEasingFunction { - pub fn PopulatePropertyInfo<'a, P0>(&self, propertyname: &::windows::core::HSTRING, propertyinfo: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, AnimationPropertyInfo>>, - { + pub fn PopulatePropertyInfo(&self, propertyname: &::windows::core::HSTRING, propertyinfo: &AnimationPropertyInfo) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).PopulatePropertyInfo)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(propertyname), propertyinfo.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).PopulatePropertyInfo)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(propertyname), ::core::mem::transmute_copy(propertyinfo)).ok() } } pub fn Mode(&self) -> ::windows::core::Result { let this = self; @@ -5949,12 +5913,9 @@ impl BounceEasingFunction { (::windows::core::Vtable::vtable(this).ImplicitAnimations)(::windows::core::Vtable::as_raw(this), result__.as_mut_ptr()).from_abi::(result__) } } - pub fn SetImplicitAnimations<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, ImplicitAnimationCollection>>, - { + pub fn SetImplicitAnimations(&self, value: &ImplicitAnimationCollection) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).SetImplicitAnimations)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetImplicitAnimations)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } pub fn StartAnimationGroup<'a, P0, E0>(&self, value: P0) -> ::windows::core::Result<()> where @@ -6128,12 +6089,9 @@ unsafe impl ::core::marker::Sync for BounceEasingFunction {} #[repr(transparent)] pub struct BounceScalarNaturalMotionAnimation(::windows::core::IUnknown); impl BounceScalarNaturalMotionAnimation { - pub fn PopulatePropertyInfo<'a, P0>(&self, propertyname: &::windows::core::HSTRING, propertyinfo: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, AnimationPropertyInfo>>, - { + pub fn PopulatePropertyInfo(&self, propertyname: &::windows::core::HSTRING, propertyinfo: &AnimationPropertyInfo) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).PopulatePropertyInfo)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(propertyname), propertyinfo.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).PopulatePropertyInfo)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(propertyname), ::core::mem::transmute_copy(propertyinfo)).ok() } } pub fn Acceleration(&self) -> ::windows::core::Result { let this = self; @@ -6306,12 +6264,9 @@ impl BounceScalarNaturalMotionAnimation { (::windows::core::Vtable::vtable(this).ImplicitAnimations)(::windows::core::Vtable::as_raw(this), result__.as_mut_ptr()).from_abi::(result__) } } - pub fn SetImplicitAnimations<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, ImplicitAnimationCollection>>, - { + pub fn SetImplicitAnimations(&self, value: &ImplicitAnimationCollection) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).SetImplicitAnimations)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetImplicitAnimations)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } pub fn StartAnimationGroup<'a, P0, E0>(&self, value: P0) -> ::windows::core::Result<()> where @@ -6620,12 +6575,9 @@ unsafe impl ::core::marker::Sync for BounceScalarNaturalMotionAnimation {} #[repr(transparent)] pub struct BounceVector2NaturalMotionAnimation(::windows::core::IUnknown); impl BounceVector2NaturalMotionAnimation { - pub fn PopulatePropertyInfo<'a, P0>(&self, propertyname: &::windows::core::HSTRING, propertyinfo: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, AnimationPropertyInfo>>, - { + pub fn PopulatePropertyInfo(&self, propertyname: &::windows::core::HSTRING, propertyinfo: &AnimationPropertyInfo) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).PopulatePropertyInfo)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(propertyname), propertyinfo.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).PopulatePropertyInfo)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(propertyname), ::core::mem::transmute_copy(propertyinfo)).ok() } } pub fn Acceleration(&self) -> ::windows::core::Result { let this = self; @@ -6798,12 +6750,9 @@ impl BounceVector2NaturalMotionAnimation { (::windows::core::Vtable::vtable(this).ImplicitAnimations)(::windows::core::Vtable::as_raw(this), result__.as_mut_ptr()).from_abi::(result__) } } - pub fn SetImplicitAnimations<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, ImplicitAnimationCollection>>, - { + pub fn SetImplicitAnimations(&self, value: &ImplicitAnimationCollection) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).SetImplicitAnimations)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetImplicitAnimations)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } pub fn StartAnimationGroup<'a, P0, E0>(&self, value: P0) -> ::windows::core::Result<()> where @@ -7116,12 +7065,9 @@ unsafe impl ::core::marker::Sync for BounceVector2NaturalMotionAnimation {} #[repr(transparent)] pub struct BounceVector3NaturalMotionAnimation(::windows::core::IUnknown); impl BounceVector3NaturalMotionAnimation { - pub fn PopulatePropertyInfo<'a, P0>(&self, propertyname: &::windows::core::HSTRING, propertyinfo: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, AnimationPropertyInfo>>, - { + pub fn PopulatePropertyInfo(&self, propertyname: &::windows::core::HSTRING, propertyinfo: &AnimationPropertyInfo) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).PopulatePropertyInfo)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(propertyname), propertyinfo.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).PopulatePropertyInfo)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(propertyname), ::core::mem::transmute_copy(propertyinfo)).ok() } } pub fn Acceleration(&self) -> ::windows::core::Result { let this = self; @@ -7294,12 +7240,9 @@ impl BounceVector3NaturalMotionAnimation { (::windows::core::Vtable::vtable(this).ImplicitAnimations)(::windows::core::Vtable::as_raw(this), result__.as_mut_ptr()).from_abi::(result__) } } - pub fn SetImplicitAnimations<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, ImplicitAnimationCollection>>, - { + pub fn SetImplicitAnimations(&self, value: &ImplicitAnimationCollection) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).SetImplicitAnimations)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetImplicitAnimations)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } pub fn StartAnimationGroup<'a, P0, E0>(&self, value: P0) -> ::windows::core::Result<()> where @@ -7612,12 +7555,9 @@ unsafe impl ::core::marker::Sync for BounceVector3NaturalMotionAnimation {} #[repr(transparent)] pub struct CircleEasingFunction(::windows::core::IUnknown); impl CircleEasingFunction { - pub fn PopulatePropertyInfo<'a, P0>(&self, propertyname: &::windows::core::HSTRING, propertyinfo: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, AnimationPropertyInfo>>, - { + pub fn PopulatePropertyInfo(&self, propertyname: &::windows::core::HSTRING, propertyinfo: &AnimationPropertyInfo) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).PopulatePropertyInfo)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(propertyname), propertyinfo.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).PopulatePropertyInfo)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(propertyname), ::core::mem::transmute_copy(propertyinfo)).ok() } } pub fn Mode(&self) -> ::windows::core::Result { let this = self; @@ -7684,12 +7624,9 @@ impl CircleEasingFunction { (::windows::core::Vtable::vtable(this).ImplicitAnimations)(::windows::core::Vtable::as_raw(this), result__.as_mut_ptr()).from_abi::(result__) } } - pub fn SetImplicitAnimations<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, ImplicitAnimationCollection>>, - { + pub fn SetImplicitAnimations(&self, value: &ImplicitAnimationCollection) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).SetImplicitAnimations)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetImplicitAnimations)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } pub fn StartAnimationGroup<'a, P0, E0>(&self, value: P0) -> ::windows::core::Result<()> where @@ -7863,12 +7800,9 @@ unsafe impl ::core::marker::Sync for CircleEasingFunction {} #[repr(transparent)] pub struct ColorKeyFrameAnimation(::windows::core::IUnknown); impl ColorKeyFrameAnimation { - pub fn PopulatePropertyInfo<'a, P0>(&self, propertyname: &::windows::core::HSTRING, propertyinfo: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, AnimationPropertyInfo>>, - { + pub fn PopulatePropertyInfo(&self, propertyname: &::windows::core::HSTRING, propertyinfo: &AnimationPropertyInfo) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).PopulatePropertyInfo)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(propertyname), propertyinfo.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).PopulatePropertyInfo)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(propertyname), ::core::mem::transmute_copy(propertyinfo)).ok() } } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] @@ -8041,12 +7975,9 @@ impl ColorKeyFrameAnimation { (::windows::core::Vtable::vtable(this).ImplicitAnimations)(::windows::core::Vtable::as_raw(this), result__.as_mut_ptr()).from_abi::(result__) } } - pub fn SetImplicitAnimations<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, ImplicitAnimationCollection>>, - { + pub fn SetImplicitAnimations(&self, value: &ImplicitAnimationCollection) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).SetImplicitAnimations)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetImplicitAnimations)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } pub fn StartAnimationGroup<'a, P0, E0>(&self, value: P0) -> ::windows::core::Result<()> where @@ -8357,12 +8288,9 @@ unsafe impl ::core::marker::Sync for ColorKeyFrameAnimation {} #[repr(transparent)] pub struct CompositionAnimation(::windows::core::IUnknown); impl CompositionAnimation { - pub fn PopulatePropertyInfo<'a, P0>(&self, propertyname: &::windows::core::HSTRING, propertyinfo: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, AnimationPropertyInfo>>, - { + pub fn PopulatePropertyInfo(&self, propertyname: &::windows::core::HSTRING, propertyinfo: &AnimationPropertyInfo) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).PopulatePropertyInfo)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(propertyname), propertyinfo.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).PopulatePropertyInfo)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(propertyname), ::core::mem::transmute_copy(propertyinfo)).ok() } } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] @@ -8513,12 +8441,9 @@ impl CompositionAnimation { (::windows::core::Vtable::vtable(this).ImplicitAnimations)(::windows::core::Vtable::as_raw(this), result__.as_mut_ptr()).from_abi::(result__) } } - pub fn SetImplicitAnimations<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, ImplicitAnimationCollection>>, - { + pub fn SetImplicitAnimations(&self, value: &ImplicitAnimationCollection) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).SetImplicitAnimations)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetImplicitAnimations)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } pub fn StartAnimationGroup<'a, P0, E0>(&self, value: P0) -> ::windows::core::Result<()> where @@ -8696,12 +8621,9 @@ unsafe impl ::core::marker::Sync for CompositionAnimation {} #[repr(transparent)] pub struct CompositionAnimationGroup(::windows::core::IUnknown); impl CompositionAnimationGroup { - pub fn PopulatePropertyInfo<'a, P0>(&self, propertyname: &::windows::core::HSTRING, propertyinfo: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, AnimationPropertyInfo>>, - { + pub fn PopulatePropertyInfo(&self, propertyname: &::windows::core::HSTRING, propertyinfo: &AnimationPropertyInfo) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).PopulatePropertyInfo)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(propertyname), propertyinfo.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).PopulatePropertyInfo)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(propertyname), ::core::mem::transmute_copy(propertyinfo)).ok() } } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] @@ -8786,12 +8708,9 @@ impl CompositionAnimationGroup { (::windows::core::Vtable::vtable(this).ImplicitAnimations)(::windows::core::Vtable::as_raw(this), result__.as_mut_ptr()).from_abi::(result__) } } - pub fn SetImplicitAnimations<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, ImplicitAnimationCollection>>, - { + pub fn SetImplicitAnimations(&self, value: &ImplicitAnimationCollection) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).SetImplicitAnimations)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetImplicitAnimations)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } pub fn StartAnimationGroup<'a, P0, E0>(&self, value: P0) -> ::windows::core::Result<()> where @@ -9016,12 +8935,9 @@ unsafe impl ::core::marker::Sync for CompositionAnimationGroup {} #[repr(transparent)] pub struct CompositionBackdropBrush(::windows::core::IUnknown); impl CompositionBackdropBrush { - pub fn PopulatePropertyInfo<'a, P0>(&self, propertyname: &::windows::core::HSTRING, propertyinfo: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, AnimationPropertyInfo>>, - { + pub fn PopulatePropertyInfo(&self, propertyname: &::windows::core::HSTRING, propertyinfo: &AnimationPropertyInfo) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).PopulatePropertyInfo)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(propertyname), propertyinfo.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).PopulatePropertyInfo)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(propertyname), ::core::mem::transmute_copy(propertyinfo)).ok() } } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] @@ -9081,12 +8997,9 @@ impl CompositionBackdropBrush { (::windows::core::Vtable::vtable(this).ImplicitAnimations)(::windows::core::Vtable::as_raw(this), result__.as_mut_ptr()).from_abi::(result__) } } - pub fn SetImplicitAnimations<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, ImplicitAnimationCollection>>, - { + pub fn SetImplicitAnimations(&self, value: &ImplicitAnimationCollection) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).SetImplicitAnimations)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetImplicitAnimations)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } pub fn StartAnimationGroup<'a, P0, E0>(&self, value: P0) -> ::windows::core::Result<()> where @@ -9260,12 +9173,9 @@ unsafe impl ::core::marker::Sync for CompositionBackdropBrush {} #[repr(transparent)] pub struct CompositionBatchCompletedEventArgs(::windows::core::IUnknown); impl CompositionBatchCompletedEventArgs { - pub fn PopulatePropertyInfo<'a, P0>(&self, propertyname: &::windows::core::HSTRING, propertyinfo: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, AnimationPropertyInfo>>, - { + pub fn PopulatePropertyInfo(&self, propertyname: &::windows::core::HSTRING, propertyinfo: &AnimationPropertyInfo) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).PopulatePropertyInfo)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(propertyname), propertyinfo.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).PopulatePropertyInfo)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(propertyname), ::core::mem::transmute_copy(propertyinfo)).ok() } } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] @@ -9325,12 +9235,9 @@ impl CompositionBatchCompletedEventArgs { (::windows::core::Vtable::vtable(this).ImplicitAnimations)(::windows::core::Vtable::as_raw(this), result__.as_mut_ptr()).from_abi::(result__) } } - pub fn SetImplicitAnimations<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, ImplicitAnimationCollection>>, - { + pub fn SetImplicitAnimations(&self, value: &ImplicitAnimationCollection) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).SetImplicitAnimations)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetImplicitAnimations)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } pub fn StartAnimationGroup<'a, P0, E0>(&self, value: P0) -> ::windows::core::Result<()> where @@ -9489,12 +9396,9 @@ unsafe impl ::core::marker::Sync for CompositionBatchCompletedEventArgs {} #[repr(transparent)] pub struct CompositionBrush(::windows::core::IUnknown); impl CompositionBrush { - pub fn PopulatePropertyInfo<'a, P0>(&self, propertyname: &::windows::core::HSTRING, propertyinfo: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, AnimationPropertyInfo>>, - { + pub fn PopulatePropertyInfo(&self, propertyname: &::windows::core::HSTRING, propertyinfo: &AnimationPropertyInfo) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).PopulatePropertyInfo)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(propertyname), propertyinfo.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).PopulatePropertyInfo)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(propertyname), ::core::mem::transmute_copy(propertyinfo)).ok() } } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] @@ -9554,12 +9458,9 @@ impl CompositionBrush { (::windows::core::Vtable::vtable(this).ImplicitAnimations)(::windows::core::Vtable::as_raw(this), result__.as_mut_ptr()).from_abi::(result__) } } - pub fn SetImplicitAnimations<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, ImplicitAnimationCollection>>, - { + pub fn SetImplicitAnimations(&self, value: &ImplicitAnimationCollection) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).SetImplicitAnimations)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetImplicitAnimations)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } pub fn StartAnimationGroup<'a, P0, E0>(&self, value: P0) -> ::windows::core::Result<()> where @@ -9734,14 +9635,11 @@ impl CompositionCapabilities { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn Changed<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn Changed(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).Changed)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).Changed)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -9830,12 +9728,9 @@ unsafe impl ::core::marker::Sync for CompositionCapabilities {} #[repr(transparent)] pub struct CompositionClip(::windows::core::IUnknown); impl CompositionClip { - pub fn PopulatePropertyInfo<'a, P0>(&self, propertyname: &::windows::core::HSTRING, propertyinfo: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, AnimationPropertyInfo>>, - { + pub fn PopulatePropertyInfo(&self, propertyname: &::windows::core::HSTRING, propertyinfo: &AnimationPropertyInfo) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).PopulatePropertyInfo)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(propertyname), propertyinfo.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).PopulatePropertyInfo)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(propertyname), ::core::mem::transmute_copy(propertyinfo)).ok() } } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] @@ -9992,12 +9887,9 @@ impl CompositionClip { (::windows::core::Vtable::vtable(this).ImplicitAnimations)(::windows::core::Vtable::as_raw(this), result__.as_mut_ptr()).from_abi::(result__) } } - pub fn SetImplicitAnimations<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, ImplicitAnimationCollection>>, - { + pub fn SetImplicitAnimations(&self, value: &ImplicitAnimationCollection) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).SetImplicitAnimations)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetImplicitAnimations)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } pub fn StartAnimationGroup<'a, P0, E0>(&self, value: P0) -> ::windows::core::Result<()> where @@ -10156,12 +10048,9 @@ unsafe impl ::core::marker::Sync for CompositionClip {} #[repr(transparent)] pub struct CompositionColorBrush(::windows::core::IUnknown); impl CompositionColorBrush { - pub fn PopulatePropertyInfo<'a, P0>(&self, propertyname: &::windows::core::HSTRING, propertyinfo: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, AnimationPropertyInfo>>, - { + pub fn PopulatePropertyInfo(&self, propertyname: &::windows::core::HSTRING, propertyinfo: &AnimationPropertyInfo) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).PopulatePropertyInfo)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(propertyname), propertyinfo.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).PopulatePropertyInfo)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(propertyname), ::core::mem::transmute_copy(propertyinfo)).ok() } } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] @@ -10232,12 +10121,9 @@ impl CompositionColorBrush { (::windows::core::Vtable::vtable(this).ImplicitAnimations)(::windows::core::Vtable::as_raw(this), result__.as_mut_ptr()).from_abi::(result__) } } - pub fn SetImplicitAnimations<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, ImplicitAnimationCollection>>, - { + pub fn SetImplicitAnimations(&self, value: &ImplicitAnimationCollection) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).SetImplicitAnimations)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetImplicitAnimations)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } pub fn StartAnimationGroup<'a, P0, E0>(&self, value: P0) -> ::windows::core::Result<()> where @@ -10411,12 +10297,9 @@ unsafe impl ::core::marker::Sync for CompositionColorBrush {} #[repr(transparent)] pub struct CompositionColorGradientStop(::windows::core::IUnknown); impl CompositionColorGradientStop { - pub fn PopulatePropertyInfo<'a, P0>(&self, propertyname: &::windows::core::HSTRING, propertyinfo: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, AnimationPropertyInfo>>, - { + pub fn PopulatePropertyInfo(&self, propertyname: &::windows::core::HSTRING, propertyinfo: &AnimationPropertyInfo) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).PopulatePropertyInfo)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(propertyname), propertyinfo.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).PopulatePropertyInfo)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(propertyname), ::core::mem::transmute_copy(propertyinfo)).ok() } } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] @@ -10498,12 +10381,9 @@ impl CompositionColorGradientStop { (::windows::core::Vtable::vtable(this).ImplicitAnimations)(::windows::core::Vtable::as_raw(this), result__.as_mut_ptr()).from_abi::(result__) } } - pub fn SetImplicitAnimations<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, ImplicitAnimationCollection>>, - { + pub fn SetImplicitAnimations(&self, value: &ImplicitAnimationCollection) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).SetImplicitAnimations)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetImplicitAnimations)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } pub fn StartAnimationGroup<'a, P0, E0>(&self, value: P0) -> ::windows::core::Result<()> where @@ -10700,33 +10580,24 @@ impl CompositionColorGradientStopCollection { } #[doc = "*Required features: `\"Foundation_Collections\"`*"] #[cfg(feature = "Foundation_Collections")] - pub fn IndexOf<'a, P0>(&self, value: P0, index: &mut u32) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, CompositionColorGradientStop>>, - { + pub fn IndexOf(&self, value: &CompositionColorGradientStop, index: &mut u32) -> ::windows::core::Result { let this = &::windows::core::Interface::cast::>(self)?; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).IndexOf)(::windows::core::Vtable::as_raw(this), value.into().abi(), index, result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).IndexOf)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value), index, result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation_Collections\"`*"] #[cfg(feature = "Foundation_Collections")] - pub fn SetAt<'a, P0>(&self, index: u32, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, CompositionColorGradientStop>>, - { + pub fn SetAt(&self, index: u32, value: &CompositionColorGradientStop) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::>(self)?; - unsafe { (::windows::core::Vtable::vtable(this).SetAt)(::windows::core::Vtable::as_raw(this), index, value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetAt)(::windows::core::Vtable::as_raw(this), index, ::core::mem::transmute_copy(value)).ok() } } #[doc = "*Required features: `\"Foundation_Collections\"`*"] #[cfg(feature = "Foundation_Collections")] - pub fn InsertAt<'a, P0>(&self, index: u32, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, CompositionColorGradientStop>>, - { + pub fn InsertAt(&self, index: u32, value: &CompositionColorGradientStop) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::>(self)?; - unsafe { (::windows::core::Vtable::vtable(this).InsertAt)(::windows::core::Vtable::as_raw(this), index, value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).InsertAt)(::windows::core::Vtable::as_raw(this), index, ::core::mem::transmute_copy(value)).ok() } } #[doc = "*Required features: `\"Foundation_Collections\"`*"] #[cfg(feature = "Foundation_Collections")] @@ -10736,12 +10607,9 @@ impl CompositionColorGradientStopCollection { } #[doc = "*Required features: `\"Foundation_Collections\"`*"] #[cfg(feature = "Foundation_Collections")] - pub fn Append<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, CompositionColorGradientStop>>, - { + pub fn Append(&self, value: &CompositionColorGradientStop) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::>(self)?; - unsafe { (::windows::core::Vtable::vtable(this).Append)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).Append)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } #[doc = "*Required features: `\"Foundation_Collections\"`*"] #[cfg(feature = "Foundation_Collections")] @@ -10899,12 +10767,9 @@ unsafe impl ::core::marker::Sync for CompositionColorGradientStopCollection {} #[repr(transparent)] pub struct CompositionCommitBatch(::windows::core::IUnknown); impl CompositionCommitBatch { - pub fn PopulatePropertyInfo<'a, P0>(&self, propertyname: &::windows::core::HSTRING, propertyinfo: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, AnimationPropertyInfo>>, - { + pub fn PopulatePropertyInfo(&self, propertyname: &::windows::core::HSTRING, propertyinfo: &AnimationPropertyInfo) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).PopulatePropertyInfo)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(propertyname), propertyinfo.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).PopulatePropertyInfo)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(propertyname), ::core::mem::transmute_copy(propertyinfo)).ok() } } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] @@ -10928,14 +10793,11 @@ impl CompositionCommitBatch { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn Completed<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler<::windows::core::IInspectable, CompositionBatchCompletedEventArgs>>>, - { + pub fn Completed(&self, handler: &super::super::Foundation::TypedEventHandler<::windows::core::IInspectable, CompositionBatchCompletedEventArgs>) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).Completed)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).Completed)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -10996,12 +10858,9 @@ impl CompositionCommitBatch { (::windows::core::Vtable::vtable(this).ImplicitAnimations)(::windows::core::Vtable::as_raw(this), result__.as_mut_ptr()).from_abi::(result__) } } - pub fn SetImplicitAnimations<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, ImplicitAnimationCollection>>, - { + pub fn SetImplicitAnimations(&self, value: &ImplicitAnimationCollection) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).SetImplicitAnimations)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetImplicitAnimations)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } pub fn StartAnimationGroup<'a, P0, E0>(&self, value: P0) -> ::windows::core::Result<()> where @@ -11160,12 +11019,9 @@ unsafe impl ::core::marker::Sync for CompositionCommitBatch {} #[repr(transparent)] pub struct CompositionContainerShape(::windows::core::IUnknown); impl CompositionContainerShape { - pub fn PopulatePropertyInfo<'a, P0>(&self, propertyname: &::windows::core::HSTRING, propertyinfo: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, AnimationPropertyInfo>>, - { + pub fn PopulatePropertyInfo(&self, propertyname: &::windows::core::HSTRING, propertyinfo: &AnimationPropertyInfo) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).PopulatePropertyInfo)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(propertyname), propertyinfo.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).PopulatePropertyInfo)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(propertyname), ::core::mem::transmute_copy(propertyinfo)).ok() } } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] @@ -11234,12 +11090,9 @@ impl CompositionContainerShape { (::windows::core::Vtable::vtable(this).ImplicitAnimations)(::windows::core::Vtable::as_raw(this), result__.as_mut_ptr()).from_abi::(result__) } } - pub fn SetImplicitAnimations<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, ImplicitAnimationCollection>>, - { + pub fn SetImplicitAnimations(&self, value: &ImplicitAnimationCollection) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).SetImplicitAnimations)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetImplicitAnimations)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } pub fn StartAnimationGroup<'a, P0, E0>(&self, value: P0) -> ::windows::core::Result<()> where @@ -11495,12 +11348,9 @@ unsafe impl ::core::marker::Sync for CompositionContainerShape {} #[repr(transparent)] pub struct CompositionDrawingSurface(::windows::core::IUnknown); impl CompositionDrawingSurface { - pub fn PopulatePropertyInfo<'a, P0>(&self, propertyname: &::windows::core::HSTRING, propertyinfo: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, AnimationPropertyInfo>>, - { + pub fn PopulatePropertyInfo(&self, propertyname: &::windows::core::HSTRING, propertyinfo: &AnimationPropertyInfo) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).PopulatePropertyInfo)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(propertyname), propertyinfo.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).PopulatePropertyInfo)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(propertyname), ::core::mem::transmute_copy(propertyinfo)).ok() } } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] @@ -11626,12 +11476,9 @@ impl CompositionDrawingSurface { (::windows::core::Vtable::vtable(this).ImplicitAnimations)(::windows::core::Vtable::as_raw(this), result__.as_mut_ptr()).from_abi::(result__) } } - pub fn SetImplicitAnimations<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, ImplicitAnimationCollection>>, - { + pub fn SetImplicitAnimations(&self, value: &ImplicitAnimationCollection) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).SetImplicitAnimations)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetImplicitAnimations)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } pub fn StartAnimationGroup<'a, P0, E0>(&self, value: P0) -> ::windows::core::Result<()> where @@ -11809,12 +11656,9 @@ unsafe impl ::core::marker::Sync for CompositionDrawingSurface {} #[repr(transparent)] pub struct CompositionEasingFunction(::windows::core::IUnknown); impl CompositionEasingFunction { - pub fn PopulatePropertyInfo<'a, P0>(&self, propertyname: &::windows::core::HSTRING, propertyinfo: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, AnimationPropertyInfo>>, - { + pub fn PopulatePropertyInfo(&self, propertyname: &::windows::core::HSTRING, propertyinfo: &AnimationPropertyInfo) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).PopulatePropertyInfo)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(propertyname), propertyinfo.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).PopulatePropertyInfo)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(propertyname), ::core::mem::transmute_copy(propertyinfo)).ok() } } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] @@ -11824,103 +11668,70 @@ impl CompositionEasingFunction { } #[doc = "*Required features: `\"Foundation_Numerics\"`*"] #[cfg(feature = "Foundation_Numerics")] - pub fn CreateCubicBezierEasingFunction<'a, P0>(owner: P0, controlpoint1: super::super::Foundation::Numerics::Vector2, controlpoint2: super::super::Foundation::Numerics::Vector2) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, Compositor>>, - { + pub fn CreateCubicBezierEasingFunction(owner: &Compositor, controlpoint1: super::super::Foundation::Numerics::Vector2, controlpoint2: super::super::Foundation::Numerics::Vector2) -> ::windows::core::Result { Self::ICompositionEasingFunctionStatics(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).CreateCubicBezierEasingFunction)(::windows::core::Vtable::as_raw(this), owner.into().abi(), controlpoint1, controlpoint2, result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).CreateCubicBezierEasingFunction)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(owner), controlpoint1, controlpoint2, result__.as_mut_ptr()).from_abi::(result__) }) } - pub fn CreateLinearEasingFunction<'a, P0>(owner: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, Compositor>>, - { + pub fn CreateLinearEasingFunction(owner: &Compositor) -> ::windows::core::Result { Self::ICompositionEasingFunctionStatics(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).CreateLinearEasingFunction)(::windows::core::Vtable::as_raw(this), owner.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).CreateLinearEasingFunction)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(owner), result__.as_mut_ptr()).from_abi::(result__) }) } - pub fn CreateStepEasingFunction<'a, P0>(owner: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, Compositor>>, - { + pub fn CreateStepEasingFunction(owner: &Compositor) -> ::windows::core::Result { Self::ICompositionEasingFunctionStatics(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).CreateStepEasingFunction)(::windows::core::Vtable::as_raw(this), owner.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).CreateStepEasingFunction)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(owner), result__.as_mut_ptr()).from_abi::(result__) }) } - pub fn CreateStepEasingFunctionWithStepCount<'a, P0>(owner: P0, stepcount: i32) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, Compositor>>, - { + pub fn CreateStepEasingFunctionWithStepCount(owner: &Compositor, stepcount: i32) -> ::windows::core::Result { Self::ICompositionEasingFunctionStatics(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).CreateStepEasingFunctionWithStepCount)(::windows::core::Vtable::as_raw(this), owner.into().abi(), stepcount, result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).CreateStepEasingFunctionWithStepCount)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(owner), stepcount, result__.as_mut_ptr()).from_abi::(result__) }) } - pub fn CreateBackEasingFunction<'a, P0>(owner: P0, mode: CompositionEasingFunctionMode, amplitude: f32) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, Compositor>>, - { + pub fn CreateBackEasingFunction(owner: &Compositor, mode: CompositionEasingFunctionMode, amplitude: f32) -> ::windows::core::Result { Self::ICompositionEasingFunctionStatics(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).CreateBackEasingFunction)(::windows::core::Vtable::as_raw(this), owner.into().abi(), mode, amplitude, result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).CreateBackEasingFunction)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(owner), mode, amplitude, result__.as_mut_ptr()).from_abi::(result__) }) } - pub fn CreateBounceEasingFunction<'a, P0>(owner: P0, mode: CompositionEasingFunctionMode, bounces: i32, bounciness: f32) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, Compositor>>, - { + pub fn CreateBounceEasingFunction(owner: &Compositor, mode: CompositionEasingFunctionMode, bounces: i32, bounciness: f32) -> ::windows::core::Result { Self::ICompositionEasingFunctionStatics(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).CreateBounceEasingFunction)(::windows::core::Vtable::as_raw(this), owner.into().abi(), mode, bounces, bounciness, result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).CreateBounceEasingFunction)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(owner), mode, bounces, bounciness, result__.as_mut_ptr()).from_abi::(result__) }) } - pub fn CreateCircleEasingFunction<'a, P0>(owner: P0, mode: CompositionEasingFunctionMode) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, Compositor>>, - { + pub fn CreateCircleEasingFunction(owner: &Compositor, mode: CompositionEasingFunctionMode) -> ::windows::core::Result { Self::ICompositionEasingFunctionStatics(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).CreateCircleEasingFunction)(::windows::core::Vtable::as_raw(this), owner.into().abi(), mode, result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).CreateCircleEasingFunction)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(owner), mode, result__.as_mut_ptr()).from_abi::(result__) }) } - pub fn CreateElasticEasingFunction<'a, P0>(owner: P0, mode: CompositionEasingFunctionMode, oscillations: i32, springiness: f32) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, Compositor>>, - { + pub fn CreateElasticEasingFunction(owner: &Compositor, mode: CompositionEasingFunctionMode, oscillations: i32, springiness: f32) -> ::windows::core::Result { Self::ICompositionEasingFunctionStatics(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).CreateElasticEasingFunction)(::windows::core::Vtable::as_raw(this), owner.into().abi(), mode, oscillations, springiness, result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).CreateElasticEasingFunction)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(owner), mode, oscillations, springiness, result__.as_mut_ptr()).from_abi::(result__) }) } - pub fn CreateExponentialEasingFunction<'a, P0>(owner: P0, mode: CompositionEasingFunctionMode, exponent: f32) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, Compositor>>, - { + pub fn CreateExponentialEasingFunction(owner: &Compositor, mode: CompositionEasingFunctionMode, exponent: f32) -> ::windows::core::Result { Self::ICompositionEasingFunctionStatics(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).CreateExponentialEasingFunction)(::windows::core::Vtable::as_raw(this), owner.into().abi(), mode, exponent, result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).CreateExponentialEasingFunction)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(owner), mode, exponent, result__.as_mut_ptr()).from_abi::(result__) }) } - pub fn CreatePowerEasingFunction<'a, P0>(owner: P0, mode: CompositionEasingFunctionMode, power: f32) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, Compositor>>, - { + pub fn CreatePowerEasingFunction(owner: &Compositor, mode: CompositionEasingFunctionMode, power: f32) -> ::windows::core::Result { Self::ICompositionEasingFunctionStatics(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).CreatePowerEasingFunction)(::windows::core::Vtable::as_raw(this), owner.into().abi(), mode, power, result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).CreatePowerEasingFunction)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(owner), mode, power, result__.as_mut_ptr()).from_abi::(result__) }) } - pub fn CreateSineEasingFunction<'a, P0>(owner: P0, mode: CompositionEasingFunctionMode) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, Compositor>>, - { + pub fn CreateSineEasingFunction(owner: &Compositor, mode: CompositionEasingFunctionMode) -> ::windows::core::Result { Self::ICompositionEasingFunctionStatics(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).CreateSineEasingFunction)(::windows::core::Vtable::as_raw(this), owner.into().abi(), mode, result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).CreateSineEasingFunction)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(owner), mode, result__.as_mut_ptr()).from_abi::(result__) }) } pub fn Compositor(&self) -> ::windows::core::Result { @@ -11975,12 +11786,9 @@ impl CompositionEasingFunction { (::windows::core::Vtable::vtable(this).ImplicitAnimations)(::windows::core::Vtable::as_raw(this), result__.as_mut_ptr()).from_abi::(result__) } } - pub fn SetImplicitAnimations<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, ImplicitAnimationCollection>>, - { + pub fn SetImplicitAnimations(&self, value: &ImplicitAnimationCollection) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).SetImplicitAnimations)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetImplicitAnimations)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } pub fn StartAnimationGroup<'a, P0, E0>(&self, value: P0) -> ::windows::core::Result<()> where @@ -12144,12 +11952,9 @@ unsafe impl ::core::marker::Sync for CompositionEasingFunction {} #[repr(transparent)] pub struct CompositionEffectBrush(::windows::core::IUnknown); impl CompositionEffectBrush { - pub fn PopulatePropertyInfo<'a, P0>(&self, propertyname: &::windows::core::HSTRING, propertyinfo: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, AnimationPropertyInfo>>, - { + pub fn PopulatePropertyInfo(&self, propertyname: &::windows::core::HSTRING, propertyinfo: &AnimationPropertyInfo) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).PopulatePropertyInfo)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(propertyname), propertyinfo.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).PopulatePropertyInfo)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(propertyname), ::core::mem::transmute_copy(propertyinfo)).ok() } } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] @@ -12223,12 +12028,9 @@ impl CompositionEffectBrush { (::windows::core::Vtable::vtable(this).ImplicitAnimations)(::windows::core::Vtable::as_raw(this), result__.as_mut_ptr()).from_abi::(result__) } } - pub fn SetImplicitAnimations<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, ImplicitAnimationCollection>>, - { + pub fn SetImplicitAnimations(&self, value: &ImplicitAnimationCollection) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).SetImplicitAnimations)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetImplicitAnimations)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } pub fn StartAnimationGroup<'a, P0, E0>(&self, value: P0) -> ::windows::core::Result<()> where @@ -12402,12 +12204,9 @@ unsafe impl ::core::marker::Sync for CompositionEffectBrush {} #[repr(transparent)] pub struct CompositionEffectFactory(::windows::core::IUnknown); impl CompositionEffectFactory { - pub fn PopulatePropertyInfo<'a, P0>(&self, propertyname: &::windows::core::HSTRING, propertyinfo: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, AnimationPropertyInfo>>, - { + pub fn PopulatePropertyInfo(&self, propertyname: &::windows::core::HSTRING, propertyinfo: &AnimationPropertyInfo) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).PopulatePropertyInfo)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(propertyname), propertyinfo.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).PopulatePropertyInfo)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(propertyname), ::core::mem::transmute_copy(propertyinfo)).ok() } } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] @@ -12488,12 +12287,9 @@ impl CompositionEffectFactory { (::windows::core::Vtable::vtable(this).ImplicitAnimations)(::windows::core::Vtable::as_raw(this), result__.as_mut_ptr()).from_abi::(result__) } } - pub fn SetImplicitAnimations<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, ImplicitAnimationCollection>>, - { + pub fn SetImplicitAnimations(&self, value: &ImplicitAnimationCollection) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).SetImplicitAnimations)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetImplicitAnimations)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } pub fn StartAnimationGroup<'a, P0, E0>(&self, value: P0) -> ::windows::core::Result<()> where @@ -12761,12 +12557,9 @@ unsafe impl ::core::marker::Sync for CompositionEffectSourceParameter {} #[repr(transparent)] pub struct CompositionEllipseGeometry(::windows::core::IUnknown); impl CompositionEllipseGeometry { - pub fn PopulatePropertyInfo<'a, P0>(&self, propertyname: &::windows::core::HSTRING, propertyinfo: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, AnimationPropertyInfo>>, - { + pub fn PopulatePropertyInfo(&self, propertyname: &::windows::core::HSTRING, propertyinfo: &AnimationPropertyInfo) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).PopulatePropertyInfo)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(propertyname), propertyinfo.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).PopulatePropertyInfo)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(propertyname), ::core::mem::transmute_copy(propertyinfo)).ok() } } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] @@ -12889,12 +12682,9 @@ impl CompositionEllipseGeometry { (::windows::core::Vtable::vtable(this).ImplicitAnimations)(::windows::core::Vtable::as_raw(this), result__.as_mut_ptr()).from_abi::(result__) } } - pub fn SetImplicitAnimations<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, ImplicitAnimationCollection>>, - { + pub fn SetImplicitAnimations(&self, value: &ImplicitAnimationCollection) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).SetImplicitAnimations)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetImplicitAnimations)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } pub fn StartAnimationGroup<'a, P0, E0>(&self, value: P0) -> ::windows::core::Result<()> where @@ -13068,12 +12858,9 @@ unsafe impl ::core::marker::Sync for CompositionEllipseGeometry {} #[repr(transparent)] pub struct CompositionGeometricClip(::windows::core::IUnknown); impl CompositionGeometricClip { - pub fn PopulatePropertyInfo<'a, P0>(&self, propertyname: &::windows::core::HSTRING, propertyinfo: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, AnimationPropertyInfo>>, - { + pub fn PopulatePropertyInfo(&self, propertyname: &::windows::core::HSTRING, propertyinfo: &AnimationPropertyInfo) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).PopulatePropertyInfo)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(propertyname), propertyinfo.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).PopulatePropertyInfo)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(propertyname), ::core::mem::transmute_copy(propertyinfo)).ok() } } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] @@ -13199,12 +12986,9 @@ impl CompositionGeometricClip { (::windows::core::Vtable::vtable(this).ViewBox)(::windows::core::Vtable::as_raw(this), result__.as_mut_ptr()).from_abi::(result__) } } - pub fn SetViewBox<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, CompositionViewBox>>, - { + pub fn SetViewBox(&self, value: &CompositionViewBox) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).SetViewBox)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetViewBox)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } pub fn Compositor(&self) -> ::windows::core::Result { let this = &::windows::core::Interface::cast::(self)?; @@ -13258,12 +13042,9 @@ impl CompositionGeometricClip { (::windows::core::Vtable::vtable(this).ImplicitAnimations)(::windows::core::Vtable::as_raw(this), result__.as_mut_ptr()).from_abi::(result__) } } - pub fn SetImplicitAnimations<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, ImplicitAnimationCollection>>, - { + pub fn SetImplicitAnimations(&self, value: &ImplicitAnimationCollection) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).SetImplicitAnimations)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetImplicitAnimations)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } pub fn StartAnimationGroup<'a, P0, E0>(&self, value: P0) -> ::windows::core::Result<()> where @@ -13437,12 +13218,9 @@ unsafe impl ::core::marker::Sync for CompositionGeometricClip {} #[repr(transparent)] pub struct CompositionGeometry(::windows::core::IUnknown); impl CompositionGeometry { - pub fn PopulatePropertyInfo<'a, P0>(&self, propertyname: &::windows::core::HSTRING, propertyinfo: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, AnimationPropertyInfo>>, - { + pub fn PopulatePropertyInfo(&self, propertyname: &::windows::core::HSTRING, propertyinfo: &AnimationPropertyInfo) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).PopulatePropertyInfo)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(propertyname), propertyinfo.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).PopulatePropertyInfo)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(propertyname), ::core::mem::transmute_copy(propertyinfo)).ok() } } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] @@ -13535,12 +13313,9 @@ impl CompositionGeometry { (::windows::core::Vtable::vtable(this).ImplicitAnimations)(::windows::core::Vtable::as_raw(this), result__.as_mut_ptr()).from_abi::(result__) } } - pub fn SetImplicitAnimations<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, ImplicitAnimationCollection>>, - { + pub fn SetImplicitAnimations(&self, value: &ImplicitAnimationCollection) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).SetImplicitAnimations)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetImplicitAnimations)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } pub fn StartAnimationGroup<'a, P0, E0>(&self, value: P0) -> ::windows::core::Result<()> where @@ -13699,12 +13474,9 @@ unsafe impl ::core::marker::Sync for CompositionGeometry {} #[repr(transparent)] pub struct CompositionGradientBrush(::windows::core::IUnknown); impl CompositionGradientBrush { - pub fn PopulatePropertyInfo<'a, P0>(&self, propertyname: &::windows::core::HSTRING, propertyinfo: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, AnimationPropertyInfo>>, - { + pub fn PopulatePropertyInfo(&self, propertyname: &::windows::core::HSTRING, propertyinfo: &AnimationPropertyInfo) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).PopulatePropertyInfo)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(propertyname), propertyinfo.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).PopulatePropertyInfo)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(propertyname), ::core::mem::transmute_copy(propertyinfo)).ok() } } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] @@ -13901,12 +13673,9 @@ impl CompositionGradientBrush { (::windows::core::Vtable::vtable(this).ImplicitAnimations)(::windows::core::Vtable::as_raw(this), result__.as_mut_ptr()).from_abi::(result__) } } - pub fn SetImplicitAnimations<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, ImplicitAnimationCollection>>, - { + pub fn SetImplicitAnimations(&self, value: &ImplicitAnimationCollection) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).SetImplicitAnimations)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetImplicitAnimations)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } pub fn StartAnimationGroup<'a, P0, E0>(&self, value: P0) -> ::windows::core::Result<()> where @@ -14080,12 +13849,9 @@ unsafe impl ::core::marker::Sync for CompositionGradientBrush {} #[repr(transparent)] pub struct CompositionGraphicsDevice(::windows::core::IUnknown); impl CompositionGraphicsDevice { - pub fn PopulatePropertyInfo<'a, P0>(&self, propertyname: &::windows::core::HSTRING, propertyinfo: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, AnimationPropertyInfo>>, - { + pub fn PopulatePropertyInfo(&self, propertyname: &::windows::core::HSTRING, propertyinfo: &AnimationPropertyInfo) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).PopulatePropertyInfo)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(propertyname), propertyinfo.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).PopulatePropertyInfo)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(propertyname), ::core::mem::transmute_copy(propertyinfo)).ok() } } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] @@ -14104,14 +13870,11 @@ impl CompositionGraphicsDevice { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn RenderingDeviceReplaced<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn RenderingDeviceReplaced(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).RenderingDeviceReplaced)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).RenderingDeviceReplaced)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -14215,12 +13978,9 @@ impl CompositionGraphicsDevice { (::windows::core::Vtable::vtable(this).ImplicitAnimations)(::windows::core::Vtable::as_raw(this), result__.as_mut_ptr()).from_abi::(result__) } } - pub fn SetImplicitAnimations<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, ImplicitAnimationCollection>>, - { + pub fn SetImplicitAnimations(&self, value: &ImplicitAnimationCollection) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).SetImplicitAnimations)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetImplicitAnimations)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } pub fn StartAnimationGroup<'a, P0, E0>(&self, value: P0) -> ::windows::core::Result<()> where @@ -14379,12 +14139,9 @@ unsafe impl ::core::marker::Sync for CompositionGraphicsDevice {} #[repr(transparent)] pub struct CompositionLight(::windows::core::IUnknown); impl CompositionLight { - pub fn PopulatePropertyInfo<'a, P0>(&self, propertyname: &::windows::core::HSTRING, propertyinfo: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, AnimationPropertyInfo>>, - { + pub fn PopulatePropertyInfo(&self, propertyname: &::windows::core::HSTRING, propertyinfo: &AnimationPropertyInfo) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).PopulatePropertyInfo)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(propertyname), propertyinfo.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).PopulatePropertyInfo)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(propertyname), ::core::mem::transmute_copy(propertyinfo)).ok() } } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] @@ -14469,12 +14226,9 @@ impl CompositionLight { (::windows::core::Vtable::vtable(this).ImplicitAnimations)(::windows::core::Vtable::as_raw(this), result__.as_mut_ptr()).from_abi::(result__) } } - pub fn SetImplicitAnimations<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, ImplicitAnimationCollection>>, - { + pub fn SetImplicitAnimations(&self, value: &ImplicitAnimationCollection) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).SetImplicitAnimations)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetImplicitAnimations)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } pub fn StartAnimationGroup<'a, P0, E0>(&self, value: P0) -> ::windows::core::Result<()> where @@ -14633,12 +14387,9 @@ unsafe impl ::core::marker::Sync for CompositionLight {} #[repr(transparent)] pub struct CompositionLineGeometry(::windows::core::IUnknown); impl CompositionLineGeometry { - pub fn PopulatePropertyInfo<'a, P0>(&self, propertyname: &::windows::core::HSTRING, propertyinfo: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, AnimationPropertyInfo>>, - { + pub fn PopulatePropertyInfo(&self, propertyname: &::windows::core::HSTRING, propertyinfo: &AnimationPropertyInfo) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).PopulatePropertyInfo)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(propertyname), propertyinfo.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).PopulatePropertyInfo)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(propertyname), ::core::mem::transmute_copy(propertyinfo)).ok() } } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] @@ -14761,12 +14512,9 @@ impl CompositionLineGeometry { (::windows::core::Vtable::vtable(this).ImplicitAnimations)(::windows::core::Vtable::as_raw(this), result__.as_mut_ptr()).from_abi::(result__) } } - pub fn SetImplicitAnimations<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, ImplicitAnimationCollection>>, - { + pub fn SetImplicitAnimations(&self, value: &ImplicitAnimationCollection) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).SetImplicitAnimations)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetImplicitAnimations)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } pub fn StartAnimationGroup<'a, P0, E0>(&self, value: P0) -> ::windows::core::Result<()> where @@ -14940,12 +14688,9 @@ unsafe impl ::core::marker::Sync for CompositionLineGeometry {} #[repr(transparent)] pub struct CompositionLinearGradientBrush(::windows::core::IUnknown); impl CompositionLinearGradientBrush { - pub fn PopulatePropertyInfo<'a, P0>(&self, propertyname: &::windows::core::HSTRING, propertyinfo: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, AnimationPropertyInfo>>, - { + pub fn PopulatePropertyInfo(&self, propertyname: &::windows::core::HSTRING, propertyinfo: &AnimationPropertyInfo) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).PopulatePropertyInfo)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(propertyname), propertyinfo.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).PopulatePropertyInfo)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(propertyname), ::core::mem::transmute_copy(propertyinfo)).ok() } } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] @@ -15172,12 +14917,9 @@ impl CompositionLinearGradientBrush { (::windows::core::Vtable::vtable(this).ImplicitAnimations)(::windows::core::Vtable::as_raw(this), result__.as_mut_ptr()).from_abi::(result__) } } - pub fn SetImplicitAnimations<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, ImplicitAnimationCollection>>, - { + pub fn SetImplicitAnimations(&self, value: &ImplicitAnimationCollection) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).SetImplicitAnimations)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetImplicitAnimations)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } pub fn StartAnimationGroup<'a, P0, E0>(&self, value: P0) -> ::windows::core::Result<()> where @@ -15366,12 +15108,9 @@ unsafe impl ::core::marker::Sync for CompositionLinearGradientBrush {} #[repr(transparent)] pub struct CompositionMaskBrush(::windows::core::IUnknown); impl CompositionMaskBrush { - pub fn PopulatePropertyInfo<'a, P0>(&self, propertyname: &::windows::core::HSTRING, propertyinfo: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, AnimationPropertyInfo>>, - { + pub fn PopulatePropertyInfo(&self, propertyname: &::windows::core::HSTRING, propertyinfo: &AnimationPropertyInfo) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).PopulatePropertyInfo)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(propertyname), propertyinfo.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).PopulatePropertyInfo)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(propertyname), ::core::mem::transmute_copy(propertyinfo)).ok() } } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] @@ -15459,12 +15198,9 @@ impl CompositionMaskBrush { (::windows::core::Vtable::vtable(this).ImplicitAnimations)(::windows::core::Vtable::as_raw(this), result__.as_mut_ptr()).from_abi::(result__) } } - pub fn SetImplicitAnimations<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, ImplicitAnimationCollection>>, - { + pub fn SetImplicitAnimations(&self, value: &ImplicitAnimationCollection) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).SetImplicitAnimations)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetImplicitAnimations)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } pub fn StartAnimationGroup<'a, P0, E0>(&self, value: P0) -> ::windows::core::Result<()> where @@ -15638,12 +15374,9 @@ unsafe impl ::core::marker::Sync for CompositionMaskBrush {} #[repr(transparent)] pub struct CompositionMipmapSurface(::windows::core::IUnknown); impl CompositionMipmapSurface { - pub fn PopulatePropertyInfo<'a, P0>(&self, propertyname: &::windows::core::HSTRING, propertyinfo: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, AnimationPropertyInfo>>, - { + pub fn PopulatePropertyInfo(&self, propertyname: &::windows::core::HSTRING, propertyinfo: &AnimationPropertyInfo) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).PopulatePropertyInfo)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(propertyname), propertyinfo.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).PopulatePropertyInfo)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(propertyname), ::core::mem::transmute_copy(propertyinfo)).ok() } } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] @@ -15744,12 +15477,9 @@ impl CompositionMipmapSurface { (::windows::core::Vtable::vtable(this).ImplicitAnimations)(::windows::core::Vtable::as_raw(this), result__.as_mut_ptr()).from_abi::(result__) } } - pub fn SetImplicitAnimations<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, ImplicitAnimationCollection>>, - { + pub fn SetImplicitAnimations(&self, value: &ImplicitAnimationCollection) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).SetImplicitAnimations)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetImplicitAnimations)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } pub fn StartAnimationGroup<'a, P0, E0>(&self, value: P0) -> ::windows::core::Result<()> where @@ -15927,12 +15657,9 @@ unsafe impl ::core::marker::Sync for CompositionMipmapSurface {} #[repr(transparent)] pub struct CompositionNineGridBrush(::windows::core::IUnknown); impl CompositionNineGridBrush { - pub fn PopulatePropertyInfo<'a, P0>(&self, propertyname: &::windows::core::HSTRING, propertyinfo: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, AnimationPropertyInfo>>, - { + pub fn PopulatePropertyInfo(&self, propertyname: &::windows::core::HSTRING, propertyinfo: &AnimationPropertyInfo) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).PopulatePropertyInfo)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(propertyname), propertyinfo.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).PopulatePropertyInfo)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(propertyname), ::core::mem::transmute_copy(propertyinfo)).ok() } } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] @@ -16121,12 +15848,9 @@ impl CompositionNineGridBrush { (::windows::core::Vtable::vtable(this).ImplicitAnimations)(::windows::core::Vtable::as_raw(this), result__.as_mut_ptr()).from_abi::(result__) } } - pub fn SetImplicitAnimations<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, ImplicitAnimationCollection>>, - { + pub fn SetImplicitAnimations(&self, value: &ImplicitAnimationCollection) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).SetImplicitAnimations)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetImplicitAnimations)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } pub fn StartAnimationGroup<'a, P0, E0>(&self, value: P0) -> ::windows::core::Result<()> where @@ -16300,12 +16024,9 @@ unsafe impl ::core::marker::Sync for CompositionNineGridBrush {} #[repr(transparent)] pub struct CompositionObject(::windows::core::IUnknown); impl CompositionObject { - pub fn PopulatePropertyInfo<'a, P0>(&self, propertyname: &::windows::core::HSTRING, propertyinfo: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, AnimationPropertyInfo>>, - { + pub fn PopulatePropertyInfo(&self, propertyname: &::windows::core::HSTRING, propertyinfo: &AnimationPropertyInfo) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).PopulatePropertyInfo)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(propertyname), propertyinfo.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).PopulatePropertyInfo)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(propertyname), ::core::mem::transmute_copy(propertyinfo)).ok() } } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] @@ -16365,12 +16086,9 @@ impl CompositionObject { (::windows::core::Vtable::vtable(this).ImplicitAnimations)(::windows::core::Vtable::as_raw(this), result__.as_mut_ptr()).from_abi::(result__) } } - pub fn SetImplicitAnimations<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, ImplicitAnimationCollection>>, - { + pub fn SetImplicitAnimations(&self, value: &ImplicitAnimationCollection) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).SetImplicitAnimations)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetImplicitAnimations)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } pub fn StartAnimationGroup<'a, P0, E0>(&self, value: P0) -> ::windows::core::Result<()> where @@ -16644,12 +16362,9 @@ unsafe impl ::core::marker::Sync for CompositionPath {} #[repr(transparent)] pub struct CompositionPathGeometry(::windows::core::IUnknown); impl CompositionPathGeometry { - pub fn PopulatePropertyInfo<'a, P0>(&self, propertyname: &::windows::core::HSTRING, propertyinfo: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, AnimationPropertyInfo>>, - { + pub fn PopulatePropertyInfo(&self, propertyname: &::windows::core::HSTRING, propertyinfo: &AnimationPropertyInfo) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).PopulatePropertyInfo)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(propertyname), propertyinfo.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).PopulatePropertyInfo)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(propertyname), ::core::mem::transmute_copy(propertyinfo)).ok() } } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] @@ -16742,12 +16457,9 @@ impl CompositionPathGeometry { (::windows::core::Vtable::vtable(this).ImplicitAnimations)(::windows::core::Vtable::as_raw(this), result__.as_mut_ptr()).from_abi::(result__) } } - pub fn SetImplicitAnimations<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, ImplicitAnimationCollection>>, - { + pub fn SetImplicitAnimations(&self, value: &ImplicitAnimationCollection) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).SetImplicitAnimations)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetImplicitAnimations)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } pub fn StartAnimationGroup<'a, P0, E0>(&self, value: P0) -> ::windows::core::Result<()> where @@ -16788,12 +16500,9 @@ impl CompositionPathGeometry { (::windows::core::Vtable::vtable(this).Path)(::windows::core::Vtable::as_raw(this), result__.as_mut_ptr()).from_abi::(result__) } } - pub fn SetPath<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, CompositionPath>>, - { + pub fn SetPath(&self, value: &CompositionPath) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).SetPath)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetPath)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } } impl ::core::clone::Clone for CompositionPathGeometry { @@ -16935,12 +16644,9 @@ unsafe impl ::core::marker::Sync for CompositionPathGeometry {} #[repr(transparent)] pub struct CompositionProjectedShadow(::windows::core::IUnknown); impl CompositionProjectedShadow { - pub fn PopulatePropertyInfo<'a, P0>(&self, propertyname: &::windows::core::HSTRING, propertyinfo: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, AnimationPropertyInfo>>, - { + pub fn PopulatePropertyInfo(&self, propertyname: &::windows::core::HSTRING, propertyinfo: &AnimationPropertyInfo) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).PopulatePropertyInfo)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(propertyname), propertyinfo.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).PopulatePropertyInfo)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(propertyname), ::core::mem::transmute_copy(propertyinfo)).ok() } } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] @@ -17000,12 +16706,9 @@ impl CompositionProjectedShadow { (::windows::core::Vtable::vtable(this).ImplicitAnimations)(::windows::core::Vtable::as_raw(this), result__.as_mut_ptr()).from_abi::(result__) } } - pub fn SetImplicitAnimations<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, ImplicitAnimationCollection>>, - { + pub fn SetImplicitAnimations(&self, value: &ImplicitAnimationCollection) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).SetImplicitAnimations)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetImplicitAnimations)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } pub fn StartAnimationGroup<'a, P0, E0>(&self, value: P0) -> ::windows::core::Result<()> where @@ -17225,12 +16928,9 @@ unsafe impl ::core::marker::Sync for CompositionProjectedShadow {} #[repr(transparent)] pub struct CompositionProjectedShadowCaster(::windows::core::IUnknown); impl CompositionProjectedShadowCaster { - pub fn PopulatePropertyInfo<'a, P0>(&self, propertyname: &::windows::core::HSTRING, propertyinfo: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, AnimationPropertyInfo>>, - { + pub fn PopulatePropertyInfo(&self, propertyname: &::windows::core::HSTRING, propertyinfo: &AnimationPropertyInfo) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).PopulatePropertyInfo)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(propertyname), propertyinfo.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).PopulatePropertyInfo)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(propertyname), ::core::mem::transmute_copy(propertyinfo)).ok() } } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] @@ -17290,12 +16990,9 @@ impl CompositionProjectedShadowCaster { (::windows::core::Vtable::vtable(this).ImplicitAnimations)(::windows::core::Vtable::as_raw(this), result__.as_mut_ptr()).from_abi::(result__) } } - pub fn SetImplicitAnimations<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, ImplicitAnimationCollection>>, - { + pub fn SetImplicitAnimations(&self, value: &ImplicitAnimationCollection) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).SetImplicitAnimations)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetImplicitAnimations)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } pub fn StartAnimationGroup<'a, P0, E0>(&self, value: P0) -> ::windows::core::Result<()> where @@ -17482,12 +17179,9 @@ unsafe impl ::core::marker::Sync for CompositionProjectedShadowCaster {} #[repr(transparent)] pub struct CompositionProjectedShadowCasterCollection(::windows::core::IUnknown); impl CompositionProjectedShadowCasterCollection { - pub fn PopulatePropertyInfo<'a, P0>(&self, propertyname: &::windows::core::HSTRING, propertyinfo: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, AnimationPropertyInfo>>, - { + pub fn PopulatePropertyInfo(&self, propertyname: &::windows::core::HSTRING, propertyinfo: &AnimationPropertyInfo) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).PopulatePropertyInfo)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(propertyname), propertyinfo.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).PopulatePropertyInfo)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(propertyname), ::core::mem::transmute_copy(propertyinfo)).ok() } } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] @@ -17547,12 +17241,9 @@ impl CompositionProjectedShadowCasterCollection { (::windows::core::Vtable::vtable(this).ImplicitAnimations)(::windows::core::Vtable::as_raw(this), result__.as_mut_ptr()).from_abi::(result__) } } - pub fn SetImplicitAnimations<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, ImplicitAnimationCollection>>, - { + pub fn SetImplicitAnimations(&self, value: &ImplicitAnimationCollection) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).SetImplicitAnimations)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetImplicitAnimations)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } pub fn StartAnimationGroup<'a, P0, E0>(&self, value: P0) -> ::windows::core::Result<()> where @@ -17593,42 +17284,25 @@ impl CompositionProjectedShadowCasterCollection { (::windows::core::Vtable::vtable(this).Count)(::windows::core::Vtable::as_raw(this), result__.as_mut_ptr()).from_abi::(result__) } } - pub fn InsertAbove<'a, P0, P1>(&self, newcaster: P0, reference: P1) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, CompositionProjectedShadowCaster>>, - P1: ::std::convert::Into<::windows::core::InParam<'a, CompositionProjectedShadowCaster>>, - { + pub fn InsertAbove(&self, newcaster: &CompositionProjectedShadowCaster, reference: &CompositionProjectedShadowCaster) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).InsertAbove)(::windows::core::Vtable::as_raw(this), newcaster.into().abi(), reference.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).InsertAbove)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(newcaster), ::core::mem::transmute_copy(reference)).ok() } } - pub fn InsertAtBottom<'a, P0>(&self, newcaster: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, CompositionProjectedShadowCaster>>, - { + pub fn InsertAtBottom(&self, newcaster: &CompositionProjectedShadowCaster) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).InsertAtBottom)(::windows::core::Vtable::as_raw(this), newcaster.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).InsertAtBottom)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(newcaster)).ok() } } - pub fn InsertAtTop<'a, P0>(&self, newcaster: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, CompositionProjectedShadowCaster>>, - { + pub fn InsertAtTop(&self, newcaster: &CompositionProjectedShadowCaster) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).InsertAtTop)(::windows::core::Vtable::as_raw(this), newcaster.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).InsertAtTop)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(newcaster)).ok() } } - pub fn InsertBelow<'a, P0, P1>(&self, newcaster: P0, reference: P1) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, CompositionProjectedShadowCaster>>, - P1: ::std::convert::Into<::windows::core::InParam<'a, CompositionProjectedShadowCaster>>, - { + pub fn InsertBelow(&self, newcaster: &CompositionProjectedShadowCaster, reference: &CompositionProjectedShadowCaster) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).InsertBelow)(::windows::core::Vtable::as_raw(this), newcaster.into().abi(), reference.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).InsertBelow)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(newcaster), ::core::mem::transmute_copy(reference)).ok() } } - pub fn Remove<'a, P0>(&self, caster: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, CompositionProjectedShadowCaster>>, - { + pub fn Remove(&self, caster: &CompositionProjectedShadowCaster) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).Remove)(::windows::core::Vtable::as_raw(this), caster.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).Remove)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(caster)).ok() } } pub fn RemoveAll(&self) -> ::windows::core::Result<()> { let this = self; @@ -17817,12 +17491,9 @@ unsafe impl ::core::marker::Sync for CompositionProjectedShadowCasterCollection #[repr(transparent)] pub struct CompositionProjectedShadowReceiver(::windows::core::IUnknown); impl CompositionProjectedShadowReceiver { - pub fn PopulatePropertyInfo<'a, P0>(&self, propertyname: &::windows::core::HSTRING, propertyinfo: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, AnimationPropertyInfo>>, - { + pub fn PopulatePropertyInfo(&self, propertyname: &::windows::core::HSTRING, propertyinfo: &AnimationPropertyInfo) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).PopulatePropertyInfo)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(propertyname), propertyinfo.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).PopulatePropertyInfo)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(propertyname), ::core::mem::transmute_copy(propertyinfo)).ok() } } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] @@ -17882,12 +17553,9 @@ impl CompositionProjectedShadowReceiver { (::windows::core::Vtable::vtable(this).ImplicitAnimations)(::windows::core::Vtable::as_raw(this), result__.as_mut_ptr()).from_abi::(result__) } } - pub fn SetImplicitAnimations<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, ImplicitAnimationCollection>>, - { + pub fn SetImplicitAnimations(&self, value: &ImplicitAnimationCollection) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).SetImplicitAnimations)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetImplicitAnimations)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } pub fn StartAnimationGroup<'a, P0, E0>(&self, value: P0) -> ::windows::core::Result<()> where @@ -18060,12 +17728,9 @@ unsafe impl ::core::marker::Sync for CompositionProjectedShadowReceiver {} #[repr(transparent)] pub struct CompositionProjectedShadowReceiverUnorderedCollection(::windows::core::IUnknown); impl CompositionProjectedShadowReceiverUnorderedCollection { - pub fn PopulatePropertyInfo<'a, P0>(&self, propertyname: &::windows::core::HSTRING, propertyinfo: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, AnimationPropertyInfo>>, - { + pub fn PopulatePropertyInfo(&self, propertyname: &::windows::core::HSTRING, propertyinfo: &AnimationPropertyInfo) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).PopulatePropertyInfo)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(propertyname), propertyinfo.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).PopulatePropertyInfo)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(propertyname), ::core::mem::transmute_copy(propertyinfo)).ok() } } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] @@ -18125,12 +17790,9 @@ impl CompositionProjectedShadowReceiverUnorderedCollection { (::windows::core::Vtable::vtable(this).ImplicitAnimations)(::windows::core::Vtable::as_raw(this), result__.as_mut_ptr()).from_abi::(result__) } } - pub fn SetImplicitAnimations<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, ImplicitAnimationCollection>>, - { + pub fn SetImplicitAnimations(&self, value: &ImplicitAnimationCollection) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).SetImplicitAnimations)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetImplicitAnimations)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } pub fn StartAnimationGroup<'a, P0, E0>(&self, value: P0) -> ::windows::core::Result<()> where @@ -18164,12 +17826,9 @@ impl CompositionProjectedShadowReceiverUnorderedCollection { (::windows::core::Vtable::vtable(this).TryGetAnimationController)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(propertyname), result__.as_mut_ptr()).from_abi::(result__) } } - pub fn Add<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, CompositionProjectedShadowReceiver>>, - { + pub fn Add(&self, value: &CompositionProjectedShadowReceiver) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).Add)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).Add)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } pub fn Count(&self) -> ::windows::core::Result { let this = self; @@ -18178,12 +17837,9 @@ impl CompositionProjectedShadowReceiverUnorderedCollection { (::windows::core::Vtable::vtable(this).Count)(::windows::core::Vtable::as_raw(this), result__.as_mut_ptr()).from_abi::(result__) } } - pub fn Remove<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, CompositionProjectedShadowReceiver>>, - { + pub fn Remove(&self, value: &CompositionProjectedShadowReceiver) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).Remove)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).Remove)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } pub fn RemoveAll(&self) -> ::windows::core::Result<()> { let this = self; @@ -18361,12 +18017,9 @@ unsafe impl ::core::marker::Sync for CompositionProjectedShadowReceiverUnordered #[repr(transparent)] pub struct CompositionPropertySet(::windows::core::IUnknown); impl CompositionPropertySet { - pub fn PopulatePropertyInfo<'a, P0>(&self, propertyname: &::windows::core::HSTRING, propertyinfo: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, AnimationPropertyInfo>>, - { + pub fn PopulatePropertyInfo(&self, propertyname: &::windows::core::HSTRING, propertyinfo: &AnimationPropertyInfo) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).PopulatePropertyInfo)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(propertyname), propertyinfo.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).PopulatePropertyInfo)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(propertyname), ::core::mem::transmute_copy(propertyinfo)).ok() } } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] @@ -18426,12 +18079,9 @@ impl CompositionPropertySet { (::windows::core::Vtable::vtable(this).ImplicitAnimations)(::windows::core::Vtable::as_raw(this), result__.as_mut_ptr()).from_abi::(result__) } } - pub fn SetImplicitAnimations<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, ImplicitAnimationCollection>>, - { + pub fn SetImplicitAnimations(&self, value: &ImplicitAnimationCollection) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).SetImplicitAnimations)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetImplicitAnimations)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } pub fn StartAnimationGroup<'a, P0, E0>(&self, value: P0) -> ::windows::core::Result<()> where @@ -18713,12 +18363,9 @@ unsafe impl ::core::marker::Sync for CompositionPropertySet {} #[repr(transparent)] pub struct CompositionRadialGradientBrush(::windows::core::IUnknown); impl CompositionRadialGradientBrush { - pub fn PopulatePropertyInfo<'a, P0>(&self, propertyname: &::windows::core::HSTRING, propertyinfo: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, AnimationPropertyInfo>>, - { + pub fn PopulatePropertyInfo(&self, propertyname: &::windows::core::HSTRING, propertyinfo: &AnimationPropertyInfo) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).PopulatePropertyInfo)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(propertyname), propertyinfo.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).PopulatePropertyInfo)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(propertyname), ::core::mem::transmute_copy(propertyinfo)).ok() } } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] @@ -18915,12 +18562,9 @@ impl CompositionRadialGradientBrush { (::windows::core::Vtable::vtable(this).ImplicitAnimations)(::windows::core::Vtable::as_raw(this), result__.as_mut_ptr()).from_abi::(result__) } } - pub fn SetImplicitAnimations<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, ImplicitAnimationCollection>>, - { + pub fn SetImplicitAnimations(&self, value: &ImplicitAnimationCollection) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).SetImplicitAnimations)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetImplicitAnimations)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } pub fn StartAnimationGroup<'a, P0, E0>(&self, value: P0) -> ::windows::core::Result<()> where @@ -19154,12 +18798,9 @@ unsafe impl ::core::marker::Sync for CompositionRadialGradientBrush {} #[repr(transparent)] pub struct CompositionRectangleGeometry(::windows::core::IUnknown); impl CompositionRectangleGeometry { - pub fn PopulatePropertyInfo<'a, P0>(&self, propertyname: &::windows::core::HSTRING, propertyinfo: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, AnimationPropertyInfo>>, - { + pub fn PopulatePropertyInfo(&self, propertyname: &::windows::core::HSTRING, propertyinfo: &AnimationPropertyInfo) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).PopulatePropertyInfo)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(propertyname), propertyinfo.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).PopulatePropertyInfo)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(propertyname), ::core::mem::transmute_copy(propertyinfo)).ok() } } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] @@ -19252,12 +18893,9 @@ impl CompositionRectangleGeometry { (::windows::core::Vtable::vtable(this).ImplicitAnimations)(::windows::core::Vtable::as_raw(this), result__.as_mut_ptr()).from_abi::(result__) } } - pub fn SetImplicitAnimations<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, ImplicitAnimationCollection>>, - { + pub fn SetImplicitAnimations(&self, value: &ImplicitAnimationCollection) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).SetImplicitAnimations)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetImplicitAnimations)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } pub fn StartAnimationGroup<'a, P0, E0>(&self, value: P0) -> ::windows::core::Result<()> where @@ -19461,12 +19099,9 @@ unsafe impl ::core::marker::Sync for CompositionRectangleGeometry {} #[repr(transparent)] pub struct CompositionRoundedRectangleGeometry(::windows::core::IUnknown); impl CompositionRoundedRectangleGeometry { - pub fn PopulatePropertyInfo<'a, P0>(&self, propertyname: &::windows::core::HSTRING, propertyinfo: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, AnimationPropertyInfo>>, - { + pub fn PopulatePropertyInfo(&self, propertyname: &::windows::core::HSTRING, propertyinfo: &AnimationPropertyInfo) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).PopulatePropertyInfo)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(propertyname), propertyinfo.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).PopulatePropertyInfo)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(propertyname), ::core::mem::transmute_copy(propertyinfo)).ok() } } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] @@ -19559,12 +19194,9 @@ impl CompositionRoundedRectangleGeometry { (::windows::core::Vtable::vtable(this).ImplicitAnimations)(::windows::core::Vtable::as_raw(this), result__.as_mut_ptr()).from_abi::(result__) } } - pub fn SetImplicitAnimations<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, ImplicitAnimationCollection>>, - { + pub fn SetImplicitAnimations(&self, value: &ImplicitAnimationCollection) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).SetImplicitAnimations)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetImplicitAnimations)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } pub fn StartAnimationGroup<'a, P0, E0>(&self, value: P0) -> ::windows::core::Result<()> where @@ -19783,12 +19415,9 @@ unsafe impl ::core::marker::Sync for CompositionRoundedRectangleGeometry {} #[repr(transparent)] pub struct CompositionScopedBatch(::windows::core::IUnknown); impl CompositionScopedBatch { - pub fn PopulatePropertyInfo<'a, P0>(&self, propertyname: &::windows::core::HSTRING, propertyinfo: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, AnimationPropertyInfo>>, - { + pub fn PopulatePropertyInfo(&self, propertyname: &::windows::core::HSTRING, propertyinfo: &AnimationPropertyInfo) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).PopulatePropertyInfo)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(propertyname), propertyinfo.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).PopulatePropertyInfo)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(propertyname), ::core::mem::transmute_copy(propertyinfo)).ok() } } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] @@ -19848,12 +19477,9 @@ impl CompositionScopedBatch { (::windows::core::Vtable::vtable(this).ImplicitAnimations)(::windows::core::Vtable::as_raw(this), result__.as_mut_ptr()).from_abi::(result__) } } - pub fn SetImplicitAnimations<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, ImplicitAnimationCollection>>, - { + pub fn SetImplicitAnimations(&self, value: &ImplicitAnimationCollection) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).SetImplicitAnimations)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetImplicitAnimations)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } pub fn StartAnimationGroup<'a, P0, E0>(&self, value: P0) -> ::windows::core::Result<()> where @@ -19915,14 +19541,11 @@ impl CompositionScopedBatch { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn Completed<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler<::windows::core::IInspectable, CompositionBatchCompletedEventArgs>>>, - { + pub fn Completed(&self, handler: &super::super::Foundation::TypedEventHandler<::windows::core::IInspectable, CompositionBatchCompletedEventArgs>) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).Completed)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).Completed)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -20056,12 +19679,9 @@ unsafe impl ::core::marker::Sync for CompositionScopedBatch {} #[repr(transparent)] pub struct CompositionShadow(::windows::core::IUnknown); impl CompositionShadow { - pub fn PopulatePropertyInfo<'a, P0>(&self, propertyname: &::windows::core::HSTRING, propertyinfo: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, AnimationPropertyInfo>>, - { + pub fn PopulatePropertyInfo(&self, propertyname: &::windows::core::HSTRING, propertyinfo: &AnimationPropertyInfo) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).PopulatePropertyInfo)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(propertyname), propertyinfo.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).PopulatePropertyInfo)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(propertyname), ::core::mem::transmute_copy(propertyinfo)).ok() } } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] @@ -20121,12 +19741,9 @@ impl CompositionShadow { (::windows::core::Vtable::vtable(this).ImplicitAnimations)(::windows::core::Vtable::as_raw(this), result__.as_mut_ptr()).from_abi::(result__) } } - pub fn SetImplicitAnimations<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, ImplicitAnimationCollection>>, - { + pub fn SetImplicitAnimations(&self, value: &ImplicitAnimationCollection) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).SetImplicitAnimations)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetImplicitAnimations)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } pub fn StartAnimationGroup<'a, P0, E0>(&self, value: P0) -> ::windows::core::Result<()> where @@ -20285,12 +19902,9 @@ unsafe impl ::core::marker::Sync for CompositionShadow {} #[repr(transparent)] pub struct CompositionShape(::windows::core::IUnknown); impl CompositionShape { - pub fn PopulatePropertyInfo<'a, P0>(&self, propertyname: &::windows::core::HSTRING, propertyinfo: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, AnimationPropertyInfo>>, - { + pub fn PopulatePropertyInfo(&self, propertyname: &::windows::core::HSTRING, propertyinfo: &AnimationPropertyInfo) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).PopulatePropertyInfo)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(propertyname), propertyinfo.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).PopulatePropertyInfo)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(propertyname), ::core::mem::transmute_copy(propertyinfo)).ok() } } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] @@ -20350,12 +19964,9 @@ impl CompositionShape { (::windows::core::Vtable::vtable(this).ImplicitAnimations)(::windows::core::Vtable::as_raw(this), result__.as_mut_ptr()).from_abi::(result__) } } - pub fn SetImplicitAnimations<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, ImplicitAnimationCollection>>, - { + pub fn SetImplicitAnimations(&self, value: &ImplicitAnimationCollection) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).SetImplicitAnimations)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetImplicitAnimations)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } pub fn StartAnimationGroup<'a, P0, E0>(&self, value: P0) -> ::windows::core::Result<()> where @@ -20598,12 +20209,9 @@ unsafe impl ::core::marker::Sync for CompositionShape {} pub struct CompositionShapeCollection(::windows::core::IUnknown); #[cfg(feature = "Foundation_Collections")] impl CompositionShapeCollection { - pub fn PopulatePropertyInfo<'a, P0>(&self, propertyname: &::windows::core::HSTRING, propertyinfo: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, AnimationPropertyInfo>>, - { + pub fn PopulatePropertyInfo(&self, propertyname: &::windows::core::HSTRING, propertyinfo: &AnimationPropertyInfo) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).PopulatePropertyInfo)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(propertyname), propertyinfo.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).PopulatePropertyInfo)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(propertyname), ::core::mem::transmute_copy(propertyinfo)).ok() } } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] @@ -20663,12 +20271,9 @@ impl CompositionShapeCollection { (::windows::core::Vtable::vtable(this).ImplicitAnimations)(::windows::core::Vtable::as_raw(this), result__.as_mut_ptr()).from_abi::(result__) } } - pub fn SetImplicitAnimations<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, ImplicitAnimationCollection>>, - { + pub fn SetImplicitAnimations(&self, value: &ImplicitAnimationCollection) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).SetImplicitAnimations)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetImplicitAnimations)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } pub fn StartAnimationGroup<'a, P0, E0>(&self, value: P0) -> ::windows::core::Result<()> where @@ -21017,12 +20622,9 @@ unsafe impl ::core::marker::Sync for CompositionShapeCollection {} #[repr(transparent)] pub struct CompositionSpriteShape(::windows::core::IUnknown); impl CompositionSpriteShape { - pub fn PopulatePropertyInfo<'a, P0>(&self, propertyname: &::windows::core::HSTRING, propertyinfo: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, AnimationPropertyInfo>>, - { + pub fn PopulatePropertyInfo(&self, propertyname: &::windows::core::HSTRING, propertyinfo: &AnimationPropertyInfo) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).PopulatePropertyInfo)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(propertyname), propertyinfo.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).PopulatePropertyInfo)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(propertyname), ::core::mem::transmute_copy(propertyinfo)).ok() } } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] @@ -21082,12 +20684,9 @@ impl CompositionSpriteShape { (::windows::core::Vtable::vtable(this).ImplicitAnimations)(::windows::core::Vtable::as_raw(this), result__.as_mut_ptr()).from_abi::(result__) } } - pub fn SetImplicitAnimations<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, ImplicitAnimationCollection>>, - { + pub fn SetImplicitAnimations(&self, value: &ImplicitAnimationCollection) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).SetImplicitAnimations)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetImplicitAnimations)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } pub fn StartAnimationGroup<'a, P0, E0>(&self, value: P0) -> ::windows::core::Result<()> where @@ -21484,12 +21083,9 @@ unsafe impl ::core::marker::Sync for CompositionSpriteShape {} pub struct CompositionStrokeDashArray(::windows::core::IUnknown); #[cfg(feature = "Foundation_Collections")] impl CompositionStrokeDashArray { - pub fn PopulatePropertyInfo<'a, P0>(&self, propertyname: &::windows::core::HSTRING, propertyinfo: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, AnimationPropertyInfo>>, - { + pub fn PopulatePropertyInfo(&self, propertyname: &::windows::core::HSTRING, propertyinfo: &AnimationPropertyInfo) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).PopulatePropertyInfo)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(propertyname), propertyinfo.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).PopulatePropertyInfo)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(propertyname), ::core::mem::transmute_copy(propertyinfo)).ok() } } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] @@ -21549,12 +21145,9 @@ impl CompositionStrokeDashArray { (::windows::core::Vtable::vtable(this).ImplicitAnimations)(::windows::core::Vtable::as_raw(this), result__.as_mut_ptr()).from_abi::(result__) } } - pub fn SetImplicitAnimations<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, ImplicitAnimationCollection>>, - { + pub fn SetImplicitAnimations(&self, value: &ImplicitAnimationCollection) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).SetImplicitAnimations)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetImplicitAnimations)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } pub fn StartAnimationGroup<'a, P0, E0>(&self, value: P0) -> ::windows::core::Result<()> where @@ -21891,12 +21484,9 @@ unsafe impl ::core::marker::Sync for CompositionStrokeDashArray {} #[repr(transparent)] pub struct CompositionSurfaceBrush(::windows::core::IUnknown); impl CompositionSurfaceBrush { - pub fn PopulatePropertyInfo<'a, P0>(&self, propertyname: &::windows::core::HSTRING, propertyinfo: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, AnimationPropertyInfo>>, - { + pub fn PopulatePropertyInfo(&self, propertyname: &::windows::core::HSTRING, propertyinfo: &AnimationPropertyInfo) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).PopulatePropertyInfo)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(propertyname), propertyinfo.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).PopulatePropertyInfo)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(propertyname), ::core::mem::transmute_copy(propertyinfo)).ok() } } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] @@ -21956,12 +21546,9 @@ impl CompositionSurfaceBrush { (::windows::core::Vtable::vtable(this).ImplicitAnimations)(::windows::core::Vtable::as_raw(this), result__.as_mut_ptr()).from_abi::(result__) } } - pub fn SetImplicitAnimations<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, ImplicitAnimationCollection>>, - { + pub fn SetImplicitAnimations(&self, value: &ImplicitAnimationCollection) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).SetImplicitAnimations)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetImplicitAnimations)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } pub fn StartAnimationGroup<'a, P0, E0>(&self, value: P0) -> ::windows::core::Result<()> where @@ -22302,12 +21889,9 @@ unsafe impl ::core::marker::Sync for CompositionSurfaceBrush {} #[repr(transparent)] pub struct CompositionTarget(::windows::core::IUnknown); impl CompositionTarget { - pub fn PopulatePropertyInfo<'a, P0>(&self, propertyname: &::windows::core::HSTRING, propertyinfo: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, AnimationPropertyInfo>>, - { + pub fn PopulatePropertyInfo(&self, propertyname: &::windows::core::HSTRING, propertyinfo: &AnimationPropertyInfo) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).PopulatePropertyInfo)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(propertyname), propertyinfo.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).PopulatePropertyInfo)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(propertyname), ::core::mem::transmute_copy(propertyinfo)).ok() } } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] @@ -22367,12 +21951,9 @@ impl CompositionTarget { (::windows::core::Vtable::vtable(this).ImplicitAnimations)(::windows::core::Vtable::as_raw(this), result__.as_mut_ptr()).from_abi::(result__) } } - pub fn SetImplicitAnimations<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, ImplicitAnimationCollection>>, - { + pub fn SetImplicitAnimations(&self, value: &ImplicitAnimationCollection) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).SetImplicitAnimations)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetImplicitAnimations)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } pub fn StartAnimationGroup<'a, P0, E0>(&self, value: P0) -> ::windows::core::Result<()> where @@ -22545,12 +22126,9 @@ unsafe impl ::core::marker::Sync for CompositionTarget {} #[repr(transparent)] pub struct CompositionTransform(::windows::core::IUnknown); impl CompositionTransform { - pub fn PopulatePropertyInfo<'a, P0>(&self, propertyname: &::windows::core::HSTRING, propertyinfo: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, AnimationPropertyInfo>>, - { + pub fn PopulatePropertyInfo(&self, propertyname: &::windows::core::HSTRING, propertyinfo: &AnimationPropertyInfo) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).PopulatePropertyInfo)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(propertyname), propertyinfo.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).PopulatePropertyInfo)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(propertyname), ::core::mem::transmute_copy(propertyinfo)).ok() } } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] @@ -22610,12 +22188,9 @@ impl CompositionTransform { (::windows::core::Vtable::vtable(this).ImplicitAnimations)(::windows::core::Vtable::as_raw(this), result__.as_mut_ptr()).from_abi::(result__) } } - pub fn SetImplicitAnimations<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, ImplicitAnimationCollection>>, - { + pub fn SetImplicitAnimations(&self, value: &ImplicitAnimationCollection) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).SetImplicitAnimations)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetImplicitAnimations)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } pub fn StartAnimationGroup<'a, P0, E0>(&self, value: P0) -> ::windows::core::Result<()> where @@ -22774,12 +22349,9 @@ unsafe impl ::core::marker::Sync for CompositionTransform {} #[repr(transparent)] pub struct CompositionViewBox(::windows::core::IUnknown); impl CompositionViewBox { - pub fn PopulatePropertyInfo<'a, P0>(&self, propertyname: &::windows::core::HSTRING, propertyinfo: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, AnimationPropertyInfo>>, - { + pub fn PopulatePropertyInfo(&self, propertyname: &::windows::core::HSTRING, propertyinfo: &AnimationPropertyInfo) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).PopulatePropertyInfo)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(propertyname), propertyinfo.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).PopulatePropertyInfo)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(propertyname), ::core::mem::transmute_copy(propertyinfo)).ok() } } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] @@ -22839,12 +22411,9 @@ impl CompositionViewBox { (::windows::core::Vtable::vtable(this).ImplicitAnimations)(::windows::core::Vtable::as_raw(this), result__.as_mut_ptr()).from_abi::(result__) } } - pub fn SetImplicitAnimations<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, ImplicitAnimationCollection>>, - { + pub fn SetImplicitAnimations(&self, value: &ImplicitAnimationCollection) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).SetImplicitAnimations)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetImplicitAnimations)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } pub fn StartAnimationGroup<'a, P0, E0>(&self, value: P0) -> ::windows::core::Result<()> where @@ -23066,12 +22635,9 @@ unsafe impl ::core::marker::Sync for CompositionViewBox {} #[repr(transparent)] pub struct CompositionVirtualDrawingSurface(::windows::core::IUnknown); impl CompositionVirtualDrawingSurface { - pub fn PopulatePropertyInfo<'a, P0>(&self, propertyname: &::windows::core::HSTRING, propertyinfo: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, AnimationPropertyInfo>>, - { + pub fn PopulatePropertyInfo(&self, propertyname: &::windows::core::HSTRING, propertyinfo: &AnimationPropertyInfo) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).PopulatePropertyInfo)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(propertyname), propertyinfo.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).PopulatePropertyInfo)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(propertyname), ::core::mem::transmute_copy(propertyinfo)).ok() } } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] @@ -23197,12 +22763,9 @@ impl CompositionVirtualDrawingSurface { (::windows::core::Vtable::vtable(this).ImplicitAnimations)(::windows::core::Vtable::as_raw(this), result__.as_mut_ptr()).from_abi::(result__) } } - pub fn SetImplicitAnimations<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, ImplicitAnimationCollection>>, - { + pub fn SetImplicitAnimations(&self, value: &ImplicitAnimationCollection) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).SetImplicitAnimations)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetImplicitAnimations)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } pub fn StartAnimationGroup<'a, P0, E0>(&self, value: P0) -> ::windows::core::Result<()> where @@ -23401,12 +22964,9 @@ unsafe impl ::core::marker::Sync for CompositionVirtualDrawingSurface {} #[repr(transparent)] pub struct CompositionVisualSurface(::windows::core::IUnknown); impl CompositionVisualSurface { - pub fn PopulatePropertyInfo<'a, P0>(&self, propertyname: &::windows::core::HSTRING, propertyinfo: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, AnimationPropertyInfo>>, - { + pub fn PopulatePropertyInfo(&self, propertyname: &::windows::core::HSTRING, propertyinfo: &AnimationPropertyInfo) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).PopulatePropertyInfo)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(propertyname), propertyinfo.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).PopulatePropertyInfo)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(propertyname), ::core::mem::transmute_copy(propertyinfo)).ok() } } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] @@ -23466,12 +23026,9 @@ impl CompositionVisualSurface { (::windows::core::Vtable::vtable(this).ImplicitAnimations)(::windows::core::Vtable::as_raw(this), result__.as_mut_ptr()).from_abi::(result__) } } - pub fn SetImplicitAnimations<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, ImplicitAnimationCollection>>, - { + pub fn SetImplicitAnimations(&self, value: &ImplicitAnimationCollection) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).SetImplicitAnimations)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetImplicitAnimations)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } pub fn StartAnimationGroup<'a, P0, E0>(&self, value: P0) -> ::windows::core::Result<()> where @@ -24105,14 +23662,11 @@ impl Compositor { (::windows::core::Vtable::vtable(this).CreatePathGeometry)(::windows::core::Vtable::as_raw(this), result__.as_mut_ptr()).from_abi::(result__) } } - pub fn CreatePathGeometryWithPath<'a, P0>(&self, path: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, CompositionPath>>, - { + pub fn CreatePathGeometryWithPath(&self, path: &CompositionPath) -> ::windows::core::Result { let this = &::windows::core::Interface::cast::(self)?; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).CreatePathGeometryWithPath)(::windows::core::Vtable::as_raw(this), path.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).CreatePathGeometryWithPath)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(path), result__.as_mut_ptr()).from_abi::(result__) } } pub fn CreatePathKeyFrameAnimation(&self) -> ::windows::core::Result { @@ -24406,12 +23960,9 @@ unsafe impl ::core::marker::Sync for Compositor {} #[repr(transparent)] pub struct ContainerVisual(::windows::core::IUnknown); impl ContainerVisual { - pub fn PopulatePropertyInfo<'a, P0>(&self, propertyname: &::windows::core::HSTRING, propertyinfo: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, AnimationPropertyInfo>>, - { + pub fn PopulatePropertyInfo(&self, propertyname: &::windows::core::HSTRING, propertyinfo: &AnimationPropertyInfo) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).PopulatePropertyInfo)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(propertyname), propertyinfo.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).PopulatePropertyInfo)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(propertyname), ::core::mem::transmute_copy(propertyinfo)).ok() } } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] @@ -24471,12 +24022,9 @@ impl ContainerVisual { (::windows::core::Vtable::vtable(this).ImplicitAnimations)(::windows::core::Vtable::as_raw(this), result__.as_mut_ptr()).from_abi::(result__) } } - pub fn SetImplicitAnimations<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, ImplicitAnimationCollection>>, - { + pub fn SetImplicitAnimations(&self, value: &ImplicitAnimationCollection) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).SetImplicitAnimations)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetImplicitAnimations)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } pub fn StartAnimationGroup<'a, P0, E0>(&self, value: P0) -> ::windows::core::Result<()> where @@ -24941,12 +24489,9 @@ unsafe impl ::core::marker::Sync for ContainerVisual {} #[repr(transparent)] pub struct CubicBezierEasingFunction(::windows::core::IUnknown); impl CubicBezierEasingFunction { - pub fn PopulatePropertyInfo<'a, P0>(&self, propertyname: &::windows::core::HSTRING, propertyinfo: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, AnimationPropertyInfo>>, - { + pub fn PopulatePropertyInfo(&self, propertyname: &::windows::core::HSTRING, propertyinfo: &AnimationPropertyInfo) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).PopulatePropertyInfo)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(propertyname), propertyinfo.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).PopulatePropertyInfo)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(propertyname), ::core::mem::transmute_copy(propertyinfo)).ok() } } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] @@ -25006,12 +24551,9 @@ impl CubicBezierEasingFunction { (::windows::core::Vtable::vtable(this).ImplicitAnimations)(::windows::core::Vtable::as_raw(this), result__.as_mut_ptr()).from_abi::(result__) } } - pub fn SetImplicitAnimations<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, ImplicitAnimationCollection>>, - { + pub fn SetImplicitAnimations(&self, value: &ImplicitAnimationCollection) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).SetImplicitAnimations)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetImplicitAnimations)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } pub fn StartAnimationGroup<'a, P0, E0>(&self, value: P0) -> ::windows::core::Result<()> where @@ -25203,12 +24745,9 @@ unsafe impl ::core::marker::Sync for CubicBezierEasingFunction {} #[repr(transparent)] pub struct DelegatedInkTrailVisual(::windows::core::IUnknown); impl DelegatedInkTrailVisual { - pub fn PopulatePropertyInfo<'a, P0>(&self, propertyname: &::windows::core::HSTRING, propertyinfo: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, AnimationPropertyInfo>>, - { + pub fn PopulatePropertyInfo(&self, propertyname: &::windows::core::HSTRING, propertyinfo: &AnimationPropertyInfo) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).PopulatePropertyInfo)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(propertyname), propertyinfo.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).PopulatePropertyInfo)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(propertyname), ::core::mem::transmute_copy(propertyinfo)).ok() } } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] @@ -25268,12 +24807,9 @@ impl DelegatedInkTrailVisual { (::windows::core::Vtable::vtable(this).ImplicitAnimations)(::windows::core::Vtable::as_raw(this), result__.as_mut_ptr()).from_abi::(result__) } } - pub fn SetImplicitAnimations<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, ImplicitAnimationCollection>>, - { + pub fn SetImplicitAnimations(&self, value: &ImplicitAnimationCollection) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).SetImplicitAnimations)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetImplicitAnimations)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } pub fn StartAnimationGroup<'a, P0, E0>(&self, value: P0) -> ::windows::core::Result<()> where @@ -25333,24 +24869,20 @@ impl DelegatedInkTrailVisual { let this = self; unsafe { (::windows::core::Vtable::vtable(this).StartNewTrail)(::windows::core::Vtable::as_raw(this), color).ok() } } - pub fn Create<'a, P0>(compositor: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, Compositor>>, - { + pub fn Create(compositor: &Compositor) -> ::windows::core::Result { Self::IDelegatedInkTrailVisualStatics(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).Create)(::windows::core::Vtable::as_raw(this), compositor.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).Create)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(compositor), result__.as_mut_ptr()).from_abi::(result__) }) } - pub fn CreateForSwapChain<'a, P0, P1, E1>(compositor: P0, swapchain: P1) -> ::windows::core::Result + pub fn CreateForSwapChain<'a, P0, E0>(compositor: &Compositor, swapchain: P0) -> ::windows::core::Result where - P0: ::std::convert::Into<::windows::core::InParam<'a, Compositor>>, - P1: ::std::convert::TryInto<::windows::core::InParam<'a, ICompositionSurface>, Error = E1>, - E1: ::std::convert::Into<::windows::core::Error>, + P0: ::std::convert::TryInto<::windows::core::InParam<'a, ICompositionSurface>, Error = E0>, + E0: ::std::convert::Into<::windows::core::Error>, { Self::IDelegatedInkTrailVisualStatics(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).CreateForSwapChain)(::windows::core::Vtable::as_raw(this), compositor.into().abi(), swapchain.try_into().map_err(|e| e.into())?.abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).CreateForSwapChain)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(compositor), swapchain.try_into().map_err(|e| e.into())?.abi(), result__.as_mut_ptr()).from_abi::(result__) }) } #[doc = "*Required features: `\"Foundation_Numerics\"`*"] @@ -25782,12 +25314,9 @@ unsafe impl ::core::marker::Sync for DelegatedInkTrailVisual {} #[repr(transparent)] pub struct DistantLight(::windows::core::IUnknown); impl DistantLight { - pub fn PopulatePropertyInfo<'a, P0>(&self, propertyname: &::windows::core::HSTRING, propertyinfo: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, AnimationPropertyInfo>>, - { + pub fn PopulatePropertyInfo(&self, propertyname: &::windows::core::HSTRING, propertyinfo: &AnimationPropertyInfo) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).PopulatePropertyInfo)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(propertyname), propertyinfo.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).PopulatePropertyInfo)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(propertyname), ::core::mem::transmute_copy(propertyinfo)).ok() } } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] @@ -25872,12 +25401,9 @@ impl DistantLight { (::windows::core::Vtable::vtable(this).ImplicitAnimations)(::windows::core::Vtable::as_raw(this), result__.as_mut_ptr()).from_abi::(result__) } } - pub fn SetImplicitAnimations<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, ImplicitAnimationCollection>>, - { + pub fn SetImplicitAnimations(&self, value: &ImplicitAnimationCollection) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).SetImplicitAnimations)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetImplicitAnimations)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } pub fn StartAnimationGroup<'a, P0, E0>(&self, value: P0) -> ::windows::core::Result<()> where @@ -26102,12 +25628,9 @@ unsafe impl ::core::marker::Sync for DistantLight {} #[repr(transparent)] pub struct DropShadow(::windows::core::IUnknown); impl DropShadow { - pub fn PopulatePropertyInfo<'a, P0>(&self, propertyname: &::windows::core::HSTRING, propertyinfo: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, AnimationPropertyInfo>>, - { + pub fn PopulatePropertyInfo(&self, propertyname: &::windows::core::HSTRING, propertyinfo: &AnimationPropertyInfo) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).PopulatePropertyInfo)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(propertyname), propertyinfo.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).PopulatePropertyInfo)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(propertyname), ::core::mem::transmute_copy(propertyinfo)).ok() } } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] @@ -26167,12 +25690,9 @@ impl DropShadow { (::windows::core::Vtable::vtable(this).ImplicitAnimations)(::windows::core::Vtable::as_raw(this), result__.as_mut_ptr()).from_abi::(result__) } } - pub fn SetImplicitAnimations<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, ImplicitAnimationCollection>>, - { + pub fn SetImplicitAnimations(&self, value: &ImplicitAnimationCollection) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).SetImplicitAnimations)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetImplicitAnimations)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } pub fn StartAnimationGroup<'a, P0, E0>(&self, value: P0) -> ::windows::core::Result<()> where @@ -26419,12 +25939,9 @@ unsafe impl ::core::marker::Sync for DropShadow {} #[repr(transparent)] pub struct ElasticEasingFunction(::windows::core::IUnknown); impl ElasticEasingFunction { - pub fn PopulatePropertyInfo<'a, P0>(&self, propertyname: &::windows::core::HSTRING, propertyinfo: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, AnimationPropertyInfo>>, - { + pub fn PopulatePropertyInfo(&self, propertyname: &::windows::core::HSTRING, propertyinfo: &AnimationPropertyInfo) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).PopulatePropertyInfo)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(propertyname), propertyinfo.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).PopulatePropertyInfo)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(propertyname), ::core::mem::transmute_copy(propertyinfo)).ok() } } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] @@ -26484,12 +26001,9 @@ impl ElasticEasingFunction { (::windows::core::Vtable::vtable(this).ImplicitAnimations)(::windows::core::Vtable::as_raw(this), result__.as_mut_ptr()).from_abi::(result__) } } - pub fn SetImplicitAnimations<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, ImplicitAnimationCollection>>, - { + pub fn SetImplicitAnimations(&self, value: &ImplicitAnimationCollection) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).SetImplicitAnimations)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetImplicitAnimations)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } pub fn StartAnimationGroup<'a, P0, E0>(&self, value: P0) -> ::windows::core::Result<()> where @@ -26684,12 +26198,9 @@ unsafe impl ::core::marker::Sync for ElasticEasingFunction {} #[repr(transparent)] pub struct ExponentialEasingFunction(::windows::core::IUnknown); impl ExponentialEasingFunction { - pub fn PopulatePropertyInfo<'a, P0>(&self, propertyname: &::windows::core::HSTRING, propertyinfo: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, AnimationPropertyInfo>>, - { + pub fn PopulatePropertyInfo(&self, propertyname: &::windows::core::HSTRING, propertyinfo: &AnimationPropertyInfo) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).PopulatePropertyInfo)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(propertyname), propertyinfo.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).PopulatePropertyInfo)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(propertyname), ::core::mem::transmute_copy(propertyinfo)).ok() } } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] @@ -26749,12 +26260,9 @@ impl ExponentialEasingFunction { (::windows::core::Vtable::vtable(this).ImplicitAnimations)(::windows::core::Vtable::as_raw(this), result__.as_mut_ptr()).from_abi::(result__) } } - pub fn SetImplicitAnimations<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, ImplicitAnimationCollection>>, - { + pub fn SetImplicitAnimations(&self, value: &ImplicitAnimationCollection) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).SetImplicitAnimations)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetImplicitAnimations)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } pub fn StartAnimationGroup<'a, P0, E0>(&self, value: P0) -> ::windows::core::Result<()> where @@ -26942,12 +26450,9 @@ unsafe impl ::core::marker::Sync for ExponentialEasingFunction {} #[repr(transparent)] pub struct ExpressionAnimation(::windows::core::IUnknown); impl ExpressionAnimation { - pub fn PopulatePropertyInfo<'a, P0>(&self, propertyname: &::windows::core::HSTRING, propertyinfo: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, AnimationPropertyInfo>>, - { + pub fn PopulatePropertyInfo(&self, propertyname: &::windows::core::HSTRING, propertyinfo: &AnimationPropertyInfo) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).PopulatePropertyInfo)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(propertyname), propertyinfo.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).PopulatePropertyInfo)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(propertyname), ::core::mem::transmute_copy(propertyinfo)).ok() } } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] @@ -27098,12 +26603,9 @@ impl ExpressionAnimation { (::windows::core::Vtable::vtable(this).ImplicitAnimations)(::windows::core::Vtable::as_raw(this), result__.as_mut_ptr()).from_abi::(result__) } } - pub fn SetImplicitAnimations<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, ImplicitAnimationCollection>>, - { + pub fn SetImplicitAnimations(&self, value: &ImplicitAnimationCollection) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).SetImplicitAnimations)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetImplicitAnimations)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } pub fn StartAnimationGroup<'a, P0, E0>(&self, value: P0) -> ::windows::core::Result<()> where @@ -27307,12 +26809,9 @@ unsafe impl ::core::marker::Sync for ExpressionAnimation {} #[repr(transparent)] pub struct ImplicitAnimationCollection(::windows::core::IUnknown); impl ImplicitAnimationCollection { - pub fn PopulatePropertyInfo<'a, P0>(&self, propertyname: &::windows::core::HSTRING, propertyinfo: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, AnimationPropertyInfo>>, - { + pub fn PopulatePropertyInfo(&self, propertyname: &::windows::core::HSTRING, propertyinfo: &AnimationPropertyInfo) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).PopulatePropertyInfo)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(propertyname), propertyinfo.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).PopulatePropertyInfo)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(propertyname), ::core::mem::transmute_copy(propertyinfo)).ok() } } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] @@ -27372,12 +26871,9 @@ impl ImplicitAnimationCollection { (::windows::core::Vtable::vtable(this).ImplicitAnimations)(::windows::core::Vtable::as_raw(this), result__.as_mut_ptr()).from_abi::(result__) } } - pub fn SetImplicitAnimations<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, ImplicitAnimationCollection>>, - { + pub fn SetImplicitAnimations(&self, value: &ImplicitAnimationCollection) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).SetImplicitAnimations)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetImplicitAnimations)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } pub fn StartAnimationGroup<'a, P0, E0>(&self, value: P0) -> ::windows::core::Result<()> where @@ -27668,12 +27164,9 @@ unsafe impl ::core::marker::Sync for ImplicitAnimationCollection {} pub struct InitialValueExpressionCollection(::windows::core::IUnknown); #[cfg(feature = "Foundation_Collections")] impl InitialValueExpressionCollection { - pub fn PopulatePropertyInfo<'a, P0>(&self, propertyname: &::windows::core::HSTRING, propertyinfo: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, AnimationPropertyInfo>>, - { + pub fn PopulatePropertyInfo(&self, propertyname: &::windows::core::HSTRING, propertyinfo: &AnimationPropertyInfo) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).PopulatePropertyInfo)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(propertyname), propertyinfo.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).PopulatePropertyInfo)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(propertyname), ::core::mem::transmute_copy(propertyinfo)).ok() } } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] @@ -27733,12 +27226,9 @@ impl InitialValueExpressionCollection { (::windows::core::Vtable::vtable(this).ImplicitAnimations)(::windows::core::Vtable::as_raw(this), result__.as_mut_ptr()).from_abi::(result__) } } - pub fn SetImplicitAnimations<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, ImplicitAnimationCollection>>, - { + pub fn SetImplicitAnimations(&self, value: &ImplicitAnimationCollection) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).SetImplicitAnimations)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetImplicitAnimations)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } pub fn StartAnimationGroup<'a, P0, E0>(&self, value: P0) -> ::windows::core::Result<()> where @@ -28045,12 +27535,9 @@ unsafe impl ::core::marker::Sync for InitialValueExpressionCollection {} #[repr(transparent)] pub struct InsetClip(::windows::core::IUnknown); impl InsetClip { - pub fn PopulatePropertyInfo<'a, P0>(&self, propertyname: &::windows::core::HSTRING, propertyinfo: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, AnimationPropertyInfo>>, - { + pub fn PopulatePropertyInfo(&self, propertyname: &::windows::core::HSTRING, propertyinfo: &AnimationPropertyInfo) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).PopulatePropertyInfo)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(propertyname), propertyinfo.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).PopulatePropertyInfo)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(propertyname), ::core::mem::transmute_copy(propertyinfo)).ok() } } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] @@ -28207,12 +27694,9 @@ impl InsetClip { (::windows::core::Vtable::vtable(this).ImplicitAnimations)(::windows::core::Vtable::as_raw(this), result__.as_mut_ptr()).from_abi::(result__) } } - pub fn SetImplicitAnimations<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, ImplicitAnimationCollection>>, - { + pub fn SetImplicitAnimations(&self, value: &ImplicitAnimationCollection) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).SetImplicitAnimations)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetImplicitAnimations)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } pub fn StartAnimationGroup<'a, P0, E0>(&self, value: P0) -> ::windows::core::Result<()> where @@ -28430,12 +27914,9 @@ unsafe impl ::core::marker::Sync for InsetClip {} #[repr(transparent)] pub struct KeyFrameAnimation(::windows::core::IUnknown); impl KeyFrameAnimation { - pub fn PopulatePropertyInfo<'a, P0>(&self, propertyname: &::windows::core::HSTRING, propertyinfo: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, AnimationPropertyInfo>>, - { + pub fn PopulatePropertyInfo(&self, propertyname: &::windows::core::HSTRING, propertyinfo: &AnimationPropertyInfo) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).PopulatePropertyInfo)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(propertyname), propertyinfo.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).PopulatePropertyInfo)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(propertyname), ::core::mem::transmute_copy(propertyinfo)).ok() } } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] @@ -28586,12 +28067,9 @@ impl KeyFrameAnimation { (::windows::core::Vtable::vtable(this).ImplicitAnimations)(::windows::core::Vtable::as_raw(this), result__.as_mut_ptr()).from_abi::(result__) } } - pub fn SetImplicitAnimations<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, ImplicitAnimationCollection>>, - { + pub fn SetImplicitAnimations(&self, value: &ImplicitAnimationCollection) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).SetImplicitAnimations)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetImplicitAnimations)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } pub fn StartAnimationGroup<'a, P0, E0>(&self, value: P0) -> ::windows::core::Result<()> where @@ -28887,12 +28365,9 @@ unsafe impl ::core::marker::Sync for KeyFrameAnimation {} #[repr(transparent)] pub struct LayerVisual(::windows::core::IUnknown); impl LayerVisual { - pub fn PopulatePropertyInfo<'a, P0>(&self, propertyname: &::windows::core::HSTRING, propertyinfo: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, AnimationPropertyInfo>>, - { + pub fn PopulatePropertyInfo(&self, propertyname: &::windows::core::HSTRING, propertyinfo: &AnimationPropertyInfo) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).PopulatePropertyInfo)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(propertyname), propertyinfo.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).PopulatePropertyInfo)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(propertyname), ::core::mem::transmute_copy(propertyinfo)).ok() } } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] @@ -28952,12 +28427,9 @@ impl LayerVisual { (::windows::core::Vtable::vtable(this).ImplicitAnimations)(::windows::core::Vtable::as_raw(this), result__.as_mut_ptr()).from_abi::(result__) } } - pub fn SetImplicitAnimations<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, ImplicitAnimationCollection>>, - { + pub fn SetImplicitAnimations(&self, value: &ImplicitAnimationCollection) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).SetImplicitAnimations)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetImplicitAnimations)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } pub fn StartAnimationGroup<'a, P0, E0>(&self, value: P0) -> ::windows::core::Result<()> where @@ -29005,12 +28477,9 @@ impl LayerVisual { (::windows::core::Vtable::vtable(this).Effect)(::windows::core::Vtable::as_raw(this), result__.as_mut_ptr()).from_abi::(result__) } } - pub fn SetEffect<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, CompositionEffectBrush>>, - { + pub fn SetEffect(&self, value: &CompositionEffectBrush) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).SetEffect)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetEffect)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } pub fn Shadow(&self) -> ::windows::core::Result { let this = &::windows::core::Interface::cast::(self)?; @@ -29465,12 +28934,9 @@ unsafe impl ::core::marker::Sync for LayerVisual {} #[repr(transparent)] pub struct LinearEasingFunction(::windows::core::IUnknown); impl LinearEasingFunction { - pub fn PopulatePropertyInfo<'a, P0>(&self, propertyname: &::windows::core::HSTRING, propertyinfo: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, AnimationPropertyInfo>>, - { + pub fn PopulatePropertyInfo(&self, propertyname: &::windows::core::HSTRING, propertyinfo: &AnimationPropertyInfo) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).PopulatePropertyInfo)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(propertyname), propertyinfo.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).PopulatePropertyInfo)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(propertyname), ::core::mem::transmute_copy(propertyinfo)).ok() } } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] @@ -29530,12 +28996,9 @@ impl LinearEasingFunction { (::windows::core::Vtable::vtable(this).ImplicitAnimations)(::windows::core::Vtable::as_raw(this), result__.as_mut_ptr()).from_abi::(result__) } } - pub fn SetImplicitAnimations<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, ImplicitAnimationCollection>>, - { + pub fn SetImplicitAnimations(&self, value: &ImplicitAnimationCollection) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).SetImplicitAnimations)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetImplicitAnimations)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } pub fn StartAnimationGroup<'a, P0, E0>(&self, value: P0) -> ::windows::core::Result<()> where @@ -29709,12 +29172,9 @@ unsafe impl ::core::marker::Sync for LinearEasingFunction {} #[repr(transparent)] pub struct NaturalMotionAnimation(::windows::core::IUnknown); impl NaturalMotionAnimation { - pub fn PopulatePropertyInfo<'a, P0>(&self, propertyname: &::windows::core::HSTRING, propertyinfo: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, AnimationPropertyInfo>>, - { + pub fn PopulatePropertyInfo(&self, propertyname: &::windows::core::HSTRING, propertyinfo: &AnimationPropertyInfo) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).PopulatePropertyInfo)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(propertyname), propertyinfo.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).PopulatePropertyInfo)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(propertyname), ::core::mem::transmute_copy(propertyinfo)).ok() } } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] @@ -29865,12 +29325,9 @@ impl NaturalMotionAnimation { (::windows::core::Vtable::vtable(this).ImplicitAnimations)(::windows::core::Vtable::as_raw(this), result__.as_mut_ptr()).from_abi::(result__) } } - pub fn SetImplicitAnimations<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, ImplicitAnimationCollection>>, - { + pub fn SetImplicitAnimations(&self, value: &ImplicitAnimationCollection) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).SetImplicitAnimations)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetImplicitAnimations)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } pub fn StartAnimationGroup<'a, P0, E0>(&self, value: P0) -> ::windows::core::Result<()> where @@ -30100,12 +29557,9 @@ unsafe impl ::core::marker::Sync for NaturalMotionAnimation {} #[repr(transparent)] pub struct PathKeyFrameAnimation(::windows::core::IUnknown); impl PathKeyFrameAnimation { - pub fn PopulatePropertyInfo<'a, P0>(&self, propertyname: &::windows::core::HSTRING, propertyinfo: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, AnimationPropertyInfo>>, - { + pub fn PopulatePropertyInfo(&self, propertyname: &::windows::core::HSTRING, propertyinfo: &AnimationPropertyInfo) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).PopulatePropertyInfo)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(propertyname), propertyinfo.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).PopulatePropertyInfo)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(propertyname), ::core::mem::transmute_copy(propertyinfo)).ok() } } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] @@ -30256,12 +29710,9 @@ impl PathKeyFrameAnimation { (::windows::core::Vtable::vtable(this).ImplicitAnimations)(::windows::core::Vtable::as_raw(this), result__.as_mut_ptr()).from_abi::(result__) } } - pub fn SetImplicitAnimations<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, ImplicitAnimationCollection>>, - { + pub fn SetImplicitAnimations(&self, value: &ImplicitAnimationCollection) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).SetImplicitAnimations)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetImplicitAnimations)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } pub fn StartAnimationGroup<'a, P0, E0>(&self, value: P0) -> ::windows::core::Result<()> where @@ -30398,20 +29849,16 @@ impl PathKeyFrameAnimation { let this = &::windows::core::Interface::cast::(self)?; unsafe { (::windows::core::Vtable::vtable(this).SetDelayBehavior)(::windows::core::Vtable::as_raw(this), value).ok() } } - pub fn InsertKeyFrame<'a, P0>(&self, normalizedprogresskey: f32, path: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, CompositionPath>>, - { + pub fn InsertKeyFrame(&self, normalizedprogresskey: f32, path: &CompositionPath) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).InsertKeyFrame)(::windows::core::Vtable::as_raw(this), normalizedprogresskey, path.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).InsertKeyFrame)(::windows::core::Vtable::as_raw(this), normalizedprogresskey, ::core::mem::transmute_copy(path)).ok() } } - pub fn InsertKeyFrameWithEasingFunction<'a, P0, P1>(&self, normalizedprogresskey: f32, path: P0, easingfunction: P1) -> ::windows::core::Result<()> + pub fn InsertKeyFrameWithEasingFunction<'a, P0>(&self, normalizedprogresskey: f32, path: &CompositionPath, easingfunction: P0) -> ::windows::core::Result<()> where - P0: ::std::convert::Into<::windows::core::InParam<'a, CompositionPath>>, - P1: ::std::convert::Into<::windows::core::InParam<'a, CompositionEasingFunction>>, + P0: ::std::convert::Into<::windows::core::InParam<'a, CompositionEasingFunction>>, { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).InsertKeyFrameWithEasingFunction)(::windows::core::Vtable::as_raw(this), normalizedprogresskey, path.into().abi(), easingfunction.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).InsertKeyFrameWithEasingFunction)(::windows::core::Vtable::as_raw(this), normalizedprogresskey, ::core::mem::transmute_copy(path), easingfunction.into().abi()).ok() } } } impl ::core::clone::Clone for PathKeyFrameAnimation { @@ -30587,12 +30034,9 @@ unsafe impl ::core::marker::Sync for PathKeyFrameAnimation {} #[repr(transparent)] pub struct PointLight(::windows::core::IUnknown); impl PointLight { - pub fn PopulatePropertyInfo<'a, P0>(&self, propertyname: &::windows::core::HSTRING, propertyinfo: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, AnimationPropertyInfo>>, - { + pub fn PopulatePropertyInfo(&self, propertyname: &::windows::core::HSTRING, propertyinfo: &AnimationPropertyInfo) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).PopulatePropertyInfo)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(propertyname), propertyinfo.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).PopulatePropertyInfo)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(propertyname), ::core::mem::transmute_copy(propertyinfo)).ok() } } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] @@ -30677,12 +30121,9 @@ impl PointLight { (::windows::core::Vtable::vtable(this).ImplicitAnimations)(::windows::core::Vtable::as_raw(this), result__.as_mut_ptr()).from_abi::(result__) } } - pub fn SetImplicitAnimations<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, ImplicitAnimationCollection>>, - { + pub fn SetImplicitAnimations(&self, value: &ImplicitAnimationCollection) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).SetImplicitAnimations)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetImplicitAnimations)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } pub fn StartAnimationGroup<'a, P0, E0>(&self, value: P0) -> ::windows::core::Result<()> where @@ -30962,12 +30403,9 @@ unsafe impl ::core::marker::Sync for PointLight {} #[repr(transparent)] pub struct PowerEasingFunction(::windows::core::IUnknown); impl PowerEasingFunction { - pub fn PopulatePropertyInfo<'a, P0>(&self, propertyname: &::windows::core::HSTRING, propertyinfo: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, AnimationPropertyInfo>>, - { + pub fn PopulatePropertyInfo(&self, propertyname: &::windows::core::HSTRING, propertyinfo: &AnimationPropertyInfo) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).PopulatePropertyInfo)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(propertyname), propertyinfo.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).PopulatePropertyInfo)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(propertyname), ::core::mem::transmute_copy(propertyinfo)).ok() } } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] @@ -31027,12 +30465,9 @@ impl PowerEasingFunction { (::windows::core::Vtable::vtable(this).ImplicitAnimations)(::windows::core::Vtable::as_raw(this), result__.as_mut_ptr()).from_abi::(result__) } } - pub fn SetImplicitAnimations<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, ImplicitAnimationCollection>>, - { + pub fn SetImplicitAnimations(&self, value: &ImplicitAnimationCollection) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).SetImplicitAnimations)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetImplicitAnimations)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } pub fn StartAnimationGroup<'a, P0, E0>(&self, value: P0) -> ::windows::core::Result<()> where @@ -31220,12 +30655,9 @@ unsafe impl ::core::marker::Sync for PowerEasingFunction {} #[repr(transparent)] pub struct QuaternionKeyFrameAnimation(::windows::core::IUnknown); impl QuaternionKeyFrameAnimation { - pub fn PopulatePropertyInfo<'a, P0>(&self, propertyname: &::windows::core::HSTRING, propertyinfo: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, AnimationPropertyInfo>>, - { + pub fn PopulatePropertyInfo(&self, propertyname: &::windows::core::HSTRING, propertyinfo: &AnimationPropertyInfo) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).PopulatePropertyInfo)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(propertyname), propertyinfo.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).PopulatePropertyInfo)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(propertyname), ::core::mem::transmute_copy(propertyinfo)).ok() } } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] @@ -31376,12 +30808,9 @@ impl QuaternionKeyFrameAnimation { (::windows::core::Vtable::vtable(this).ImplicitAnimations)(::windows::core::Vtable::as_raw(this), result__.as_mut_ptr()).from_abi::(result__) } } - pub fn SetImplicitAnimations<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, ImplicitAnimationCollection>>, - { + pub fn SetImplicitAnimations(&self, value: &ImplicitAnimationCollection) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).SetImplicitAnimations)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetImplicitAnimations)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } pub fn StartAnimationGroup<'a, P0, E0>(&self, value: P0) -> ::windows::core::Result<()> where @@ -31707,12 +31136,9 @@ unsafe impl ::core::marker::Sync for QuaternionKeyFrameAnimation {} #[repr(transparent)] pub struct RectangleClip(::windows::core::IUnknown); impl RectangleClip { - pub fn PopulatePropertyInfo<'a, P0>(&self, propertyname: &::windows::core::HSTRING, propertyinfo: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, AnimationPropertyInfo>>, - { + pub fn PopulatePropertyInfo(&self, propertyname: &::windows::core::HSTRING, propertyinfo: &AnimationPropertyInfo) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).PopulatePropertyInfo)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(propertyname), propertyinfo.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).PopulatePropertyInfo)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(propertyname), ::core::mem::transmute_copy(propertyinfo)).ok() } } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] @@ -31869,12 +31295,9 @@ impl RectangleClip { (::windows::core::Vtable::vtable(this).ImplicitAnimations)(::windows::core::Vtable::as_raw(this), result__.as_mut_ptr()).from_abi::(result__) } } - pub fn SetImplicitAnimations<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, ImplicitAnimationCollection>>, - { + pub fn SetImplicitAnimations(&self, value: &ImplicitAnimationCollection) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).SetImplicitAnimations)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetImplicitAnimations)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } pub fn StartAnimationGroup<'a, P0, E0>(&self, value: P0) -> ::windows::core::Result<()> where @@ -32152,12 +31575,9 @@ unsafe impl ::core::marker::Sync for RectangleClip {} #[repr(transparent)] pub struct RedirectVisual(::windows::core::IUnknown); impl RedirectVisual { - pub fn PopulatePropertyInfo<'a, P0>(&self, propertyname: &::windows::core::HSTRING, propertyinfo: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, AnimationPropertyInfo>>, - { + pub fn PopulatePropertyInfo(&self, propertyname: &::windows::core::HSTRING, propertyinfo: &AnimationPropertyInfo) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).PopulatePropertyInfo)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(propertyname), propertyinfo.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).PopulatePropertyInfo)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(propertyname), ::core::mem::transmute_copy(propertyinfo)).ok() } } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] @@ -32217,12 +31637,9 @@ impl RedirectVisual { (::windows::core::Vtable::vtable(this).ImplicitAnimations)(::windows::core::Vtable::as_raw(this), result__.as_mut_ptr()).from_abi::(result__) } } - pub fn SetImplicitAnimations<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, ImplicitAnimationCollection>>, - { + pub fn SetImplicitAnimations(&self, value: &ImplicitAnimationCollection) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).SetImplicitAnimations)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetImplicitAnimations)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } pub fn StartAnimationGroup<'a, P0, E0>(&self, value: P0) -> ::windows::core::Result<()> where @@ -32716,12 +32133,9 @@ unsafe impl ::core::marker::Sync for RedirectVisual {} #[repr(transparent)] pub struct RenderingDeviceReplacedEventArgs(::windows::core::IUnknown); impl RenderingDeviceReplacedEventArgs { - pub fn PopulatePropertyInfo<'a, P0>(&self, propertyname: &::windows::core::HSTRING, propertyinfo: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, AnimationPropertyInfo>>, - { + pub fn PopulatePropertyInfo(&self, propertyname: &::windows::core::HSTRING, propertyinfo: &AnimationPropertyInfo) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).PopulatePropertyInfo)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(propertyname), propertyinfo.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).PopulatePropertyInfo)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(propertyname), ::core::mem::transmute_copy(propertyinfo)).ok() } } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] @@ -32781,12 +32195,9 @@ impl RenderingDeviceReplacedEventArgs { (::windows::core::Vtable::vtable(this).ImplicitAnimations)(::windows::core::Vtable::as_raw(this), result__.as_mut_ptr()).from_abi::(result__) } } - pub fn SetImplicitAnimations<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, ImplicitAnimationCollection>>, - { + pub fn SetImplicitAnimations(&self, value: &ImplicitAnimationCollection) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).SetImplicitAnimations)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetImplicitAnimations)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } pub fn StartAnimationGroup<'a, P0, E0>(&self, value: P0) -> ::windows::core::Result<()> where @@ -32952,12 +32363,9 @@ unsafe impl ::core::marker::Sync for RenderingDeviceReplacedEventArgs {} #[repr(transparent)] pub struct ScalarKeyFrameAnimation(::windows::core::IUnknown); impl ScalarKeyFrameAnimation { - pub fn PopulatePropertyInfo<'a, P0>(&self, propertyname: &::windows::core::HSTRING, propertyinfo: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, AnimationPropertyInfo>>, - { + pub fn PopulatePropertyInfo(&self, propertyname: &::windows::core::HSTRING, propertyinfo: &AnimationPropertyInfo) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).PopulatePropertyInfo)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(propertyname), propertyinfo.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).PopulatePropertyInfo)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(propertyname), ::core::mem::transmute_copy(propertyinfo)).ok() } } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] @@ -33108,12 +32516,9 @@ impl ScalarKeyFrameAnimation { (::windows::core::Vtable::vtable(this).ImplicitAnimations)(::windows::core::Vtable::as_raw(this), result__.as_mut_ptr()).from_abi::(result__) } } - pub fn SetImplicitAnimations<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, ImplicitAnimationCollection>>, - { + pub fn SetImplicitAnimations(&self, value: &ImplicitAnimationCollection) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).SetImplicitAnimations)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetImplicitAnimations)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } pub fn StartAnimationGroup<'a, P0, E0>(&self, value: P0) -> ::windows::core::Result<()> where @@ -33435,12 +32840,9 @@ unsafe impl ::core::marker::Sync for ScalarKeyFrameAnimation {} #[repr(transparent)] pub struct ScalarNaturalMotionAnimation(::windows::core::IUnknown); impl ScalarNaturalMotionAnimation { - pub fn PopulatePropertyInfo<'a, P0>(&self, propertyname: &::windows::core::HSTRING, propertyinfo: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, AnimationPropertyInfo>>, - { + pub fn PopulatePropertyInfo(&self, propertyname: &::windows::core::HSTRING, propertyinfo: &AnimationPropertyInfo) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).PopulatePropertyInfo)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(propertyname), propertyinfo.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).PopulatePropertyInfo)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(propertyname), ::core::mem::transmute_copy(propertyinfo)).ok() } } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] @@ -33591,12 +32993,9 @@ impl ScalarNaturalMotionAnimation { (::windows::core::Vtable::vtable(this).ImplicitAnimations)(::windows::core::Vtable::as_raw(this), result__.as_mut_ptr()).from_abi::(result__) } } - pub fn SetImplicitAnimations<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, ImplicitAnimationCollection>>, - { + pub fn SetImplicitAnimations(&self, value: &ImplicitAnimationCollection) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).SetImplicitAnimations)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetImplicitAnimations)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } pub fn StartAnimationGroup<'a, P0, E0>(&self, value: P0) -> ::windows::core::Result<()> where @@ -33890,12 +33289,9 @@ unsafe impl ::core::marker::Sync for ScalarNaturalMotionAnimation {} #[repr(transparent)] pub struct ShapeVisual(::windows::core::IUnknown); impl ShapeVisual { - pub fn PopulatePropertyInfo<'a, P0>(&self, propertyname: &::windows::core::HSTRING, propertyinfo: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, AnimationPropertyInfo>>, - { + pub fn PopulatePropertyInfo(&self, propertyname: &::windows::core::HSTRING, propertyinfo: &AnimationPropertyInfo) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).PopulatePropertyInfo)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(propertyname), propertyinfo.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).PopulatePropertyInfo)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(propertyname), ::core::mem::transmute_copy(propertyinfo)).ok() } } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] @@ -33955,12 +33351,9 @@ impl ShapeVisual { (::windows::core::Vtable::vtable(this).ImplicitAnimations)(::windows::core::Vtable::as_raw(this), result__.as_mut_ptr()).from_abi::(result__) } } - pub fn SetImplicitAnimations<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, ImplicitAnimationCollection>>, - { + pub fn SetImplicitAnimations(&self, value: &ImplicitAnimationCollection) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).SetImplicitAnimations)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetImplicitAnimations)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } pub fn StartAnimationGroup<'a, P0, E0>(&self, value: P0) -> ::windows::core::Result<()> where @@ -34017,12 +33410,9 @@ impl ShapeVisual { (::windows::core::Vtable::vtable(this).ViewBox)(::windows::core::Vtable::as_raw(this), result__.as_mut_ptr()).from_abi::(result__) } } - pub fn SetViewBox<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, CompositionViewBox>>, - { + pub fn SetViewBox(&self, value: &CompositionViewBox) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).SetViewBox)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetViewBox)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } #[doc = "*Required features: `\"Foundation_Numerics\"`*"] #[cfg(feature = "Foundation_Numerics")] @@ -34463,12 +33853,9 @@ unsafe impl ::core::marker::Sync for ShapeVisual {} #[repr(transparent)] pub struct SineEasingFunction(::windows::core::IUnknown); impl SineEasingFunction { - pub fn PopulatePropertyInfo<'a, P0>(&self, propertyname: &::windows::core::HSTRING, propertyinfo: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, AnimationPropertyInfo>>, - { + pub fn PopulatePropertyInfo(&self, propertyname: &::windows::core::HSTRING, propertyinfo: &AnimationPropertyInfo) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).PopulatePropertyInfo)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(propertyname), propertyinfo.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).PopulatePropertyInfo)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(propertyname), ::core::mem::transmute_copy(propertyinfo)).ok() } } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] @@ -34528,12 +33915,9 @@ impl SineEasingFunction { (::windows::core::Vtable::vtable(this).ImplicitAnimations)(::windows::core::Vtable::as_raw(this), result__.as_mut_ptr()).from_abi::(result__) } } - pub fn SetImplicitAnimations<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, ImplicitAnimationCollection>>, - { + pub fn SetImplicitAnimations(&self, value: &ImplicitAnimationCollection) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).SetImplicitAnimations)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetImplicitAnimations)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } pub fn StartAnimationGroup<'a, P0, E0>(&self, value: P0) -> ::windows::core::Result<()> where @@ -34714,12 +34098,9 @@ unsafe impl ::core::marker::Sync for SineEasingFunction {} #[repr(transparent)] pub struct SpotLight(::windows::core::IUnknown); impl SpotLight { - pub fn PopulatePropertyInfo<'a, P0>(&self, propertyname: &::windows::core::HSTRING, propertyinfo: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, AnimationPropertyInfo>>, - { + pub fn PopulatePropertyInfo(&self, propertyname: &::windows::core::HSTRING, propertyinfo: &AnimationPropertyInfo) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).PopulatePropertyInfo)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(propertyname), propertyinfo.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).PopulatePropertyInfo)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(propertyname), ::core::mem::transmute_copy(propertyinfo)).ok() } } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] @@ -34804,12 +34185,9 @@ impl SpotLight { (::windows::core::Vtable::vtable(this).ImplicitAnimations)(::windows::core::Vtable::as_raw(this), result__.as_mut_ptr()).from_abi::(result__) } } - pub fn SetImplicitAnimations<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, ImplicitAnimationCollection>>, - { + pub fn SetImplicitAnimations(&self, value: &ImplicitAnimationCollection) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).SetImplicitAnimations)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetImplicitAnimations)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } pub fn StartAnimationGroup<'a, P0, E0>(&self, value: P0) -> ::windows::core::Result<()> where @@ -35170,12 +34548,9 @@ unsafe impl ::core::marker::Sync for SpotLight {} #[repr(transparent)] pub struct SpringScalarNaturalMotionAnimation(::windows::core::IUnknown); impl SpringScalarNaturalMotionAnimation { - pub fn PopulatePropertyInfo<'a, P0>(&self, propertyname: &::windows::core::HSTRING, propertyinfo: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, AnimationPropertyInfo>>, - { + pub fn PopulatePropertyInfo(&self, propertyname: &::windows::core::HSTRING, propertyinfo: &AnimationPropertyInfo) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).PopulatePropertyInfo)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(propertyname), propertyinfo.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).PopulatePropertyInfo)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(propertyname), ::core::mem::transmute_copy(propertyinfo)).ok() } } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] @@ -35326,12 +34701,9 @@ impl SpringScalarNaturalMotionAnimation { (::windows::core::Vtable::vtable(this).ImplicitAnimations)(::windows::core::Vtable::as_raw(this), result__.as_mut_ptr()).from_abi::(result__) } } - pub fn SetImplicitAnimations<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, ImplicitAnimationCollection>>, - { + pub fn SetImplicitAnimations(&self, value: &ImplicitAnimationCollection) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).SetImplicitAnimations)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetImplicitAnimations)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } pub fn StartAnimationGroup<'a, P0, E0>(&self, value: P0) -> ::windows::core::Result<()> where @@ -35666,12 +35038,9 @@ unsafe impl ::core::marker::Sync for SpringScalarNaturalMotionAnimation {} #[repr(transparent)] pub struct SpringVector2NaturalMotionAnimation(::windows::core::IUnknown); impl SpringVector2NaturalMotionAnimation { - pub fn PopulatePropertyInfo<'a, P0>(&self, propertyname: &::windows::core::HSTRING, propertyinfo: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, AnimationPropertyInfo>>, - { + pub fn PopulatePropertyInfo(&self, propertyname: &::windows::core::HSTRING, propertyinfo: &AnimationPropertyInfo) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).PopulatePropertyInfo)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(propertyname), propertyinfo.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).PopulatePropertyInfo)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(propertyname), ::core::mem::transmute_copy(propertyinfo)).ok() } } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] @@ -35822,12 +35191,9 @@ impl SpringVector2NaturalMotionAnimation { (::windows::core::Vtable::vtable(this).ImplicitAnimations)(::windows::core::Vtable::as_raw(this), result__.as_mut_ptr()).from_abi::(result__) } } - pub fn SetImplicitAnimations<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, ImplicitAnimationCollection>>, - { + pub fn SetImplicitAnimations(&self, value: &ImplicitAnimationCollection) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).SetImplicitAnimations)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetImplicitAnimations)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } pub fn StartAnimationGroup<'a, P0, E0>(&self, value: P0) -> ::windows::core::Result<()> where @@ -36166,12 +35532,9 @@ unsafe impl ::core::marker::Sync for SpringVector2NaturalMotionAnimation {} #[repr(transparent)] pub struct SpringVector3NaturalMotionAnimation(::windows::core::IUnknown); impl SpringVector3NaturalMotionAnimation { - pub fn PopulatePropertyInfo<'a, P0>(&self, propertyname: &::windows::core::HSTRING, propertyinfo: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, AnimationPropertyInfo>>, - { + pub fn PopulatePropertyInfo(&self, propertyname: &::windows::core::HSTRING, propertyinfo: &AnimationPropertyInfo) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).PopulatePropertyInfo)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(propertyname), propertyinfo.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).PopulatePropertyInfo)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(propertyname), ::core::mem::transmute_copy(propertyinfo)).ok() } } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] @@ -36322,12 +35685,9 @@ impl SpringVector3NaturalMotionAnimation { (::windows::core::Vtable::vtable(this).ImplicitAnimations)(::windows::core::Vtable::as_raw(this), result__.as_mut_ptr()).from_abi::(result__) } } - pub fn SetImplicitAnimations<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, ImplicitAnimationCollection>>, - { + pub fn SetImplicitAnimations(&self, value: &ImplicitAnimationCollection) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).SetImplicitAnimations)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetImplicitAnimations)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } pub fn StartAnimationGroup<'a, P0, E0>(&self, value: P0) -> ::windows::core::Result<()> where @@ -36666,12 +36026,9 @@ unsafe impl ::core::marker::Sync for SpringVector3NaturalMotionAnimation {} #[repr(transparent)] pub struct SpriteVisual(::windows::core::IUnknown); impl SpriteVisual { - pub fn PopulatePropertyInfo<'a, P0>(&self, propertyname: &::windows::core::HSTRING, propertyinfo: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, AnimationPropertyInfo>>, - { + pub fn PopulatePropertyInfo(&self, propertyname: &::windows::core::HSTRING, propertyinfo: &AnimationPropertyInfo) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).PopulatePropertyInfo)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(propertyname), propertyinfo.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).PopulatePropertyInfo)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(propertyname), ::core::mem::transmute_copy(propertyinfo)).ok() } } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] @@ -36731,12 +36088,9 @@ impl SpriteVisual { (::windows::core::Vtable::vtable(this).ImplicitAnimations)(::windows::core::Vtable::as_raw(this), result__.as_mut_ptr()).from_abi::(result__) } } - pub fn SetImplicitAnimations<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, ImplicitAnimationCollection>>, - { + pub fn SetImplicitAnimations(&self, value: &ImplicitAnimationCollection) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).SetImplicitAnimations)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetImplicitAnimations)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } pub fn StartAnimationGroup<'a, P0, E0>(&self, value: P0) -> ::windows::core::Result<()> where @@ -37244,12 +36598,9 @@ unsafe impl ::core::marker::Sync for SpriteVisual {} #[repr(transparent)] pub struct StepEasingFunction(::windows::core::IUnknown); impl StepEasingFunction { - pub fn PopulatePropertyInfo<'a, P0>(&self, propertyname: &::windows::core::HSTRING, propertyinfo: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, AnimationPropertyInfo>>, - { + pub fn PopulatePropertyInfo(&self, propertyname: &::windows::core::HSTRING, propertyinfo: &AnimationPropertyInfo) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).PopulatePropertyInfo)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(propertyname), propertyinfo.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).PopulatePropertyInfo)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(propertyname), ::core::mem::transmute_copy(propertyinfo)).ok() } } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] @@ -37309,12 +36660,9 @@ impl StepEasingFunction { (::windows::core::Vtable::vtable(this).ImplicitAnimations)(::windows::core::Vtable::as_raw(this), result__.as_mut_ptr()).from_abi::(result__) } } - pub fn SetImplicitAnimations<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, ImplicitAnimationCollection>>, - { + pub fn SetImplicitAnimations(&self, value: &ImplicitAnimationCollection) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).SetImplicitAnimations)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetImplicitAnimations)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } pub fn StartAnimationGroup<'a, P0, E0>(&self, value: P0) -> ::windows::core::Result<()> where @@ -37543,12 +36891,9 @@ unsafe impl ::core::marker::Sync for StepEasingFunction {} #[repr(transparent)] pub struct Vector2KeyFrameAnimation(::windows::core::IUnknown); impl Vector2KeyFrameAnimation { - pub fn PopulatePropertyInfo<'a, P0>(&self, propertyname: &::windows::core::HSTRING, propertyinfo: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, AnimationPropertyInfo>>, - { + pub fn PopulatePropertyInfo(&self, propertyname: &::windows::core::HSTRING, propertyinfo: &AnimationPropertyInfo) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).PopulatePropertyInfo)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(propertyname), propertyinfo.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).PopulatePropertyInfo)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(propertyname), ::core::mem::transmute_copy(propertyinfo)).ok() } } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] @@ -37699,12 +37044,9 @@ impl Vector2KeyFrameAnimation { (::windows::core::Vtable::vtable(this).ImplicitAnimations)(::windows::core::Vtable::as_raw(this), result__.as_mut_ptr()).from_abi::(result__) } } - pub fn SetImplicitAnimations<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, ImplicitAnimationCollection>>, - { + pub fn SetImplicitAnimations(&self, value: &ImplicitAnimationCollection) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).SetImplicitAnimations)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetImplicitAnimations)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } pub fn StartAnimationGroup<'a, P0, E0>(&self, value: P0) -> ::windows::core::Result<()> where @@ -38030,12 +37372,9 @@ unsafe impl ::core::marker::Sync for Vector2KeyFrameAnimation {} #[repr(transparent)] pub struct Vector2NaturalMotionAnimation(::windows::core::IUnknown); impl Vector2NaturalMotionAnimation { - pub fn PopulatePropertyInfo<'a, P0>(&self, propertyname: &::windows::core::HSTRING, propertyinfo: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, AnimationPropertyInfo>>, - { + pub fn PopulatePropertyInfo(&self, propertyname: &::windows::core::HSTRING, propertyinfo: &AnimationPropertyInfo) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).PopulatePropertyInfo)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(propertyname), propertyinfo.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).PopulatePropertyInfo)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(propertyname), ::core::mem::transmute_copy(propertyinfo)).ok() } } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] @@ -38186,12 +37525,9 @@ impl Vector2NaturalMotionAnimation { (::windows::core::Vtable::vtable(this).ImplicitAnimations)(::windows::core::Vtable::as_raw(this), result__.as_mut_ptr()).from_abi::(result__) } } - pub fn SetImplicitAnimations<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, ImplicitAnimationCollection>>, - { + pub fn SetImplicitAnimations(&self, value: &ImplicitAnimationCollection) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).SetImplicitAnimations)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetImplicitAnimations)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } pub fn StartAnimationGroup<'a, P0, E0>(&self, value: P0) -> ::windows::core::Result<()> where @@ -38489,12 +37825,9 @@ unsafe impl ::core::marker::Sync for Vector2NaturalMotionAnimation {} #[repr(transparent)] pub struct Vector3KeyFrameAnimation(::windows::core::IUnknown); impl Vector3KeyFrameAnimation { - pub fn PopulatePropertyInfo<'a, P0>(&self, propertyname: &::windows::core::HSTRING, propertyinfo: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, AnimationPropertyInfo>>, - { + pub fn PopulatePropertyInfo(&self, propertyname: &::windows::core::HSTRING, propertyinfo: &AnimationPropertyInfo) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).PopulatePropertyInfo)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(propertyname), propertyinfo.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).PopulatePropertyInfo)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(propertyname), ::core::mem::transmute_copy(propertyinfo)).ok() } } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] @@ -38645,12 +37978,9 @@ impl Vector3KeyFrameAnimation { (::windows::core::Vtable::vtable(this).ImplicitAnimations)(::windows::core::Vtable::as_raw(this), result__.as_mut_ptr()).from_abi::(result__) } } - pub fn SetImplicitAnimations<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, ImplicitAnimationCollection>>, - { + pub fn SetImplicitAnimations(&self, value: &ImplicitAnimationCollection) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).SetImplicitAnimations)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetImplicitAnimations)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } pub fn StartAnimationGroup<'a, P0, E0>(&self, value: P0) -> ::windows::core::Result<()> where @@ -38976,12 +38306,9 @@ unsafe impl ::core::marker::Sync for Vector3KeyFrameAnimation {} #[repr(transparent)] pub struct Vector3NaturalMotionAnimation(::windows::core::IUnknown); impl Vector3NaturalMotionAnimation { - pub fn PopulatePropertyInfo<'a, P0>(&self, propertyname: &::windows::core::HSTRING, propertyinfo: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, AnimationPropertyInfo>>, - { + pub fn PopulatePropertyInfo(&self, propertyname: &::windows::core::HSTRING, propertyinfo: &AnimationPropertyInfo) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).PopulatePropertyInfo)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(propertyname), propertyinfo.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).PopulatePropertyInfo)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(propertyname), ::core::mem::transmute_copy(propertyinfo)).ok() } } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] @@ -39132,12 +38459,9 @@ impl Vector3NaturalMotionAnimation { (::windows::core::Vtable::vtable(this).ImplicitAnimations)(::windows::core::Vtable::as_raw(this), result__.as_mut_ptr()).from_abi::(result__) } } - pub fn SetImplicitAnimations<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, ImplicitAnimationCollection>>, - { + pub fn SetImplicitAnimations(&self, value: &ImplicitAnimationCollection) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).SetImplicitAnimations)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetImplicitAnimations)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } pub fn StartAnimationGroup<'a, P0, E0>(&self, value: P0) -> ::windows::core::Result<()> where @@ -39435,12 +38759,9 @@ unsafe impl ::core::marker::Sync for Vector3NaturalMotionAnimation {} #[repr(transparent)] pub struct Vector4KeyFrameAnimation(::windows::core::IUnknown); impl Vector4KeyFrameAnimation { - pub fn PopulatePropertyInfo<'a, P0>(&self, propertyname: &::windows::core::HSTRING, propertyinfo: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, AnimationPropertyInfo>>, - { + pub fn PopulatePropertyInfo(&self, propertyname: &::windows::core::HSTRING, propertyinfo: &AnimationPropertyInfo) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).PopulatePropertyInfo)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(propertyname), propertyinfo.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).PopulatePropertyInfo)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(propertyname), ::core::mem::transmute_copy(propertyinfo)).ok() } } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] @@ -39591,12 +38912,9 @@ impl Vector4KeyFrameAnimation { (::windows::core::Vtable::vtable(this).ImplicitAnimations)(::windows::core::Vtable::as_raw(this), result__.as_mut_ptr()).from_abi::(result__) } } - pub fn SetImplicitAnimations<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, ImplicitAnimationCollection>>, - { + pub fn SetImplicitAnimations(&self, value: &ImplicitAnimationCollection) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).SetImplicitAnimations)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetImplicitAnimations)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } pub fn StartAnimationGroup<'a, P0, E0>(&self, value: P0) -> ::windows::core::Result<()> where @@ -39922,12 +39240,9 @@ unsafe impl ::core::marker::Sync for Vector4KeyFrameAnimation {} #[repr(transparent)] pub struct Visual(::windows::core::IUnknown); impl Visual { - pub fn PopulatePropertyInfo<'a, P0>(&self, propertyname: &::windows::core::HSTRING, propertyinfo: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, AnimationPropertyInfo>>, - { + pub fn PopulatePropertyInfo(&self, propertyname: &::windows::core::HSTRING, propertyinfo: &AnimationPropertyInfo) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).PopulatePropertyInfo)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(propertyname), propertyinfo.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).PopulatePropertyInfo)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(propertyname), ::core::mem::transmute_copy(propertyinfo)).ok() } } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] @@ -39987,12 +39302,9 @@ impl Visual { (::windows::core::Vtable::vtable(this).ImplicitAnimations)(::windows::core::Vtable::as_raw(this), result__.as_mut_ptr()).from_abi::(result__) } } - pub fn SetImplicitAnimations<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, ImplicitAnimationCollection>>, - { + pub fn SetImplicitAnimations(&self, value: &ImplicitAnimationCollection) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).SetImplicitAnimations)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetImplicitAnimations)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } pub fn StartAnimationGroup<'a, P0, E0>(&self, value: P0) -> ::windows::core::Result<()> where @@ -40435,12 +39747,9 @@ unsafe impl ::core::marker::Sync for Visual {} #[repr(transparent)] pub struct VisualCollection(::windows::core::IUnknown); impl VisualCollection { - pub fn PopulatePropertyInfo<'a, P0>(&self, propertyname: &::windows::core::HSTRING, propertyinfo: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, AnimationPropertyInfo>>, - { + pub fn PopulatePropertyInfo(&self, propertyname: &::windows::core::HSTRING, propertyinfo: &AnimationPropertyInfo) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).PopulatePropertyInfo)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(propertyname), propertyinfo.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).PopulatePropertyInfo)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(propertyname), ::core::mem::transmute_copy(propertyinfo)).ok() } } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] @@ -40500,12 +39809,9 @@ impl VisualCollection { (::windows::core::Vtable::vtable(this).ImplicitAnimations)(::windows::core::Vtable::as_raw(this), result__.as_mut_ptr()).from_abi::(result__) } } - pub fn SetImplicitAnimations<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, ImplicitAnimationCollection>>, - { + pub fn SetImplicitAnimations(&self, value: &ImplicitAnimationCollection) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).SetImplicitAnimations)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetImplicitAnimations)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } pub fn StartAnimationGroup<'a, P0, E0>(&self, value: P0) -> ::windows::core::Result<()> where @@ -40759,12 +40065,9 @@ unsafe impl ::core::marker::Sync for VisualCollection {} #[repr(transparent)] pub struct VisualUnorderedCollection(::windows::core::IUnknown); impl VisualUnorderedCollection { - pub fn PopulatePropertyInfo<'a, P0>(&self, propertyname: &::windows::core::HSTRING, propertyinfo: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, AnimationPropertyInfo>>, - { + pub fn PopulatePropertyInfo(&self, propertyname: &::windows::core::HSTRING, propertyinfo: &AnimationPropertyInfo) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).PopulatePropertyInfo)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(propertyname), propertyinfo.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).PopulatePropertyInfo)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(propertyname), ::core::mem::transmute_copy(propertyinfo)).ok() } } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] @@ -40824,12 +40127,9 @@ impl VisualUnorderedCollection { (::windows::core::Vtable::vtable(this).ImplicitAnimations)(::windows::core::Vtable::as_raw(this), result__.as_mut_ptr()).from_abi::(result__) } } - pub fn SetImplicitAnimations<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, ImplicitAnimationCollection>>, - { + pub fn SetImplicitAnimations(&self, value: &ImplicitAnimationCollection) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).SetImplicitAnimations)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetImplicitAnimations)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } pub fn StartAnimationGroup<'a, P0, E0>(&self, value: P0) -> ::windows::core::Result<()> where diff --git a/crates/libs/windows/src/Windows/UI/Core/Preview/mod.rs b/crates/libs/windows/src/Windows/UI/Core/Preview/mod.rs index 6d65720a52..2138a91eec 100644 --- a/crates/libs/windows/src/Windows/UI/Core/Preview/mod.rs +++ b/crates/libs/windows/src/Windows/UI/Core/Preview/mod.rs @@ -93,13 +93,10 @@ pub struct CoreAppWindowPreview(::windows::core::IUnknown); impl CoreAppWindowPreview { #[doc = "*Required features: `\"UI_WindowManagement\"`*"] #[cfg(feature = "UI_WindowManagement")] - pub fn GetIdFromWindow<'a, P0>(window: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::WindowManagement::AppWindow>>, - { + pub fn GetIdFromWindow(window: &super::super::WindowManagement::AppWindow) -> ::windows::core::Result { Self::ICoreAppWindowPreviewStatics(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).GetIdFromWindow)(::windows::core::Vtable::as_raw(this), window.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).GetIdFromWindow)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(window), result__.as_mut_ptr()).from_abi::(result__) }) } #[doc(hidden)] @@ -267,14 +264,11 @@ pub struct SystemNavigationManagerPreview(::windows::core::IUnknown); impl SystemNavigationManagerPreview { #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn CloseRequested<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Foundation::EventHandler>>, - { + pub fn CloseRequested(&self, handler: &super::super::super::Foundation::EventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).CloseRequested)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).CloseRequested)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] diff --git a/crates/libs/windows/src/Windows/UI/Core/mod.rs b/crates/libs/windows/src/Windows/UI/Core/mod.rs index 16ac2b1694..7dd3e7c4bd 100644 --- a/crates/libs/windows/src/Windows/UI/Core/mod.rs +++ b/crates/libs/windows/src/Windows/UI/Core/mod.rs @@ -121,14 +121,11 @@ pub struct ICoreAcceleratorKeys(::windows::core::IUnknown); impl ICoreAcceleratorKeys { #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn AcceleratorKeyActivated<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn AcceleratorKeyActivated(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).AcceleratorKeyActivated)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).AcceleratorKeyActivated)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -426,14 +423,11 @@ impl ICoreInputSourceBase { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn InputEnabled<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler<::windows::core::IInspectable, InputEnabledEventArgs>>>, - { + pub fn InputEnabled(&self, handler: &super::super::Foundation::TypedEventHandler<::windows::core::IInspectable, InputEnabledEventArgs>) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).InputEnabled)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).InputEnabled)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -610,23 +604,17 @@ impl ICorePointerInputSource { (::windows::core::Vtable::vtable(this).PointerCursor)(::windows::core::Vtable::as_raw(this), result__.as_mut_ptr()).from_abi::(result__) } } - pub fn SetPointerCursor<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, CoreCursor>>, - { + pub fn SetPointerCursor(&self, value: &CoreCursor) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).SetPointerCursor)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetPointerCursor)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn PointerCaptureLost<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler<::windows::core::IInspectable, PointerEventArgs>>>, - { + pub fn PointerCaptureLost(&self, handler: &super::super::Foundation::TypedEventHandler<::windows::core::IInspectable, PointerEventArgs>) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).PointerCaptureLost)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).PointerCaptureLost)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -637,14 +625,11 @@ impl ICorePointerInputSource { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn PointerEntered<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler<::windows::core::IInspectable, PointerEventArgs>>>, - { + pub fn PointerEntered(&self, handler: &super::super::Foundation::TypedEventHandler<::windows::core::IInspectable, PointerEventArgs>) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).PointerEntered)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).PointerEntered)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -655,14 +640,11 @@ impl ICorePointerInputSource { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn PointerExited<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler<::windows::core::IInspectable, PointerEventArgs>>>, - { + pub fn PointerExited(&self, handler: &super::super::Foundation::TypedEventHandler<::windows::core::IInspectable, PointerEventArgs>) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).PointerExited)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).PointerExited)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -673,14 +655,11 @@ impl ICorePointerInputSource { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn PointerMoved<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler<::windows::core::IInspectable, PointerEventArgs>>>, - { + pub fn PointerMoved(&self, handler: &super::super::Foundation::TypedEventHandler<::windows::core::IInspectable, PointerEventArgs>) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).PointerMoved)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).PointerMoved)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -691,14 +670,11 @@ impl ICorePointerInputSource { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn PointerPressed<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler<::windows::core::IInspectable, PointerEventArgs>>>, - { + pub fn PointerPressed(&self, handler: &super::super::Foundation::TypedEventHandler<::windows::core::IInspectable, PointerEventArgs>) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).PointerPressed)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).PointerPressed)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -709,14 +685,11 @@ impl ICorePointerInputSource { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn PointerReleased<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler<::windows::core::IInspectable, PointerEventArgs>>>, - { + pub fn PointerReleased(&self, handler: &super::super::Foundation::TypedEventHandler<::windows::core::IInspectable, PointerEventArgs>) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).PointerReleased)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).PointerReleased)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -727,14 +700,11 @@ impl ICorePointerInputSource { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn PointerWheelChanged<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler<::windows::core::IInspectable, PointerEventArgs>>>, - { + pub fn PointerWheelChanged(&self, handler: &super::super::Foundation::TypedEventHandler<::windows::core::IInspectable, PointerEventArgs>) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).PointerWheelChanged)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).PointerWheelChanged)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -917,23 +887,17 @@ impl ICorePointerInputSource2 { (::windows::core::Vtable::vtable(this).PointerCursor)(::windows::core::Vtable::as_raw(this), result__.as_mut_ptr()).from_abi::(result__) } } - pub fn SetPointerCursor<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, CoreCursor>>, - { + pub fn SetPointerCursor(&self, value: &CoreCursor) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).SetPointerCursor)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetPointerCursor)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn PointerCaptureLost<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler<::windows::core::IInspectable, PointerEventArgs>>>, - { + pub fn PointerCaptureLost(&self, handler: &super::super::Foundation::TypedEventHandler<::windows::core::IInspectable, PointerEventArgs>) -> ::windows::core::Result { let this = &::windows::core::Interface::cast::(self)?; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).PointerCaptureLost)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).PointerCaptureLost)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -944,14 +908,11 @@ impl ICorePointerInputSource2 { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn PointerEntered<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler<::windows::core::IInspectable, PointerEventArgs>>>, - { + pub fn PointerEntered(&self, handler: &super::super::Foundation::TypedEventHandler<::windows::core::IInspectable, PointerEventArgs>) -> ::windows::core::Result { let this = &::windows::core::Interface::cast::(self)?; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).PointerEntered)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).PointerEntered)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -962,14 +923,11 @@ impl ICorePointerInputSource2 { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn PointerExited<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler<::windows::core::IInspectable, PointerEventArgs>>>, - { + pub fn PointerExited(&self, handler: &super::super::Foundation::TypedEventHandler<::windows::core::IInspectable, PointerEventArgs>) -> ::windows::core::Result { let this = &::windows::core::Interface::cast::(self)?; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).PointerExited)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).PointerExited)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -980,14 +938,11 @@ impl ICorePointerInputSource2 { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn PointerMoved<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler<::windows::core::IInspectable, PointerEventArgs>>>, - { + pub fn PointerMoved(&self, handler: &super::super::Foundation::TypedEventHandler<::windows::core::IInspectable, PointerEventArgs>) -> ::windows::core::Result { let this = &::windows::core::Interface::cast::(self)?; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).PointerMoved)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).PointerMoved)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -998,14 +953,11 @@ impl ICorePointerInputSource2 { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn PointerPressed<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler<::windows::core::IInspectable, PointerEventArgs>>>, - { + pub fn PointerPressed(&self, handler: &super::super::Foundation::TypedEventHandler<::windows::core::IInspectable, PointerEventArgs>) -> ::windows::core::Result { let this = &::windows::core::Interface::cast::(self)?; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).PointerPressed)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).PointerPressed)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -1016,14 +968,11 @@ impl ICorePointerInputSource2 { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn PointerReleased<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler<::windows::core::IInspectable, PointerEventArgs>>>, - { + pub fn PointerReleased(&self, handler: &super::super::Foundation::TypedEventHandler<::windows::core::IInspectable, PointerEventArgs>) -> ::windows::core::Result { let this = &::windows::core::Interface::cast::(self)?; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).PointerReleased)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).PointerReleased)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -1034,14 +983,11 @@ impl ICorePointerInputSource2 { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn PointerWheelChanged<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler<::windows::core::IInspectable, PointerEventArgs>>>, - { + pub fn PointerWheelChanged(&self, handler: &super::super::Foundation::TypedEventHandler<::windows::core::IInspectable, PointerEventArgs>) -> ::windows::core::Result { let this = &::windows::core::Interface::cast::(self)?; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).PointerWheelChanged)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).PointerWheelChanged)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -1144,14 +1090,11 @@ pub struct ICorePointerRedirector(::windows::core::IUnknown); impl ICorePointerRedirector { #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn PointerRoutedAway<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn PointerRoutedAway(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).PointerRoutedAway)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).PointerRoutedAway)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -1162,14 +1105,11 @@ impl ICorePointerRedirector { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn PointerRoutedTo<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn PointerRoutedTo(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).PointerRoutedTo)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).PointerRoutedTo)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -1180,14 +1120,11 @@ impl ICorePointerRedirector { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn PointerRoutedReleased<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn PointerRoutedReleased(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).PointerRoutedReleased)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).PointerRoutedReleased)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -1372,12 +1309,9 @@ impl ICoreWindow { (::windows::core::Vtable::vtable(this).PointerCursor)(::windows::core::Vtable::as_raw(this), result__.as_mut_ptr()).from_abi::(result__) } } - pub fn SetPointerCursor<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, CoreCursor>>, - { + pub fn SetPointerCursor(&self, value: &CoreCursor) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).SetPointerCursor)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetPointerCursor)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] @@ -1431,14 +1365,11 @@ impl ICoreWindow { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn Activated<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn Activated(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).Activated)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).Activated)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -1449,14 +1380,11 @@ impl ICoreWindow { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn AutomationProviderRequested<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn AutomationProviderRequested(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).AutomationProviderRequested)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).AutomationProviderRequested)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -1467,14 +1395,11 @@ impl ICoreWindow { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn CharacterReceived<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn CharacterReceived(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).CharacterReceived)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).CharacterReceived)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -1485,14 +1410,11 @@ impl ICoreWindow { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn Closed<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn Closed(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).Closed)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).Closed)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -1503,14 +1425,11 @@ impl ICoreWindow { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn InputEnabled<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn InputEnabled(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).InputEnabled)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).InputEnabled)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -1521,14 +1440,11 @@ impl ICoreWindow { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn KeyDown<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn KeyDown(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).KeyDown)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).KeyDown)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -1539,14 +1455,11 @@ impl ICoreWindow { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn KeyUp<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn KeyUp(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).KeyUp)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).KeyUp)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -1557,14 +1470,11 @@ impl ICoreWindow { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn PointerCaptureLost<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn PointerCaptureLost(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).PointerCaptureLost)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).PointerCaptureLost)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -1575,14 +1485,11 @@ impl ICoreWindow { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn PointerEntered<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn PointerEntered(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).PointerEntered)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).PointerEntered)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -1593,14 +1500,11 @@ impl ICoreWindow { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn PointerExited<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn PointerExited(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).PointerExited)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).PointerExited)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -1611,14 +1515,11 @@ impl ICoreWindow { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn PointerMoved<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn PointerMoved(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).PointerMoved)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).PointerMoved)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -1629,14 +1530,11 @@ impl ICoreWindow { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn PointerPressed<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn PointerPressed(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).PointerPressed)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).PointerPressed)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -1647,14 +1545,11 @@ impl ICoreWindow { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn PointerReleased<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn PointerReleased(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).PointerReleased)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).PointerReleased)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -1665,14 +1560,11 @@ impl ICoreWindow { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn TouchHitTesting<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn TouchHitTesting(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).TouchHitTesting)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).TouchHitTesting)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -1683,14 +1575,11 @@ impl ICoreWindow { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn PointerWheelChanged<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn PointerWheelChanged(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).PointerWheelChanged)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).PointerWheelChanged)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -1701,14 +1590,11 @@ impl ICoreWindow { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn SizeChanged<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn SizeChanged(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).SizeChanged)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).SizeChanged)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -1719,14 +1605,11 @@ impl ICoreWindow { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn VisibilityChanged<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn VisibilityChanged(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).VisibilityChanged)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).VisibilityChanged)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -2397,12 +2280,9 @@ pub struct IIdleDispatchedHandlerArgs_Vtbl { #[repr(transparent)] pub struct IInitializeWithCoreWindow(::windows::core::IUnknown); impl IInitializeWithCoreWindow { - pub fn Initialize<'a, P0>(&self, window: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, CoreWindow>>, - { + pub fn Initialize(&self, window: &CoreWindow) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).Initialize)(::windows::core::Vtable::as_raw(this), window.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).Initialize)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(window)).ok() } } } impl ::core::convert::From for ::windows::core::IUnknown { @@ -3221,14 +3101,11 @@ pub struct CoreAcceleratorKeys(::windows::core::IUnknown); impl CoreAcceleratorKeys { #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn AcceleratorKeyActivated<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn AcceleratorKeyActivated(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).AcceleratorKeyActivated)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).AcceleratorKeyActivated)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -3327,14 +3204,11 @@ pub struct CoreComponentInputSource(::windows::core::IUnknown); impl CoreComponentInputSource { #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn ClosestInteractiveBoundsRequested<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn ClosestInteractiveBoundsRequested(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = &::windows::core::Interface::cast::(self)?; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).ClosestInteractiveBoundsRequested)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).ClosestInteractiveBoundsRequested)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -3352,14 +3226,11 @@ impl CoreComponentInputSource { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn GotFocus<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler<::windows::core::IInspectable, CoreWindowEventArgs>>>, - { + pub fn GotFocus(&self, handler: &super::super::Foundation::TypedEventHandler<::windows::core::IInspectable, CoreWindowEventArgs>) -> ::windows::core::Result { let this = &::windows::core::Interface::cast::(self)?; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).GotFocus)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).GotFocus)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -3370,14 +3241,11 @@ impl CoreComponentInputSource { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn LostFocus<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler<::windows::core::IInspectable, CoreWindowEventArgs>>>, - { + pub fn LostFocus(&self, handler: &super::super::Foundation::TypedEventHandler<::windows::core::IInspectable, CoreWindowEventArgs>) -> ::windows::core::Result { let this = &::windows::core::Interface::cast::(self)?; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).LostFocus)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).LostFocus)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -3406,14 +3274,11 @@ impl CoreComponentInputSource { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn InputEnabled<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler<::windows::core::IInspectable, InputEnabledEventArgs>>>, - { + pub fn InputEnabled(&self, handler: &super::super::Foundation::TypedEventHandler<::windows::core::IInspectable, InputEnabledEventArgs>) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).InputEnabled)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).InputEnabled)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -3433,14 +3298,11 @@ impl CoreComponentInputSource { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn CharacterReceived<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler<::windows::core::IInspectable, CharacterReceivedEventArgs>>>, - { + pub fn CharacterReceived(&self, handler: &super::super::Foundation::TypedEventHandler<::windows::core::IInspectable, CharacterReceivedEventArgs>) -> ::windows::core::Result { let this = &::windows::core::Interface::cast::(self)?; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).CharacterReceived)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).CharacterReceived)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -3451,14 +3313,11 @@ impl CoreComponentInputSource { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn KeyDown<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler<::windows::core::IInspectable, KeyEventArgs>>>, - { + pub fn KeyDown(&self, handler: &super::super::Foundation::TypedEventHandler<::windows::core::IInspectable, KeyEventArgs>) -> ::windows::core::Result { let this = &::windows::core::Interface::cast::(self)?; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).KeyDown)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).KeyDown)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -3469,14 +3328,11 @@ impl CoreComponentInputSource { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn KeyUp<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler<::windows::core::IInspectable, KeyEventArgs>>>, - { + pub fn KeyUp(&self, handler: &super::super::Foundation::TypedEventHandler<::windows::core::IInspectable, KeyEventArgs>) -> ::windows::core::Result { let this = &::windows::core::Interface::cast::(self)?; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).KeyUp)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).KeyUp)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -3523,23 +3379,17 @@ impl CoreComponentInputSource { (::windows::core::Vtable::vtable(this).PointerCursor)(::windows::core::Vtable::as_raw(this), result__.as_mut_ptr()).from_abi::(result__) } } - pub fn SetPointerCursor<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, CoreCursor>>, - { + pub fn SetPointerCursor(&self, value: &CoreCursor) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).SetPointerCursor)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetPointerCursor)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn PointerCaptureLost<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler<::windows::core::IInspectable, PointerEventArgs>>>, - { + pub fn PointerCaptureLost(&self, handler: &super::super::Foundation::TypedEventHandler<::windows::core::IInspectable, PointerEventArgs>) -> ::windows::core::Result { let this = &::windows::core::Interface::cast::(self)?; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).PointerCaptureLost)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).PointerCaptureLost)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -3550,14 +3400,11 @@ impl CoreComponentInputSource { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn PointerEntered<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler<::windows::core::IInspectable, PointerEventArgs>>>, - { + pub fn PointerEntered(&self, handler: &super::super::Foundation::TypedEventHandler<::windows::core::IInspectable, PointerEventArgs>) -> ::windows::core::Result { let this = &::windows::core::Interface::cast::(self)?; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).PointerEntered)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).PointerEntered)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -3568,14 +3415,11 @@ impl CoreComponentInputSource { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn PointerExited<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler<::windows::core::IInspectable, PointerEventArgs>>>, - { + pub fn PointerExited(&self, handler: &super::super::Foundation::TypedEventHandler<::windows::core::IInspectable, PointerEventArgs>) -> ::windows::core::Result { let this = &::windows::core::Interface::cast::(self)?; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).PointerExited)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).PointerExited)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -3586,14 +3430,11 @@ impl CoreComponentInputSource { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn PointerMoved<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler<::windows::core::IInspectable, PointerEventArgs>>>, - { + pub fn PointerMoved(&self, handler: &super::super::Foundation::TypedEventHandler<::windows::core::IInspectable, PointerEventArgs>) -> ::windows::core::Result { let this = &::windows::core::Interface::cast::(self)?; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).PointerMoved)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).PointerMoved)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -3604,14 +3445,11 @@ impl CoreComponentInputSource { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn PointerPressed<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler<::windows::core::IInspectable, PointerEventArgs>>>, - { + pub fn PointerPressed(&self, handler: &super::super::Foundation::TypedEventHandler<::windows::core::IInspectable, PointerEventArgs>) -> ::windows::core::Result { let this = &::windows::core::Interface::cast::(self)?; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).PointerPressed)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).PointerPressed)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -3622,14 +3460,11 @@ impl CoreComponentInputSource { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn PointerReleased<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler<::windows::core::IInspectable, PointerEventArgs>>>, - { + pub fn PointerReleased(&self, handler: &super::super::Foundation::TypedEventHandler<::windows::core::IInspectable, PointerEventArgs>) -> ::windows::core::Result { let this = &::windows::core::Interface::cast::(self)?; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).PointerReleased)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).PointerReleased)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -3640,14 +3475,11 @@ impl CoreComponentInputSource { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn PointerWheelChanged<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler<::windows::core::IInspectable, PointerEventArgs>>>, - { + pub fn PointerWheelChanged(&self, handler: &super::super::Foundation::TypedEventHandler<::windows::core::IInspectable, PointerEventArgs>) -> ::windows::core::Result { let this = &::windows::core::Interface::cast::(self)?; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).PointerWheelChanged)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).PointerWheelChanged)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -3667,14 +3499,11 @@ impl CoreComponentInputSource { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn TouchHitTesting<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler<::windows::core::IInspectable, TouchHitTestingEventArgs>>>, - { + pub fn TouchHitTesting(&self, handler: &super::super::Foundation::TypedEventHandler<::windows::core::IInspectable, TouchHitTestingEventArgs>) -> ::windows::core::Result { let this = &::windows::core::Interface::cast::(self)?; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).TouchHitTesting)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).TouchHitTesting)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -3905,14 +3734,11 @@ pub struct CoreDispatcher(::windows::core::IUnknown); impl CoreDispatcher { #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn AcceleratorKeyActivated<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn AcceleratorKeyActivated(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = &::windows::core::Interface::cast::(self)?; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).AcceleratorKeyActivated)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).AcceleratorKeyActivated)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -3934,50 +3760,38 @@ impl CoreDispatcher { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn RunAsync<'a, P0>(&self, priority: CoreDispatcherPriority, agilecallback: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, DispatchedHandler>>, - { + pub fn RunAsync(&self, priority: CoreDispatcherPriority, agilecallback: &DispatchedHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).RunAsync)(::windows::core::Vtable::as_raw(this), priority, agilecallback.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).RunAsync)(::windows::core::Vtable::as_raw(this), priority, ::core::mem::transmute_copy(agilecallback), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn RunIdleAsync<'a, P0>(&self, agilecallback: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, IdleDispatchedHandler>>, - { + pub fn RunIdleAsync(&self, agilecallback: &IdleDispatchedHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).RunIdleAsync)(::windows::core::Vtable::as_raw(this), agilecallback.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).RunIdleAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(agilecallback), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn TryRunAsync<'a, P0>(&self, priority: CoreDispatcherPriority, agilecallback: P0) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, DispatchedHandler>>, - { + pub fn TryRunAsync(&self, priority: CoreDispatcherPriority, agilecallback: &DispatchedHandler) -> ::windows::core::Result> { let this = &::windows::core::Interface::cast::(self)?; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).TryRunAsync)(::windows::core::Vtable::as_raw(this), priority, agilecallback.into().abi(), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).TryRunAsync)(::windows::core::Vtable::as_raw(this), priority, ::core::mem::transmute_copy(agilecallback), result__.as_mut_ptr()).from_abi::>(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn TryRunIdleAsync<'a, P0>(&self, agilecallback: P0) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, IdleDispatchedHandler>>, - { + pub fn TryRunIdleAsync(&self, agilecallback: &IdleDispatchedHandler) -> ::windows::core::Result> { let this = &::windows::core::Interface::cast::(self)?; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).TryRunIdleAsync)(::windows::core::Vtable::as_raw(this), agilecallback.into().abi(), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).TryRunIdleAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(agilecallback), result__.as_mut_ptr()).from_abi::>(result__) } } pub fn CurrentPriority(&self) -> ::windows::core::Result { @@ -4117,14 +3931,11 @@ impl CoreIndependentInputSource { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn InputEnabled<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler<::windows::core::IInspectable, InputEnabledEventArgs>>>, - { + pub fn InputEnabled(&self, handler: &super::super::Foundation::TypedEventHandler<::windows::core::IInspectable, InputEnabledEventArgs>) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).InputEnabled)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).InputEnabled)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -4164,23 +3975,17 @@ impl CoreIndependentInputSource { (::windows::core::Vtable::vtable(this).PointerCursor)(::windows::core::Vtable::as_raw(this), result__.as_mut_ptr()).from_abi::(result__) } } - pub fn SetPointerCursor<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, CoreCursor>>, - { + pub fn SetPointerCursor(&self, value: &CoreCursor) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).SetPointerCursor)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetPointerCursor)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn PointerCaptureLost<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler<::windows::core::IInspectable, PointerEventArgs>>>, - { + pub fn PointerCaptureLost(&self, handler: &super::super::Foundation::TypedEventHandler<::windows::core::IInspectable, PointerEventArgs>) -> ::windows::core::Result { let this = &::windows::core::Interface::cast::(self)?; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).PointerCaptureLost)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).PointerCaptureLost)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -4191,14 +3996,11 @@ impl CoreIndependentInputSource { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn PointerEntered<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler<::windows::core::IInspectable, PointerEventArgs>>>, - { + pub fn PointerEntered(&self, handler: &super::super::Foundation::TypedEventHandler<::windows::core::IInspectable, PointerEventArgs>) -> ::windows::core::Result { let this = &::windows::core::Interface::cast::(self)?; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).PointerEntered)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).PointerEntered)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -4209,14 +4011,11 @@ impl CoreIndependentInputSource { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn PointerExited<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler<::windows::core::IInspectable, PointerEventArgs>>>, - { + pub fn PointerExited(&self, handler: &super::super::Foundation::TypedEventHandler<::windows::core::IInspectable, PointerEventArgs>) -> ::windows::core::Result { let this = &::windows::core::Interface::cast::(self)?; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).PointerExited)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).PointerExited)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -4227,14 +4026,11 @@ impl CoreIndependentInputSource { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn PointerMoved<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler<::windows::core::IInspectable, PointerEventArgs>>>, - { + pub fn PointerMoved(&self, handler: &super::super::Foundation::TypedEventHandler<::windows::core::IInspectable, PointerEventArgs>) -> ::windows::core::Result { let this = &::windows::core::Interface::cast::(self)?; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).PointerMoved)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).PointerMoved)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -4245,14 +4041,11 @@ impl CoreIndependentInputSource { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn PointerPressed<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler<::windows::core::IInspectable, PointerEventArgs>>>, - { + pub fn PointerPressed(&self, handler: &super::super::Foundation::TypedEventHandler<::windows::core::IInspectable, PointerEventArgs>) -> ::windows::core::Result { let this = &::windows::core::Interface::cast::(self)?; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).PointerPressed)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).PointerPressed)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -4263,14 +4056,11 @@ impl CoreIndependentInputSource { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn PointerReleased<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler<::windows::core::IInspectable, PointerEventArgs>>>, - { + pub fn PointerReleased(&self, handler: &super::super::Foundation::TypedEventHandler<::windows::core::IInspectable, PointerEventArgs>) -> ::windows::core::Result { let this = &::windows::core::Interface::cast::(self)?; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).PointerReleased)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).PointerReleased)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -4281,14 +4071,11 @@ impl CoreIndependentInputSource { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn PointerWheelChanged<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler<::windows::core::IInspectable, PointerEventArgs>>>, - { + pub fn PointerWheelChanged(&self, handler: &super::super::Foundation::TypedEventHandler<::windows::core::IInspectable, PointerEventArgs>) -> ::windows::core::Result { let this = &::windows::core::Interface::cast::(self)?; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).PointerWheelChanged)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).PointerWheelChanged)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -4308,14 +4095,11 @@ impl CoreIndependentInputSource { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn PointerRoutedAway<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn PointerRoutedAway(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = &::windows::core::Interface::cast::(self)?; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).PointerRoutedAway)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).PointerRoutedAway)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -4326,14 +4110,11 @@ impl CoreIndependentInputSource { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn PointerRoutedTo<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn PointerRoutedTo(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = &::windows::core::Interface::cast::(self)?; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).PointerRoutedTo)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).PointerRoutedTo)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -4344,14 +4125,11 @@ impl CoreIndependentInputSource { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn PointerRoutedReleased<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn PointerRoutedReleased(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = &::windows::core::Interface::cast::(self)?; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).PointerRoutedReleased)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).PointerRoutedReleased)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -4669,14 +4447,11 @@ pub struct CoreWindow(::windows::core::IUnknown); impl CoreWindow { #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn PointerRoutedAway<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn PointerRoutedAway(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = &::windows::core::Interface::cast::(self)?; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).PointerRoutedAway)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).PointerRoutedAway)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -4687,14 +4462,11 @@ impl CoreWindow { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn PointerRoutedTo<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn PointerRoutedTo(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = &::windows::core::Interface::cast::(self)?; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).PointerRoutedTo)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).PointerRoutedTo)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -4705,14 +4477,11 @@ impl CoreWindow { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn PointerRoutedReleased<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn PointerRoutedReleased(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = &::windows::core::Interface::cast::(self)?; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).PointerRoutedReleased)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).PointerRoutedReleased)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -4782,12 +4551,9 @@ impl CoreWindow { (::windows::core::Vtable::vtable(this).PointerCursor)(::windows::core::Vtable::as_raw(this), result__.as_mut_ptr()).from_abi::(result__) } } - pub fn SetPointerCursor<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, CoreCursor>>, - { + pub fn SetPointerCursor(&self, value: &CoreCursor) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).SetPointerCursor)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetPointerCursor)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] @@ -4841,14 +4607,11 @@ impl CoreWindow { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn Activated<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn Activated(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).Activated)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).Activated)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -4859,14 +4622,11 @@ impl CoreWindow { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn AutomationProviderRequested<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn AutomationProviderRequested(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).AutomationProviderRequested)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).AutomationProviderRequested)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -4877,14 +4637,11 @@ impl CoreWindow { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn CharacterReceived<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn CharacterReceived(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).CharacterReceived)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).CharacterReceived)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -4895,14 +4652,11 @@ impl CoreWindow { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn Closed<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn Closed(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).Closed)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).Closed)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -4913,14 +4667,11 @@ impl CoreWindow { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn InputEnabled<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn InputEnabled(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).InputEnabled)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).InputEnabled)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -4931,14 +4682,11 @@ impl CoreWindow { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn KeyDown<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn KeyDown(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).KeyDown)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).KeyDown)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -4949,14 +4697,11 @@ impl CoreWindow { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn KeyUp<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn KeyUp(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).KeyUp)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).KeyUp)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -4967,14 +4712,11 @@ impl CoreWindow { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn PointerCaptureLost<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn PointerCaptureLost(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).PointerCaptureLost)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).PointerCaptureLost)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -4985,14 +4727,11 @@ impl CoreWindow { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn PointerEntered<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn PointerEntered(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).PointerEntered)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).PointerEntered)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -5003,14 +4742,11 @@ impl CoreWindow { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn PointerExited<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn PointerExited(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).PointerExited)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).PointerExited)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -5021,14 +4757,11 @@ impl CoreWindow { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn PointerMoved<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn PointerMoved(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).PointerMoved)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).PointerMoved)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -5039,14 +4772,11 @@ impl CoreWindow { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn PointerPressed<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn PointerPressed(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).PointerPressed)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).PointerPressed)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -5057,14 +4787,11 @@ impl CoreWindow { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn PointerReleased<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn PointerReleased(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).PointerReleased)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).PointerReleased)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -5075,14 +4802,11 @@ impl CoreWindow { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn TouchHitTesting<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn TouchHitTesting(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).TouchHitTesting)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).TouchHitTesting)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -5093,14 +4817,11 @@ impl CoreWindow { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn PointerWheelChanged<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn PointerWheelChanged(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).PointerWheelChanged)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).PointerWheelChanged)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -5111,14 +4832,11 @@ impl CoreWindow { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn SizeChanged<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn SizeChanged(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).SizeChanged)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).SizeChanged)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -5129,14 +4847,11 @@ impl CoreWindow { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn VisibilityChanged<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn VisibilityChanged(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).VisibilityChanged)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).VisibilityChanged)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -5153,14 +4868,11 @@ impl CoreWindow { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn ClosestInteractiveBoundsRequested<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn ClosestInteractiveBoundsRequested(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = &::windows::core::Interface::cast::(self)?; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).ClosestInteractiveBoundsRequested)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).ClosestInteractiveBoundsRequested)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -5178,14 +4890,11 @@ impl CoreWindow { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn ResizeStarted<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn ResizeStarted(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = &::windows::core::Interface::cast::(self)?; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).ResizeStarted)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).ResizeStarted)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -5196,14 +4905,11 @@ impl CoreWindow { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn ResizeCompleted<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn ResizeCompleted(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = &::windows::core::Interface::cast::(self)?; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).ResizeCompleted)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).ResizeCompleted)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -5360,14 +5066,11 @@ impl CoreWindowDialog { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn Showing<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn Showing(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).Showing)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).Showing)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -5458,12 +5161,9 @@ impl CoreWindowDialog { } #[doc = "*Required features: `\"UI_Popups\"`*"] #[cfg(feature = "UI_Popups")] - pub fn SetBackButtonCommand<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::Popups::UICommandInvokedHandler>>, - { + pub fn SetBackButtonCommand(&self, value: &super::Popups::UICommandInvokedHandler) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).SetBackButtonCommand)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetBackButtonCommand)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } #[doc = "*Required features: `\"Foundation\"`, `\"UI_Popups\"`*"] #[cfg(all(feature = "Foundation", feature = "UI_Popups"))] @@ -5651,14 +5351,11 @@ pub struct CoreWindowFlyout(::windows::core::IUnknown); impl CoreWindowFlyout { #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn Showing<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn Showing(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).Showing)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).Showing)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -5738,12 +5435,9 @@ impl CoreWindowFlyout { } #[doc = "*Required features: `\"UI_Popups\"`*"] #[cfg(feature = "UI_Popups")] - pub fn SetBackButtonCommand<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::Popups::UICommandInvokedHandler>>, - { + pub fn SetBackButtonCommand(&self, value: &super::Popups::UICommandInvokedHandler) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).SetBackButtonCommand)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetBackButtonCommand)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } #[doc = "*Required features: `\"Foundation\"`, `\"UI_Popups\"`*"] #[cfg(all(feature = "Foundation", feature = "UI_Popups"))] @@ -6434,14 +6128,11 @@ pub struct SystemNavigationManager(::windows::core::IUnknown); impl SystemNavigationManager { #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn BackRequested<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::EventHandler>>, - { + pub fn BackRequested(&self, handler: &super::super::Foundation::EventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).BackRequested)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).BackRequested)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -7710,12 +7401,9 @@ impl IdleDispatchedHandler { let com = IdleDispatchedHandlerBox:: { vtable: &IdleDispatchedHandlerBox::::VTABLE, count: ::windows::core::RefCount::new(1), invoke }; unsafe { ::core::mem::transmute(::windows::core::alloc::boxed::Box::new(com)) } } - pub fn Invoke<'a, P0>(&self, e: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, IdleDispatchedHandlerArgs>>, - { + pub fn Invoke(&self, e: &IdleDispatchedHandlerArgs) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).Invoke)(::windows::core::Vtable::as_raw(this), e.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).Invoke)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(e)).ok() } } } #[repr(C)] diff --git a/crates/libs/windows/src/Windows/UI/Input/Core/mod.rs b/crates/libs/windows/src/Windows/UI/Input/Core/mod.rs index 14d1c6b60f..fb282795df 100644 --- a/crates/libs/windows/src/Windows/UI/Input/Core/mod.rs +++ b/crates/libs/windows/src/Windows/UI/Input/Core/mod.rs @@ -84,13 +84,10 @@ impl RadialControllerIndependentInputSource { } #[doc = "*Required features: `\"ApplicationModel_Core\"`*"] #[cfg(feature = "ApplicationModel_Core")] - pub fn CreateForView<'a, P0>(view: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::ApplicationModel::Core::CoreApplicationView>>, - { + pub fn CreateForView(view: &super::super::super::ApplicationModel::Core::CoreApplicationView) -> ::windows::core::Result { Self::IRadialControllerIndependentInputSourceStatics(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).CreateForView)(::windows::core::Vtable::as_raw(this), view.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).CreateForView)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(view), result__.as_mut_ptr()).from_abi::(result__) }) } #[doc(hidden)] diff --git a/crates/libs/windows/src/Windows/UI/Input/Inking/Analysis/mod.rs b/crates/libs/windows/src/Windows/UI/Input/Inking/Analysis/mod.rs index 7037174b98..51e01a143f 100644 --- a/crates/libs/windows/src/Windows/UI/Input/Inking/Analysis/mod.rs +++ b/crates/libs/windows/src/Windows/UI/Input/Inking/Analysis/mod.rs @@ -1910,12 +1910,9 @@ impl InkAnalyzer { (::windows::core::Vtable::vtable(this).IsAnalyzing)(::windows::core::Vtable::as_raw(this), result__.as_mut_ptr()).from_abi::(result__) } } - pub fn AddDataForStroke<'a, P0>(&self, stroke: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::InkStroke>>, - { + pub fn AddDataForStroke(&self, stroke: &super::InkStroke) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).AddDataForStroke)(::windows::core::Vtable::as_raw(this), stroke.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).AddDataForStroke)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(stroke)).ok() } } #[doc = "*Required features: `\"Foundation_Collections\"`*"] #[cfg(feature = "Foundation_Collections")] @@ -1945,12 +1942,9 @@ impl InkAnalyzer { let this = self; unsafe { (::windows::core::Vtable::vtable(this).RemoveDataForStrokes)(::windows::core::Vtable::as_raw(this), strokeids.try_into().map_err(|e| e.into())?.abi()).ok() } } - pub fn ReplaceDataForStroke<'a, P0>(&self, stroke: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::InkStroke>>, - { + pub fn ReplaceDataForStroke(&self, stroke: &super::InkStroke) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).ReplaceDataForStroke)(::windows::core::Vtable::as_raw(this), stroke.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).ReplaceDataForStroke)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(stroke)).ok() } } pub fn SetStrokeDataKind(&self, strokeid: u32, strokekind: InkAnalysisStrokeKind) -> ::windows::core::Result<()> { let this = self; diff --git a/crates/libs/windows/src/Windows/UI/Input/Inking/Core/mod.rs b/crates/libs/windows/src/Windows/UI/Input/Inking/Core/mod.rs index 34aea8db1a..dc779a1048 100644 --- a/crates/libs/windows/src/Windows/UI/Input/Inking/Core/mod.rs +++ b/crates/libs/windows/src/Windows/UI/Input/Inking/Core/mod.rs @@ -317,13 +317,10 @@ impl CoreIncrementalInkStroke { } #[doc = "*Required features: `\"Foundation_Numerics\"`*"] #[cfg(feature = "Foundation_Numerics")] - pub fn Create<'a, P0>(drawingattributes: P0, pointtransform: super::super::super::super::Foundation::Numerics::Matrix3x2) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::InkDrawingAttributes>>, - { + pub fn Create(drawingattributes: &super::InkDrawingAttributes, pointtransform: super::super::super::super::Foundation::Numerics::Matrix3x2) -> ::windows::core::Result { Self::ICoreIncrementalInkStrokeFactory(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).Create)(::windows::core::Vtable::as_raw(this), drawingattributes.into().abi(), pointtransform, result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).Create)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(drawingattributes), pointtransform, result__.as_mut_ptr()).from_abi::(result__) }) } #[doc(hidden)] @@ -402,14 +399,11 @@ pub struct CoreInkIndependentInputSource(::windows::core::IUnknown); impl CoreInkIndependentInputSource { #[doc = "*Required features: `\"Foundation\"`, `\"UI_Core\"`*"] #[cfg(all(feature = "Foundation", feature = "UI_Core"))] - pub fn PointerEntering<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::super::Foundation::TypedEventHandler>>, - { + pub fn PointerEntering(&self, handler: &super::super::super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).PointerEntering)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).PointerEntering)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -420,14 +414,11 @@ impl CoreInkIndependentInputSource { } #[doc = "*Required features: `\"Foundation\"`, `\"UI_Core\"`*"] #[cfg(all(feature = "Foundation", feature = "UI_Core"))] - pub fn PointerHovering<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::super::Foundation::TypedEventHandler>>, - { + pub fn PointerHovering(&self, handler: &super::super::super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).PointerHovering)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).PointerHovering)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -438,14 +429,11 @@ impl CoreInkIndependentInputSource { } #[doc = "*Required features: `\"Foundation\"`, `\"UI_Core\"`*"] #[cfg(all(feature = "Foundation", feature = "UI_Core"))] - pub fn PointerExiting<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::super::Foundation::TypedEventHandler>>, - { + pub fn PointerExiting(&self, handler: &super::super::super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).PointerExiting)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).PointerExiting)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -456,14 +444,11 @@ impl CoreInkIndependentInputSource { } #[doc = "*Required features: `\"Foundation\"`, `\"UI_Core\"`*"] #[cfg(all(feature = "Foundation", feature = "UI_Core"))] - pub fn PointerPressing<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::super::Foundation::TypedEventHandler>>, - { + pub fn PointerPressing(&self, handler: &super::super::super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).PointerPressing)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).PointerPressing)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -474,14 +459,11 @@ impl CoreInkIndependentInputSource { } #[doc = "*Required features: `\"Foundation\"`, `\"UI_Core\"`*"] #[cfg(all(feature = "Foundation", feature = "UI_Core"))] - pub fn PointerMoving<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::super::Foundation::TypedEventHandler>>, - { + pub fn PointerMoving(&self, handler: &super::super::super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).PointerMoving)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).PointerMoving)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -492,14 +474,11 @@ impl CoreInkIndependentInputSource { } #[doc = "*Required features: `\"Foundation\"`, `\"UI_Core\"`*"] #[cfg(all(feature = "Foundation", feature = "UI_Core"))] - pub fn PointerReleasing<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::super::Foundation::TypedEventHandler>>, - { + pub fn PointerReleasing(&self, handler: &super::super::super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).PointerReleasing)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).PointerReleasing)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -510,14 +489,11 @@ impl CoreInkIndependentInputSource { } #[doc = "*Required features: `\"Foundation\"`, `\"UI_Core\"`*"] #[cfg(all(feature = "Foundation", feature = "UI_Core"))] - pub fn PointerLost<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::super::Foundation::TypedEventHandler>>, - { + pub fn PointerLost(&self, handler: &super::super::super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).PointerLost)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).PointerLost)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -544,20 +520,14 @@ impl CoreInkIndependentInputSource { } #[doc = "*Required features: `\"UI_Core\"`*"] #[cfg(feature = "UI_Core")] - pub fn SetPointerCursor<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Core::CoreCursor>>, - { + pub fn SetPointerCursor(&self, value: &super::super::super::Core::CoreCursor) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).SetPointerCursor)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetPointerCursor)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } - pub fn Create<'a, P0>(inkpresenter: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::InkPresenter>>, - { + pub fn Create(inkpresenter: &super::InkPresenter) -> ::windows::core::Result { Self::ICoreInkIndependentInputSourceStatics(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).Create)(::windows::core::Vtable::as_raw(this), inkpresenter.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).Create)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(inkpresenter), result__.as_mut_ptr()).from_abi::(result__) }) } #[doc(hidden)] @@ -833,14 +803,11 @@ pub struct CoreWetStrokeUpdateSource(::windows::core::IUnknown); impl CoreWetStrokeUpdateSource { #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn WetStrokeStarting<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::super::Foundation::TypedEventHandler>>, - { + pub fn WetStrokeStarting(&self, handler: &super::super::super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).WetStrokeStarting)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).WetStrokeStarting)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -851,14 +818,11 @@ impl CoreWetStrokeUpdateSource { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn WetStrokeContinuing<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::super::Foundation::TypedEventHandler>>, - { + pub fn WetStrokeContinuing(&self, handler: &super::super::super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).WetStrokeContinuing)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).WetStrokeContinuing)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -869,14 +833,11 @@ impl CoreWetStrokeUpdateSource { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn WetStrokeStopping<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::super::Foundation::TypedEventHandler>>, - { + pub fn WetStrokeStopping(&self, handler: &super::super::super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).WetStrokeStopping)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).WetStrokeStopping)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -887,14 +848,11 @@ impl CoreWetStrokeUpdateSource { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn WetStrokeCompleted<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::super::Foundation::TypedEventHandler>>, - { + pub fn WetStrokeCompleted(&self, handler: &super::super::super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).WetStrokeCompleted)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).WetStrokeCompleted)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -905,14 +863,11 @@ impl CoreWetStrokeUpdateSource { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn WetStrokeCanceled<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::super::Foundation::TypedEventHandler>>, - { + pub fn WetStrokeCanceled(&self, handler: &super::super::super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).WetStrokeCanceled)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).WetStrokeCanceled)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -928,13 +883,10 @@ impl CoreWetStrokeUpdateSource { (::windows::core::Vtable::vtable(this).InkPresenter)(::windows::core::Vtable::as_raw(this), result__.as_mut_ptr()).from_abi::(result__) } } - pub fn Create<'a, P0>(inkpresenter: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::InkPresenter>>, - { + pub fn Create(inkpresenter: &super::InkPresenter) -> ::windows::core::Result { Self::ICoreWetStrokeUpdateSourceStatics(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).Create)(::windows::core::Vtable::as_raw(this), inkpresenter.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).Create)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(inkpresenter), result__.as_mut_ptr()).from_abi::(result__) }) } #[doc(hidden)] diff --git a/crates/libs/windows/src/Windows/UI/Input/Inking/mod.rs b/crates/libs/windows/src/Windows/UI/Input/Inking/mod.rs index 323bf17642..a8cadbb05b 100644 --- a/crates/libs/windows/src/Windows/UI/Input/Inking/mod.rs +++ b/crates/libs/windows/src/Windows/UI/Input/Inking/mod.rs @@ -554,14 +554,11 @@ pub struct IInkPresenterRuler2_Vtbl { #[repr(transparent)] pub struct IInkPresenterRulerFactory(::windows::core::IUnknown); impl IInkPresenterRulerFactory { - pub fn Create<'a, P0>(&self, inkpresenter: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, InkPresenter>>, - { + pub fn Create(&self, inkpresenter: &InkPresenter) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).Create)(::windows::core::Vtable::as_raw(this), inkpresenter.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).Create)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(inkpresenter), result__.as_mut_ptr()).from_abi::(result__) } } } @@ -814,23 +811,17 @@ pub struct IInkRecognizer_Vtbl { #[repr(transparent)] pub struct IInkRecognizerContainer(::windows::core::IUnknown); impl IInkRecognizerContainer { - pub fn SetDefaultRecognizer<'a, P0>(&self, recognizer: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, InkRecognizer>>, - { + pub fn SetDefaultRecognizer(&self, recognizer: &InkRecognizer) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).SetDefaultRecognizer)(::windows::core::Vtable::as_raw(this), recognizer.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetDefaultRecognizer)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(recognizer)).ok() } } #[doc = "*Required features: `\"Foundation_Collections\"`*"] #[cfg(feature = "Foundation_Collections")] - pub fn RecognizeAsync<'a, P0>(&self, strokecollection: P0, recognitiontarget: InkRecognitionTarget) -> ::windows::core::Result>> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, InkStrokeContainer>>, - { + pub fn RecognizeAsync(&self, strokecollection: &InkStrokeContainer, recognitiontarget: InkRecognitionTarget) -> ::windows::core::Result>> { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).RecognizeAsync)(::windows::core::Vtable::as_raw(this), strokecollection.into().abi(), recognitiontarget, result__.as_mut_ptr()).from_abi::>>(result__) + (::windows::core::Vtable::vtable(this).RecognizeAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(strokecollection), recognitiontarget, result__.as_mut_ptr()).from_abi::>>(result__) } } #[doc = "*Required features: `\"Foundation_Collections\"`*"] @@ -1087,12 +1078,9 @@ impl IInkStrokeContainer { (::windows::core::Vtable::vtable(this).BoundingRect)(::windows::core::Vtable::as_raw(this), result__.as_mut_ptr()).from_abi::(result__) } } - pub fn AddStroke<'a, P0>(&self, stroke: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, InkStroke>>, - { + pub fn AddStroke(&self, stroke: &InkStroke) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).AddStroke)(::windows::core::Vtable::as_raw(this), stroke.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).AddStroke)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(stroke)).ok() } } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] @@ -2110,41 +2098,29 @@ impl InkManager { let this = self; unsafe { (::windows::core::Vtable::vtable(this).SetMode)(::windows::core::Vtable::as_raw(this), value).ok() } } - pub fn ProcessPointerDown<'a, P0>(&self, pointerpoint: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::PointerPoint>>, - { + pub fn ProcessPointerDown(&self, pointerpoint: &super::PointerPoint) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).ProcessPointerDown)(::windows::core::Vtable::as_raw(this), pointerpoint.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).ProcessPointerDown)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(pointerpoint)).ok() } } - pub fn ProcessPointerUpdate<'a, P0>(&self, pointerpoint: P0) -> ::windows::core::Result<::windows::core::IInspectable> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::PointerPoint>>, - { + pub fn ProcessPointerUpdate(&self, pointerpoint: &super::PointerPoint) -> ::windows::core::Result<::windows::core::IInspectable> { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).ProcessPointerUpdate)(::windows::core::Vtable::as_raw(this), pointerpoint.into().abi(), result__.as_mut_ptr()).from_abi::<::windows::core::IInspectable>(result__) + (::windows::core::Vtable::vtable(this).ProcessPointerUpdate)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(pointerpoint), result__.as_mut_ptr()).from_abi::<::windows::core::IInspectable>(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn ProcessPointerUp<'a, P0>(&self, pointerpoint: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::PointerPoint>>, - { + pub fn ProcessPointerUp(&self, pointerpoint: &super::PointerPoint) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).ProcessPointerUp)(::windows::core::Vtable::as_raw(this), pointerpoint.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).ProcessPointerUp)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(pointerpoint), result__.as_mut_ptr()).from_abi::(result__) } } - pub fn SetDefaultDrawingAttributes<'a, P0>(&self, drawingattributes: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, InkDrawingAttributes>>, - { + pub fn SetDefaultDrawingAttributes(&self, drawingattributes: &InkDrawingAttributes) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).SetDefaultDrawingAttributes)(::windows::core::Vtable::as_raw(this), drawingattributes.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetDefaultDrawingAttributes)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(drawingattributes)).ok() } } #[doc = "*Required features: `\"Foundation_Collections\"`*"] #[cfg(feature = "Foundation_Collections")] @@ -2155,23 +2131,17 @@ impl InkManager { (::windows::core::Vtable::vtable(this).RecognizeAsync2)(::windows::core::Vtable::as_raw(this), recognitiontarget, result__.as_mut_ptr()).from_abi::>>(result__) } } - pub fn SetDefaultRecognizer<'a, P0>(&self, recognizer: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, InkRecognizer>>, - { + pub fn SetDefaultRecognizer(&self, recognizer: &InkRecognizer) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).SetDefaultRecognizer)(::windows::core::Vtable::as_raw(this), recognizer.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetDefaultRecognizer)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(recognizer)).ok() } } #[doc = "*Required features: `\"Foundation_Collections\"`*"] #[cfg(feature = "Foundation_Collections")] - pub fn RecognizeAsync<'a, P0>(&self, strokecollection: P0, recognitiontarget: InkRecognitionTarget) -> ::windows::core::Result>> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, InkStrokeContainer>>, - { + pub fn RecognizeAsync(&self, strokecollection: &InkStrokeContainer, recognitiontarget: InkRecognitionTarget) -> ::windows::core::Result>> { let this = &::windows::core::Interface::cast::(self)?; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).RecognizeAsync)(::windows::core::Vtable::as_raw(this), strokecollection.into().abi(), recognitiontarget, result__.as_mut_ptr()).from_abi::>>(result__) + (::windows::core::Vtable::vtable(this).RecognizeAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(strokecollection), recognitiontarget, result__.as_mut_ptr()).from_abi::>>(result__) } } #[doc = "*Required features: `\"Foundation_Collections\"`*"] @@ -2192,12 +2162,9 @@ impl InkManager { (::windows::core::Vtable::vtable(this).BoundingRect)(::windows::core::Vtable::as_raw(this), result__.as_mut_ptr()).from_abi::(result__) } } - pub fn AddStroke<'a, P0>(&self, stroke: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, InkStroke>>, - { + pub fn AddStroke(&self, stroke: &InkStroke) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).AddStroke)(::windows::core::Vtable::as_raw(this), stroke.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).AddStroke)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(stroke)).ok() } } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] @@ -2710,12 +2677,9 @@ impl InkPresenter { (::windows::core::Vtable::vtable(this).StrokeContainer)(::windows::core::Vtable::as_raw(this), result__.as_mut_ptr()).from_abi::(result__) } } - pub fn SetStrokeContainer<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, InkStrokeContainer>>, - { + pub fn SetStrokeContainer(&self, value: &InkStrokeContainer) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).SetStrokeContainer)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetStrokeContainer)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } pub fn CopyDefaultDrawingAttributes(&self) -> ::windows::core::Result { let this = self; @@ -2724,12 +2688,9 @@ impl InkPresenter { (::windows::core::Vtable::vtable(this).CopyDefaultDrawingAttributes)(::windows::core::Vtable::as_raw(this), result__.as_mut_ptr()).from_abi::(result__) } } - pub fn UpdateDefaultDrawingAttributes<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, InkDrawingAttributes>>, - { + pub fn UpdateDefaultDrawingAttributes(&self, value: &InkDrawingAttributes) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).UpdateDefaultDrawingAttributes)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).UpdateDefaultDrawingAttributes)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } pub fn ActivateCustomDrying(&self) -> ::windows::core::Result { let this = self; @@ -2744,14 +2705,11 @@ impl InkPresenter { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn StrokesCollected<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Foundation::TypedEventHandler>>, - { + pub fn StrokesCollected(&self, handler: &super::super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).StrokesCollected)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).StrokesCollected)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -2762,14 +2720,11 @@ impl InkPresenter { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn StrokesErased<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Foundation::TypedEventHandler>>, - { + pub fn StrokesErased(&self, handler: &super::super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).StrokesErased)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).StrokesErased)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -2942,13 +2897,10 @@ impl InkPresenterProtractor { let this = self; unsafe { (::windows::core::Vtable::vtable(this).SetAccentColor)(::windows::core::Vtable::as_raw(this), value).ok() } } - pub fn Create<'a, P0>(inkpresenter: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, InkPresenter>>, - { + pub fn Create(inkpresenter: &InkPresenter) -> ::windows::core::Result { Self::IInkPresenterProtractorFactory(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).Create)(::windows::core::Vtable::as_raw(this), inkpresenter.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).Create)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(inkpresenter), result__.as_mut_ptr()).from_abi::(result__) }) } pub fn Kind(&self) -> ::windows::core::Result { @@ -3143,13 +3095,10 @@ impl InkPresenterRuler { let this = &::windows::core::Interface::cast::(self)?; unsafe { (::windows::core::Vtable::vtable(this).SetIsCompassVisible)(::windows::core::Vtable::as_raw(this), value).ok() } } - pub fn Create<'a, P0>(inkpresenter: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, InkPresenter>>, - { + pub fn Create(inkpresenter: &InkPresenter) -> ::windows::core::Result { Self::IInkPresenterRulerFactory(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).Create)(::windows::core::Vtable::as_raw(this), inkpresenter.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).Create)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(inkpresenter), result__.as_mut_ptr()).from_abi::(result__) }) } pub fn Kind(&self) -> ::windows::core::Result { @@ -3477,23 +3426,17 @@ impl InkRecognizerContainer { static SHARED: ::windows::core::FactoryCache = ::windows::core::FactoryCache::new(); SHARED.call(callback) } - pub fn SetDefaultRecognizer<'a, P0>(&self, recognizer: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, InkRecognizer>>, - { + pub fn SetDefaultRecognizer(&self, recognizer: &InkRecognizer) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).SetDefaultRecognizer)(::windows::core::Vtable::as_raw(this), recognizer.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetDefaultRecognizer)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(recognizer)).ok() } } #[doc = "*Required features: `\"Foundation_Collections\"`*"] #[cfg(feature = "Foundation_Collections")] - pub fn RecognizeAsync<'a, P0>(&self, strokecollection: P0, recognitiontarget: InkRecognitionTarget) -> ::windows::core::Result>> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, InkStrokeContainer>>, - { + pub fn RecognizeAsync(&self, strokecollection: &InkStrokeContainer, recognitiontarget: InkRecognitionTarget) -> ::windows::core::Result>> { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).RecognizeAsync)(::windows::core::Vtable::as_raw(this), strokecollection.into().abi(), recognitiontarget, result__.as_mut_ptr()).from_abi::>>(result__) + (::windows::core::Vtable::vtable(this).RecognizeAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(strokecollection), recognitiontarget, result__.as_mut_ptr()).from_abi::>>(result__) } } #[doc = "*Required features: `\"Foundation_Collections\"`*"] @@ -3598,12 +3541,9 @@ impl InkStroke { (::windows::core::Vtable::vtable(this).DrawingAttributes)(::windows::core::Vtable::as_raw(this), result__.as_mut_ptr()).from_abi::(result__) } } - pub fn SetDrawingAttributes<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, InkDrawingAttributes>>, - { + pub fn SetDrawingAttributes(&self, value: &InkDrawingAttributes) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).SetDrawingAttributes)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetDrawingAttributes)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] @@ -3800,31 +3740,22 @@ impl InkStrokeBuilder { static SHARED: ::windows::core::FactoryCache = ::windows::core::FactoryCache::new(); SHARED.call(callback) } - pub fn BeginStroke<'a, P0>(&self, pointerpoint: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::PointerPoint>>, - { + pub fn BeginStroke(&self, pointerpoint: &super::PointerPoint) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).BeginStroke)(::windows::core::Vtable::as_raw(this), pointerpoint.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).BeginStroke)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(pointerpoint)).ok() } } - pub fn AppendToStroke<'a, P0>(&self, pointerpoint: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::PointerPoint>>, - { + pub fn AppendToStroke(&self, pointerpoint: &super::PointerPoint) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).AppendToStroke)(::windows::core::Vtable::as_raw(this), pointerpoint.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).AppendToStroke)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(pointerpoint), result__.as_mut_ptr()).from_abi::(result__) } } - pub fn EndStroke<'a, P0>(&self, pointerpoint: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::PointerPoint>>, - { + pub fn EndStroke(&self, pointerpoint: &super::PointerPoint) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).EndStroke)(::windows::core::Vtable::as_raw(this), pointerpoint.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).EndStroke)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(pointerpoint), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation_Collections\"`*"] @@ -3840,12 +3771,9 @@ impl InkStrokeBuilder { (::windows::core::Vtable::vtable(this).CreateStroke)(::windows::core::Vtable::as_raw(this), points.try_into().map_err(|e| e.into())?.abi(), result__.as_mut_ptr()).from_abi::(result__) } } - pub fn SetDefaultDrawingAttributes<'a, P0>(&self, drawingattributes: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, InkDrawingAttributes>>, - { + pub fn SetDefaultDrawingAttributes(&self, drawingattributes: &InkDrawingAttributes) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).SetDefaultDrawingAttributes)(::windows::core::Vtable::as_raw(this), drawingattributes.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetDefaultDrawingAttributes)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(drawingattributes)).ok() } } #[doc = "*Required features: `\"Foundation_Collections\"`, `\"Foundation_Numerics\"`*"] #[cfg(all(feature = "Foundation_Collections", feature = "Foundation_Numerics"))] @@ -3960,12 +3888,9 @@ impl InkStrokeContainer { (::windows::core::Vtable::vtable(this).BoundingRect)(::windows::core::Vtable::as_raw(this), result__.as_mut_ptr()).from_abi::(result__) } } - pub fn AddStroke<'a, P0>(&self, stroke: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, InkStroke>>, - { + pub fn AddStroke(&self, stroke: &InkStroke) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).AddStroke)(::windows::core::Vtable::as_raw(this), stroke.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).AddStroke)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(stroke)).ok() } } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] @@ -4203,14 +4128,11 @@ pub struct InkStrokeInput(::windows::core::IUnknown); impl InkStrokeInput { #[doc = "*Required features: `\"Foundation\"`, `\"UI_Core\"`*"] #[cfg(all(feature = "Foundation", feature = "UI_Core"))] - pub fn StrokeStarted<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Foundation::TypedEventHandler>>, - { + pub fn StrokeStarted(&self, handler: &super::super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).StrokeStarted)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).StrokeStarted)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -4221,14 +4143,11 @@ impl InkStrokeInput { } #[doc = "*Required features: `\"Foundation\"`, `\"UI_Core\"`*"] #[cfg(all(feature = "Foundation", feature = "UI_Core"))] - pub fn StrokeContinued<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Foundation::TypedEventHandler>>, - { + pub fn StrokeContinued(&self, handler: &super::super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).StrokeContinued)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).StrokeContinued)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -4239,14 +4158,11 @@ impl InkStrokeInput { } #[doc = "*Required features: `\"Foundation\"`, `\"UI_Core\"`*"] #[cfg(all(feature = "Foundation", feature = "UI_Core"))] - pub fn StrokeEnded<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Foundation::TypedEventHandler>>, - { + pub fn StrokeEnded(&self, handler: &super::super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).StrokeEnded)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).StrokeEnded)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -4257,14 +4173,11 @@ impl InkStrokeInput { } #[doc = "*Required features: `\"Foundation\"`, `\"UI_Core\"`*"] #[cfg(all(feature = "Foundation", feature = "UI_Core"))] - pub fn StrokeCanceled<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Foundation::TypedEventHandler>>, - { + pub fn StrokeCanceled(&self, handler: &super::super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).StrokeCanceled)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).StrokeCanceled)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -4707,14 +4620,11 @@ pub struct InkUnprocessedInput(::windows::core::IUnknown); impl InkUnprocessedInput { #[doc = "*Required features: `\"Foundation\"`, `\"UI_Core\"`*"] #[cfg(all(feature = "Foundation", feature = "UI_Core"))] - pub fn PointerEntered<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Foundation::TypedEventHandler>>, - { + pub fn PointerEntered(&self, handler: &super::super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).PointerEntered)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).PointerEntered)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -4725,14 +4635,11 @@ impl InkUnprocessedInput { } #[doc = "*Required features: `\"Foundation\"`, `\"UI_Core\"`*"] #[cfg(all(feature = "Foundation", feature = "UI_Core"))] - pub fn PointerHovered<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Foundation::TypedEventHandler>>, - { + pub fn PointerHovered(&self, handler: &super::super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).PointerHovered)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).PointerHovered)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -4743,14 +4650,11 @@ impl InkUnprocessedInput { } #[doc = "*Required features: `\"Foundation\"`, `\"UI_Core\"`*"] #[cfg(all(feature = "Foundation", feature = "UI_Core"))] - pub fn PointerExited<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Foundation::TypedEventHandler>>, - { + pub fn PointerExited(&self, handler: &super::super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).PointerExited)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).PointerExited)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -4761,14 +4665,11 @@ impl InkUnprocessedInput { } #[doc = "*Required features: `\"Foundation\"`, `\"UI_Core\"`*"] #[cfg(all(feature = "Foundation", feature = "UI_Core"))] - pub fn PointerPressed<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Foundation::TypedEventHandler>>, - { + pub fn PointerPressed(&self, handler: &super::super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).PointerPressed)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).PointerPressed)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -4779,14 +4680,11 @@ impl InkUnprocessedInput { } #[doc = "*Required features: `\"Foundation\"`, `\"UI_Core\"`*"] #[cfg(all(feature = "Foundation", feature = "UI_Core"))] - pub fn PointerMoved<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Foundation::TypedEventHandler>>, - { + pub fn PointerMoved(&self, handler: &super::super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).PointerMoved)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).PointerMoved)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -4797,14 +4695,11 @@ impl InkUnprocessedInput { } #[doc = "*Required features: `\"Foundation\"`, `\"UI_Core\"`*"] #[cfg(all(feature = "Foundation", feature = "UI_Core"))] - pub fn PointerReleased<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Foundation::TypedEventHandler>>, - { + pub fn PointerReleased(&self, handler: &super::super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).PointerReleased)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).PointerReleased)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -4815,14 +4710,11 @@ impl InkUnprocessedInput { } #[doc = "*Required features: `\"Foundation\"`, `\"UI_Core\"`*"] #[cfg(all(feature = "Foundation", feature = "UI_Core"))] - pub fn PointerLost<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Foundation::TypedEventHandler>>, - { + pub fn PointerLost(&self, handler: &super::super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).PointerLost)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).PointerLost)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] diff --git a/crates/libs/windows/src/Windows/UI/Input/Preview/Injection/mod.rs b/crates/libs/windows/src/Windows/UI/Input/Preview/Injection/mod.rs index c3bf5b3e46..25270a37f9 100644 --- a/crates/libs/windows/src/Windows/UI/Input/Preview/Injection/mod.rs +++ b/crates/libs/windows/src/Windows/UI/Input/Preview/Injection/mod.rs @@ -955,12 +955,9 @@ impl InputInjector { let this = self; unsafe { (::windows::core::Vtable::vtable(this).InitializePenInjection)(::windows::core::Vtable::as_raw(this), visualmode).ok() } } - pub fn InjectPenInput<'a, P0>(&self, input: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, InjectedInputPenInfo>>, - { + pub fn InjectPenInput(&self, input: &InjectedInputPenInfo) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).InjectPenInput)(::windows::core::Vtable::as_raw(this), input.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).InjectPenInput)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(input)).ok() } } pub fn UninitializePenInjection(&self) -> ::windows::core::Result<()> { let this = self; @@ -974,12 +971,9 @@ impl InputInjector { let this = &::windows::core::Interface::cast::(self)?; unsafe { (::windows::core::Vtable::vtable(this).InitializeGamepadInjection)(::windows::core::Vtable::as_raw(this)).ok() } } - pub fn InjectGamepadInput<'a, P0>(&self, input: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, InjectedInputGamepadInfo>>, - { + pub fn InjectGamepadInput(&self, input: &InjectedInputGamepadInfo) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).InjectGamepadInput)(::windows::core::Vtable::as_raw(this), input.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).InjectGamepadInput)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(input)).ok() } } pub fn UninitializeGamepadInjection(&self) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; diff --git a/crates/libs/windows/src/Windows/UI/Input/Preview/mod.rs b/crates/libs/windows/src/Windows/UI/Input/Preview/mod.rs index 950cf5a1e5..f711998ada 100644 --- a/crates/libs/windows/src/Windows/UI/Input/Preview/mod.rs +++ b/crates/libs/windows/src/Windows/UI/Input/Preview/mod.rs @@ -23,13 +23,10 @@ pub struct InputActivationListenerPreview; impl InputActivationListenerPreview { #[doc = "*Required features: `\"UI_WindowManagement\"`*"] #[cfg(feature = "UI_WindowManagement")] - pub fn CreateForApplicationWindow<'a, P0>(window: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::WindowManagement::AppWindow>>, - { + pub fn CreateForApplicationWindow(window: &super::super::WindowManagement::AppWindow) -> ::windows::core::Result { Self::IInputActivationListenerPreviewStatics(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).CreateForApplicationWindow)(::windows::core::Vtable::as_raw(this), window.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).CreateForApplicationWindow)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(window), result__.as_mut_ptr()).from_abi::(result__) }) } #[doc(hidden)] diff --git a/crates/libs/windows/src/Windows/UI/Input/Spatial/mod.rs b/crates/libs/windows/src/Windows/UI/Input/Spatial/mod.rs index 438be52e10..0565cac511 100644 --- a/crates/libs/windows/src/Windows/UI/Input/Spatial/mod.rs +++ b/crates/libs/windows/src/Windows/UI/Input/Spatial/mod.rs @@ -1013,14 +1013,11 @@ pub struct SpatialGestureRecognizer(::windows::core::IUnknown); impl SpatialGestureRecognizer { #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn RecognitionStarted<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Foundation::TypedEventHandler>>, - { + pub fn RecognitionStarted(&self, handler: &super::super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).RecognitionStarted)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).RecognitionStarted)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -1031,14 +1028,11 @@ impl SpatialGestureRecognizer { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn RecognitionEnded<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Foundation::TypedEventHandler>>, - { + pub fn RecognitionEnded(&self, handler: &super::super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).RecognitionEnded)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).RecognitionEnded)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -1049,14 +1043,11 @@ impl SpatialGestureRecognizer { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn Tapped<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Foundation::TypedEventHandler>>, - { + pub fn Tapped(&self, handler: &super::super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).Tapped)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).Tapped)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -1067,14 +1058,11 @@ impl SpatialGestureRecognizer { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn HoldStarted<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Foundation::TypedEventHandler>>, - { + pub fn HoldStarted(&self, handler: &super::super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).HoldStarted)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).HoldStarted)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -1085,14 +1073,11 @@ impl SpatialGestureRecognizer { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn HoldCompleted<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Foundation::TypedEventHandler>>, - { + pub fn HoldCompleted(&self, handler: &super::super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).HoldCompleted)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).HoldCompleted)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -1103,14 +1088,11 @@ impl SpatialGestureRecognizer { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn HoldCanceled<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Foundation::TypedEventHandler>>, - { + pub fn HoldCanceled(&self, handler: &super::super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).HoldCanceled)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).HoldCanceled)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -1121,14 +1103,11 @@ impl SpatialGestureRecognizer { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn ManipulationStarted<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Foundation::TypedEventHandler>>, - { + pub fn ManipulationStarted(&self, handler: &super::super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).ManipulationStarted)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).ManipulationStarted)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -1139,14 +1118,11 @@ impl SpatialGestureRecognizer { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn ManipulationUpdated<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Foundation::TypedEventHandler>>, - { + pub fn ManipulationUpdated(&self, handler: &super::super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).ManipulationUpdated)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).ManipulationUpdated)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -1157,14 +1133,11 @@ impl SpatialGestureRecognizer { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn ManipulationCompleted<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Foundation::TypedEventHandler>>, - { + pub fn ManipulationCompleted(&self, handler: &super::super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).ManipulationCompleted)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).ManipulationCompleted)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -1175,14 +1148,11 @@ impl SpatialGestureRecognizer { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn ManipulationCanceled<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Foundation::TypedEventHandler>>, - { + pub fn ManipulationCanceled(&self, handler: &super::super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).ManipulationCanceled)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).ManipulationCanceled)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -1193,14 +1163,11 @@ impl SpatialGestureRecognizer { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn NavigationStarted<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Foundation::TypedEventHandler>>, - { + pub fn NavigationStarted(&self, handler: &super::super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).NavigationStarted)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).NavigationStarted)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -1211,14 +1178,11 @@ impl SpatialGestureRecognizer { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn NavigationUpdated<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Foundation::TypedEventHandler>>, - { + pub fn NavigationUpdated(&self, handler: &super::super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).NavigationUpdated)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).NavigationUpdated)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -1229,14 +1193,11 @@ impl SpatialGestureRecognizer { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn NavigationCompleted<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Foundation::TypedEventHandler>>, - { + pub fn NavigationCompleted(&self, handler: &super::super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).NavigationCompleted)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).NavigationCompleted)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -1247,14 +1208,11 @@ impl SpatialGestureRecognizer { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn NavigationCanceled<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Foundation::TypedEventHandler>>, - { + pub fn NavigationCanceled(&self, handler: &super::super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).NavigationCanceled)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).NavigationCanceled)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -1263,12 +1221,9 @@ impl SpatialGestureRecognizer { let this = self; unsafe { (::windows::core::Vtable::vtable(this).RemoveNavigationCanceled)(::windows::core::Vtable::as_raw(this), token).ok() } } - pub fn CaptureInteraction<'a, P0>(&self, interaction: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, SpatialInteraction>>, - { + pub fn CaptureInteraction(&self, interaction: &SpatialInteraction) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).CaptureInteraction)(::windows::core::Vtable::as_raw(this), interaction.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).CaptureInteraction)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(interaction)).ok() } } pub fn CancelPendingGestures(&self) -> ::windows::core::Result<()> { let this = self; @@ -1529,14 +1484,11 @@ impl SpatialHoldStartedEventArgs { } #[doc = "*Required features: `\"Perception_Spatial\"`*"] #[cfg(feature = "Perception_Spatial")] - pub fn TryGetPointerPose<'a, P0>(&self, coordinatesystem: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Perception::Spatial::SpatialCoordinateSystem>>, - { + pub fn TryGetPointerPose(&self, coordinatesystem: &super::super::super::Perception::Spatial::SpatialCoordinateSystem) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).TryGetPointerPose)(::windows::core::Vtable::as_raw(this), coordinatesystem.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).TryGetPointerPose)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(coordinatesystem), result__.as_mut_ptr()).from_abi::(result__) } } } @@ -1942,14 +1894,11 @@ impl SpatialInteractionDetectedEventArgs { } #[doc = "*Required features: `\"Perception_Spatial\"`*"] #[cfg(feature = "Perception_Spatial")] - pub fn TryGetPointerPose<'a, P0>(&self, coordinatesystem: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Perception::Spatial::SpatialCoordinateSystem>>, - { + pub fn TryGetPointerPose(&self, coordinatesystem: &super::super::super::Perception::Spatial::SpatialCoordinateSystem) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).TryGetPointerPose)(::windows::core::Vtable::as_raw(this), coordinatesystem.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).TryGetPointerPose)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(coordinatesystem), result__.as_mut_ptr()).from_abi::(result__) } } pub fn Interaction(&self) -> ::windows::core::Result { @@ -2037,14 +1986,11 @@ pub struct SpatialInteractionManager(::windows::core::IUnknown); impl SpatialInteractionManager { #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn SourceDetected<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Foundation::TypedEventHandler>>, - { + pub fn SourceDetected(&self, handler: &super::super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).SourceDetected)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).SourceDetected)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -2055,14 +2001,11 @@ impl SpatialInteractionManager { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn SourceLost<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Foundation::TypedEventHandler>>, - { + pub fn SourceLost(&self, handler: &super::super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).SourceLost)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).SourceLost)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -2073,14 +2016,11 @@ impl SpatialInteractionManager { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn SourceUpdated<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Foundation::TypedEventHandler>>, - { + pub fn SourceUpdated(&self, handler: &super::super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).SourceUpdated)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).SourceUpdated)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -2091,14 +2031,11 @@ impl SpatialInteractionManager { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn SourcePressed<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Foundation::TypedEventHandler>>, - { + pub fn SourcePressed(&self, handler: &super::super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).SourcePressed)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).SourcePressed)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -2109,14 +2046,11 @@ impl SpatialInteractionManager { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn SourceReleased<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Foundation::TypedEventHandler>>, - { + pub fn SourceReleased(&self, handler: &super::super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).SourceReleased)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).SourceReleased)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -2127,14 +2061,11 @@ impl SpatialInteractionManager { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn InteractionDetected<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Foundation::TypedEventHandler>>, - { + pub fn InteractionDetected(&self, handler: &super::super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).InteractionDetected)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).InteractionDetected)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -2145,14 +2076,11 @@ impl SpatialInteractionManager { } #[doc = "*Required features: `\"Foundation_Collections\"`, `\"Perception\"`*"] #[cfg(all(feature = "Foundation_Collections", feature = "Perception"))] - pub fn GetDetectedSourcesAtTimestamp<'a, P0>(&self, timestamp: P0) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Perception::PerceptionTimestamp>>, - { + pub fn GetDetectedSourcesAtTimestamp(&self, timestamp: &super::super::super::Perception::PerceptionTimestamp) -> ::windows::core::Result> { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).GetDetectedSourcesAtTimestamp)(::windows::core::Vtable::as_raw(this), timestamp.into().abi(), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).GetDetectedSourcesAtTimestamp)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(timestamp), result__.as_mut_ptr()).from_abi::>(result__) } } pub fn GetForCurrentView() -> ::windows::core::Result { @@ -2290,14 +2218,11 @@ impl SpatialInteractionSource { } #[doc = "*Required features: `\"Perception\"`*"] #[cfg(feature = "Perception")] - pub fn TryGetStateAtTimestamp<'a, P0>(&self, timestamp: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Perception::PerceptionTimestamp>>, - { + pub fn TryGetStateAtTimestamp(&self, timestamp: &super::super::super::Perception::PerceptionTimestamp) -> ::windows::core::Result { let this = &::windows::core::Interface::cast::(self)?; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).TryGetStateAtTimestamp)(::windows::core::Vtable::as_raw(this), timestamp.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).TryGetStateAtTimestamp)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(timestamp), result__.as_mut_ptr()).from_abi::(result__) } } pub fn Handedness(&self) -> ::windows::core::Result { @@ -2598,14 +2523,11 @@ pub struct SpatialInteractionSourceProperties(::windows::core::IUnknown); impl SpatialInteractionSourceProperties { #[doc = "*Required features: `\"Foundation_Numerics\"`, `\"Perception_Spatial\"`*"] #[cfg(all(feature = "Foundation_Numerics", feature = "Perception_Spatial"))] - pub fn TryGetSourceLossMitigationDirection<'a, P0>(&self, coordinatesystem: P0) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Perception::Spatial::SpatialCoordinateSystem>>, - { + pub fn TryGetSourceLossMitigationDirection(&self, coordinatesystem: &super::super::super::Perception::Spatial::SpatialCoordinateSystem) -> ::windows::core::Result> { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).TryGetSourceLossMitigationDirection)(::windows::core::Vtable::as_raw(this), coordinatesystem.into().abi(), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).TryGetSourceLossMitigationDirection)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(coordinatesystem), result__.as_mut_ptr()).from_abi::>(result__) } } pub fn SourceLossRisk(&self) -> ::windows::core::Result { @@ -2617,14 +2539,11 @@ impl SpatialInteractionSourceProperties { } #[doc = "*Required features: `\"Perception_Spatial\"`*"] #[cfg(feature = "Perception_Spatial")] - pub fn TryGetLocation<'a, P0>(&self, coordinatesystem: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Perception::Spatial::SpatialCoordinateSystem>>, - { + pub fn TryGetLocation(&self, coordinatesystem: &super::super::super::Perception::Spatial::SpatialCoordinateSystem) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).TryGetLocation)(::windows::core::Vtable::as_raw(this), coordinatesystem.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).TryGetLocation)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(coordinatesystem), result__.as_mut_ptr()).from_abi::(result__) } } } @@ -2728,14 +2647,11 @@ impl SpatialInteractionSourceState { } #[doc = "*Required features: `\"Perception_Spatial\"`*"] #[cfg(feature = "Perception_Spatial")] - pub fn TryGetPointerPose<'a, P0>(&self, coordinatesystem: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Perception::Spatial::SpatialCoordinateSystem>>, - { + pub fn TryGetPointerPose(&self, coordinatesystem: &super::super::super::Perception::Spatial::SpatialCoordinateSystem) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).TryGetPointerPose)(::windows::core::Vtable::as_raw(this), coordinatesystem.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).TryGetPointerPose)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(coordinatesystem), result__.as_mut_ptr()).from_abi::(result__) } } pub fn IsSelectPressed(&self) -> ::windows::core::Result { @@ -2936,14 +2852,11 @@ impl SpatialManipulationCompletedEventArgs { } #[doc = "*Required features: `\"Perception_Spatial\"`*"] #[cfg(feature = "Perception_Spatial")] - pub fn TryGetCumulativeDelta<'a, P0>(&self, coordinatesystem: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Perception::Spatial::SpatialCoordinateSystem>>, - { + pub fn TryGetCumulativeDelta(&self, coordinatesystem: &super::super::super::Perception::Spatial::SpatialCoordinateSystem) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).TryGetCumulativeDelta)(::windows::core::Vtable::as_raw(this), coordinatesystem.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).TryGetCumulativeDelta)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(coordinatesystem), result__.as_mut_ptr()).from_abi::(result__) } } } @@ -3102,14 +3015,11 @@ impl SpatialManipulationStartedEventArgs { } #[doc = "*Required features: `\"Perception_Spatial\"`*"] #[cfg(feature = "Perception_Spatial")] - pub fn TryGetPointerPose<'a, P0>(&self, coordinatesystem: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Perception::Spatial::SpatialCoordinateSystem>>, - { + pub fn TryGetPointerPose(&self, coordinatesystem: &super::super::super::Perception::Spatial::SpatialCoordinateSystem) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).TryGetPointerPose)(::windows::core::Vtable::as_raw(this), coordinatesystem.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).TryGetPointerPose)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(coordinatesystem), result__.as_mut_ptr()).from_abi::(result__) } } } @@ -3190,14 +3100,11 @@ impl SpatialManipulationUpdatedEventArgs { } #[doc = "*Required features: `\"Perception_Spatial\"`*"] #[cfg(feature = "Perception_Spatial")] - pub fn TryGetCumulativeDelta<'a, P0>(&self, coordinatesystem: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Perception::Spatial::SpatialCoordinateSystem>>, - { + pub fn TryGetCumulativeDelta(&self, coordinatesystem: &super::super::super::Perception::Spatial::SpatialCoordinateSystem) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).TryGetCumulativeDelta)(::windows::core::Vtable::as_raw(this), coordinatesystem.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).TryGetCumulativeDelta)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(coordinatesystem), result__.as_mut_ptr()).from_abi::(result__) } } } @@ -3439,14 +3346,11 @@ impl SpatialNavigationStartedEventArgs { } #[doc = "*Required features: `\"Perception_Spatial\"`*"] #[cfg(feature = "Perception_Spatial")] - pub fn TryGetPointerPose<'a, P0>(&self, coordinatesystem: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Perception::Spatial::SpatialCoordinateSystem>>, - { + pub fn TryGetPointerPose(&self, coordinatesystem: &super::super::super::Perception::Spatial::SpatialCoordinateSystem) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).TryGetPointerPose)(::windows::core::Vtable::as_raw(this), coordinatesystem.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).TryGetPointerPose)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(coordinatesystem), result__.as_mut_ptr()).from_abi::(result__) } } pub fn IsNavigatingX(&self) -> ::windows::core::Result { @@ -3754,14 +3658,11 @@ impl SpatialPointerPose { (::windows::core::Vtable::vtable(this).Head)(::windows::core::Vtable::as_raw(this), result__.as_mut_ptr()).from_abi::(result__) } } - pub fn TryGetInteractionSourcePose<'a, P0>(&self, source: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, SpatialInteractionSource>>, - { + pub fn TryGetInteractionSourcePose(&self, source: &SpatialInteractionSource) -> ::windows::core::Result { let this = &::windows::core::Interface::cast::(self)?; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).TryGetInteractionSourcePose)(::windows::core::Vtable::as_raw(this), source.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).TryGetInteractionSourcePose)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(source), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Perception_People\"`*"] @@ -3782,14 +3683,10 @@ impl SpatialPointerPose { } #[doc = "*Required features: `\"Perception_Spatial\"`*"] #[cfg(feature = "Perception_Spatial")] - pub fn TryGetAtTimestamp<'a, P0, P1>(coordinatesystem: P0, timestamp: P1) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Perception::Spatial::SpatialCoordinateSystem>>, - P1: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Perception::PerceptionTimestamp>>, - { + pub fn TryGetAtTimestamp(coordinatesystem: &super::super::super::Perception::Spatial::SpatialCoordinateSystem, timestamp: &super::super::super::Perception::PerceptionTimestamp) -> ::windows::core::Result { Self::ISpatialPointerPoseStatics(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).TryGetAtTimestamp)(::windows::core::Vtable::as_raw(this), coordinatesystem.into().abi(), timestamp.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).TryGetAtTimestamp)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(coordinatesystem), ::core::mem::transmute_copy(timestamp), result__.as_mut_ptr()).from_abi::(result__) }) } #[doc(hidden)] @@ -3951,14 +3848,11 @@ impl SpatialRecognitionStartedEventArgs { } #[doc = "*Required features: `\"Perception_Spatial\"`*"] #[cfg(feature = "Perception_Spatial")] - pub fn TryGetPointerPose<'a, P0>(&self, coordinatesystem: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Perception::Spatial::SpatialCoordinateSystem>>, - { + pub fn TryGetPointerPose(&self, coordinatesystem: &super::super::super::Perception::Spatial::SpatialCoordinateSystem) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).TryGetPointerPose)(::windows::core::Vtable::as_raw(this), coordinatesystem.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).TryGetPointerPose)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(coordinatesystem), result__.as_mut_ptr()).from_abi::(result__) } } pub fn IsGesturePossible(&self, gesture: SpatialGestureSettings) -> ::windows::core::Result { @@ -4046,14 +3940,11 @@ impl SpatialTappedEventArgs { } #[doc = "*Required features: `\"Perception_Spatial\"`*"] #[cfg(feature = "Perception_Spatial")] - pub fn TryGetPointerPose<'a, P0>(&self, coordinatesystem: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Perception::Spatial::SpatialCoordinateSystem>>, - { + pub fn TryGetPointerPose(&self, coordinatesystem: &super::super::super::Perception::Spatial::SpatialCoordinateSystem) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).TryGetPointerPose)(::windows::core::Vtable::as_raw(this), coordinatesystem.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).TryGetPointerPose)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(coordinatesystem), result__.as_mut_ptr()).from_abi::(result__) } } pub fn TapCount(&self) -> ::windows::core::Result { diff --git a/crates/libs/windows/src/Windows/UI/Input/mod.rs b/crates/libs/windows/src/Windows/UI/Input/mod.rs index 59d96d1205..50cc5efbd9 100644 --- a/crates/libs/windows/src/Windows/UI/Input/mod.rs +++ b/crates/libs/windows/src/Windows/UI/Input/mod.rs @@ -1993,14 +1993,11 @@ pub struct EdgeGesture(::windows::core::IUnknown); impl EdgeGesture { #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn Starting<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn Starting(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).Starting)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).Starting)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -2011,14 +2008,11 @@ impl EdgeGesture { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn Completed<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn Completed(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).Completed)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).Completed)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -2029,14 +2023,11 @@ impl EdgeGesture { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn Canceled<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn Canceled(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).Canceled)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).Canceled)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -2394,22 +2385,16 @@ impl GestureRecognizer { (::windows::core::Vtable::vtable(this).MouseWheelParameters)(::windows::core::Vtable::as_raw(this), result__.as_mut_ptr()).from_abi::(result__) } } - pub fn CanBeDoubleTap<'a, P0>(&self, value: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, PointerPoint>>, - { + pub fn CanBeDoubleTap(&self, value: &PointerPoint) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).CanBeDoubleTap)(::windows::core::Vtable::as_raw(this), value.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).CanBeDoubleTap)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value), result__.as_mut_ptr()).from_abi::(result__) } } - pub fn ProcessDownEvent<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, PointerPoint>>, - { + pub fn ProcessDownEvent(&self, value: &PointerPoint) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).ProcessDownEvent)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).ProcessDownEvent)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } #[doc = "*Required features: `\"Foundation_Collections\"`*"] #[cfg(feature = "Foundation_Collections")] @@ -2421,19 +2406,13 @@ impl GestureRecognizer { let this = self; unsafe { (::windows::core::Vtable::vtable(this).ProcessMoveEvents)(::windows::core::Vtable::as_raw(this), value.try_into().map_err(|e| e.into())?.abi()).ok() } } - pub fn ProcessUpEvent<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, PointerPoint>>, - { + pub fn ProcessUpEvent(&self, value: &PointerPoint) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).ProcessUpEvent)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).ProcessUpEvent)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } - pub fn ProcessMouseWheelEvent<'a, P0>(&self, value: P0, isshiftkeydown: bool, iscontrolkeydown: bool) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, PointerPoint>>, - { + pub fn ProcessMouseWheelEvent(&self, value: &PointerPoint, isshiftkeydown: bool, iscontrolkeydown: bool) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).ProcessMouseWheelEvent)(::windows::core::Vtable::as_raw(this), value.into().abi(), isshiftkeydown, iscontrolkeydown).ok() } + unsafe { (::windows::core::Vtable::vtable(this).ProcessMouseWheelEvent)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value), isshiftkeydown, iscontrolkeydown).ok() } } pub fn ProcessInertia(&self) -> ::windows::core::Result<()> { let this = self; @@ -2445,14 +2424,11 @@ impl GestureRecognizer { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn Tapped<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn Tapped(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).Tapped)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).Tapped)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -2463,14 +2439,11 @@ impl GestureRecognizer { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn RightTapped<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn RightTapped(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).RightTapped)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).RightTapped)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -2481,14 +2454,11 @@ impl GestureRecognizer { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn Holding<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn Holding(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).Holding)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).Holding)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -2499,14 +2469,11 @@ impl GestureRecognizer { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn Dragging<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn Dragging(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).Dragging)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).Dragging)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -2517,14 +2484,11 @@ impl GestureRecognizer { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn ManipulationStarted<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn ManipulationStarted(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).ManipulationStarted)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).ManipulationStarted)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -2535,14 +2499,11 @@ impl GestureRecognizer { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn ManipulationUpdated<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn ManipulationUpdated(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).ManipulationUpdated)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).ManipulationUpdated)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -2553,14 +2514,11 @@ impl GestureRecognizer { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn ManipulationInertiaStarting<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn ManipulationInertiaStarting(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).ManipulationInertiaStarting)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).ManipulationInertiaStarting)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -2571,14 +2529,11 @@ impl GestureRecognizer { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn ManipulationCompleted<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn ManipulationCompleted(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).ManipulationCompleted)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).ManipulationCompleted)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -2589,14 +2544,11 @@ impl GestureRecognizer { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn CrossSliding<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn CrossSliding(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).CrossSliding)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).CrossSliding)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -2885,14 +2837,11 @@ impl InputActivationListener { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn InputActivationChanged<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn InputActivationChanged(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).InputActivationChanged)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).InputActivationChanged)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -3096,14 +3045,11 @@ impl KeyboardDeliveryInterceptor { } #[doc = "*Required features: `\"Foundation\"`, `\"UI_Core\"`*"] #[cfg(all(feature = "Foundation", feature = "UI_Core"))] - pub fn KeyDown<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn KeyDown(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).KeyDown)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).KeyDown)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -3114,14 +3060,11 @@ impl KeyboardDeliveryInterceptor { } #[doc = "*Required features: `\"Foundation\"`, `\"UI_Core\"`*"] #[cfg(all(feature = "Foundation", feature = "UI_Core"))] - pub fn KeyUp<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn KeyUp(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).KeyUp)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).KeyUp)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -4343,14 +4286,11 @@ impl RadialController { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn ScreenContactStarted<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn ScreenContactStarted(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).ScreenContactStarted)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).ScreenContactStarted)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -4361,14 +4301,11 @@ impl RadialController { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn ScreenContactEnded<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn ScreenContactEnded(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).ScreenContactEnded)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).ScreenContactEnded)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -4379,14 +4316,11 @@ impl RadialController { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn ScreenContactContinued<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn ScreenContactContinued(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).ScreenContactContinued)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).ScreenContactContinued)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -4397,14 +4331,11 @@ impl RadialController { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn ControlLost<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn ControlLost(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).ControlLost)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).ControlLost)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -4415,14 +4346,11 @@ impl RadialController { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn RotationChanged<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn RotationChanged(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).RotationChanged)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).RotationChanged)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -4433,14 +4361,11 @@ impl RadialController { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn ButtonClicked<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn ButtonClicked(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).ButtonClicked)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).ButtonClicked)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -4451,14 +4376,11 @@ impl RadialController { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn ControlAcquired<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn ControlAcquired(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).ControlAcquired)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).ControlAcquired)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -4469,14 +4391,11 @@ impl RadialController { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn ButtonPressed<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn ButtonPressed(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = &::windows::core::Interface::cast::(self)?; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).ButtonPressed)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).ButtonPressed)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -4487,14 +4406,11 @@ impl RadialController { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn ButtonHolding<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn ButtonHolding(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = &::windows::core::Interface::cast::(self)?; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).ButtonHolding)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).ButtonHolding)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -4505,14 +4421,11 @@ impl RadialController { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn ButtonReleased<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn ButtonReleased(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = &::windows::core::Interface::cast::(self)?; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).ButtonReleased)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).ButtonReleased)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -4968,12 +4881,9 @@ impl RadialControllerConfiguration { (::windows::core::Vtable::vtable(this).TrySelectDefaultMenuItem)(::windows::core::Vtable::as_raw(this), r#type, result__.as_mut_ptr()).from_abi::(result__) } } - pub fn SetActiveControllerWhenMenuIsSuppressed<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, RadialController>>, - { + pub fn SetActiveControllerWhenMenuIsSuppressed(&self, value: &RadialController) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).SetActiveControllerWhenMenuIsSuppressed)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetActiveControllerWhenMenuIsSuppressed)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } pub fn ActiveControllerWhenMenuIsSuppressed(&self) -> ::windows::core::Result { let this = &::windows::core::Interface::cast::(self)?; @@ -4999,11 +4909,8 @@ impl RadialControllerConfiguration { (::windows::core::Vtable::vtable(this).GetForCurrentView)(::windows::core::Vtable::as_raw(this), result__.as_mut_ptr()).from_abi::(result__) }) } - pub fn SetAppController<'a, P0>(value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, RadialController>>, - { - Self::IRadialControllerConfigurationStatics2(|this| unsafe { (::windows::core::Vtable::vtable(this).SetAppController)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() }) + pub fn SetAppController(value: &RadialController) -> ::windows::core::Result<()> { + Self::IRadialControllerConfigurationStatics2(|this| unsafe { (::windows::core::Vtable::vtable(this).SetAppController)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() }) } pub fn AppController() -> ::windows::core::Result { Self::IRadialControllerConfigurationStatics2(|this| unsafe { @@ -5218,12 +5125,9 @@ impl RadialControllerMenu { (::windows::core::Vtable::vtable(this).GetSelectedMenuItem)(::windows::core::Vtable::as_raw(this), result__.as_mut_ptr()).from_abi::(result__) } } - pub fn SelectMenuItem<'a, P0>(&self, menuitem: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, RadialControllerMenuItem>>, - { + pub fn SelectMenuItem(&self, menuitem: &RadialControllerMenuItem) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).SelectMenuItem)(::windows::core::Vtable::as_raw(this), menuitem.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SelectMenuItem)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(menuitem)).ok() } } pub fn TrySelectPreviouslySelectedMenuItem(&self) -> ::windows::core::Result { let this = self; @@ -5324,14 +5228,11 @@ impl RadialControllerMenuItem { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn Invoked<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn Invoked(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).Invoked)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).Invoked)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -5342,13 +5243,10 @@ impl RadialControllerMenuItem { } #[doc = "*Required features: `\"Storage_Streams\"`*"] #[cfg(feature = "Storage_Streams")] - pub fn CreateFromIcon<'a, P0>(displaytext: &::windows::core::HSTRING, icon: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Storage::Streams::RandomAccessStreamReference>>, - { + pub fn CreateFromIcon(displaytext: &::windows::core::HSTRING, icon: &super::super::Storage::Streams::RandomAccessStreamReference) -> ::windows::core::Result { Self::IRadialControllerMenuItemStatics(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).CreateFromIcon)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(displaytext), icon.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).CreateFromIcon)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(displaytext), ::core::mem::transmute_copy(icon), result__.as_mut_ptr()).from_abi::(result__) }) } pub fn CreateFromKnownIcon(displaytext: &::windows::core::HSTRING, value: RadialControllerMenuKnownIcon) -> ::windows::core::Result { @@ -5365,13 +5263,10 @@ impl RadialControllerMenuItem { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn CreateFromFontGlyphWithUri<'a, P0>(displaytext: &::windows::core::HSTRING, glyph: &::windows::core::HSTRING, fontfamily: &::windows::core::HSTRING, fonturi: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::Uri>>, - { + pub fn CreateFromFontGlyphWithUri(displaytext: &::windows::core::HSTRING, glyph: &::windows::core::HSTRING, fontfamily: &::windows::core::HSTRING, fonturi: &super::super::Foundation::Uri) -> ::windows::core::Result { Self::IRadialControllerMenuItemStatics2(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).CreateFromFontGlyphWithUri)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(displaytext), ::core::mem::transmute_copy(glyph), ::core::mem::transmute_copy(fontfamily), fonturi.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).CreateFromFontGlyphWithUri)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(displaytext), ::core::mem::transmute_copy(glyph), ::core::mem::transmute_copy(fontfamily), ::core::mem::transmute_copy(fonturi), result__.as_mut_ptr()).from_abi::(result__) }) } #[doc(hidden)] @@ -6008,14 +5903,11 @@ impl SystemButtonEventController { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn SystemFunctionButtonPressed<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn SystemFunctionButtonPressed(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).SystemFunctionButtonPressed)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).SystemFunctionButtonPressed)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -6026,14 +5918,11 @@ impl SystemButtonEventController { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn SystemFunctionButtonReleased<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn SystemFunctionButtonReleased(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).SystemFunctionButtonReleased)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).SystemFunctionButtonReleased)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -6044,14 +5933,11 @@ impl SystemButtonEventController { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn SystemFunctionLockChanged<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn SystemFunctionLockChanged(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).SystemFunctionLockChanged)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).SystemFunctionLockChanged)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -6062,14 +5948,11 @@ impl SystemButtonEventController { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn SystemFunctionLockIndicatorChanged<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn SystemFunctionLockIndicatorChanged(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).SystemFunctionLockIndicatorChanged)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).SystemFunctionLockIndicatorChanged)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -6080,13 +5963,10 @@ impl SystemButtonEventController { } #[doc = "*Required features: `\"System\"`*"] #[cfg(feature = "System")] - pub fn CreateForDispatcherQueue<'a, P0>(queue: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::System::DispatcherQueue>>, - { + pub fn CreateForDispatcherQueue(queue: &super::super::System::DispatcherQueue) -> ::windows::core::Result { Self::ISystemButtonEventControllerStatics(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).CreateForDispatcherQueue)(::windows::core::Vtable::as_raw(this), queue.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).CreateForDispatcherQueue)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(queue), result__.as_mut_ptr()).from_abi::(result__) }) } #[doc(hidden)] diff --git a/crates/libs/windows/src/Windows/UI/Notifications/Management/mod.rs b/crates/libs/windows/src/Windows/UI/Notifications/Management/mod.rs index 109d121987..9918629ff5 100644 --- a/crates/libs/windows/src/Windows/UI/Notifications/Management/mod.rs +++ b/crates/libs/windows/src/Windows/UI/Notifications/Management/mod.rs @@ -69,14 +69,11 @@ impl UserNotificationListener { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn NotificationChanged<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Foundation::TypedEventHandler>>, - { + pub fn NotificationChanged(&self, handler: &super::super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).NotificationChanged)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).NotificationChanged)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] diff --git a/crates/libs/windows/src/Windows/UI/Notifications/mod.rs b/crates/libs/windows/src/Windows/UI/Notifications/mod.rs index 8cc00f9dd7..8b44d768a2 100644 --- a/crates/libs/windows/src/Windows/UI/Notifications/mod.rs +++ b/crates/libs/windows/src/Windows/UI/Notifications/mod.rs @@ -1633,13 +1633,10 @@ impl BadgeNotification { } #[doc = "*Required features: `\"Data_Xml_Dom\"`*"] #[cfg(feature = "Data_Xml_Dom")] - pub fn CreateBadgeNotification<'a, P0>(content: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Data::Xml::Dom::XmlDocument>>, - { + pub fn CreateBadgeNotification(content: &super::super::Data::Xml::Dom::XmlDocument) -> ::windows::core::Result { Self::IBadgeNotificationFactory(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).CreateBadgeNotification)(::windows::core::Vtable::as_raw(this), content.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).CreateBadgeNotification)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(content), result__.as_mut_ptr()).from_abi::(result__) }) } #[doc(hidden)] @@ -1743,13 +1740,10 @@ impl BadgeUpdateManager { } #[doc = "*Required features: `\"System\"`*"] #[cfg(feature = "System")] - pub fn GetForUser<'a, P0>(user: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::System::User>>, - { + pub fn GetForUser(user: &super::super::System::User) -> ::windows::core::Result { Self::IBadgeUpdateManagerStatics2(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).GetForUser)(::windows::core::Vtable::as_raw(this), user.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).GetForUser)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(user), result__.as_mut_ptr()).from_abi::(result__) }) } #[doc(hidden)] @@ -1869,12 +1863,9 @@ unsafe impl ::core::marker::Sync for BadgeUpdateManagerForUser {} #[repr(transparent)] pub struct BadgeUpdater(::windows::core::IUnknown); impl BadgeUpdater { - pub fn Update<'a, P0>(&self, notification: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, BadgeNotification>>, - { + pub fn Update(&self, notification: &BadgeNotification) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).Update)(::windows::core::Vtable::as_raw(this), notification.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).Update)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(notification)).ok() } } pub fn Clear(&self) -> ::windows::core::Result<()> { let this = self; @@ -1882,21 +1873,15 @@ impl BadgeUpdater { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn StartPeriodicUpdate<'a, P0>(&self, badgecontent: P0, requestedinterval: PeriodicUpdateRecurrence) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::Uri>>, - { + pub fn StartPeriodicUpdate(&self, badgecontent: &super::super::Foundation::Uri, requestedinterval: PeriodicUpdateRecurrence) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).StartPeriodicUpdate)(::windows::core::Vtable::as_raw(this), badgecontent.into().abi(), requestedinterval).ok() } + unsafe { (::windows::core::Vtable::vtable(this).StartPeriodicUpdate)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(badgecontent), requestedinterval).ok() } } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn StartPeriodicUpdateAtTime<'a, P0>(&self, badgecontent: P0, starttime: super::super::Foundation::DateTime, requestedinterval: PeriodicUpdateRecurrence) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::Uri>>, - { + pub fn StartPeriodicUpdateAtTime(&self, badgecontent: &super::super::Foundation::Uri, starttime: super::super::Foundation::DateTime, requestedinterval: PeriodicUpdateRecurrence) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).StartPeriodicUpdateAtTime)(::windows::core::Vtable::as_raw(this), badgecontent.into().abi(), starttime, requestedinterval).ok() } + unsafe { (::windows::core::Vtable::vtable(this).StartPeriodicUpdateAtTime)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(badgecontent), starttime, requestedinterval).ok() } } pub fn StopPeriodicUpdate(&self) -> ::windows::core::Result<()> { let this = self; @@ -2196,12 +2181,9 @@ impl Notification { (::windows::core::Vtable::vtable(this).Visual)(::windows::core::Vtable::as_raw(this), result__.as_mut_ptr()).from_abi::(result__) } } - pub fn SetVisual<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, NotificationVisual>>, - { + pub fn SetVisual(&self, value: &NotificationVisual) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).SetVisual)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetVisual)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } } impl ::core::clone::Clone for Notification { @@ -2663,13 +2645,10 @@ impl ScheduledTileNotification { } #[doc = "*Required features: `\"Data_Xml_Dom\"`, `\"Foundation\"`*"] #[cfg(all(feature = "Data_Xml_Dom", feature = "Foundation"))] - pub fn CreateScheduledTileNotification<'a, P0>(content: P0, deliverytime: super::super::Foundation::DateTime) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Data::Xml::Dom::XmlDocument>>, - { + pub fn CreateScheduledTileNotification(content: &super::super::Data::Xml::Dom::XmlDocument, deliverytime: super::super::Foundation::DateTime) -> ::windows::core::Result { Self::IScheduledTileNotificationFactory(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).CreateScheduledTileNotification)(::windows::core::Vtable::as_raw(this), content.into().abi(), deliverytime, result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).CreateScheduledTileNotification)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(content), deliverytime, result__.as_mut_ptr()).from_abi::(result__) }) } #[doc(hidden)] @@ -2867,24 +2846,18 @@ impl ScheduledToastNotification { } #[doc = "*Required features: `\"Data_Xml_Dom\"`, `\"Foundation\"`*"] #[cfg(all(feature = "Data_Xml_Dom", feature = "Foundation"))] - pub fn CreateScheduledToastNotification<'a, P0>(content: P0, deliverytime: super::super::Foundation::DateTime) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Data::Xml::Dom::XmlDocument>>, - { + pub fn CreateScheduledToastNotification(content: &super::super::Data::Xml::Dom::XmlDocument, deliverytime: super::super::Foundation::DateTime) -> ::windows::core::Result { Self::IScheduledToastNotificationFactory(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).CreateScheduledToastNotification)(::windows::core::Vtable::as_raw(this), content.into().abi(), deliverytime, result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).CreateScheduledToastNotification)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(content), deliverytime, result__.as_mut_ptr()).from_abi::(result__) }) } #[doc = "*Required features: `\"Data_Xml_Dom\"`, `\"Foundation\"`*"] #[cfg(all(feature = "Data_Xml_Dom", feature = "Foundation"))] - pub fn CreateScheduledToastNotificationRecurring<'a, P0>(content: P0, deliverytime: super::super::Foundation::DateTime, snoozeinterval: super::super::Foundation::TimeSpan, maximumsnoozecount: u32) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Data::Xml::Dom::XmlDocument>>, - { + pub fn CreateScheduledToastNotificationRecurring(content: &super::super::Data::Xml::Dom::XmlDocument, deliverytime: super::super::Foundation::DateTime, snoozeinterval: super::super::Foundation::TimeSpan, maximumsnoozecount: u32) -> ::windows::core::Result { Self::IScheduledToastNotificationFactory(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).CreateScheduledToastNotificationRecurring)(::windows::core::Vtable::as_raw(this), content.into().abi(), deliverytime, snoozeinterval, maximumsnoozecount, result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).CreateScheduledToastNotificationRecurring)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(content), deliverytime, snoozeinterval, maximumsnoozecount, result__.as_mut_ptr()).from_abi::(result__) }) } #[doc(hidden)] @@ -3163,13 +3136,10 @@ impl TileFlyoutNotification { } #[doc = "*Required features: `\"Data_Xml_Dom\"`*"] #[cfg(feature = "Data_Xml_Dom")] - pub fn CreateTileFlyoutNotification<'a, P0>(content: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Data::Xml::Dom::XmlDocument>>, - { + pub fn CreateTileFlyoutNotification(content: &super::super::Data::Xml::Dom::XmlDocument) -> ::windows::core::Result { Self::ITileFlyoutNotificationFactory(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).CreateTileFlyoutNotification)(::windows::core::Vtable::as_raw(this), content.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).CreateTileFlyoutNotification)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(content), result__.as_mut_ptr()).from_abi::(result__) }) } #[doc(hidden)] @@ -3284,12 +3254,9 @@ impl ::windows::core::RuntimeName for TileFlyoutUpdateManager { #[repr(transparent)] pub struct TileFlyoutUpdater(::windows::core::IUnknown); impl TileFlyoutUpdater { - pub fn Update<'a, P0>(&self, notification: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, TileFlyoutNotification>>, - { + pub fn Update(&self, notification: &TileFlyoutNotification) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).Update)(::windows::core::Vtable::as_raw(this), notification.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).Update)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(notification)).ok() } } pub fn Clear(&self) -> ::windows::core::Result<()> { let this = self; @@ -3297,21 +3264,15 @@ impl TileFlyoutUpdater { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn StartPeriodicUpdate<'a, P0>(&self, tileflyoutcontent: P0, requestedinterval: PeriodicUpdateRecurrence) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::Uri>>, - { + pub fn StartPeriodicUpdate(&self, tileflyoutcontent: &super::super::Foundation::Uri, requestedinterval: PeriodicUpdateRecurrence) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).StartPeriodicUpdate)(::windows::core::Vtable::as_raw(this), tileflyoutcontent.into().abi(), requestedinterval).ok() } + unsafe { (::windows::core::Vtable::vtable(this).StartPeriodicUpdate)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(tileflyoutcontent), requestedinterval).ok() } } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn StartPeriodicUpdateAtTime<'a, P0>(&self, tileflyoutcontent: P0, starttime: super::super::Foundation::DateTime, requestedinterval: PeriodicUpdateRecurrence) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::Uri>>, - { + pub fn StartPeriodicUpdateAtTime(&self, tileflyoutcontent: &super::super::Foundation::Uri, starttime: super::super::Foundation::DateTime, requestedinterval: PeriodicUpdateRecurrence) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).StartPeriodicUpdateAtTime)(::windows::core::Vtable::as_raw(this), tileflyoutcontent.into().abi(), starttime, requestedinterval).ok() } + unsafe { (::windows::core::Vtable::vtable(this).StartPeriodicUpdateAtTime)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(tileflyoutcontent), starttime, requestedinterval).ok() } } pub fn StopPeriodicUpdate(&self) -> ::windows::core::Result<()> { let this = self; @@ -3432,13 +3393,10 @@ impl TileNotification { } #[doc = "*Required features: `\"Data_Xml_Dom\"`*"] #[cfg(feature = "Data_Xml_Dom")] - pub fn CreateTileNotification<'a, P0>(content: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Data::Xml::Dom::XmlDocument>>, - { + pub fn CreateTileNotification(content: &super::super::Data::Xml::Dom::XmlDocument) -> ::windows::core::Result { Self::ITileNotificationFactory(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).CreateTileNotification)(::windows::core::Vtable::as_raw(this), content.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).CreateTileNotification)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(content), result__.as_mut_ptr()).from_abi::(result__) }) } #[doc(hidden)] @@ -3542,13 +3500,10 @@ impl TileUpdateManager { } #[doc = "*Required features: `\"System\"`*"] #[cfg(feature = "System")] - pub fn GetForUser<'a, P0>(user: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::System::User>>, - { + pub fn GetForUser(user: &super::super::System::User) -> ::windows::core::Result { Self::ITileUpdateManagerStatics2(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).GetForUser)(::windows::core::Vtable::as_raw(this), user.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).GetForUser)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(user), result__.as_mut_ptr()).from_abi::(result__) }) } #[doc(hidden)] @@ -3668,12 +3623,9 @@ unsafe impl ::core::marker::Sync for TileUpdateManagerForUser {} #[repr(transparent)] pub struct TileUpdater(::windows::core::IUnknown); impl TileUpdater { - pub fn Update<'a, P0>(&self, notification: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, TileNotification>>, - { + pub fn Update(&self, notification: &TileNotification) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).Update)(::windows::core::Vtable::as_raw(this), notification.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).Update)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(notification)).ok() } } pub fn Clear(&self) -> ::windows::core::Result<()> { let this = self; @@ -3690,19 +3642,13 @@ impl TileUpdater { (::windows::core::Vtable::vtable(this).Setting)(::windows::core::Vtable::as_raw(this), result__.as_mut_ptr()).from_abi::(result__) } } - pub fn AddToSchedule<'a, P0>(&self, scheduledtile: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, ScheduledTileNotification>>, - { + pub fn AddToSchedule(&self, scheduledtile: &ScheduledTileNotification) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).AddToSchedule)(::windows::core::Vtable::as_raw(this), scheduledtile.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).AddToSchedule)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(scheduledtile)).ok() } } - pub fn RemoveFromSchedule<'a, P0>(&self, scheduledtile: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, ScheduledTileNotification>>, - { + pub fn RemoveFromSchedule(&self, scheduledtile: &ScheduledTileNotification) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).RemoveFromSchedule)(::windows::core::Vtable::as_raw(this), scheduledtile.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).RemoveFromSchedule)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(scheduledtile)).ok() } } #[doc = "*Required features: `\"Foundation_Collections\"`*"] #[cfg(feature = "Foundation_Collections")] @@ -3715,21 +3661,15 @@ impl TileUpdater { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn StartPeriodicUpdate<'a, P0>(&self, tilecontent: P0, requestedinterval: PeriodicUpdateRecurrence) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::Uri>>, - { + pub fn StartPeriodicUpdate(&self, tilecontent: &super::super::Foundation::Uri, requestedinterval: PeriodicUpdateRecurrence) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).StartPeriodicUpdate)(::windows::core::Vtable::as_raw(this), tilecontent.into().abi(), requestedinterval).ok() } + unsafe { (::windows::core::Vtable::vtable(this).StartPeriodicUpdate)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(tilecontent), requestedinterval).ok() } } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn StartPeriodicUpdateAtTime<'a, P0>(&self, tilecontent: P0, starttime: super::super::Foundation::DateTime, requestedinterval: PeriodicUpdateRecurrence) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::Uri>>, - { + pub fn StartPeriodicUpdateAtTime(&self, tilecontent: &super::super::Foundation::Uri, starttime: super::super::Foundation::DateTime, requestedinterval: PeriodicUpdateRecurrence) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).StartPeriodicUpdateAtTime)(::windows::core::Vtable::as_raw(this), tilecontent.into().abi(), starttime, requestedinterval).ok() } + unsafe { (::windows::core::Vtable::vtable(this).StartPeriodicUpdateAtTime)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(tilecontent), starttime, requestedinterval).ok() } } pub fn StopPeriodicUpdate(&self) -> ::windows::core::Result<()> { let this = self; @@ -3959,22 +3899,16 @@ impl ToastCollection { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn SetIcon<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::Uri>>, - { + pub fn SetIcon(&self, value: &super::super::Foundation::Uri) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).SetIcon)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetIcon)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn CreateInstance<'a, P0>(collectionid: &::windows::core::HSTRING, displayname: &::windows::core::HSTRING, launchargs: &::windows::core::HSTRING, iconuri: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::Uri>>, - { + pub fn CreateInstance(collectionid: &::windows::core::HSTRING, displayname: &::windows::core::HSTRING, launchargs: &::windows::core::HSTRING, iconuri: &super::super::Foundation::Uri) -> ::windows::core::Result { Self::IToastCollectionFactory(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).CreateInstance)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(collectionid), ::core::mem::transmute_copy(displayname), ::core::mem::transmute_copy(launchargs), iconuri.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).CreateInstance)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(collectionid), ::core::mem::transmute_copy(displayname), ::core::mem::transmute_copy(launchargs), ::core::mem::transmute_copy(iconuri), result__.as_mut_ptr()).from_abi::(result__) }) } #[doc(hidden)] @@ -4053,14 +3987,11 @@ pub struct ToastCollectionManager(::windows::core::IUnknown); impl ToastCollectionManager { #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn SaveToastCollectionAsync<'a, P0>(&self, collection: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, ToastCollection>>, - { + pub fn SaveToastCollectionAsync(&self, collection: &ToastCollection) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).SaveToastCollectionAsync)(::windows::core::Vtable::as_raw(this), collection.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).SaveToastCollectionAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(collection), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation_Collections\"`*"] @@ -4366,14 +4297,11 @@ impl ToastNotification { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn Dismissed<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn Dismissed(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).Dismissed)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).Dismissed)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -4384,14 +4312,11 @@ impl ToastNotification { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn Activated<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn Activated(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).Activated)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).Activated)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -4402,14 +4327,11 @@ impl ToastNotification { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn Failed<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn Failed(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).Failed)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).Failed)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -4480,12 +4402,9 @@ impl ToastNotification { (::windows::core::Vtable::vtable(this).Data)(::windows::core::Vtable::as_raw(this), result__.as_mut_ptr()).from_abi::(result__) } } - pub fn SetData<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, NotificationData>>, - { + pub fn SetData(&self, value: &NotificationData) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).SetData)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetData)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } pub fn Priority(&self) -> ::windows::core::Result { let this = &::windows::core::Interface::cast::(self)?; @@ -4511,13 +4430,10 @@ impl ToastNotification { } #[doc = "*Required features: `\"Data_Xml_Dom\"`*"] #[cfg(feature = "Data_Xml_Dom")] - pub fn CreateToastNotification<'a, P0>(content: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Data::Xml::Dom::XmlDocument>>, - { + pub fn CreateToastNotification(content: &super::super::Data::Xml::Dom::XmlDocument) -> ::windows::core::Result { Self::IToastNotificationFactory(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).CreateToastNotification)(::windows::core::Vtable::as_raw(this), content.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).CreateToastNotification)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(content), result__.as_mut_ptr()).from_abi::(result__) }) } #[doc(hidden)] @@ -4898,13 +4814,10 @@ impl ToastNotificationManager { } #[doc = "*Required features: `\"System\"`*"] #[cfg(feature = "System")] - pub fn GetForUser<'a, P0>(user: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::System::User>>, - { + pub fn GetForUser(user: &super::super::System::User) -> ::windows::core::Result { Self::IToastNotificationManagerStatics4(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).GetForUser)(::windows::core::Vtable::as_raw(this), user.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).GetForUser)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(user), result__.as_mut_ptr()).from_abi::(result__) }) } pub fn ConfigureNotificationMirroring(value: NotificationMirroring) -> ::windows::core::Result<()> { @@ -5075,19 +4988,13 @@ unsafe impl ::core::marker::Sync for ToastNotificationManagerForUser {} #[repr(transparent)] pub struct ToastNotifier(::windows::core::IUnknown); impl ToastNotifier { - pub fn Show<'a, P0>(&self, notification: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, ToastNotification>>, - { + pub fn Show(&self, notification: &ToastNotification) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).Show)(::windows::core::Vtable::as_raw(this), notification.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).Show)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(notification)).ok() } } - pub fn Hide<'a, P0>(&self, notification: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, ToastNotification>>, - { + pub fn Hide(&self, notification: &ToastNotification) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).Hide)(::windows::core::Vtable::as_raw(this), notification.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).Hide)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(notification)).ok() } } pub fn Setting(&self) -> ::windows::core::Result { let this = self; @@ -5096,19 +5003,13 @@ impl ToastNotifier { (::windows::core::Vtable::vtable(this).Setting)(::windows::core::Vtable::as_raw(this), result__.as_mut_ptr()).from_abi::(result__) } } - pub fn AddToSchedule<'a, P0>(&self, scheduledtoast: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, ScheduledToastNotification>>, - { + pub fn AddToSchedule(&self, scheduledtoast: &ScheduledToastNotification) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).AddToSchedule)(::windows::core::Vtable::as_raw(this), scheduledtoast.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).AddToSchedule)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(scheduledtoast)).ok() } } - pub fn RemoveFromSchedule<'a, P0>(&self, scheduledtoast: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, ScheduledToastNotification>>, - { + pub fn RemoveFromSchedule(&self, scheduledtoast: &ScheduledToastNotification) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).RemoveFromSchedule)(::windows::core::Vtable::as_raw(this), scheduledtoast.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).RemoveFromSchedule)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(scheduledtoast)).ok() } } #[doc = "*Required features: `\"Foundation_Collections\"`*"] #[cfg(feature = "Foundation_Collections")] @@ -5119,36 +5020,27 @@ impl ToastNotifier { (::windows::core::Vtable::vtable(this).GetScheduledToastNotifications)(::windows::core::Vtable::as_raw(this), result__.as_mut_ptr()).from_abi::>(result__) } } - pub fn UpdateWithTagAndGroup<'a, P0>(&self, data: P0, tag: &::windows::core::HSTRING, group: &::windows::core::HSTRING) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, NotificationData>>, - { + pub fn UpdateWithTagAndGroup(&self, data: &NotificationData, tag: &::windows::core::HSTRING, group: &::windows::core::HSTRING) -> ::windows::core::Result { let this = &::windows::core::Interface::cast::(self)?; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).UpdateWithTagAndGroup)(::windows::core::Vtable::as_raw(this), data.into().abi(), ::core::mem::transmute_copy(tag), ::core::mem::transmute_copy(group), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).UpdateWithTagAndGroup)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(data), ::core::mem::transmute_copy(tag), ::core::mem::transmute_copy(group), result__.as_mut_ptr()).from_abi::(result__) } } - pub fn UpdateWithTag<'a, P0>(&self, data: P0, tag: &::windows::core::HSTRING) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, NotificationData>>, - { + pub fn UpdateWithTag(&self, data: &NotificationData, tag: &::windows::core::HSTRING) -> ::windows::core::Result { let this = &::windows::core::Interface::cast::(self)?; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).UpdateWithTag)(::windows::core::Vtable::as_raw(this), data.into().abi(), ::core::mem::transmute_copy(tag), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).UpdateWithTag)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(data), ::core::mem::transmute_copy(tag), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn ScheduledToastNotificationShowing<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn ScheduledToastNotificationShowing(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = &::windows::core::Interface::cast::(self)?; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).ScheduledToastNotificationShowing)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).ScheduledToastNotificationShowing)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] diff --git a/crates/libs/windows/src/Windows/UI/Popups/mod.rs b/crates/libs/windows/src/Windows/UI/Popups/mod.rs index e1e88b10a7..b92783547c 100644 --- a/crates/libs/windows/src/Windows/UI/Popups/mod.rs +++ b/crates/libs/windows/src/Windows/UI/Popups/mod.rs @@ -98,12 +98,9 @@ impl IUICommand { (::windows::core::Vtable::vtable(this).Invoked)(::windows::core::Vtable::as_raw(this), result__.as_mut_ptr()).from_abi::(result__) } } - pub fn SetInvoked<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, UICommandInvokedHandler>>, - { + pub fn SetInvoked(&self, value: &UICommandInvokedHandler) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).SetInvoked)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetInvoked)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } pub fn Id(&self) -> ::windows::core::Result<::windows::core::IInspectable> { let this = self; @@ -503,12 +500,9 @@ impl UICommand { (::windows::core::Vtable::vtable(this).Invoked)(::windows::core::Vtable::as_raw(this), result__.as_mut_ptr()).from_abi::(result__) } } - pub fn SetInvoked<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, UICommandInvokedHandler>>, - { + pub fn SetInvoked(&self, value: &UICommandInvokedHandler) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).SetInvoked)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetInvoked)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } pub fn Id(&self) -> ::windows::core::Result<::windows::core::IInspectable> { let this = self; @@ -530,23 +524,19 @@ impl UICommand { (::windows::core::Vtable::vtable(this).Create)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(label), result__.as_mut_ptr()).from_abi::(result__) }) } - pub fn CreateWithHandler<'a, P0>(label: &::windows::core::HSTRING, action: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, UICommandInvokedHandler>>, - { + pub fn CreateWithHandler(label: &::windows::core::HSTRING, action: &UICommandInvokedHandler) -> ::windows::core::Result { Self::IUICommandFactory(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).CreateWithHandler)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(label), action.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).CreateWithHandler)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(label), ::core::mem::transmute_copy(action), result__.as_mut_ptr()).from_abi::(result__) }) } - pub fn CreateWithHandlerAndId<'a, P0, P1>(label: &::windows::core::HSTRING, action: P0, commandid: P1) -> ::windows::core::Result + pub fn CreateWithHandlerAndId<'a, P0>(label: &::windows::core::HSTRING, action: &UICommandInvokedHandler, commandid: P0) -> ::windows::core::Result where - P0: ::std::convert::Into<::windows::core::InParam<'a, UICommandInvokedHandler>>, - P1: ::std::convert::Into<::windows::core::InParam<'a, ::windows::core::IInspectable>>, + P0: ::std::convert::Into<::windows::core::InParam<'a, ::windows::core::IInspectable>>, { Self::IUICommandFactory(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).CreateWithHandlerAndId)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(label), action.into().abi(), commandid.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).CreateWithHandlerAndId)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(label), ::core::mem::transmute_copy(action), commandid.into().abi(), result__.as_mut_ptr()).from_abi::(result__) }) } #[doc(hidden)] @@ -667,12 +657,9 @@ impl UICommandSeparator { (::windows::core::Vtable::vtable(this).Invoked)(::windows::core::Vtable::as_raw(this), result__.as_mut_ptr()).from_abi::(result__) } } - pub fn SetInvoked<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, UICommandInvokedHandler>>, - { + pub fn SetInvoked(&self, value: &UICommandInvokedHandler) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).SetInvoked)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetInvoked)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } pub fn Id(&self) -> ::windows::core::Result<::windows::core::IInspectable> { let this = self; diff --git a/crates/libs/windows/src/Windows/UI/Shell/mod.rs b/crates/libs/windows/src/Windows/UI/Shell/mod.rs index 08229c411f..a62d750bbd 100644 --- a/crates/libs/windows/src/Windows/UI/Shell/mod.rs +++ b/crates/libs/windows/src/Windows/UI/Shell/mod.rs @@ -344,14 +344,11 @@ impl SecurityAppManager { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn Register<'a, P0>(&self, kind: SecurityAppKind, displayname: &::windows::core::HSTRING, detailsuri: P0, registerperuser: bool) -> ::windows::core::Result<::windows::core::GUID> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::Uri>>, - { + pub fn Register(&self, kind: SecurityAppKind, displayname: &::windows::core::HSTRING, detailsuri: &super::super::Foundation::Uri, registerperuser: bool) -> ::windows::core::Result<::windows::core::GUID> { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).Register)(::windows::core::Vtable::as_raw(this), kind, ::core::mem::transmute_copy(displayname), detailsuri.into().abi(), registerperuser, result__.as_mut_ptr()).from_abi::<::windows::core::GUID>(result__) + (::windows::core::Vtable::vtable(this).Register)(::windows::core::Vtable::as_raw(this), kind, ::core::mem::transmute_copy(displayname), ::core::mem::transmute_copy(detailsuri), registerperuser, result__.as_mut_ptr()).from_abi::<::windows::core::GUID>(result__) } } pub fn Unregister(&self, kind: SecurityAppKind, guidregistration: ::windows::core::GUID) -> ::windows::core::Result<()> { @@ -360,12 +357,9 @@ impl SecurityAppManager { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn UpdateState<'a, P0>(&self, kind: SecurityAppKind, guidregistration: ::windows::core::GUID, state: SecurityAppState, substatus: SecurityAppSubstatus, detailsuri: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::Uri>>, - { + pub fn UpdateState(&self, kind: SecurityAppKind, guidregistration: ::windows::core::GUID, state: SecurityAppState, substatus: SecurityAppSubstatus, detailsuri: &super::super::Foundation::Uri) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).UpdateState)(::windows::core::Vtable::as_raw(this), kind, guidregistration, state, substatus, detailsuri.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).UpdateState)(::windows::core::Vtable::as_raw(this), kind, guidregistration, state, substatus, ::core::mem::transmute_copy(detailsuri)).ok() } } } impl ::core::clone::Clone for SecurityAppManager { @@ -537,14 +531,11 @@ impl ShareWindowCommandSource { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn CommandRequested<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn CommandRequested(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).CommandRequested)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).CommandRequested)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -555,14 +546,11 @@ impl ShareWindowCommandSource { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn CommandInvoked<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn CommandInvoked(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).CommandInvoked)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).CommandInvoked)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -676,14 +664,11 @@ impl TaskbarManager { } #[doc = "*Required features: `\"ApplicationModel_Core\"`, `\"Foundation\"`*"] #[cfg(all(feature = "ApplicationModel_Core", feature = "Foundation"))] - pub fn IsAppListEntryPinnedAsync<'a, P0>(&self, applistentry: P0) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::ApplicationModel::Core::AppListEntry>>, - { + pub fn IsAppListEntryPinnedAsync(&self, applistentry: &super::super::ApplicationModel::Core::AppListEntry) -> ::windows::core::Result> { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).IsAppListEntryPinnedAsync)(::windows::core::Vtable::as_raw(this), applistentry.into().abi(), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).IsAppListEntryPinnedAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(applistentry), result__.as_mut_ptr()).from_abi::>(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -697,14 +682,11 @@ impl TaskbarManager { } #[doc = "*Required features: `\"ApplicationModel_Core\"`, `\"Foundation\"`*"] #[cfg(all(feature = "ApplicationModel_Core", feature = "Foundation"))] - pub fn RequestPinAppListEntryAsync<'a, P0>(&self, applistentry: P0) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::ApplicationModel::Core::AppListEntry>>, - { + pub fn RequestPinAppListEntryAsync(&self, applistentry: &super::super::ApplicationModel::Core::AppListEntry) -> ::windows::core::Result> { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).RequestPinAppListEntryAsync)(::windows::core::Vtable::as_raw(this), applistentry.into().abi(), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).RequestPinAppListEntryAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(applistentry), result__.as_mut_ptr()).from_abi::>(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -718,14 +700,11 @@ impl TaskbarManager { } #[doc = "*Required features: `\"Foundation\"`, `\"UI_StartScreen\"`*"] #[cfg(all(feature = "Foundation", feature = "UI_StartScreen"))] - pub fn RequestPinSecondaryTileAsync<'a, P0>(&self, secondarytile: P0) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::StartScreen::SecondaryTile>>, - { + pub fn RequestPinSecondaryTileAsync(&self, secondarytile: &super::StartScreen::SecondaryTile) -> ::windows::core::Result> { let this = &::windows::core::Interface::cast::(self)?; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).RequestPinSecondaryTileAsync)(::windows::core::Vtable::as_raw(this), secondarytile.into().abi(), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).RequestPinSecondaryTileAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(secondarytile), result__.as_mut_ptr()).from_abi::>(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] diff --git a/crates/libs/windows/src/Windows/UI/StartScreen/mod.rs b/crates/libs/windows/src/Windows/UI/StartScreen/mod.rs index 83f3d38ab4..5080a44869 100644 --- a/crates/libs/windows/src/Windows/UI/StartScreen/mod.rs +++ b/crates/libs/windows/src/Windows/UI/StartScreen/mod.rs @@ -785,12 +785,9 @@ impl JumpListItem { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn SetLogo<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::Uri>>, - { + pub fn SetLogo(&self, value: &super::super::Foundation::Uri) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).SetLogo)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetLogo)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } pub fn CreateWithArguments(arguments: &::windows::core::HSTRING, displayname: &::windows::core::HSTRING) -> ::windows::core::Result { Self::IJumpListItemStatics(|this| unsafe { @@ -935,12 +932,9 @@ impl SecondaryTile { } #[doc = "*Required features: `\"Foundation\"`, `\"deprecated\"`*"] #[cfg(all(feature = "Foundation", feature = "deprecated"))] - pub fn SetLogo<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::Uri>>, - { + pub fn SetLogo(&self, value: &super::super::Foundation::Uri) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).SetLogo)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetLogo)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } #[doc = "*Required features: `\"Foundation\"`, `\"deprecated\"`*"] #[cfg(all(feature = "Foundation", feature = "deprecated"))] @@ -953,12 +947,9 @@ impl SecondaryTile { } #[doc = "*Required features: `\"Foundation\"`, `\"deprecated\"`*"] #[cfg(all(feature = "Foundation", feature = "deprecated"))] - pub fn SetSmallLogo<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::Uri>>, - { + pub fn SetSmallLogo(&self, value: &super::super::Foundation::Uri) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).SetSmallLogo)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetSmallLogo)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } #[doc = "*Required features: `\"Foundation\"`, `\"deprecated\"`*"] #[cfg(all(feature = "Foundation", feature = "deprecated"))] @@ -971,12 +962,9 @@ impl SecondaryTile { } #[doc = "*Required features: `\"Foundation\"`, `\"deprecated\"`*"] #[cfg(all(feature = "Foundation", feature = "deprecated"))] - pub fn SetWideLogo<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::Uri>>, - { + pub fn SetWideLogo(&self, value: &super::super::Foundation::Uri) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).SetWideLogo)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetWideLogo)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } #[doc = "*Required features: `\"Foundation\"`, `\"deprecated\"`*"] #[cfg(all(feature = "Foundation", feature = "deprecated"))] @@ -989,12 +977,9 @@ impl SecondaryTile { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn SetLockScreenBadgeLogo<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::Uri>>, - { + pub fn SetLockScreenBadgeLogo(&self, value: &super::super::Foundation::Uri) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).SetLockScreenBadgeLogo)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetLockScreenBadgeLogo)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] @@ -1173,14 +1158,11 @@ impl SecondaryTile { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn VisualElementsRequested<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn VisualElementsRequested(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = &::windows::core::Interface::cast::(self)?; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).VisualElementsRequested)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).VisualElementsRequested)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -1191,25 +1173,18 @@ impl SecondaryTile { } #[doc = "*Required features: `\"Foundation\"`, `\"deprecated\"`*"] #[cfg(all(feature = "Foundation", feature = "deprecated"))] - pub fn CreateTile<'a, P0>(tileid: &::windows::core::HSTRING, shortname: &::windows::core::HSTRING, displayname: &::windows::core::HSTRING, arguments: &::windows::core::HSTRING, tileoptions: TileOptions, logoreference: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::Uri>>, - { + pub fn CreateTile(tileid: &::windows::core::HSTRING, shortname: &::windows::core::HSTRING, displayname: &::windows::core::HSTRING, arguments: &::windows::core::HSTRING, tileoptions: TileOptions, logoreference: &super::super::Foundation::Uri) -> ::windows::core::Result { Self::ISecondaryTileFactory(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).CreateTile)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(tileid), ::core::mem::transmute_copy(shortname), ::core::mem::transmute_copy(displayname), ::core::mem::transmute_copy(arguments), tileoptions, logoreference.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).CreateTile)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(tileid), ::core::mem::transmute_copy(shortname), ::core::mem::transmute_copy(displayname), ::core::mem::transmute_copy(arguments), tileoptions, ::core::mem::transmute_copy(logoreference), result__.as_mut_ptr()).from_abi::(result__) }) } #[doc = "*Required features: `\"Foundation\"`, `\"deprecated\"`*"] #[cfg(all(feature = "Foundation", feature = "deprecated"))] - pub fn CreateWideTile<'a, P0, P1>(tileid: &::windows::core::HSTRING, shortname: &::windows::core::HSTRING, displayname: &::windows::core::HSTRING, arguments: &::windows::core::HSTRING, tileoptions: TileOptions, logoreference: P0, widelogoreference: P1) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::Uri>>, - P1: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::Uri>>, - { + pub fn CreateWideTile(tileid: &::windows::core::HSTRING, shortname: &::windows::core::HSTRING, displayname: &::windows::core::HSTRING, arguments: &::windows::core::HSTRING, tileoptions: TileOptions, logoreference: &super::super::Foundation::Uri, widelogoreference: &super::super::Foundation::Uri) -> ::windows::core::Result { Self::ISecondaryTileFactory(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).CreateWideTile)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(tileid), ::core::mem::transmute_copy(shortname), ::core::mem::transmute_copy(displayname), ::core::mem::transmute_copy(arguments), tileoptions, logoreference.into().abi(), widelogoreference.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).CreateWideTile)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(tileid), ::core::mem::transmute_copy(shortname), ::core::mem::transmute_copy(displayname), ::core::mem::transmute_copy(arguments), tileoptions, ::core::mem::transmute_copy(logoreference), ::core::mem::transmute_copy(widelogoreference), result__.as_mut_ptr()).from_abi::(result__) }) } pub fn CreateWithId(tileid: &::windows::core::HSTRING) -> ::windows::core::Result { @@ -1220,13 +1195,10 @@ impl SecondaryTile { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn CreateMinimalTile<'a, P0>(tileid: &::windows::core::HSTRING, displayname: &::windows::core::HSTRING, arguments: &::windows::core::HSTRING, square150x150logo: P0, desiredsize: TileSize) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::Uri>>, - { + pub fn CreateMinimalTile(tileid: &::windows::core::HSTRING, displayname: &::windows::core::HSTRING, arguments: &::windows::core::HSTRING, square150x150logo: &super::super::Foundation::Uri, desiredsize: TileSize) -> ::windows::core::Result { Self::ISecondaryTileFactory2(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).CreateMinimalTile)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(tileid), ::core::mem::transmute_copy(displayname), ::core::mem::transmute_copy(arguments), square150x150logo.into().abi(), desiredsize, result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).CreateMinimalTile)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(tileid), ::core::mem::transmute_copy(displayname), ::core::mem::transmute_copy(arguments), ::core::mem::transmute_copy(square150x150logo), desiredsize, result__.as_mut_ptr()).from_abi::(result__) }) } pub fn Exists(tileid: &::windows::core::HSTRING) -> ::windows::core::Result { @@ -1345,12 +1317,9 @@ pub struct SecondaryTileVisualElements(::windows::core::IUnknown); impl SecondaryTileVisualElements { #[doc = "*Required features: `\"Foundation\"`, `\"deprecated\"`*"] #[cfg(all(feature = "Foundation", feature = "deprecated"))] - pub fn SetSquare30x30Logo<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::Uri>>, - { + pub fn SetSquare30x30Logo(&self, value: &super::super::Foundation::Uri) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).SetSquare30x30Logo)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetSquare30x30Logo)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } #[doc = "*Required features: `\"Foundation\"`, `\"deprecated\"`*"] #[cfg(all(feature = "Foundation", feature = "deprecated"))] @@ -1363,12 +1332,9 @@ impl SecondaryTileVisualElements { } #[doc = "*Required features: `\"Foundation\"`, `\"deprecated\"`*"] #[cfg(all(feature = "Foundation", feature = "deprecated"))] - pub fn SetSquare70x70Logo<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::Uri>>, - { + pub fn SetSquare70x70Logo(&self, value: &super::super::Foundation::Uri) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).SetSquare70x70Logo)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetSquare70x70Logo)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } #[doc = "*Required features: `\"Foundation\"`, `\"deprecated\"`*"] #[cfg(all(feature = "Foundation", feature = "deprecated"))] @@ -1381,12 +1347,9 @@ impl SecondaryTileVisualElements { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn SetSquare150x150Logo<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::Uri>>, - { + pub fn SetSquare150x150Logo(&self, value: &super::super::Foundation::Uri) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).SetSquare150x150Logo)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetSquare150x150Logo)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] @@ -1399,12 +1362,9 @@ impl SecondaryTileVisualElements { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn SetWide310x150Logo<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::Uri>>, - { + pub fn SetWide310x150Logo(&self, value: &super::super::Foundation::Uri) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).SetWide310x150Logo)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetWide310x150Logo)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] @@ -1417,12 +1377,9 @@ impl SecondaryTileVisualElements { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn SetSquare310x310Logo<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::Uri>>, - { + pub fn SetSquare310x310Logo(&self, value: &super::super::Foundation::Uri) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).SetSquare310x310Logo)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetSquare310x310Logo)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] @@ -1490,12 +1447,9 @@ impl SecondaryTileVisualElements { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn SetSquare71x71Logo<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::Uri>>, - { + pub fn SetSquare71x71Logo(&self, value: &super::super::Foundation::Uri) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).SetSquare71x71Logo)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetSquare71x71Logo)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] @@ -1508,12 +1462,9 @@ impl SecondaryTileVisualElements { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn SetSquare44x44Logo<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::Uri>>, - { + pub fn SetSquare44x44Logo(&self, value: &super::super::Foundation::Uri) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).SetSquare44x44Logo)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetSquare44x44Logo)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] @@ -1611,38 +1562,29 @@ impl StartScreenManager { } #[doc = "*Required features: `\"ApplicationModel_Core\"`*"] #[cfg(feature = "ApplicationModel_Core")] - pub fn SupportsAppListEntry<'a, P0>(&self, applistentry: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::ApplicationModel::Core::AppListEntry>>, - { + pub fn SupportsAppListEntry(&self, applistentry: &super::super::ApplicationModel::Core::AppListEntry) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).SupportsAppListEntry)(::windows::core::Vtable::as_raw(this), applistentry.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).SupportsAppListEntry)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(applistentry), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"ApplicationModel_Core\"`, `\"Foundation\"`*"] #[cfg(all(feature = "ApplicationModel_Core", feature = "Foundation"))] - pub fn ContainsAppListEntryAsync<'a, P0>(&self, applistentry: P0) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::ApplicationModel::Core::AppListEntry>>, - { + pub fn ContainsAppListEntryAsync(&self, applistentry: &super::super::ApplicationModel::Core::AppListEntry) -> ::windows::core::Result> { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).ContainsAppListEntryAsync)(::windows::core::Vtable::as_raw(this), applistentry.into().abi(), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).ContainsAppListEntryAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(applistentry), result__.as_mut_ptr()).from_abi::>(result__) } } #[doc = "*Required features: `\"ApplicationModel_Core\"`, `\"Foundation\"`*"] #[cfg(all(feature = "ApplicationModel_Core", feature = "Foundation"))] - pub fn RequestAddAppListEntryAsync<'a, P0>(&self, applistentry: P0) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::ApplicationModel::Core::AppListEntry>>, - { + pub fn RequestAddAppListEntryAsync(&self, applistentry: &super::super::ApplicationModel::Core::AppListEntry) -> ::windows::core::Result> { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).RequestAddAppListEntryAsync)(::windows::core::Vtable::as_raw(this), applistentry.into().abi(), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).RequestAddAppListEntryAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(applistentry), result__.as_mut_ptr()).from_abi::>(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -1671,13 +1613,10 @@ impl StartScreenManager { } #[doc = "*Required features: `\"System\"`*"] #[cfg(feature = "System")] - pub fn GetForUser<'a, P0>(user: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::System::User>>, - { + pub fn GetForUser(user: &super::super::System::User) -> ::windows::core::Result { Self::IStartScreenManagerStatics(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).GetForUser)(::windows::core::Vtable::as_raw(this), user.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).GetForUser)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(user), result__.as_mut_ptr()).from_abi::(result__) }) } #[doc(hidden)] @@ -1756,12 +1695,9 @@ pub struct TileMixedRealityModel(::windows::core::IUnknown); impl TileMixedRealityModel { #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn SetUri<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::Uri>>, - { + pub fn SetUri(&self, value: &super::super::Foundation::Uri) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).SetUri)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetUri)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] diff --git a/crates/libs/windows/src/Windows/UI/Text/Core/mod.rs b/crates/libs/windows/src/Windows/UI/Text/Core/mod.rs index 8b769fd70b..2d806e7f50 100644 --- a/crates/libs/windows/src/Windows/UI/Text/Core/mod.rs +++ b/crates/libs/windows/src/Windows/UI/Text/Core/mod.rs @@ -789,14 +789,11 @@ impl CoreTextEditContext { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn TextRequested<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Foundation::TypedEventHandler>>, - { + pub fn TextRequested(&self, handler: &super::super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).TextRequested)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).TextRequested)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -807,14 +804,11 @@ impl CoreTextEditContext { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn SelectionRequested<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Foundation::TypedEventHandler>>, - { + pub fn SelectionRequested(&self, handler: &super::super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).SelectionRequested)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).SelectionRequested)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -825,14 +819,11 @@ impl CoreTextEditContext { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn LayoutRequested<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Foundation::TypedEventHandler>>, - { + pub fn LayoutRequested(&self, handler: &super::super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).LayoutRequested)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).LayoutRequested)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -843,14 +834,11 @@ impl CoreTextEditContext { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn TextUpdating<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Foundation::TypedEventHandler>>, - { + pub fn TextUpdating(&self, handler: &super::super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).TextUpdating)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).TextUpdating)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -861,14 +849,11 @@ impl CoreTextEditContext { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn SelectionUpdating<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Foundation::TypedEventHandler>>, - { + pub fn SelectionUpdating(&self, handler: &super::super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).SelectionUpdating)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).SelectionUpdating)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -879,14 +864,11 @@ impl CoreTextEditContext { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn FormatUpdating<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Foundation::TypedEventHandler>>, - { + pub fn FormatUpdating(&self, handler: &super::super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).FormatUpdating)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).FormatUpdating)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -897,14 +879,11 @@ impl CoreTextEditContext { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn CompositionStarted<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Foundation::TypedEventHandler>>, - { + pub fn CompositionStarted(&self, handler: &super::super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).CompositionStarted)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).CompositionStarted)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -915,14 +894,11 @@ impl CoreTextEditContext { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn CompositionCompleted<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Foundation::TypedEventHandler>>, - { + pub fn CompositionCompleted(&self, handler: &super::super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).CompositionCompleted)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).CompositionCompleted)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -933,14 +909,11 @@ impl CoreTextEditContext { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn FocusRemoved<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Foundation::TypedEventHandler>>, - { + pub fn FocusRemoved(&self, handler: &super::super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).FocusRemoved)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).FocusRemoved)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -971,14 +944,11 @@ impl CoreTextEditContext { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn NotifyFocusLeaveCompleted<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Foundation::TypedEventHandler>>, - { + pub fn NotifyFocusLeaveCompleted(&self, handler: &super::super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = &::windows::core::Interface::cast::(self)?; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).NotifyFocusLeaveCompleted)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).NotifyFocusLeaveCompleted)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -1787,14 +1757,11 @@ impl CoreTextServicesManager { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn InputLanguageChanged<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Foundation::TypedEventHandler>>, - { + pub fn InputLanguageChanged(&self, handler: &super::super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).InputLanguageChanged)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).InputLanguageChanged)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] diff --git a/crates/libs/windows/src/Windows/UI/Text/mod.rs b/crates/libs/windows/src/Windows/UI/Text/mod.rs index 105f8cbd55..1229ae9482 100644 --- a/crates/libs/windows/src/Windows/UI/Text/mod.rs +++ b/crates/libs/windows/src/Windows/UI/Text/mod.rs @@ -2246,12 +2246,9 @@ impl ContentLinkInfo { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn SetUri<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::Uri>>, - { + pub fn SetUri(&self, value: &super::super::Foundation::Uri) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).SetUri)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetUri)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } pub fn LinkContentKind(&self) -> ::windows::core::Result<::windows::core::HSTRING> { let this = self; @@ -2778,12 +2775,9 @@ impl RichEditTextRange { (::windows::core::Vtable::vtable(this).ContentLinkInfo)(::windows::core::Vtable::as_raw(this), result__.as_mut_ptr()).from_abi::(result__) } } - pub fn SetContentLinkInfo<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, ContentLinkInfo>>, - { + pub fn SetContentLinkInfo(&self, value: &ContentLinkInfo) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).SetContentLinkInfo)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetContentLinkInfo)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } pub fn Character(&self) -> ::windows::core::Result { let this = self; diff --git a/crates/libs/windows/src/Windows/UI/UIAutomation/Core/mod.rs b/crates/libs/windows/src/Windows/UI/UIAutomation/Core/mod.rs index 6dfcd5b3d9..0b237de12f 100644 --- a/crates/libs/windows/src/Windows/UI/UIAutomation/Core/mod.rs +++ b/crates/libs/windows/src/Windows/UI/UIAutomation/Core/mod.rs @@ -165,12 +165,9 @@ pub struct ICoreAutomationRemoteOperationContext_Vtbl { #[repr(transparent)] pub struct ICoreAutomationRemoteOperationExtensionProvider(::windows::core::IUnknown); impl ICoreAutomationRemoteOperationExtensionProvider { - pub fn CallExtension<'a, P0>(&self, extensionid: ::windows::core::GUID, context: P0, operandids: &[AutomationRemoteOperationOperandId]) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, CoreAutomationRemoteOperationContext>>, - { + pub fn CallExtension(&self, extensionid: ::windows::core::GUID, context: &CoreAutomationRemoteOperationContext, operandids: &[AutomationRemoteOperationOperandId]) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).CallExtension)(::windows::core::Vtable::as_raw(this), extensionid, context.into().abi(), operandids.len() as u32, operandids.as_ptr()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).CallExtension)(::windows::core::Vtable::as_raw(this), extensionid, ::core::mem::transmute_copy(context), operandids.len() as u32, operandids.as_ptr()).ok() } } pub fn IsExtensionSupported(&self, extensionid: ::windows::core::GUID) -> ::windows::core::Result { let this = self; @@ -507,19 +504,13 @@ impl CoreAutomationRemoteOperation { (::windows::core::Vtable::vtable(this).IsOpcodeSupported)(::windows::core::Vtable::as_raw(this), opcode, result__.as_mut_ptr()).from_abi::(result__) } } - pub fn ImportElement<'a, P0>(&self, operandid: AutomationRemoteOperationOperandId, element: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::AutomationElement>>, - { + pub fn ImportElement(&self, operandid: AutomationRemoteOperationOperandId, element: &super::AutomationElement) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).ImportElement)(::windows::core::Vtable::as_raw(this), operandid, element.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).ImportElement)(::windows::core::Vtable::as_raw(this), operandid, ::core::mem::transmute_copy(element)).ok() } } - pub fn ImportTextRange<'a, P0>(&self, operandid: AutomationRemoteOperationOperandId, textrange: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::AutomationTextRange>>, - { + pub fn ImportTextRange(&self, operandid: AutomationRemoteOperationOperandId, textrange: &super::AutomationTextRange) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).ImportTextRange)(::windows::core::Vtable::as_raw(this), operandid, textrange.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).ImportTextRange)(::windows::core::Vtable::as_raw(this), operandid, ::core::mem::transmute_copy(textrange)).ok() } } pub fn AddToResults(&self, operandid: AutomationRemoteOperationOperandId) -> ::windows::core::Result<()> { let this = self; @@ -532,12 +523,9 @@ impl CoreAutomationRemoteOperation { (::windows::core::Vtable::vtable(this).Execute)(::windows::core::Vtable::as_raw(this), bytecodebuffer.len() as u32, bytecodebuffer.as_ptr(), result__.as_mut_ptr()).from_abi::(result__) } } - pub fn ImportConnectionBoundObject<'a, P0>(&self, operandid: AutomationRemoteOperationOperandId, connectionboundobject: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::AutomationConnectionBoundObject>>, - { + pub fn ImportConnectionBoundObject(&self, operandid: AutomationRemoteOperationOperandId, connectionboundobject: &super::AutomationConnectionBoundObject) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).ImportConnectionBoundObject)(::windows::core::Vtable::as_raw(this), operandid, connectionboundobject.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).ImportConnectionBoundObject)(::windows::core::Vtable::as_raw(this), operandid, ::core::mem::transmute_copy(connectionboundobject)).ok() } } } impl ::core::clone::Clone for CoreAutomationRemoteOperation { @@ -727,14 +715,11 @@ impl RemoteAutomationClientSession { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn ConnectionRequested<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Foundation::TypedEventHandler>>, - { + pub fn ConnectionRequested(&self, handler: &super::super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).ConnectionRequested)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).ConnectionRequested)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -745,14 +730,11 @@ impl RemoteAutomationClientSession { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn Disconnected<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Foundation::TypedEventHandler>>, - { + pub fn Disconnected(&self, handler: &super::super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).Disconnected)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).Disconnected)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] diff --git a/crates/libs/windows/src/Windows/UI/ViewManagement/Core/mod.rs b/crates/libs/windows/src/Windows/UI/ViewManagement/Core/mod.rs index 4bea60600d..bb135c45e8 100644 --- a/crates/libs/windows/src/Windows/UI/ViewManagement/Core/mod.rs +++ b/crates/libs/windows/src/Windows/UI/ViewManagement/Core/mod.rs @@ -415,14 +415,11 @@ pub struct CoreFrameworkInputView(::windows::core::IUnknown); impl CoreFrameworkInputView { #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn PrimaryViewAnimationStarting<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Foundation::TypedEventHandler>>, - { + pub fn PrimaryViewAnimationStarting(&self, handler: &super::super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).PrimaryViewAnimationStarting)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).PrimaryViewAnimationStarting)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -433,14 +430,11 @@ impl CoreFrameworkInputView { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn OcclusionsChanged<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Foundation::TypedEventHandler>>, - { + pub fn OcclusionsChanged(&self, handler: &super::super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).OcclusionsChanged)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).OcclusionsChanged)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -449,13 +443,10 @@ impl CoreFrameworkInputView { let this = self; unsafe { (::windows::core::Vtable::vtable(this).RemoveOcclusionsChanged)(::windows::core::Vtable::as_raw(this), token).ok() } } - pub fn GetForUIContext<'a, P0>(context: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::UIContext>>, - { + pub fn GetForUIContext(context: &super::super::UIContext) -> ::windows::core::Result { Self::ICoreFrameworkInputViewStatics(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).GetForUIContext)(::windows::core::Vtable::as_raw(this), context.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).GetForUIContext)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(context), result__.as_mut_ptr()).from_abi::(result__) }) } pub fn GetForCurrentView() -> ::windows::core::Result { @@ -719,14 +710,11 @@ pub struct CoreInputView(::windows::core::IUnknown); impl CoreInputView { #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn OcclusionsChanged<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Foundation::TypedEventHandler>>, - { + pub fn OcclusionsChanged(&self, handler: &super::super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).OcclusionsChanged)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).OcclusionsChanged)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -760,14 +748,11 @@ impl CoreInputView { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn XYFocusTransferringFromPrimaryView<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Foundation::TypedEventHandler>>, - { + pub fn XYFocusTransferringFromPrimaryView(&self, handler: &super::super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = &::windows::core::Interface::cast::(self)?; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).XYFocusTransferringFromPrimaryView)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).XYFocusTransferringFromPrimaryView)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -778,14 +763,11 @@ impl CoreInputView { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn XYFocusTransferredToPrimaryView<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Foundation::TypedEventHandler>>, - { + pub fn XYFocusTransferredToPrimaryView(&self, handler: &super::super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = &::windows::core::Interface::cast::(self)?; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).XYFocusTransferredToPrimaryView)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).XYFocusTransferredToPrimaryView)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -826,14 +808,11 @@ impl CoreInputView { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn PrimaryViewShowing<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Foundation::TypedEventHandler>>, - { + pub fn PrimaryViewShowing(&self, handler: &super::super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = &::windows::core::Interface::cast::(self)?; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).PrimaryViewShowing)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).PrimaryViewShowing)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -844,14 +823,11 @@ impl CoreInputView { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn PrimaryViewHiding<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Foundation::TypedEventHandler>>, - { + pub fn PrimaryViewHiding(&self, handler: &super::super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = &::windows::core::Interface::cast::(self)?; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).PrimaryViewHiding)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).PrimaryViewHiding)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -869,14 +845,11 @@ impl CoreInputView { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn SupportedKindsChanged<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Foundation::TypedEventHandler>>, - { + pub fn SupportedKindsChanged(&self, handler: &super::super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = &::windows::core::Interface::cast::(self)?; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).SupportedKindsChanged)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).SupportedKindsChanged)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -887,14 +860,11 @@ impl CoreInputView { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn PrimaryViewAnimationStarting<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Foundation::TypedEventHandler>>, - { + pub fn PrimaryViewAnimationStarting(&self, handler: &super::super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = &::windows::core::Interface::cast::(self)?; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).PrimaryViewAnimationStarting)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).PrimaryViewAnimationStarting)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -909,13 +879,10 @@ impl CoreInputView { (::windows::core::Vtable::vtable(this).GetForCurrentView)(::windows::core::Vtable::as_raw(this), result__.as_mut_ptr()).from_abi::(result__) }) } - pub fn GetForUIContext<'a, P0>(context: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::UIContext>>, - { + pub fn GetForUIContext(context: &super::super::UIContext) -> ::windows::core::Result { Self::ICoreInputViewStatics2(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).GetForUIContext)(::windows::core::Vtable::as_raw(this), context.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).GetForUIContext)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(context), result__.as_mut_ptr()).from_abi::(result__) }) } #[doc(hidden)] diff --git a/crates/libs/windows/src/Windows/UI/ViewManagement/mod.rs b/crates/libs/windows/src/Windows/UI/ViewManagement/mod.rs index b6ed8dde34..90b4588b83 100644 --- a/crates/libs/windows/src/Windows/UI/ViewManagement/mod.rs +++ b/crates/libs/windows/src/Windows/UI/ViewManagement/mod.rs @@ -1217,14 +1217,11 @@ impl AccessibilitySettings { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn HighContrastChanged<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn HighContrastChanged(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).HighContrastChanged)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).HighContrastChanged)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -1464,14 +1461,11 @@ impl ApplicationView { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn Consolidated<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn Consolidated(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).Consolidated)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).Consolidated)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -1506,14 +1500,11 @@ impl ApplicationView { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn VisibleBoundsChanged<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn VisibleBoundsChanged(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = &::windows::core::Interface::cast::(self)?; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).VisibleBoundsChanged)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).VisibleBoundsChanged)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -1616,14 +1607,11 @@ impl ApplicationView { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn TryEnterViewModeWithPreferencesAsync<'a, P0>(&self, viewmode: ApplicationViewMode, viewmodepreferences: P0) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, ViewModePreferences>>, - { + pub fn TryEnterViewModeWithPreferencesAsync(&self, viewmode: ApplicationViewMode, viewmodepreferences: &ViewModePreferences) -> ::windows::core::Result> { let this = &::windows::core::Interface::cast::(self)?; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).TryEnterViewModeWithPreferencesAsync)(::windows::core::Vtable::as_raw(this), viewmode, viewmodepreferences.into().abi(), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).TryEnterViewModeWithPreferencesAsync)(::windows::core::Vtable::as_raw(this), viewmode, ::core::mem::transmute_copy(viewmodepreferences), result__.as_mut_ptr()).from_abi::>(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -2089,13 +2077,10 @@ impl ApplicationViewSwitcher { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn TryShowAsViewModeWithPreferencesAsync<'a, P0>(viewid: i32, viewmode: ApplicationViewMode, viewmodepreferences: P0) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, ViewModePreferences>>, - { + pub fn TryShowAsViewModeWithPreferencesAsync(viewid: i32, viewmode: ApplicationViewMode, viewmodepreferences: &ViewModePreferences) -> ::windows::core::Result> { Self::IApplicationViewSwitcherStatics3(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).TryShowAsViewModeWithPreferencesAsync)(::windows::core::Vtable::as_raw(this), viewid, viewmode, viewmodepreferences.into().abi(), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).TryShowAsViewModeWithPreferencesAsync)(::windows::core::Vtable::as_raw(this), viewid, viewmode, ::core::mem::transmute_copy(viewmodepreferences), result__.as_mut_ptr()).from_abi::>(result__) }) } #[doc(hidden)] @@ -2516,14 +2501,11 @@ pub struct InputPane(::windows::core::IUnknown); impl InputPane { #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn Showing<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn Showing(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).Showing)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).Showing)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -2534,14 +2516,11 @@ impl InputPane { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn Hiding<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn Hiding(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).Hiding)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).Hiding)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -2590,13 +2569,10 @@ impl InputPane { (::windows::core::Vtable::vtable(this).GetForCurrentView)(::windows::core::Vtable::as_raw(this), result__.as_mut_ptr()).from_abi::(result__) }) } - pub fn GetForUIContext<'a, P0>(context: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::UIContext>>, - { + pub fn GetForUIContext(context: &super::UIContext) -> ::windows::core::Result { Self::IInputPaneStatics2(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).GetForUIContext)(::windows::core::Vtable::as_raw(this), context.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).GetForUIContext)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(context), result__.as_mut_ptr()).from_abi::(result__) }) } #[doc(hidden)] @@ -2794,13 +2770,10 @@ impl ProjectionManager { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn ProjectionDisplayAvailableChanged<'a, P0>(handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::EventHandler<::windows::core::IInspectable>>>, - { + pub fn ProjectionDisplayAvailableChanged(handler: &super::super::Foundation::EventHandler<::windows::core::IInspectable>) -> ::windows::core::Result { Self::IProjectionManagerStatics(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).ProjectionDisplayAvailableChanged)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).ProjectionDisplayAvailableChanged)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) }) } #[doc = "*Required features: `\"Foundation\"`*"] @@ -2810,13 +2783,10 @@ impl ProjectionManager { } #[doc = "*Required features: `\"Devices_Enumeration\"`, `\"Foundation\"`*"] #[cfg(all(feature = "Devices_Enumeration", feature = "Foundation"))] - pub fn StartProjectingWithDeviceInfoAsync<'a, P0>(projectionviewid: i32, anchorviewid: i32, displaydeviceinfo: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Devices::Enumeration::DeviceInformation>>, - { + pub fn StartProjectingWithDeviceInfoAsync(projectionviewid: i32, anchorviewid: i32, displaydeviceinfo: &super::super::Devices::Enumeration::DeviceInformation) -> ::windows::core::Result { Self::IProjectionManagerStatics2(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).StartProjectingWithDeviceInfoAsync)(::windows::core::Vtable::as_raw(this), projectionviewid, anchorviewid, displaydeviceinfo.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).StartProjectingWithDeviceInfoAsync)(::windows::core::Vtable::as_raw(this), projectionviewid, anchorviewid, ::core::mem::transmute_copy(displaydeviceinfo), result__.as_mut_ptr()).from_abi::(result__) }) } #[doc = "*Required features: `\"Foundation\"`*"] @@ -2944,14 +2914,11 @@ impl StatusBar { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn Showing<'a, P0>(&self, eventhandler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn Showing(&self, eventhandler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).Showing)(::windows::core::Vtable::as_raw(this), eventhandler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).Showing)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(eventhandler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -2962,14 +2929,11 @@ impl StatusBar { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn Hiding<'a, P0>(&self, eventhandler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn Hiding(&self, eventhandler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).Hiding)(::windows::core::Vtable::as_raw(this), eventhandler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).Hiding)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(eventhandler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -3290,14 +3254,11 @@ impl UISettings { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn TextScaleFactorChanged<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn TextScaleFactorChanged(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = &::windows::core::Interface::cast::(self)?; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).TextScaleFactorChanged)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).TextScaleFactorChanged)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -3315,14 +3276,11 @@ impl UISettings { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn ColorValuesChanged<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn ColorValuesChanged(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = &::windows::core::Interface::cast::(self)?; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).ColorValuesChanged)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).ColorValuesChanged)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -3340,14 +3298,11 @@ impl UISettings { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn AdvancedEffectsEnabledChanged<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn AdvancedEffectsEnabledChanged(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = &::windows::core::Interface::cast::(self)?; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).AdvancedEffectsEnabledChanged)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).AdvancedEffectsEnabledChanged)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -3365,14 +3320,11 @@ impl UISettings { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn AutoHideScrollBarsChanged<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn AutoHideScrollBarsChanged(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = &::windows::core::Interface::cast::(self)?; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).AutoHideScrollBarsChanged)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).AutoHideScrollBarsChanged)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -3383,14 +3335,11 @@ impl UISettings { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn AnimationsEnabledChanged<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn AnimationsEnabledChanged(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = &::windows::core::Interface::cast::(self)?; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).AnimationsEnabledChanged)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).AnimationsEnabledChanged)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -3401,14 +3350,11 @@ impl UISettings { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn MessageDurationChanged<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn MessageDurationChanged(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = &::windows::core::Interface::cast::(self)?; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).MessageDurationChanged)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).MessageDurationChanged)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] diff --git a/crates/libs/windows/src/Windows/UI/WebUI/Core/mod.rs b/crates/libs/windows/src/Windows/UI/WebUI/Core/mod.rs index 038bcfadb3..99a38f9b21 100644 --- a/crates/libs/windows/src/Windows/UI/WebUI/Core/mod.rs +++ b/crates/libs/windows/src/Windows/UI/WebUI/Core/mod.rs @@ -470,14 +470,11 @@ impl WebUICommandBar { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn MenuOpened<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, MenuOpenedEventHandler>>, - { + pub fn MenuOpened(&self, handler: &MenuOpenedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).MenuOpened)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).MenuOpened)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -488,14 +485,11 @@ impl WebUICommandBar { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn MenuClosed<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, MenuClosedEventHandler>>, - { + pub fn MenuClosed(&self, handler: &MenuClosedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).MenuClosed)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).MenuClosed)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -506,14 +500,11 @@ impl WebUICommandBar { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn SizeChanged<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, SizeChangedEventHandler>>, - { + pub fn SizeChanged(&self, handler: &SizeChangedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).SizeChanged)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).SizeChanged)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -620,22 +611,16 @@ impl WebUICommandBarBitmapIcon { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn SetUri<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Foundation::Uri>>, - { + pub fn SetUri(&self, value: &super::super::super::Foundation::Uri) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).SetUri)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetUri)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn Create<'a, P0>(uri: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Foundation::Uri>>, - { + pub fn Create(uri: &super::super::super::Foundation::Uri) -> ::windows::core::Result { Self::IWebUICommandBarBitmapIconFactory(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).Create)(::windows::core::Vtable::as_raw(this), uri.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).Create)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(uri), result__.as_mut_ptr()).from_abi::(result__) }) } #[doc(hidden)] @@ -751,14 +736,11 @@ impl WebUICommandBarConfirmationButton { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn ItemInvoked<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Foundation::TypedEventHandler>>, - { + pub fn ItemInvoked(&self, handler: &super::super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).ItemInvoked)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).ItemInvoked)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -923,14 +905,11 @@ impl WebUICommandBarIconButton { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn ItemInvoked<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Foundation::TypedEventHandler>>, - { + pub fn ItemInvoked(&self, handler: &super::super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).ItemInvoked)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).ItemInvoked)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -1509,12 +1488,9 @@ impl SizeChangedEventHandler { let com = SizeChangedEventHandlerBox:: { vtable: &SizeChangedEventHandlerBox::::VTABLE, count: ::windows::core::RefCount::new(1), invoke }; unsafe { ::core::mem::transmute(::windows::core::alloc::boxed::Box::new(com)) } } - pub fn Invoke<'a, P0>(&self, eventargs: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, WebUICommandBarSizeChangedEventArgs>>, - { + pub fn Invoke(&self, eventargs: &WebUICommandBarSizeChangedEventArgs) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).Invoke)(::windows::core::Vtable::as_raw(this), eventargs.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).Invoke)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(eventargs)).ok() } } } #[repr(C)] diff --git a/crates/libs/windows/src/Windows/UI/WebUI/mod.rs b/crates/libs/windows/src/Windows/UI/WebUI/mod.rs index 0b40bbe690..3b99ba4666 100644 --- a/crates/libs/windows/src/Windows/UI/WebUI/mod.rs +++ b/crates/libs/windows/src/Windows/UI/WebUI/mod.rs @@ -1723,13 +1723,10 @@ pub struct WebUIApplication; impl WebUIApplication { #[doc = "*Required features: `\"ApplicationModel_Activation\"`, `\"Foundation\"`*"] #[cfg(all(feature = "ApplicationModel_Activation", feature = "Foundation"))] - pub fn Activated<'a, P0>(handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, ActivatedEventHandler>>, - { + pub fn Activated(handler: &ActivatedEventHandler) -> ::windows::core::Result { Self::IWebUIActivationStatics(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).Activated)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).Activated)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) }) } #[doc = "*Required features: `\"Foundation\"`*"] @@ -1739,13 +1736,10 @@ impl WebUIApplication { } #[doc = "*Required features: `\"ApplicationModel\"`, `\"Foundation\"`*"] #[cfg(all(feature = "ApplicationModel", feature = "Foundation"))] - pub fn Suspending<'a, P0>(handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, SuspendingEventHandler>>, - { + pub fn Suspending(handler: &SuspendingEventHandler) -> ::windows::core::Result { Self::IWebUIActivationStatics(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).Suspending)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).Suspending)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) }) } #[doc = "*Required features: `\"Foundation\"`*"] @@ -1755,13 +1749,10 @@ impl WebUIApplication { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn Resuming<'a, P0>(handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, ResumingEventHandler>>, - { + pub fn Resuming(handler: &ResumingEventHandler) -> ::windows::core::Result { Self::IWebUIActivationStatics(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).Resuming)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).Resuming)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) }) } #[doc = "*Required features: `\"Foundation\"`*"] @@ -1771,13 +1762,10 @@ impl WebUIApplication { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn Navigated<'a, P0>(handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, NavigatedEventHandler>>, - { + pub fn Navigated(handler: &NavigatedEventHandler) -> ::windows::core::Result { Self::IWebUIActivationStatics(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).Navigated)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).Navigated)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) }) } #[doc = "*Required features: `\"Foundation\"`*"] @@ -1787,13 +1775,10 @@ impl WebUIApplication { } #[doc = "*Required features: `\"ApplicationModel\"`, `\"Foundation\"`*"] #[cfg(all(feature = "ApplicationModel", feature = "Foundation"))] - pub fn LeavingBackground<'a, P0>(handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, LeavingBackgroundEventHandler>>, - { + pub fn LeavingBackground(handler: &LeavingBackgroundEventHandler) -> ::windows::core::Result { Self::IWebUIActivationStatics2(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).LeavingBackground)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).LeavingBackground)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) }) } #[doc = "*Required features: `\"Foundation\"`*"] @@ -1803,13 +1788,10 @@ impl WebUIApplication { } #[doc = "*Required features: `\"ApplicationModel\"`, `\"Foundation\"`*"] #[cfg(all(feature = "ApplicationModel", feature = "Foundation"))] - pub fn EnteredBackground<'a, P0>(handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, EnteredBackgroundEventHandler>>, - { + pub fn EnteredBackground(handler: &EnteredBackgroundEventHandler) -> ::windows::core::Result { Self::IWebUIActivationStatics2(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).EnteredBackground)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).EnteredBackground)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) }) } #[doc = "*Required features: `\"Foundation\"`*"] @@ -1830,24 +1812,18 @@ impl WebUIApplication { } #[doc = "*Required features: `\"ApplicationModel_Core\"`, `\"Foundation\"`, `\"System\"`*"] #[cfg(all(feature = "ApplicationModel_Core", feature = "Foundation", feature = "System"))] - pub fn RequestRestartForUserAsync<'a, P0>(user: P0, launcharguments: &::windows::core::HSTRING) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::System::User>>, - { + pub fn RequestRestartForUserAsync(user: &super::super::System::User, launcharguments: &::windows::core::HSTRING) -> ::windows::core::Result> { Self::IWebUIActivationStatics3(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).RequestRestartForUserAsync)(::windows::core::Vtable::as_raw(this), user.into().abi(), ::core::mem::transmute_copy(launcharguments), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).RequestRestartForUserAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(user), ::core::mem::transmute_copy(launcharguments), result__.as_mut_ptr()).from_abi::>(result__) }) } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn NewWebUIViewCreated<'a, P0>(handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::EventHandler>>, - { + pub fn NewWebUIViewCreated(handler: &super::super::Foundation::EventHandler) -> ::windows::core::Result { Self::IWebUIActivationStatics4(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).NewWebUIViewCreated)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).NewWebUIViewCreated)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) }) } #[doc = "*Required features: `\"Foundation\"`*"] @@ -1857,13 +1833,10 @@ impl WebUIApplication { } #[doc = "*Required features: `\"ApplicationModel_Activation\"`, `\"Foundation\"`*"] #[cfg(all(feature = "ApplicationModel_Activation", feature = "Foundation"))] - pub fn BackgroundActivated<'a, P0>(handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, BackgroundActivatedEventHandler>>, - { + pub fn BackgroundActivated(handler: &BackgroundActivatedEventHandler) -> ::windows::core::Result { Self::IWebUIActivationStatics4(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).BackgroundActivated)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).BackgroundActivated)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) }) } #[doc = "*Required features: `\"Foundation\"`*"] @@ -3258,14 +3231,11 @@ impl WebUIBackgroundTaskInstanceRuntimeClass { } #[doc = "*Required features: `\"ApplicationModel_Background\"`, `\"Foundation\"`*"] #[cfg(all(feature = "ApplicationModel_Background", feature = "Foundation"))] - pub fn Canceled<'a, P0>(&self, cancelhandler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::ApplicationModel::Background::BackgroundTaskCanceledEventHandler>>, - { + pub fn Canceled(&self, cancelhandler: &super::super::ApplicationModel::Background::BackgroundTaskCanceledEventHandler) -> ::windows::core::Result { let this = &::windows::core::Interface::cast::(self)?; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).Canceled)(::windows::core::Vtable::as_raw(this), cancelhandler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).Canceled)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(cancelhandler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"ApplicationModel_Background\"`, `\"Foundation\"`*"] @@ -12267,14 +12237,11 @@ impl WebUIView { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn Closed<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn Closed(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).Closed)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).Closed)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -12285,14 +12252,11 @@ impl WebUIView { } #[doc = "*Required features: `\"ApplicationModel_Activation\"`, `\"Foundation\"`*"] #[cfg(all(feature = "ApplicationModel_Activation", feature = "Foundation"))] - pub fn Activated<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn Activated(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).Activated)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).Activated)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -12322,13 +12286,10 @@ impl WebUIView { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn CreateWithUriAsync<'a, P0>(uri: P0) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::Uri>>, - { + pub fn CreateWithUriAsync(uri: &super::super::Foundation::Uri) -> ::windows::core::Result> { Self::IWebUIViewStatics(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).CreateWithUriAsync)(::windows::core::Vtable::as_raw(this), uri.into().abi(), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).CreateWithUriAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(uri), result__.as_mut_ptr()).from_abi::>(result__) }) } #[doc = "*Required features: `\"Foundation\"`, `\"Web_UI\"`*"] @@ -12342,12 +12303,9 @@ impl WebUIView { } #[doc = "*Required features: `\"Foundation\"`, `\"Web_UI\"`*"] #[cfg(all(feature = "Foundation", feature = "Web_UI"))] - pub fn SetSource<'a, P0>(&self, source: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::Uri>>, - { + pub fn SetSource(&self, source: &super::super::Foundation::Uri) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).SetSource)(::windows::core::Vtable::as_raw(this), source.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetSource)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(source)).ok() } } #[doc = "*Required features: `\"Web_UI\"`*"] #[cfg(feature = "Web_UI")] @@ -12444,12 +12402,9 @@ impl WebUIView { } #[doc = "*Required features: `\"Foundation\"`, `\"Web_UI\"`*"] #[cfg(all(feature = "Foundation", feature = "Web_UI"))] - pub fn Navigate<'a, P0>(&self, source: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::Uri>>, - { + pub fn Navigate(&self, source: &super::super::Foundation::Uri) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).Navigate)(::windows::core::Vtable::as_raw(this), source.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).Navigate)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(source)).ok() } } #[doc = "*Required features: `\"Web_UI\"`*"] #[cfg(feature = "Web_UI")] @@ -12459,23 +12414,19 @@ impl WebUIView { } #[doc = "*Required features: `\"Foundation\"`, `\"Web_UI\"`*"] #[cfg(all(feature = "Foundation", feature = "Web_UI"))] - pub fn NavigateToLocalStreamUri<'a, P0, P1, E1>(&self, source: P0, streamresolver: P1) -> ::windows::core::Result<()> + pub fn NavigateToLocalStreamUri<'a, P0, E0>(&self, source: &super::super::Foundation::Uri, streamresolver: P0) -> ::windows::core::Result<()> where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::Uri>>, - P1: ::std::convert::TryInto<::windows::core::InParam<'a, super::super::Web::IUriToStreamResolver>, Error = E1>, - E1: ::std::convert::Into<::windows::core::Error>, + P0: ::std::convert::TryInto<::windows::core::InParam<'a, super::super::Web::IUriToStreamResolver>, Error = E0>, + E0: ::std::convert::Into<::windows::core::Error>, { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).NavigateToLocalStreamUri)(::windows::core::Vtable::as_raw(this), source.into().abi(), streamresolver.try_into().map_err(|e| e.into())?.abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).NavigateToLocalStreamUri)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(source), streamresolver.try_into().map_err(|e| e.into())?.abi()).ok() } } #[doc = "*Required features: `\"Web_Http\"`, `\"Web_UI\"`*"] #[cfg(all(feature = "Web_Http", feature = "Web_UI"))] - pub fn NavigateWithHttpRequestMessage<'a, P0>(&self, requestmessage: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Web::Http::HttpRequestMessage>>, - { + pub fn NavigateWithHttpRequestMessage(&self, requestmessage: &super::super::Web::Http::HttpRequestMessage) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).NavigateWithHttpRequestMessage)(::windows::core::Vtable::as_raw(this), requestmessage.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).NavigateWithHttpRequestMessage)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(requestmessage)).ok() } } #[doc = "*Required features: `\"Foundation_Collections\"`, `\"Web_UI\"`*"] #[cfg(all(feature = "Foundation_Collections", feature = "Web_UI"))] @@ -12529,14 +12480,11 @@ impl WebUIView { } #[doc = "*Required features: `\"Foundation\"`, `\"Web_UI\"`*"] #[cfg(all(feature = "Foundation", feature = "Web_UI"))] - pub fn NavigationStarting<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn NavigationStarting(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = &::windows::core::Interface::cast::(self)?; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).NavigationStarting)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).NavigationStarting)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`, `\"Web_UI\"`*"] @@ -12547,14 +12495,11 @@ impl WebUIView { } #[doc = "*Required features: `\"Foundation\"`, `\"Web_UI\"`*"] #[cfg(all(feature = "Foundation", feature = "Web_UI"))] - pub fn ContentLoading<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn ContentLoading(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = &::windows::core::Interface::cast::(self)?; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).ContentLoading)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).ContentLoading)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`, `\"Web_UI\"`*"] @@ -12565,14 +12510,11 @@ impl WebUIView { } #[doc = "*Required features: `\"Foundation\"`, `\"Web_UI\"`*"] #[cfg(all(feature = "Foundation", feature = "Web_UI"))] - pub fn DOMContentLoaded<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn DOMContentLoaded(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = &::windows::core::Interface::cast::(self)?; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).DOMContentLoaded)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).DOMContentLoaded)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`, `\"Web_UI\"`*"] @@ -12583,14 +12525,11 @@ impl WebUIView { } #[doc = "*Required features: `\"Foundation\"`, `\"Web_UI\"`*"] #[cfg(all(feature = "Foundation", feature = "Web_UI"))] - pub fn NavigationCompleted<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn NavigationCompleted(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = &::windows::core::Interface::cast::(self)?; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).NavigationCompleted)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).NavigationCompleted)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`, `\"Web_UI\"`*"] @@ -12601,14 +12540,11 @@ impl WebUIView { } #[doc = "*Required features: `\"Foundation\"`, `\"Web_UI\"`*"] #[cfg(all(feature = "Foundation", feature = "Web_UI"))] - pub fn FrameNavigationStarting<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn FrameNavigationStarting(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = &::windows::core::Interface::cast::(self)?; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).FrameNavigationStarting)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).FrameNavigationStarting)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`, `\"Web_UI\"`*"] @@ -12619,14 +12555,11 @@ impl WebUIView { } #[doc = "*Required features: `\"Foundation\"`, `\"Web_UI\"`*"] #[cfg(all(feature = "Foundation", feature = "Web_UI"))] - pub fn FrameContentLoading<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn FrameContentLoading(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = &::windows::core::Interface::cast::(self)?; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).FrameContentLoading)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).FrameContentLoading)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`, `\"Web_UI\"`*"] @@ -12637,14 +12570,11 @@ impl WebUIView { } #[doc = "*Required features: `\"Foundation\"`, `\"Web_UI\"`*"] #[cfg(all(feature = "Foundation", feature = "Web_UI"))] - pub fn FrameDOMContentLoaded<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn FrameDOMContentLoaded(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = &::windows::core::Interface::cast::(self)?; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).FrameDOMContentLoaded)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).FrameDOMContentLoaded)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`, `\"Web_UI\"`*"] @@ -12655,14 +12585,11 @@ impl WebUIView { } #[doc = "*Required features: `\"Foundation\"`, `\"Web_UI\"`*"] #[cfg(all(feature = "Foundation", feature = "Web_UI"))] - pub fn FrameNavigationCompleted<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn FrameNavigationCompleted(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = &::windows::core::Interface::cast::(self)?; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).FrameNavigationCompleted)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).FrameNavigationCompleted)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`, `\"Web_UI\"`*"] @@ -12673,14 +12600,11 @@ impl WebUIView { } #[doc = "*Required features: `\"Foundation\"`, `\"Web_UI\"`*"] #[cfg(all(feature = "Foundation", feature = "Web_UI"))] - pub fn ScriptNotify<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn ScriptNotify(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = &::windows::core::Interface::cast::(self)?; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).ScriptNotify)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).ScriptNotify)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`, `\"Web_UI\"`*"] @@ -12691,14 +12615,11 @@ impl WebUIView { } #[doc = "*Required features: `\"Foundation\"`, `\"Web_UI\"`*"] #[cfg(all(feature = "Foundation", feature = "Web_UI"))] - pub fn LongRunningScriptDetected<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn LongRunningScriptDetected(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = &::windows::core::Interface::cast::(self)?; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).LongRunningScriptDetected)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).LongRunningScriptDetected)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`, `\"Web_UI\"`*"] @@ -12709,14 +12630,11 @@ impl WebUIView { } #[doc = "*Required features: `\"Foundation\"`, `\"Web_UI\"`*"] #[cfg(all(feature = "Foundation", feature = "Web_UI"))] - pub fn UnsafeContentWarningDisplaying<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn UnsafeContentWarningDisplaying(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = &::windows::core::Interface::cast::(self)?; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).UnsafeContentWarningDisplaying)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).UnsafeContentWarningDisplaying)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`, `\"Web_UI\"`*"] @@ -12727,14 +12645,11 @@ impl WebUIView { } #[doc = "*Required features: `\"Foundation\"`, `\"Web_UI\"`*"] #[cfg(all(feature = "Foundation", feature = "Web_UI"))] - pub fn UnviewableContentIdentified<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn UnviewableContentIdentified(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = &::windows::core::Interface::cast::(self)?; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).UnviewableContentIdentified)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).UnviewableContentIdentified)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`, `\"Web_UI\"`*"] @@ -12745,14 +12660,11 @@ impl WebUIView { } #[doc = "*Required features: `\"Foundation\"`, `\"Web_UI\"`*"] #[cfg(all(feature = "Foundation", feature = "Web_UI"))] - pub fn PermissionRequested<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn PermissionRequested(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = &::windows::core::Interface::cast::(self)?; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).PermissionRequested)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).PermissionRequested)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`, `\"Web_UI\"`*"] @@ -12763,14 +12675,11 @@ impl WebUIView { } #[doc = "*Required features: `\"Foundation\"`, `\"Web_UI\"`*"] #[cfg(all(feature = "Foundation", feature = "Web_UI"))] - pub fn UnsupportedUriSchemeIdentified<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn UnsupportedUriSchemeIdentified(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = &::windows::core::Interface::cast::(self)?; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).UnsupportedUriSchemeIdentified)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).UnsupportedUriSchemeIdentified)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`, `\"Web_UI\"`*"] @@ -12781,14 +12690,11 @@ impl WebUIView { } #[doc = "*Required features: `\"Foundation\"`, `\"Web_UI\"`*"] #[cfg(all(feature = "Foundation", feature = "Web_UI"))] - pub fn NewWindowRequested<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn NewWindowRequested(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = &::windows::core::Interface::cast::(self)?; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).NewWindowRequested)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).NewWindowRequested)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`, `\"Web_UI\"`*"] @@ -12799,14 +12705,11 @@ impl WebUIView { } #[doc = "*Required features: `\"Foundation\"`, `\"Web_UI\"`*"] #[cfg(all(feature = "Foundation", feature = "Web_UI"))] - pub fn ContainsFullScreenElementChanged<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn ContainsFullScreenElementChanged(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = &::windows::core::Interface::cast::(self)?; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).ContainsFullScreenElementChanged)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).ContainsFullScreenElementChanged)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`, `\"Web_UI\"`*"] @@ -12817,14 +12720,11 @@ impl WebUIView { } #[doc = "*Required features: `\"Foundation\"`, `\"Web_UI\"`*"] #[cfg(all(feature = "Foundation", feature = "Web_UI"))] - pub fn WebResourceRequested<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn WebResourceRequested(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = &::windows::core::Interface::cast::(self)?; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).WebResourceRequested)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).WebResourceRequested)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`, `\"Web_UI\"`*"] diff --git a/crates/libs/windows/src/Windows/UI/WindowManagement/Preview/mod.rs b/crates/libs/windows/src/Windows/UI/WindowManagement/Preview/mod.rs index 9434dbf244..3daed5ce82 100644 --- a/crates/libs/windows/src/Windows/UI/WindowManagement/Preview/mod.rs +++ b/crates/libs/windows/src/Windows/UI/WindowManagement/Preview/mod.rs @@ -36,11 +36,8 @@ pub struct WindowManagementPreview(::windows::core::IUnknown); impl WindowManagementPreview { #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn SetPreferredMinSize<'a, P0>(window: P0, preferredframeminsize: super::super::super::Foundation::Size) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::AppWindow>>, - { - Self::IWindowManagementPreviewStatics(|this| unsafe { (::windows::core::Vtable::vtable(this).SetPreferredMinSize)(::windows::core::Vtable::as_raw(this), window.into().abi(), preferredframeminsize).ok() }) + pub fn SetPreferredMinSize(window: &super::AppWindow, preferredframeminsize: super::super::super::Foundation::Size) -> ::windows::core::Result<()> { + Self::IWindowManagementPreviewStatics(|this| unsafe { (::windows::core::Vtable::vtable(this).SetPreferredMinSize)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(window), preferredframeminsize).ok() }) } #[doc(hidden)] pub fn IWindowManagementPreviewStatics ::windows::core::Result>(callback: F) -> ::windows::core::Result { diff --git a/crates/libs/windows/src/Windows/UI/WindowManagement/mod.rs b/crates/libs/windows/src/Windows/UI/WindowManagement/mod.rs index d769f471cb..15df43cf76 100644 --- a/crates/libs/windows/src/Windows/UI/WindowManagement/mod.rs +++ b/crates/libs/windows/src/Windows/UI/WindowManagement/mod.rs @@ -715,32 +715,23 @@ impl AppWindow { (::windows::core::Vtable::vtable(this).GetDisplayRegions)(::windows::core::Vtable::as_raw(this), result__.as_mut_ptr()).from_abi::>(result__) } } - pub fn RequestMoveToDisplayRegion<'a, P0>(&self, displayregion: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, DisplayRegion>>, - { + pub fn RequestMoveToDisplayRegion(&self, displayregion: &DisplayRegion) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).RequestMoveToDisplayRegion)(::windows::core::Vtable::as_raw(this), displayregion.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).RequestMoveToDisplayRegion)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(displayregion)).ok() } } pub fn RequestMoveAdjacentToCurrentView(&self) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Vtable::vtable(this).RequestMoveAdjacentToCurrentView)(::windows::core::Vtable::as_raw(this)).ok() } } - pub fn RequestMoveAdjacentToWindow<'a, P0>(&self, anchorwindow: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, AppWindow>>, - { + pub fn RequestMoveAdjacentToWindow(&self, anchorwindow: &AppWindow) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).RequestMoveAdjacentToWindow)(::windows::core::Vtable::as_raw(this), anchorwindow.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).RequestMoveAdjacentToWindow)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(anchorwindow)).ok() } } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn RequestMoveRelativeToWindowContent<'a, P0>(&self, anchorwindow: P0, contentoffset: super::super::Foundation::Point) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, AppWindow>>, - { + pub fn RequestMoveRelativeToWindowContent(&self, anchorwindow: &AppWindow, contentoffset: super::super::Foundation::Point) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).RequestMoveRelativeToWindowContent)(::windows::core::Vtable::as_raw(this), anchorwindow.into().abi(), contentoffset).ok() } + unsafe { (::windows::core::Vtable::vtable(this).RequestMoveRelativeToWindowContent)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(anchorwindow), contentoffset).ok() } } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] @@ -750,12 +741,9 @@ impl AppWindow { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn RequestMoveRelativeToDisplayRegion<'a, P0>(&self, displayregion: P0, displayregionoffset: super::super::Foundation::Point) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, DisplayRegion>>, - { + pub fn RequestMoveRelativeToDisplayRegion(&self, displayregion: &DisplayRegion, displayregionoffset: super::super::Foundation::Point) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).RequestMoveRelativeToDisplayRegion)(::windows::core::Vtable::as_raw(this), displayregion.into().abi(), displayregionoffset).ok() } + unsafe { (::windows::core::Vtable::vtable(this).RequestMoveRelativeToDisplayRegion)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(displayregion), displayregionoffset).ok() } } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] @@ -774,14 +762,11 @@ impl AppWindow { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn Changed<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn Changed(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).Changed)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).Changed)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -792,14 +777,11 @@ impl AppWindow { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn Closed<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn Closed(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).Closed)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).Closed)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -810,14 +792,11 @@ impl AppWindow { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn CloseRequested<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn CloseRequested(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).CloseRequested)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).CloseRequested)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -2213,14 +2192,11 @@ impl DisplayRegion { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn Changed<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn Changed(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).Changed)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).Changed)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -2452,14 +2428,11 @@ impl WindowingEnvironment { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn Changed<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn Changed(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).Changed)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).Changed)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] diff --git a/crates/libs/windows/src/Windows/Web/AtomPub/mod.rs b/crates/libs/windows/src/Windows/Web/AtomPub/mod.rs index 83ebd789f2..003db1d1e0 100644 --- a/crates/libs/windows/src/Windows/Web/AtomPub/mod.rs +++ b/crates/libs/windows/src/Windows/Web/AtomPub/mod.rs @@ -154,128 +154,100 @@ impl AtomPubClient { } #[doc = "*Required features: `\"Foundation\"`, `\"Web_Syndication\"`*"] #[cfg(all(feature = "Foundation", feature = "Web_Syndication"))] - pub fn RetrieveServiceDocumentAsync<'a, P0>(&self, uri: P0) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::Uri>>, - { + pub fn RetrieveServiceDocumentAsync(&self, uri: &super::super::Foundation::Uri) -> ::windows::core::Result> { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).RetrieveServiceDocumentAsync)(::windows::core::Vtable::as_raw(this), uri.into().abi(), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).RetrieveServiceDocumentAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(uri), result__.as_mut_ptr()).from_abi::>(result__) } } #[doc = "*Required features: `\"Foundation\"`, `\"Storage_Streams\"`, `\"Web_Syndication\"`*"] #[cfg(all(feature = "Foundation", feature = "Storage_Streams", feature = "Web_Syndication"))] - pub fn RetrieveMediaResourceAsync<'a, P0>(&self, uri: P0) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::Uri>>, - { + pub fn RetrieveMediaResourceAsync(&self, uri: &super::super::Foundation::Uri) -> ::windows::core::Result> { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).RetrieveMediaResourceAsync)(::windows::core::Vtable::as_raw(this), uri.into().abi(), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).RetrieveMediaResourceAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(uri), result__.as_mut_ptr()).from_abi::>(result__) } } #[doc = "*Required features: `\"Foundation\"`, `\"Web_Syndication\"`*"] #[cfg(all(feature = "Foundation", feature = "Web_Syndication"))] - pub fn RetrieveResourceAsync<'a, P0>(&self, uri: P0) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::Uri>>, - { + pub fn RetrieveResourceAsync(&self, uri: &super::super::Foundation::Uri) -> ::windows::core::Result> { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).RetrieveResourceAsync)(::windows::core::Vtable::as_raw(this), uri.into().abi(), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).RetrieveResourceAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(uri), result__.as_mut_ptr()).from_abi::>(result__) } } #[doc = "*Required features: `\"Foundation\"`, `\"Web_Syndication\"`*"] #[cfg(all(feature = "Foundation", feature = "Web_Syndication"))] - pub fn CreateResourceAsync<'a, P0, P1>(&self, uri: P0, description: &::windows::core::HSTRING, item: P1) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::Uri>>, - P1: ::std::convert::Into<::windows::core::InParam<'a, super::Syndication::SyndicationItem>>, - { + pub fn CreateResourceAsync(&self, uri: &super::super::Foundation::Uri, description: &::windows::core::HSTRING, item: &super::Syndication::SyndicationItem) -> ::windows::core::Result> { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).CreateResourceAsync)(::windows::core::Vtable::as_raw(this), uri.into().abi(), ::core::mem::transmute_copy(description), item.into().abi(), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).CreateResourceAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(uri), ::core::mem::transmute_copy(description), ::core::mem::transmute_copy(item), result__.as_mut_ptr()).from_abi::>(result__) } } #[doc = "*Required features: `\"Foundation\"`, `\"Storage_Streams\"`, `\"Web_Syndication\"`*"] #[cfg(all(feature = "Foundation", feature = "Storage_Streams", feature = "Web_Syndication"))] - pub fn CreateMediaResourceAsync<'a, P0, P1, E1>(&self, uri: P0, mediatype: &::windows::core::HSTRING, description: &::windows::core::HSTRING, mediastream: P1) -> ::windows::core::Result> + pub fn CreateMediaResourceAsync<'a, P0, E0>(&self, uri: &super::super::Foundation::Uri, mediatype: &::windows::core::HSTRING, description: &::windows::core::HSTRING, mediastream: P0) -> ::windows::core::Result> where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::Uri>>, - P1: ::std::convert::TryInto<::windows::core::InParam<'a, super::super::Storage::Streams::IInputStream>, Error = E1>, - E1: ::std::convert::Into<::windows::core::Error>, + P0: ::std::convert::TryInto<::windows::core::InParam<'a, super::super::Storage::Streams::IInputStream>, Error = E0>, + E0: ::std::convert::Into<::windows::core::Error>, { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).CreateMediaResourceAsync)(::windows::core::Vtable::as_raw(this), uri.into().abi(), ::core::mem::transmute_copy(mediatype), ::core::mem::transmute_copy(description), mediastream.try_into().map_err(|e| e.into())?.abi(), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).CreateMediaResourceAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(uri), ::core::mem::transmute_copy(mediatype), ::core::mem::transmute_copy(description), mediastream.try_into().map_err(|e| e.into())?.abi(), result__.as_mut_ptr()).from_abi::>(result__) } } #[doc = "*Required features: `\"Foundation\"`, `\"Storage_Streams\"`, `\"Web_Syndication\"`*"] #[cfg(all(feature = "Foundation", feature = "Storage_Streams", feature = "Web_Syndication"))] - pub fn UpdateMediaResourceAsync<'a, P0, P1, E1>(&self, uri: P0, mediatype: &::windows::core::HSTRING, mediastream: P1) -> ::windows::core::Result> + pub fn UpdateMediaResourceAsync<'a, P0, E0>(&self, uri: &super::super::Foundation::Uri, mediatype: &::windows::core::HSTRING, mediastream: P0) -> ::windows::core::Result> where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::Uri>>, - P1: ::std::convert::TryInto<::windows::core::InParam<'a, super::super::Storage::Streams::IInputStream>, Error = E1>, - E1: ::std::convert::Into<::windows::core::Error>, + P0: ::std::convert::TryInto<::windows::core::InParam<'a, super::super::Storage::Streams::IInputStream>, Error = E0>, + E0: ::std::convert::Into<::windows::core::Error>, { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).UpdateMediaResourceAsync)(::windows::core::Vtable::as_raw(this), uri.into().abi(), ::core::mem::transmute_copy(mediatype), mediastream.try_into().map_err(|e| e.into())?.abi(), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).UpdateMediaResourceAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(uri), ::core::mem::transmute_copy(mediatype), mediastream.try_into().map_err(|e| e.into())?.abi(), result__.as_mut_ptr()).from_abi::>(result__) } } #[doc = "*Required features: `\"Foundation\"`, `\"Web_Syndication\"`*"] #[cfg(all(feature = "Foundation", feature = "Web_Syndication"))] - pub fn UpdateResourceAsync<'a, P0, P1>(&self, uri: P0, item: P1) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::Uri>>, - P1: ::std::convert::Into<::windows::core::InParam<'a, super::Syndication::SyndicationItem>>, - { + pub fn UpdateResourceAsync(&self, uri: &super::super::Foundation::Uri, item: &super::Syndication::SyndicationItem) -> ::windows::core::Result> { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).UpdateResourceAsync)(::windows::core::Vtable::as_raw(this), uri.into().abi(), item.into().abi(), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).UpdateResourceAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(uri), ::core::mem::transmute_copy(item), result__.as_mut_ptr()).from_abi::>(result__) } } #[doc = "*Required features: `\"Foundation\"`, `\"Web_Syndication\"`*"] #[cfg(all(feature = "Foundation", feature = "Web_Syndication"))] - pub fn UpdateResourceItemAsync<'a, P0>(&self, item: P0) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::Syndication::SyndicationItem>>, - { + pub fn UpdateResourceItemAsync(&self, item: &super::Syndication::SyndicationItem) -> ::windows::core::Result> { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).UpdateResourceItemAsync)(::windows::core::Vtable::as_raw(this), item.into().abi(), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).UpdateResourceItemAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(item), result__.as_mut_ptr()).from_abi::>(result__) } } #[doc = "*Required features: `\"Foundation\"`, `\"Web_Syndication\"`*"] #[cfg(all(feature = "Foundation", feature = "Web_Syndication"))] - pub fn DeleteResourceAsync<'a, P0>(&self, uri: P0) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::Uri>>, - { + pub fn DeleteResourceAsync(&self, uri: &super::super::Foundation::Uri) -> ::windows::core::Result> { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).DeleteResourceAsync)(::windows::core::Vtable::as_raw(this), uri.into().abi(), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).DeleteResourceAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(uri), result__.as_mut_ptr()).from_abi::>(result__) } } #[doc = "*Required features: `\"Foundation\"`, `\"Web_Syndication\"`*"] #[cfg(all(feature = "Foundation", feature = "Web_Syndication"))] - pub fn DeleteResourceItemAsync<'a, P0>(&self, item: P0) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::Syndication::SyndicationItem>>, - { + pub fn DeleteResourceItemAsync(&self, item: &super::Syndication::SyndicationItem) -> ::windows::core::Result> { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).DeleteResourceItemAsync)(::windows::core::Vtable::as_raw(this), item.into().abi(), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).DeleteResourceItemAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(item), result__.as_mut_ptr()).from_abi::>(result__) } } pub fn CancelAsyncOperations(&self) -> ::windows::core::Result<()> { @@ -284,13 +256,10 @@ impl AtomPubClient { } #[doc = "*Required features: `\"Security_Credentials\"`*"] #[cfg(feature = "Security_Credentials")] - pub fn CreateAtomPubClientWithCredentials<'a, P0>(servercredential: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Security::Credentials::PasswordCredential>>, - { + pub fn CreateAtomPubClientWithCredentials(servercredential: &super::super::Security::Credentials::PasswordCredential) -> ::windows::core::Result { Self::IAtomPubClientFactory(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).CreateAtomPubClientWithCredentials)(::windows::core::Vtable::as_raw(this), servercredential.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).CreateAtomPubClientWithCredentials)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(servercredential), result__.as_mut_ptr()).from_abi::(result__) }) } #[doc = "*Required features: `\"Security_Credentials\"`, `\"Web_Syndication\"`*"] @@ -304,12 +273,9 @@ impl AtomPubClient { } #[doc = "*Required features: `\"Security_Credentials\"`, `\"Web_Syndication\"`*"] #[cfg(all(feature = "Security_Credentials", feature = "Web_Syndication"))] - pub fn SetServerCredential<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Security::Credentials::PasswordCredential>>, - { + pub fn SetServerCredential(&self, value: &super::super::Security::Credentials::PasswordCredential) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).SetServerCredential)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetServerCredential)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } #[doc = "*Required features: `\"Security_Credentials\"`, `\"Web_Syndication\"`*"] #[cfg(all(feature = "Security_Credentials", feature = "Web_Syndication"))] @@ -322,12 +288,9 @@ impl AtomPubClient { } #[doc = "*Required features: `\"Security_Credentials\"`, `\"Web_Syndication\"`*"] #[cfg(all(feature = "Security_Credentials", feature = "Web_Syndication"))] - pub fn SetProxyCredential<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Security::Credentials::PasswordCredential>>, - { + pub fn SetProxyCredential(&self, value: &super::super::Security::Credentials::PasswordCredential) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).SetProxyCredential)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetProxyCredential)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } #[doc = "*Required features: `\"Web_Syndication\"`*"] #[cfg(feature = "Web_Syndication")] @@ -382,14 +345,11 @@ impl AtomPubClient { } #[doc = "*Required features: `\"Foundation\"`, `\"Web_Syndication\"`*"] #[cfg(all(feature = "Foundation", feature = "Web_Syndication"))] - pub fn RetrieveFeedAsync<'a, P0>(&self, uri: P0) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::Uri>>, - { + pub fn RetrieveFeedAsync(&self, uri: &super::super::Foundation::Uri) -> ::windows::core::Result> { let this = &::windows::core::Interface::cast::(self)?; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).RetrieveFeedAsync)(::windows::core::Vtable::as_raw(this), uri.into().abi(), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).RetrieveFeedAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(uri), result__.as_mut_ptr()).from_abi::>(result__) } } #[doc(hidden)] @@ -595,12 +555,9 @@ impl ResourceCollection { } #[doc = "*Required features: `\"Foundation\"`, `\"Web_Syndication\"`*"] #[cfg(all(feature = "Foundation", feature = "Web_Syndication"))] - pub fn SetBaseUri<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::Uri>>, - { + pub fn SetBaseUri(&self, value: &super::super::Foundation::Uri) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).SetBaseUri)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetBaseUri)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } #[doc = "*Required features: `\"Foundation_Collections\"`, `\"Web_Syndication\"`*"] #[cfg(all(feature = "Foundation_Collections", feature = "Web_Syndication"))] @@ -800,12 +757,9 @@ impl ServiceDocument { } #[doc = "*Required features: `\"Foundation\"`, `\"Web_Syndication\"`*"] #[cfg(all(feature = "Foundation", feature = "Web_Syndication"))] - pub fn SetBaseUri<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::Uri>>, - { + pub fn SetBaseUri(&self, value: &super::super::Foundation::Uri) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).SetBaseUri)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetBaseUri)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } #[doc = "*Required features: `\"Foundation_Collections\"`, `\"Web_Syndication\"`*"] #[cfg(all(feature = "Foundation_Collections", feature = "Web_Syndication"))] @@ -996,12 +950,9 @@ impl Workspace { } #[doc = "*Required features: `\"Foundation\"`, `\"Web_Syndication\"`*"] #[cfg(all(feature = "Foundation", feature = "Web_Syndication"))] - pub fn SetBaseUri<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::Uri>>, - { + pub fn SetBaseUri(&self, value: &super::super::Foundation::Uri) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).SetBaseUri)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetBaseUri)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } #[doc = "*Required features: `\"Foundation_Collections\"`, `\"Web_Syndication\"`*"] #[cfg(all(feature = "Foundation_Collections", feature = "Web_Syndication"))] diff --git a/crates/libs/windows/src/Windows/Web/Http/Diagnostics/mod.rs b/crates/libs/windows/src/Windows/Web/Http/Diagnostics/mod.rs index 5a3a09f8df..dfa156401d 100644 --- a/crates/libs/windows/src/Windows/Web/Http/Diagnostics/mod.rs +++ b/crates/libs/windows/src/Windows/Web/Http/Diagnostics/mod.rs @@ -214,14 +214,11 @@ impl HttpDiagnosticProvider { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn RequestSent<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Foundation::TypedEventHandler>>, - { + pub fn RequestSent(&self, handler: &super::super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).RequestSent)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).RequestSent)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -232,14 +229,11 @@ impl HttpDiagnosticProvider { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn ResponseReceived<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Foundation::TypedEventHandler>>, - { + pub fn ResponseReceived(&self, handler: &super::super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).ResponseReceived)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).ResponseReceived)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -250,14 +244,11 @@ impl HttpDiagnosticProvider { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn RequestResponseCompleted<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Foundation::TypedEventHandler>>, - { + pub fn RequestResponseCompleted(&self, handler: &super::super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).RequestResponseCompleted)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).RequestResponseCompleted)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -268,13 +259,10 @@ impl HttpDiagnosticProvider { } #[doc = "*Required features: `\"System_Diagnostics\"`*"] #[cfg(feature = "System_Diagnostics")] - pub fn CreateFromProcessDiagnosticInfo<'a, P0>(processdiagnosticinfo: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::System::Diagnostics::ProcessDiagnosticInfo>>, - { + pub fn CreateFromProcessDiagnosticInfo(processdiagnosticinfo: &super::super::super::System::Diagnostics::ProcessDiagnosticInfo) -> ::windows::core::Result { Self::IHttpDiagnosticProviderStatics(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).CreateFromProcessDiagnosticInfo)(::windows::core::Vtable::as_raw(this), processdiagnosticinfo.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).CreateFromProcessDiagnosticInfo)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(processdiagnosticinfo), result__.as_mut_ptr()).from_abi::(result__) }) } #[doc(hidden)] diff --git a/crates/libs/windows/src/Windows/Web/Http/Filters/mod.rs b/crates/libs/windows/src/Windows/Web/Http/Filters/mod.rs index 83916b7b1f..018041d1df 100644 --- a/crates/libs/windows/src/Windows/Web/Http/Filters/mod.rs +++ b/crates/libs/windows/src/Windows/Web/Http/Filters/mod.rs @@ -167,14 +167,11 @@ pub struct IHttpFilter(::windows::core::IUnknown); impl IHttpFilter { #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn SendRequestAsync<'a, P0>(&self, request: P0) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::HttpRequestMessage>>, - { + pub fn SendRequestAsync(&self, request: &super::HttpRequestMessage) -> ::windows::core::Result> { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).SendRequestAsync)(::windows::core::Vtable::as_raw(this), request.into().abi(), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).SendRequestAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(request), result__.as_mut_ptr()).from_abi::>(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -385,12 +382,9 @@ impl HttpBaseProtocolFilter { } #[doc = "*Required features: `\"Security_Cryptography_Certificates\"`*"] #[cfg(feature = "Security_Cryptography_Certificates")] - pub fn SetClientCertificate<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Security::Cryptography::Certificates::Certificate>>, - { + pub fn SetClientCertificate(&self, value: &super::super::super::Security::Cryptography::Certificates::Certificate) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).SetClientCertificate)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetClientCertificate)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } #[doc = "*Required features: `\"Foundation_Collections\"`, `\"Security_Cryptography_Certificates\"`*"] #[cfg(all(feature = "Foundation_Collections", feature = "Security_Cryptography_Certificates"))] @@ -423,12 +417,9 @@ impl HttpBaseProtocolFilter { } #[doc = "*Required features: `\"Security_Credentials\"`*"] #[cfg(feature = "Security_Credentials")] - pub fn SetProxyCredential<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Security::Credentials::PasswordCredential>>, - { + pub fn SetProxyCredential(&self, value: &super::super::super::Security::Credentials::PasswordCredential) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).SetProxyCredential)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetProxyCredential)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } #[doc = "*Required features: `\"Security_Credentials\"`*"] #[cfg(feature = "Security_Credentials")] @@ -441,12 +432,9 @@ impl HttpBaseProtocolFilter { } #[doc = "*Required features: `\"Security_Credentials\"`*"] #[cfg(feature = "Security_Credentials")] - pub fn SetServerCredential<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Security::Credentials::PasswordCredential>>, - { + pub fn SetServerCredential(&self, value: &super::super::super::Security::Credentials::PasswordCredential) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).SetServerCredential)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetServerCredential)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } pub fn UseProxy(&self) -> ::windows::core::Result { let this = self; @@ -483,14 +471,11 @@ impl HttpBaseProtocolFilter { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn ServerCustomValidationRequested<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Foundation::TypedEventHandler>>, - { + pub fn ServerCustomValidationRequested(&self, handler: &super::super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = &::windows::core::Interface::cast::(self)?; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).ServerCustomValidationRequested)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).ServerCustomValidationRequested)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -514,25 +499,19 @@ impl HttpBaseProtocolFilter { } #[doc = "*Required features: `\"System\"`*"] #[cfg(feature = "System")] - pub fn CreateForUser<'a, P0>(user: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::System::User>>, - { + pub fn CreateForUser(user: &super::super::super::System::User) -> ::windows::core::Result { Self::IHttpBaseProtocolFilterStatics(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).CreateForUser)(::windows::core::Vtable::as_raw(this), user.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).CreateForUser)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(user), result__.as_mut_ptr()).from_abi::(result__) }) } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn SendRequestAsync<'a, P0>(&self, request: P0) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::HttpRequestMessage>>, - { + pub fn SendRequestAsync(&self, request: &super::HttpRequestMessage) -> ::windows::core::Result> { let this = &::windows::core::Interface::cast::(self)?; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).SendRequestAsync)(::windows::core::Vtable::as_raw(this), request.into().abi(), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).SendRequestAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(request), result__.as_mut_ptr()).from_abi::>(result__) } } #[doc(hidden)] diff --git a/crates/libs/windows/src/Windows/Web/Http/Headers/mod.rs b/crates/libs/windows/src/Windows/Web/Http/Headers/mod.rs index cff1d7e422..a1950fe620 100644 --- a/crates/libs/windows/src/Windows/Web/Http/Headers/mod.rs +++ b/crates/libs/windows/src/Windows/Web/Http/Headers/mod.rs @@ -1441,33 +1441,24 @@ impl HttpCacheDirectiveHeaderValueCollection { } #[doc = "*Required features: `\"Foundation_Collections\"`*"] #[cfg(feature = "Foundation_Collections")] - pub fn IndexOf<'a, P0>(&self, value: P0, index: &mut u32) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, HttpNameValueHeaderValue>>, - { + pub fn IndexOf(&self, value: &HttpNameValueHeaderValue, index: &mut u32) -> ::windows::core::Result { let this = &::windows::core::Interface::cast::>(self)?; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).IndexOf)(::windows::core::Vtable::as_raw(this), value.into().abi(), index, result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).IndexOf)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value), index, result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation_Collections\"`*"] #[cfg(feature = "Foundation_Collections")] - pub fn SetAt<'a, P0>(&self, index: u32, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, HttpNameValueHeaderValue>>, - { + pub fn SetAt(&self, index: u32, value: &HttpNameValueHeaderValue) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::>(self)?; - unsafe { (::windows::core::Vtable::vtable(this).SetAt)(::windows::core::Vtable::as_raw(this), index, value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetAt)(::windows::core::Vtable::as_raw(this), index, ::core::mem::transmute_copy(value)).ok() } } #[doc = "*Required features: `\"Foundation_Collections\"`*"] #[cfg(feature = "Foundation_Collections")] - pub fn InsertAt<'a, P0>(&self, index: u32, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, HttpNameValueHeaderValue>>, - { + pub fn InsertAt(&self, index: u32, value: &HttpNameValueHeaderValue) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::>(self)?; - unsafe { (::windows::core::Vtable::vtable(this).InsertAt)(::windows::core::Vtable::as_raw(this), index, value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).InsertAt)(::windows::core::Vtable::as_raw(this), index, ::core::mem::transmute_copy(value)).ok() } } #[doc = "*Required features: `\"Foundation_Collections\"`*"] #[cfg(feature = "Foundation_Collections")] @@ -1477,12 +1468,9 @@ impl HttpCacheDirectiveHeaderValueCollection { } #[doc = "*Required features: `\"Foundation_Collections\"`*"] #[cfg(feature = "Foundation_Collections")] - pub fn Append<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, HttpNameValueHeaderValue>>, - { + pub fn Append(&self, value: &HttpNameValueHeaderValue) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::>(self)?; - unsafe { (::windows::core::Vtable::vtable(this).Append)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).Append)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } #[doc = "*Required features: `\"Foundation_Collections\"`*"] #[cfg(feature = "Foundation_Collections")] @@ -1877,33 +1865,24 @@ impl HttpChallengeHeaderValueCollection { } #[doc = "*Required features: `\"Foundation_Collections\"`*"] #[cfg(feature = "Foundation_Collections")] - pub fn IndexOf<'a, P0>(&self, value: P0, index: &mut u32) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, HttpChallengeHeaderValue>>, - { + pub fn IndexOf(&self, value: &HttpChallengeHeaderValue, index: &mut u32) -> ::windows::core::Result { let this = &::windows::core::Interface::cast::>(self)?; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).IndexOf)(::windows::core::Vtable::as_raw(this), value.into().abi(), index, result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).IndexOf)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value), index, result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation_Collections\"`*"] #[cfg(feature = "Foundation_Collections")] - pub fn SetAt<'a, P0>(&self, index: u32, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, HttpChallengeHeaderValue>>, - { + pub fn SetAt(&self, index: u32, value: &HttpChallengeHeaderValue) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::>(self)?; - unsafe { (::windows::core::Vtable::vtable(this).SetAt)(::windows::core::Vtable::as_raw(this), index, value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetAt)(::windows::core::Vtable::as_raw(this), index, ::core::mem::transmute_copy(value)).ok() } } #[doc = "*Required features: `\"Foundation_Collections\"`*"] #[cfg(feature = "Foundation_Collections")] - pub fn InsertAt<'a, P0>(&self, index: u32, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, HttpChallengeHeaderValue>>, - { + pub fn InsertAt(&self, index: u32, value: &HttpChallengeHeaderValue) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::>(self)?; - unsafe { (::windows::core::Vtable::vtable(this).InsertAt)(::windows::core::Vtable::as_raw(this), index, value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).InsertAt)(::windows::core::Vtable::as_raw(this), index, ::core::mem::transmute_copy(value)).ok() } } #[doc = "*Required features: `\"Foundation_Collections\"`*"] #[cfg(feature = "Foundation_Collections")] @@ -1913,12 +1892,9 @@ impl HttpChallengeHeaderValueCollection { } #[doc = "*Required features: `\"Foundation_Collections\"`*"] #[cfg(feature = "Foundation_Collections")] - pub fn Append<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, HttpChallengeHeaderValue>>, - { + pub fn Append(&self, value: &HttpChallengeHeaderValue) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::>(self)?; - unsafe { (::windows::core::Vtable::vtable(this).Append)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).Append)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } #[doc = "*Required features: `\"Foundation_Collections\"`*"] #[cfg(feature = "Foundation_Collections")] @@ -2291,33 +2267,24 @@ impl HttpConnectionOptionHeaderValueCollection { } #[doc = "*Required features: `\"Foundation_Collections\"`*"] #[cfg(feature = "Foundation_Collections")] - pub fn IndexOf<'a, P0>(&self, value: P0, index: &mut u32) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, HttpConnectionOptionHeaderValue>>, - { + pub fn IndexOf(&self, value: &HttpConnectionOptionHeaderValue, index: &mut u32) -> ::windows::core::Result { let this = &::windows::core::Interface::cast::>(self)?; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).IndexOf)(::windows::core::Vtable::as_raw(this), value.into().abi(), index, result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).IndexOf)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value), index, result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation_Collections\"`*"] #[cfg(feature = "Foundation_Collections")] - pub fn SetAt<'a, P0>(&self, index: u32, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, HttpConnectionOptionHeaderValue>>, - { + pub fn SetAt(&self, index: u32, value: &HttpConnectionOptionHeaderValue) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::>(self)?; - unsafe { (::windows::core::Vtable::vtable(this).SetAt)(::windows::core::Vtable::as_raw(this), index, value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetAt)(::windows::core::Vtable::as_raw(this), index, ::core::mem::transmute_copy(value)).ok() } } #[doc = "*Required features: `\"Foundation_Collections\"`*"] #[cfg(feature = "Foundation_Collections")] - pub fn InsertAt<'a, P0>(&self, index: u32, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, HttpConnectionOptionHeaderValue>>, - { + pub fn InsertAt(&self, index: u32, value: &HttpConnectionOptionHeaderValue) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::>(self)?; - unsafe { (::windows::core::Vtable::vtable(this).InsertAt)(::windows::core::Vtable::as_raw(this), index, value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).InsertAt)(::windows::core::Vtable::as_raw(this), index, ::core::mem::transmute_copy(value)).ok() } } #[doc = "*Required features: `\"Foundation_Collections\"`*"] #[cfg(feature = "Foundation_Collections")] @@ -2327,12 +2294,9 @@ impl HttpConnectionOptionHeaderValueCollection { } #[doc = "*Required features: `\"Foundation_Collections\"`*"] #[cfg(feature = "Foundation_Collections")] - pub fn Append<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, HttpConnectionOptionHeaderValue>>, - { + pub fn Append(&self, value: &HttpConnectionOptionHeaderValue) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::>(self)?; - unsafe { (::windows::core::Vtable::vtable(this).Append)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).Append)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } #[doc = "*Required features: `\"Foundation_Collections\"`*"] #[cfg(feature = "Foundation_Collections")] @@ -2705,33 +2669,24 @@ impl HttpContentCodingHeaderValueCollection { } #[doc = "*Required features: `\"Foundation_Collections\"`*"] #[cfg(feature = "Foundation_Collections")] - pub fn IndexOf<'a, P0>(&self, value: P0, index: &mut u32) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, HttpContentCodingHeaderValue>>, - { + pub fn IndexOf(&self, value: &HttpContentCodingHeaderValue, index: &mut u32) -> ::windows::core::Result { let this = &::windows::core::Interface::cast::>(self)?; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).IndexOf)(::windows::core::Vtable::as_raw(this), value.into().abi(), index, result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).IndexOf)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value), index, result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation_Collections\"`*"] #[cfg(feature = "Foundation_Collections")] - pub fn SetAt<'a, P0>(&self, index: u32, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, HttpContentCodingHeaderValue>>, - { + pub fn SetAt(&self, index: u32, value: &HttpContentCodingHeaderValue) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::>(self)?; - unsafe { (::windows::core::Vtable::vtable(this).SetAt)(::windows::core::Vtable::as_raw(this), index, value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetAt)(::windows::core::Vtable::as_raw(this), index, ::core::mem::transmute_copy(value)).ok() } } #[doc = "*Required features: `\"Foundation_Collections\"`*"] #[cfg(feature = "Foundation_Collections")] - pub fn InsertAt<'a, P0>(&self, index: u32, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, HttpContentCodingHeaderValue>>, - { + pub fn InsertAt(&self, index: u32, value: &HttpContentCodingHeaderValue) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::>(self)?; - unsafe { (::windows::core::Vtable::vtable(this).InsertAt)(::windows::core::Vtable::as_raw(this), index, value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).InsertAt)(::windows::core::Vtable::as_raw(this), index, ::core::mem::transmute_copy(value)).ok() } } #[doc = "*Required features: `\"Foundation_Collections\"`*"] #[cfg(feature = "Foundation_Collections")] @@ -2741,12 +2696,9 @@ impl HttpContentCodingHeaderValueCollection { } #[doc = "*Required features: `\"Foundation_Collections\"`*"] #[cfg(feature = "Foundation_Collections")] - pub fn Append<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, HttpContentCodingHeaderValue>>, - { + pub fn Append(&self, value: &HttpContentCodingHeaderValue) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::>(self)?; - unsafe { (::windows::core::Vtable::vtable(this).Append)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).Append)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } #[doc = "*Required features: `\"Foundation_Collections\"`*"] #[cfg(feature = "Foundation_Collections")] @@ -3134,33 +3086,24 @@ impl HttpContentCodingWithQualityHeaderValueCollection { } #[doc = "*Required features: `\"Foundation_Collections\"`*"] #[cfg(feature = "Foundation_Collections")] - pub fn IndexOf<'a, P0>(&self, value: P0, index: &mut u32) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, HttpContentCodingWithQualityHeaderValue>>, - { + pub fn IndexOf(&self, value: &HttpContentCodingWithQualityHeaderValue, index: &mut u32) -> ::windows::core::Result { let this = &::windows::core::Interface::cast::>(self)?; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).IndexOf)(::windows::core::Vtable::as_raw(this), value.into().abi(), index, result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).IndexOf)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value), index, result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation_Collections\"`*"] #[cfg(feature = "Foundation_Collections")] - pub fn SetAt<'a, P0>(&self, index: u32, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, HttpContentCodingWithQualityHeaderValue>>, - { + pub fn SetAt(&self, index: u32, value: &HttpContentCodingWithQualityHeaderValue) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::>(self)?; - unsafe { (::windows::core::Vtable::vtable(this).SetAt)(::windows::core::Vtable::as_raw(this), index, value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetAt)(::windows::core::Vtable::as_raw(this), index, ::core::mem::transmute_copy(value)).ok() } } #[doc = "*Required features: `\"Foundation_Collections\"`*"] #[cfg(feature = "Foundation_Collections")] - pub fn InsertAt<'a, P0>(&self, index: u32, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, HttpContentCodingWithQualityHeaderValue>>, - { + pub fn InsertAt(&self, index: u32, value: &HttpContentCodingWithQualityHeaderValue) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::>(self)?; - unsafe { (::windows::core::Vtable::vtable(this).InsertAt)(::windows::core::Vtable::as_raw(this), index, value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).InsertAt)(::windows::core::Vtable::as_raw(this), index, ::core::mem::transmute_copy(value)).ok() } } #[doc = "*Required features: `\"Foundation_Collections\"`*"] #[cfg(feature = "Foundation_Collections")] @@ -3170,12 +3113,9 @@ impl HttpContentCodingWithQualityHeaderValueCollection { } #[doc = "*Required features: `\"Foundation_Collections\"`*"] #[cfg(feature = "Foundation_Collections")] - pub fn Append<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, HttpContentCodingWithQualityHeaderValue>>, - { + pub fn Append(&self, value: &HttpContentCodingWithQualityHeaderValue) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::>(self)?; - unsafe { (::windows::core::Vtable::vtable(this).Append)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).Append)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } #[doc = "*Required features: `\"Foundation_Collections\"`*"] #[cfg(feature = "Foundation_Collections")] @@ -3569,12 +3509,9 @@ impl HttpContentHeaderCollection { (::windows::core::Vtable::vtable(this).ContentDisposition)(::windows::core::Vtable::as_raw(this), result__.as_mut_ptr()).from_abi::(result__) } } - pub fn SetContentDisposition<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, HttpContentDispositionHeaderValue>>, - { + pub fn SetContentDisposition(&self, value: &HttpContentDispositionHeaderValue) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).SetContentDisposition)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetContentDisposition)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } pub fn ContentEncoding(&self) -> ::windows::core::Result { let this = self; @@ -3620,12 +3557,9 @@ impl HttpContentHeaderCollection { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn SetContentLocation<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Foundation::Uri>>, - { + pub fn SetContentLocation(&self, value: &super::super::super::Foundation::Uri) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).SetContentLocation)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetContentLocation)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } #[doc = "*Required features: `\"Storage_Streams\"`*"] #[cfg(feature = "Storage_Streams")] @@ -3653,12 +3587,9 @@ impl HttpContentHeaderCollection { (::windows::core::Vtable::vtable(this).ContentRange)(::windows::core::Vtable::as_raw(this), result__.as_mut_ptr()).from_abi::(result__) } } - pub fn SetContentRange<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, HttpContentRangeHeaderValue>>, - { + pub fn SetContentRange(&self, value: &HttpContentRangeHeaderValue) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).SetContentRange)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetContentRange)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } pub fn ContentType(&self) -> ::windows::core::Result { let this = self; @@ -3667,12 +3598,9 @@ impl HttpContentHeaderCollection { (::windows::core::Vtable::vtable(this).ContentType)(::windows::core::Vtable::as_raw(this), result__.as_mut_ptr()).from_abi::(result__) } } - pub fn SetContentType<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, HttpMediaTypeHeaderValue>>, - { + pub fn SetContentType(&self, value: &HttpMediaTypeHeaderValue) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).SetContentType)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetContentType)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] @@ -4337,33 +4265,24 @@ impl HttpCookiePairHeaderValueCollection { } #[doc = "*Required features: `\"Foundation_Collections\"`*"] #[cfg(feature = "Foundation_Collections")] - pub fn IndexOf<'a, P0>(&self, value: P0, index: &mut u32) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, HttpCookiePairHeaderValue>>, - { + pub fn IndexOf(&self, value: &HttpCookiePairHeaderValue, index: &mut u32) -> ::windows::core::Result { let this = &::windows::core::Interface::cast::>(self)?; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).IndexOf)(::windows::core::Vtable::as_raw(this), value.into().abi(), index, result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).IndexOf)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value), index, result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation_Collections\"`*"] #[cfg(feature = "Foundation_Collections")] - pub fn SetAt<'a, P0>(&self, index: u32, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, HttpCookiePairHeaderValue>>, - { + pub fn SetAt(&self, index: u32, value: &HttpCookiePairHeaderValue) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::>(self)?; - unsafe { (::windows::core::Vtable::vtable(this).SetAt)(::windows::core::Vtable::as_raw(this), index, value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetAt)(::windows::core::Vtable::as_raw(this), index, ::core::mem::transmute_copy(value)).ok() } } #[doc = "*Required features: `\"Foundation_Collections\"`*"] #[cfg(feature = "Foundation_Collections")] - pub fn InsertAt<'a, P0>(&self, index: u32, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, HttpCookiePairHeaderValue>>, - { + pub fn InsertAt(&self, index: u32, value: &HttpCookiePairHeaderValue) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::>(self)?; - unsafe { (::windows::core::Vtable::vtable(this).InsertAt)(::windows::core::Vtable::as_raw(this), index, value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).InsertAt)(::windows::core::Vtable::as_raw(this), index, ::core::mem::transmute_copy(value)).ok() } } #[doc = "*Required features: `\"Foundation_Collections\"`*"] #[cfg(feature = "Foundation_Collections")] @@ -4373,12 +4292,9 @@ impl HttpCookiePairHeaderValueCollection { } #[doc = "*Required features: `\"Foundation_Collections\"`*"] #[cfg(feature = "Foundation_Collections")] - pub fn Append<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, HttpCookiePairHeaderValue>>, - { + pub fn Append(&self, value: &HttpCookiePairHeaderValue) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::>(self)?; - unsafe { (::windows::core::Vtable::vtable(this).Append)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).Append)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } #[doc = "*Required features: `\"Foundation_Collections\"`*"] #[cfg(feature = "Foundation_Collections")] @@ -5069,33 +4985,24 @@ impl HttpExpectationHeaderValueCollection { } #[doc = "*Required features: `\"Foundation_Collections\"`*"] #[cfg(feature = "Foundation_Collections")] - pub fn IndexOf<'a, P0>(&self, value: P0, index: &mut u32) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, HttpExpectationHeaderValue>>, - { + pub fn IndexOf(&self, value: &HttpExpectationHeaderValue, index: &mut u32) -> ::windows::core::Result { let this = &::windows::core::Interface::cast::>(self)?; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).IndexOf)(::windows::core::Vtable::as_raw(this), value.into().abi(), index, result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).IndexOf)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value), index, result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation_Collections\"`*"] #[cfg(feature = "Foundation_Collections")] - pub fn SetAt<'a, P0>(&self, index: u32, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, HttpExpectationHeaderValue>>, - { + pub fn SetAt(&self, index: u32, value: &HttpExpectationHeaderValue) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::>(self)?; - unsafe { (::windows::core::Vtable::vtable(this).SetAt)(::windows::core::Vtable::as_raw(this), index, value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetAt)(::windows::core::Vtable::as_raw(this), index, ::core::mem::transmute_copy(value)).ok() } } #[doc = "*Required features: `\"Foundation_Collections\"`*"] #[cfg(feature = "Foundation_Collections")] - pub fn InsertAt<'a, P0>(&self, index: u32, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, HttpExpectationHeaderValue>>, - { + pub fn InsertAt(&self, index: u32, value: &HttpExpectationHeaderValue) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::>(self)?; - unsafe { (::windows::core::Vtable::vtable(this).InsertAt)(::windows::core::Vtable::as_raw(this), index, value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).InsertAt)(::windows::core::Vtable::as_raw(this), index, ::core::mem::transmute_copy(value)).ok() } } #[doc = "*Required features: `\"Foundation_Collections\"`*"] #[cfg(feature = "Foundation_Collections")] @@ -5105,12 +5012,9 @@ impl HttpExpectationHeaderValueCollection { } #[doc = "*Required features: `\"Foundation_Collections\"`*"] #[cfg(feature = "Foundation_Collections")] - pub fn Append<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, HttpExpectationHeaderValue>>, - { + pub fn Append(&self, value: &HttpExpectationHeaderValue) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::>(self)?; - unsafe { (::windows::core::Vtable::vtable(this).Append)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).Append)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } #[doc = "*Required features: `\"Foundation_Collections\"`*"] #[cfg(feature = "Foundation_Collections")] @@ -5348,33 +5252,24 @@ impl HttpLanguageHeaderValueCollection { } #[doc = "*Required features: `\"Foundation_Collections\"`, `\"Globalization\"`*"] #[cfg(all(feature = "Foundation_Collections", feature = "Globalization"))] - pub fn IndexOf<'a, P0>(&self, value: P0, index: &mut u32) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Globalization::Language>>, - { + pub fn IndexOf(&self, value: &super::super::super::Globalization::Language, index: &mut u32) -> ::windows::core::Result { let this = &::windows::core::Interface::cast::>(self)?; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).IndexOf)(::windows::core::Vtable::as_raw(this), value.into().abi(), index, result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).IndexOf)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value), index, result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation_Collections\"`, `\"Globalization\"`*"] #[cfg(all(feature = "Foundation_Collections", feature = "Globalization"))] - pub fn SetAt<'a, P0>(&self, index: u32, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Globalization::Language>>, - { + pub fn SetAt(&self, index: u32, value: &super::super::super::Globalization::Language) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::>(self)?; - unsafe { (::windows::core::Vtable::vtable(this).SetAt)(::windows::core::Vtable::as_raw(this), index, value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetAt)(::windows::core::Vtable::as_raw(this), index, ::core::mem::transmute_copy(value)).ok() } } #[doc = "*Required features: `\"Foundation_Collections\"`, `\"Globalization\"`*"] #[cfg(all(feature = "Foundation_Collections", feature = "Globalization"))] - pub fn InsertAt<'a, P0>(&self, index: u32, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Globalization::Language>>, - { + pub fn InsertAt(&self, index: u32, value: &super::super::super::Globalization::Language) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::>(self)?; - unsafe { (::windows::core::Vtable::vtable(this).InsertAt)(::windows::core::Vtable::as_raw(this), index, value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).InsertAt)(::windows::core::Vtable::as_raw(this), index, ::core::mem::transmute_copy(value)).ok() } } #[doc = "*Required features: `\"Foundation_Collections\"`, `\"Globalization\"`*"] #[cfg(all(feature = "Foundation_Collections", feature = "Globalization"))] @@ -5384,12 +5279,9 @@ impl HttpLanguageHeaderValueCollection { } #[doc = "*Required features: `\"Foundation_Collections\"`, `\"Globalization\"`*"] #[cfg(all(feature = "Foundation_Collections", feature = "Globalization"))] - pub fn Append<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Globalization::Language>>, - { + pub fn Append(&self, value: &super::super::super::Globalization::Language) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::>(self)?; - unsafe { (::windows::core::Vtable::vtable(this).Append)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).Append)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } #[doc = "*Required features: `\"Foundation_Collections\"`, `\"Globalization\"`*"] #[cfg(all(feature = "Foundation_Collections", feature = "Globalization"))] @@ -5777,33 +5669,24 @@ impl HttpLanguageRangeWithQualityHeaderValueCollection { } #[doc = "*Required features: `\"Foundation_Collections\"`*"] #[cfg(feature = "Foundation_Collections")] - pub fn IndexOf<'a, P0>(&self, value: P0, index: &mut u32) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, HttpLanguageRangeWithQualityHeaderValue>>, - { + pub fn IndexOf(&self, value: &HttpLanguageRangeWithQualityHeaderValue, index: &mut u32) -> ::windows::core::Result { let this = &::windows::core::Interface::cast::>(self)?; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).IndexOf)(::windows::core::Vtable::as_raw(this), value.into().abi(), index, result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).IndexOf)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value), index, result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation_Collections\"`*"] #[cfg(feature = "Foundation_Collections")] - pub fn SetAt<'a, P0>(&self, index: u32, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, HttpLanguageRangeWithQualityHeaderValue>>, - { + pub fn SetAt(&self, index: u32, value: &HttpLanguageRangeWithQualityHeaderValue) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::>(self)?; - unsafe { (::windows::core::Vtable::vtable(this).SetAt)(::windows::core::Vtable::as_raw(this), index, value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetAt)(::windows::core::Vtable::as_raw(this), index, ::core::mem::transmute_copy(value)).ok() } } #[doc = "*Required features: `\"Foundation_Collections\"`*"] #[cfg(feature = "Foundation_Collections")] - pub fn InsertAt<'a, P0>(&self, index: u32, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, HttpLanguageRangeWithQualityHeaderValue>>, - { + pub fn InsertAt(&self, index: u32, value: &HttpLanguageRangeWithQualityHeaderValue) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::>(self)?; - unsafe { (::windows::core::Vtable::vtable(this).InsertAt)(::windows::core::Vtable::as_raw(this), index, value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).InsertAt)(::windows::core::Vtable::as_raw(this), index, ::core::mem::transmute_copy(value)).ok() } } #[doc = "*Required features: `\"Foundation_Collections\"`*"] #[cfg(feature = "Foundation_Collections")] @@ -5813,12 +5696,9 @@ impl HttpLanguageRangeWithQualityHeaderValueCollection { } #[doc = "*Required features: `\"Foundation_Collections\"`*"] #[cfg(feature = "Foundation_Collections")] - pub fn Append<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, HttpLanguageRangeWithQualityHeaderValue>>, - { + pub fn Append(&self, value: &HttpLanguageRangeWithQualityHeaderValue) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::>(self)?; - unsafe { (::windows::core::Vtable::vtable(this).Append)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).Append)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } #[doc = "*Required features: `\"Foundation_Collections\"`*"] #[cfg(feature = "Foundation_Collections")] @@ -6399,33 +6279,24 @@ impl HttpMediaTypeWithQualityHeaderValueCollection { } #[doc = "*Required features: `\"Foundation_Collections\"`*"] #[cfg(feature = "Foundation_Collections")] - pub fn IndexOf<'a, P0>(&self, value: P0, index: &mut u32) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, HttpMediaTypeWithQualityHeaderValue>>, - { + pub fn IndexOf(&self, value: &HttpMediaTypeWithQualityHeaderValue, index: &mut u32) -> ::windows::core::Result { let this = &::windows::core::Interface::cast::>(self)?; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).IndexOf)(::windows::core::Vtable::as_raw(this), value.into().abi(), index, result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).IndexOf)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value), index, result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation_Collections\"`*"] #[cfg(feature = "Foundation_Collections")] - pub fn SetAt<'a, P0>(&self, index: u32, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, HttpMediaTypeWithQualityHeaderValue>>, - { + pub fn SetAt(&self, index: u32, value: &HttpMediaTypeWithQualityHeaderValue) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::>(self)?; - unsafe { (::windows::core::Vtable::vtable(this).SetAt)(::windows::core::Vtable::as_raw(this), index, value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetAt)(::windows::core::Vtable::as_raw(this), index, ::core::mem::transmute_copy(value)).ok() } } #[doc = "*Required features: `\"Foundation_Collections\"`*"] #[cfg(feature = "Foundation_Collections")] - pub fn InsertAt<'a, P0>(&self, index: u32, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, HttpMediaTypeWithQualityHeaderValue>>, - { + pub fn InsertAt(&self, index: u32, value: &HttpMediaTypeWithQualityHeaderValue) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::>(self)?; - unsafe { (::windows::core::Vtable::vtable(this).InsertAt)(::windows::core::Vtable::as_raw(this), index, value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).InsertAt)(::windows::core::Vtable::as_raw(this), index, ::core::mem::transmute_copy(value)).ok() } } #[doc = "*Required features: `\"Foundation_Collections\"`*"] #[cfg(feature = "Foundation_Collections")] @@ -6435,12 +6306,9 @@ impl HttpMediaTypeWithQualityHeaderValueCollection { } #[doc = "*Required features: `\"Foundation_Collections\"`*"] #[cfg(feature = "Foundation_Collections")] - pub fn Append<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, HttpMediaTypeWithQualityHeaderValue>>, - { + pub fn Append(&self, value: &HttpMediaTypeWithQualityHeaderValue) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::>(self)?; - unsafe { (::windows::core::Vtable::vtable(this).Append)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).Append)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } #[doc = "*Required features: `\"Foundation_Collections\"`*"] #[cfg(feature = "Foundation_Collections")] @@ -6678,33 +6546,24 @@ impl HttpMethodHeaderValueCollection { } #[doc = "*Required features: `\"Foundation_Collections\"`*"] #[cfg(feature = "Foundation_Collections")] - pub fn IndexOf<'a, P0>(&self, value: P0, index: &mut u32) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::HttpMethod>>, - { + pub fn IndexOf(&self, value: &super::HttpMethod, index: &mut u32) -> ::windows::core::Result { let this = &::windows::core::Interface::cast::>(self)?; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).IndexOf)(::windows::core::Vtable::as_raw(this), value.into().abi(), index, result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).IndexOf)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value), index, result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation_Collections\"`*"] #[cfg(feature = "Foundation_Collections")] - pub fn SetAt<'a, P0>(&self, index: u32, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::HttpMethod>>, - { + pub fn SetAt(&self, index: u32, value: &super::HttpMethod) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::>(self)?; - unsafe { (::windows::core::Vtable::vtable(this).SetAt)(::windows::core::Vtable::as_raw(this), index, value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetAt)(::windows::core::Vtable::as_raw(this), index, ::core::mem::transmute_copy(value)).ok() } } #[doc = "*Required features: `\"Foundation_Collections\"`*"] #[cfg(feature = "Foundation_Collections")] - pub fn InsertAt<'a, P0>(&self, index: u32, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::HttpMethod>>, - { + pub fn InsertAt(&self, index: u32, value: &super::HttpMethod) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::>(self)?; - unsafe { (::windows::core::Vtable::vtable(this).InsertAt)(::windows::core::Vtable::as_raw(this), index, value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).InsertAt)(::windows::core::Vtable::as_raw(this), index, ::core::mem::transmute_copy(value)).ok() } } #[doc = "*Required features: `\"Foundation_Collections\"`*"] #[cfg(feature = "Foundation_Collections")] @@ -6714,12 +6573,9 @@ impl HttpMethodHeaderValueCollection { } #[doc = "*Required features: `\"Foundation_Collections\"`*"] #[cfg(feature = "Foundation_Collections")] - pub fn Append<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::HttpMethod>>, - { + pub fn Append(&self, value: &super::HttpMethod) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::>(self)?; - unsafe { (::windows::core::Vtable::vtable(this).Append)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).Append)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } #[doc = "*Required features: `\"Foundation_Collections\"`*"] #[cfg(feature = "Foundation_Collections")] @@ -7405,33 +7261,24 @@ impl HttpProductInfoHeaderValueCollection { } #[doc = "*Required features: `\"Foundation_Collections\"`*"] #[cfg(feature = "Foundation_Collections")] - pub fn IndexOf<'a, P0>(&self, value: P0, index: &mut u32) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, HttpProductInfoHeaderValue>>, - { + pub fn IndexOf(&self, value: &HttpProductInfoHeaderValue, index: &mut u32) -> ::windows::core::Result { let this = &::windows::core::Interface::cast::>(self)?; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).IndexOf)(::windows::core::Vtable::as_raw(this), value.into().abi(), index, result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).IndexOf)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value), index, result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation_Collections\"`*"] #[cfg(feature = "Foundation_Collections")] - pub fn SetAt<'a, P0>(&self, index: u32, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, HttpProductInfoHeaderValue>>, - { + pub fn SetAt(&self, index: u32, value: &HttpProductInfoHeaderValue) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::>(self)?; - unsafe { (::windows::core::Vtable::vtable(this).SetAt)(::windows::core::Vtable::as_raw(this), index, value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetAt)(::windows::core::Vtable::as_raw(this), index, ::core::mem::transmute_copy(value)).ok() } } #[doc = "*Required features: `\"Foundation_Collections\"`*"] #[cfg(feature = "Foundation_Collections")] - pub fn InsertAt<'a, P0>(&self, index: u32, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, HttpProductInfoHeaderValue>>, - { + pub fn InsertAt(&self, index: u32, value: &HttpProductInfoHeaderValue) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::>(self)?; - unsafe { (::windows::core::Vtable::vtable(this).InsertAt)(::windows::core::Vtable::as_raw(this), index, value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).InsertAt)(::windows::core::Vtable::as_raw(this), index, ::core::mem::transmute_copy(value)).ok() } } #[doc = "*Required features: `\"Foundation_Collections\"`*"] #[cfg(feature = "Foundation_Collections")] @@ -7441,12 +7288,9 @@ impl HttpProductInfoHeaderValueCollection { } #[doc = "*Required features: `\"Foundation_Collections\"`*"] #[cfg(feature = "Foundation_Collections")] - pub fn Append<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, HttpProductInfoHeaderValue>>, - { + pub fn Append(&self, value: &HttpProductInfoHeaderValue) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::>(self)?; - unsafe { (::windows::core::Vtable::vtable(this).Append)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).Append)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } #[doc = "*Required features: `\"Foundation_Collections\"`*"] #[cfg(feature = "Foundation_Collections")] @@ -7654,12 +7498,9 @@ impl HttpRequestHeaderCollection { (::windows::core::Vtable::vtable(this).Authorization)(::windows::core::Vtable::as_raw(this), result__.as_mut_ptr()).from_abi::(result__) } } - pub fn SetAuthorization<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, HttpCredentialsHeaderValue>>, - { + pub fn SetAuthorization(&self, value: &HttpCredentialsHeaderValue) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).SetAuthorization)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetAuthorization)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } pub fn CacheControl(&self) -> ::windows::core::Result { let this = self; @@ -7730,12 +7571,9 @@ impl HttpRequestHeaderCollection { } #[doc = "*Required features: `\"Networking\"`*"] #[cfg(feature = "Networking")] - pub fn SetHost<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Networking::HostName>>, - { + pub fn SetHost(&self, value: &super::super::super::Networking::HostName) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).SetHost)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetHost)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] @@ -7801,12 +7639,9 @@ impl HttpRequestHeaderCollection { (::windows::core::Vtable::vtable(this).ProxyAuthorization)(::windows::core::Vtable::as_raw(this), result__.as_mut_ptr()).from_abi::(result__) } } - pub fn SetProxyAuthorization<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, HttpCredentialsHeaderValue>>, - { + pub fn SetProxyAuthorization(&self, value: &HttpCredentialsHeaderValue) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).SetProxyAuthorization)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetProxyAuthorization)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] @@ -7819,12 +7654,9 @@ impl HttpRequestHeaderCollection { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn SetReferer<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Foundation::Uri>>, - { + pub fn SetReferer(&self, value: &super::super::super::Foundation::Uri) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).SetReferer)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetReferer)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } pub fn TransferEncoding(&self) -> ::windows::core::Result { let this = self; @@ -8147,12 +7979,9 @@ impl HttpResponseHeaderCollection { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn SetLocation<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Foundation::Uri>>, - { + pub fn SetLocation(&self, value: &super::super::super::Foundation::Uri) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).SetLocation)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetLocation)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } pub fn ProxyAuthenticate(&self) -> ::windows::core::Result { let this = self; @@ -8168,12 +7997,9 @@ impl HttpResponseHeaderCollection { (::windows::core::Vtable::vtable(this).RetryAfter)(::windows::core::Vtable::as_raw(this), result__.as_mut_ptr()).from_abi::(result__) } } - pub fn SetRetryAfter<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, HttpDateOrDeltaHeaderValue>>, - { + pub fn SetRetryAfter(&self, value: &HttpDateOrDeltaHeaderValue) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).SetRetryAfter)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetRetryAfter)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } pub fn TransferEncoding(&self) -> ::windows::core::Result { let this = self; @@ -8628,33 +8454,24 @@ impl HttpTransferCodingHeaderValueCollection { } #[doc = "*Required features: `\"Foundation_Collections\"`*"] #[cfg(feature = "Foundation_Collections")] - pub fn IndexOf<'a, P0>(&self, value: P0, index: &mut u32) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, HttpTransferCodingHeaderValue>>, - { + pub fn IndexOf(&self, value: &HttpTransferCodingHeaderValue, index: &mut u32) -> ::windows::core::Result { let this = &::windows::core::Interface::cast::>(self)?; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).IndexOf)(::windows::core::Vtable::as_raw(this), value.into().abi(), index, result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).IndexOf)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value), index, result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation_Collections\"`*"] #[cfg(feature = "Foundation_Collections")] - pub fn SetAt<'a, P0>(&self, index: u32, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, HttpTransferCodingHeaderValue>>, - { + pub fn SetAt(&self, index: u32, value: &HttpTransferCodingHeaderValue) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::>(self)?; - unsafe { (::windows::core::Vtable::vtable(this).SetAt)(::windows::core::Vtable::as_raw(this), index, value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetAt)(::windows::core::Vtable::as_raw(this), index, ::core::mem::transmute_copy(value)).ok() } } #[doc = "*Required features: `\"Foundation_Collections\"`*"] #[cfg(feature = "Foundation_Collections")] - pub fn InsertAt<'a, P0>(&self, index: u32, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, HttpTransferCodingHeaderValue>>, - { + pub fn InsertAt(&self, index: u32, value: &HttpTransferCodingHeaderValue) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::>(self)?; - unsafe { (::windows::core::Vtable::vtable(this).InsertAt)(::windows::core::Vtable::as_raw(this), index, value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).InsertAt)(::windows::core::Vtable::as_raw(this), index, ::core::mem::transmute_copy(value)).ok() } } #[doc = "*Required features: `\"Foundation_Collections\"`*"] #[cfg(feature = "Foundation_Collections")] @@ -8664,12 +8481,9 @@ impl HttpTransferCodingHeaderValueCollection { } #[doc = "*Required features: `\"Foundation_Collections\"`*"] #[cfg(feature = "Foundation_Collections")] - pub fn Append<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, HttpTransferCodingHeaderValue>>, - { + pub fn Append(&self, value: &HttpTransferCodingHeaderValue) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::>(self)?; - unsafe { (::windows::core::Vtable::vtable(this).Append)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).Append)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } #[doc = "*Required features: `\"Foundation_Collections\"`*"] #[cfg(feature = "Foundation_Collections")] diff --git a/crates/libs/windows/src/Windows/Web/Http/mod.rs b/crates/libs/windows/src/Windows/Web/Http/mod.rs index 4e80406704..fb430509fe 100644 --- a/crates/libs/windows/src/Windows/Web/Http/mod.rs +++ b/crates/libs/windows/src/Windows/Web/Http/mod.rs @@ -1054,126 +1054,100 @@ impl HttpClient { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn DeleteAsync<'a, P0>(&self, uri: P0) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::Uri>>, - { + pub fn DeleteAsync(&self, uri: &super::super::Foundation::Uri) -> ::windows::core::Result> { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).DeleteAsync)(::windows::core::Vtable::as_raw(this), uri.into().abi(), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).DeleteAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(uri), result__.as_mut_ptr()).from_abi::>(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn GetAsync<'a, P0>(&self, uri: P0) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::Uri>>, - { + pub fn GetAsync(&self, uri: &super::super::Foundation::Uri) -> ::windows::core::Result> { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).GetAsync)(::windows::core::Vtable::as_raw(this), uri.into().abi(), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).GetAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(uri), result__.as_mut_ptr()).from_abi::>(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn GetWithOptionAsync<'a, P0>(&self, uri: P0, completionoption: HttpCompletionOption) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::Uri>>, - { + pub fn GetWithOptionAsync(&self, uri: &super::super::Foundation::Uri, completionoption: HttpCompletionOption) -> ::windows::core::Result> { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).GetWithOptionAsync)(::windows::core::Vtable::as_raw(this), uri.into().abi(), completionoption, result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).GetWithOptionAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(uri), completionoption, result__.as_mut_ptr()).from_abi::>(result__) } } #[doc = "*Required features: `\"Foundation\"`, `\"Storage_Streams\"`*"] #[cfg(all(feature = "Foundation", feature = "Storage_Streams"))] - pub fn GetBufferAsync<'a, P0>(&self, uri: P0) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::Uri>>, - { + pub fn GetBufferAsync(&self, uri: &super::super::Foundation::Uri) -> ::windows::core::Result> { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).GetBufferAsync)(::windows::core::Vtable::as_raw(this), uri.into().abi(), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).GetBufferAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(uri), result__.as_mut_ptr()).from_abi::>(result__) } } #[doc = "*Required features: `\"Foundation\"`, `\"Storage_Streams\"`*"] #[cfg(all(feature = "Foundation", feature = "Storage_Streams"))] - pub fn GetInputStreamAsync<'a, P0>(&self, uri: P0) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::Uri>>, - { + pub fn GetInputStreamAsync(&self, uri: &super::super::Foundation::Uri) -> ::windows::core::Result> { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).GetInputStreamAsync)(::windows::core::Vtable::as_raw(this), uri.into().abi(), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).GetInputStreamAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(uri), result__.as_mut_ptr()).from_abi::>(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn GetStringAsync<'a, P0>(&self, uri: P0) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::Uri>>, - { + pub fn GetStringAsync(&self, uri: &super::super::Foundation::Uri) -> ::windows::core::Result> { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).GetStringAsync)(::windows::core::Vtable::as_raw(this), uri.into().abi(), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).GetStringAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(uri), result__.as_mut_ptr()).from_abi::>(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn PostAsync<'a, P0, P1, E1>(&self, uri: P0, content: P1) -> ::windows::core::Result> + pub fn PostAsync<'a, P0, E0>(&self, uri: &super::super::Foundation::Uri, content: P0) -> ::windows::core::Result> where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::Uri>>, - P1: ::std::convert::TryInto<::windows::core::InParam<'a, IHttpContent>, Error = E1>, - E1: ::std::convert::Into<::windows::core::Error>, + P0: ::std::convert::TryInto<::windows::core::InParam<'a, IHttpContent>, Error = E0>, + E0: ::std::convert::Into<::windows::core::Error>, { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).PostAsync)(::windows::core::Vtable::as_raw(this), uri.into().abi(), content.try_into().map_err(|e| e.into())?.abi(), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).PostAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(uri), content.try_into().map_err(|e| e.into())?.abi(), result__.as_mut_ptr()).from_abi::>(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn PutAsync<'a, P0, P1, E1>(&self, uri: P0, content: P1) -> ::windows::core::Result> + pub fn PutAsync<'a, P0, E0>(&self, uri: &super::super::Foundation::Uri, content: P0) -> ::windows::core::Result> where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::Uri>>, - P1: ::std::convert::TryInto<::windows::core::InParam<'a, IHttpContent>, Error = E1>, - E1: ::std::convert::Into<::windows::core::Error>, + P0: ::std::convert::TryInto<::windows::core::InParam<'a, IHttpContent>, Error = E0>, + E0: ::std::convert::Into<::windows::core::Error>, { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).PutAsync)(::windows::core::Vtable::as_raw(this), uri.into().abi(), content.try_into().map_err(|e| e.into())?.abi(), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).PutAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(uri), content.try_into().map_err(|e| e.into())?.abi(), result__.as_mut_ptr()).from_abi::>(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn SendRequestAsync<'a, P0>(&self, request: P0) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, HttpRequestMessage>>, - { + pub fn SendRequestAsync(&self, request: &HttpRequestMessage) -> ::windows::core::Result> { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).SendRequestAsync)(::windows::core::Vtable::as_raw(this), request.into().abi(), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).SendRequestAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(request), result__.as_mut_ptr()).from_abi::>(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn SendRequestWithOptionAsync<'a, P0>(&self, request: P0, completionoption: HttpCompletionOption) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, HttpRequestMessage>>, - { + pub fn SendRequestWithOptionAsync(&self, request: &HttpRequestMessage, completionoption: HttpCompletionOption) -> ::windows::core::Result> { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).SendRequestWithOptionAsync)(::windows::core::Vtable::as_raw(this), request.into().abi(), completionoption, result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).SendRequestWithOptionAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(request), completionoption, result__.as_mut_ptr()).from_abi::>(result__) } } #[doc = "*Required features: `\"Web_Http_Headers\"`*"] @@ -1187,126 +1161,100 @@ impl HttpClient { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn TryDeleteAsync<'a, P0>(&self, uri: P0) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::Uri>>, - { + pub fn TryDeleteAsync(&self, uri: &super::super::Foundation::Uri) -> ::windows::core::Result> { let this = &::windows::core::Interface::cast::(self)?; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).TryDeleteAsync)(::windows::core::Vtable::as_raw(this), uri.into().abi(), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).TryDeleteAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(uri), result__.as_mut_ptr()).from_abi::>(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn TryGetAsync<'a, P0>(&self, uri: P0) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::Uri>>, - { + pub fn TryGetAsync(&self, uri: &super::super::Foundation::Uri) -> ::windows::core::Result> { let this = &::windows::core::Interface::cast::(self)?; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).TryGetAsync)(::windows::core::Vtable::as_raw(this), uri.into().abi(), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).TryGetAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(uri), result__.as_mut_ptr()).from_abi::>(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn TryGetAsync2<'a, P0>(&self, uri: P0, completionoption: HttpCompletionOption) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::Uri>>, - { + pub fn TryGetAsync2(&self, uri: &super::super::Foundation::Uri, completionoption: HttpCompletionOption) -> ::windows::core::Result> { let this = &::windows::core::Interface::cast::(self)?; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).TryGetAsync2)(::windows::core::Vtable::as_raw(this), uri.into().abi(), completionoption, result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).TryGetAsync2)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(uri), completionoption, result__.as_mut_ptr()).from_abi::>(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn TryGetBufferAsync<'a, P0>(&self, uri: P0) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::Uri>>, - { + pub fn TryGetBufferAsync(&self, uri: &super::super::Foundation::Uri) -> ::windows::core::Result> { let this = &::windows::core::Interface::cast::(self)?; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).TryGetBufferAsync)(::windows::core::Vtable::as_raw(this), uri.into().abi(), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).TryGetBufferAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(uri), result__.as_mut_ptr()).from_abi::>(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn TryGetInputStreamAsync<'a, P0>(&self, uri: P0) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::Uri>>, - { + pub fn TryGetInputStreamAsync(&self, uri: &super::super::Foundation::Uri) -> ::windows::core::Result> { let this = &::windows::core::Interface::cast::(self)?; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).TryGetInputStreamAsync)(::windows::core::Vtable::as_raw(this), uri.into().abi(), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).TryGetInputStreamAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(uri), result__.as_mut_ptr()).from_abi::>(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn TryGetStringAsync<'a, P0>(&self, uri: P0) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::Uri>>, - { + pub fn TryGetStringAsync(&self, uri: &super::super::Foundation::Uri) -> ::windows::core::Result> { let this = &::windows::core::Interface::cast::(self)?; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).TryGetStringAsync)(::windows::core::Vtable::as_raw(this), uri.into().abi(), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).TryGetStringAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(uri), result__.as_mut_ptr()).from_abi::>(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn TryPostAsync<'a, P0, P1, E1>(&self, uri: P0, content: P1) -> ::windows::core::Result> + pub fn TryPostAsync<'a, P0, E0>(&self, uri: &super::super::Foundation::Uri, content: P0) -> ::windows::core::Result> where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::Uri>>, - P1: ::std::convert::TryInto<::windows::core::InParam<'a, IHttpContent>, Error = E1>, - E1: ::std::convert::Into<::windows::core::Error>, + P0: ::std::convert::TryInto<::windows::core::InParam<'a, IHttpContent>, Error = E0>, + E0: ::std::convert::Into<::windows::core::Error>, { let this = &::windows::core::Interface::cast::(self)?; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).TryPostAsync)(::windows::core::Vtable::as_raw(this), uri.into().abi(), content.try_into().map_err(|e| e.into())?.abi(), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).TryPostAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(uri), content.try_into().map_err(|e| e.into())?.abi(), result__.as_mut_ptr()).from_abi::>(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn TryPutAsync<'a, P0, P1, E1>(&self, uri: P0, content: P1) -> ::windows::core::Result> + pub fn TryPutAsync<'a, P0, E0>(&self, uri: &super::super::Foundation::Uri, content: P0) -> ::windows::core::Result> where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::Uri>>, - P1: ::std::convert::TryInto<::windows::core::InParam<'a, IHttpContent>, Error = E1>, - E1: ::std::convert::Into<::windows::core::Error>, + P0: ::std::convert::TryInto<::windows::core::InParam<'a, IHttpContent>, Error = E0>, + E0: ::std::convert::Into<::windows::core::Error>, { let this = &::windows::core::Interface::cast::(self)?; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).TryPutAsync)(::windows::core::Vtable::as_raw(this), uri.into().abi(), content.try_into().map_err(|e| e.into())?.abi(), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).TryPutAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(uri), content.try_into().map_err(|e| e.into())?.abi(), result__.as_mut_ptr()).from_abi::>(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn TrySendRequestAsync<'a, P0>(&self, request: P0) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, HttpRequestMessage>>, - { + pub fn TrySendRequestAsync(&self, request: &HttpRequestMessage) -> ::windows::core::Result> { let this = &::windows::core::Interface::cast::(self)?; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).TrySendRequestAsync)(::windows::core::Vtable::as_raw(this), request.into().abi(), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).TrySendRequestAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(request), result__.as_mut_ptr()).from_abi::>(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn TrySendRequestAsync2<'a, P0>(&self, request: P0, completionoption: HttpCompletionOption) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, HttpRequestMessage>>, - { + pub fn TrySendRequestAsync2(&self, request: &HttpRequestMessage, completionoption: HttpCompletionOption) -> ::windows::core::Result> { let this = &::windows::core::Interface::cast::(self)?; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).TrySendRequestAsync2)(::windows::core::Vtable::as_raw(this), request.into().abi(), completionoption, result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).TrySendRequestAsync2)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(request), completionoption, result__.as_mut_ptr()).from_abi::>(result__) } } #[doc = "*Required features: `\"Web_Http_Filters\"`*"] @@ -1663,14 +1611,11 @@ impl HttpCookieCollection { } #[doc = "*Required features: `\"Foundation_Collections\"`*"] #[cfg(feature = "Foundation_Collections")] - pub fn IndexOf<'a, P0>(&self, value: P0, index: &mut u32) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, HttpCookie>>, - { + pub fn IndexOf(&self, value: &HttpCookie, index: &mut u32) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).IndexOf)(::windows::core::Vtable::as_raw(this), value.into().abi(), index, result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).IndexOf)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value), index, result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation_Collections\"`*"] @@ -1827,43 +1772,31 @@ unsafe impl ::core::marker::Sync for HttpCookieCollection {} #[repr(transparent)] pub struct HttpCookieManager(::windows::core::IUnknown); impl HttpCookieManager { - pub fn SetCookie<'a, P0>(&self, cookie: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, HttpCookie>>, - { + pub fn SetCookie(&self, cookie: &HttpCookie) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).SetCookie)(::windows::core::Vtable::as_raw(this), cookie.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).SetCookie)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(cookie), result__.as_mut_ptr()).from_abi::(result__) } } - pub fn SetCookieWithThirdParty<'a, P0>(&self, cookie: P0, thirdparty: bool) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, HttpCookie>>, - { + pub fn SetCookieWithThirdParty(&self, cookie: &HttpCookie, thirdparty: bool) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).SetCookieWithThirdParty)(::windows::core::Vtable::as_raw(this), cookie.into().abi(), thirdparty, result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).SetCookieWithThirdParty)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(cookie), thirdparty, result__.as_mut_ptr()).from_abi::(result__) } } - pub fn DeleteCookie<'a, P0>(&self, cookie: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, HttpCookie>>, - { + pub fn DeleteCookie(&self, cookie: &HttpCookie) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).DeleteCookie)(::windows::core::Vtable::as_raw(this), cookie.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).DeleteCookie)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(cookie)).ok() } } #[doc = "*Required features: `\"Foundation_Collections\"`*"] #[cfg(feature = "Foundation_Collections")] - pub fn GetCookies<'a, P0>(&self, uri: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::Uri>>, - { + pub fn GetCookies(&self, uri: &super::super::Foundation::Uri) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).GetCookies)(::windows::core::Vtable::as_raw(this), uri.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).GetCookies)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(uri), result__.as_mut_ptr()).from_abi::(result__) } } } @@ -3458,12 +3391,9 @@ impl HttpRequestMessage { (::windows::core::Vtable::vtable(this).Method)(::windows::core::Vtable::as_raw(this), result__.as_mut_ptr()).from_abi::(result__) } } - pub fn SetMethod<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, HttpMethod>>, - { + pub fn SetMethod(&self, value: &HttpMethod) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).SetMethod)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetMethod)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } #[doc = "*Required features: `\"Foundation_Collections\"`*"] #[cfg(feature = "Foundation_Collections")] @@ -3485,12 +3415,9 @@ impl HttpRequestMessage { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn SetRequestUri<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::Uri>>, - { + pub fn SetRequestUri(&self, value: &super::super::Foundation::Uri) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).SetRequestUri)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetRequestUri)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } pub fn TransportInformation(&self) -> ::windows::core::Result { let this = self; @@ -3501,14 +3428,10 @@ impl HttpRequestMessage { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn Create<'a, P0, P1>(method: P0, uri: P1) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, HttpMethod>>, - P1: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::Uri>>, - { + pub fn Create(method: &HttpMethod, uri: &super::super::Foundation::Uri) -> ::windows::core::Result { Self::IHttpRequestMessageFactory(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).Create)(::windows::core::Vtable::as_raw(this), method.into().abi(), uri.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).Create)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(method), ::core::mem::transmute_copy(uri), result__.as_mut_ptr()).from_abi::(result__) }) } #[doc = "*Required features: `\"Foundation\"`*"] @@ -3856,12 +3779,9 @@ impl HttpResponseMessage { (::windows::core::Vtable::vtable(this).RequestMessage)(::windows::core::Vtable::as_raw(this), result__.as_mut_ptr()).from_abi::(result__) } } - pub fn SetRequestMessage<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, HttpRequestMessage>>, - { + pub fn SetRequestMessage(&self, value: &HttpRequestMessage) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).SetRequestMessage)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetRequestMessage)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } pub fn Source(&self) -> ::windows::core::Result { let this = self; diff --git a/crates/libs/windows/src/Windows/Web/Syndication/mod.rs b/crates/libs/windows/src/Windows/Web/Syndication/mod.rs index 06f60b3946..38c2f8f98f 100644 --- a/crates/libs/windows/src/Windows/Web/Syndication/mod.rs +++ b/crates/libs/windows/src/Windows/Web/Syndication/mod.rs @@ -84,12 +84,9 @@ impl ISyndicationClient { } #[doc = "*Required features: `\"Security_Credentials\"`*"] #[cfg(feature = "Security_Credentials")] - pub fn SetServerCredential<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Security::Credentials::PasswordCredential>>, - { + pub fn SetServerCredential(&self, value: &super::super::Security::Credentials::PasswordCredential) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).SetServerCredential)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetServerCredential)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } #[doc = "*Required features: `\"Security_Credentials\"`*"] #[cfg(feature = "Security_Credentials")] @@ -102,12 +99,9 @@ impl ISyndicationClient { } #[doc = "*Required features: `\"Security_Credentials\"`*"] #[cfg(feature = "Security_Credentials")] - pub fn SetProxyCredential<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Security::Credentials::PasswordCredential>>, - { + pub fn SetProxyCredential(&self, value: &super::super::Security::Credentials::PasswordCredential) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).SetProxyCredential)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetProxyCredential)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } pub fn MaxResponseBufferSize(&self) -> ::windows::core::Result { let this = self; @@ -148,14 +142,11 @@ impl ISyndicationClient { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn RetrieveFeedAsync<'a, P0>(&self, uri: P0) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::Uri>>, - { + pub fn RetrieveFeedAsync(&self, uri: &super::super::Foundation::Uri) -> ::windows::core::Result> { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).RetrieveFeedAsync)(::windows::core::Vtable::as_raw(this), uri.into().abi(), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).RetrieveFeedAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(uri), result__.as_mut_ptr()).from_abi::>(result__) } } } @@ -688,12 +679,9 @@ impl ISyndicationNode { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn SetBaseUri<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::Uri>>, - { + pub fn SetBaseUri(&self, value: &super::super::Foundation::Uri) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).SetBaseUri)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetBaseUri)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } #[doc = "*Required features: `\"Foundation_Collections\"`*"] #[cfg(feature = "Foundation_Collections")] @@ -912,12 +900,9 @@ impl ISyndicationText { } #[doc = "*Required features: `\"Data_Xml_Dom\"`*"] #[cfg(feature = "Data_Xml_Dom")] - pub fn SetXml<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Data::Xml::Dom::XmlDocument>>, - { + pub fn SetXml(&self, value: &super::super::Data::Xml::Dom::XmlDocument) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).SetXml)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetXml)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } pub fn NodeName(&self) -> ::windows::core::Result<::windows::core::HSTRING> { let this = &::windows::core::Interface::cast::(self)?; @@ -974,12 +959,9 @@ impl ISyndicationText { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn SetBaseUri<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::Uri>>, - { + pub fn SetBaseUri(&self, value: &super::super::Foundation::Uri) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).SetBaseUri)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetBaseUri)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } #[doc = "*Required features: `\"Foundation_Collections\"`*"] #[cfg(feature = "Foundation_Collections")] @@ -1351,12 +1333,9 @@ impl SyndicationCategory { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn SetBaseUri<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::Uri>>, - { + pub fn SetBaseUri(&self, value: &super::super::Foundation::Uri) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).SetBaseUri)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetBaseUri)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } #[doc = "*Required features: `\"Foundation_Collections\"`*"] #[cfg(feature = "Foundation_Collections")] @@ -1496,12 +1475,9 @@ impl SyndicationClient { } #[doc = "*Required features: `\"Security_Credentials\"`*"] #[cfg(feature = "Security_Credentials")] - pub fn SetServerCredential<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Security::Credentials::PasswordCredential>>, - { + pub fn SetServerCredential(&self, value: &super::super::Security::Credentials::PasswordCredential) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).SetServerCredential)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetServerCredential)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } #[doc = "*Required features: `\"Security_Credentials\"`*"] #[cfg(feature = "Security_Credentials")] @@ -1514,12 +1490,9 @@ impl SyndicationClient { } #[doc = "*Required features: `\"Security_Credentials\"`*"] #[cfg(feature = "Security_Credentials")] - pub fn SetProxyCredential<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Security::Credentials::PasswordCredential>>, - { + pub fn SetProxyCredential(&self, value: &super::super::Security::Credentials::PasswordCredential) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).SetProxyCredential)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetProxyCredential)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } pub fn MaxResponseBufferSize(&self) -> ::windows::core::Result { let this = self; @@ -1560,25 +1533,19 @@ impl SyndicationClient { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn RetrieveFeedAsync<'a, P0>(&self, uri: P0) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::Uri>>, - { + pub fn RetrieveFeedAsync(&self, uri: &super::super::Foundation::Uri) -> ::windows::core::Result> { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).RetrieveFeedAsync)(::windows::core::Vtable::as_raw(this), uri.into().abi(), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).RetrieveFeedAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(uri), result__.as_mut_ptr()).from_abi::>(result__) } } #[doc = "*Required features: `\"Security_Credentials\"`*"] #[cfg(feature = "Security_Credentials")] - pub fn CreateSyndicationClient<'a, P0>(servercredential: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Security::Credentials::PasswordCredential>>, - { + pub fn CreateSyndicationClient(servercredential: &super::super::Security::Credentials::PasswordCredential) -> ::windows::core::Result { Self::ISyndicationClientFactory(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).CreateSyndicationClient)(::windows::core::Vtable::as_raw(this), servercredential.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).CreateSyndicationClient)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(servercredential), result__.as_mut_ptr()).from_abi::(result__) }) } #[doc(hidden)] @@ -1692,12 +1659,9 @@ impl SyndicationContent { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn SetSourceUri<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::Uri>>, - { + pub fn SetSourceUri(&self, value: &super::super::Foundation::Uri) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).SetSourceUri)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetSourceUri)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } pub fn CreateSyndicationContent(text: &::windows::core::HSTRING, r#type: SyndicationTextType) -> ::windows::core::Result { Self::ISyndicationContentFactory(|this| unsafe { @@ -1707,13 +1671,10 @@ impl SyndicationContent { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn CreateSyndicationContentWithSourceUri<'a, P0>(sourceuri: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::Uri>>, - { + pub fn CreateSyndicationContentWithSourceUri(sourceuri: &super::super::Foundation::Uri) -> ::windows::core::Result { Self::ISyndicationContentFactory(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).CreateSyndicationContentWithSourceUri)(::windows::core::Vtable::as_raw(this), sourceuri.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).CreateSyndicationContentWithSourceUri)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(sourceuri), result__.as_mut_ptr()).from_abi::(result__) }) } pub fn NodeName(&self) -> ::windows::core::Result<::windows::core::HSTRING> { @@ -1771,12 +1732,9 @@ impl SyndicationContent { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn SetBaseUri<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::Uri>>, - { + pub fn SetBaseUri(&self, value: &super::super::Foundation::Uri) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).SetBaseUri)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetBaseUri)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } #[doc = "*Required features: `\"Foundation_Collections\"`*"] #[cfg(feature = "Foundation_Collections")] @@ -1838,12 +1796,9 @@ impl SyndicationContent { } #[doc = "*Required features: `\"Data_Xml_Dom\"`*"] #[cfg(feature = "Data_Xml_Dom")] - pub fn SetXml<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Data::Xml::Dom::XmlDocument>>, - { + pub fn SetXml(&self, value: &super::super::Data::Xml::Dom::XmlDocument) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).SetXml)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetXml)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } #[doc(hidden)] pub fn ISyndicationContentFactory ::windows::core::Result>(callback: F) -> ::windows::core::Result { @@ -2016,12 +1971,9 @@ impl SyndicationFeed { (::windows::core::Vtable::vtable(this).Generator)(::windows::core::Vtable::as_raw(this), result__.as_mut_ptr()).from_abi::(result__) } } - pub fn SetGenerator<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, SyndicationGenerator>>, - { + pub fn SetGenerator(&self, value: &SyndicationGenerator) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).SetGenerator)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetGenerator)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] @@ -2034,12 +1986,9 @@ impl SyndicationFeed { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn SetIconUri<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::Uri>>, - { + pub fn SetIconUri(&self, value: &super::super::Foundation::Uri) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).SetIconUri)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetIconUri)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } pub fn Id(&self) -> ::windows::core::Result<::windows::core::HSTRING> { let this = self; @@ -2096,12 +2045,9 @@ impl SyndicationFeed { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn SetImageUri<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::Uri>>, - { + pub fn SetImageUri(&self, value: &super::super::Foundation::Uri) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).SetImageUri)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetImageUri)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } pub fn Rights(&self) -> ::windows::core::Result { let this = self; @@ -2197,22 +2143,16 @@ impl SyndicationFeed { } #[doc = "*Required features: `\"Data_Xml_Dom\"`*"] #[cfg(feature = "Data_Xml_Dom")] - pub fn LoadFromXml<'a, P0>(&self, feeddocument: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Data::Xml::Dom::XmlDocument>>, - { + pub fn LoadFromXml(&self, feeddocument: &super::super::Data::Xml::Dom::XmlDocument) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).LoadFromXml)(::windows::core::Vtable::as_raw(this), feeddocument.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).LoadFromXml)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(feeddocument)).ok() } } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn CreateSyndicationFeed<'a, P0>(title: &::windows::core::HSTRING, subtitle: &::windows::core::HSTRING, uri: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::Uri>>, - { + pub fn CreateSyndicationFeed(title: &::windows::core::HSTRING, subtitle: &::windows::core::HSTRING, uri: &super::super::Foundation::Uri) -> ::windows::core::Result { Self::ISyndicationFeedFactory(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).CreateSyndicationFeed)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(title), ::core::mem::transmute_copy(subtitle), uri.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).CreateSyndicationFeed)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(title), ::core::mem::transmute_copy(subtitle), ::core::mem::transmute_copy(uri), result__.as_mut_ptr()).from_abi::(result__) }) } pub fn NodeName(&self) -> ::windows::core::Result<::windows::core::HSTRING> { @@ -2270,12 +2210,9 @@ impl SyndicationFeed { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn SetBaseUri<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::Uri>>, - { + pub fn SetBaseUri(&self, value: &super::super::Foundation::Uri) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).SetBaseUri)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetBaseUri)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } #[doc = "*Required features: `\"Foundation_Collections\"`*"] #[cfg(feature = "Foundation_Collections")] @@ -2426,12 +2363,9 @@ impl SyndicationGenerator { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn SetUri<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::Uri>>, - { + pub fn SetUri(&self, value: &super::super::Foundation::Uri) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).SetUri)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetUri)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } pub fn Version(&self) -> ::windows::core::Result<::windows::core::HSTRING> { let this = self; @@ -2505,12 +2439,9 @@ impl SyndicationGenerator { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn SetBaseUri<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::Uri>>, - { + pub fn SetBaseUri(&self, value: &super::super::Foundation::Uri) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).SetBaseUri)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetBaseUri)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } #[doc = "*Required features: `\"Foundation_Collections\"`*"] #[cfg(feature = "Foundation_Collections")] @@ -2673,12 +2604,9 @@ impl SyndicationItem { (::windows::core::Vtable::vtable(this).Content)(::windows::core::Vtable::as_raw(this), result__.as_mut_ptr()).from_abi::(result__) } } - pub fn SetContent<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, SyndicationContent>>, - { + pub fn SetContent(&self, value: &SyndicationContent) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).SetContent)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetContent)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } pub fn Id(&self) -> ::windows::core::Result<::windows::core::HSTRING> { let this = self; @@ -2752,12 +2680,9 @@ impl SyndicationItem { (::windows::core::Vtable::vtable(this).Source)(::windows::core::Vtable::as_raw(this), result__.as_mut_ptr()).from_abi::(result__) } } - pub fn SetSource<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, SyndicationFeed>>, - { + pub fn SetSource(&self, value: &SyndicationFeed) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).SetSource)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetSource)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } pub fn Summary(&self) -> ::windows::core::Result { let this = self; @@ -2800,12 +2725,9 @@ impl SyndicationItem { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn SetCommentsUri<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::Uri>>, - { + pub fn SetCommentsUri(&self, value: &super::super::Foundation::Uri) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).SetCommentsUri)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetCommentsUri)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] @@ -2847,23 +2769,16 @@ impl SyndicationItem { } #[doc = "*Required features: `\"Data_Xml_Dom\"`*"] #[cfg(feature = "Data_Xml_Dom")] - pub fn LoadFromXml<'a, P0>(&self, itemdocument: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Data::Xml::Dom::XmlDocument>>, - { + pub fn LoadFromXml(&self, itemdocument: &super::super::Data::Xml::Dom::XmlDocument) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).LoadFromXml)(::windows::core::Vtable::as_raw(this), itemdocument.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).LoadFromXml)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(itemdocument)).ok() } } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn CreateSyndicationItem<'a, P0, P1>(title: &::windows::core::HSTRING, content: P0, uri: P1) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, SyndicationContent>>, - P1: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::Uri>>, - { + pub fn CreateSyndicationItem(title: &::windows::core::HSTRING, content: &SyndicationContent, uri: &super::super::Foundation::Uri) -> ::windows::core::Result { Self::ISyndicationItemFactory(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).CreateSyndicationItem)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(title), content.into().abi(), uri.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).CreateSyndicationItem)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(title), ::core::mem::transmute_copy(content), ::core::mem::transmute_copy(uri), result__.as_mut_ptr()).from_abi::(result__) }) } pub fn NodeName(&self) -> ::windows::core::Result<::windows::core::HSTRING> { @@ -2921,12 +2836,9 @@ impl SyndicationItem { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn SetBaseUri<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::Uri>>, - { + pub fn SetBaseUri(&self, value: &super::super::Foundation::Uri) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).SetBaseUri)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetBaseUri)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } #[doc = "*Required features: `\"Foundation_Collections\"`*"] #[cfg(feature = "Foundation_Collections")] @@ -3110,12 +3022,9 @@ impl SyndicationLink { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn SetUri<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::Uri>>, - { + pub fn SetUri(&self, value: &super::super::Foundation::Uri) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).SetUri)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetUri)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } pub fn ResourceLanguage(&self) -> ::windows::core::Result<::windows::core::HSTRING> { let this = self; @@ -3130,24 +3039,18 @@ impl SyndicationLink { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn CreateSyndicationLink<'a, P0>(uri: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::Uri>>, - { + pub fn CreateSyndicationLink(uri: &super::super::Foundation::Uri) -> ::windows::core::Result { Self::ISyndicationLinkFactory(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).CreateSyndicationLink)(::windows::core::Vtable::as_raw(this), uri.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).CreateSyndicationLink)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(uri), result__.as_mut_ptr()).from_abi::(result__) }) } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn CreateSyndicationLinkEx<'a, P0>(uri: P0, relationship: &::windows::core::HSTRING, title: &::windows::core::HSTRING, mediatype: &::windows::core::HSTRING, length: u32) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::Uri>>, - { + pub fn CreateSyndicationLinkEx(uri: &super::super::Foundation::Uri, relationship: &::windows::core::HSTRING, title: &::windows::core::HSTRING, mediatype: &::windows::core::HSTRING, length: u32) -> ::windows::core::Result { Self::ISyndicationLinkFactory(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).CreateSyndicationLinkEx)(::windows::core::Vtable::as_raw(this), uri.into().abi(), ::core::mem::transmute_copy(relationship), ::core::mem::transmute_copy(title), ::core::mem::transmute_copy(mediatype), length, result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).CreateSyndicationLinkEx)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(uri), ::core::mem::transmute_copy(relationship), ::core::mem::transmute_copy(title), ::core::mem::transmute_copy(mediatype), length, result__.as_mut_ptr()).from_abi::(result__) }) } pub fn NodeName(&self) -> ::windows::core::Result<::windows::core::HSTRING> { @@ -3205,12 +3108,9 @@ impl SyndicationLink { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn SetBaseUri<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::Uri>>, - { + pub fn SetBaseUri(&self, value: &super::super::Foundation::Uri) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).SetBaseUri)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetBaseUri)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } #[doc = "*Required features: `\"Foundation_Collections\"`*"] #[cfg(feature = "Foundation_Collections")] @@ -3394,12 +3294,9 @@ impl SyndicationNode { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn SetBaseUri<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::Uri>>, - { + pub fn SetBaseUri(&self, value: &super::super::Foundation::Uri) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).SetBaseUri)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetBaseUri)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } #[doc = "*Required features: `\"Foundation_Collections\"`*"] #[cfg(feature = "Foundation_Collections")] @@ -3589,12 +3486,9 @@ impl SyndicationPerson { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn SetBaseUri<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::Uri>>, - { + pub fn SetBaseUri(&self, value: &super::super::Foundation::Uri) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).SetBaseUri)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetBaseUri)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } #[doc = "*Required features: `\"Foundation_Collections\"`*"] #[cfg(feature = "Foundation_Collections")] @@ -3656,12 +3550,9 @@ impl SyndicationPerson { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn SetUri<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::Uri>>, - { + pub fn SetUri(&self, value: &super::super::Foundation::Uri) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).SetUri)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetUri)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } pub fn CreateSyndicationPerson(name: &::windows::core::HSTRING) -> ::windows::core::Result { Self::ISyndicationPersonFactory(|this| unsafe { @@ -3671,13 +3562,10 @@ impl SyndicationPerson { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn CreateSyndicationPersonEx<'a, P0>(name: &::windows::core::HSTRING, email: &::windows::core::HSTRING, uri: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::Uri>>, - { + pub fn CreateSyndicationPersonEx(name: &::windows::core::HSTRING, email: &::windows::core::HSTRING, uri: &super::super::Foundation::Uri) -> ::windows::core::Result { Self::ISyndicationPersonFactory(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).CreateSyndicationPersonEx)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(name), ::core::mem::transmute_copy(email), uri.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).CreateSyndicationPersonEx)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(name), ::core::mem::transmute_copy(email), ::core::mem::transmute_copy(uri), result__.as_mut_ptr()).from_abi::(result__) }) } #[doc(hidden)] @@ -3835,12 +3723,9 @@ impl SyndicationText { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn SetBaseUri<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::Uri>>, - { + pub fn SetBaseUri(&self, value: &super::super::Foundation::Uri) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; - unsafe { (::windows::core::Vtable::vtable(this).SetBaseUri)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetBaseUri)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } #[doc = "*Required features: `\"Foundation_Collections\"`*"] #[cfg(feature = "Foundation_Collections")] @@ -3902,12 +3787,9 @@ impl SyndicationText { } #[doc = "*Required features: `\"Data_Xml_Dom\"`*"] #[cfg(feature = "Data_Xml_Dom")] - pub fn SetXml<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Data::Xml::Dom::XmlDocument>>, - { + pub fn SetXml(&self, value: &super::super::Data::Xml::Dom::XmlDocument) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).SetXml)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetXml)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } pub fn CreateSyndicationText(text: &::windows::core::HSTRING) -> ::windows::core::Result { Self::ISyndicationTextFactory(|this| unsafe { diff --git a/crates/libs/windows/src/Windows/Web/UI/Interop/mod.rs b/crates/libs/windows/src/Windows/Web/UI/Interop/mod.rs index 79c04fcb33..f7cdc69449 100644 --- a/crates/libs/windows/src/Windows/Web/UI/Interop/mod.rs +++ b/crates/libs/windows/src/Windows/Web/UI/Interop/mod.rs @@ -199,12 +199,9 @@ impl WebViewControl { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn SetSource<'a, P0>(&self, source: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Foundation::Uri>>, - { + pub fn SetSource(&self, source: &super::super::super::Foundation::Uri) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).SetSource)(::windows::core::Vtable::as_raw(this), source.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetSource)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(source)).ok() } } pub fn DocumentTitle(&self) -> ::windows::core::Result<::windows::core::HSTRING> { let this = self; @@ -283,12 +280,9 @@ impl WebViewControl { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn Navigate<'a, P0>(&self, source: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Foundation::Uri>>, - { + pub fn Navigate(&self, source: &super::super::super::Foundation::Uri) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).Navigate)(::windows::core::Vtable::as_raw(this), source.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).Navigate)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(source)).ok() } } pub fn NavigateToString(&self, text: &::windows::core::HSTRING) -> ::windows::core::Result<()> { let this = self; @@ -296,23 +290,19 @@ impl WebViewControl { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn NavigateToLocalStreamUri<'a, P0, P1, E1>(&self, source: P0, streamresolver: P1) -> ::windows::core::Result<()> + pub fn NavigateToLocalStreamUri<'a, P0, E0>(&self, source: &super::super::super::Foundation::Uri, streamresolver: P0) -> ::windows::core::Result<()> where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Foundation::Uri>>, - P1: ::std::convert::TryInto<::windows::core::InParam<'a, super::super::IUriToStreamResolver>, Error = E1>, - E1: ::std::convert::Into<::windows::core::Error>, + P0: ::std::convert::TryInto<::windows::core::InParam<'a, super::super::IUriToStreamResolver>, Error = E0>, + E0: ::std::convert::Into<::windows::core::Error>, { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).NavigateToLocalStreamUri)(::windows::core::Vtable::as_raw(this), source.into().abi(), streamresolver.try_into().map_err(|e| e.into())?.abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).NavigateToLocalStreamUri)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(source), streamresolver.try_into().map_err(|e| e.into())?.abi()).ok() } } #[doc = "*Required features: `\"Web_Http\"`*"] #[cfg(feature = "Web_Http")] - pub fn NavigateWithHttpRequestMessage<'a, P0>(&self, requestmessage: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Http::HttpRequestMessage>>, - { + pub fn NavigateWithHttpRequestMessage(&self, requestmessage: &super::super::Http::HttpRequestMessage) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).NavigateWithHttpRequestMessage)(::windows::core::Vtable::as_raw(this), requestmessage.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).NavigateWithHttpRequestMessage)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(requestmessage)).ok() } } #[doc = "*Required features: `\"Foundation_Collections\"`*"] #[cfg(feature = "Foundation_Collections")] @@ -364,14 +354,11 @@ impl WebViewControl { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn NavigationStarting<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Foundation::TypedEventHandler>>, - { + pub fn NavigationStarting(&self, handler: &super::super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).NavigationStarting)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).NavigationStarting)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -382,14 +369,11 @@ impl WebViewControl { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn ContentLoading<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Foundation::TypedEventHandler>>, - { + pub fn ContentLoading(&self, handler: &super::super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).ContentLoading)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).ContentLoading)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -400,14 +384,11 @@ impl WebViewControl { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn DOMContentLoaded<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Foundation::TypedEventHandler>>, - { + pub fn DOMContentLoaded(&self, handler: &super::super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).DOMContentLoaded)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).DOMContentLoaded)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -418,14 +399,11 @@ impl WebViewControl { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn NavigationCompleted<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Foundation::TypedEventHandler>>, - { + pub fn NavigationCompleted(&self, handler: &super::super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).NavigationCompleted)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).NavigationCompleted)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -436,14 +414,11 @@ impl WebViewControl { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn FrameNavigationStarting<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Foundation::TypedEventHandler>>, - { + pub fn FrameNavigationStarting(&self, handler: &super::super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).FrameNavigationStarting)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).FrameNavigationStarting)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -454,14 +429,11 @@ impl WebViewControl { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn FrameContentLoading<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Foundation::TypedEventHandler>>, - { + pub fn FrameContentLoading(&self, handler: &super::super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).FrameContentLoading)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).FrameContentLoading)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -472,14 +444,11 @@ impl WebViewControl { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn FrameDOMContentLoaded<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Foundation::TypedEventHandler>>, - { + pub fn FrameDOMContentLoaded(&self, handler: &super::super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).FrameDOMContentLoaded)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).FrameDOMContentLoaded)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -490,14 +459,11 @@ impl WebViewControl { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn FrameNavigationCompleted<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Foundation::TypedEventHandler>>, - { + pub fn FrameNavigationCompleted(&self, handler: &super::super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).FrameNavigationCompleted)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).FrameNavigationCompleted)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -508,14 +474,11 @@ impl WebViewControl { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn ScriptNotify<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Foundation::TypedEventHandler>>, - { + pub fn ScriptNotify(&self, handler: &super::super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).ScriptNotify)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).ScriptNotify)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -526,14 +489,11 @@ impl WebViewControl { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn LongRunningScriptDetected<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Foundation::TypedEventHandler>>, - { + pub fn LongRunningScriptDetected(&self, handler: &super::super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).LongRunningScriptDetected)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).LongRunningScriptDetected)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -544,14 +504,11 @@ impl WebViewControl { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn UnsafeContentWarningDisplaying<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Foundation::TypedEventHandler>>, - { + pub fn UnsafeContentWarningDisplaying(&self, handler: &super::super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).UnsafeContentWarningDisplaying)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).UnsafeContentWarningDisplaying)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -562,14 +519,11 @@ impl WebViewControl { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn UnviewableContentIdentified<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Foundation::TypedEventHandler>>, - { + pub fn UnviewableContentIdentified(&self, handler: &super::super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).UnviewableContentIdentified)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).UnviewableContentIdentified)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -580,14 +534,11 @@ impl WebViewControl { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn PermissionRequested<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Foundation::TypedEventHandler>>, - { + pub fn PermissionRequested(&self, handler: &super::super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).PermissionRequested)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).PermissionRequested)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -598,14 +549,11 @@ impl WebViewControl { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn UnsupportedUriSchemeIdentified<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Foundation::TypedEventHandler>>, - { + pub fn UnsupportedUriSchemeIdentified(&self, handler: &super::super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).UnsupportedUriSchemeIdentified)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).UnsupportedUriSchemeIdentified)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -616,14 +564,11 @@ impl WebViewControl { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn NewWindowRequested<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Foundation::TypedEventHandler>>, - { + pub fn NewWindowRequested(&self, handler: &super::super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).NewWindowRequested)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).NewWindowRequested)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -634,14 +579,11 @@ impl WebViewControl { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn ContainsFullScreenElementChanged<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Foundation::TypedEventHandler>>, - { + pub fn ContainsFullScreenElementChanged(&self, handler: &super::super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).ContainsFullScreenElementChanged)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).ContainsFullScreenElementChanged)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -652,14 +594,11 @@ impl WebViewControl { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn WebResourceRequested<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Foundation::TypedEventHandler>>, - { + pub fn WebResourceRequested(&self, handler: &super::super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).WebResourceRequested)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).WebResourceRequested)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -726,14 +665,11 @@ impl WebViewControl { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn MoveFocusRequested<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Foundation::TypedEventHandler>>, - { + pub fn MoveFocusRequested(&self, handler: &super::super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = &::windows::core::Interface::cast::(self)?; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).MoveFocusRequested)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).MoveFocusRequested)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -744,14 +680,11 @@ impl WebViewControl { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn AcceleratorKeyPressed<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Foundation::TypedEventHandler>>, - { + pub fn AcceleratorKeyPressed(&self, handler: &super::super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = &::windows::core::Interface::cast::(self)?; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).AcceleratorKeyPressed)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).AcceleratorKeyPressed)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -762,14 +695,11 @@ impl WebViewControl { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn GotFocus<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Foundation::TypedEventHandler>>, - { + pub fn GotFocus(&self, handler: &super::super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = &::windows::core::Interface::cast::(self)?; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).GotFocus)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).GotFocus)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -780,14 +710,11 @@ impl WebViewControl { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn LostFocus<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Foundation::TypedEventHandler>>, - { + pub fn LostFocus(&self, handler: &super::super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = &::windows::core::Interface::cast::(self)?; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).LostFocus)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).LostFocus)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -1139,14 +1066,11 @@ impl WebViewControlProcess { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn ProcessExited<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Foundation::TypedEventHandler>>, - { + pub fn ProcessExited(&self, handler: &super::super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).ProcessExited)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).ProcessExited)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -1155,13 +1079,10 @@ impl WebViewControlProcess { let this = self; unsafe { (::windows::core::Vtable::vtable(this).RemoveProcessExited)(::windows::core::Vtable::as_raw(this), token).ok() } } - pub fn CreateWithOptions<'a, P0>(processoptions: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, WebViewControlProcessOptions>>, - { + pub fn CreateWithOptions(processoptions: &WebViewControlProcessOptions) -> ::windows::core::Result { Self::IWebViewControlProcessFactory(|this| unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).CreateWithOptions)(::windows::core::Vtable::as_raw(this), processoptions.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).CreateWithOptions)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(processoptions), result__.as_mut_ptr()).from_abi::(result__) }) } #[doc(hidden)] diff --git a/crates/libs/windows/src/Windows/Web/UI/mod.rs b/crates/libs/windows/src/Windows/Web/UI/mod.rs index 1657209229..5d3894f7af 100644 --- a/crates/libs/windows/src/Windows/Web/UI/mod.rs +++ b/crates/libs/windows/src/Windows/Web/UI/mod.rs @@ -15,12 +15,9 @@ impl IWebViewControl { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn SetSource<'a, P0>(&self, source: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::Uri>>, - { + pub fn SetSource(&self, source: &super::super::Foundation::Uri) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).SetSource)(::windows::core::Vtable::as_raw(this), source.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetSource)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(source)).ok() } } pub fn DocumentTitle(&self) -> ::windows::core::Result<::windows::core::HSTRING> { let this = self; @@ -99,12 +96,9 @@ impl IWebViewControl { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn Navigate<'a, P0>(&self, source: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::Uri>>, - { + pub fn Navigate(&self, source: &super::super::Foundation::Uri) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).Navigate)(::windows::core::Vtable::as_raw(this), source.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).Navigate)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(source)).ok() } } pub fn NavigateToString(&self, text: &::windows::core::HSTRING) -> ::windows::core::Result<()> { let this = self; @@ -112,23 +106,19 @@ impl IWebViewControl { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn NavigateToLocalStreamUri<'a, P0, P1, E1>(&self, source: P0, streamresolver: P1) -> ::windows::core::Result<()> + pub fn NavigateToLocalStreamUri<'a, P0, E0>(&self, source: &super::super::Foundation::Uri, streamresolver: P0) -> ::windows::core::Result<()> where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::Uri>>, - P1: ::std::convert::TryInto<::windows::core::InParam<'a, super::IUriToStreamResolver>, Error = E1>, - E1: ::std::convert::Into<::windows::core::Error>, + P0: ::std::convert::TryInto<::windows::core::InParam<'a, super::IUriToStreamResolver>, Error = E0>, + E0: ::std::convert::Into<::windows::core::Error>, { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).NavigateToLocalStreamUri)(::windows::core::Vtable::as_raw(this), source.into().abi(), streamresolver.try_into().map_err(|e| e.into())?.abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).NavigateToLocalStreamUri)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(source), streamresolver.try_into().map_err(|e| e.into())?.abi()).ok() } } #[doc = "*Required features: `\"Web_Http\"`*"] #[cfg(feature = "Web_Http")] - pub fn NavigateWithHttpRequestMessage<'a, P0>(&self, requestmessage: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::Http::HttpRequestMessage>>, - { + pub fn NavigateWithHttpRequestMessage(&self, requestmessage: &super::Http::HttpRequestMessage) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).NavigateWithHttpRequestMessage)(::windows::core::Vtable::as_raw(this), requestmessage.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).NavigateWithHttpRequestMessage)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(requestmessage)).ok() } } #[doc = "*Required features: `\"Foundation_Collections\"`*"] #[cfg(feature = "Foundation_Collections")] @@ -180,14 +170,11 @@ impl IWebViewControl { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn NavigationStarting<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn NavigationStarting(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).NavigationStarting)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).NavigationStarting)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -198,14 +185,11 @@ impl IWebViewControl { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn ContentLoading<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn ContentLoading(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).ContentLoading)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).ContentLoading)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -216,14 +200,11 @@ impl IWebViewControl { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn DOMContentLoaded<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn DOMContentLoaded(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).DOMContentLoaded)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).DOMContentLoaded)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -234,14 +215,11 @@ impl IWebViewControl { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn NavigationCompleted<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn NavigationCompleted(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).NavigationCompleted)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).NavigationCompleted)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -252,14 +230,11 @@ impl IWebViewControl { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn FrameNavigationStarting<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn FrameNavigationStarting(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).FrameNavigationStarting)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).FrameNavigationStarting)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -270,14 +245,11 @@ impl IWebViewControl { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn FrameContentLoading<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn FrameContentLoading(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).FrameContentLoading)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).FrameContentLoading)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -288,14 +260,11 @@ impl IWebViewControl { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn FrameDOMContentLoaded<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn FrameDOMContentLoaded(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).FrameDOMContentLoaded)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).FrameDOMContentLoaded)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -306,14 +275,11 @@ impl IWebViewControl { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn FrameNavigationCompleted<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn FrameNavigationCompleted(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).FrameNavigationCompleted)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).FrameNavigationCompleted)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -324,14 +290,11 @@ impl IWebViewControl { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn ScriptNotify<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn ScriptNotify(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).ScriptNotify)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).ScriptNotify)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -342,14 +305,11 @@ impl IWebViewControl { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn LongRunningScriptDetected<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn LongRunningScriptDetected(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).LongRunningScriptDetected)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).LongRunningScriptDetected)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -360,14 +320,11 @@ impl IWebViewControl { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn UnsafeContentWarningDisplaying<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn UnsafeContentWarningDisplaying(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).UnsafeContentWarningDisplaying)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).UnsafeContentWarningDisplaying)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -378,14 +335,11 @@ impl IWebViewControl { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn UnviewableContentIdentified<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn UnviewableContentIdentified(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).UnviewableContentIdentified)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).UnviewableContentIdentified)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -396,14 +350,11 @@ impl IWebViewControl { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn PermissionRequested<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn PermissionRequested(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).PermissionRequested)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).PermissionRequested)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -414,14 +365,11 @@ impl IWebViewControl { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn UnsupportedUriSchemeIdentified<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn UnsupportedUriSchemeIdentified(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).UnsupportedUriSchemeIdentified)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).UnsupportedUriSchemeIdentified)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -432,14 +380,11 @@ impl IWebViewControl { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn NewWindowRequested<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn NewWindowRequested(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).NewWindowRequested)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).NewWindowRequested)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -450,14 +395,11 @@ impl IWebViewControl { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn ContainsFullScreenElementChanged<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn ContainsFullScreenElementChanged(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).ContainsFullScreenElementChanged)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).ContainsFullScreenElementChanged)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -468,14 +410,11 @@ impl IWebViewControl { } #[doc = "*Required features: `\"Foundation\"`*"] #[cfg(feature = "Foundation")] - pub fn WebResourceRequested<'a, P0>(&self, handler: P0) -> ::windows::core::Result - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::Foundation::TypedEventHandler>>, - { + pub fn WebResourceRequested(&self, handler: &super::super::Foundation::TypedEventHandler) -> ::windows::core::Result { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).WebResourceRequested)(::windows::core::Vtable::as_raw(this), handler.into().abi(), result__.as_mut_ptr()).from_abi::(result__) + (::windows::core::Vtable::vtable(this).WebResourceRequested)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::(result__) } } #[doc = "*Required features: `\"Foundation\"`*"] @@ -2334,12 +2273,9 @@ impl WebViewControlWebResourceRequestedEventArgs { } #[doc = "*Required features: `\"Web_Http\"`*"] #[cfg(feature = "Web_Http")] - pub fn SetResponse<'a, P0>(&self, value: P0) -> ::windows::core::Result<()> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::Http::HttpResponseMessage>>, - { + pub fn SetResponse(&self, value: &super::Http::HttpResponseMessage) -> ::windows::core::Result<()> { let this = self; - unsafe { (::windows::core::Vtable::vtable(this).SetResponse)(::windows::core::Vtable::as_raw(this), value.into().abi()).ok() } + unsafe { (::windows::core::Vtable::vtable(this).SetResponse)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(value)).ok() } } #[doc = "*Required features: `\"Web_Http\"`*"] #[cfg(feature = "Web_Http")] diff --git a/crates/libs/windows/src/Windows/Web/mod.rs b/crates/libs/windows/src/Windows/Web/mod.rs index b584908397..501f6de70e 100644 --- a/crates/libs/windows/src/Windows/Web/mod.rs +++ b/crates/libs/windows/src/Windows/Web/mod.rs @@ -12,14 +12,11 @@ pub struct IUriToStreamResolver(::windows::core::IUnknown); impl IUriToStreamResolver { #[doc = "*Required features: `\"Foundation\"`, `\"Storage_Streams\"`*"] #[cfg(all(feature = "Foundation", feature = "Storage_Streams"))] - pub fn UriToStreamAsync<'a, P0>(&self, uri: P0) -> ::windows::core::Result> - where - P0: ::std::convert::Into<::windows::core::InParam<'a, super::Foundation::Uri>>, - { + pub fn UriToStreamAsync(&self, uri: &super::Foundation::Uri) -> ::windows::core::Result> { let this = self; unsafe { let mut result__ = ::core::mem::MaybeUninit::zeroed(); - (::windows::core::Vtable::vtable(this).UriToStreamAsync)(::windows::core::Vtable::as_raw(this), uri.into().abi(), result__.as_mut_ptr()).from_abi::>(result__) + (::windows::core::Vtable::vtable(this).UriToStreamAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(uri), result__.as_mut_ptr()).from_abi::>(result__) } } }