|
| 1 | +windows_core::imp::define_interface!(IActionFeedbackHandler, IActionFeedbackHandler_Vtbl, 0xa3fc3c51_a8c6_52c8_ad77_37bf3e2b565c); |
| 2 | +impl windows_core::RuntimeType for IActionFeedbackHandler { |
| 3 | + const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>(); |
| 4 | +} |
| 5 | +windows_core::imp::interface_hierarchy!(IActionFeedbackHandler, windows_core::IUnknown, windows_core::IInspectable); |
| 6 | +impl IActionFeedbackHandler { |
| 7 | + pub fn ProcessFeedbackAsync<P0, P1>(&self, context: P0, feedback: P1) -> windows_core::Result<windows_future::IAsyncAction> |
| 8 | + where |
| 9 | + P0: windows_core::Param<super::ActionInvocationContext>, |
| 10 | + P1: windows_core::Param<super::ActionFeedback>, |
| 11 | + { |
| 12 | + let this = self; |
| 13 | + unsafe { |
| 14 | + let mut result__ = core::mem::zeroed(); |
| 15 | + (windows_core::Interface::vtable(this).ProcessFeedbackAsync)(windows_core::Interface::as_raw(this), context.param().abi(), feedback.param().abi(), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) |
| 16 | + } |
| 17 | + } |
| 18 | +} |
| 19 | +impl windows_core::RuntimeName for IActionFeedbackHandler { |
| 20 | + const NAME: &'static str = "Windows.AI.Actions.Provider.IActionFeedbackHandler"; |
| 21 | +} |
| 22 | +pub trait IActionFeedbackHandler_Impl: windows_core::IUnknownImpl { |
| 23 | + fn ProcessFeedbackAsync(&self, context: windows_core::Ref<super::ActionInvocationContext>, feedback: windows_core::Ref<super::ActionFeedback>) -> windows_core::Result<windows_future::IAsyncAction>; |
| 24 | +} |
| 25 | +impl IActionFeedbackHandler_Vtbl { |
| 26 | + pub const fn new<Identity: IActionFeedbackHandler_Impl, const OFFSET: isize>() -> Self { |
| 27 | + unsafe extern "system" fn ProcessFeedbackAsync<Identity: IActionFeedbackHandler_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, context: *mut core::ffi::c_void, feedback: *mut core::ffi::c_void, result__: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { |
| 28 | + unsafe { |
| 29 | + let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); |
| 30 | + match IActionFeedbackHandler_Impl::ProcessFeedbackAsync(this, core::mem::transmute_copy(&context), core::mem::transmute_copy(&feedback)) { |
| 31 | + Ok(ok__) => { |
| 32 | + result__.write(core::mem::transmute_copy(&ok__)); |
| 33 | + core::mem::forget(ok__); |
| 34 | + windows_core::HRESULT(0) |
| 35 | + } |
| 36 | + Err(err) => err.into(), |
| 37 | + } |
| 38 | + } |
| 39 | + } |
| 40 | + Self { |
| 41 | + base__: windows_core::IInspectable_Vtbl::new::<Identity, IActionFeedbackHandler, OFFSET>(), |
| 42 | + ProcessFeedbackAsync: ProcessFeedbackAsync::<Identity, OFFSET>, |
| 43 | + } |
| 44 | + } |
| 45 | + pub fn matches(iid: &windows_core::GUID) -> bool { |
| 46 | + iid == &<IActionFeedbackHandler as windows_core::Interface>::IID |
| 47 | + } |
| 48 | +} |
| 49 | +#[repr(C)] |
| 50 | +#[doc(hidden)] |
| 51 | +pub struct IActionFeedbackHandler_Vtbl { |
| 52 | + pub base__: windows_core::IInspectable_Vtbl, |
| 53 | + pub ProcessFeedbackAsync: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT, |
| 54 | +} |
| 55 | +windows_core::imp::define_interface!(IActionProvider, IActionProvider_Vtbl, 0x62906c47_3d07_55f1_aefa_1522505afbbe); |
| 56 | +impl windows_core::RuntimeType for IActionProvider { |
| 57 | + const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>(); |
| 58 | +} |
| 59 | +windows_core::imp::interface_hierarchy!(IActionProvider, windows_core::IUnknown, windows_core::IInspectable); |
| 60 | +impl IActionProvider { |
| 61 | + pub fn InvokeAsync<P0>(&self, context: P0) -> windows_core::Result<windows_future::IAsyncAction> |
| 62 | + where |
| 63 | + P0: windows_core::Param<super::ActionInvocationContext>, |
| 64 | + { |
| 65 | + let this = self; |
| 66 | + unsafe { |
| 67 | + let mut result__ = core::mem::zeroed(); |
| 68 | + (windows_core::Interface::vtable(this).InvokeAsync)(windows_core::Interface::as_raw(this), context.param().abi(), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) |
| 69 | + } |
| 70 | + } |
| 71 | +} |
| 72 | +impl windows_core::RuntimeName for IActionProvider { |
| 73 | + const NAME: &'static str = "Windows.AI.Actions.Provider.IActionProvider"; |
| 74 | +} |
| 75 | +pub trait IActionProvider_Impl: windows_core::IUnknownImpl { |
| 76 | + fn InvokeAsync(&self, context: windows_core::Ref<super::ActionInvocationContext>) -> windows_core::Result<windows_future::IAsyncAction>; |
| 77 | +} |
| 78 | +impl IActionProvider_Vtbl { |
| 79 | + pub const fn new<Identity: IActionProvider_Impl, const OFFSET: isize>() -> Self { |
| 80 | + unsafe extern "system" fn InvokeAsync<Identity: IActionProvider_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, context: *mut core::ffi::c_void, result__: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { |
| 81 | + unsafe { |
| 82 | + let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); |
| 83 | + match IActionProvider_Impl::InvokeAsync(this, core::mem::transmute_copy(&context)) { |
| 84 | + Ok(ok__) => { |
| 85 | + result__.write(core::mem::transmute_copy(&ok__)); |
| 86 | + core::mem::forget(ok__); |
| 87 | + windows_core::HRESULT(0) |
| 88 | + } |
| 89 | + Err(err) => err.into(), |
| 90 | + } |
| 91 | + } |
| 92 | + } |
| 93 | + Self { base__: windows_core::IInspectable_Vtbl::new::<Identity, IActionProvider, OFFSET>(), InvokeAsync: InvokeAsync::<Identity, OFFSET> } |
| 94 | + } |
| 95 | + pub fn matches(iid: &windows_core::GUID) -> bool { |
| 96 | + iid == &<IActionProvider as windows_core::Interface>::IID |
| 97 | + } |
| 98 | +} |
| 99 | +#[repr(C)] |
| 100 | +#[doc(hidden)] |
| 101 | +pub struct IActionProvider_Vtbl { |
| 102 | + pub base__: windows_core::IInspectable_Vtbl, |
| 103 | + pub InvokeAsync: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT, |
| 104 | +} |
0 commit comments