1 #![allow(unused_variables, non_upper_case_globals, non_snake_case, unused_unsafe, non_camel_case_types, dead_code, clippy::all)] 2 #[repr(transparent)] 3 #[derive(:: std :: cmp :: PartialEq, :: std :: cmp :: Eq, :: std :: clone :: Clone, :: std :: fmt :: Debug)] 4 #[doc(hidden)] 5 pub struct IMessageDialog(::windows::runtime::IInspectable); 6 unsafe impl ::windows::runtime::Interface for IMessageDialog { 7 type Vtable = IMessageDialog_abi; 8 const IID: ::windows::runtime::GUID = ::windows::runtime::GUID::from_values(871734017, 21285, 17323, [154, 179, 189, 174, 68, 14, 65, 33]); 9 } 10 #[repr(C)] 11 #[doc(hidden)] 12 pub struct IMessageDialog_abi( 13 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr, iid: &::windows::runtime::GUID, interface: *mut ::windows::runtime::RawPtr) -> ::windows::runtime::HRESULT, 14 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr) -> u32, 15 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr) -> u32, 16 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr, count: *mut u32, values: *mut *mut ::windows::runtime::GUID) -> ::windows::runtime::HRESULT, 17 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr, value: *mut ::windows::runtime::RawPtr) -> ::windows::runtime::HRESULT, 18 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr, value: *mut i32) -> ::windows::runtime::HRESULT, 19 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr, result__: *mut ::std::mem::ManuallyDrop<::windows::runtime::HSTRING>) -> ::windows::runtime::HRESULT, 20 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr, value: ::std::mem::ManuallyDrop<::windows::runtime::HSTRING>) -> ::windows::runtime::HRESULT, 21 #[cfg(feature = "Foundation_Collections")] pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr, result__: *mut ::windows::runtime::RawPtr) -> ::windows::runtime::HRESULT, 22 #[cfg(not(feature = "Foundation_Collections"))] usize, 23 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr, result__: *mut u32) -> ::windows::runtime::HRESULT, 24 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr, value: u32) -> ::windows::runtime::HRESULT, 25 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr, result__: *mut u32) -> ::windows::runtime::HRESULT, 26 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr, value: u32) -> ::windows::runtime::HRESULT, 27 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr, result__: *mut ::std::mem::ManuallyDrop<::windows::runtime::HSTRING>) -> ::windows::runtime::HRESULT, 28 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr, value: ::std::mem::ManuallyDrop<::windows::runtime::HSTRING>) -> ::windows::runtime::HRESULT, 29 #[cfg(feature = "Foundation")] pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr, result__: *mut ::windows::runtime::RawPtr) -> ::windows::runtime::HRESULT, 30 #[cfg(not(feature = "Foundation"))] usize, 31 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr, result__: *mut MessageDialogOptions) -> ::windows::runtime::HRESULT, 32 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr, value: MessageDialogOptions) -> ::windows::runtime::HRESULT, 33 ); 34 #[repr(transparent)] 35 #[derive(:: std :: cmp :: PartialEq, :: std :: cmp :: Eq, :: std :: clone :: Clone, :: std :: fmt :: Debug)] 36 #[doc(hidden)] 37 pub struct IMessageDialogFactory(::windows::runtime::IInspectable); 38 unsafe impl ::windows::runtime::Interface for IMessageDialogFactory { 39 type Vtable = IMessageDialogFactory_abi; 40 const IID: ::windows::runtime::GUID = ::windows::runtime::GUID::from_values(756422519, 42607, 20133, [187, 135, 121, 63, 250, 73, 65, 242]); 41 } 42 #[repr(C)] 43 #[doc(hidden)] 44 pub struct IMessageDialogFactory_abi( 45 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr, iid: &::windows::runtime::GUID, interface: *mut ::windows::runtime::RawPtr) -> ::windows::runtime::HRESULT, 46 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr) -> u32, 47 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr) -> u32, 48 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr, count: *mut u32, values: *mut *mut ::windows::runtime::GUID) -> ::windows::runtime::HRESULT, 49 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr, value: *mut ::windows::runtime::RawPtr) -> ::windows::runtime::HRESULT, 50 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr, value: *mut i32) -> ::windows::runtime::HRESULT, 51 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr, content: ::std::mem::ManuallyDrop<::windows::runtime::HSTRING>, result__: *mut ::windows::runtime::RawPtr) -> ::windows::runtime::HRESULT, 52 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr, content: ::std::mem::ManuallyDrop<::windows::runtime::HSTRING>, title: ::std::mem::ManuallyDrop<::windows::runtime::HSTRING>, result__: *mut ::windows::runtime::RawPtr) -> ::windows::runtime::HRESULT, 53 ); 54 #[repr(transparent)] 55 #[derive(:: std :: cmp :: PartialEq, :: std :: cmp :: Eq, :: std :: clone :: Clone, :: std :: fmt :: Debug)] 56 #[doc(hidden)] 57 pub struct IPopupMenu(::windows::runtime::IInspectable); 58 unsafe impl ::windows::runtime::Interface for IPopupMenu { 59 type Vtable = IPopupMenu_abi; 60 const IID: ::windows::runtime::GUID = ::windows::runtime::GUID::from_values(1318831836, 34829, 18428, [160, 161, 114, 182, 57, 230, 37, 89]); 61 } 62 #[repr(C)] 63 #[doc(hidden)] 64 pub struct IPopupMenu_abi( 65 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr, iid: &::windows::runtime::GUID, interface: *mut ::windows::runtime::RawPtr) -> ::windows::runtime::HRESULT, 66 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr) -> u32, 67 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr) -> u32, 68 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr, count: *mut u32, values: *mut *mut ::windows::runtime::GUID) -> ::windows::runtime::HRESULT, 69 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr, value: *mut ::windows::runtime::RawPtr) -> ::windows::runtime::HRESULT, 70 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr, value: *mut i32) -> ::windows::runtime::HRESULT, 71 #[cfg(feature = "Foundation_Collections")] pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr, result__: *mut ::windows::runtime::RawPtr) -> ::windows::runtime::HRESULT, 72 #[cfg(not(feature = "Foundation_Collections"))] usize, 73 #[cfg(feature = "Foundation")] pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr, invocationpoint: super::super::Foundation::Point, result__: *mut ::windows::runtime::RawPtr) -> ::windows::runtime::HRESULT, 74 #[cfg(not(feature = "Foundation"))] usize, 75 #[cfg(feature = "Foundation")] pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr, selection: super::super::Foundation::Rect, result__: *mut ::windows::runtime::RawPtr) -> ::windows::runtime::HRESULT, 76 #[cfg(not(feature = "Foundation"))] usize, 77 #[cfg(feature = "Foundation")] pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr, selection: super::super::Foundation::Rect, preferredplacement: Placement, result__: *mut ::windows::runtime::RawPtr) -> ::windows::runtime::HRESULT, 78 #[cfg(not(feature = "Foundation"))] usize, 79 ); 80 #[repr(transparent)] 81 #[derive(:: std :: cmp :: PartialEq, :: std :: cmp :: Eq, :: std :: clone :: Clone, :: std :: fmt :: Debug)] 82 pub struct IUICommand(::windows::runtime::IInspectable); 83 unsafe impl ::windows::runtime::Interface for IUICommand { 84 type Vtable = IUICommand_abi; 85 const IID: ::windows::runtime::GUID = ::windows::runtime::GUID::from_values(1341733493, 16709, 18431, [172, 127, 223, 241, 193, 250, 91, 15]); 86 } 87 impl IUICommand { Label(&self) -> ::windows::runtime::Result<::windows::runtime::HSTRING>88 pub fn Label(&self) -> ::windows::runtime::Result<::windows::runtime::HSTRING> { 89 let this = self; 90 unsafe { 91 let mut result__: ::std::mem::ManuallyDrop<::windows::runtime::HSTRING> = ::std::mem::zeroed(); 92 (::windows::runtime::Interface::vtable(this).6)(::std::mem::transmute_copy(this), &mut result__).from_abi::<::windows::runtime::HSTRING>(result__) 93 } 94 } SetLabel<'a, Param0: ::windows::runtime::IntoParam<'a, ::windows::runtime::HSTRING>>(&self, value: Param0) -> ::windows::runtime::Result<()>95 pub fn SetLabel<'a, Param0: ::windows::runtime::IntoParam<'a, ::windows::runtime::HSTRING>>(&self, value: Param0) -> ::windows::runtime::Result<()> { 96 let this = self; 97 unsafe { (::windows::runtime::Interface::vtable(this).7)(::std::mem::transmute_copy(this), value.into_param().abi()).ok() } 98 } Invoked(&self) -> ::windows::runtime::Result<UICommandInvokedHandler>99 pub fn Invoked(&self) -> ::windows::runtime::Result<UICommandInvokedHandler> { 100 let this = self; 101 unsafe { 102 let mut result__: ::windows::runtime::RawPtr = ::std::mem::zeroed(); 103 (::windows::runtime::Interface::vtable(this).8)(::std::mem::transmute_copy(this), &mut result__).from_abi::<UICommandInvokedHandler>(result__) 104 } 105 } SetInvoked<'a, Param0: ::windows::runtime::IntoParam<'a, UICommandInvokedHandler>>(&self, value: Param0) -> ::windows::runtime::Result<()>106 pub fn SetInvoked<'a, Param0: ::windows::runtime::IntoParam<'a, UICommandInvokedHandler>>(&self, value: Param0) -> ::windows::runtime::Result<()> { 107 let this = self; 108 unsafe { (::windows::runtime::Interface::vtable(this).9)(::std::mem::transmute_copy(this), value.into_param().abi()).ok() } 109 } Id(&self) -> ::windows::runtime::Result<::windows::runtime::IInspectable>110 pub fn Id(&self) -> ::windows::runtime::Result<::windows::runtime::IInspectable> { 111 let this = self; 112 unsafe { 113 let mut result__: ::windows::runtime::RawPtr = ::std::mem::zeroed(); 114 (::windows::runtime::Interface::vtable(this).10)(::std::mem::transmute_copy(this), &mut result__).from_abi::<::windows::runtime::IInspectable>(result__) 115 } 116 } SetId<'a, Param0: ::windows::runtime::IntoParam<'a, ::windows::runtime::IInspectable>>(&self, value: Param0) -> ::windows::runtime::Result<()>117 pub fn SetId<'a, Param0: ::windows::runtime::IntoParam<'a, ::windows::runtime::IInspectable>>(&self, value: Param0) -> ::windows::runtime::Result<()> { 118 let this = self; 119 unsafe { (::windows::runtime::Interface::vtable(this).11)(::std::mem::transmute_copy(this), value.into_param().abi()).ok() } 120 } 121 } 122 unsafe impl ::windows::runtime::RuntimeType for IUICommand { 123 const SIGNATURE: ::windows::runtime::ConstBuffer = ::windows::runtime::ConstBuffer::from_slice(b"{4ff93a75-4145-47ff-ac7f-dff1c1fa5b0f}"); 124 } 125 impl ::std::convert::From<IUICommand> for ::windows::runtime::IUnknown { from(value: IUICommand) -> Self126 fn from(value: IUICommand) -> Self { 127 unsafe { ::std::mem::transmute(value) } 128 } 129 } 130 impl ::std::convert::From<&IUICommand> for ::windows::runtime::IUnknown { from(value: &IUICommand) -> Self131 fn from(value: &IUICommand) -> Self { 132 ::std::convert::From::from(::std::clone::Clone::clone(value)) 133 } 134 } 135 impl<'a> ::windows::runtime::IntoParam<'a, ::windows::runtime::IUnknown> for IUICommand { into_param(self) -> ::windows::runtime::Param<'a, ::windows::runtime::IUnknown>136 fn into_param(self) -> ::windows::runtime::Param<'a, ::windows::runtime::IUnknown> { 137 ::windows::runtime::Param::Owned(::std::convert::Into::<::windows::runtime::IUnknown>::into(self)) 138 } 139 } 140 impl<'a> ::windows::runtime::IntoParam<'a, ::windows::runtime::IUnknown> for &IUICommand { into_param(self) -> ::windows::runtime::Param<'a, ::windows::runtime::IUnknown>141 fn into_param(self) -> ::windows::runtime::Param<'a, ::windows::runtime::IUnknown> { 142 ::windows::runtime::Param::Owned(::std::convert::Into::<::windows::runtime::IUnknown>::into(::std::clone::Clone::clone(self))) 143 } 144 } 145 impl ::std::convert::From<IUICommand> for ::windows::runtime::IInspectable { from(value: IUICommand) -> Self146 fn from(value: IUICommand) -> Self { 147 value.0 148 } 149 } 150 impl ::std::convert::From<&IUICommand> for ::windows::runtime::IInspectable { from(value: &IUICommand) -> Self151 fn from(value: &IUICommand) -> Self { 152 value.0.clone() 153 } 154 } 155 impl<'a> ::windows::runtime::IntoParam<'a, ::windows::runtime::IInspectable> for IUICommand { into_param(self) -> ::windows::runtime::Param<'a, ::windows::runtime::IInspectable>156 fn into_param(self) -> ::windows::runtime::Param<'a, ::windows::runtime::IInspectable> { 157 ::windows::runtime::Param::Owned(self.0) 158 } 159 } 160 impl<'a> ::windows::runtime::IntoParam<'a, ::windows::runtime::IInspectable> for &'a IUICommand { into_param(self) -> ::windows::runtime::Param<'a, ::windows::runtime::IInspectable>161 fn into_param(self) -> ::windows::runtime::Param<'a, ::windows::runtime::IInspectable> { 162 ::windows::runtime::Param::Borrowed(&self.0) 163 } 164 } 165 #[repr(C)] 166 #[doc(hidden)] 167 pub struct IUICommand_abi( 168 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr, iid: &::windows::runtime::GUID, interface: *mut ::windows::runtime::RawPtr) -> ::windows::runtime::HRESULT, 169 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr) -> u32, 170 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr) -> u32, 171 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr, count: *mut u32, values: *mut *mut ::windows::runtime::GUID) -> ::windows::runtime::HRESULT, 172 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr, value: *mut ::windows::runtime::RawPtr) -> ::windows::runtime::HRESULT, 173 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr, value: *mut i32) -> ::windows::runtime::HRESULT, 174 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr, result__: *mut ::std::mem::ManuallyDrop<::windows::runtime::HSTRING>) -> ::windows::runtime::HRESULT, 175 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr, value: ::std::mem::ManuallyDrop<::windows::runtime::HSTRING>) -> ::windows::runtime::HRESULT, 176 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr, result__: *mut ::windows::runtime::RawPtr) -> ::windows::runtime::HRESULT, 177 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr, value: ::windows::runtime::RawPtr) -> ::windows::runtime::HRESULT, 178 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr, result__: *mut ::windows::runtime::RawPtr) -> ::windows::runtime::HRESULT, 179 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr, value: ::windows::runtime::RawPtr) -> ::windows::runtime::HRESULT, 180 ); 181 #[repr(transparent)] 182 #[derive(:: std :: cmp :: PartialEq, :: std :: cmp :: Eq, :: std :: clone :: Clone, :: std :: fmt :: Debug)] 183 #[doc(hidden)] 184 pub struct IUICommandFactory(::windows::runtime::IInspectable); 185 unsafe impl ::windows::runtime::Interface for IUICommandFactory { 186 type Vtable = IUICommandFactory_abi; 187 const IID: ::windows::runtime::GUID = ::windows::runtime::GUID::from_values(2719646089, 9904, 18038, [174, 148, 84, 4, 27, 193, 37, 232]); 188 } 189 #[repr(C)] 190 #[doc(hidden)] 191 pub struct IUICommandFactory_abi( 192 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr, iid: &::windows::runtime::GUID, interface: *mut ::windows::runtime::RawPtr) -> ::windows::runtime::HRESULT, 193 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr) -> u32, 194 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr) -> u32, 195 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr, count: *mut u32, values: *mut *mut ::windows::runtime::GUID) -> ::windows::runtime::HRESULT, 196 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr, value: *mut ::windows::runtime::RawPtr) -> ::windows::runtime::HRESULT, 197 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr, value: *mut i32) -> ::windows::runtime::HRESULT, 198 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr, label: ::std::mem::ManuallyDrop<::windows::runtime::HSTRING>, result__: *mut ::windows::runtime::RawPtr) -> ::windows::runtime::HRESULT, 199 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr, label: ::std::mem::ManuallyDrop<::windows::runtime::HSTRING>, action: ::windows::runtime::RawPtr, result__: *mut ::windows::runtime::RawPtr) -> ::windows::runtime::HRESULT, 200 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr, label: ::std::mem::ManuallyDrop<::windows::runtime::HSTRING>, action: ::windows::runtime::RawPtr, commandid: ::windows::runtime::RawPtr, result__: *mut ::windows::runtime::RawPtr) -> ::windows::runtime::HRESULT, 201 ); 202 #[repr(transparent)] 203 #[derive(:: std :: cmp :: PartialEq, :: std :: cmp :: Eq, :: std :: clone :: Clone, :: std :: fmt :: Debug)] 204 pub struct MessageDialog(::windows::runtime::IInspectable); 205 impl MessageDialog { Title(&self) -> ::windows::runtime::Result<::windows::runtime::HSTRING>206 pub fn Title(&self) -> ::windows::runtime::Result<::windows::runtime::HSTRING> { 207 let this = self; 208 unsafe { 209 let mut result__: ::std::mem::ManuallyDrop<::windows::runtime::HSTRING> = ::std::mem::zeroed(); 210 (::windows::runtime::Interface::vtable(this).6)(::std::mem::transmute_copy(this), &mut result__).from_abi::<::windows::runtime::HSTRING>(result__) 211 } 212 } SetTitle<'a, Param0: ::windows::runtime::IntoParam<'a, ::windows::runtime::HSTRING>>(&self, value: Param0) -> ::windows::runtime::Result<()>213 pub fn SetTitle<'a, Param0: ::windows::runtime::IntoParam<'a, ::windows::runtime::HSTRING>>(&self, value: Param0) -> ::windows::runtime::Result<()> { 214 let this = self; 215 unsafe { (::windows::runtime::Interface::vtable(this).7)(::std::mem::transmute_copy(this), value.into_param().abi()).ok() } 216 } 217 #[cfg(feature = "Foundation_Collections")] Commands(&self) -> ::windows::runtime::Result<super::super::Foundation::Collections::IVector<IUICommand>>218 pub fn Commands(&self) -> ::windows::runtime::Result<super::super::Foundation::Collections::IVector<IUICommand>> { 219 let this = self; 220 unsafe { 221 let mut result__: ::windows::runtime::RawPtr = ::std::mem::zeroed(); 222 (::windows::runtime::Interface::vtable(this).8)(::std::mem::transmute_copy(this), &mut result__).from_abi::<super::super::Foundation::Collections::IVector<IUICommand>>(result__) 223 } 224 } DefaultCommandIndex(&self) -> ::windows::runtime::Result<u32>225 pub fn DefaultCommandIndex(&self) -> ::windows::runtime::Result<u32> { 226 let this = self; 227 unsafe { 228 let mut result__: u32 = ::std::mem::zeroed(); 229 (::windows::runtime::Interface::vtable(this).9)(::std::mem::transmute_copy(this), &mut result__).from_abi::<u32>(result__) 230 } 231 } SetDefaultCommandIndex(&self, value: u32) -> ::windows::runtime::Result<()>232 pub fn SetDefaultCommandIndex(&self, value: u32) -> ::windows::runtime::Result<()> { 233 let this = self; 234 unsafe { (::windows::runtime::Interface::vtable(this).10)(::std::mem::transmute_copy(this), value).ok() } 235 } CancelCommandIndex(&self) -> ::windows::runtime::Result<u32>236 pub fn CancelCommandIndex(&self) -> ::windows::runtime::Result<u32> { 237 let this = self; 238 unsafe { 239 let mut result__: u32 = ::std::mem::zeroed(); 240 (::windows::runtime::Interface::vtable(this).11)(::std::mem::transmute_copy(this), &mut result__).from_abi::<u32>(result__) 241 } 242 } SetCancelCommandIndex(&self, value: u32) -> ::windows::runtime::Result<()>243 pub fn SetCancelCommandIndex(&self, value: u32) -> ::windows::runtime::Result<()> { 244 let this = self; 245 unsafe { (::windows::runtime::Interface::vtable(this).12)(::std::mem::transmute_copy(this), value).ok() } 246 } Content(&self) -> ::windows::runtime::Result<::windows::runtime::HSTRING>247 pub fn Content(&self) -> ::windows::runtime::Result<::windows::runtime::HSTRING> { 248 let this = self; 249 unsafe { 250 let mut result__: ::std::mem::ManuallyDrop<::windows::runtime::HSTRING> = ::std::mem::zeroed(); 251 (::windows::runtime::Interface::vtable(this).13)(::std::mem::transmute_copy(this), &mut result__).from_abi::<::windows::runtime::HSTRING>(result__) 252 } 253 } SetContent<'a, Param0: ::windows::runtime::IntoParam<'a, ::windows::runtime::HSTRING>>(&self, value: Param0) -> ::windows::runtime::Result<()>254 pub fn SetContent<'a, Param0: ::windows::runtime::IntoParam<'a, ::windows::runtime::HSTRING>>(&self, value: Param0) -> ::windows::runtime::Result<()> { 255 let this = self; 256 unsafe { (::windows::runtime::Interface::vtable(this).14)(::std::mem::transmute_copy(this), value.into_param().abi()).ok() } 257 } 258 #[cfg(feature = "Foundation")] ShowAsync(&self) -> ::windows::runtime::Result<super::super::Foundation::IAsyncOperation<IUICommand>>259 pub fn ShowAsync(&self) -> ::windows::runtime::Result<super::super::Foundation::IAsyncOperation<IUICommand>> { 260 let this = self; 261 unsafe { 262 let mut result__: ::windows::runtime::RawPtr = ::std::mem::zeroed(); 263 (::windows::runtime::Interface::vtable(this).15)(::std::mem::transmute_copy(this), &mut result__).from_abi::<super::super::Foundation::IAsyncOperation<IUICommand>>(result__) 264 } 265 } Options(&self) -> ::windows::runtime::Result<MessageDialogOptions>266 pub fn Options(&self) -> ::windows::runtime::Result<MessageDialogOptions> { 267 let this = self; 268 unsafe { 269 let mut result__: MessageDialogOptions = ::std::mem::zeroed(); 270 (::windows::runtime::Interface::vtable(this).16)(::std::mem::transmute_copy(this), &mut result__).from_abi::<MessageDialogOptions>(result__) 271 } 272 } SetOptions(&self, value: MessageDialogOptions) -> ::windows::runtime::Result<()>273 pub fn SetOptions(&self, value: MessageDialogOptions) -> ::windows::runtime::Result<()> { 274 let this = self; 275 unsafe { (::windows::runtime::Interface::vtable(this).17)(::std::mem::transmute_copy(this), value).ok() } 276 } Create<'a, Param0: ::windows::runtime::IntoParam<'a, ::windows::runtime::HSTRING>>(content: Param0) -> ::windows::runtime::Result<MessageDialog>277 pub fn Create<'a, Param0: ::windows::runtime::IntoParam<'a, ::windows::runtime::HSTRING>>(content: Param0) -> ::windows::runtime::Result<MessageDialog> { 278 Self::IMessageDialogFactory(|this| unsafe { 279 let mut result__: ::windows::runtime::RawPtr = ::std::mem::zeroed(); 280 (::windows::runtime::Interface::vtable(this).6)(::std::mem::transmute_copy(this), content.into_param().abi(), &mut result__).from_abi::<MessageDialog>(result__) 281 }) 282 } CreateWithTitle<'a, Param0: ::windows::runtime::IntoParam<'a, ::windows::runtime::HSTRING>, Param1: ::windows::runtime::IntoParam<'a, ::windows::runtime::HSTRING>>(content: Param0, title: Param1) -> ::windows::runtime::Result<MessageDialog>283 pub fn CreateWithTitle<'a, Param0: ::windows::runtime::IntoParam<'a, ::windows::runtime::HSTRING>, Param1: ::windows::runtime::IntoParam<'a, ::windows::runtime::HSTRING>>(content: Param0, title: Param1) -> ::windows::runtime::Result<MessageDialog> { 284 Self::IMessageDialogFactory(|this| unsafe { 285 let mut result__: ::windows::runtime::RawPtr = ::std::mem::zeroed(); 286 (::windows::runtime::Interface::vtable(this).7)(::std::mem::transmute_copy(this), content.into_param().abi(), title.into_param().abi(), &mut result__).from_abi::<MessageDialog>(result__) 287 }) 288 } IMessageDialogFactory<R, F: FnOnce(&IMessageDialogFactory) -> ::windows::runtime::Result<R>>(callback: F) -> ::windows::runtime::Result<R>289 pub fn IMessageDialogFactory<R, F: FnOnce(&IMessageDialogFactory) -> ::windows::runtime::Result<R>>(callback: F) -> ::windows::runtime::Result<R> { 290 static mut SHARED: ::windows::runtime::FactoryCache<MessageDialog, IMessageDialogFactory> = ::windows::runtime::FactoryCache::new(); 291 unsafe { SHARED.call(callback) } 292 } 293 } 294 unsafe impl ::windows::runtime::RuntimeType for MessageDialog { 295 const SIGNATURE: ::windows::runtime::ConstBuffer = ::windows::runtime::ConstBuffer::from_slice(b"rc(Windows.UI.Popups.MessageDialog;{33f59b01-5325-43ab-9ab3-bdae440e4121})"); 296 } 297 unsafe impl ::windows::runtime::Interface for MessageDialog { 298 type Vtable = IMessageDialog_abi; 299 const IID: ::windows::runtime::GUID = ::windows::runtime::GUID::from_values(871734017, 21285, 17323, [154, 179, 189, 174, 68, 14, 65, 33]); 300 } 301 impl ::windows::runtime::RuntimeName for MessageDialog { 302 const NAME: &'static str = "Windows.UI.Popups.MessageDialog"; 303 } 304 impl ::std::convert::From<MessageDialog> for ::windows::runtime::IUnknown { from(value: MessageDialog) -> Self305 fn from(value: MessageDialog) -> Self { 306 unsafe { ::std::mem::transmute(value) } 307 } 308 } 309 impl ::std::convert::From<&MessageDialog> for ::windows::runtime::IUnknown { from(value: &MessageDialog) -> Self310 fn from(value: &MessageDialog) -> Self { 311 ::std::convert::From::from(::std::clone::Clone::clone(value)) 312 } 313 } 314 impl<'a> ::windows::runtime::IntoParam<'a, ::windows::runtime::IUnknown> for MessageDialog { into_param(self) -> ::windows::runtime::Param<'a, ::windows::runtime::IUnknown>315 fn into_param(self) -> ::windows::runtime::Param<'a, ::windows::runtime::IUnknown> { 316 ::windows::runtime::Param::Owned(::std::convert::Into::<::windows::runtime::IUnknown>::into(self)) 317 } 318 } 319 impl<'a> ::windows::runtime::IntoParam<'a, ::windows::runtime::IUnknown> for &MessageDialog { into_param(self) -> ::windows::runtime::Param<'a, ::windows::runtime::IUnknown>320 fn into_param(self) -> ::windows::runtime::Param<'a, ::windows::runtime::IUnknown> { 321 ::windows::runtime::Param::Owned(::std::convert::Into::<::windows::runtime::IUnknown>::into(::std::clone::Clone::clone(self))) 322 } 323 } 324 impl ::std::convert::From<MessageDialog> for ::windows::runtime::IInspectable { from(value: MessageDialog) -> Self325 fn from(value: MessageDialog) -> Self { 326 value.0 327 } 328 } 329 impl ::std::convert::From<&MessageDialog> for ::windows::runtime::IInspectable { from(value: &MessageDialog) -> Self330 fn from(value: &MessageDialog) -> Self { 331 value.0.clone() 332 } 333 } 334 impl<'a> ::windows::runtime::IntoParam<'a, ::windows::runtime::IInspectable> for MessageDialog { into_param(self) -> ::windows::runtime::Param<'a, ::windows::runtime::IInspectable>335 fn into_param(self) -> ::windows::runtime::Param<'a, ::windows::runtime::IInspectable> { 336 ::windows::runtime::Param::Owned(self.0) 337 } 338 } 339 impl<'a> ::windows::runtime::IntoParam<'a, ::windows::runtime::IInspectable> for &'a MessageDialog { into_param(self) -> ::windows::runtime::Param<'a, ::windows::runtime::IInspectable>340 fn into_param(self) -> ::windows::runtime::Param<'a, ::windows::runtime::IInspectable> { 341 ::windows::runtime::Param::Borrowed(&self.0) 342 } 343 } 344 #[derive(:: std :: cmp :: PartialEq, :: std :: cmp :: Eq, :: std :: marker :: Copy, :: std :: clone :: Clone, :: std :: default :: Default, :: std :: fmt :: Debug)] 345 #[repr(transparent)] 346 pub struct MessageDialogOptions(pub u32); 347 impl MessageDialogOptions { 348 pub const None: MessageDialogOptions = MessageDialogOptions(0u32); 349 pub const AcceptUserInputAfterDelay: MessageDialogOptions = MessageDialogOptions(1u32); 350 } 351 impl ::std::convert::From<u32> for MessageDialogOptions { from(value: u32) -> Self352 fn from(value: u32) -> Self { 353 Self(value) 354 } 355 } 356 unsafe impl ::windows::runtime::Abi for MessageDialogOptions { 357 type Abi = Self; 358 type DefaultType = Self; 359 } 360 unsafe impl ::windows::runtime::RuntimeType for MessageDialogOptions { 361 const SIGNATURE: ::windows::runtime::ConstBuffer = ::windows::runtime::ConstBuffer::from_slice(b"enum(Windows.UI.Popups.MessageDialogOptions;u4)"); 362 } 363 impl ::std::ops::BitOr for MessageDialogOptions { 364 type Output = Self; bitor(self, rhs: Self) -> Self365 fn bitor(self, rhs: Self) -> Self { 366 Self(self.0 | rhs.0) 367 } 368 } 369 impl ::std::ops::BitAnd for MessageDialogOptions { 370 type Output = Self; bitand(self, rhs: Self) -> Self371 fn bitand(self, rhs: Self) -> Self { 372 Self(self.0 & rhs.0) 373 } 374 } 375 impl ::std::ops::BitOrAssign for MessageDialogOptions { bitor_assign(&mut self, rhs: Self)376 fn bitor_assign(&mut self, rhs: Self) { 377 self.0.bitor_assign(rhs.0) 378 } 379 } 380 impl ::std::ops::BitAndAssign for MessageDialogOptions { bitand_assign(&mut self, rhs: Self)381 fn bitand_assign(&mut self, rhs: Self) { 382 self.0.bitand_assign(rhs.0) 383 } 384 } 385 impl ::std::ops::Not for MessageDialogOptions { 386 type Output = Self; not(self) -> Self387 fn not(self) -> Self { 388 Self(self.0.not()) 389 } 390 } 391 #[derive(:: std :: cmp :: PartialEq, :: std :: cmp :: Eq, :: std :: marker :: Copy, :: std :: clone :: Clone, :: std :: default :: Default, :: std :: fmt :: Debug)] 392 #[repr(transparent)] 393 pub struct Placement(pub i32); 394 impl Placement { 395 pub const Default: Placement = Placement(0i32); 396 pub const Above: Placement = Placement(1i32); 397 pub const Below: Placement = Placement(2i32); 398 pub const Left: Placement = Placement(3i32); 399 pub const Right: Placement = Placement(4i32); 400 } 401 impl ::std::convert::From<i32> for Placement { from(value: i32) -> Self402 fn from(value: i32) -> Self { 403 Self(value) 404 } 405 } 406 unsafe impl ::windows::runtime::Abi for Placement { 407 type Abi = Self; 408 type DefaultType = Self; 409 } 410 unsafe impl ::windows::runtime::RuntimeType for Placement { 411 const SIGNATURE: ::windows::runtime::ConstBuffer = ::windows::runtime::ConstBuffer::from_slice(b"enum(Windows.UI.Popups.Placement;i4)"); 412 } 413 #[repr(transparent)] 414 #[derive(:: std :: cmp :: PartialEq, :: std :: cmp :: Eq, :: std :: clone :: Clone, :: std :: fmt :: Debug)] 415 pub struct PopupMenu(::windows::runtime::IInspectable); 416 impl PopupMenu { new() -> ::windows::runtime::Result<Self>417 pub fn new() -> ::windows::runtime::Result<Self> { 418 Self::IActivationFactory(|f| f.activate_instance::<Self>()) 419 } IActivationFactory<R, F: FnOnce(&::windows::runtime::IActivationFactory) -> ::windows::runtime::Result<R>>(callback: F) -> ::windows::runtime::Result<R>420 fn IActivationFactory<R, F: FnOnce(&::windows::runtime::IActivationFactory) -> ::windows::runtime::Result<R>>(callback: F) -> ::windows::runtime::Result<R> { 421 static mut SHARED: ::windows::runtime::FactoryCache<PopupMenu, ::windows::runtime::IActivationFactory> = ::windows::runtime::FactoryCache::new(); 422 unsafe { SHARED.call(callback) } 423 } 424 #[cfg(feature = "Foundation_Collections")] Commands(&self) -> ::windows::runtime::Result<super::super::Foundation::Collections::IVector<IUICommand>>425 pub fn Commands(&self) -> ::windows::runtime::Result<super::super::Foundation::Collections::IVector<IUICommand>> { 426 let this = self; 427 unsafe { 428 let mut result__: ::windows::runtime::RawPtr = ::std::mem::zeroed(); 429 (::windows::runtime::Interface::vtable(this).6)(::std::mem::transmute_copy(this), &mut result__).from_abi::<super::super::Foundation::Collections::IVector<IUICommand>>(result__) 430 } 431 } 432 #[cfg(feature = "Foundation")] ShowAsync<'a, Param0: ::windows::runtime::IntoParam<'a, super::super::Foundation::Point>>(&self, invocationpoint: Param0) -> ::windows::runtime::Result<super::super::Foundation::IAsyncOperation<IUICommand>>433 pub fn ShowAsync<'a, Param0: ::windows::runtime::IntoParam<'a, super::super::Foundation::Point>>(&self, invocationpoint: Param0) -> ::windows::runtime::Result<super::super::Foundation::IAsyncOperation<IUICommand>> { 434 let this = self; 435 unsafe { 436 let mut result__: ::windows::runtime::RawPtr = ::std::mem::zeroed(); 437 (::windows::runtime::Interface::vtable(this).7)(::std::mem::transmute_copy(this), invocationpoint.into_param().abi(), &mut result__).from_abi::<super::super::Foundation::IAsyncOperation<IUICommand>>(result__) 438 } 439 } 440 #[cfg(feature = "Foundation")] ShowAsyncWithRect<'a, Param0: ::windows::runtime::IntoParam<'a, super::super::Foundation::Rect>>(&self, selection: Param0) -> ::windows::runtime::Result<super::super::Foundation::IAsyncOperation<IUICommand>>441 pub fn ShowAsyncWithRect<'a, Param0: ::windows::runtime::IntoParam<'a, super::super::Foundation::Rect>>(&self, selection: Param0) -> ::windows::runtime::Result<super::super::Foundation::IAsyncOperation<IUICommand>> { 442 let this = self; 443 unsafe { 444 let mut result__: ::windows::runtime::RawPtr = ::std::mem::zeroed(); 445 (::windows::runtime::Interface::vtable(this).8)(::std::mem::transmute_copy(this), selection.into_param().abi(), &mut result__).from_abi::<super::super::Foundation::IAsyncOperation<IUICommand>>(result__) 446 } 447 } 448 #[cfg(feature = "Foundation")] ShowAsyncWithRectAndPlacement<'a, Param0: ::windows::runtime::IntoParam<'a, super::super::Foundation::Rect>>(&self, selection: Param0, preferredplacement: Placement) -> ::windows::runtime::Result<super::super::Foundation::IAsyncOperation<IUICommand>>449 pub fn ShowAsyncWithRectAndPlacement<'a, Param0: ::windows::runtime::IntoParam<'a, super::super::Foundation::Rect>>(&self, selection: Param0, preferredplacement: Placement) -> ::windows::runtime::Result<super::super::Foundation::IAsyncOperation<IUICommand>> { 450 let this = self; 451 unsafe { 452 let mut result__: ::windows::runtime::RawPtr = ::std::mem::zeroed(); 453 (::windows::runtime::Interface::vtable(this).9)(::std::mem::transmute_copy(this), selection.into_param().abi(), preferredplacement, &mut result__).from_abi::<super::super::Foundation::IAsyncOperation<IUICommand>>(result__) 454 } 455 } 456 } 457 unsafe impl ::windows::runtime::RuntimeType for PopupMenu { 458 const SIGNATURE: ::windows::runtime::ConstBuffer = ::windows::runtime::ConstBuffer::from_slice(b"rc(Windows.UI.Popups.PopupMenu;{4e9bc6dc-880d-47fc-a0a1-72b639e62559})"); 459 } 460 unsafe impl ::windows::runtime::Interface for PopupMenu { 461 type Vtable = IPopupMenu_abi; 462 const IID: ::windows::runtime::GUID = ::windows::runtime::GUID::from_values(1318831836, 34829, 18428, [160, 161, 114, 182, 57, 230, 37, 89]); 463 } 464 impl ::windows::runtime::RuntimeName for PopupMenu { 465 const NAME: &'static str = "Windows.UI.Popups.PopupMenu"; 466 } 467 impl ::std::convert::From<PopupMenu> for ::windows::runtime::IUnknown { from(value: PopupMenu) -> Self468 fn from(value: PopupMenu) -> Self { 469 unsafe { ::std::mem::transmute(value) } 470 } 471 } 472 impl ::std::convert::From<&PopupMenu> for ::windows::runtime::IUnknown { from(value: &PopupMenu) -> Self473 fn from(value: &PopupMenu) -> Self { 474 ::std::convert::From::from(::std::clone::Clone::clone(value)) 475 } 476 } 477 impl<'a> ::windows::runtime::IntoParam<'a, ::windows::runtime::IUnknown> for PopupMenu { into_param(self) -> ::windows::runtime::Param<'a, ::windows::runtime::IUnknown>478 fn into_param(self) -> ::windows::runtime::Param<'a, ::windows::runtime::IUnknown> { 479 ::windows::runtime::Param::Owned(::std::convert::Into::<::windows::runtime::IUnknown>::into(self)) 480 } 481 } 482 impl<'a> ::windows::runtime::IntoParam<'a, ::windows::runtime::IUnknown> for &PopupMenu { into_param(self) -> ::windows::runtime::Param<'a, ::windows::runtime::IUnknown>483 fn into_param(self) -> ::windows::runtime::Param<'a, ::windows::runtime::IUnknown> { 484 ::windows::runtime::Param::Owned(::std::convert::Into::<::windows::runtime::IUnknown>::into(::std::clone::Clone::clone(self))) 485 } 486 } 487 impl ::std::convert::From<PopupMenu> for ::windows::runtime::IInspectable { from(value: PopupMenu) -> Self488 fn from(value: PopupMenu) -> Self { 489 value.0 490 } 491 } 492 impl ::std::convert::From<&PopupMenu> for ::windows::runtime::IInspectable { from(value: &PopupMenu) -> Self493 fn from(value: &PopupMenu) -> Self { 494 value.0.clone() 495 } 496 } 497 impl<'a> ::windows::runtime::IntoParam<'a, ::windows::runtime::IInspectable> for PopupMenu { into_param(self) -> ::windows::runtime::Param<'a, ::windows::runtime::IInspectable>498 fn into_param(self) -> ::windows::runtime::Param<'a, ::windows::runtime::IInspectable> { 499 ::windows::runtime::Param::Owned(self.0) 500 } 501 } 502 impl<'a> ::windows::runtime::IntoParam<'a, ::windows::runtime::IInspectable> for &'a PopupMenu { into_param(self) -> ::windows::runtime::Param<'a, ::windows::runtime::IInspectable>503 fn into_param(self) -> ::windows::runtime::Param<'a, ::windows::runtime::IInspectable> { 504 ::windows::runtime::Param::Borrowed(&self.0) 505 } 506 } 507 #[repr(transparent)] 508 #[derive(:: std :: cmp :: PartialEq, :: std :: cmp :: Eq, :: std :: clone :: Clone, :: std :: fmt :: Debug)] 509 pub struct UICommand(::windows::runtime::IInspectable); 510 impl UICommand { new() -> ::windows::runtime::Result<Self>511 pub fn new() -> ::windows::runtime::Result<Self> { 512 Self::IActivationFactory(|f| f.activate_instance::<Self>()) 513 } IActivationFactory<R, F: FnOnce(&::windows::runtime::IActivationFactory) -> ::windows::runtime::Result<R>>(callback: F) -> ::windows::runtime::Result<R>514 fn IActivationFactory<R, F: FnOnce(&::windows::runtime::IActivationFactory) -> ::windows::runtime::Result<R>>(callback: F) -> ::windows::runtime::Result<R> { 515 static mut SHARED: ::windows::runtime::FactoryCache<UICommand, ::windows::runtime::IActivationFactory> = ::windows::runtime::FactoryCache::new(); 516 unsafe { SHARED.call(callback) } 517 } Label(&self) -> ::windows::runtime::Result<::windows::runtime::HSTRING>518 pub fn Label(&self) -> ::windows::runtime::Result<::windows::runtime::HSTRING> { 519 let this = self; 520 unsafe { 521 let mut result__: ::std::mem::ManuallyDrop<::windows::runtime::HSTRING> = ::std::mem::zeroed(); 522 (::windows::runtime::Interface::vtable(this).6)(::std::mem::transmute_copy(this), &mut result__).from_abi::<::windows::runtime::HSTRING>(result__) 523 } 524 } SetLabel<'a, Param0: ::windows::runtime::IntoParam<'a, ::windows::runtime::HSTRING>>(&self, value: Param0) -> ::windows::runtime::Result<()>525 pub fn SetLabel<'a, Param0: ::windows::runtime::IntoParam<'a, ::windows::runtime::HSTRING>>(&self, value: Param0) -> ::windows::runtime::Result<()> { 526 let this = self; 527 unsafe { (::windows::runtime::Interface::vtable(this).7)(::std::mem::transmute_copy(this), value.into_param().abi()).ok() } 528 } Invoked(&self) -> ::windows::runtime::Result<UICommandInvokedHandler>529 pub fn Invoked(&self) -> ::windows::runtime::Result<UICommandInvokedHandler> { 530 let this = self; 531 unsafe { 532 let mut result__: ::windows::runtime::RawPtr = ::std::mem::zeroed(); 533 (::windows::runtime::Interface::vtable(this).8)(::std::mem::transmute_copy(this), &mut result__).from_abi::<UICommandInvokedHandler>(result__) 534 } 535 } SetInvoked<'a, Param0: ::windows::runtime::IntoParam<'a, UICommandInvokedHandler>>(&self, value: Param0) -> ::windows::runtime::Result<()>536 pub fn SetInvoked<'a, Param0: ::windows::runtime::IntoParam<'a, UICommandInvokedHandler>>(&self, value: Param0) -> ::windows::runtime::Result<()> { 537 let this = self; 538 unsafe { (::windows::runtime::Interface::vtable(this).9)(::std::mem::transmute_copy(this), value.into_param().abi()).ok() } 539 } Id(&self) -> ::windows::runtime::Result<::windows::runtime::IInspectable>540 pub fn Id(&self) -> ::windows::runtime::Result<::windows::runtime::IInspectable> { 541 let this = self; 542 unsafe { 543 let mut result__: ::windows::runtime::RawPtr = ::std::mem::zeroed(); 544 (::windows::runtime::Interface::vtable(this).10)(::std::mem::transmute_copy(this), &mut result__).from_abi::<::windows::runtime::IInspectable>(result__) 545 } 546 } SetId<'a, Param0: ::windows::runtime::IntoParam<'a, ::windows::runtime::IInspectable>>(&self, value: Param0) -> ::windows::runtime::Result<()>547 pub fn SetId<'a, Param0: ::windows::runtime::IntoParam<'a, ::windows::runtime::IInspectable>>(&self, value: Param0) -> ::windows::runtime::Result<()> { 548 let this = self; 549 unsafe { (::windows::runtime::Interface::vtable(this).11)(::std::mem::transmute_copy(this), value.into_param().abi()).ok() } 550 } Create<'a, Param0: ::windows::runtime::IntoParam<'a, ::windows::runtime::HSTRING>>(label: Param0) -> ::windows::runtime::Result<UICommand>551 pub fn Create<'a, Param0: ::windows::runtime::IntoParam<'a, ::windows::runtime::HSTRING>>(label: Param0) -> ::windows::runtime::Result<UICommand> { 552 Self::IUICommandFactory(|this| unsafe { 553 let mut result__: ::windows::runtime::RawPtr = ::std::mem::zeroed(); 554 (::windows::runtime::Interface::vtable(this).6)(::std::mem::transmute_copy(this), label.into_param().abi(), &mut result__).from_abi::<UICommand>(result__) 555 }) 556 } CreateWithHandler<'a, Param0: ::windows::runtime::IntoParam<'a, ::windows::runtime::HSTRING>, Param1: ::windows::runtime::IntoParam<'a, UICommandInvokedHandler>>(label: Param0, action: Param1) -> ::windows::runtime::Result<UICommand>557 pub fn CreateWithHandler<'a, Param0: ::windows::runtime::IntoParam<'a, ::windows::runtime::HSTRING>, Param1: ::windows::runtime::IntoParam<'a, UICommandInvokedHandler>>(label: Param0, action: Param1) -> ::windows::runtime::Result<UICommand> { 558 Self::IUICommandFactory(|this| unsafe { 559 let mut result__: ::windows::runtime::RawPtr = ::std::mem::zeroed(); 560 (::windows::runtime::Interface::vtable(this).7)(::std::mem::transmute_copy(this), label.into_param().abi(), action.into_param().abi(), &mut result__).from_abi::<UICommand>(result__) 561 }) 562 } CreateWithHandlerAndId<'a, Param0: ::windows::runtime::IntoParam<'a, ::windows::runtime::HSTRING>, Param1: ::windows::runtime::IntoParam<'a, UICommandInvokedHandler>, Param2: ::windows::runtime::IntoParam<'a, ::windows::runtime::IInspectable>>(label: Param0, action: Param1, commandid: Param2) -> ::windows::runtime::Result<UICommand>563 pub fn CreateWithHandlerAndId<'a, Param0: ::windows::runtime::IntoParam<'a, ::windows::runtime::HSTRING>, Param1: ::windows::runtime::IntoParam<'a, UICommandInvokedHandler>, Param2: ::windows::runtime::IntoParam<'a, ::windows::runtime::IInspectable>>(label: Param0, action: Param1, commandid: Param2) -> ::windows::runtime::Result<UICommand> { 564 Self::IUICommandFactory(|this| unsafe { 565 let mut result__: ::windows::runtime::RawPtr = ::std::mem::zeroed(); 566 (::windows::runtime::Interface::vtable(this).8)(::std::mem::transmute_copy(this), label.into_param().abi(), action.into_param().abi(), commandid.into_param().abi(), &mut result__).from_abi::<UICommand>(result__) 567 }) 568 } IUICommandFactory<R, F: FnOnce(&IUICommandFactory) -> ::windows::runtime::Result<R>>(callback: F) -> ::windows::runtime::Result<R>569 pub fn IUICommandFactory<R, F: FnOnce(&IUICommandFactory) -> ::windows::runtime::Result<R>>(callback: F) -> ::windows::runtime::Result<R> { 570 static mut SHARED: ::windows::runtime::FactoryCache<UICommand, IUICommandFactory> = ::windows::runtime::FactoryCache::new(); 571 unsafe { SHARED.call(callback) } 572 } 573 } 574 unsafe impl ::windows::runtime::RuntimeType for UICommand { 575 const SIGNATURE: ::windows::runtime::ConstBuffer = ::windows::runtime::ConstBuffer::from_slice(b"rc(Windows.UI.Popups.UICommand;{4ff93a75-4145-47ff-ac7f-dff1c1fa5b0f})"); 576 } 577 unsafe impl ::windows::runtime::Interface for UICommand { 578 type Vtable = IUICommand_abi; 579 const IID: ::windows::runtime::GUID = ::windows::runtime::GUID::from_values(1341733493, 16709, 18431, [172, 127, 223, 241, 193, 250, 91, 15]); 580 } 581 impl ::windows::runtime::RuntimeName for UICommand { 582 const NAME: &'static str = "Windows.UI.Popups.UICommand"; 583 } 584 impl ::std::convert::From<UICommand> for ::windows::runtime::IUnknown { from(value: UICommand) -> Self585 fn from(value: UICommand) -> Self { 586 unsafe { ::std::mem::transmute(value) } 587 } 588 } 589 impl ::std::convert::From<&UICommand> for ::windows::runtime::IUnknown { from(value: &UICommand) -> Self590 fn from(value: &UICommand) -> Self { 591 ::std::convert::From::from(::std::clone::Clone::clone(value)) 592 } 593 } 594 impl<'a> ::windows::runtime::IntoParam<'a, ::windows::runtime::IUnknown> for UICommand { into_param(self) -> ::windows::runtime::Param<'a, ::windows::runtime::IUnknown>595 fn into_param(self) -> ::windows::runtime::Param<'a, ::windows::runtime::IUnknown> { 596 ::windows::runtime::Param::Owned(::std::convert::Into::<::windows::runtime::IUnknown>::into(self)) 597 } 598 } 599 impl<'a> ::windows::runtime::IntoParam<'a, ::windows::runtime::IUnknown> for &UICommand { into_param(self) -> ::windows::runtime::Param<'a, ::windows::runtime::IUnknown>600 fn into_param(self) -> ::windows::runtime::Param<'a, ::windows::runtime::IUnknown> { 601 ::windows::runtime::Param::Owned(::std::convert::Into::<::windows::runtime::IUnknown>::into(::std::clone::Clone::clone(self))) 602 } 603 } 604 impl ::std::convert::From<UICommand> for ::windows::runtime::IInspectable { from(value: UICommand) -> Self605 fn from(value: UICommand) -> Self { 606 value.0 607 } 608 } 609 impl ::std::convert::From<&UICommand> for ::windows::runtime::IInspectable { from(value: &UICommand) -> Self610 fn from(value: &UICommand) -> Self { 611 value.0.clone() 612 } 613 } 614 impl<'a> ::windows::runtime::IntoParam<'a, ::windows::runtime::IInspectable> for UICommand { into_param(self) -> ::windows::runtime::Param<'a, ::windows::runtime::IInspectable>615 fn into_param(self) -> ::windows::runtime::Param<'a, ::windows::runtime::IInspectable> { 616 ::windows::runtime::Param::Owned(self.0) 617 } 618 } 619 impl<'a> ::windows::runtime::IntoParam<'a, ::windows::runtime::IInspectable> for &'a UICommand { into_param(self) -> ::windows::runtime::Param<'a, ::windows::runtime::IInspectable>620 fn into_param(self) -> ::windows::runtime::Param<'a, ::windows::runtime::IInspectable> { 621 ::windows::runtime::Param::Borrowed(&self.0) 622 } 623 } 624 impl ::std::convert::From<UICommand> for IUICommand { from(value: UICommand) -> Self625 fn from(value: UICommand) -> Self { 626 unsafe { ::std::mem::transmute(value) } 627 } 628 } 629 impl ::std::convert::From<&UICommand> for IUICommand { from(value: &UICommand) -> Self630 fn from(value: &UICommand) -> Self { 631 ::std::convert::From::from(::std::clone::Clone::clone(value)) 632 } 633 } 634 impl<'a> ::windows::runtime::IntoParam<'a, IUICommand> for UICommand { into_param(self) -> ::windows::runtime::Param<'a, IUICommand>635 fn into_param(self) -> ::windows::runtime::Param<'a, IUICommand> { 636 ::windows::runtime::Param::Owned(::std::convert::Into::<IUICommand>::into(self)) 637 } 638 } 639 impl<'a> ::windows::runtime::IntoParam<'a, IUICommand> for &UICommand { into_param(self) -> ::windows::runtime::Param<'a, IUICommand>640 fn into_param(self) -> ::windows::runtime::Param<'a, IUICommand> { 641 ::windows::runtime::Param::Owned(::std::convert::Into::<IUICommand>::into(::std::clone::Clone::clone(self))) 642 } 643 } 644 unsafe impl ::std::marker::Send for UICommand {} 645 unsafe impl ::std::marker::Sync for UICommand {} 646 #[repr(transparent)] 647 #[derive(:: std :: cmp :: PartialEq, :: std :: cmp :: Eq, :: std :: clone :: Clone, :: std :: fmt :: Debug)] 648 pub struct UICommandInvokedHandler(::windows::runtime::IUnknown); 649 impl UICommandInvokedHandler { new<F: FnMut(&::std::option::Option<IUICommand>) -> ::windows::runtime::Result<()> + 'static>(invoke: F) -> Self650 pub fn new<F: FnMut(&::std::option::Option<IUICommand>) -> ::windows::runtime::Result<()> + 'static>(invoke: F) -> Self { 651 let com = UICommandInvokedHandler_box::<F> { 652 vtable: &UICommandInvokedHandler_box::<F>::VTABLE, 653 count: ::windows::runtime::RefCount::new(1), 654 invoke, 655 }; 656 unsafe { std::mem::transmute(::std::boxed::Box::new(com)) } 657 } Invoke<'a, Param0: ::windows::runtime::IntoParam<'a, IUICommand>>(&self, command: Param0) -> ::windows::runtime::Result<()>658 pub fn Invoke<'a, Param0: ::windows::runtime::IntoParam<'a, IUICommand>>(&self, command: Param0) -> ::windows::runtime::Result<()> { 659 let this = self; 660 unsafe { (::windows::runtime::Interface::vtable(this).3)(::std::mem::transmute_copy(this), command.into_param().abi()).ok() } 661 } 662 } 663 unsafe impl ::windows::runtime::RuntimeType for UICommandInvokedHandler { 664 const SIGNATURE: ::windows::runtime::ConstBuffer = ::windows::runtime::ConstBuffer::from_slice(b"delegate({daf77a4f-c27a-4298-9ac6-2922c45e7da6})"); 665 } 666 unsafe impl ::windows::runtime::Interface for UICommandInvokedHandler { 667 type Vtable = UICommandInvokedHandler_abi; 668 const IID: ::windows::runtime::GUID = ::windows::runtime::GUID::from_values(3673651791, 49786, 17048, [154, 198, 41, 34, 196, 94, 125, 166]); 669 } 670 #[repr(C)] 671 #[doc(hidden)] 672 pub struct UICommandInvokedHandler_abi( 673 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr, iid: &::windows::runtime::GUID, interface: *mut ::windows::runtime::RawPtr) -> ::windows::runtime::HRESULT, 674 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr) -> u32, 675 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr) -> u32, 676 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr, command: ::windows::runtime::RawPtr) -> ::windows::runtime::HRESULT, 677 ); 678 #[repr(C)] 679 struct UICommandInvokedHandler_box<F: FnMut(&::std::option::Option<IUICommand>) -> ::windows::runtime::Result<()> + 'static> { 680 vtable: *const UICommandInvokedHandler_abi, 681 invoke: F, 682 count: ::windows::runtime::RefCount, 683 } 684 impl<F: FnMut(&::std::option::Option<IUICommand>) -> ::windows::runtime::Result<()> + 'static> UICommandInvokedHandler_box<F> { 685 const VTABLE: UICommandInvokedHandler_abi = UICommandInvokedHandler_abi(Self::QueryInterface, Self::AddRef, Self::Release, Self::Invoke); QueryInterface(this: ::windows::runtime::RawPtr, iid: &::windows::runtime::GUID, interface: *mut ::windows::runtime::RawPtr) -> ::windows::runtime::HRESULT686 unsafe extern "system" fn QueryInterface(this: ::windows::runtime::RawPtr, iid: &::windows::runtime::GUID, interface: *mut ::windows::runtime::RawPtr) -> ::windows::runtime::HRESULT { 687 let this = this as *mut ::windows::runtime::RawPtr as *mut Self; 688 *interface = if iid == &<UICommandInvokedHandler as ::windows::runtime::Interface>::IID || iid == &<::windows::runtime::IUnknown as ::windows::runtime::Interface>::IID || iid == &<::windows::runtime::IAgileObject as ::windows::runtime::Interface>::IID { 689 &mut (*this).vtable as *mut _ as _ 690 } else { 691 ::std::ptr::null_mut() 692 }; 693 if (*interface).is_null() { 694 ::windows::runtime::HRESULT(0x8000_4002) 695 } else { 696 (*this).count.add_ref(); 697 ::windows::runtime::HRESULT(0) 698 } 699 } AddRef(this: ::windows::runtime::RawPtr) -> u32700 unsafe extern "system" fn AddRef(this: ::windows::runtime::RawPtr) -> u32 { 701 let this = this as *mut ::windows::runtime::RawPtr as *mut Self; 702 (*this).count.add_ref() 703 } Release(this: ::windows::runtime::RawPtr) -> u32704 unsafe extern "system" fn Release(this: ::windows::runtime::RawPtr) -> u32 { 705 let this = this as *mut ::windows::runtime::RawPtr as *mut Self; 706 let remaining = (*this).count.release(); 707 if remaining == 0 { 708 Box::from_raw(this); 709 } 710 remaining 711 } Invoke(this: ::windows::runtime::RawPtr, command: ::windows::runtime::RawPtr) -> ::windows::runtime::HRESULT712 unsafe extern "system" fn Invoke(this: ::windows::runtime::RawPtr, command: ::windows::runtime::RawPtr) -> ::windows::runtime::HRESULT { 713 let this = this as *mut ::windows::runtime::RawPtr as *mut Self; 714 ((*this).invoke)(&*(&command as *const <IUICommand as ::windows::runtime::Abi>::Abi as *const <IUICommand as ::windows::runtime::Abi>::DefaultType)).into() 715 } 716 } 717 #[repr(transparent)] 718 #[derive(:: std :: cmp :: PartialEq, :: std :: cmp :: Eq, :: std :: clone :: Clone, :: std :: fmt :: Debug)] 719 pub struct UICommandSeparator(::windows::runtime::IInspectable); 720 impl UICommandSeparator { new() -> ::windows::runtime::Result<Self>721 pub fn new() -> ::windows::runtime::Result<Self> { 722 Self::IActivationFactory(|f| f.activate_instance::<Self>()) 723 } IActivationFactory<R, F: FnOnce(&::windows::runtime::IActivationFactory) -> ::windows::runtime::Result<R>>(callback: F) -> ::windows::runtime::Result<R>724 fn IActivationFactory<R, F: FnOnce(&::windows::runtime::IActivationFactory) -> ::windows::runtime::Result<R>>(callback: F) -> ::windows::runtime::Result<R> { 725 static mut SHARED: ::windows::runtime::FactoryCache<UICommandSeparator, ::windows::runtime::IActivationFactory> = ::windows::runtime::FactoryCache::new(); 726 unsafe { SHARED.call(callback) } 727 } Label(&self) -> ::windows::runtime::Result<::windows::runtime::HSTRING>728 pub fn Label(&self) -> ::windows::runtime::Result<::windows::runtime::HSTRING> { 729 let this = self; 730 unsafe { 731 let mut result__: ::std::mem::ManuallyDrop<::windows::runtime::HSTRING> = ::std::mem::zeroed(); 732 (::windows::runtime::Interface::vtable(this).6)(::std::mem::transmute_copy(this), &mut result__).from_abi::<::windows::runtime::HSTRING>(result__) 733 } 734 } SetLabel<'a, Param0: ::windows::runtime::IntoParam<'a, ::windows::runtime::HSTRING>>(&self, value: Param0) -> ::windows::runtime::Result<()>735 pub fn SetLabel<'a, Param0: ::windows::runtime::IntoParam<'a, ::windows::runtime::HSTRING>>(&self, value: Param0) -> ::windows::runtime::Result<()> { 736 let this = self; 737 unsafe { (::windows::runtime::Interface::vtable(this).7)(::std::mem::transmute_copy(this), value.into_param().abi()).ok() } 738 } Invoked(&self) -> ::windows::runtime::Result<UICommandInvokedHandler>739 pub fn Invoked(&self) -> ::windows::runtime::Result<UICommandInvokedHandler> { 740 let this = self; 741 unsafe { 742 let mut result__: ::windows::runtime::RawPtr = ::std::mem::zeroed(); 743 (::windows::runtime::Interface::vtable(this).8)(::std::mem::transmute_copy(this), &mut result__).from_abi::<UICommandInvokedHandler>(result__) 744 } 745 } SetInvoked<'a, Param0: ::windows::runtime::IntoParam<'a, UICommandInvokedHandler>>(&self, value: Param0) -> ::windows::runtime::Result<()>746 pub fn SetInvoked<'a, Param0: ::windows::runtime::IntoParam<'a, UICommandInvokedHandler>>(&self, value: Param0) -> ::windows::runtime::Result<()> { 747 let this = self; 748 unsafe { (::windows::runtime::Interface::vtable(this).9)(::std::mem::transmute_copy(this), value.into_param().abi()).ok() } 749 } Id(&self) -> ::windows::runtime::Result<::windows::runtime::IInspectable>750 pub fn Id(&self) -> ::windows::runtime::Result<::windows::runtime::IInspectable> { 751 let this = self; 752 unsafe { 753 let mut result__: ::windows::runtime::RawPtr = ::std::mem::zeroed(); 754 (::windows::runtime::Interface::vtable(this).10)(::std::mem::transmute_copy(this), &mut result__).from_abi::<::windows::runtime::IInspectable>(result__) 755 } 756 } SetId<'a, Param0: ::windows::runtime::IntoParam<'a, ::windows::runtime::IInspectable>>(&self, value: Param0) -> ::windows::runtime::Result<()>757 pub fn SetId<'a, Param0: ::windows::runtime::IntoParam<'a, ::windows::runtime::IInspectable>>(&self, value: Param0) -> ::windows::runtime::Result<()> { 758 let this = self; 759 unsafe { (::windows::runtime::Interface::vtable(this).11)(::std::mem::transmute_copy(this), value.into_param().abi()).ok() } 760 } 761 } 762 unsafe impl ::windows::runtime::RuntimeType for UICommandSeparator { 763 const SIGNATURE: ::windows::runtime::ConstBuffer = ::windows::runtime::ConstBuffer::from_slice(b"rc(Windows.UI.Popups.UICommandSeparator;{4ff93a75-4145-47ff-ac7f-dff1c1fa5b0f})"); 764 } 765 unsafe impl ::windows::runtime::Interface for UICommandSeparator { 766 type Vtable = IUICommand_abi; 767 const IID: ::windows::runtime::GUID = ::windows::runtime::GUID::from_values(1341733493, 16709, 18431, [172, 127, 223, 241, 193, 250, 91, 15]); 768 } 769 impl ::windows::runtime::RuntimeName for UICommandSeparator { 770 const NAME: &'static str = "Windows.UI.Popups.UICommandSeparator"; 771 } 772 impl ::std::convert::From<UICommandSeparator> for ::windows::runtime::IUnknown { from(value: UICommandSeparator) -> Self773 fn from(value: UICommandSeparator) -> Self { 774 unsafe { ::std::mem::transmute(value) } 775 } 776 } 777 impl ::std::convert::From<&UICommandSeparator> for ::windows::runtime::IUnknown { from(value: &UICommandSeparator) -> Self778 fn from(value: &UICommandSeparator) -> Self { 779 ::std::convert::From::from(::std::clone::Clone::clone(value)) 780 } 781 } 782 impl<'a> ::windows::runtime::IntoParam<'a, ::windows::runtime::IUnknown> for UICommandSeparator { into_param(self) -> ::windows::runtime::Param<'a, ::windows::runtime::IUnknown>783 fn into_param(self) -> ::windows::runtime::Param<'a, ::windows::runtime::IUnknown> { 784 ::windows::runtime::Param::Owned(::std::convert::Into::<::windows::runtime::IUnknown>::into(self)) 785 } 786 } 787 impl<'a> ::windows::runtime::IntoParam<'a, ::windows::runtime::IUnknown> for &UICommandSeparator { into_param(self) -> ::windows::runtime::Param<'a, ::windows::runtime::IUnknown>788 fn into_param(self) -> ::windows::runtime::Param<'a, ::windows::runtime::IUnknown> { 789 ::windows::runtime::Param::Owned(::std::convert::Into::<::windows::runtime::IUnknown>::into(::std::clone::Clone::clone(self))) 790 } 791 } 792 impl ::std::convert::From<UICommandSeparator> for ::windows::runtime::IInspectable { from(value: UICommandSeparator) -> Self793 fn from(value: UICommandSeparator) -> Self { 794 value.0 795 } 796 } 797 impl ::std::convert::From<&UICommandSeparator> for ::windows::runtime::IInspectable { from(value: &UICommandSeparator) -> Self798 fn from(value: &UICommandSeparator) -> Self { 799 value.0.clone() 800 } 801 } 802 impl<'a> ::windows::runtime::IntoParam<'a, ::windows::runtime::IInspectable> for UICommandSeparator { into_param(self) -> ::windows::runtime::Param<'a, ::windows::runtime::IInspectable>803 fn into_param(self) -> ::windows::runtime::Param<'a, ::windows::runtime::IInspectable> { 804 ::windows::runtime::Param::Owned(self.0) 805 } 806 } 807 impl<'a> ::windows::runtime::IntoParam<'a, ::windows::runtime::IInspectable> for &'a UICommandSeparator { into_param(self) -> ::windows::runtime::Param<'a, ::windows::runtime::IInspectable>808 fn into_param(self) -> ::windows::runtime::Param<'a, ::windows::runtime::IInspectable> { 809 ::windows::runtime::Param::Borrowed(&self.0) 810 } 811 } 812 impl ::std::convert::From<UICommandSeparator> for IUICommand { from(value: UICommandSeparator) -> Self813 fn from(value: UICommandSeparator) -> Self { 814 unsafe { ::std::mem::transmute(value) } 815 } 816 } 817 impl ::std::convert::From<&UICommandSeparator> for IUICommand { from(value: &UICommandSeparator) -> Self818 fn from(value: &UICommandSeparator) -> Self { 819 ::std::convert::From::from(::std::clone::Clone::clone(value)) 820 } 821 } 822 impl<'a> ::windows::runtime::IntoParam<'a, IUICommand> for UICommandSeparator { into_param(self) -> ::windows::runtime::Param<'a, IUICommand>823 fn into_param(self) -> ::windows::runtime::Param<'a, IUICommand> { 824 ::windows::runtime::Param::Owned(::std::convert::Into::<IUICommand>::into(self)) 825 } 826 } 827 impl<'a> ::windows::runtime::IntoParam<'a, IUICommand> for &UICommandSeparator { into_param(self) -> ::windows::runtime::Param<'a, IUICommand>828 fn into_param(self) -> ::windows::runtime::Param<'a, IUICommand> { 829 ::windows::runtime::Param::Owned(::std::convert::Into::<IUICommand>::into(::std::clone::Clone::clone(self))) 830 } 831 } 832 unsafe impl ::std::marker::Send for UICommandSeparator {} 833 unsafe impl ::std::marker::Sync for UICommandSeparator {} 834